:root {
  --night: #0b0d14; --orange: #e8742a; --gold: #d9a648; --moon: #cfd8e6;
  --parch: #f1dfb6; --ink: #2a1a0e; --wax: #a61c1c;
  --serif: 'Alegreya', Georgia, serif; --caps: 'Cinzel', 'Times New Roman', serif; --deco: 'Cinzel Decorative', 'Cinzel', serif;
  --col: min(620px, calc(100vw - 48px));
}
* { box-sizing: border-box; }
html { background: var(--night); }
body { margin: 0; color: var(--moon); font: 19px/1.6 var(--serif); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
body.locked { overflow: hidden; height: 100svh; }
[hidden] { display: none !important; }
img { max-width: 100%; }

/* ─── the hall (CSS 3D) ─────────────────────────────────────────────── */
/* every layer is a viewport-sized plane at depth z, pre-scaled by (P - z) / P so it fills the view at rest;
   the stage's translateZ is the camera dolly. P matches `perspective`. */
#world { position: fixed; inset: 0; z-index: 0; overflow: hidden; background: #05060a; }
#world .stage { position: absolute; inset: 0; }
#world .lay { position: absolute; inset: 0; transform-origin: 50% 46%; will-change: transform, opacity; }
#world .cover { position: absolute; inset: -12%; width: 124%; height: 124%; max-width: none; object-fit: cover; object-position: 50% 42%; }
#world .l, #world .r { position: absolute; top: 0; height: 100%; width: auto; max-width: none; }
#world .l { left: 0; } #world .r { right: 0; }
#world .chand { position: absolute; top: -2%; left: 50%; width: min(90vw, 70vh); transform: translateX(-50%); }
#world .banner img { position: absolute; top: 18%; left: 50%; width: min(34vw, 26vh); margin-left: calc(min(34vw, 26vh) / -2); border: 4px solid #000;
  box-shadow: 0 0 0 3px var(--gold), 0 18px 40px rgba(0, 0, 0, .6); clip-path: polygon(0 0, 100% 0, 100% 86%, 50% 100%, 0 86%); aspect-ratio: 3 / 4; object-fit: cover; object-position: 50% 30%; }
/* wide screens: Dennis and Gio share the left wall, so stack them instead of overlapping */
@media (min-aspect-ratio: 1/1) {
  #world .banner img[src*="dennis"] { top: 8%; }
  #world .banner img[src*="gio"] { top: 46%; }
}
#embers { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
/* darkness around the edges until the seal breaks; the throne stays in view */
@keyframes fogx { to { transform: translateX(-25%); } }
#world .shade { position: absolute; inset: 0; pointer-events: none; transition: opacity 2.6s ease;
  background: radial-gradient(ellipse 62% 50% at 50% 50%, transparent 30%, rgba(2, 3, 8, .8) 85%, #020308); }
body.lit #world .shade { opacity: 0; }
/* a shaft of light from the vaulted dark, where the roll descends */
#world .beam { position: absolute; inset: 0 0 30%; pointer-events: none; opacity: 0; transition: opacity 1.6s ease; mix-blend-mode: screen; filter: blur(10px);
  background: linear-gradient(rgba(255, 215, 150, .05), rgba(255, 205, 140, .45) 75%, transparent);
  clip-path: polygon(42% 0, 58% 0, 88% 100%, 12% 100%); }
body.beam:not(.lit) #world .beam { opacity: 1; }
#world .vignette { position: absolute; inset: 0; pointer-events: none; background: radial-gradient(ellipse at 50% 45%, transparent 45%, rgba(3, 4, 8, .7) 100%); }
#gl { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 6; pointer-events: none; }

