/* Sophie: An Exhibition.
   A small museum: marble halls, terracotta and black-figure, gold leaf, olive, and labels with opinions. */
:root {
  --terracotta: #C8693C;
  --terracotta-deep: #9C4A26;
  --clay-dark: #6E2F16;
  --black: #1E1A17;
  --black-2: #2A2420;
  --marble: #F4EFE6;
  --marble-2: #E7DFD0;
  --olive: #7A8450;
  --olive-wall: #545F37;
  --gold: #C9A24B;
  --gold-light: #E9CF85;
  --gold-deep: #8C6B26;
  --sand: #E2CBA4;
  --ink: #1E1A17;
  --label: #FBF8F1;
  --papyrus: #EBDCB8;

  --f-display: "Cinzel", "Trajan Pro", "Times New Roman", Georgia, serif;
  --f-body: "EB Garamond", "Garamond", "Iowan Old Style", "Times New Roman", Georgia, serif;

  --gutter: clamp(16px, 4.5vw, 48px);
  --tex-marble: none;
  --tex-grain: none;

  /* meanders, drawn once: a 12-unit Greek key */
  --key-black: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M0 10.5H12M1.5 10.5V1.5H10.5V7.5H4.5V4.5H7.5' fill='none' stroke='%231E1A17' stroke-width='1.35' stroke-linecap='square'/%3E%3C/svg%3E");
  --key-clay: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M0 10.5H12M1.5 10.5V1.5H10.5V7.5H4.5V4.5H7.5' fill='none' stroke='%23C8693C' stroke-width='1.35' stroke-linecap='square'/%3E%3C/svg%3E");
  --key-gold: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M0 10.5H12M1.5 10.5V1.5H10.5V7.5H4.5V4.5H7.5' fill='none' stroke='%23C9A24B' stroke-width='1.35' stroke-linecap='square'/%3E%3C/svg%3E");
  --key-earth: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M0 10.5H12M1.5 10.5V1.5H10.5V7.5H4.5V4.5H7.5' fill='none' stroke='%235A3D27' stroke-width='1.35' stroke-linecap='square'/%3E%3C/svg%3E");

  --brush-cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='40' viewBox='0 0 40 40'%3E%3Cg transform='rotate(35 20 20)'%3E%3Crect x='16' y='0' width='8' height='18' rx='3' fill='%237a4a2a' stroke='%23fff' stroke-width='1'/%3E%3Crect x='14' y='17' width='12' height='5' rx='1' fill='%23c9a24b'/%3E%3Cpath d='M13.5 22h13l2 14h-17z' fill='%23efe1c2' stroke='%235a3d27' stroke-width='1'/%3E%3C/g%3E%3C/svg%3E") 8 34, crosshair;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body, var(--f-body));
  font-size: 1.125rem;
  line-height: 1.55;
  color: var(--ink);
  background: var(--marble) var(--tex-marble) repeat center top / 480px 480px;
  overflow-x: hidden;
  font-variant-numeric: oldstyle-nums;
  -webkit-tap-highlight-color: transparent;
}
img, svg, canvas { max-width: 100%; }
button { font: inherit; color: inherit; }
a { color: inherit; }
p { margin: 0 0 0.8em; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; border-radius: 3px; }
.visually-hidden, .sr {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}
.skip-link {
  position: fixed; left: 12px; top: -60px; z-index: 100;
  background: var(--black); color: var(--gold-light); padding: 10px 14px;
  font: 700 0.85rem var(--f-display); letter-spacing: 0.1em; text-decoration: none; border-radius: 3px;
  transition: top 0.2s;
}
.skip-link:focus { top: 12px; }
.wrap { max-width: 1140px; margin: 0 auto; padding: 0 var(--gutter); }

