:root {
  --paper: #e9e3d3;
  --paper-light: #f1ecdf;
  --ink: #292c20;
  --ink-soft: #666858;
  --moss: #393d2c;
  --red: #a04431;
  --red-dark: #7d3325;
  --line: rgba(49, 52, 38, 0.24);
  --serif: Georgia, "Times New Roman", serif;
  --sans: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

html, body, #app { min-height: 100%; margin: 0; }

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  overflow-x: hidden;
}

button { font: inherit; touch-action: manipulation; }
button:focus-visible { outline: 2px solid var(--red); outline-offset: 4px; }

.chamber {
  min-height: 100vh;
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 33%, rgba(255,255,255,.4) 0, transparent 34%),
    linear-gradient(90deg, rgba(69,66,43,.035) 1px, transparent 1px),
    linear-gradient(rgba(69,66,43,.025) 1px, transparent 1px),
    var(--paper);
  background-size: auto, 84px 84px, 84px 84px, auto;
}
.chamber.arrival { overflow-anchor: none; }

.chamber::before,
.chamber::after {
  content: "";
  position: fixed;
  pointer-events: none;
  z-index: 0;
}

.chamber::before {
  inset: 13px;
  border: 1px solid rgba(57,61,44,.38);
}

.chamber::after {
  inset: 19px;
  border: 1px solid rgba(57,61,44,.12);
}