/* ─── shared ────────────────────────────────────────────────────────── */
.btn { font: 700 17px var(--caps); letter-spacing: .04em; color: #1a0f05; background: linear-gradient(#f6bd62, var(--orange)); border: 3px solid #1a0f05;
  border-radius: 10px; padding: 14px 22px; box-shadow: 0 4px 0 #1a0f05, 0 10px 24px rgba(0, 0, 0, .45); cursor: pointer; touch-action: manipulation; }
.btn:active { transform: translateY(3px); box-shadow: 0 1px 0 #1a0f05; }
.btn:disabled { filter: grayscale(.8) brightness(.8); cursor: default; }
.btn.big { font-size: 19px; padding: 18px 26px; width: 100%; max-width: 420px; }
.btn.ghost { background: transparent; color: var(--ink); box-shadow: none; }
.kicker { font: 600 13px var(--caps); letter-spacing: .24em; text-transform: uppercase; color: var(--gold); margin: 0 0 6px; }
.small { font-size: 15px; opacity: .8; margin: 10px 0 0; }
.panel { width: var(--col); margin: auto; padding: 20px 18px; text-align: center; background: rgba(11, 13, 20, .86); border: 3px solid #000;
  border-radius: 14px; box-shadow: inset 0 0 0 1px var(--gold), 0 20px 60px rgba(0, 0, 0, .6); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.ic { width: 1em; height: 1em; vertical-align: -.12em; color: var(--orange); }

#mute { position: fixed; z-index: 30; top: max(12px, env(safe-area-inset-top)); right: 12px; width: 46px; height: 46px; border-radius: 50%; font-size: 20px;
  background: rgba(11, 13, 20, .8); border: 2px solid var(--gold); cursor: pointer; display: grid; place-items: center; padding: 0; color: var(--gold); }
#mute[hidden] { display: none; }
#mute svg { width: 22px; height: 22px; }
#mute .off, #mute.muted .on { display: none; }
#mute.muted .off { display: block; }

/* ─── gate ──────────────────────────────────────────────────────────── */
#gate { position: fixed; inset: 0; z-index: 20; overflow: hidden; }
#gate .gview { position: absolute; inset: 0; will-change: transform; }
/* the facade box keeps the painting's 2:3 so the doors can sit in its arch by percentage */
#gate .fbox { position: absolute; left: 50%; top: 50%; width: max(100vw, 66.667svh); aspect-ratio: 2 / 3; transform: translate(-50%, -50%); perspective: 1400px; }
#gate .sky { position: absolute; left: -6%; top: -4%; width: 112%; max-width: none; clip-path: inset(0 0 52% 0); animation: drift 40s ease-in-out infinite alternate; }
@keyframes drift { to { transform: translateX(-4%); } }
#gate .fbox { animation: creep 30s ease-out forwards; }
@keyframes creep { from { scale: 1; } to { scale: 1.07; } }
#gate .fbox::after { content: ''; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(ellipse 48% 36% at 50% 62%, transparent 35%, rgba(3, 4, 10, .78) 100%); }
/* lightning behind the towers, so they stay silhouettes */
#gate .flash { position: absolute; inset: 0 0 48% 0; opacity: 0; mix-blend-mode: screen; pointer-events: none; animation: flash 11s 2s infinite;
  background: radial-gradient(ellipse 70% 60% at 72% 18%, rgba(205, 222, 255, .95), rgba(140, 170, 230, .35) 45%, transparent 75%); }
@keyframes flash { 0%, 58%, 100% { opacity: 0; } 59% { opacity: .9; } 60% { opacity: .1; } 61.5% { opacity: .7; } 64% { opacity: 0; } }
/* something burns behind the door: light leaks through the seam */
#gate .seam { position: absolute; left: 49.85%; top: 41.5%; width: .5%; height: 42%; margin-left: -.25%; pointer-events: none; border-radius: 2px;
  background: linear-gradient(rgba(255, 190, 110, 0), #ffc070 25%, #ffb060 85%, rgba(255, 190, 110, 0));
  box-shadow: 0 0 12px 3px rgba(255, 140, 50, .7), 0 0 40px 10px rgba(255, 120, 40, .3); animation: flicker 1.7s infinite; }
/* what waits behind the doors: golden light, drawn behind the facade so the arch masks it */
#gate .light { position: absolute; left: 26%; top: 36%; width: 48%; height: 50%; opacity: 0;
  background: radial-gradient(ellipse 60% 55% at 50% 72%, #fffaf0, #ffd890 28%, #f0902e 62%, #6a2408); }
#gate .light::after { content: ''; position: absolute; left: 50%; top: 72%; width: 220%; aspect-ratio: 1; translate: -50% -50%; mix-blend-mode: screen; animation: spin 24s linear infinite;
  background: repeating-conic-gradient(rgba(255, 240, 200, .5) 0 3deg, transparent 3deg 11deg);
  -webkit-mask: radial-gradient(circle, #000 5%, transparent 45%); mask: radial-gradient(circle, #000 5%, transparent 45%); }
#gate .light { overflow: hidden; }
/* the same light spilling out over the steps and the stone around the arch */
#gate .spill { position: absolute; left: 10%; top: 45%; width: 80%; height: 55%; opacity: 0; mix-blend-mode: screen; pointer-events: none;
  background: radial-gradient(ellipse 50% 45% at 50% 70%, rgba(255, 190, 100, .75), rgba(240, 120, 40, .25) 50%, transparent 75%); }
@keyframes spin { to { rotate: 360deg; } }
#bloom { position: fixed; inset: 0; z-index: 22; pointer-events: none; opacity: 0;
  background: radial-gradient(circle at 50% 60%, #fffaf0, #ffe0a0 45%, #f0a050); }
#gate .facade { position: absolute; inset: 0; width: 100%; height: 100%; }
#gate .door { position: absolute; top: 40.5%; width: 21.1%; height: 43.2%; background: url(assets/doors.webp) 0 0 / 200% 100% no-repeat; will-change: transform; }
#gate .door.l { left: 28.75%; transform-origin: 0 50%; }
#gate .door.r { left: 49.85%; transform-origin: 100% 50%; background-position: 100% 0; }
#gate .glow { position: absolute; width: 22%; aspect-ratio: 1; margin: -11% 0 0 -11%; border-radius: 50%; mix-blend-mode: screen; pointer-events: none;
  background: radial-gradient(circle, rgba(255, 170, 70, .55), rgba(255, 110, 30, .18) 40%, transparent 70%); animation: flicker 1.7s infinite; }
#gate .glow + .glow { animation-delay: -.6s; }
@keyframes flicker { 0%, 100% { opacity: .85; transform: scale(1); } 23% { opacity: 1; transform: scale(1.06); } 47% { opacity: .7; } 71% { opacity: .95; transform: scale(.97); } }
#gate .mist { position: absolute; inset: auto 0 0 0; height: 40%; pointer-events: none;
  background: linear-gradient(transparent, rgba(11, 13, 20, .85)); }
#gate .mist i { position: absolute; inset: 10% -60% -10%; animation: fogx 38s ease-in-out infinite alternate;
  background: radial-gradient(30% 30% at 20% 55%, rgba(170, 185, 215, .24), transparent 70%), radial-gradient(26% 26% at 55% 45%, rgba(170, 185, 215, .18), transparent 70%),
    radial-gradient(32% 32% at 85% 60%, rgba(150, 165, 200, .24), transparent 70%); }
