/* One Letter — letterpress luxury. Paper, ink, gold foil. */

:root {
  --paper: #ededef;
  --paper-hi: #f7f7f9;
  --ink: #800c1b;
  --ink-soft: #800c1b;
  --ink-faint: #8a8070;
  --gold-dk: #800c1b;
  --gold: #b92e51;
  --gold-hi: #e28aa0;
  --wine: #7a2e2e;
  --cell: clamp(64px, 21.5vw, 104px);
  --key-h: 52px;
  --foil: linear-gradient(160deg, #800c1b 0%, #800c1b 38%, #800c1b 50%, #800c1b 62%, #800c1b 100%);
}

* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }

html { -webkit-text-size-adjust: 100%; }

body {
  font-family: "Libre Franklin", "Franklin Gothic Medium", sans-serif;
  background: var(--paper);
  color: var(--ink);
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: max(10px, env(safe-area-inset-top)) 14px max(18px, env(safe-area-inset-bottom));
  overflow-x: hidden;
}

/* Paper atmosphere: vignette + grain */
.paper {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(120% 90% at 50% 0%, var(--paper-hi) 0%, transparent 55%),
    radial-gradient(130% 110% at 50% 108%, #dadadc 0%, transparent 60%),
    var(--paper);
}
.paper::after {
  content: ""; position: absolute; inset: 0; opacity: .5; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3CfeColorMatrix values='0 0 0 0 0.72 0 0 0 0 0.68 0 0 0 0 0.58 0 0 0 0.05 0'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- Masthead ---------- */
.masthead { text-align: center; width: min(430px, 100%); animation: rise .7s ease both; }
.mast-rule { height: 2px; background: var(--ink); margin: 2px 0 1px; }
.mast-rule.double { height: 0; border-top: 1px solid var(--ink); border-bottom: 3px solid var(--ink); padding-top: 2px; margin-bottom: 8px; }
.mast-title {
  font-family: "Newsreader", Georgia, serif;
  font-weight: 800;
  font-size: clamp(2.2rem, 10.5vw, 3.1rem);
  letter-spacing: .05em;
  line-height: 1.04;
  padding: 5px 0 2px;
  user-select: none;
  white-space: nowrap;
}
.mast-title .mast-gap { display: inline-block; width: .38em; }
.gold-ink, .mast-title .gold-letter {
  background: var(--foil);
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
}
.byline { font-size: .82rem; letter-spacing: .02em; color: var(--ink-soft); }
.byline strong { color: var(--ink); }
.edition {
  font-family: "Newsreader", Georgia, serif; font-style: italic;
  font-size: .9rem; color: var(--ink-soft); margin-top: 2px;
}
.mast-nav { display: flex; justify-content: center; align-items: center; gap: 10px; row-gap: 2px; margin-top: 8px; flex-wrap: wrap; }
.mast-nav .text-btn, .mast-nav .chip { white-space: nowrap; }
.text-btn {
  background: none; border: none; cursor: pointer;
  font: 600 .8rem "Libre Franklin", sans-serif; letter-spacing: .08em; text-transform: uppercase;
  color: var(--ink); border-bottom: 2px solid var(--gold); padding: 4px 2px;
  min-height: 32px;
}
.text-btn:hover { color: var(--gold-dk); }
.dot-sep::before { content: "\2022"; color: var(--ink-faint); }
.chip { font-size: .8rem; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-soft); }
.chip strong { font-size: 1rem; color: var(--gold-dk); display: inline-block; }
.chip strong.pop { animation: stamp .4s ease; }

/* ---------- Game column ---------- */
.game { width: min(430px, 100%); display: flex; flex-direction: column; align-items: center; }

/* Gold tracker */
.tracker { display: flex; gap: 10px; margin: 8px 0 2px; animation: rise .7s .08s ease both; }
.slot {
  width: 40px; height: 48px;
  border: 2px solid var(--ink); background: var(--paper-hi);
  display: grid; place-items: center;
  font: 900 1.5rem "Libre Franklin", sans-serif;
  box-shadow: inset 0 2px 5px rgba(128,12,27, .08);
  position: relative;
}
.slot::after {
  content: ""; position: absolute; left: 6px; right: 6px; bottom: 6px;
  border-bottom: 2px solid rgba(128,12,27, .18);
}
.slot.filled { border-color: var(--gold-dk); background: #ececee; }
.slot.filled::after { display: none; }
.slot.filled span {
  background: var(--foil); -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: stamp .45s cubic-bezier(.2, 1.6, .4, 1) both;
}

/* Clue card */
.clue-card { text-align: center; margin: 6px 0 2px; min-height: 72px; width: 100%; animation: rise .7s .16s ease both; }
.clue-label {
  font: 700 .72rem "Libre Franklin", sans-serif; letter-spacing: .22em; text-transform: uppercase;
  color: var(--gold-dk); margin-bottom: 4px;
}
.clue-label::before, .clue-label::after { content: "—"; color: var(--gold); margin: 0 8px; }
.clue-text {
  font-family: "Newsreader", Georgia, serif; font-style: italic; font-weight: 600;
  font-size: clamp(1.4rem, 6vw, 1.75rem); line-height: 1.22; color: var(--ink);
  text-wrap: balance;
}

/* Answer banner */
.banner {
  height: 34px; display: flex; align-items: center; justify-content: center; gap: 10px;
  opacity: 0; transform: translateY(6px); transition: opacity .3s, transform .3s;
  font-family: "Newsreader", Georgia, serif;
}
.banner.show { opacity: 1; transform: none; }
#banner-word { font-weight: 800; font-size: 1.3rem; letter-spacing: .14em; }
.banner-dir {
  font: 700 .68rem "Libre Franklin", sans-serif; letter-spacing: .22em; text-transform: uppercase;
  color: var(--paper-hi); background: var(--ink); padding: 3px 8px 2px;
}

/* Master Bonus entry */
.bonus-row[hidden] { display: none; }
.bonus-row {
  display: flex; align-items: center; gap: 8px; margin: 2px 0 8px;
  animation: rise .45s ease both;
}
.bslot {
  width: 44px; height: 52px;
  border: 2px solid var(--gold-dk); background: #ececee;
  display: grid; place-items: center;
  font: 900 1.6rem "Libre Franklin", sans-serif;
  box-shadow: inset 0 2px 5px rgba(128,12,27, .14);
}
.bslot span { background: var(--foil); -webkit-background-clip: text; background-clip: text; color: transparent; }
.bonus-row.wrong { animation: shake .4s ease; }
.bonus-del {
  width: 44px; height: 52px; font-size: 1.3rem;
  background: var(--paper-hi); border: 1.5px solid var(--ink); border-bottom-width: 3.5px;
  cursor: pointer; color: var(--ink);
}
.bonus-del:disabled { opacity: .35; cursor: default; }
.bonus-reveal { margin-left: 2px; }

/* ---------- Grid ---------- */
.grid-wrap { position: relative; margin: 4px 0 6px; animation: rise .7s .24s ease both; }
.grid {
  display: grid; grid-template-columns: repeat(3, var(--cell));
  border: 3px solid var(--ink);
  box-shadow: 6px 7px 0 rgba(128,12,27, .14), inset 0 0 0 1px rgba(128,12,27, .25);
  background: var(--ink);
  gap: 2px;
}
.cellbox {
  width: var(--cell); height: var(--cell);
  background: linear-gradient(170deg, #fafafc 0%, #ececee 100%);
  display: grid; place-items: center; position: relative;
  font: 900 calc(var(--cell) * .58) "Libre Franklin", sans-serif;
  color: var(--ink); cursor: pointer; border: none; padding: 0;
  transition: background .15s;
  touch-action: manipulation;
}
.cellbox:hover:not(.locked) { background: #f0f0f2; }
.cellbox:focus-visible { outline: 3px solid var(--gold); outline-offset: -3px; }
.cellbox.sel { background: #e0e0e2; box-shadow: inset 0 0 0 4px var(--gold); animation: selpulse 1.6s ease-in-out infinite; }
.cellbox.hl:not(.sel):not(.locked) { background: #efeff1; }
@keyframes selpulse {
  0%, 100% { box-shadow: inset 0 0 0 4px var(--gold); }
  50% { box-shadow: inset 0 0 0 4px var(--gold-hi); }
}
.cellbox.locked {
  cursor: default;
  background: linear-gradient(170deg, #ededef, #dfdfe1);
}
.cellbox.locked .glyph {
  background: var(--foil); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.cellbox .glyph { display: block; animation: settle .3s ease both; }
.cellbox.lockpop .glyph { animation: stamp .5s cubic-bezier(.2, 1.6, .4, 1) both; }
.cellbox.snap { animation: shake .4s ease; }
.cellbox.snap .glyph { color: var(--wine); }

/* Toast */
.toast {
  position: absolute; left: 50%; bottom: -8px; transform: translate(-50%, 100%);
  background: var(--ink); color: var(--paper-hi);
  font: 600 .85rem "Libre Franklin", sans-serif; letter-spacing: .04em;
  padding: 8px 16px; white-space: nowrap;
  opacity: 0; transition: opacity .25s; pointer-events: none; z-index: 5;
}
.toast.show { opacity: 1; }
.toast.goldline { background: var(--gold-dk); }

/* Hints */
.hint-row { display: flex; align-items: center; gap: 10px; margin: 10px 0 4px; flex-wrap: wrap; justify-content: center; animation: rise .7s .3s ease both; }
.hint-btn {
  font: 600 .74rem "Libre Franklin", sans-serif; letter-spacing: .1em; text-transform: uppercase;
  background: none; border: 1.5px solid var(--ink-soft); color: var(--ink-soft);
  padding: 9px 13px; cursor: pointer; min-height: 40px;
}
.hint-btn:hover:not(:disabled) { border-color: var(--gold-dk); color: var(--gold-dk); }
.hint-btn:disabled { opacity: .35; cursor: default; }
.hint-note { width: 100%; text-align: center; font-size: .7rem; color: var(--ink-faint); letter-spacing: .04em; }

/* ---------- Keyboard ---------- */
.keyboard { width: 100%; max-width: 430px; user-select: none; animation: rise .7s .36s ease both; }
.kb-row { display: flex; justify-content: center; gap: 5px; margin-bottom: 6px; }
.keyboard { margin-top: 2px; }
.key {
  flex: 1 1 0; max-width: 46px; height: var(--key-h); min-width: 28px;
  font: 800 1.25rem "Libre Franklin", sans-serif; text-transform: uppercase;
  background: var(--paper-hi); color: var(--ink);
  border: 1.5px solid var(--ink); border-bottom-width: 3.5px;
  cursor: grab; touch-action: none; user-select: none;
  transition: transform .06s, background .12s;
}
.key:active { transform: translateY(2px); border-bottom-width: 1.5px; background: #e0e0e2; }
.key:focus-visible { outline: 3px solid var(--gold); outline-offset: 1px; }

/* ---------- Colophon ---------- */
.colophon { text-align: center; margin-top: 22px; font-size: .78rem; color: var(--ink-soft); line-height: 1.7; }
.colophon .fine { font-size: .68rem; color: var(--ink-faint); letter-spacing: .05em; margin-top: 4px; }

/* ---------- Modals ---------- */
.modal-veil[hidden] { display: none; }
.modal-veil {
  position: fixed; inset: 0; z-index: 50;
  background: rgba(128,12,27, .55);
  display: flex; align-items: center; justify-content: center; padding: 18px;
}
.modal {
  background: var(--paper-hi); color: var(--ink);
  width: min(420px, 100%); max-height: 88svh; overflow-y: auto;
  padding: 26px 24px 22px; position: relative;
  border: 2px solid var(--ink);
  box-shadow: 8px 9px 0 rgba(128,12,27, .3);
  animation: rise .35s ease both;
}
.modal-x {
  position: absolute; top: 8px; right: 10px;
  background: none; border: none; font-size: 1.7rem; line-height: 1;
  color: var(--ink-soft); cursor: pointer; padding: 6px 8px; min-height: 44px; min-width: 44px;
}
.modal-title {
  font-family: "Newsreader", Georgia, serif; font-weight: 800;
  font-size: 1.6rem; text-align: center; margin-bottom: 14px;
}
.howto-list { padding-left: 20px; display: grid; gap: 10px; font-size: .95rem; line-height: 1.5; }
.howto-fine { font-size: .8rem; color: var(--ink-soft); margin: 14px 0 16px; line-height: 1.55; }
.primary-btn {
  display: block; width: 100%;
  font: 700 .9rem "Libre Franklin", sans-serif; letter-spacing: .14em; text-transform: uppercase;
  background: var(--ink); color: var(--paper-hi);
  border: none; border-bottom: 3px solid var(--gold-dk);
  padding: 14px; cursor: pointer; min-height: 48px;
}
.primary-btn:hover { background: #800c1b; }

/* Win modal */
.win-modal { text-align: center; }
.win-grid {
  display: grid; grid-template-columns: repeat(3, 46px); gap: 2px;
  background: var(--ink); border: 2px solid var(--ink);
  width: max-content; margin: 0 auto 12px;
}
.win-grid .wcell {
  width: 46px; height: 46px; background: #fafafc;
  display: grid; place-items: center; font: 900 1.25rem "Libre Franklin", sans-serif;
}
.win-grid .wcell.g {
  background: #eaeaec;
}
.win-grid .wcell.g span {
  background: var(--foil); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.finale-line {
  font-family: "Newsreader", Georgia, serif; font-style: italic;
  font-size: 1.05rem; color: var(--ink-soft); margin: 6px 0 10px;
}
.gold-word { display: flex; justify-content: center; gap: 8px; margin-bottom: 16px; min-height: 56px; }
.gold-word b {
  width: 44px; height: 54px; border: 2px solid var(--gold-dk); background: #ececee;
  display: grid; place-items: center; font: 900 1.7rem "Libre Franklin", sans-serif;
}
.gold-word b span {
  background: var(--foil); -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: stamp .5s cubic-bezier(.2, 1.6, .4, 1) both;
}
.bonus-note {
  font: 700 .74rem "Libre Franklin", sans-serif; letter-spacing: .16em; text-transform: uppercase;
  color: var(--gold-dk); margin: -4px 0 12px;
}
.win-stats { display: flex; justify-content: center; gap: 22px; margin-bottom: 16px; }
.win-stats div { display: grid; gap: 2px; }
.win-stats strong { font-size: 1.5rem; font-weight: 900; }
.win-stats span { font-size: .64rem; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-soft); }
.next-drop { margin-top: 12px; font-size: .78rem; color: var(--ink-soft); letter-spacing: .04em; }
#countdown { font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; }

/* Pencil + one-shot lock */
.cellbox.pencil { background: #ededef; box-shadow: inset 0 0 0 3px var(--gold); }
.cellbox.pencil .glyph { color: #800c1b; opacity: .85; }
.lock-row[hidden] { display: none; }
.lock-row { display: flex; gap: 12px; align-items: center; justify-content: center; margin: 4px 0 2px; animation: rise .3s ease both; }
.lock-btn {
  font: 800 .92rem "Libre Franklin", sans-serif; letter-spacing: .12em; text-transform: uppercase;
  background: var(--ink); color: var(--paper-hi);
  border: none; border-bottom: 4px solid var(--gold-dk);
  padding: 13px 26px; cursor: pointer; min-height: 48px;
}
.lock-btn:hover { background: #800c1b; }
.cellbox.locked.miss { background: #e4e4e6; }
.cellbox.locked.miss .glyph { background: none; color: #800c1b; }

/* Penalty pips: three brass marks per clue; a break spends one */
.pips { display: flex; justify-content: center; gap: 7px; margin-top: 7px; min-height: 10px; }
.pips i {
  width: 10px; height: 10px; background: var(--gold); border: 1px solid var(--gold-dk);
  transform: rotate(45deg); transition: opacity .25s, background .25s;
}
.pips i.spent { background: transparent; opacity: .3; }

/* Floating score numbers */
.float-pts {
  position: fixed; z-index: 90; pointer-events: none;
  transform: translate(-50%, 0);
  font: 900 1.6rem "Libre Franklin", sans-serif;
  background: var(--foil); -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: floatup 1s ease-out both;
}
.float-pts.bad { background: none; color: var(--wine); font-size: 1.2rem; }
@keyframes floatup {
  0% { opacity: 0; translate: 0 10px; }
  20% { opacity: 1; }
  100% { opacity: 0; translate: 0 -46px; }
}

/* The Finale: rung five gets its own dress */
.grid.finale { border-color: var(--gold-dk); box-shadow: 6px 7px 0 rgba(128,12,27, .35), 0 0 0 3px rgba(128,12,27, .25), inset 0 0 0 1px rgba(128,12,27, .25); }

/* Win-screen lines */
.pct-line { font: 700 .95rem "Libre Franklin", sans-serif; color: var(--gold-dk); margin: -4px 0 8px; min-height: 0; }
.settings-row {
  display: flex; justify-content: space-between; align-items: center;
  border: 1.5px solid var(--ink-soft); padding: 8px 14px; margin-bottom: 4px;
  font-size: .95rem;
}
.stats-toggle { display: block; margin: 12px auto 0; }
#more-stats { margin-top: 12px; }
.dist { display: grid; gap: 4px; margin: 10px auto 14px; max-width: 280px; }
.dist-row { display: grid; grid-template-columns: 34px 1fr 26px; gap: 8px; align-items: center; }
.dist-label { font: 700 .72rem "Libre Franklin", sans-serif; color: var(--ink-soft); text-align: right; }
.dist-track { background: #e0e0e2; height: 14px; border: 1px solid #cbcbcd; }
.dist-bar { height: 100%; background: var(--foil); min-width: 2px; }
.dist-count { font: 700 .72rem "Libre Franklin", sans-serif; text-align: left; }
.arch-link { color: var(--gold-dk); font-weight: 700; }
.week-line { font-size: .85rem; color: var(--ink-soft); margin-bottom: 4px; }
.week-line.perfect { color: var(--gold-dk); font-weight: 800; letter-spacing: .04em; }
.vault-line { font-size: .8rem; color: var(--ink-soft); margin-bottom: 10px; letter-spacing: .06em; }

/* Drag-to-place */
.drag-ghost {
  position: fixed; z-index: 99; pointer-events: none;
  transform: translate(-50%, -115%);
  width: 56px; height: 62px; display: grid; place-items: center;
  font: 900 2rem "Libre Franklin", sans-serif; text-transform: uppercase;
  background: #ededef; border: 2.5px solid var(--gold-dk);
  box-shadow: 4px 6px 0 rgba(128,12,27, .25);
}
.drag-ghost span {
  background: var(--foil); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.cellbox.droptgt { background: #e0e0e2; box-shadow: inset 0 0 0 4px var(--gold-dk); }
.bonus-row.droptgt .bslot { background: #dadadc; }

/* ---------- v2: nudge, steps, help, score ---------- */
.nudge { font-size: .86rem; color: var(--ink-soft); margin: 2px 0 0; text-align: center; min-height: 1.2em; }
.nudge[hidden] { display: none; }
.nudge.lead {
  font-family: "Newsreader", Georgia, serif; font-size: 1.02rem; line-height: 1.35;
  color: var(--ink); background: #ececee; border: 1.5px solid var(--gold-dk);
  padding: 8px 14px; margin: 2px 0 4px; max-width: 420px;
}

.howto-lead {
  font-family: "Newsreader", Georgia, serif; font-size: 1.15rem; line-height: 1.4;
  text-align: center; border: 2px solid var(--gold-dk); background: #ececee;
  padding: 10px 14px; margin-bottom: 14px;
}
.howto-steps { list-style: none; display: grid; gap: 14px; margin: 4px 0 2px; }
.howto-steps li { display: grid; grid-template-columns: 38px 1fr; gap: 12px; align-items: start; font-size: 1.02rem; line-height: 1.5; }
.step-n {
  width: 34px; height: 34px; border: 2px solid var(--gold-dk); background: #ececee;
  display: grid; place-items: center; font: 800 1.1rem "Newsreader", Georgia, serif; color: var(--gold-dk);
}

.help-modal { max-width: 480px; }
.help-h {
  font-family: "Newsreader", Georgia, serif; font-size: 1.12rem; font-weight: 800;
  border-bottom: 2px solid var(--gold); padding-bottom: 3px; margin: 18px 0 8px;
}
.help-p { font-size: .96rem; line-height: 1.6; margin-bottom: 8px; }
.score-table { width: 100%; border-collapse: collapse; margin: 6px 0 10px; }
.score-table td { padding: 7px 4px; border-bottom: 1px solid #ceced0; font-size: .96rem; }
.score-table td:last-child { text-align: right; font-variant-numeric: tabular-nums; }
.score-table tr.total td { border-top: 2px solid var(--ink); border-bottom: none; font-weight: 700; }
.brain-list { padding-left: 18px; display: grid; gap: 9px; font-size: .95rem; line-height: 1.55; }
.cite-list { padding-left: 18px; display: grid; gap: 9px; font-size: .88rem; line-height: 1.55; color: var(--ink-soft); }
.cite-list strong, .brain-list strong { color: var(--ink); }
.help-fine { font-size: .85rem; font-style: italic; color: var(--ink-soft); margin: 12px 0 16px; }

.score-break { margin: 0 auto 14px; border-collapse: collapse; min-width: 230px; }
.score-break td { padding: 4px 10px; font-size: .92rem; }
.score-break td:last-child { text-align: right; font-variant-numeric: tabular-nums; font-weight: 700; }
.score-break tr.sb-total td { border-top: 2px solid var(--ink); font-weight: 900; font-size: 1.05rem; }
.score-break tr.sb-rwiq td {
  background: var(--foil); -webkit-background-clip: text; background-clip: text; color: transparent;
  font-weight: 900; font-size: 1.05rem;
}

/* ---------- Utility & motion ---------- */
.sr-only {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}
.noscript { text-align: center; padding: 30px; font-size: 1rem; }

@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes stamp {
  0% { transform: scale(1.7) rotate(-4deg); opacity: 0; }
  60% { opacity: 1; }
  100% { transform: scale(1) rotate(0); opacity: 1; }
}
@keyframes settle { from { transform: scale(.7); opacity: .2; } to { transform: scale(1); opacity: 1; } }
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-7px); }
  45% { transform: translateX(6px); }
  70% { transform: translateX(-4px); }
  90% { transform: translateX(2px); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-delay: 0s !important; transition-duration: .01ms !important; }
}

/* Portrait phones: the whole game fits one screen, no scroll */
@media (max-width: 480px) {
  :root { --key-h: 46px; }
  body { padding-top: max(6px, env(safe-area-inset-top)); }
  .mast-rule.double { margin-bottom: 5px; }
  .byline { font-size: .74rem; }
  .edition { font-size: .82rem; }
  .mast-nav { margin-top: 4px; }
  .tracker { margin: 9px 0 2px; gap: 8px; }
  .slot { width: 36px; height: 43px; font-size: 1.3rem; }
  .clue-card { min-height: 66px; margin: 8px 0 0; }
  .clue-text { font-size: clamp(1.1rem, 4.9vw, 1.3rem); }
  .banner { height: 27px; }
  #banner-word { font-size: 1.1rem; }
  .grid-wrap { margin: 2px 0 6px; }
  .hint-row { margin: 8px 0 2px; gap: 8px; }
  .hint-btn { padding: 7px 10px; min-height: 36px; font-size: .68rem; }
  .hint-note { font-size: .64rem; }
  .colophon { margin-top: 12px; font-size: .7rem; line-height: 1.5; }
}

/* Short portrait phones (iPhone SE class): everything still fits one screen */
@media (max-height: 740px) and (orientation: portrait) {
  :root { --cell: clamp(56px, 18.5vw, 86px); --key-h: 42px; }
  .mast-title { font-size: clamp(1.7rem, 8.5vw, 2.2rem); padding: 3px 0 1px; }
  .byline { display: none; }
  .edition { font-size: .74rem; }
  .tracker { margin: 5px 0 1px; }
  .slot { width: 30px; height: 37px; font-size: 1.1rem; }
  .clue-card { min-height: 56px; margin: 4px 0 0; }
  .clue-text { font-size: clamp(1rem, 4.6vw, 1.2rem); }
  .nudge.lead { font-size: .88rem; padding: 6px 10px; }
  .banner { height: 22px; }
  .hint-row { margin: 6px 0 2px; }
  .hint-btn { padding: 6px 9px; min-height: 34px; font-size: .64rem; }
  .colophon { display: none; }
}

/* Short landscape phones: compress vertical rhythm */
@media (max-height: 640px) and (orientation: landscape) {
  :root { --cell: 64px; --key-h: 42px; }
  .mast-title { font-size: 1.9rem; padding: 2px 0; }
  .byline, .edition { display: none; }
  .clue-card { min-height: 60px; margin: 4px 0 0; }
  .tracker { margin: 6px 0 2px; }
  .colophon { display: none; }
}
