.aix-stone-page {
  --aix-readable-bg: var(--aix-blue);
  --aix-readable-text: #fff;
  --aix-readable-muted: rgba(255, 255, 255, .75);
  --aix-readable-line: rgba(255, 255, 255, .25);
  background: var(--aix-readable-bg);
  color: var(--aix-readable-text);
}

.aix-stone-page .site-header { position: fixed; inset: 0 0 auto; }
.aix-stone-page .aix-mode-header { border-bottom-color: transparent; }
.aix-stone-page > main { pointer-events: none; }

.aix-intro-stone { --stone-presence: .78; position: fixed; inset: 0; z-index: 0; overflow: hidden; }
html.aix-light-intro .aix-intro-stone.is-loading .aix-stone-loading { opacity: 0; }
.aix-intro-stone canvas {
  position: absolute; inset: 0;
  display: block; width: 100%; height: 100%;
  opacity: 0; pointer-events: none; touch-action: pan-y;
  outline-offset: -6px;
  transition: opacity .65s ease;
}
.aix-intro-stone.is-ready canvas { opacity: 1; pointer-events: auto; cursor: grab; }
.aix-intro-stone.is-interacted canvas { transition: none; }
.aix-intro-stone.is-light-reveal canvas { transition: none; }
.aix-intro-stone.is-dragging canvas { cursor: grabbing; }
.aix-intro-stone canvas:focus-visible { outline: 1px solid rgba(255, 255, 255, .7); }