.gate-top { position: absolute; top: 0; left: 0; right: 0; padding: max(28px, env(safe-area-inset-top)) 16px 60px; text-align: center;
  background: linear-gradient(rgba(5, 6, 12, .85), transparent); }
.gate-top h1 { font: 900 clamp(32px, 9.5vw, 58px)/1.02 var(--deco); margin: 0; color: #fff3dc; text-shadow: 0 3px 0 #000, 0 0 28px rgba(232, 116, 42, .55); }
.gate-bottom { position: absolute; left: 0; right: 0; bottom: 0; padding: 16px 16px max(28px, env(safe-area-inset-bottom)); text-align: center; }
#summon .wait, #summon:disabled .ready { display: none; }
#summon:disabled .wait { display: inline; }
#summon:not(:disabled) { animation: pulse 2s infinite; }
@keyframes pulse { 50% { box-shadow: 0 4px 0 #1a0f05, 0 0 0 10px rgba(232, 116, 42, .25), 0 10px 24px rgba(0, 0, 0, .45); } }

/* ─── lock (laid out inside the visual viewport, so the keyboard never covers it) ─ */
#lock { position: fixed; left: 0; right: 0; top: 0; height: 100svh; z-index: 10; display: flex; align-items: flex-end; padding: 0 0 max(18px, env(safe-area-inset-bottom)); pointer-events: none; }
/* the lock: a small parchment scroll between two rods */
#lock .panel { position: relative; pointer-events: auto; margin: 0 auto; padding: 22px 20px 20px; color: var(--ink); border-radius: 2px; backdrop-filter: none; -webkit-backdrop-filter: none;
  background: url(assets/parch.webp) center / cover, #efdcae; border: 2px solid #000; border-width: 0 2px;
  box-shadow: inset 0 0 36px rgba(90, 50, 20, .4), 0 24px 60px rgba(0, 0, 0, .75); }
#lock .rod-t, #lock .rod-b { position: absolute; left: -12px; right: -12px; height: 14px; margin-top: -7px; border: 2px solid #000; border-radius: 7px;
  background: linear-gradient(#c07a38, #6a3814 70%, #3a1e0a); }
#lock .rod-t { top: 0; }
#lock .rod-b { top: 100%; }
#lock .kicker { color: var(--wax); }
.riddle { font-style: italic; font-size: 20px; line-height: 1.35; margin: 0 0 16px; color: var(--ink); text-wrap: balance; }
#pw { display: flex; gap: 8px; }
#pw input { flex: 1; min-width: 0; font: 700 21px var(--caps); letter-spacing: .14em; text-indent: .14em; text-align: center; padding: 11px 8px; color: var(--ink);
  background: rgba(255, 250, 235, .55); border: 2px solid var(--ink); border-radius: 6px; box-shadow: inset 0 2px 6px rgba(42, 26, 14, .25); }
#pw input:focus { outline: none; border-color: var(--wax); box-shadow: inset 0 2px 6px rgba(42, 26, 14, .25), 0 0 0 3px rgba(232, 116, 42, .35); }
#pw input::placeholder { font: italic 400 18px var(--serif); letter-spacing: 0; color: rgba(42, 26, 14, .5); }
#pw .btn { background: linear-gradient(#b8322a, var(--wax)); color: #fff3dc; padding: 11px 18px; }
#pw-reply { margin: 12px 0 0; color: var(--wax); font-weight: 600; line-height: 1.35; text-wrap: balance; }
#pw-reply:empty { display: none; }
.hint { margin: 8px 0 0; font-style: italic; color: var(--ink); opacity: .85; }
.hint.letters { font: 800 26px var(--caps); letter-spacing: .3em; text-indent: .3em; font-style: normal; color: var(--wax); opacity: 1; }
.shake { animation: shake .45s; }
@keyframes shake { 20%, 60% { transform: translateX(-8px); } 40%, 80% { transform: translateX(8px); } }

/* ─── charter ───────────────────────────────────────────────────────── */
#charter { position: relative; z-index: 5; padding: max(92px, 13svh) 0 60px; }
body.locked #charter { visibility: hidden; }
.parchment { position: relative; width: var(--col); margin: 0 auto; padding: 44px clamp(20px, 6vw, 48px) 46px; color: var(--ink);
  background:
    radial-gradient(ellipse at 50% 0, rgba(255, 245, 220, .5), transparent 60%),
    linear-gradient(90deg, rgba(120, 70, 20, .28), transparent 9%, transparent 91%, rgba(120, 70, 20, .28)),
    url(assets/parch.webp) center top / 100% auto repeat-y, var(--parch);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .35), inset 10px 0 0 -6px rgba(217, 166, 72, .0), 0 24px 70px rgba(0, 0, 0, .7); }
.parchment::before { content: ''; position: absolute; inset: 12px; border: 2px solid rgba(166, 110, 30, .55); outline: 1px solid rgba(166, 110, 30, .3); outline-offset: 4px; pointer-events: none; }
#sheet { clip-path: inset(0 -40px calc(100% - var(--reveal, 100%)) -40px); }
.orn-head { display: block; width: 78%; margin: -8px auto 6px; }
.orn-div { display: block; width: 72%; margin: 18px auto 22px; opacity: .9; }
.parchment h1 { font: 900 clamp(34px, 10.5vw, 54px)/1 var(--deco); margin: 0 0 12px; text-align: center; color: var(--wax);
  text-shadow: 0 1px 0 #fff6, 0 3px 0 rgba(90, 10, 10, .25); }
.parchment p { margin: 0 0 18px; }
.parchment .lead { text-align: center; font-size: 21px; line-height: 1.45; }
.parchment .aan { font: 700 15px var(--caps); letter-spacing: .2em; text-transform: uppercase; color: var(--wax); margin-bottom: 12px; }
.lords { list-style: none; padding: 0; margin: 0; }
.lords li { display: grid; grid-template-columns: auto 1fr; gap: 18px; align-items: center; margin-bottom: 22px; line-height: 1.4; }
.lords img { margin: 4px 0 4px 4px; width: clamp(80px, 22vw, 104px); aspect-ratio: 1; border-radius: 50%; object-fit: cover; object-position: 50% 28%;
  border: 3px solid #000; box-shadow: 0 0 0 3px var(--gold), 0 6px 14px rgba(0, 0, 0, .35); }
.lords strong { font-family: var(--caps); font-size: 1.02em; }
.salute { font-style: italic; font-size: 21px; }
.dropcap::first-letter { float: left; font: 900 62px/1 var(--deco); padding: 6px 10px 2px; margin: 6px 10px 0 0; color: #fff3dc; background: var(--wax);
  border: 3px solid #000; box-shadow: inset 0 0 0 2px var(--gold); text-shadow: 0 2px 0 #000; }
.decree { text-align: center; padding: 22px 20px 20px; margin: 28px 0; border: 2px solid var(--ink); border-radius: 6px;
  background: linear-gradient(rgba(232, 116, 42, .22), rgba(232, 116, 42, .12)); box-shadow: inset 0 0 0 3px rgba(255, 240, 210, .5), 3px 3px 0 var(--ink); }
.decree .ask { display: block; font: 700 15px var(--caps); letter-spacing: .12em; text-transform: uppercase; }
/* the one thing to remember: lettered large, between two flourishes */
.decree .title { display: block; margin: 4px 0 6px; padding: 30px 0; font: 800 clamp(24px, 7.2vw, 40px)/1.12 var(--caps); letter-spacing: .02em; font-variant-ligatures: none; color: var(--wax); hyphens: manual;
  text-shadow: 1px 1px 0 rgba(255, 240, 210, .7), 0 3px 0 rgba(90, 10, 10, .2);
  background: url(assets/orn-div.webp) center top / 78% auto no-repeat, url(assets/orn-div.webp) center bottom / 78% auto no-repeat; }
.decree .when { display: block; margin-top: 12px; font-style: italic; }
/* icons sit in the text, which flows around them: no empty column underneath */
.art .horn { float: left; width: 34px; height: 34px; margin: 4px 14px 8px 2px; padding: 6px; border-radius: 50%; shape-outside: circle(); shape-margin: 8px; background: var(--wax); color: #fff3dc; border: 2px solid #000; box-shadow: 0 0 0 2px var(--gold); }
.art .n { font-family: var(--caps); color: var(--wax); }
.center { text-align: center; }
.parchment footer { text-align: center; margin-top: 28px; }
.parchment .sig { line-height: 1.2; }
.parchment .script { font: 400 54px/1.1 'Pinyon Script', cursive; color: #1d1209; }
.stamp { width: 96px; height: 96px; margin: 6px auto 4px; border-radius: 50%; display: grid; place-items: center; transform: rotate(-8deg);
  background: radial-gradient(circle at 38% 34%, #e2483a, #a61c1c 55%, #5e0a0a); border: 3px solid #000; box-shadow: 0 4px 10px rgba(0, 0, 0, .35); }
.stamp img { width: 70%; mix-blend-mode: multiply; opacity: .75; }
.parchment .icons { font-size: 28px; display: flex; justify-content: center; gap: 14px; margin: 8px 0 0; }
/* the bottom rod, matching the 3D one */
.rod { position: relative; width: calc(var(--col) + 14px); height: 20px; margin: -10px auto 0; border-radius: 10px; border: 2px solid #000;
  background: linear-gradient(#8a5a30, #4a2a14 45%, #2a160a); }
.rod::before, .rod::after { content: ''; position: absolute; top: 50%; width: 30px; height: 30px; margin-top: -15px; border-radius: 50%; border: 2px solid #000;
  background: radial-gradient(circle at 35% 30%, #fff1c0, #e0ad4e 40%, #8a5a1a); }
.rod::before { left: -26px; } .rod::after { right: -26px; }


#throne { width: var(--col); margin: 22vh auto 9vh; text-align: center; }
/* the throne reads like an ending; this points on to the oath below it */
@keyframes nudge { 50% { transform: translateY(5px) rotate(45deg); } }
@keyframes call { 50% { box-shadow: 0 4px 0 #1a0f05, 0 0 0 3px var(--gold), 0 0 34px 8px rgba(232, 116, 42, .65); } }
#throne .onward { display: inline-flex; align-items: center; gap: 12px; margin-bottom: 20px; padding: 13px 22px; font: 800 17px var(--caps); letter-spacing: .06em; color: #fff3dc; text-decoration: none;
  background: linear-gradient(#b8322a, var(--wax)); border: 3px solid #1a0f05; border-radius: 999px; box-shadow: 0 4px 0 #1a0f05, 0 0 0 3px var(--gold); animation: call 1.8s ease-in-out infinite; }
#throne .onward i { width: 11px; height: 11px; margin-top: -5px; border: solid #fff3dc; border-width: 0 3px 3px 0; transform: rotate(45deg); animation: nudge 1.4s ease-in-out infinite; }
#throne img { width: auto; max-width: min(86%, 440px); max-height: 50svh; border: 4px solid #000; border-radius: 10px; box-shadow: 0 0 0 3px var(--gold), 0 30px 80px rgba(0, 0, 0, .7); }
#throne p { font: 600 20px var(--caps); color: #fff3dc; text-shadow: 0 2px 6px #000; }

/* ─── signing ───────────────────────────────────────────────────────── */
/* the oath card is the call to action: room below so it can sit mid-screen, and a slow golden pulse until a name is chosen */
#charter:has(#sign) { padding-bottom: max(60px, 20svh); }
@keyframes oath {
  0%, 100% { box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .35), 0 0 0 0 rgba(201, 146, 46, 0), 0 24px 70px rgba(0, 0, 0, .7); }
  50% { box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .35), 0 0 0 3px var(--gold), 0 0 60px 14px rgba(232, 116, 42, .6); } }
@keyframes beckon { 0%, 70%, 100% { transform: none; } 80% { transform: translateY(-6px) rotate(-1.5deg); } 90% { transform: translateY(-2px) rotate(1deg); } }
#sign { scroll-margin-top: 12svh; animation: oath 2.6s ease-in-out infinite; }
#sign:has(#lords [aria-checked="true"]) { animation: none; }
#lords:not(:has([aria-checked="true"])) button { animation: beckon 3.2s ease-in-out infinite; }
#lords button:nth-child(2) { animation-delay: .35s; } #lords button:nth-child(3) { animation-delay: .7s; }
#sign .kicker { text-align: center; color: var(--wax); opacity: .8; }
#sign h2 { font: 900 clamp(26px, 8vw, 34px)/1.1 var(--deco); text-align: center; margin: 0; color: var(--wax); text-wrap: balance; }
#sign .orn-div { display: block; width: 70%; margin: 10px auto 22px; }
.step { font-weight: 700; text-align: center; margin: 0 0 12px; }
.step b { display: inline-grid; place-items: center; width: 26px; height: 26px; margin-right: 12px; border-radius: 50%; background: var(--wax); color: #fff3dc; font-size: 14px; vertical-align: 2px; }
#lords { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 26px; }
#lords button { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px 6px 20px; font: inherit; color: var(--ink); cursor: pointer;
  background: rgba(255, 250, 235, .45); border: 2px solid var(--ink); border-radius: 12px 12px 50% 50% / 12px 12px 22% 22%; touch-action: manipulation;
  transition: opacity .25s, transform .25s, background .25s; }
#lords button img { width: 100%; max-width: 110px; aspect-ratio: 1; border-radius: 50%; object-fit: cover; object-position: 50% 28%; border: 2px solid var(--ink); }
#lords button b { font: 800 14px/1.1 var(--caps); text-wrap: balance; }
#lords button small { font-size: 12px; line-height: 1.2; text-align: center; opacity: .75; text-wrap: balance; }
#lords button[aria-checked="true"] { background: rgba(232, 116, 42, .22); border-color: var(--wax); box-shadow: 0 0 0 3px var(--gold); transform: translateY(-3px); }
#lords button[aria-checked="true"] img { border-color: var(--wax); box-shadow: 0 0 0 3px var(--gold); }
#lords:has([aria-checked="true"]) button:not([aria-checked="true"]) { opacity: .5; }
#chosen { margin: 0 0 22px; text-align: center; }
#chosen img { display: block; width: min(58vw, 230px); aspect-ratio: 1; margin: 0 auto 14px; border-radius: 50%; object-fit: cover; object-position: 50% 28%;
  border: 3px solid var(--ink); box-shadow: 0 0 0 5px var(--gold), 0 0 0 7px var(--ink), 0 18px 40px rgba(42, 26, 14, .4); }
#welcome { font: 600 20px/1.35 var(--serif); font-style: italic; text-align: center; color: var(--wax); text-wrap: balance; }
.pad-box { position: relative; }
#pad { display: block; width: 100%; height: min(46svh, 320px); background: #fbf1d6; border: 2px solid var(--ink); border-radius: 8px; touch-action: none; cursor: crosshair;
  box-shadow: inset 0 2px 10px rgba(42, 26, 14, .18); background-image: linear-gradient(transparent 74%, rgba(42, 26, 14, .35) 74% 75%, transparent 75%); }
.pad-box .x { position: absolute; left: 14px; top: calc(74% - 26px); font-size: 20px; color: rgba(42, 26, 14, .45); pointer-events: none; }
#tools { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; margin: 14px 0 22px; }
.swatches { display: flex; justify-content: space-between; gap: 4px; padding: 0 3px; }
.sw { position: relative; width: 27px; height: 27px; flex: none; padding: 0; border-radius: 50%; border: 2px solid #000; background: var(--c); cursor: pointer; transition: transform .15s, box-shadow .15s; }
.sw[aria-checked="true"], .sw.on { transform: scale(1.2); box-shadow: 0 0 0 3px #fbf1d6, 0 0 0 5px var(--ink); }
.sw.any { overflow: hidden; background: conic-gradient(#f33, #fd3, #3d5, #3cf, #36f, #c3f, #f33); }
.sw.any input { position: absolute; inset: -8px; width: calc(100% + 16px); height: calc(100% + 16px); opacity: 0; cursor: pointer; }
.toolrow { display: flex; gap: 4px; align-items: center; }
.nibs { display: flex; gap: 4px; margin-right: auto; }
.tool { height: 40px; min-width: 36px; display: grid; place-items: center; padding: 0 6px; border: 2px solid var(--ink); border-radius: 10px; cursor: pointer;
  background: rgba(255, 250, 235, .55); color: var(--ink); font: 700 13px var(--caps); touch-action: manipulation; transition: background .15s, color .15s; }
.tool:disabled { opacity: .35; cursor: default; }
.tool[aria-checked="true"], .tool[aria-pressed="true"] { background: var(--ink); color: #fbf1d6; }
.tool svg { width: 20px; height: 20px; }
#clear { padding: 0 7px; font-size: 11px; letter-spacing: .02em; }
.nib i { width: var(--d); height: var(--d); border-radius: 50%; background: currentColor; }
#accept { display: block; margin: 0 auto; }

/* ─── done ──────────────────────────────────────────────────────────── */
#done { position: fixed; inset: 0; z-index: 25; overflow: auto; padding: 16px 0; display: grid; background: rgba(5, 6, 10, .86); }
#done h2 { font: 900 26px var(--deco); margin: 0 0 12px; color: #fff3dc; }
#oath-img { width: min(100%, 360px); border-radius: 6px; box-shadow: 0 10px 40px rgba(0, 0, 0, .7); margin-bottom: 16px; -webkit-touch-callout: default; }
.instruction { font-size: 21px; color: #fff3dc; margin: 16px 0 0; }
.instruction strong { color: var(--orange); }
#back { margin-top: 22px; padding: 10px 16px; font: 600 15px var(--caps); letter-spacing: .06em; color: #fff3dc; background: none; border: 1px solid rgba(255, 243, 220, .35); border-radius: 999px; cursor: pointer; }