.topbar {
  position: relative;
  z-index: 5;
  height: 96px;
  padding: 0 clamp(35px, 5vw, 78px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}

.wordmark {
  display: flex;
  align-items: center;
  gap: 12px;
  border: 0;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: .26em;
  font: 600 14px var(--sans);
}

.wordmark i { display: block; width: 4px; height: 4px; background: var(--red); transform: rotate(45deg); }
.top-actions { display: flex; align-items: center; gap: 23px; }
.icon-button { width: 38px; height: 38px; padding: 8px; border: 0; background: transparent; cursor: pointer; color: var(--ink); }
.icon-button svg, .secondary-button svg { width: 100%; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.archive-button { border: 0; background: transparent; color: var(--ink); cursor: pointer; font: 600 11px var(--sans); text-transform: uppercase; letter-spacing: .18em; }
.archive-button span { display: inline-grid; place-items: center; margin-left: 8px; width: 25px; height: 25px; border: 1px solid var(--line); border-radius: 50%; font-size: 10px; }

.arrival-content {
  position: relative;
  z-index: 2;
  width: min(820px, calc(100% - 50px));
  margin: clamp(50px, 8vh, 110px) auto 0;
  text-align: center;
  animation: rise .9s cubic-bezier(.2,.8,.2,1) both;
}

.chamber.screen-settled .arrival-content,
.chamber.screen-settled .arrival-sage,
.chamber.screen-settled .opening-invitation,
.chamber.screen-settled .opening-stone,
.chamber.screen-settled .finished-content { animation: none; }

.sun-seal { width: 48px; height: 48px; border: 1px solid var(--red); border-radius: 50%; margin: 0 auto 31px; display: grid; place-items: center; position: relative; }
.sun-seal::before, .sun-seal::after { content: ""; position: absolute; width: 64px; height: 1px; background: linear-gradient(90deg, transparent, var(--red), transparent); }
.sun-seal::after { transform: rotate(90deg); }
.sun-seal span { width: 8px; height: 8px; border-radius: 50%; background: var(--red); box-shadow: 0 0 0 4px var(--paper), 0 0 0 5px var(--red); }
.eyebrow { margin: 0 0 19px; color: var(--red); font: 600 10px var(--sans); text-transform: uppercase; letter-spacing: .28em; }
.arrival-content h1 { margin: 0; font-size: clamp(44px, 6.7vw, 82px); font-weight: 400; line-height: .99; letter-spacing: -.045em; }
.arrival-content h1 em { color: var(--red); font-weight: 400; }
.intro { margin: 28px auto 35px; color: var(--ink-soft); font-size: 17px; line-height: 1.72; }

.primary-button {
  min-width: 244px;
  height: 60px;
  border: 1px solid var(--moss);
  background: var(--moss);
  color: var(--paper-light);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 28px;
  cursor: pointer;
  font: 600 11px var(--sans);
  text-transform: uppercase;
  letter-spacing: .18em;
  transition: transform .2s, background .2s;
}
.primary-button:hover { transform: translateY(-2px); background: #292c20; }
.primary-button:disabled { cursor: wait; opacity: .58; transform: none; }
.primary-button svg { width: 19px; fill: none; stroke: currentColor; stroke-width: 1.3; }
.text-button { display: block; margin: 19px auto 0; padding: 8px; border: 0; border-bottom: 1px solid var(--line); background: transparent; color: var(--ink-soft); cursor: pointer; font-size: 12px; font-style: italic; }
.great-archive-link { width: max-content; margin-top: 4px; text-decoration: none; }
.sage-stage { width: 180px; text-align: center; flex: 0 0 auto; }
.arrival-sage { position: relative; z-index: 2; width: min(560px, calc(100% - 50px)); margin: 41px auto 65px; animation: rise 1s .35s both; }
.sage-stage p { margin: 3px 0 0; color: var(--ink-soft); font-size: 11px; font-style: italic; letter-spacing: .03em; }
.daily-recollection { position: relative; width: min(520px, 100%); max-height: 430px; margin: 0 auto 25px; padding: 22px 42px 20px; overflow: hidden; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); animation: recollectionArrives .85s cubic-bezier(.2,.8,.2,1) both; }
.daily-recollection.departing { animation: recollectionDeparts .7s cubic-bezier(.4,0,.8,.2) both; }
.daily-recollection > small { color: var(--red); font: 600 8px var(--sans); text-transform: uppercase; letter-spacing: .22em; }
.daily-recollection a { display: block; color: var(--ink); text-decoration: none; }
.daily-recollection a:hover blockquote { color: var(--red-dark); }
.daily-recollection blockquote { display: -webkit-box; margin: 10px 0 7px; overflow: hidden; font-size: 20px; line-height: 1.32; font-style: italic; transition: color .2s; -webkit-box-orient: vertical; -webkit-line-clamp: 3; }
.daily-recollection a span { color: var(--ink-soft); font-size: 10px; }
.daily-recollection > p { margin-top: 14px; line-height: 1.45; }
.daily-recollection-close { position: absolute; top: 8px; right: 8px; width: 30px; height: 30px; border: 0; background: transparent; color: var(--ink-soft); cursor: pointer; font: 300 21px/1 var(--sans); }
.daily-recall-button { margin: 8px auto 0; padding: 5px 2px; border: 0; border-bottom: 1px solid transparent; background: transparent; color: var(--ink-soft); cursor: pointer; font-size: 10px; font-style: italic; transition: color .2s, border-color .2s; }
.daily-recall-button:hover { color: var(--red-dark); border-color: var(--line); }
.sage-character { width: 115px; height: 142px; margin: 0 auto; position: relative; transform-origin: 50% 95%; }
.sage-character svg { width: 100%; height: 100%; overflow: visible; }
.sage-character path, .sage-character circle { vector-effect: non-scaling-stroke; }
.sage-character .hat, .sage-character .robe, .sage-character .sleeve { fill: var(--moss); stroke: var(--ink); stroke-width: 1.4; }
.sage-character .hat-band { fill: none; stroke: var(--paper); stroke-width: 2; opacity: .7; }
.sage-character .face, .sage-character .hand { fill: #c5b69a; stroke: var(--ink); stroke-width: 1.2; }
.sage-character .beard { fill: #c8c2af; stroke: var(--ink); stroke-width: 1.2; }
.sage-character .brow, .sage-character .robe-fold, .sage-character .feet, .sage-character .staff { fill: none; stroke: var(--ink); stroke-width: 2; stroke-linecap: round; }
.sage-character .eye { fill: var(--ink); }
.sage-shadow { position: absolute; bottom: 6px; left: 22%; width: 74%; height: 9px; border-radius: 50%; background: rgba(39,42,30,.16); filter: blur(3px); }
.sage-character.waiting { animation: breathe 3.6s ease-in-out infinite; }
.sage-character.thinking { animation: ponder 1.1s ease-in-out infinite alternate; }
.sage-character.offering .right, .sage-character.delighted .right { transform: rotate(-15deg) translate(-3px,-5px); transform-origin: 105px 120px; }
.sage-character.offering.animate .right { animation: offer .65s ease-out both; }
.sage-character.ritual { transform: translateY(5px) rotate(2deg); }
.sage-character.concluding { transform: translateY(5px); }
.sage-character.concluding.animate { animation: settleSilence .9s ease-out both; }
.sage-character.concluding .sage-head { transform: translateY(2px) rotate(2deg); transform-origin: 88px 108px; }
.sage-character.confounded.animate, .sage-character.confounded-waiting.animate { animation: confounded .7s cubic-bezier(.3,.05,.25,1) both; }
.sage-character.ruffled.animate, .sage-character.ruffled-waiting.animate { animation: ruffled .55s cubic-bezier(.3,.05,.25,1) both; }
.sage-character.ruffled.animate .staff, .sage-character.ruffled-waiting.animate .staff { animation: staffTap .3s ease-in-out 2; transform-origin: 130px 181px; }
.sage-character.delighted.animate { animation: delighted 1.15s cubic-bezier(.2,.8,.2,1) both; }
.sage-character.delighted.animate .sage-head { animation: pleasedNod 1.15s cubic-bezier(.2,.8,.2,1) both; transform-origin: 88px 108px; }
.sage-character.delighted.animate .right { animation: offer .8s .18s ease-out both; }
.ruffle-marks { position: absolute; z-index: 2; top: 14px; right: 4px; width: 30px; height: 30px; }
.ruffle-marks i { position: absolute; width: 2px; height: 10px; border-radius: 2px; background: var(--red); transform-origin: 50% 18px; }
.sage-character.animate .ruffle-marks i { animation: ruffleMark .38s ease-out both; }
.ruffle-marks i:nth-child(1) { left: 3px; top: 11px; transform: rotate(-52deg); }
.ruffle-marks i:nth-child(2) { left: 14px; top: 2px; transform: rotate(-15deg); animation-delay: .06s; }
.ruffle-marks i:nth-child(3) { right: 2px; top: 6px; transform: rotate(34deg); animation-delay: .12s; }
.pleasure-marks { position: absolute; z-index: 2; inset: 0; color: var(--red); pointer-events: none; }
.pleasure-marks i { position: absolute; opacity: .65; font-style: normal; font-size: 10px; }
.sage-character.animate .pleasure-marks i { animation: pleasureMark 1.5s ease-in-out infinite; }
.pleasure-marks i:nth-child(1) { left: 5px; top: 28px; }
.pleasure-marks i:nth-child(2) { right: 0; top: 8px; animation-delay: .32s; font-size: 8px; }
.pleasure-marks i:nth-child(3) { right: 3px; top: 48px; animation-delay: .64s; font-size: 6px; }
.sage-character.nod.animate .sage-head { animation: sageNod .52s cubic-bezier(.3,.05,.25,1) both; transform-origin: 88px 108px; }
.sage-character.bow { transform: translateY(2px) rotate(12deg); }
.sage-character.bow.animate { animation: bow 1.15s cubic-bezier(.6,.05,.35,1) both; }

.chamber-mark { position: absolute; z-index: 2; bottom: 24px; left: 50%; transform: translateX(-50%); display: flex; align-items: center; gap: 11px; color: var(--red); font-size: 10px; }
.chamber-mark span { width: 44px; height: 1px; background: var(--line); }
.chamber-mark b { font-weight: 400; }
.privacy-link { position: absolute; right: 25px; bottom: 17px; z-index: 3; color: var(--ink-soft); font: 600 8px var(--sans); letter-spacing: .12em; text-transform: uppercase; text-underline-offset: 3px; }

.game-content { position: relative; z-index: 2; width: min(1180px, calc(100% - 70px)); margin: 0 auto; padding: 38px 0 70px; }
.opening-invitation { position: relative; z-index: 2; width: min(760px, calc(100% - 50px)); margin: clamp(45px, 7vh, 88px) auto 70px; text-align: center; animation: invitationArrives 1s cubic-bezier(.16,.8,.2,1) both; }
.opening-invitation h1 { margin: 0; font-size: clamp(43px, 6.3vw, 76px); font-weight: 400; line-height: 1; letter-spacing: -.045em; }
.opening-invitation h1 em { color: var(--red); font-weight: 400; }
.opening-invitation .intro { max-width: 570px; margin-bottom: 25px; }
.opening-choices { width: min(510px, 100%); margin: 0 auto; display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.opening-stone { height: 108px; padding: 15px 18px; border: 1px solid var(--line); background: rgba(244,240,227,.58); color: var(--ink); cursor: pointer; display: grid; grid-template-columns: 1fr auto; grid-template-rows: auto 1fr; text-align: left; animation: wordSettle .55s calc(.2s + var(--i) * .1s) both; transition: background .2s, border-color .2s, transform .2s; }
.opening-stone:hover { background: var(--paper-light); border-color: var(--red); transform: translateY(-4px); }
.opening-stone small { color: var(--ink-soft); font: 600 8px var(--sans); text-transform: uppercase; letter-spacing: .16em; }
.opening-stone strong { grid-column: 1 / -1; align-self: end; font-size: 27px; font-weight: 400; }
.opening-stone i { grid-column: 2; grid-row: 2; align-self: end; color: var(--red); font-style: normal; }
.invitation-sage { margin: 28px auto 0; }
.turn-label { display: flex; align-items: center; gap: 18px; justify-content: center; color: var(--red); font: 600 9px var(--sans); text-transform: uppercase; letter-spacing: .28em; }
.turn-label::before, .turn-label::after { content: ""; width: 34px; height: 1px; background: var(--red); opacity: .5; }
.proverb-wrap { min-height: 152px; display: grid; place-items: center; padding: 20px 6%; }
.proverb { margin: 0; max-width: 1080px; text-align: center; font-size: clamp(34px, 4.3vw, 63px); line-height: 1.17; letter-spacing: -.035em; }
.token { display: inline-block; }
.token.new { animation: wordSettle .55s cubic-bezier(.16,.8,.2,1) both; }
.token.player { color: var(--red); }
.token.sage { color: var(--moss); font-style: italic; }
.turn-ellipsis { display: inline-block; margin-left: .08em; color: var(--red); font-style: italic; letter-spacing: .08em; }
.turn-ellipsis.new { animation: ellipsisArrives .65s cubic-bezier(.16,.8,.2,1) both; }
.chamber.ritual .token, .chamber.ritual .turn-ellipsis { animation: none; }
.proverb-wrap.considering .token:last-child { border-bottom: 1px solid var(--red); }
.proverb-wrap.at-rest .proverb { letter-spacing: -.025em; }
.proverb-wrap.at-rest.new .proverb { animation: proverbRest .9s ease-out both; }
.chamber.ritual .proverb { animation: none; letter-spacing: -.035em; }

.play-field { --play-field-gap: clamp(40px, 7vw, 100px); display: grid; grid-template-columns: 180px minmax(0, 690px); align-items: center; justify-content: center; gap: var(--play-field-gap); min-height: 257px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); position: relative; }
.play-field > .sage-stage { align-self: stretch; position: relative; display: flex; flex-direction: column; justify-content: center; }
.play-field > .sage-stage::after { content: ""; position: absolute; top: 0; right: calc(var(--play-field-gap) / -2); bottom: 0; width: 1px; background: var(--line); }
.play-field > :not(.sage-stage) { justify-self: center; }
.offering-area { width: min(690px, 100%); }
.offering-area > p { margin: 0 0 13px; font: 600 9px var(--sans); text-transform: uppercase; letter-spacing: .2em; color: var(--ink-soft); }
.offerings { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; width: 100%; }
.word-stone { height: 117px; padding: 13px 15px; background: rgba(244,240,227,.58); border: 1px solid var(--line); color: var(--ink); cursor: pointer; display: grid; grid-template-columns: 1fr; grid-template-rows: auto 1fr; text-align: left; transition: background .2s, border-color .2s, transform .2s; }
.word-stone.new { animation: wordSettle .5s calc(var(--i) * .07s) both; }
.word-stone:hover { background: var(--paper-light); border-color: var(--red); transform: translateY(-4px); }
.word-stone .stone-number { grid-column: 1; grid-row: 1; color: var(--ink-soft); font: 500 9px var(--sans); letter-spacing: .1em; }
.word-stone .stone-purpose { grid-column: 1; grid-row: 1; justify-self: end; max-width: calc(100% - 28px); color: var(--ink-soft); font: 600 7px var(--sans); text-align: right; text-transform: uppercase; letter-spacing: .1em; white-space: nowrap; }
.word-stone strong { grid-column: 1; grid-row: 2; align-self: end; min-width: 0; font-size: clamp(16px, 1.6vw, 21px); font-weight: 400; overflow-wrap: normal; word-break: normal; }
.ask-again-button { display: block; margin: 14px auto 0; padding: 5px 2px; border: 0; border-bottom: 1px solid var(--line); background: transparent; color: var(--ink-soft); cursor: pointer; font-size: 12px; font-style: italic; transition: color .2s, border-color .2s; }
.ask-again-button span { color: var(--red); }
.ask-again-button:hover { color: var(--ink); border-color: var(--red); }
.waiting-offerings { display: flex; gap: 14px; width: 120px; }
.waiting-offerings i { width: 6px; height: 6px; border-radius: 50%; background: var(--red); animation: dot 1s infinite alternate; }
.waiting-offerings i:nth-child(2) { animation-delay: .2s; }.waiting-offerings i:nth-child(3) { animation-delay: .4s; }

.silence-panel { width: min(620px, 100%); text-align: center; }
.silence-panel.new { animation: silenceArrives .9s ease-out both; }
.silence-seal { width: 56px; height: 38px; margin: 0 auto 8px; position: relative; }
.silence-seal i { position: absolute; left: 50%; top: 50%; border: 1px solid var(--red); border-radius: 50%; transform: translate(-50%, -50%); opacity: .5; animation: silenceRing 2.8s ease-out infinite; }
.silence-seal i:nth-child(1) { width: 8px; height: 8px; }
.silence-seal i:nth-child(2) { width: 24px; height: 24px; animation-delay: .18s; }
.silence-seal i:nth-child(3) { width: 42px; height: 42px; animation-delay: .36s; }
.silence-kicker { margin: 10px 0 7px; color: var(--red); font: 600 8px var(--sans); text-transform: uppercase; letter-spacing: .24em; }
.silence-panel h2 { margin: 0; font-size: clamp(25px, 3vw, 39px); line-height: 1.04; font-weight: 400; font-style: italic; }
.silence-actions { display: flex; align-items: center; justify-content: center; gap: 23px; margin-top: 21px; }
.silence-actions .primary-button { min-width: 215px; height: 51px; }
.silence-actions .text-button { display: inline-block; margin: 0; }

.completion-row { display: flex; align-items: center; justify-content: center; gap: 20px; margin-top: 23px; opacity: 0; pointer-events: none; transition: opacity .5s; }
.completion-row.visible { opacity: 1; pointer-events: auto; }
.completion-row > span { width: 28px; height: 1px; background: var(--line); }
.complete-button { border: 0; background: transparent; color: var(--ink); cursor: pointer; padding: 9px; font-size: 13px; font-style: italic; }
.complete-button i { color: var(--red); margin-left: 8px; font-style: normal; }
.completion-row.unavailable > span { opacity: .55; }
.completion-note { margin: 0; color: var(--ink-soft); font-size: 12px; font-style: italic; }

.ritual-panel { width: min(600px, 100%); min-height: 224px; position: relative; text-align: center; }
.yes-echoes { width: min(318px, 100%); height: 45px; margin: 0 auto; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); align-items: end; gap: 7px; }
.yes-echoes span { min-width: 0; box-sizing: border-box; padding: 6px 4px 7px; position: relative; border: 1px solid rgba(160,68,49,.45); background: rgba(241,236,223,.72); color: var(--red); font-size: 13px; font-style: italic; opacity: calc(.45 + var(--i) * .1); transform: translateY(calc((4 - var(--i)) * 2px)) rotate(calc((var(--i) - 2) * 2deg)); }
.yes-echoes span.pending { visibility: hidden; }
.yes-echoes span.spoken::after { content: ""; position: absolute; left: 50%; bottom: -4px; width: 7px; height: 7px; border-right: 1px solid rgba(160,68,49,.45); border-bottom: 1px solid rgba(160,68,49,.45); background: var(--paper); transform: translateX(-50%) rotate(45deg); }
.yes-echoes span.new { animation: yesEcho .45s cubic-bezier(.15,.9,.2,1.2) both; opacity: 1; }
.ritual-instruction { color: var(--ink-soft); font-style: italic; font-size: 14px; }
.yes-button { width: 160px; height: 95px; margin: 8px auto; position: relative; box-sizing: border-box; border: 1px solid var(--red); color: var(--red); background: rgba(255,255,255,.12); cursor: pointer; display: flex; flex-direction: column; justify-content: center; align-items: center; touch-action: manipulation; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; transition: background .15s, border-color .15s; }
.yes-button:hover:not(:disabled) { background: rgba(160,68,49,.06); border-color: var(--ink); }
.yes-button.responding { background: rgba(160,68,49,.09); }
.yes-button.responding::after { content: ""; position: absolute; inset: -1px; border: 1px solid rgba(160,68,49,.5); pointer-events: none; animation: yesHalo .52s ease-out both; }
.yes-button:disabled { cursor: default; }
.yes-button span { font-size: 31px; font-style: italic; }
.yes-button small { margin-top: 5px; font: 600 8px var(--sans); text-transform: uppercase; letter-spacing: .2em; }
.yes-marks { display: flex; justify-content: center; gap: 10px; margin-top: 13px; }
.yes-marks i { width: 7px; height: 7px; border: 1px solid var(--red); transform: rotate(45deg); transition: background .2s; }
.yes-marks i.filled { background: var(--red); animation: markFill .3s ease-out both; }
.return-button { margin-top: 17px; }

.finished-content { position: relative; z-index: 2; width: min(1050px, calc(100% - 70px)); margin: 38px auto 70px; text-align: center; animation: rise .8s both; }
.inscription { min-height: 580px; position: relative; padding: 62px 90px 35px; border: 1px solid var(--moss); background: rgba(241,236,223,.48); box-shadow: 0 20px 50px rgba(50,48,32,.07); display: flex; flex-direction: column; align-items: center; }
.inscription::before { content: ""; position: absolute; inset: 8px; border: 1px solid var(--line); pointer-events: none; }
.inscription-corner { width: 31px; height: 31px; position: absolute; z-index: 2; }
.inscription-corner::before, .inscription-corner::after { content: ""; position: absolute; background: var(--red); }
.inscription-corner::before { width: 31px; height: 1px; }.inscription-corner::after { width: 1px; height: 31px; }
.top-left { top: 21px; left: 21px; }.top-right { top: 21px; right: 21px; transform: rotate(90deg); }.bottom-right { bottom: 21px; right: 21px; transform: rotate(180deg); }.bottom-left { bottom: 21px; left: 21px; transform: rotate(270deg); }
.finished-proverb { max-width: 850px; margin: 28px auto 25px; font-size: clamp(35px, 5vw, 62px); line-height: 1.16; letter-spacing: -.035em; font-style: italic; }
.inscription-rule { width: 260px; display: flex; align-items: center; gap: 12px; color: var(--red); margin: 0 auto 18px; }
.inscription-rule::before, .inscription-rule::after { content: ""; flex: 1; height: 1px; background: var(--red); }
.inscription h1 { margin: 0; font-size: 22px; font-weight: 400; }
.completion-byline { margin: 7px 0 0; color: var(--red); font-size: 14px; font-style: italic; }
.date { color: var(--ink-soft); font: 500 8px var(--sans); text-transform: uppercase; letter-spacing: .17em; margin-top: 11px; }
.inscription-sage { margin-top: auto; height: 102px; transform: scale(.72); transform-origin: center bottom; }
.sharing-ceremony { width: min(690px, 100%); margin: 25px auto 0; padding: 26px 28px 27px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.share-kicker { margin: 0; color: var(--ink); font-size: clamp(22px, 3vw, 29px); line-height: 1.2; font-style: italic; }
.share-invitation-copy { max-width: 520px; margin: 9px auto 20px; color: var(--ink-soft); font-size: 14px; line-height: 1.5; }
.sharing-ceremony.shared { background: rgba(243,238,223,.48); }
.sharing-ceremony.just-shared { animation: shareGlow .7s ease-out both; }
.sharing-ceremony.shared .share-kicker { color: var(--red); }
.share-button { min-width: 280px; height: 57px; }
.public-offering { width: min(690px, 100%); margin: 18px auto 0; padding: 24px 28px; border: 1px solid var(--line); background: rgba(243,238,223,.32); }
.public-offering.offered { border-color: rgba(160,68,49,.55); background: rgba(243,238,223,.58); }
.public-offering .eyebrow { margin-bottom: 9px; }
.public-offering h2 { margin: 0; font-size: 24px; font-weight: 400; font-style: italic; }
.public-offering > p:not(.eyebrow) { max-width: 530px; margin: 10px auto 0; color: var(--ink-soft); font-size: 13px; line-height: 1.5; }
.public-offering .text-button { color: var(--red); }
.public-offering-actions { display: flex; flex-direction: column; align-items: center; gap: 6px; margin-top: 18px; }
.public-offering-actions .text-button { margin-top: 0; }
.archive-visit-button { color: var(--ink); text-decoration: none; }
.finished-actions { display: flex; justify-content: center; gap: 10px; margin-top: 13px; }
.secondary-button { min-height: 51px; padding: 0 20px; display: inline-flex; align-items: center; gap: 9px; border: 1px solid var(--line); background: transparent; color: var(--ink); cursor: pointer; font: 600 9px var(--sans); text-transform: uppercase; letter-spacing: .14em; }
.secondary-button:hover { border-color: var(--red); }
.secondary-button svg { width: 16px; }
.saved-note { color: var(--ink-soft); font-size: 11px; font-style: italic; }
.saved-note a, .archive-item a { color: var(--red); text-underline-offset: 3px; }
.archive-recovery { width: min(690px, 100%); margin: 18px auto 0; padding: 20px 24px; border: 1px solid rgba(160,68,49,.45); background: rgba(243,238,223,.52); }
.archive-recovery p { margin: 0 0 14px; color: var(--ink-soft); font-size: 13px; font-style: italic; }
.archive-recovery .secondary-button { min-height: 45px; }
.signature-panel { width: min(560px, 100%); margin: 0 auto 20px; padding: 0 20px; border: 1px solid var(--line); background: rgba(243,238,223,.52); text-align: left; }
.signature-panel summary { display: flex; justify-content: space-between; gap: 20px; padding: 14px 0; color: var(--ink); cursor: pointer; font-size: 13px; font-style: italic; list-style: none; }
.signature-panel summary::-webkit-details-marker { display: none; }
.signature-panel summary::after { content: "+"; margin-left: auto; color: var(--red); font: 18px/1 var(--serif); }
.signature-panel[open] summary::after { content: "−"; }
.signature-panel summary span { align-self: center; color: var(--ink-soft); font: 600 8px var(--sans); letter-spacing: .15em; text-transform: uppercase; }
.signature-panel[open] { padding-bottom: 18px; }
.signature-panel[open] summary { margin-bottom: 17px; border-bottom: 1px solid var(--line); }
.signature-panel .eyebrow { margin: 0 0 7px; }
.signature-intro { margin: 0 0 15px; color: var(--ink-soft); font-size: 13px; font-style: italic; }
.signature-form { display: flex; align-items: center; gap: 8px; }
.signature-form input, .archive-management input { min-width: 0; min-height: 45px; padding: 0 13px; border: 1px solid var(--line); border-radius: 0; background: var(--paper-light); color: var(--ink); font: 16px var(--serif); }
.signature-form input { flex: 1; }
.signature-form .secondary-button { min-height: 45px; }
.signature-form .text-button { margin-top: 0; white-space: nowrap; }
.signature-panel > small { display: block; margin-top: 11px; color: var(--ink-soft); font: 9px var(--sans); }

.modal-backdrop { position: fixed; z-index: 20; inset: 0; background: rgba(33,35,26,.48); backdrop-filter: blur(5px); display: flex; justify-content: flex-end; animation: fade .25s both; }
.archive-panel { width: min(590px, 92vw); height: 100%; padding: 63px 55px; background: var(--paper-light); position: relative; overflow-y: auto; box-shadow: -15px 0 50px rgba(20,20,15,.15); animation: slide .4s cubic-bezier(.16,.8,.2,1) both; }
.modal-backdrop.settled, .modal-backdrop.settled .archive-panel { animation: none; }
.archive-panel h2 { margin: 0; font-size: 48px; font-weight: 400; letter-spacing: -.03em; }
.archive-intro { color: var(--ink-soft); font-style: italic; }
.great-archive-panel-link { display: inline-block; margin-top: 5px; color: var(--red); font: 600 9px var(--sans); letter-spacing: .14em; text-transform: uppercase; text-underline-offset: 4px; }
.close-button { position: absolute; right: 30px; top: 26px; width: 40px; height: 40px; border: 1px solid var(--line); background: transparent; color: var(--ink); font-size: 28px; line-height: 1; cursor: pointer; }
.archive-list { margin-top: 42px; border-top: 1px solid var(--line); }
.archive-item { display: grid; grid-template-columns: 38px 1fr; gap: 14px; padding: 25px 0; border-bottom: 1px solid var(--line); }
.archive-item > span { color: var(--red); font: 600 9px var(--sans); letter-spacing: .12em; }
.archive-item p { margin: 0 0 10px; font-size: 22px; line-height: 1.35; font-style: italic; }
.archive-item small { color: var(--ink-soft); font: 500 8px var(--sans); text-transform: uppercase; letter-spacing: .11em; }
.archive-manage-button { margin-top: 12px; padding: 0; border: 0; border-bottom: 1px solid var(--red); background: transparent; color: var(--red); cursor: pointer; font: 600 8px var(--sans); letter-spacing: .12em; text-transform: uppercase; }
.archive-management { margin-top: 17px; padding: 16px; border: 1px solid var(--line); background: var(--paper); }
.archive-management label { display: block; margin-bottom: 8px; color: var(--ink-soft); font: 600 8px var(--sans); letter-spacing: .12em; text-transform: uppercase; }
.archive-management > div { display: flex; }
.archive-management input { flex: 1; width: 100%; }
.archive-management > div button { min-width: 60px; border: 0; background: var(--moss); color: var(--paper-light); cursor: pointer; font: 600 8px var(--sans); letter-spacing: .1em; text-transform: uppercase; }
.archive-management .text-button { margin-top: 13px; color: var(--red); }
.archive-management .danger-button { width: 100%; margin: 16px 0 0; padding: 15px 0 4px; border: 0; border-top: 1px solid rgba(160,68,49,.28); color: var(--red-dark); text-align: left; font: 600 8px var(--sans); letter-spacing: .12em; text-transform: uppercase; }
.archive-management > small { display: block; margin-top: 12px; text-transform: none; letter-spacing: 0; }
.empty-archive { padding: 100px 20px; text-align: center; color: var(--ink-soft); }
.empty-archive div { color: var(--red); font-size: 24px; }.empty-archive p { color: var(--ink); font-size: 23px; margin-bottom: 8px; }.empty-archive small { font-style: italic; }

.toast { position: fixed; z-index: 50; bottom: 38px; left: 50%; transform: translateX(-50%); padding: 13px 22px; background: var(--moss); color: var(--paper-light); box-shadow: 0 8px 28px rgba(0,0,0,.17); font-size: 12px; font-style: italic; animation: toast .35s both; }

@keyframes rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
@keyframes fade { from { opacity: 0; } }
@keyframes slide { from { transform: translateX(100%); } }
@keyframes wordSettle { from { opacity: 0; transform: translateY(12px); filter: blur(3px); } to { opacity: 1; transform: none; filter: none; } }
@keyframes breathe { 50% { transform: translateY(-2px); } }
@keyframes ponder { from { transform: rotate(-1deg); } to { transform: rotate(2deg) translateY(1px); } }
@keyframes offer { from { transform: rotate(0); } to { transform: rotate(-15deg) translate(-3px,-5px); } }
@keyframes settleSilence { from { transform: translateY(-2px); } to { transform: translateY(5px); } }
@keyframes confounded { 0%, 100% { transform: none; } 35% { transform: translateX(-3px) rotate(-3deg); } 68% { transform: translateX(2px) rotate(2deg); } }
@keyframes ruffled { 0%, 100% { transform: none; } 22% { transform: translateX(-4px) rotate(-4deg); } 45% { transform: translateX(4px) rotate(4deg); } 67% { transform: translateX(-3px) rotate(-2deg); } 84% { transform: translateX(2px) rotate(1deg); } }
@keyframes staffTap { 50% { transform: rotate(5deg) translateY(3px); } }
@keyframes ruffleMark { from { opacity: 0; height: 2px; } to { opacity: 1; height: 10px; } }
@keyframes delighted { 0% { opacity: 0; transform: translateY(8px) scale(.96); } 55% { transform: translateY(-3px) scale(1.02); } 100% { opacity: 1; transform: none; } }
@keyframes shareGlow { 0% { box-shadow: 0 0 0 rgba(160,68,49,0); } 45% { box-shadow: 0 0 35px rgba(160,68,49,.12); } 100% { box-shadow: 0 0 0 rgba(160,68,49,0); } }
@keyframes pleasedNod { 0%, 18% { transform: none; } 55% { transform: translateY(6px) rotate(5deg); } 82% { transform: translateY(-1px) rotate(-1deg); } 100% { transform: none; } }
@keyframes pleasureMark { 0%, 100% { opacity: .2; transform: scale(.65) rotate(0); } 50% { opacity: 1; transform: scale(1.08) rotate(20deg); } }
@keyframes invitationArrives { from { opacity: 0; transform: translateY(12px) scale(.985); } to { opacity: 1; transform: none; } }
@keyframes ellipsisArrives { from { opacity: 0; transform: translateY(-7px); } to { opacity: .8; transform: none; } }
@keyframes sageNod { 0% { transform: none; } 42% { transform: translateY(7px) rotate(5deg); } 72% { transform: translateY(-1px) rotate(-1deg); } 100% { transform: none; } }
@keyframes bow { 0% { transform: rotate(0); } 45%, 80% { transform: translateY(8px) rotate(19deg); } 100% { transform: translateY(2px) rotate(12deg); } }
@keyframes dot { from { opacity: .2; transform: translateY(0); } to { opacity: 1; transform: translateY(-5px); } }
@keyframes toast { from { opacity: 0; transform: translate(-50%, 10px); } }
@keyframes proverbRest { 0% { letter-spacing: -.035em; } 100% { letter-spacing: -.025em; } }
@keyframes silenceArrives { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes silenceRing { 0%, 100% { opacity: .18; } 50% { opacity: .62; } }
@keyframes yesEcho { from { opacity: 0; transform: translateY(14px) scale(.7); } to { opacity: 1; } }
@keyframes yesHalo { from { opacity: .65; transform: scale(1); } to { opacity: 0; transform: scale(1.13); } }
@keyframes markFill { from { transform: rotate(45deg) scale(.35); } to { transform: rotate(45deg) scale(1); } }
@keyframes recollectionArrives { from { max-height: 0; margin-bottom: 0; padding-block: 0; opacity: 0; transform: translateY(14px); } to { max-height: 430px; opacity: 1; transform: none; } }
@keyframes recollectionDeparts { from { max-height: 430px; opacity: 1; } to { max-height: 0; margin-bottom: 0; padding-block: 0; opacity: 0; transform: translateY(-8px); } }

@media (max-width: 800px) {
  .topbar { height: 75px; padding: 0 30px; }
  .wordmark { font-size: 11px; gap: 8px; }
  .icon-button { display: none; }
  .archive-button { font-size: 9px; }
  .arrival-content { margin-top: 55px; }
  .arrival-content h1 { font-size: clamp(42px, 12vw, 65px); }
  .wide-only { display: none; }
  .game-content { width: calc(100% - 40px); padding-top: 25px; }
  .opening-invitation { margin-top: 42px; }
  .proverb-wrap { min-height: 144px; padding-inline: 0; }
  .proverb { font-size: clamp(30px, 8vw, 43px); }
  .play-field { display: block; padding: 17px 0 21px; min-height: 375px; }
  .play-field > .sage-stage { display: block; }
  .play-field > .sage-stage::after { display: none; }
  .sage-stage { width: 100%; }
  .sage-character { width: 77px; height: 94px; }
  .offering-area { width: 100%; margin-top: 12px; }
  .offering-area > p { text-align: center; }
  .word-stone { height: 87px; padding: 10px; }
  .word-stone strong { font-size: 15px; }
  .ritual-panel { width: 100%; }
  .silence-panel { width: 100%; margin-top: 15px; }
  .silence-actions { flex-direction: column; gap: 8px; }
  .silence-actions .text-button { margin-top: 0; }
  .waiting-offerings { margin: 40px auto; }
  .finished-content { width: calc(100% - 40px); margin-top: 25px; }
  .inscription { min-height: 570px; padding: 55px 34px 24px; }
  .finished-proverb { font-size: clamp(33px, 8vw, 48px); }
  .sharing-ceremony { padding: 23px 0 24px; }
  .public-offering { padding: 22px 16px; }
  .share-button { width: 100%; min-width: 0; }
  .finished-actions { flex-wrap: wrap; }
  .secondary-button { flex: 1; justify-content: center; }
  .signature-panel { padding-inline: 15px; }
  .signature-form { align-items: stretch; flex-direction: column; }
  .signature-form .text-button { align-self: flex-start; }
  .archive-panel { padding: 55px 28px; }
  .archive-panel h2 { font-size: 39px; }
}

@media (max-width: 480px) {
  .top-actions { gap: 6px; }
  .archive-button { letter-spacing: .08em; }
  .arrival-content { width: calc(100% - 52px); margin-top: 44px; }
  .arrival-content h1 { font-size: 43px; }
  .opening-invitation h1 { font-size: 42px; }
  .intro { font-size: 15px; line-height: 1.55; }
  .arrival-sage { margin-top: 25px; }
  .daily-recollection { padding-inline: 27px; }
  .offerings { grid-template-columns: repeat(2, 1fr); }
  .play-field { min-height: 470px; }
  .proverb-wrap { min-height: 166px; }
  .completion-row { margin-top: 10px; }
  .inscription { min-height: 560px; padding-inline: 25px; }
  .finished-proverb { font-size: 31px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