.aix-stone-page .aix-prose {
  position: relative; z-index: 1;
  pointer-events: none;
  width: min(35vw, 448px);
  padding-top: 142svh;
  padding-bottom: calc(20svh + var(--stone-tail-room, 0px));
  font-family: var(--aix-font-heading);
  letter-spacing: .025em;
}
.aix-stone-page .aix-prose > * { pointer-events: auto; }
.aix-stone-page.has-spatial-copy .aix-prose .aix-spatial-copy-source,
.aix-stone-page.has-spatial-copy .aix-prose .aix-spatial-copy-source * {
  color: transparent;
  text-decoration-color: transparent;
}
.aix-stone-page.has-spatial-copy .aix-prose,
.aix-stone-page.has-spatial-copy .aix-prose * {
  pointer-events: none;
  -webkit-user-select: none;
  user-select: none;
  border-color: transparent !important;
}
.aix-stone-page.has-spatial-copy .aix-prose ::selection {
  color: transparent;
  background: transparent;
}
.aix-stone-page .aix-prose-header { display: block; margin-bottom: 8px; }
.aix-stone-page .aix-prose h1 {
  margin-bottom: 10px;
  font-size: clamp(23px, 2.4vw, 30px);
  font-weight: 400; line-height: 1.45;
}
.aix-stone-page .aix-prose p {
  font-size: clamp(13px, 1.4vw, 17px);
  font-weight: 400; line-height: 1.75;
}
.aix-stone-page .aix-prose-section { display: block; margin-top: 0; }
.aix-stone-page .aix-prose-section p { margin-bottom: 8px; }
.aix-stone-page .aix-prose-section p.ai-definition-note {
  margin-top: 24px; padding-top: 16px;
  border-top: 1px solid var(--aix-readable-line);
  color: var(--aix-readable-muted);
  font-size: clamp(12px, 1.25vw, 15px);
}
.aix-stone-page .aix-page-nav { margin-top: 40px; }
.aix-stone-page .aix-page-nav-link { border: 0; border-radius: 0; padding: 12px 0; }
.aix-stone-page .aix-page-nav-link:hover { color: #fff; }
.aix-stone-page.has-spatial-copy .aix-page-nav,
.aix-stone-page.has-spatial-copy .aix-prose a { pointer-events: none; outline: none; }
.aix-orbit-link {
  position: fixed; z-index: 2; display: block;
  color: transparent; font-size: 0; text-decoration: none;
  cursor: pointer; touch-action: pan-y;
}
.aix-orbit-link[hidden] { display: none; }
.aix-orbit-link.is-focused { outline: 1px solid rgba(255, 255, 255, .7); outline-offset: 3px; }

.aix-stone-declaration .aix-prose-header { margin-bottom: 36px; }
.aix-stone-declaration .declaration-rule { display: block; margin: 0 0 40px; }
.aix-stone-declaration .declaration-rule + .declaration-rule { margin-top: 0; }
.aix-stone-declaration .declaration-rule h3 {
  margin-bottom: 12px;
  font-size: clamp(17px, 1.65vw, 21px);
  font-weight: 500; line-height: 1.65;
}
.aix-stone-declaration .declaration-rule p.related-characteristics {
  margin-top: 14px; margin-bottom: 0;
  color: var(--aix-readable-muted);
  font-size: clamp(12px, 1.2vw, 14px); line-height: 1.8;
}
.aix-stone-declaration .related-characteristics a { color: #fff; }
.aix-stone-declaration .aix-page-nav-link { flex: 1 1 0; width: auto; min-width: 0; }

.aix-stone-page > main,
.aix-stone-page .aix-site-footer {
  animation: none;
  transform: none;
  filter: none;
  opacity: 1;
}
.aix-stone-page > main:focus { outline: none; }
.aix-stone-page.is-stone-swapping .aix-prose,
.aix-stone-page.is-preparing-stone .aix-prose,
.aix-stone-page.is-restoring-stone .aix-prose { visibility: hidden; }
.aix-stone-page .question-scenes { gap: 0; }
.aix-stone-declaration .declaration-rule p.question-related {
  margin-top: 14px;
  color: var(--aix-readable-muted);
  font-size: clamp(12px, 1.2vw, 14px);
}
.aix-stone-page .property-layer { margin-top: 44px; }
.aix-stone-page .property-layer h2 {
  margin-bottom: 24px;
  font-size: clamp(18px, 1.8vw, 23px);
  font-weight: 500;
}
.aix-stone-page .property-item { margin-bottom: 40px; gap: 12px; }
.aix-stone-page .property-code { color: var(--aix-readable-muted); }
.aix-stone-page .property-text h3 { font-size: clamp(17px, 1.65vw, 21px); font-weight: 500; }
.aix-stone-page .property-text p { margin-bottom: 8px; }
.aix-stone-page .property-reference-label { font-size: 12px; }
.aix-stone-page .property-reference-title { font-size: 14px; }
.aix-stone-page .property-reference-meta { font-size: 11px; }

.aix-stone-loading {
  position: absolute; bottom: 32px; left: calc(50% - 24px);
  width: 48px; height: 1px; overflow: hidden; opacity: 0;
  background: rgba(255, 255, 255, .2);
  transition: opacity .3s ease; pointer-events: none;
}
.aix-intro-stone.is-loading .aix-stone-loading { opacity: .6; }
.aix-stone-loading span {
  display: block; width: 40%; height: 100%; background: #fff;
  animation: stone-loading 1.2s linear infinite paused;
}
.is-loading .aix-stone-loading span { animation-play-state: running; }
.aix-stone-loading[aria-valuenow] span {
  width: 100%; animation: none;
  transform: scaleX(var(--stone-progress, 0)); transform-origin: left;
  transition: transform .18s linear;
}
@keyframes stone-loading {
  from { transform: translateX(-100%); }
  to { transform: translateX(350%); }
}
@media (max-width: 640px) {
  .aix-stone-page .aix-prose { width: calc(100% - 48px); padding-top: 140svh; padding-bottom: calc(14svh + var(--stone-tail-room, 0px)); }
  .aix-stone-page .aix-prose p { font-size: 14px; line-height: 1.95; }
}
.aix-stone-page.is-stone-chapter .aix-prose { padding-top: 40svh; }
@media (prefers-reduced-motion: reduce) {
  .aix-intro-stone canvas, .aix-stone-loading, .aix-stone-loading span { transition: none; animation: none; }
}

/* Related cases use the existing stone space. */
.aix-relation-trigger { display: inline; max-width: 100%; margin: 0; padding: 0; border: 0; background: none; color: inherit; font: inherit; letter-spacing: inherit; line-height: inherit; text-align: left; white-space: normal; cursor: pointer; }
.aix-relation-trigger.aix-relation-code { color: #fff; text-decoration: underline; text-underline-offset: 4px; }
.aix-relations { position: fixed; inset: 0; z-index: 3; pointer-events: none; color: #fff; font-family: var(--aix-font-heading); }
.aix-relations[hidden], .aix-relations [hidden] { display: none !important; }
.aix-relation-tools { position: absolute; top: 84px; left: var(--aix-page-x, 48px); right: var(--aix-page-x, 48px); display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.aix-relation-tools p { margin: 0; font-size: 12px; letter-spacing: .04em; }
.aix-relation-tools > p { flex: 1; }
.aix-relation-pager { display: flex; gap: 20px; pointer-events: auto; }
.aix-relation-tools button:disabled { opacity: .35; cursor: default; }
.aix-relation-tools button { padding: 8px 0; border: 0; background: none; color: inherit; font: inherit; font-size: 12px; cursor: pointer; pointer-events: auto; }
.aix-relation-labels, .aix-relation-detail { position: fixed; top: 0; left: 0; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); pointer-events: none; }
.aix-relation-node { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 0; border: 0; background: none; color: rgba(255,255,255,.86); text-align: left; font: inherit; font-size: 12px; line-height: 1.55; cursor: pointer; pointer-events: auto; }
.aix-relation-node-meta { font-size: 10px; color: rgba(255,255,255,.65); }
.aix-relation-node.is-active { color: #fff; }
.aix-relation-node:hover > span:last-child { text-decoration: underline; text-underline-offset: 3px; }
.aix-relation-detail { pointer-events: auto; font-size: 13px; line-height: 1.75; }
.aix-relation-detail p { margin: 0 0 9px; }
.aix-relation-detail .aix-relation-detail-meta { margin-bottom: 4px; font-size: 11px; opacity: .7; }
.aix-relation-detail h2 { margin: 0 0 12px; font-size: 17px; line-height: 1.55; font-weight: 500; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden; }
.aix-relation-description { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 4; overflow: hidden; }
.aix-relation-reason { opacity: .75; font-size: 11px; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden; }
.aix-relation-detail-links { display: flex; flex-wrap: wrap; gap: 8px 16px; font-size: 12px; }
.aix-relations a { color: inherit; text-underline-offset: 4px; }
.aix-relations button:focus-visible, .aix-relations a:focus-visible { outline: 1px solid #fff; outline-offset: 4px; }
.aix-relation-accessible { position: fixed; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
@media (max-width: 640px) {
  .aix-relation-tools { top: 76px; left: 24px; right: 24px; }
  .aix-relation-tools p, .aix-relation-tools button { font-size: 11px; }
  .aix-relation-tools { flex-wrap: wrap; column-gap: 12px; row-gap: 0; }
  .aix-relation-tools > p { flex-basis: calc(100% - 90px); }
  .aix-relation-pager { order: 3; flex-basis: 100%; justify-content: flex-end; gap: 20px; }
  .aix-relation-node { font-size: 11px; }
  .aix-relation-node.is-character > span:last-child { display: none; }
  .aix-relation-node.is-character .aix-relation-node-meta { font-size: 11px; color: #fff; }
  .aix-relation-detail { font-size: 12px; }
  .aix-relation-detail h2 { font-size: 15px; margin-bottom: 8px; -webkit-line-clamp: 2; }
  .aix-relation-description { -webkit-line-clamp: 3; }
  .aix-relation-reason { -webkit-line-clamp: 2; }
}


button.aix-orbit-link { padding: 0; border: 0; background: transparent; }