/* ---------- friezes: the Greek key, in several glazes ---------- */
.frieze {
  height: 28px;
  background: var(--fz-bg, var(--terracotta)) var(--fz-key, var(--key-black)) repeat-x center / 22px 22px;
  border-block: 3px solid var(--fz-line, var(--black));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
}
.frieze--top { --fz-bg: var(--terracotta); --fz-key: var(--key-black); --fz-line: var(--black); height: 30px; }
.frieze--black { --fz-bg: var(--black); --fz-key: var(--key-clay); --fz-line: var(--terracotta); }
.frieze--gold { --fz-bg: var(--black); --fz-key: var(--key-gold); --fz-line: var(--gold); }
.frieze--terracotta { --fz-bg: var(--terracotta); --fz-key: var(--key-black); --fz-line: var(--black); }
.frieze--soil { --fz-bg: #C9A97F; --fz-key: var(--key-earth); --fz-line: #5A3D27; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.55em;
  min-height: 48px; padding: 0.75em 1.15em 0.7em;
  font: 700 0.8rem/1.1 var(--f-display); letter-spacing: 0.13em; text-transform: uppercase;
  border: 0; border-radius: 3px; cursor: pointer; text-decoration: none; text-align: center;
  position: relative; transition: transform 0.12s ease, box-shadow 0.12s ease, filter 0.2s;
  touch-action: manipulation;
}
.btn svg { width: 16px; height: 16px; flex: none; stroke: currentColor; stroke-width: 2.2; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.btn--dark {
  background: var(--black); color: var(--gold-light);
  box-shadow: inset 0 0 0 1px var(--gold-deep), inset 0 0 0 3px var(--black), inset 0 0 0 4px rgba(201, 162, 75, 0.45), 0 4px 0 #000, 0 9px 16px -8px rgba(0, 0, 0, 0.6);
}
.btn--gold {
  background: linear-gradient(#ecd18a, #c9a24b 60%, #b08936); color: var(--black);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.65), inset 0 0 0 1px rgba(110, 80, 20, 0.35), 0 4px 0 #7d5f22, 0 9px 16px -8px rgba(0, 0, 0, 0.5);
}
.btn--ghost { background: transparent; box-shadow: inset 0 0 0 1.5px currentColor; }
.btn:hover { filter: brightness(1.06); }
.btn:active { transform: translateY(3px); }
.btn--dark:active { box-shadow: inset 0 0 0 1px var(--gold-deep), inset 0 0 0 3px var(--black), inset 0 0 0 4px rgba(201, 162, 75, 0.45), 0 1px 0 #000; }
.btn--gold:active { box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.65), 0 1px 0 #7d5f22; }
.btn--big { min-height: 56px; font-size: 0.92rem; padding-inline: 1.6em; }
.link-btn {
  background: none; border: 0; padding: 10px 6px; min-height: 44px; cursor: pointer;
  font: italic 1.05rem var(--f-body); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px;
  color: inherit;
}

/* ---------- the audio guide ---------- */
.guide {
  position: fixed; z-index: 50;
  top: max(6px, env(safe-area-inset-top)); right: max(8px, env(safe-area-inset-right));
  display: inline-flex; align-items: center; gap: 7px;
  min-height: 44px; padding: 6px 13px 6px 9px; border-radius: 24px;
  border: 1px solid rgba(201, 162, 75, 0.7);
  background: rgba(30, 26, 23, 0.9); color: var(--marble);
  font: 700 0.66rem/1 var(--f-display); letter-spacing: 0.13em; text-transform: uppercase;
  box-shadow: 0 6px 18px -6px rgba(0, 0, 0, 0.55);
  cursor: pointer;
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}
.guide b { color: var(--gold-light); font-weight: 800; }
.guide svg { width: 22px; height: 22px; fill: none; stroke: var(--gold-light); stroke-width: 1.7; stroke-linecap: round; }
.guide .g-cross { display: none; stroke: var(--terracotta); stroke-width: 2.2; }
.guide[aria-pressed="false"] .g-cross { display: inline; }
.guide[aria-pressed="false"] .g-body, .guide[aria-pressed="false"] .g-arc { opacity: 0.5; }

/* the wayfinding sign: the letter is always one tap away */
.wayfind {
  position: fixed; z-index: 50;
  top: max(6px, env(safe-area-inset-top)); left: max(8px, env(safe-area-inset-left));
  display: inline-flex; align-items: center; gap: 6px;
  min-height: 44px; padding: 6px 13px 6px 10px; border-radius: 24px;
  background: linear-gradient(#ecd18a, #c9a24b 65%, #b08936); color: var(--black); text-decoration: none;
  font: 800 0.66rem/1 var(--f-display); letter-spacing: 0.13em; text-transform: uppercase;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6), 0 6px 18px -6px rgba(0, 0, 0, 0.55);
  transition: opacity 0.35s, transform 0.35s;
}
.wayfind svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.wayfind.is-hidden { opacity: 0; transform: translateY(-12px); pointer-events: none; }

/* ---------- museum labels ---------- */
.label {
  position: relative;
  background: var(--label);
  color: var(--ink);
  padding: 14px 16px 12px 19px;
  border-radius: 1px;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.06), 0 12px 26px -16px rgba(40, 20, 5, 0.6);
  max-width: 30rem;
  text-align: left;
  font-size: 1.02rem;
}
.label::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--terracotta); }
.label > :last-child { margin-bottom: 0; }
.label-cat {
  display: flex; flex-wrap: wrap; align-items: center; gap: 0.45em 0.7em;
  font: 700 0.7rem/1.3 var(--f-display); letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--terracotta-deep); margin: 0 0 0.4rem;
}
.label-where { color: #776657; font-weight: 600; letter-spacing: 0.14em; }
.label-title { display: block; font: 600 1.3rem/1.2 var(--f-body); margin: 0 0 0.15rem; }
.label-medium { display: block; font-style: italic; color: #5a4d43; margin: 0 0 0.55rem; }
.label-note { display: block; margin: 0 0 0.5rem; line-height: 1.45; }
.label-caption { font-style: italic; color: #6a5c50; font-size: 1rem; }
.label-hint { font-weight: 600; color: var(--terracotta-deep); }
.label-credit {
  font: 700 0.6rem/1.2 var(--f-display); letter-spacing: 0.22em; text-transform: uppercase;
  color: #85776a; margin: 0.7rem 0 0; padding-top: 0.55rem; border-top: 1px solid #e6dcca;
}
.label-quote { margin: 0.5rem 0 0.7rem; padding: 0.55rem 0.8rem; border-left: 3px solid var(--gold); background: #f3ebda; }
.label-quote p { margin: 0; font-style: italic; }
.label-quote cite { display: block; margin-top: 0.35rem; font: 700 0.6rem var(--f-display); letter-spacing: 0.2em; text-transform: uppercase; font-style: normal; color: #85776a; }
.label--dark { background: #2b2420; color: #f1e7d6; box-shadow: 0 0 0 1px rgba(201, 162, 75, 0.35), 0 14px 28px -16px #000; }
.label--dark::before { background: var(--gold); }
.label--dark .label-cat { color: var(--gold-light); }
.label--dark .label-where, .label--dark .label-medium { color: #cbbba3; }
.label--dark .label-credit { color: #a8977f; border-color: rgba(255, 255, 255, 0.12); }
.touch-sign {
  display: inline-flex; gap: 0.35em; align-items: center;
  font: 700 0.56rem/1 var(--f-display); letter-spacing: 0.12em;
  background: var(--black); color: var(--marble); padding: 4px 6px 3px; border-radius: 2px;
}
.touch-sign s { opacity: 0.5; text-decoration-thickness: 1.5px; }
.label--dark .touch-sign { background: var(--gold); color: var(--black); }

/* ---------- rooms ---------- */
.room { position: relative; overflow-x: clip; }
.room > .wrap { padding-top: clamp(44px, 8vw, 96px); padding-bottom: clamp(56px, 9vw, 112px); }
.room-head { text-align: center; max-width: 42rem; margin: 0 auto clamp(26px, 5vw, 46px); }
.room-no {
  display: inline-flex; align-items: center; gap: 0.9em; margin: 0;
  font: 700 0.78rem/1 var(--f-display); letter-spacing: 0.34em; text-transform: uppercase; color: var(--terracotta-deep);
}
.room-no::before, .room-no::after {
  content: ""; width: 38px; height: 11px;
  background: var(--room-key, var(--key-clay)) repeat-x center / 11px 11px;
}
.room-head h2 {
  font: 700 clamp(2.3rem, 10vw, 4.4rem)/1 var(--f-display);
  letter-spacing: 0.02em; margin: 0.28em 0 0.32em;
}
.room-sub { font-size: 1.2rem; font-style: italic; margin: 0 auto; max-width: 34rem; line-height: 1.45; }

.will-reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.8s ease, transform 0.8s cubic-bezier(0.2, 0.8, 0.2, 1); }
.will-reveal.in { opacity: 1; transform: none; }

/* =========================================================
   ENTRANCE
   ========================================================= */
.entrance { position: relative; overflow: hidden; }
.entrance::after {
  content: ""; position: absolute; inset: auto 0 0; height: 1px; background: rgba(30, 26, 23, 0.15);
}
.entrance-inner {
  max-width: 1180px; margin: 0 auto;
  padding: 26px var(--gutter) 40px;
  display: grid; gap: 22px;
  grid-template-areas: "words" "vase" "ticket";
  position: relative; z-index: 1;
}
.entrance-words { grid-area: words; text-align: center; }
.vase-exhibit { grid-area: vase; }
.ticket { grid-area: ticket; }
.olive-deco { position: absolute; width: 170px; z-index: 0; opacity: 0.95; pointer-events: auto; }
.olive-deco--l { left: -58px; top: 118px; transform: rotate(-24deg); }
.olive-deco--r { right: -58px; top: 118px; transform: scaleX(-1) rotate(-24deg); }
.olive { display: block; width: 100%; height: auto; overflow: visible; cursor: pointer; }
.olive .leaf { transform-box: fill-box; transform-origin: 0 50%; }
.olive.rustle .leaf { animation: rustle 0.7s ease-out var(--d, 0s); }
@keyframes rustle { 20% { rotate: 14deg; } 45% { rotate: -9deg; } 70% { rotate: 4deg; } }
.olive-deco .olive { animation: sway 7s ease-in-out infinite; transform-origin: 0 60%; }
@keyframes sway { 50% { transform: rotate(2.5deg); } }

.eyebrow {
  display: flex; justify-content: center; gap: 0.6em; margin: 22px 0 0;
  font: 700 0.74rem/1 var(--f-display); letter-spacing: 0.3em; text-transform: uppercase; color: var(--terracotta-deep);
}
.title { margin: 6px 0 0; font-weight: 400; }
.title-name {
  display: block;
  font: 800 clamp(3.7rem, 19.5vw, 8.4rem)/0.92 var(--f-display);
  letter-spacing: 0.05em; margin-right: -0.05em;
  color: var(--black);
  background: linear-gradient(100deg, var(--black) 0 41%, #8c6b26 45%, #f6e2a0 50%, #8c6b26 55%, var(--black) 59% 100%);
  background-size: 320% 100%; background-position: 100% 0;
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
  animation: shimmer 2.8s 0.5s cubic-bezier(0.3, 0.1, 0.3, 1) both;
}
@keyframes shimmer { from { background-position: 100% 0; } to { background-position: 0 0; } }
.title-sub {
  display: flex; align-items: center; justify-content: center; gap: 0.7em;
  font: italic 500 clamp(1.35rem, 5.6vw, 2rem)/1.2 var(--f-body); margin-top: 6px; color: #3d332b;
}
.title-sub::before, .title-sub::after { content: ""; flex: 0 1 54px; height: 1.5px; background: linear-gradient(90deg, transparent, var(--gold) 30%, var(--gold) 70%, transparent); }

/* the stele, where epithets are carved */
.stele {
  position: relative; display: block; width: 100%; max-width: 31rem; margin: 18px auto 0;
  padding: 12px 18px 11px; cursor: pointer; text-align: center; border: 0;
  background:
    linear-gradient(rgba(255, 255, 255, 0.55), rgba(255, 255, 255, 0) 30%),
    var(--tex-marble) center / 300px,
    linear-gradient(#f3eee5, #e3dacb);
  border-radius: 2px;
  box-shadow: inset 0 0 0 1px #d4c9b5, inset 0 2px 0 #fff, inset 0 -4px 0 rgba(90, 70, 40, 0.12), 0 12px 22px -14px rgba(60, 30, 10, 0.6);
  clip-path: polygon(0 4px, 4px 0, calc(100% - 9px) 0, 100% 7px, 100% calc(100% - 3px), calc(100% - 3px) 100%, 6px 100%, 0 calc(100% - 6px));
  overflow: hidden;
  touch-action: manipulation;
}
.stele-kicker { display: block; font: 700 0.64rem/1 var(--f-display); letter-spacing: 0.3em; text-transform: uppercase; color: var(--terracotta-deep); }
.stele-text {
  display: block; text-align: center; text-wrap: balance;
  min-height: 2.5em; margin: 6px 0 4px;
  font: 700 clamp(1.08rem, 5vw, 1.5rem)/1.25 var(--f-display); letter-spacing: 0.05em; text-transform: uppercase;
  color: #4a4038;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.95), 0 -1px 0 rgba(40, 25, 10, 0.45);
}
.stele-text .word { white-space: nowrap; display: inline-block; }
.stele-text .ch { display: inline-block; animation: carve 0.34s calc(var(--i) * 34ms) cubic-bezier(0.2, 0.9, 0.3, 1.2) both; }
@keyframes carve { from { opacity: 0; transform: translateY(-4px) scale(1.5); filter: blur(2px); color: var(--gold-deep); } 60% { color: #6b5636; } }
.stele-text.crumble .ch { animation: crumble 0.26s ease-in forwards; }
@keyframes crumble { to { opacity: 0; transform: translate(var(--fx, 0), 16px) rotate(var(--fr, 0deg)); } }
.stele-hint { display: block; font-style: italic; font-size: 1rem; color: #6b5d50; }
.stele .chip { position: absolute; width: 4px; height: 3px; background: #cfc4b1; border-radius: 1px; animation: chip 0.7s ease-out both; pointer-events: none; }
@keyframes chip { from { opacity: 1; transform: none; } to { opacity: 0; transform: translate(var(--dx), var(--dy)) rotate(240deg); } }
.stele:active { transform: translateY(1px); }

/* the turning vase */
.vase-exhibit { margin: 0; display: flex; flex-direction: column; align-items: center; }
.vase-stage { position: relative; height: clamp(250px, 37svh, 340px); aspect-ratio: 0.64; }
.vase { display: block; width: 100%; height: 100%; touch-action: pan-y; cursor: grab; position: relative; z-index: 1; }
.vase:active { cursor: grabbing; }
.plinth {
  /* the vase's foot ends 94.4% of the way down its canvas: the plinth starts right there */
  position: absolute; left: 50%; top: calc(94.4% + 5px); width: 76%; height: 26px; transform: translateX(-50%);
  background: linear-gradient(#fbf8f2, #e5dccc);
  box-shadow: inset 0 -2px 0 rgba(0, 0, 0, 0.08), 0 10px 18px -12px rgba(40, 20, 5, 0.6);
}
.plinth::before { content: ""; position: absolute; left: -4%; right: -4%; top: -6px; height: 7px; background: #f7f3eb; box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.12); }
.label--inline { display: flex; flex-direction: column; margin-top: 28px; padding: 11px 14px 10px 17px; width: min(100%, 26rem); }
.label--inline .label-title { font-size: 1.15rem; }
.label--inline .label-medium { margin-bottom: 0.35rem; }
.label--inline .label-note { margin: 0; font-size: 1rem; min-height: 2.9em; }

/* the ticket */
.ticket {
  position: relative; display: grid; grid-template-columns: 52px 1fr; grid-template-areas: "stub main" "stub actions";
  width: min(100%, 31rem); margin: 4px auto 0;
  background: #f6ead0 var(--tex-grain);
  border-radius: 5px;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.1), 0 16px 26px -18px rgba(40, 20, 5, 0.75);
}
.ticket-stub {
  grid-area: stub; position: relative;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px;
  background: var(--terracotta) var(--tex-grain); color: var(--marble);
  border-radius: 5px 0 0 5px;
  transform-origin: 100% 0;
}
.ticket-stub span { writing-mode: vertical-rl; transform: rotate(180deg); font: 800 0.74rem/1 var(--f-display); letter-spacing: 0.28em; text-transform: uppercase; }
.ticket-stub .ticket-no { font-weight: 600; font-size: 0.6rem; opacity: 0.85; }
.ticket-main { grid-area: main; position: relative; padding: 12px 16px 4px 18px; text-align: left; }
.ticket-stub::after {
  content: ""; position: absolute; right: -4px; top: 0; bottom: 0; width: 8px;
  background: radial-gradient(circle, #f6ead0 2.6px, transparent 3px) center 4px / 8px 11px repeat-y;
}
.ticket-kicker { margin: 0; font: 700 0.78rem/1.3 var(--f-display); letter-spacing: 0.2em; text-transform: uppercase; color: var(--terracotta-deep); }
.ticket-kicker b { color: var(--black); font-weight: 900; }
.ticket-small { margin: 2px 0 0; font-style: italic; font-size: 1rem; color: #5a4d43; }
.ticket-actions { grid-area: actions; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 10px 14px 16px 18px; }
.ticket-actions .btn { padding-inline: 0.6em; }
@media (max-width: 420px) {
  .ticket-actions { grid-template-columns: 1fr; gap: 9px; }
  .ticket-main { padding-top: 13px; }
}
.ticket-stamp {
  position: absolute; right: 12px; top: 8px; padding: 3px 7px 2px;
  border: 2px solid rgba(156, 74, 38, 0.85); color: rgba(156, 74, 38, 0.9); border-radius: 3px;
  font: 800 0.66rem/1 var(--f-display); letter-spacing: 0.2em; text-transform: uppercase;
  transform: rotate(9deg) scale(1.8); opacity: 0; pointer-events: none;
}
.ticket { transition: grid-template-columns 0.5s 0.6s ease; }
.ticket.is-torn { grid-template-columns: 0 1fr; }
.ticket.is-torn .ticket-stub { animation: tear 0.9s cubic-bezier(0.5, 0, 0.6, 1) forwards; }
.ticket.is-torn .ticket-stamp { animation: stampIn 0.35s 0.5s cubic-bezier(0.3, 1.6, 0.5, 1) forwards; }
@keyframes tear { 25% { transform: rotate(-9deg); } 100% { transform: translate(-30px, 160px) rotate(-48deg); opacity: 0; } }
@keyframes stampIn { to { opacity: 1; transform: rotate(9deg) scale(1); } }

/* =========================================================
   ROOM I: THE EXCAVATION
   ========================================================= */
.room--dig { background: var(--sand) var(--tex-grain); --room-key: var(--key-earth); }
.room--dig .room-no { color: #6E4A2C; }
.room--dig .room-sub { color: #3e2e20; }
.dig-layout { display: grid; gap: 22px; }
.dig-main { min-width: 0; }
.strata { list-style: none; margin: 0 0 6px; padding: 0; display: flex; gap: 4px; }
.strata li {
  flex: 1; height: 26px; border-radius: 2px; position: relative;
  display: flex; align-items: center; justify-content: center;
  background: var(--soil) var(--tex-grain);
  font: 700 0.7rem/1 var(--f-display); color: rgba(255, 250, 240, 0.92); letter-spacing: 0.06em;
  opacity: 0.45; transition: opacity 0.4s, transform 0.3s;
}
.strata li.is-done { opacity: 0.85; }
.strata li.is-done b::after { content: " ✓"; font-family: var(--f-body); }
.strata li.is-current { opacity: 1; box-shadow: 0 0 0 2px var(--sand), 0 0 0 4px var(--black); transform: translateY(-1px); }
.strata-now {
  display: flex; justify-content: space-between; gap: 10px; margin: 8px 2px 10px;
  font: 700 0.74rem/1.3 var(--f-display); letter-spacing: 0.12em; text-transform: uppercase; color: #4f3925;
}
.trench-frame {
  padding: 11px; border-radius: 4px;
  background:
    var(--tex-grain),
    linear-gradient(#8a6948 0 14%, #a2673f 14% 30%, #7e5539 30% 52%, #6a5a4e 52% 70%, #5a4537 70% 100%);
  box-shadow: inset 0 0 0 2px rgba(30, 15, 5, 0.35), inset 0 0 18px rgba(0, 0, 0, 0.45), 0 18px 30px -20px rgba(40, 20, 5, 0.85);
}
.trench {
  position: relative; width: 100%; aspect-ratio: 4 / 5; max-height: 66svh; overflow: hidden;
  border-radius: 2px; touch-action: none; cursor: var(--brush-cursor);
  user-select: none; -webkit-user-select: none; -webkit-touch-callout: none;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.45);
  background: var(--soil, #b98a5e);
}
.trench:focus-visible { outline-offset: 5px; }
.trench.is-revealed { touch-action: auto; cursor: default; }
.trench-bed {
  position: absolute; inset: 0;
  background: var(--tex-grain), radial-gradient(ellipse at 50% 45%, var(--bed, #6c4a2e), var(--deep, #45281a) 85%);
}
.trench-bed::after {
  content: ""; position: absolute; inset: 0; opacity: 0; transition: opacity 1s 0.3s;
  background: radial-gradient(ellipse 70% 55% at 50% 38%, rgba(255, 236, 200, 0.32), transparent 70%);
}
.trench.is-revealed .trench-bed::after { opacity: 1; }
.find {
  position: absolute; left: 50%; top: 50%; z-index: 1;
  transform: translate(-50%, -50%) rotate(var(--tilt, 0deg));
  pointer-events: none;
  transition: transform 1s cubic-bezier(0.25, 0.9, 0.25, 1.15), filter 1s;
  filter: drop-shadow(0 2px 2px rgba(0, 0, 0, 0.45));
}
.find::before {
  content: ""; position: absolute; inset: -9%; z-index: -1; border-radius: 40%;
  background: radial-gradient(closest-side, rgba(25, 12, 4, 0.5), rgba(25, 12, 4, 0));
  transition: opacity 0.8s;
}
.trench.is-revealed .find {
  transform: translate(-50%, -55%) rotate(0deg) scale(1.03);
  filter: drop-shadow(0 26px 20px rgba(0, 0, 0, 0.55));
  pointer-events: auto; cursor: pointer;
}
.trench.is-revealed .find::before { opacity: 0; }
.find--land { width: 84%; }
.find--port { height: 76%; }
.find--coin { width: 60%; }
.find--ostracon { width: 86%; }
.find--amphora { width: 44%; }
.trench .find--amphora { transform: translate(-50%, -50%) rotate(-79deg); }
.trench.is-revealed .find--amphora { transform: translate(-50%, -54%) rotate(0deg) scale(1.02); }
.soil, .dust, .strings { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.soil { z-index: 2; transition: opacity 0.8s ease; }
.soil.pour { animation: pourIn 0.75s cubic-bezier(0.5, 0, 0.3, 1); }
@keyframes pourIn { from { clip-path: inset(0 0 100% 0); } to { clip-path: inset(0); } }
.dust { z-index: 4; }
.strings { z-index: 3; overflow: visible; transition: opacity 0.6s; }
.strings .str { fill: none; stroke: rgba(252, 246, 232, 0.88); stroke-width: 1.3; filter: drop-shadow(0 1.5px 0 rgba(0, 0, 0, 0.35)); }
.strings .str.twang { animation: twang 0.55s ease-out; }
@keyframes twang { 10% { transform: translate(1.6px, 1.6px); } 25% { transform: translate(-1.3px, -1.3px); } 40% { transform: translate(1px, 1px); } 60% { transform: translate(-0.6px, -0.6px); } }
.strings .peg { fill: #8a6a42; stroke: #3f2c1a; stroke-width: 1; }
.trench.is-revealed .soil { opacity: 0; }
.trench.is-revealed .strings { opacity: 0; }
.case-glass {
  position: absolute; inset: 6% 7% 8%; z-index: 5; pointer-events: none;
  border: 1.5px solid rgba(255, 255, 255, 0.6);
  background: linear-gradient(118deg, rgba(255, 255, 255, 0.24), rgba(255, 255, 255, 0.05) 32%, rgba(255, 255, 255, 0) 58%, rgba(255, 255, 255, 0.14) 80%, rgba(255, 255, 255, 0.03));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.15), inset 0 18px 30px -20px rgba(255, 255, 255, 0.5);
  transform: translateY(-120%); opacity: 0;
  transition: transform 0.85s 0.35s cubic-bezier(0.3, 1.25, 0.5, 1), opacity 0.3s 0.35s;
}
.case-glass::after {
  content: ""; position: absolute; left: -3%; right: -3%; bottom: -12px; height: 12px;
  background: linear-gradient(#fbf8f2, #d9cfbd); box-shadow: 0 6px 10px rgba(0, 0, 0, 0.45);
}
.trench.is-revealed .case-glass { transform: none; opacity: 1; }
.no-anim, .no-anim * { transition: none !important; animation: none !important; }
.trench-hint {
  position: absolute; left: 50%; top: 50%; z-index: 6; transform: translate(-50%, -50%);
  display: flex; flex-direction: column; align-items: center; gap: 2px; pointer-events: none;
  color: #fff9ec; font: 800 0.86rem/1 var(--f-display); letter-spacing: 0.24em; text-transform: uppercase;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.75), 0 0 14px rgba(0, 0, 0, 0.4);
  transition: opacity 0.4s;
}
.trench-hint span { background: rgba(30, 20, 12, 0.55); padding: 7px 10px 6px; border-radius: 3px; }
.brush-icon { width: 66px; height: 66px; animation: sweep 1.5s ease-in-out infinite; transform-origin: 50% 8%; filter: drop-shadow(0 6px 6px rgba(0, 0, 0, 0.45)); }
@keyframes sweep { 0%, 100% { transform: translateX(-40px) rotate(20deg); } 50% { transform: translateX(40px) rotate(-20deg); } }
.trench-hint.is-gone, .trench.is-revealed .trench-hint { opacity: 0; }
.trench-done {
  position: absolute; z-index: 7; top: 16px; left: 14px; margin: 0;
  transform: rotate(-9deg); padding: 6px 10px 5px;
  border: 2.5px solid var(--terracotta); border-radius: 3px; color: var(--terracotta-deep);
  background: rgba(251, 246, 236, 0.92);
  font: 800 0.74rem/1 var(--f-display); letter-spacing: 0.18em; text-transform: uppercase;
  animation: stampIn2 0.4s 0.9s cubic-bezier(0.3, 1.6, 0.5, 1) both;
}
@keyframes stampIn2 { from { opacity: 0; transform: rotate(-9deg) scale(1.8); } }

/* finds */
.pinax {
  position: relative; display: block; margin: 0; aspect-ratio: var(--ar);
  padding: 10px; background: var(--black) var(--key-clay) repeat center / 13px 13px;
  box-shadow: inset 0 0 0 2px var(--terracotta), 0 0 0 1px rgba(0, 0, 0, 0.4);
}
.find--land .pinax { width: 100%; }
.find--port .pinax { height: 100%; }
.pinax img { display: block; width: 100%; height: 100%; object-fit: cover; box-shadow: 0 0 0 2px var(--terracotta); background: #4a3a30; -webkit-user-drag: none; }
.pinax-holes::before, .pinax-holes::after {
  content: ""; position: absolute; top: 2px; width: 6px; height: 6px; border-radius: 50%;
  background: radial-gradient(circle at 40% 40%, #000, #2b1d14); box-shadow: 0 0 0 1px rgba(255, 220, 190, 0.35);
}
.pinax-holes::before { left: 22%; }
.pinax-holes::after { right: 22%; }
.coin { display: block; width: 100%; aspect-ratio: 1; padding: 0; border: 0; background: none; cursor: pointer; perspective: 900px; }
.coin-inner { display: block; position: relative; width: 100%; height: 100%; transform-style: preserve-3d; transition: transform 0.9s cubic-bezier(0.3, 1.35, 0.5, 1); }
.coin.is-flipped .coin-inner { transform: rotateY(180deg); }
.coin-side { position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden; transform: rotateY(0deg); }
.coin-back { transform: rotateY(180deg); }
/* WebKit can ignore backface-visibility here, so the faces also swap at the half-turn */
.coin-front { transition: visibility 0s linear 0.2s; }
.coin-back { visibility: hidden; transition: visibility 0s linear 0.2s; }
.coin.is-flipped .coin-front { visibility: hidden; }
.coin.is-flipped .coin-back { visibility: visible; }
.coin svg { display: block; width: 100%; height: 100%; }
.ostracon svg { display: block; width: 100%; height: auto; }
.ostracon.wiggle { animation: wiggle 0.5s; }
@keyframes wiggle { 25% { transform: rotate(-4deg); } 60% { transform: rotate(3deg); } }
.amph { aspect-ratio: 0.64; width: 100%; }
.amph-canvas { display: block; width: 100%; height: 100%; }

/* labels and tools beside the trench */
.dig-side { min-width: 0; }
.find-label-slot { min-height: 150px; }
.find-label-slot .label { max-width: none; }
.label--pending {
  background: repeating-linear-gradient(-45deg, #f8f1e4 0 12px, #f0e6d3 12px 24px);
}
.label--pending .label-title { color: #7a6a5b; font-style: italic; }
.label.is-new { animation: labelIn 0.8s 0.4s cubic-bezier(0.2, 0.9, 0.3, 1.1) both; }
@keyframes labelIn { from { opacity: 0; transform: translateY(16px) rotate(-1.2deg); } }
.dig-tools { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.dig-tools .btn { flex: 1 1 10rem; }
.dig-skip { margin: 6px 0 0; display: flex; flex-wrap: wrap; gap: 0 14px; color: #4f3925; }
.register {
  margin-top: 16px; padding: 12px 12px 14px; border-radius: 4px;
  background: linear-gradient(#4a3424, #36261a) ; color: var(--gold-light);
  box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.55), 0 1px 0 rgba(255, 255, 255, 0.4);
}
.register-title { margin: 0 0 9px; font: 700 0.72rem/1 var(--f-display); letter-spacing: 0.26em; text-transform: uppercase; color: var(--gold-light); }
.register-slots { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(52px, 1fr)); gap: 7px; }
.slot {
  position: relative; display: block; width: 100%; aspect-ratio: 1; padding: 5px; border: 0; border-radius: 3px; cursor: pointer;
  background: #241810; box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.75), 0 1px 0 rgba(255, 255, 255, 0.08);
}
.slot:disabled { cursor: default; }
.slot-art { display: grid; place-items: center; width: 100%; height: 100%; border-radius: 2px; overflow: hidden; }
.slot:disabled .slot-art { background: var(--soil) var(--tex-grain); opacity: 0.45; }
.slot-art img { width: 100%; height: 100%; object-fit: cover; }
.slot-art svg { width: 100%; height: 100%; }
.slot-no {
  position: absolute; right: 2px; bottom: 2px; min-width: 15px; padding: 2px 3px 1px; border-radius: 2px;
  background: var(--label); color: var(--ink); font: 700 0.58rem/1 var(--f-display); text-align: center;
}
.slot.is-found { box-shadow: inset 0 0 0 1.5px rgba(233, 207, 133, 0.6), 0 1px 0 rgba(255, 255, 255, 0.08); }
.slot.pop { animation: pop 0.7s 0.9s cubic-bezier(0.3, 1.8, 0.5, 1) both; }
@keyframes pop { 0% { transform: scale(1); } 40% { transform: scale(1.22); } 100% { transform: scale(1); } }

/* =========================================================
   ROOM II: THE CELLIST (black-figure, on a terracotta wall)
   ========================================================= */
.room--cello { background: var(--terracotta) var(--tex-grain); --room-key: var(--key-black); }
.room--cello .room-no { color: var(--black); }
.cello-layout { display: grid; gap: 22px; justify-items: center; }
.cello-case {
  position: relative; width: min(100%, 420px); padding: 18px 10px 12px;
  border: 2px solid rgba(30, 26, 23, 0.85);
  background: linear-gradient(118deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0) 40%), rgba(0, 0, 0, 0.04);
  box-shadow: inset 0 0 0 6px rgba(255, 255, 255, 0.06), 0 18px 34px -20px rgba(40, 10, 0, 0.8);
}
.cello-stage { touch-action: pan-y; cursor: ew-resize; user-select: none; -webkit-user-select: none; border-radius: 2px; }
.cello-svg { display: block; height: min(66svh, 560px); width: auto; max-width: 100%; margin: 0 auto; overflow: visible; }
.c-string { transition: stroke 0.2s; }
.c-string.is-on { stroke: #fff6d8; }
.c-bow { opacity: 0; transition: opacity 0.25s; }
.c-bow.is-on { opacity: 1; }
.c-ring { fill: none; stroke: var(--gold-light); stroke-width: 2.5; transform-box: fill-box; transform-origin: center; animation: ringOut 1.25s ease-out forwards; }
@keyframes ringOut { from { transform: scale(0.4); opacity: 0.95; } to { transform: scale(4.2); opacity: 0; } }
.cello-now { margin: 10px 0 0; text-align: center; font-style: italic; min-height: 1.6em; color: #2b1a10; }
.cello-words { display: flex; flex-direction: column; gap: 16px; align-items: center; }
.cello-buttons { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }

/* =========================================================
   ROOM III: THE CAFE
   ========================================================= */
.room--cafe { background: var(--olive-wall) var(--tex-grain); color: var(--marble); --room-key: var(--key-gold); }
.room--cafe .room-no { color: var(--gold-light); }
.cafe-layout { display: grid; gap: 20px; justify-items: center; }
.cafe-stage { display: block; width: min(100%, 470px); padding: 0; border: 0; background: none; cursor: pointer; touch-action: manipulation; border-radius: 6px; }
.cafe-svg { display: block; width: 100%; height: auto; overflow: visible; }
.cafe-words { display: flex; flex-direction: column; gap: 14px; align-items: center; width: 100%; }
.cafe-controls { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; }
.cafe-status { margin: 0; font-style: italic; max-width: 28rem; min-height: 3em; color: #f4efe6; }
.coffee { transition: opacity 0.3s; }
.latte { opacity: 0; transition: opacity 0.9s, filter 0.9s; }
.latte.is-on { opacity: 1; }
.steam path { fill: none; stroke: rgba(255, 255, 255, 0.75); stroke-width: 5; stroke-linecap: round; stroke-dasharray: 26 160; stroke-dashoffset: 26; opacity: 0; }
.steam.is-on path { animation: steam 3.2s linear infinite; }
.steam.is-on path:nth-child(2) { animation-delay: 1.1s; }
.steam.is-on path:nth-child(3) { animation-delay: 2.1s; }
@keyframes steam { 0% { stroke-dashoffset: 26; opacity: 0; } 20% { opacity: 0.8; } 100% { stroke-dashoffset: -150; opacity: 0; } }
.stream { stroke: #5a301a; stroke-width: 7; stroke-dasharray: 9 7; opacity: 0; transition: opacity 0.2s, stroke 0.3s; }
.stream.is-on { opacity: 1; animation: flow 0.35s linear infinite; }
.stream.milk { stroke: #f4e8d2; }
@keyframes flow { to { stroke-dashoffset: -16; } }
.jug { transform-box: fill-box; transform-origin: 50% 100%; transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1); }
.jug.is-pouring { transform: translate(-62px, -150px) rotate(-64deg); }
.tondo-pop .tondo { animation: tondo 1.4s ease-out; }
@keyframes tondo { 30% { filter: brightness(1.45) drop-shadow(0 0 4px #ffd27a); } }

/* =========================================================
   ROOM IV: HALL OF HEROES (red-figure: the colours swap)
   ========================================================= */
.room--heroes { background: var(--black); color: var(--marble); --room-key: var(--key-clay); }
.room--heroes .room-no { color: var(--terracotta); }
.room--heroes h2 { color: var(--terracotta); }
.heroes-intro { max-width: 36rem; margin: 0 auto 26px; text-align: center; font-size: 1.1rem; color: #e6dccb; }
.shields { list-style: none; margin: 0 auto; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 16px 12px; max-width: 980px; }
.shields li { width: calc(33.333% - 8px); max-width: 132px; }
.shield { display: block; width: 100%; aspect-ratio: 1; padding: 0; border: 0; background: none; cursor: pointer; perspective: 700px; border-radius: 50%; touch-action: manipulation; }
.shield-inner { display: block; position: relative; width: 100%; height: 100%; transform-style: preserve-3d; transition: transform 0.75s cubic-bezier(0.3, 1.3, 0.5, 1); }
.shield[aria-pressed="true"] .shield-inner { transform: rotateY(180deg); }
.shield-face { position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden; transform: rotateY(0deg); }
.shield-back { transform: rotateY(180deg); }
.shield-front { transition: visibility 0s linear 0.17s; }
.shield-back { visibility: hidden; transition: visibility 0s linear 0.17s; }
.shield[aria-pressed="true"] .shield-front { visibility: hidden; }
.shield[aria-pressed="true"] .shield-back { visibility: visible; }
.shield svg { display: block; width: 100%; height: 100%; filter: drop-shadow(0 10px 10px rgba(0, 0, 0, 0.55)); }
.virtue {
  position: absolute; inset: 18%; display: grid; place-items: center; text-align: center;
  font: 700 clamp(0.66rem, 2.9vw, 0.86rem)/1.15 var(--f-display); letter-spacing: 0.05em; text-transform: uppercase;
  color: var(--gold-light); text-shadow: 0 1px 2px #000, 0 0 8px rgba(0, 0, 0, 0.6);
}
.shield:hover .shield-inner { filter: brightness(1.08); }
.shields.all .shield { animation: glow 1.8s ease-in-out calc(var(--i) * 110ms); }
@keyframes glow { 40% { filter: drop-shadow(0 0 16px rgba(233, 207, 133, 0.85)); transform: translateY(-6px); } }
.heroes-label { margin: 30px auto 0; }

/* =========================================================
   ROOM V: THE LETTER
   ========================================================= */
.room--letter {
  background:
    radial-gradient(ellipse 80% 50% at 50% 0%, rgba(200, 105, 60, 0.28), transparent 70%),
    linear-gradient(#1E1A17, #2a1610 60%, #3a1c10);
  color: var(--marble);
  --room-key: var(--key-gold);
}
.room--letter .room-no { color: var(--gold-light); }
.room--letter h2 {
  background: linear-gradient(100deg, #b48a32, #f6e2a0 45%, #c9a24b 60%, #8c6b26);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.room--letter .room-sub { color: #eadfcc; }
.letter-stage { position: relative; display: flex; flex-direction: column; align-items: center; gap: 22px; }
.spotlight {
  position: absolute; left: 50%; top: -120px; width: min(560px, 100%); height: 620px; transform: translateX(-50%);
  background: radial-gradient(ellipse 38% 58% at 50% 46%, rgba(255, 232, 190, 0.2), rgba(255, 232, 190, 0.06) 55%, transparent 72%);
  pointer-events: none;
}
.spotlight i {
  position: absolute; width: 3px; height: 3px; border-radius: 50%; background: rgba(255, 238, 205, 0.75);
  animation: mote 11s linear infinite; opacity: 0;
}
.spotlight i:nth-child(1) { left: 38%; top: 70%; animation-delay: 0s; }
.spotlight i:nth-child(2) { left: 52%; top: 80%; animation-delay: 1.2s; width: 2px; height: 2px; }
.spotlight i:nth-child(3) { left: 61%; top: 66%; animation-delay: 2.5s; }
.spotlight i:nth-child(4) { left: 45%; top: 60%; animation-delay: 3.8s; width: 2px; height: 2px; }
.spotlight i:nth-child(5) { left: 57%; top: 75%; animation-delay: 5s; }
.spotlight i:nth-child(6) { left: 42%; top: 82%; animation-delay: 6.4s; width: 4px; height: 4px; opacity: 0.6; }
.spotlight i:nth-child(7) { left: 66%; top: 58%; animation-delay: 7.5s; width: 2px; height: 2px; }
.spotlight i:nth-child(8) { left: 34%; top: 55%; animation-delay: 8.6s; }
.spotlight i:nth-child(9) { left: 49%; top: 50%; animation-delay: 9.6s; width: 2px; height: 2px; }
.spotlight i:nth-child(10) { left: 55%; top: 62%; animation-delay: 4.4s; }
@keyframes mote { 0% { opacity: 0; transform: translate(0, 0); } 15% { opacity: 0.9; } 85% { opacity: 0.6; } 100% { opacity: 0; transform: translate(26px, -200px); } }
.amphora-wrap { position: relative; width: clamp(200px, 58vw, 280px); margin-top: 30px; transform-origin: 50% 96%; }
.amphora-wrap .vase { height: auto; aspect-ratio: 0.64; }
.amphora-wrap.wobble { animation: wobble 0.7s cubic-bezier(0.3, 0, 0.3, 1); }
@keyframes wobble { 18% { transform: rotate(-3.4deg); } 42% { transform: rotate(2.6deg); } 66% { transform: rotate(-1.3deg); } 85% { transform: rotate(0.5deg); } }
.plinth--dark { background: linear-gradient(#3b302a, #1c1613); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), 0 14px 22px -12px #000; }
.plinth--dark::before { background: #4a3d35; }
.stopper {
  position: absolute; z-index: 2; left: var(--mx, 50%); top: var(--my, 6%);
  width: calc(var(--mw, 60px) * 1.02); height: calc(var(--mw, 60px) * 0.5);
  transform: translate(-50%, -66%);
  border: 0; padding: 0; cursor: pointer;
  border-radius: 50% 50% 46% 46% / 72% 72% 28% 28%;
  background: radial-gradient(ellipse at 40% 30%, #d98a5c, #9c4a26 55%, #6e2f16);
  box-shadow: inset 0 -3px 0 rgba(0, 0, 0, 0.35), 0 3px 4px rgba(0, 0, 0, 0.45);
  display: grid; place-items: center;
}
.stopper span {
  display: grid; place-items: center; width: 52%; aspect-ratio: 1; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #f1d98f, #c9a24b 55%, #8c6b26);
  color: #5a3f10; font: 800 clamp(0.8rem, 3.6vw, 1.05rem)/1 var(--f-display);
  box-shadow: inset 0 -2px 0 rgba(0, 0, 0, 0.25), 0 1px 2px rgba(0, 0, 0, 0.4);
  animation: sealGlow 3.2s ease-in-out infinite;
}
@keyframes sealGlow { 50% { box-shadow: inset 0 -2px 0 rgba(0, 0, 0, 0.25), 0 0 14px rgba(255, 220, 140, 0.75); } }
.seal-tag {
  position: absolute; z-index: 2; left: calc(var(--mx, 50%) + var(--mw, 60px) * 1.05); top: calc(var(--my, 6%) + var(--mw, 60px) * 0.55);
  padding: 7px 10px 6px; transform: rotate(9deg); transform-origin: 0 0;
  background: #efe2c4 var(--tex-grain); color: var(--black); border-radius: 2px 8px 8px 2px;
  font: 800 0.66rem/1.15 var(--f-display); letter-spacing: 0.18em; text-transform: uppercase; text-align: center;
  box-shadow: 0 6px 10px -4px rgba(0, 0, 0, 0.6);
  animation: tagSwing 5s ease-in-out infinite;
}
.seal-tag small { font: italic 500 0.84rem/1.1 var(--f-body); letter-spacing: 0; text-transform: none; color: #5a4d43; }
.seal-tag::before {
  content: ""; position: absolute; right: 100%; top: 50%; width: calc(var(--mw, 60px) * 0.55); height: 1.5px; background: #b89a63; transform-origin: 100% 50%; transform: rotate(-36deg);
}
@keyframes tagSwing { 50% { transform: rotate(4deg); } }
.scroll-peek {
  position: absolute; z-index: 2; left: var(--mx, 50%); top: var(--my, 6%);
  width: calc(var(--mw, 60px) * 0.52); height: calc(var(--mw, 60px) * 1.05);
  transform: translate(-50%, -86%); padding: 0; border: 0; background: none; cursor: pointer;
  animation: bob 2.6s ease-in-out infinite;
}
.scroll-roll {
  display: block; width: 100%; height: 100%; position: relative;
  background: linear-gradient(90deg, #a98a55, #f3e5c2 34%, #e4cf9f 62%, #9d7f4b);
  border-radius: 40% 40% 6px 6px / 12% 12% 6px 6px;
  box-shadow: inset 0 -10px 10px -6px rgba(0, 0, 0, 0.45);
}
.scroll-roll::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 22%; border-radius: 50%; background: radial-gradient(ellipse, #8f7444 0 18%, #e9d7ad 20% 40%, #b49460 42% 60%, #f1e2bd 62%); }
.scroll-roll::after { content: ""; position: absolute; left: -6%; right: -6%; top: 46%; height: 12%; background: linear-gradient(#f1d98f, #c9a24b 60%, #8c6b26); box-shadow: 0 1px 2px rgba(0, 0, 0, 0.4); }
@keyframes bob { 50% { transform: translate(-50%, -96%); } }
.is-open .scroll-peek { animation: pullOut 0.8s cubic-bezier(0.5, 0, 0.3, 1) forwards; }
@keyframes pullOut { 40% { transform: translate(-50%, -140%) rotate(-4deg); opacity: 1; } 100% { transform: translate(-50%, -230%) rotate(-10deg) scale(1.1); opacity: 0; } }
.letter-label .label { margin: 0 auto; }
.letter-actions { display: flex; flex-direction: column; align-items: center; gap: 4px; color: #efe4d0; }
.letter-wait { display: flex; gap: 12px; align-items: center; max-width: 27rem; margin: 0; font-style: italic; color: #eadcc4; }
.wax {
  flex: none; display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #c84a33, #7d1d12 70%); color: #f6c9a9;
  font: 800 1rem/1 var(--f-display); font-style: normal; box-shadow: 0 2px 5px rgba(0, 0, 0, 0.55), inset 0 0 0 3px rgba(0, 0, 0, 0.12);
}

/* the papyrus */
.papyrus { position: relative; max-width: 42rem; margin: 40px auto 0; }
.papyrus[hidden] { display: none; }
.rod {
  position: relative; z-index: 2; height: 22px; margin: 0 -12px; border-radius: 11px;
  background: linear-gradient(#6e5020, #e9cf85 32%, #c9a24b 55%, #6e5020);
  box-shadow: 0 5px 10px rgba(0, 0, 0, 0.45);
}
.rod::before, .rod::after {
  content: ""; position: absolute; top: -5px; width: 22px; height: 32px; border-radius: 6px;
  background: linear-gradient(90deg, #5a3f10, #c9a24b 50%, #5a3f10);
}
.rod::before { left: -14px; }
.rod::after { right: -14px; }
.papyrus-sheet {
  position: relative; overflow: hidden;
  background:
    var(--tex-grain),
    repeating-linear-gradient(90deg, rgba(120, 90, 40, 0.035) 0 1px, transparent 1px 7px, rgba(120, 90, 40, 0.025) 7px 9px, transparent 9px 17px),
    repeating-linear-gradient(0deg, rgba(120, 90, 40, 0.04) 0 2px, transparent 2px 23px),
    linear-gradient(90deg, #dfc99a, var(--papyrus) 12%, #f1e5c8 50%, var(--papyrus) 88%, #dcc595);
  box-shadow: inset 0 14px 16px -12px rgba(60, 35, 10, 0.5), inset 0 -14px 16px -12px rgba(60, 35, 10, 0.5);
}
.papyrus-text { padding: clamp(26px, 6vw, 56px) clamp(22px, 6.5vw, 64px); font-size: 1.22rem; line-height: 1.72; color: #2a1f16; }
.papyrus-text p { margin: 0 0 1em; }
.greeting { font: italic 500 1.7rem/1.2 var(--f-body); margin: 0 0 0.9rem; color: #3a2817; outline: none; }
.greeting + p::first-letter { float: left; font: 700 3.3em/0.82 var(--f-display); margin: 0.07em 0.1em 0 0; color: var(--terracotta-deep); }
.signoff { margin-top: 1.5em !important; margin-bottom: 0.1em !important; font-style: italic; }
.signature { font: italic 600 2.2rem/1 var(--f-body); color: var(--terracotta-deep); margin: 0 !important; }
.papyrus.is-unrolling .rod--top { animation: rodGlow 1.5s; }
@keyframes rodGlow { 40% { filter: brightness(1.25); } }
.letter-images { max-width: 42rem; margin: 30px auto 0; }
.images-title { font: 700 0.78rem var(--f-display); letter-spacing: 0.24em; text-transform: uppercase; color: var(--gold-light); text-align: center; }
.images-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; }
.doc { padding: 6px; border: 0; background: #efe2c4; cursor: zoom-in; box-shadow: 0 10px 18px -10px #000; }
.doc img { display: block; width: 100%; height: auto; }

/* =========================================================
   ANNEXE: THE ARCHIVE
   ========================================================= */
.room--archive { background: var(--marble-2) var(--tex-marble) center / 480px; --room-key: var(--key-clay); }
.index-cards { list-style: none; margin: 0 auto; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 18px; max-width: 980px; }
.index-card {
  position: relative; padding: 14px 18px 12px; cursor: pointer;
  background: #fdfaf2 repeating-linear-gradient(transparent 0 27px, rgba(120, 160, 190, 0.35) 27px 28px) 0 34px;
  border-top: 3px solid rgba(200, 80, 70, 0.55);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.15), 0 12px 20px -14px rgba(40, 20, 5, 0.6);
  transform: rotate(var(--tilt, 0deg));
  transition: transform 0.25s;
}
.index-card:hover { transform: rotate(0deg) translateY(-3px); }
.index-card.nudge { animation: nudge 0.45s; }
@keyframes nudge { 30% { transform: rotate(calc(var(--tilt) * -1.4)) translateY(-6px); } }
.ic-no { margin: 0 0 4px; font: 700 0.68rem/1 var(--f-display); letter-spacing: 0.22em; color: var(--terracotta-deep); }
.ic-name { margin: 0; font: 600 1.35rem/1.2 var(--f-body); padding-right: 64px; }
.ic-meta { margin: 0; font-style: italic; color: #5a4d43; }
.ic-att { margin: 2px 0 0; font-size: 1rem; }
.ic-stamp {
  position: absolute; right: 12px; top: 12px; transform: rotate(11deg); padding: 3px 6px 2px; border-radius: 3px;
  border: 2px solid rgba(156, 74, 38, 0.75); color: rgba(156, 74, 38, 0.85);
  font: 800 0.66rem/1 var(--f-display); letter-spacing: 0.2em; text-transform: uppercase;
}

/* =========================================================
   EXIT
   ========================================================= */
.room--exit { background: var(--marble) var(--tex-marble) center / 480px; }
.poster {
  max-width: 30rem; margin: 0 auto; padding: 16px 18px 22px; text-align: center;
  background: var(--terracotta) var(--tex-grain);
  border: 5px solid var(--black); outline: 2px solid var(--black); outline-offset: 5px;
  box-shadow: 0 24px 40px -26px rgba(40, 20, 5, 0.9);
}
.poster-art { display: block; width: 100%; height: auto; }
.poster-kicker { margin: 10px 0 0; font: 700 0.74rem/1 var(--f-display); letter-spacing: 0.32em; text-transform: uppercase; }
.poster-title { margin: 0.12em 0 0.1em; font: 900 clamp(3rem, 15vw, 5.2rem)/1 var(--f-display); letter-spacing: 0.05em; }
.poster-sub { margin: 0; font: italic 500 1.3rem/1.3 var(--f-body); }
.poster-dates { margin: 10px 0 0; font: 700 0.7rem/1.4 var(--f-display); letter-spacing: 0.22em; text-transform: uppercase; }
.exit-notes { max-width: 34rem; margin: 34px auto 0; text-align: center; font-size: 1.15rem; }
.giftshop .sign {
  display: inline-block; margin: 0 0.35em 0.3em 0; padding: 6px 10px 5px; vertical-align: 2px;
  background: var(--black); color: var(--gold-light);
  font: 700 0.68rem/1 var(--f-display); letter-spacing: 0.2em; text-transform: uppercase;
}

/* ---------- colophon ---------- */
.colophon { background: var(--black); color: #e8ddca; text-align: center; padding: 34px var(--gutter) max(40px, env(safe-area-inset-bottom)); font-size: 1.05rem; }
.olive-rule { display: flex; justify-content: center; gap: 0; margin: 0 auto 14px; max-width: 420px; }
.olive-rule .olive { width: 50%; }
.olive-rule .olive:last-child { transform: scaleX(-1); }
.colophon-main { font: 700 0.8rem var(--f-display); letter-spacing: 0.3em; text-transform: uppercase; color: var(--gold-light); }
.colophon .link-btn { color: var(--gold-light); }

/* ---------- viewer ---------- */
.viewer { border: 0; padding: 0; background: transparent; width: min(94vw, 1000px); max-width: none; max-height: 94svh; overflow: visible; }
.viewer::backdrop { background: rgba(18, 12, 8, 0.86); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.viewer-inner {
  position: relative; display: grid; gap: 14px; padding: 14px; max-height: 94svh; overflow: auto;
  background: var(--marble) var(--tex-marble) center / 480px; border-radius: 3px;
  box-shadow: 0 30px 60px -20px #000;
}
.viewer-art { display: grid; place-items: center; min-width: 0; }
.viewer-art img { display: block; max-width: 100%; max-height: 66svh; width: auto; height: auto; object-fit: contain; }
.viewer-art .pinax { max-height: 70svh; max-width: 100%; }
.viewer-art .pinax--port { height: 66svh; max-height: 66svh; width: auto; }
.viewer-art .pinax--land { width: 100%; height: auto; }
.viewer-art .coin { width: min(72vw, 360px); }
.viewer-art .ostracon { width: min(86vw, 560px); }
.viewer-label .label { max-width: none; box-shadow: none; }
.viewer-close {
  position: absolute; right: 8px; top: 8px; z-index: 3; width: 44px; height: 44px; border-radius: 50%;
  border: 0; background: var(--black); color: var(--gold-light); cursor: pointer; display: grid; place-items: center;
}
.viewer-close svg { width: 18px; height: 18px; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; }
body.viewing { overflow: hidden; }

/* =========================================================
   WIDER SCREENS
   ========================================================= */
@media (min-width: 640px) {
  .olive-deco { width: 280px; }
  .olive-deco--l { left: -30px; top: 70px; transform: rotate(-12deg); }
  .olive-deco--r { right: -30px; top: 70px; transform: scaleX(-1) rotate(-12deg); }
  .shields li { width: 128px; }
}
@media (min-width: 900px) {
  .entrance-inner {
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
    grid-template-areas: "words vase" "ticket vase";
    align-items: center; column-gap: 40px; row-gap: 26px;
    padding-top: 56px; padding-bottom: 64px; min-height: min(92vh, 860px);
  }
  .entrance-words { align-self: end; }
  .stele-text { min-height: 1.3em; }
  .amphora-wrap { width: 320px; }
  .ticket { align-self: start; }
  .vase-stage { height: min(68vh, 600px); }
  .olive-deco { width: 340px; }
  .olive-deco--l { left: -40px; top: 34px; }
  .olive-deco--r { right: auto; left: 31%; top: auto; bottom: -30px; transform: rotate(-4deg); }
  .dig-layout { grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr); align-items: start; gap: 36px; }
  .dig-side { position: sticky; top: 70px; }
  .cello-layout { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: center; gap: 48px; }
  .cello-words { align-items: flex-start; }
  .cello-buttons { justify-content: flex-start; }
  .cafe-layout { grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); align-items: center; gap: 40px; }
  .cafe-words { align-items: flex-start; }
  .cafe-controls { align-items: flex-start; text-align: left; }
  .shields { gap: 22px; }
  .shields li { width: 120px; }
  .viewer-inner { grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); align-items: center; padding: 22px; }
  .viewer-art .pinax--port { height: 80svh; max-height: 80svh; }
  .viewer-art img { max-height: 80svh; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; animation-delay: 0s !important; transition-duration: 0.01ms !important; transition-delay: 0s !important; }
  .will-reveal { opacity: 1; transform: none; }
}
