/* lastcall/css/lastcall.css - LAST CALL's page: the curtain, the door over the bar at closing time (tonight's case and
 * its suspects, the streak and the rank, PLAY, the four picture tiles, Mavis), the corner, a case (its bar, the painting
 * with its spots, Mavis's words, the panel of places, suspects and the notebook, the bar of tools), the sheets (a clue,
 * a pin, the lamp, the menu, How to play) and the rooms (Case Files, The Board, Your Office). The Herd's colours are
 * the house's gold, neon rose and teal on plum black; the Horde's toxic green and violet (html[data-side], set by
 * lastcall/js/lastcall-main.js).
 *
 * The series' rules, kept here from the first draw (docs/READABILITY.md, docs/HIDDEN-PUZZLE-STANDARD.md section 2,
 * docs/DUO-DEVELOPMENT-SPEC.md, docs/LESSONS-LEARNED.md UI-1, UI-3, UI-5, UI-8, UI-23): words never under 16 CSS px and
 * 18 for reading; every button 44 px or more (48 on a touch screen); a picture on the left of a button's words; nothing
 * lies on a button; every edge steps in past an iPhone's camera and rounded corners (env(safe-area-inset-*)); the 320
 * point iPhone fits.
 *
 * A CASE'S LAYOUT is one grid (#case): held upright the case's bar, the painting, Mavis's words, the panel and the bar
 * of tools, top to bottom; on a window wider than 1.1 times its height (the standard's rule) the words and tools down
 * the left and the painting on the right. lastcall-main.js sizes the painting into its box (#scene) at the zoom asked
 * for, and the box scrolls to look around. */
:root {
  --ink: #140A14;
  --glass: rgba(24, 12, 26, 0.86);
  --glass-2: rgba(40, 20, 42, 0.94);
  --line: rgba(242, 196, 109, 0.28);
  --text: #FFF6EC;
  --muted: #EAD6C8;
  --gold: #F2C46D;
  --rose: #FF5C7A;
  --teal: #5FD9CC;
  --shine: #FFE7A8;
  --paper: #F4E6C8;
  --font: 'Trebuchet MS', 'Lucida Grande', Verdana, sans-serif;
  --title-font: 'Palatino Linotype', 'Book Antiqua', Palatino, Georgia, serif;
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --edge-l: var(--sotc-edge-l, env(safe-area-inset-left, 0px));
  --edge-r: var(--sotc-edge-r, env(safe-area-inset-right, 0px));
  --tap: 48px;
  --col: 400px;
}
html[data-side="horde"] {
  --ink: #0B0712; --glass: rgba(16, 10, 26, 0.88); --glass-2: rgba(30, 18, 46, 0.94); --line: rgba(190, 160, 255, 0.28);
  --muted: #DCCFF0; --gold: #C9F27A; --rose: #B48CFF; --teal: #9CFF8A; --shine: #E7FFC0;
}
@media (pointer: fine) { :root { --tap: 44px; } }

html, body { margin: 0; padding: 0; height: 100%; background: var(--ink); color: var(--text); font-family: var(--font); overflow: hidden;
  -webkit-tap-highlight-color: transparent; -webkit-user-select: none; user-select: none; overscroll-behavior: none; -webkit-text-size-adjust: 100%; }
button { font-family: inherit; color: inherit; }
[hidden] { display: none !important; }
.lc-icon, .lc-svg { display: block; width: 100%; height: 100%; color: inherit; }

/* ---- the loading curtain ------------------------------------------------------------------------------------------- */
.curtain { position: fixed; inset: 0; z-index: 90; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px;
  background: radial-gradient(circle at 50% 40%, #3A1730 0%, var(--ink) 72%); transition: opacity 0.5s ease; }
html[data-side="horde"] .curtain { background: radial-gradient(circle at 50% 40%, #2A1C4A 0%, var(--ink) 72%); }
.curtain.is-gone { opacity: 0; }
.curtain-title { margin: 0; font-family: var(--title-font); font-weight: bold; letter-spacing: 0.3em; font-size: 30px; color: var(--gold); text-align: center;
  text-shadow: 0 0 18px rgba(255, 92, 122, 0.6); animation: neon 2.6s ease-in-out infinite; }
@keyframes neon { 0%, 100% { opacity: 1; } 46% { opacity: 1; } 48% { opacity: 0.55; } 50% { opacity: 1; } 52% { opacity: 0.7; } 54% { opacity: 1; } }
.curtain-bar { width: min(280px, 70vw); height: 8px; border-radius: 4px; background: rgba(255, 255, 255, 0.12); overflow: hidden; }
.curtain-bar span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--rose), var(--gold), var(--teal)); transition: width 0.4s ease; }
.curtain-line { margin: 0; color: var(--muted); font-size: 18px; }

/* ---- buttons and chips --------------------------------------------------------------------------------------------- */
.btn { appearance: none; min-height: var(--tap); border: 1px solid var(--line); background: var(--glass-2); color: var(--text); border-radius: 14px;
  padding: 10px 18px; font-size: 18px; font-weight: bold; cursor: pointer; transition: transform 0.12s ease, filter 0.12s ease; box-sizing: border-box; }
.btn:hover { filter: brightness(1.15); }
.btn:active { transform: scale(0.97); }
.btn-gold { border: 0; color: #2A1606; background: linear-gradient(135deg, var(--shine), var(--gold) 55%, #C98A2E); }
html[data-side="horde"] .btn-gold { color: #160C24; background: linear-gradient(135deg, #F5E9A8, #C9F27A 50%, #9CFF8A); }
.btn:focus-visible, .chip:focus-visible, .play:focus-visible, .tile:focus-visible, .tab:focus-visible, .iconbtn:focus-visible, .barbtn:focus-visible,
.lc-place:focus-visible, .lc-say:focus-visible, .lc-cell:focus-visible, .lc-pick:focus-visible, .lc-night:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.chip { appearance: none; position: relative; min-height: var(--tap); display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid var(--line); background: var(--glass);
  color: var(--text); border-radius: 999px; padding: 6px 16px; font-size: 16px; font-weight: bold; cursor: pointer; -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); box-sizing: border-box; }
.chip__pic { flex: none; width: 22px; height: 22px; color: var(--gold); }
.chip-side { padding: 4px 16px 4px 10px; cursor: default; }
.chip-side[role="button"] { cursor: pointer; }
/* the shared badge (js/side-picker.css) sets its two lines at 9 and 14 px; here every word is 16 px (the readable rule) */
.chip-side .side-badge__kick { font-size: 16px; letter-spacing: 0.02em; text-transform: none; opacity: 1; }
.chip-side .side-badge__name { font-size: 16px; letter-spacing: 0.1em; }

/* ---- the door ------------------------------------------------------------------------------------------------------ */
/* Over the bar at closing time (lastcall/art/key-tall.webp held upright, key-wide.webp on a wide window). Upright: one
   column in the middle; wide: a column on the left, the painting and Mavis on the right. */
.door { position: fixed; inset: 0; z-index: 20; display: flex; align-items: center; justify-content: center; overflow-y: auto; overflow-x: hidden;
  box-sizing: border-box; padding: calc(70px + var(--safe-t)) calc(16px + var(--edge-r)) calc(122px + var(--safe-b)) calc(16px + var(--edge-l));
  background:
    linear-gradient(180deg, rgba(20, 10, 20, 0.45) 0%, rgba(20, 10, 20, 0.7) 40%, rgba(20, 10, 20, 0.9) 100%),
    url("../art/key-tall.webp") center 30% / cover no-repeat, var(--ink); }
.door-col { position: relative; z-index: 2; width: min(460px, 100%); display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; margin: auto 0; }
.door-kicker { margin: 0; color: var(--muted); letter-spacing: 0.3em; text-transform: uppercase; font-size: 16px; font-weight: bold; text-shadow: 0 2px 6px rgba(0, 0, 0, 0.8); }
.door-title { margin: 0; font-family: var(--title-font); font-weight: bold; line-height: 1; font-size: clamp(44px, min(11vw, 11vh), 96px); letter-spacing: 0.1em; white-space: nowrap;
  color: #FFF2E0; text-shadow: 0 0 2px #fff, 0 0 10px var(--rose), 0 0 26px var(--rose), 0 4px 0 rgba(0, 0, 0, 0.6); animation: neon 6s ease-in-out infinite; }
html[data-side="horde"] .door-title { text-shadow: 0 0 2px #fff, 0 0 10px var(--teal), 0 0 26px var(--rose), 0 4px 0 rgba(0, 0, 0, 0.6); }
.door-sub { margin: 0; font-size: 20px; line-height: 1.35; font-style: italic; text-shadow: 0 2px 8px rgba(0, 0, 0, 0.9); }
/* TONIGHT'S CASE: a card like a case file's tab */
.tonight { width: 100%; box-sizing: border-box; padding: 10px 14px 12px; border-radius: 18px; background: var(--glass); border: 1px solid var(--line);
  -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); display: flex; flex-direction: column; align-items: center; gap: 6px; }
.tonight__top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.tonight__kick { margin: 0; min-width: 0; font-size: 16px; font-weight: bold; letter-spacing: 0.14em; text-transform: uppercase; color: var(--rose); }
/* the plan's call, approved with it: "Show 16+ on its Hub tile and on its door" */
.age { flex: none; padding: 1px 7px; border-radius: 8px; border: 2px solid var(--gold); color: var(--gold); font: bold 16px/1.2 var(--font); }
html[data-side="horde"] .tonight__kick { color: var(--teal); }
.tonight__title { margin: 0; font: bold 24px/1.15 var(--title-font); color: var(--gold); }
.tonight__faces { display: flex; justify-content: center; gap: 6px; flex-wrap: wrap; }
.tonight__face { width: 46px; height: 46px; border-radius: 50%; overflow: hidden; border: 2px solid var(--line); background: radial-gradient(circle at 50% 30%, #4A2440, #1A0C1A); }
.tonight__face img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tonight__line { margin: 0; font-size: 16px; line-height: 1.3; color: var(--muted); }
/* the line in pictures, a phone's (lastcall-main.js paintTonightStats): each fact a picture and its number */
.tonight__stats { display: none; flex-wrap: wrap; justify-content: center; gap: 6px 16px; margin: 0; font: bold 16px/1.2 var(--font); font-variant-numeric: tabular-nums; color: var(--text); }
.tonight__stat { display: inline-flex; align-items: center; gap: 6px; }
.tonight__stat .lc-icon { width: 24px; height: 24px; flex: none; color: var(--gold); }
.record { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.pill { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 4px 12px; border-radius: 999px; background: var(--glass); border: 1px solid var(--line);
  font-size: 16px; font-weight: bold; color: var(--text); }
.pill svg { width: 22px; height: 22px; flex: none; }
/* PLAY: Mavis's face on the left, the words on the right */
.play { appearance: none; position: relative; display: flex; align-items: center; gap: 14px; width: 100%; box-sizing: border-box; min-height: 72px; padding: 6px 18px 6px 6px;
  border: 0; border-radius: 22px; cursor: pointer; text-align: left; color: #2A0A16;
  background: linear-gradient(135deg, #FFD7DF, var(--rose) 48%, #C2304E); box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.3) inset, 0 10px 34px rgba(255, 92, 122, 0.45);
  transition: transform 0.12s ease, filter 0.12s ease; }
html[data-side="horde"] .play { color: #160C24; background: linear-gradient(135deg, #EADFFF, var(--rose) 50%, #7C55C9); box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.25) inset, 0 10px 34px rgba(180, 140, 255, 0.4); }
.play:hover { filter: brightness(1.08); }
.play:active { transform: scale(0.98); }
.play::after { content: ''; position: absolute; inset: -5px; border-radius: 26px; border: 2px solid var(--rose); opacity: 0.6; animation: halo 2.4s ease-in-out infinite; pointer-events: none; }
@keyframes halo { 0%, 100% { transform: scale(1); opacity: 0.6; } 50% { transform: scale(1.03); opacity: 0.12; } }
.play__face { flex: none; width: 60px; height: 60px; border-radius: 50%; object-fit: cover; background: #2A1020; border: 3px solid #FFF0D8; }
.play__words { display: flex; flex-direction: column; min-width: 0; }
.play__t { font: bold 28px/1 var(--title-font); letter-spacing: 0.14em; text-transform: uppercase; }
.play__s { font-size: 16px; font-weight: bold; line-height: 1.25; margin-top: 3px; }
/* THE FOUR TILES: a picture on the left, the words on the right (UI-8) */
.tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; width: 100%; }
.tile { appearance: none; display: flex; align-items: center; gap: 10px; min-height: 64px; box-sizing: border-box; padding: 8px 10px; border-radius: 16px; cursor: pointer; text-align: left;
  font: inherit; color: var(--text); background: var(--glass); border: 1px solid var(--line); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); transition: transform 0.12s ease, filter 0.12s ease; }
.tile:hover { filter: brightness(1.14); }
.tile:active { transform: scale(0.98); }
.tile__pic { flex: none; width: 40px; height: 40px; color: var(--gold); }
.tile__words { display: flex; flex-direction: column; min-width: 0; }
.tile__name { font: bold 18px/1.15 var(--title-font); color: var(--gold); }
.tile__sub { font-size: 16px; line-height: 1.2; color: var(--muted); }
.tile__short { display: none; }
.door-mavis { display: none; }
.door-copy { position: fixed; left: calc(14px + var(--edge-l)); bottom: calc(8px + var(--safe-b)); margin: 0; color: rgba(255, 255, 255, 0.6); font-size: 12px; z-index: 21; pointer-events: none; }
@media (max-aspect-ratio: 11/10) and (max-width: 620px) {
  .door { padding-top: max(calc(66px + var(--safe-t)), calc(var(--corner-b, 0px) + 8px)); padding-bottom: max(calc(16px + var(--safe-b)), calc(var(--door-foot, 116px) + 6px)); }
  .door-title { font-size: min(13vw, 64px); }
  .door-sub { font-size: 18px; }
  .tile { padding: 6px 8px; gap: 8px; }
  .tile__pic { width: 34px; height: 34px; }
}
/* THE DOOR'S ROOM, held upright (UI-23, the 320 point iPhone): fitDoor in lastcall-main.js measures the corner and the
   World door (--corner-b, --door-foot); a column still too tall sheds its extra words a step at a time (data-door-fit),
   and scrolls last, never under the World door. */
html[data-door-fit] .door-kicker, html[data-door-fit] .door-sub, html[data-door-fit] .tile__sub { display: none; }
html[data-door-fit] .door-col { gap: 7px; }
html[data-door-fit] .door-title { font-size: min(11vw, 10vh, 52px); }
html[data-door-fit] .tonight { padding: 6px 10px 8px; gap: 4px; }
html[data-door-fit] .tile { min-height: 52px; }
html[data-door-fit="2"] .tonight__faces, html[data-door-fit="3"] .tonight__faces, html[data-door-fit="4"] .tonight__faces { display: none; }
html[data-door-fit="3"] .play__s, html[data-door-fit="4"] .play__s, html[data-door-fit="3"] .record, html[data-door-fit="4"] .record { display: none; }
html[data-door-fit="3"] .play, html[data-door-fit="4"] .play { min-height: 58px; }
html[data-door-fit="3"] .play__face, html[data-door-fit="4"] .play__face { width: 46px; height: 46px; }
html[data-door-fit="4"] .door-col { box-sizing: border-box; max-height: 100%; overflow-y: auto; overflow-x: hidden; padding: 4px 6px; overscroll-behavior: contain; }
@media (min-aspect-ratio: 11/10) {
  .door { justify-content: flex-start; padding: calc(66px + var(--safe-t)) calc(24px + var(--edge-r)) calc(24px + var(--safe-b)) calc(max(24px, 5vw) + var(--edge-l));
    background: linear-gradient(90deg, rgba(20, 10, 20, 0.92) 0%, rgba(20, 10, 20, 0.7) 34%, rgba(20, 10, 20, 0.1) 60%, rgba(20, 10, 20, 0.25) 100%),
      url("../art/key-wide.webp") 70% center / cover no-repeat, var(--ink); }
  .door-col { align-items: flex-start; text-align: left; width: min(500px, 44vw); }
  .tonight { align-items: flex-start; }
  .tonight__faces, .record { justify-content: flex-start; }
  /* Mavis stands in the painting's clear patch, clear of the column and of the World door at the foot on the right */
  .door-mavis { display: block; position: fixed; z-index: 1; margin: 0; pointer-events: none; bottom: 0; left: calc(max(24px, 5vw) + min(500px, 44vw) + 4vw); height: min(78vh, 720px);
    filter: drop-shadow(0 10px 24px rgba(0, 0, 0, 0.6)); animation: breathe 6s ease-in-out infinite; transform-origin: 50% 100%; }
  .door-mavis img { height: 100%; width: auto; display: block; }
  .door-copy { left: auto; right: calc(124px + var(--edge-r)); }
}
@keyframes breathe { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.012); } }
/* a phone held sideways, or a fold's short pane: no room for Mavis standing, and the column tighter */
@media (min-aspect-ratio: 11/10) and (max-height: 560px) {
  .door { padding-top: calc(10px + var(--safe-t)); padding-bottom: calc(10px + var(--safe-b)); padding-right: calc(12px + var(--corner-w, 180px)); align-items: flex-start; }
  .door-col { width: min(560px, 58vw); max-width: 100%; gap: 6px; }
  .door-title { font-size: min(9vh, 44px); }
  .door-kicker, .door-sub { display: none; }
  .tonight { padding: 6px 12px 8px; gap: 4px; }
  .tonight__faces { display: none; }
  .play { min-height: 58px; }
  .play__face { width: 46px; height: 46px; }
  .tile { min-height: 52px; }
  .door-mavis { height: 92vh; left: auto; right: calc(126px + var(--edge-r)); }
}
@media (min-aspect-ratio: 11/10) and (max-width: 900px) { .door-mavis { display: none; } }
/* the shortest of those (a small phone held sideways, a fold's narrow strip): the four tiles stand in their own column
   beside the night's card and PLAY, so nothing falls below the screen */
@media (min-aspect-ratio: 11/10) and (max-height: 400px) {
  .door-col { display: grid; width: min(640px, 72vw); grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); column-gap: 10px; align-items: start;
    grid-template-areas: "title title" "play tiles" "tonight tiles" "record tiles"; }
  .door { padding-bottom: calc(6px + var(--copy-foot, 24px)); }
  html[data-door-fit] .tonight__line { display: none; }
  .door-title { grid-area: title; }
  .tonight { grid-area: tonight; }
  .record { grid-area: record; }
  .play { grid-area: play; }
  .tiles { grid-area: tiles; grid-template-columns: minmax(0, 1fr); gap: 6px; }
  .tile { min-height: 48px; padding-top: 4px; padding-bottom: 4px; }
  .tile__pic { width: 34px; height: 34px; }
  .tile__sub, .door-mavis { display: none; }
}
/* the smallest phone held sideways: the side badge in the corner is its crest alone (its words are on its button's name) */
@media (min-aspect-ratio: 11/10) and (max-height: 400px) and (max-width: 700px) { .chip-side .side-badge__words { display: none; } }

/* ---- the corner: top right ----------------------------------------------------------------------------------------- */
.corner { position: fixed; top: calc(12px + var(--safe-t)); right: calc(12px + var(--edge-r)); z-index: 45; display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end;
  max-width: calc(100vw - 24px - var(--edge-l) - var(--edge-r)); }
@media (max-width: 420px) { .corner { left: calc(12px + var(--edge-l)); justify-content: center; } .chip { padding: 6px 12px; } }
@media (min-aspect-ratio: 11/10) and (max-height: 560px) { .corner { flex-direction: column; align-items: flex-end; flex-wrap: nowrap; } }

/* ---- A CASE --------------------------------------------------------------------------------------------------------- */
.case { position: fixed; inset: 0; z-index: 30; box-sizing: border-box; display: grid; gap: 8px; background: var(--ink);
  padding: calc(8px + var(--safe-t)) calc(10px + var(--edge-r)) calc(8px + var(--safe-b)) calc(10px + var(--edge-l));
  grid-template-columns: minmax(0, 1fr); grid-template-rows: auto auto auto minmax(0, 1fr) auto;
  grid-template-areas: "top" "scene" "say" "panel" "bar"; }
.case > * { min-width: 0; }
/* the bar and the tools measure their own width (a narrow column held sideways is as tight as a phone held upright) */
.case-top, .case-bar { container-type: inline-size; }
@container (max-width: 380px) {
  .case-name { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
  .case-num, .case-sub { display: none; }
}
@container (max-width: 320px) {
  #bar-brief .barbtn__words, .barbtn__s { display: none; }
  .barbtn { padding: 4px 8px; gap: 6px; }
}
.case-top { grid-area: top; display: flex; align-items: center; gap: 8px; padding: 4px 8px 4px 4px; border-radius: 18px; background: var(--glass-2); border: 1px solid var(--line); }
.case-title { flex: 1 1 auto; min-width: 0; }
.case-name { margin: 0; font: bold 18px/1.2 var(--title-font); color: var(--gold); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.case-sub { margin: 0; font-size: 16px; line-height: 1.2; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.glasses { flex: none; display: flex; gap: 2px; }
.glasses .lc-icon { width: 30px; height: 30px; color: var(--muted); }
.glasses .is-gone { opacity: 0.55; }
.glasses .is-spill { animation: spill 0.7s ease; }
@keyframes spill { 0% { transform: rotate(0); } 30% { transform: rotate(-24deg) translateY(-4px); } 60% { transform: rotate(14deg); } 100% { transform: rotate(0); } }
.case-clock { flex: none; margin: 0; min-width: 3.4em; text-align: right; font: bold 18px/1 var(--font); font-variant-numeric: tabular-nums; color: var(--text); }
.iconbtn { appearance: none; flex: none; width: var(--tap); height: var(--tap); padding: 9px; border-radius: 50%; border: 1px solid var(--line); background: var(--glass); color: var(--gold);
  cursor: pointer; box-sizing: border-box; display: inline-flex; align-items: center; justify-content: center; }
.iconbtn:hover { filter: brightness(1.2); }
.iconbtn:disabled { opacity: 0.45; cursor: default; }
/* THE PAINTING: sized by lastcall-main.js into its box; the box scrolls when zoomed in */
.scene { grid-area: scene; position: relative; aspect-ratio: var(--scene-ar, 1.787); max-height: clamp(170px, 44vh, 560px); border-radius: 16px; overflow: hidden; background: #0A050A; border: 1px solid var(--line); }
.scene-pan { position: absolute; inset: 0; overflow: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; scrollbar-width: none; display: flex; }
.scene-pan::-webkit-scrollbar { display: none; }
.scene-art { position: relative; flex: none; margin: auto; cursor: zoom-in; touch-action: pan-x pan-y; }
.scene-art img { display: block; width: 100%; height: 100%; -webkit-user-drag: none; pointer-events: none; }
.scene-marks { position: absolute; inset: 0; pointer-events: none; }
.mark { position: absolute; width: 34px; height: 34px; margin: -17px 0 0 -17px; border-radius: 50%; box-sizing: border-box; display: flex; align-items: center; justify-content: center;
  font: bold 16px/1 var(--font); color: #2A1606; background: radial-gradient(circle at 40% 35%, var(--shine), var(--gold) 60%, #A8701E); border: 2px solid #FFF3D6;
  box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.35), 0 0 16px rgba(242, 196, 109, 0.8); animation: mark 2.2s ease-in-out infinite; }
.mark.is-done { animation: none; background: var(--glass-2); color: var(--text); border-color: var(--teal); box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.35); padding: 4px; }
.mark.is-done svg { width: 100%; height: 100%; }
.mark.is-scene::after { content: ''; position: absolute; inset: -8px; border-radius: 50%; border: 2px dashed var(--rose); }
.mark.is-hint { animation: lamp 1.2s ease-in-out infinite; box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.35), 0 0 30px 10px rgba(255, 231, 168, 0.9); }
@keyframes mark { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.12); } }
@keyframes lamp { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.25); } }
.scene-flash { position: absolute; width: 90px; height: 90px; margin: -45px 0 0 -45px; border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle, rgba(255, 240, 200, 0.85), rgba(255, 240, 200, 0) 70%); animation: flash 0.6s ease-out forwards; }
@keyframes flash { from { transform: scale(0.3); opacity: 1; } to { transform: scale(1.6); opacity: 0; } }
/* MAVIS'S WORDS: their own row of the grid, so they cover nothing */
.say { grid-area: say; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; grid-template-areas: "face head next" "face text text"; align-items: center;
  column-gap: 10px; row-gap: 2px; padding: 8px 10px; border-radius: 16px; background: linear-gradient(135deg, rgba(70, 24, 48, 0.96), rgba(30, 12, 26, 0.96)); border: 1px solid var(--rose); }
.say.is-new { animation: say-in 0.35s ease both; }
@keyframes say-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.say__face { grid-area: face; align-self: start; width: 52px; height: 52px; border-radius: 50%; object-fit: cover; border: 2px solid var(--rose); background: #2A1020; }
.say__words { display: contents; }
.say__head { grid-area: head; margin: 0; display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.say__name { font: bold 18px/1.2 var(--title-font); color: var(--rose); }
.say__step { font-size: 16px; color: var(--muted); }
.say__text { grid-area: text; margin: 0; font-size: 18px; line-height: 1.35; }
.say__next { grid-area: next; display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 6px 16px 6px 12px; }
.say__next .btn__pic { flex: none; width: 22px; height: 22px; }
/* THE PANEL: the tabs, then one pane that scrolls */
.panel { grid-area: panel; display: flex; flex-direction: column; min-height: 0; border-radius: 18px; background: var(--glass-2); border: 1px solid var(--line); overflow: hidden; }
.tabs { flex: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; padding: 4px; border-bottom: 1px solid var(--line); }
.tab { appearance: none; display: flex; align-items: center; justify-content: center; gap: 6px; min-height: var(--tap); padding: 4px 6px; border-radius: 12px; border: 0; background: transparent;
  color: var(--muted); font: bold 16px/1.1 var(--font); cursor: pointer; }
.tab__pic { flex: none; width: 26px; height: 26px; }
.tab[aria-selected="true"] { background: rgba(242, 196, 109, 0.16); color: var(--gold); box-shadow: inset 0 -3px 0 var(--gold); }
.tab.is-new .tab__pic { animation: lamp 1.2s ease-in-out 3; }
.pane { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 8px; display: flex; flex-direction: column; gap: 8px; -webkit-user-select: text; user-select: text; }
.pane > * { flex: none; }
.pane-note { margin: 0 2px; font-size: 16px; line-height: 1.35; color: var(--muted); }
/* a place: its number and picture on the left, its name and its clue on the right */
.lc-place { appearance: none; display: flex; align-items: center; gap: 10px; width: 100%; min-height: 60px; box-sizing: border-box; padding: 6px 10px 6px 6px; border-radius: 14px; cursor: pointer;
  text-align: left; font: inherit; color: var(--text); background: rgba(255, 255, 255, 0.04); border: 1px solid var(--line); }
.lc-place:hover { filter: brightness(1.15); }
.lc-place__pic { position: relative; flex: none; width: 48px; height: 48px; border-radius: 12px; background: rgba(0, 0, 0, 0.35); padding: 4px; box-sizing: border-box; color: var(--gold); }
.lc-place__n { position: absolute; left: -4px; top: -4px; width: 22px; height: 22px; border-radius: 50%; font: bold 16px/22px var(--font); text-align: center; color: #2A1606; background: var(--gold); }
.lc-place__words { display: flex; flex-direction: column; min-width: 0; }
.lc-place__name { font-weight: bold; font-size: 18px; line-height: 1.2; color: var(--gold); }
.lc-place__clue { font-size: 16px; line-height: 1.3; color: var(--muted); }
.lc-place.is-done .lc-place__clue { color: var(--text); }
.lc-place.is-scene { border-color: var(--rose); }
.lc-place.is-hint { box-shadow: 0 0 0 2px var(--shine), 0 0 18px rgba(255, 231, 168, 0.6); }
.lc-tag { display: inline-block; margin-left: 6px; padding: 0 8px; border-radius: 999px; font-size: 16px; font-weight: bold; line-height: 1.4; color: #2A0A16; background: var(--rose); vertical-align: 1px; }
/* a suspect: the portrait on the left, the name, trade and four traits, then the two statements */
.lc-suspect { border-radius: 16px; background: rgba(255, 255, 255, 0.04); border: 1px solid var(--line); padding: 8px; display: flex; flex-direction: column; gap: 8px; }
.lc-suspect.is-hint { box-shadow: 0 0 0 2px var(--shine), 0 0 18px rgba(255, 231, 168, 0.6); }
.lc-suspect__head { display: flex; gap: 10px; align-items: flex-start; }
.lc-suspect__pic { flex: none; width: 80px; height: 80px; border-radius: 14px; overflow: hidden; background: radial-gradient(circle at 50% 30%, #4A2440, #1A0C1A); border: 1px solid var(--line); }
.lc-suspect__pic img { width: 100%; height: 100%; object-fit: cover; display: block; }
.lc-suspect__who { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.lc-suspect__name { margin: 0; font: bold 20px/1.15 var(--title-font); color: var(--gold); }
.lc-suspect__trade { margin: 0; font-size: 16px; line-height: 1.2; color: var(--muted); }
.lc-traits { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px; }
.lc-trait { display: flex; align-items: center; gap: 4px; min-width: 0; font-size: 16px; line-height: 1.15; }
.lc-trait__svg { flex: none; width: 26px; height: 26px; color: var(--text); }
.lc-trait span { min-width: 0; overflow-wrap: anywhere; }
/* a statement: a button, the quote on paper */
.lc-say { appearance: none; position: relative; display: flex; align-items: flex-start; gap: 8px; width: 100%; min-height: 52px; box-sizing: border-box; padding: 8px 10px; border-radius: 12px;
  cursor: pointer; text-align: left; font: italic 18px/1.35 var(--title-font); color: #2A1A0E; background: var(--paper); border: 2px solid transparent; }
.lc-say:hover { filter: brightness(1.05); }
.lc-say__pin { flex: none; width: 26px; height: 26px; color: #6A4A2A; margin-top: 1px; }
.lc-say.is-tried { border-color: rgba(200, 60, 70, 0.5); }
.lc-say.is-lie { border-color: var(--rose); background: #FFE0E4; }
.lc-say.is-lie::after { content: 'A LIE'; position: absolute; right: 8px; bottom: 4px; font: bold 16px/1 var(--font); letter-spacing: 0.12em; color: #C2304E; transform: rotate(-6deg); }
.lc-tried { margin: -2px 0 0; font-size: 16px; line-height: 1.3; color: var(--muted); }
/* THE NOTEBOOK: who stood where, the player's own marks */
.lc-grid { display: grid; gap: 3px; align-items: center; overflow-x: auto; padding-bottom: 2px; }
.lc-grid__h { font: bold 16px/1.1 var(--font); color: var(--gold); text-align: center; }
.lc-grid__who { width: 44px; height: 44px; border-radius: 50%; overflow: hidden; background: #2A1020; border: 1px solid var(--line); }
.lc-grid__who img { width: 100%; height: 100%; object-fit: cover; display: block; }
.lc-cell { appearance: none; min-width: 44px; height: 44px; border-radius: 10px; border: 1px solid var(--line); background: rgba(255, 255, 255, 0.05); cursor: pointer; padding: 8px; box-sizing: border-box;
  color: var(--text); display: flex; align-items: center; justify-content: center; }
.lc-cell[data-mark="no"] { color: #FF8A9A; background: rgba(255, 92, 122, 0.12); }
.lc-cell[data-mark="yes"] { color: var(--teal); background: rgba(95, 217, 204, 0.16); border-color: var(--teal); }
.lc-cell svg { width: 100%; height: 100%; }
.lc-facts { margin: 0; padding-left: 20px; font-size: 16px; line-height: 1.4; }
/* the two marks' key, over the grid */
.lc-legend { display: flex; flex-wrap: wrap; gap: 4px 18px; margin: 0 2px; font-size: 16px; line-height: 1.2; color: var(--muted); }
.lc-legend__item { display: inline-flex; align-items: center; gap: 6px; }
.lc-legend__item .lc-icon { width: 22px; height: 22px; flex: none; }
.lc-legend__item[data-mark="no"] .lc-icon { color: #FF8A9A; }
.lc-legend__item[data-mark="yes"] .lc-icon { color: var(--teal); }
.lc-short { display: none; }
/* THE BAR OF TOOLS */
.case-bar { grid-area: bar; display: flex; align-items: center; gap: 8px; }
.barbtn { appearance: none; position: relative; flex: 1 1 0; min-width: 0; display: flex; align-items: center; justify-content: center; gap: 8px; min-height: var(--tap); padding: 4px 12px; border-radius: 16px;
  border: 1px solid var(--line); background: var(--glass-2); color: var(--text); cursor: pointer; font: inherit; box-sizing: border-box; }
.barbtn:hover { filter: brightness(1.15); }
.barbtn__pic { flex: none; width: 30px; height: 30px; color: var(--gold); }
.barbtn__words { display: flex; flex-direction: column; min-width: 0; text-align: left; }
.barbtn__t { font: bold 18px/1.1 var(--title-font); color: var(--gold); }
.barbtn__s { font-size: 16px; line-height: 1.15; color: var(--muted); white-space: nowrap; }
.barbtn--lamp { flex-grow: 1.5; }
.barbtn--lamp.is-free { border-color: var(--gold); box-shadow: 0 0 14px rgba(242, 196, 109, 0.35); }
.case[data-done] .barbtn--lamp { opacity: 0.5; }
/* held sideways or on a big window: the words and tools on the left, the painting on the right (the standard's rule) */
@media (min-aspect-ratio: 11/10) {
  .case { grid-template-columns: minmax(260px, min(var(--col), 48vw)) minmax(0, 1fr); grid-template-rows: auto auto minmax(0, 1fr) auto;
    grid-template-areas: "top scene" "say scene" "panel scene" "bar scene"; }
  .scene { aspect-ratio: auto; max-height: none; }
}
@media (min-aspect-ratio: 11/10) and (min-width: 1200px) { :root { --col: 440px; } }
@media (min-aspect-ratio: 11/10) and (max-height: 560px) {
  .case { gap: 6px; padding-top: calc(6px + var(--safe-t)); padding-bottom: calc(6px + var(--safe-b)); }
  .case-sub { display: none; }
  .say__face { width: 40px; height: 40px; }
  .say__text { font-size: 16px; }
  .tab__name { display: none; }
  .barbtn__s { display: none; }
}
/* a phone held upright: the case's name over two lines rather than cut short; the room is on the painting */
@media (max-aspect-ratio: 11/10) and (max-width: 560px) {
  .case-name { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
  .case-num, .case-sub { display: none; }
}
@media (max-aspect-ratio: 11/10) and (max-width: 380px) {
  .glasses .lc-icon { width: 26px; height: 26px; }
  .barbtn { padding: 4px 8px; gap: 6px; }
  .barbtn__s { font-size: 16px; }
  .case-bar { gap: 6px; }
}
/* the narrowest phones (320 wide): the tabs in words only, the lamp's line on its glow, the traits one to a row */
@media (max-aspect-ratio: 11/10) and (max-width: 360px) {
  .tab__pic, .barbtn__s { display: none; }
  .barbtn__pic { width: 26px; height: 26px; }
  .glasses .lc-icon { width: 22px; height: 22px; }
  .case-clock { font-size: 16px; min-width: 3em; }
  .case-name { font-size: 17px; }
  .lc-traits { grid-template-columns: minmax(0, 1fr); }
}
@media (max-aspect-ratio: 11/10) and (max-height: 700px) { .scene { max-height: clamp(150px, 36vh, 520px); } }

/* ---- A PHONE, upright or held sideways: pictures for the ways and the controls ------------------------------------ */
/* Goliath, 2026-10-19 22:51Z: "The iPhone has a ton of text going on. I feel like the buttons could be just SVG buttons
   and reduce down the text"; "There can be some text... just it needs to be cut way back for navigation and controls
   like we did in The Gate." On a phone the corner, the door's four ways, the case's tools and Mavis's Next are round
   pictures (UI-35), each word kept for a screen reader (and on the button's title); the tabs name only the one open;
   the door says tonight's case in pictures and numbers; the long help (the crime, how to pin, how to mark the notebook,
   a place not searched yet) leaves the play screen for the brief and How to Play (.lc-more), and a found clue shows its
   few words (.lc-short), the rest a press away in its sheet (.lc-long). */
@media (max-aspect-ratio: 11/10) and (max-width: 620px), (min-aspect-ratio: 11/10) and (max-height: 560px) {
  .chip__t, .chip-side .side-badge__words, .tile__words, .tonight__line, .say__next .btn__t, .barbtn__words {
    position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0; }
  .lc-more, .lc-long, .door-kicker, .door-sub, .play__s, .lc-menu .lc-pick__sub { display: none; }
  .lc-short { display: block; }
  /* the corner: four round pictures, top right */
  .corner { left: auto; justify-content: flex-end; }
  .chip { width: var(--tap); height: var(--tap); padding: 0; }
  .chip__pic { width: 26px; height: 26px; }
  .chip-side { padding: 0; }
  .chip-side .side-badge__crest { width: 28px; height: 28px; }
  /* the door: tonight's facts in pictures, the four ways a row of round pictures, each with its one word under it */
  .tonight__stats { display: flex; }
  .tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
  .tile { position: relative; flex-direction: column; justify-content: flex-start; gap: 4px; min-height: 0; padding: 2px 0 4px; text-align: center; background: none; border: 0;
    -webkit-backdrop-filter: none; backdrop-filter: none; }
  .tile__pic { width: 56px; height: 56px; padding: 13px; box-sizing: border-box; border-radius: 50%; background: var(--glass); border: 1px solid var(--line); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
  .tile:hover .tile__pic { border-color: var(--gold); }
  .tile__short { display: block; font: bold 16px/1.15 var(--title-font); color: var(--gold); text-shadow: 0 2px 6px rgba(0, 0, 0, 0.9); }
  /* the case: the tabs' pictures, the open one named; the bar of tools four round pictures, the lamp's free hint a gold dot */
  .tabs { display: flex; }
  .tab { flex: 1 1 0; min-width: var(--tap); box-sizing: border-box; }
  .tab[aria-selected="true"] { flex: 2 1 auto; }
  .tab__pic { display: block; width: 28px; height: 28px; }
  .tab__name { display: none; }
  .tab[aria-selected="true"] .tab__name { display: inline; }
  .case-bar { justify-content: center; gap: 16px; }
  .barbtn, .barbtn--lamp { flex: none; width: var(--tap); padding: 0; border-radius: 50%; gap: 0; }
  .barbtn__pic { width: 28px; height: 28px; }
  .barbtn--lamp.is-free::after { content: ''; position: absolute; top: 1px; right: 1px; width: 12px; height: 12px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 0 2px var(--ink), 0 0 8px var(--gold); }
  .say__next { width: var(--tap); padding: 0; border-radius: 50%; }
  .say__next .btn__pic { width: 26px; height: 26px; }
  .lc-place { min-height: 56px; }
  .lc-suspect__pic { width: 64px; height: 64px; }
}
/* the shortest phones held sideways: the four ways two by two beside PLAY */
@media (min-aspect-ratio: 11/10) and (max-height: 400px) {
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tile__pic { width: 48px; height: 48px; padding: 11px; }
}
/* the narrowest held sideways (568 x 320): a suspect's traits one to a row (two to a row split "Middling") */
@media (min-aspect-ratio: 11/10) and (max-height: 400px) and (max-width: 640px) { .lc-traits { grid-template-columns: minmax(0, 1fr); } }

/* ---- the sheets: a clue, a pin, the lamp, the menu, How to play (js/room-ui.js dialog) ------------------------------ */
/* a short screen (a phone held sideways, a fold's strip): the sheet's words scroll in a box of their own under the
   heading, so its Close never lies on them when a dial or a button scrolls into view (the casino's egg sheet does the same) */
@media (max-height: 560px) {
  .lc-sheet .rui-dlg { display: flex; flex-direction: column; overflow: hidden; }
  .lc-sheet .rui-dlg__body { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
  .lc-sheet .rui-dlg__head, .lc-sheet .rui-dlg__foot { flex: 0 0 auto; }
}
.lc-clue { display: flex; gap: 14px; align-items: center; }
.lc-clue__pic { flex: none; width: 96px; height: 96px; border-radius: 18px; padding: 10px; box-sizing: border-box; background: radial-gradient(circle at 50% 40%, rgba(255, 240, 200, 0.22), rgba(0, 0, 0, 0.35));
  border: 1px solid var(--rui-line, var(--line)); color: var(--rui-ink, var(--text)); }
.lc-clue__pic.is-new { animation: clue-in 0.5s ease both; }
@keyframes clue-in { from { transform: scale(0.4) rotate(-12deg); opacity: 0; } to { transform: none; opacity: 1; } }
.lc-clue__words { min-width: 0; }
.lc-clue__where { margin: 0 0 4px; font-size: 16px; font-weight: bold; letter-spacing: 0.08em; text-transform: uppercase; color: var(--rui-gold, var(--gold)); }
.lc-clue__text { margin: 0; font: italic 20px/1.35 var(--rui-title-font, var(--title-font)); }
.lc-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
/* Sunday's padlock: its place, its note and its three dials (lastcall-main.js lockSheet) */
.mark.is-locked { animation: none; background: var(--glass-2); color: var(--gold); border-color: var(--gold); padding: 5px; }
.mark.is-locked svg { width: 100%; height: 100%; }
.lc-place.is-locked .lc-place__pic { box-shadow: inset 0 0 0 2px var(--gold); }
.lc-place__note { display: block; margin-top: 4px; font-size: 16px; line-height: 1.3; color: var(--gold); }
.lc-note { display: flex; gap: 10px; align-items: center; margin: 10px 0 0; padding: 10px 12px; border-radius: 14px; font-size: 18px; line-height: 1.35;
  background: rgba(242, 196, 109, 0.12); border: 1px solid rgba(242, 196, 109, 0.45); }
.lc-note__pic { flex: none; width: 36px; height: 36px; color: var(--rui-gold, var(--gold)); }
.lc-lock { display: flex; justify-content: center; gap: 14px; margin: 16px 0 6px; }
.lc-lock.is-shake { animation: lock-shake 0.4s ease; }
@keyframes lock-shake { 0%, 100% { transform: none; } 20% { transform: translateX(-8px); } 40% { transform: translateX(7px); } 60% { transform: translateX(-5px); } 80% { transform: translateX(3px); } }
.lc-dial { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.lc-dial__btn { appearance: none; width: 52px; height: 48px; padding: 8px 10px; border-radius: 14px; cursor: pointer; color: var(--rui-gold, var(--gold));
  background: var(--rui-panel-2, rgba(255, 255, 255, 0.06)); border: 2px solid var(--rui-line, var(--line)); }
.lc-dial__btn svg { width: 100%; height: 100%; }
.lc-dial__num { display: flex; align-items: center; justify-content: center; width: 64px; height: 76px; border-radius: 14px; box-sizing: border-box;
  font: bold 44px/1 var(--rui-title-font, var(--title-font)); color: #2A1606; background: linear-gradient(180deg, #FFF3D6, var(--gold) 55%, #A8701E);
  border: 2px solid #FFF3D6; box-shadow: inset 0 -6px 10px rgba(0, 0, 0, 0.25); }
.lc-dial__num:focus-visible, .lc-dial__btn:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.lc-lock__status { min-height: 1.4em; margin: 4px 0 0; text-align: center; font-size: 18px; color: var(--rose); }
.lc-picks { display: flex; flex-direction: column; gap: 6px; }
.lc-pick { appearance: none; display: flex; align-items: center; gap: 10px; width: 100%; min-height: 56px; box-sizing: border-box; padding: 6px 10px 6px 6px; border-radius: 14px; cursor: pointer;
  text-align: left; font: inherit; color: var(--rui-ink, var(--text)); background: var(--rui-panel-2, rgba(255, 255, 255, 0.05)); border: 2px solid var(--rui-line, var(--line)); }
.lc-pick.is-on { border-color: var(--rui-gold, var(--gold)); box-shadow: 0 0 0 2px rgba(242, 196, 109, 0.35); }
.lc-pick.is-tried { opacity: 0.6; }
.lc-pick__pic { flex: none; width: 44px; height: 44px; border-radius: 10px; padding: 4px; box-sizing: border-box; background: rgba(0, 0, 0, 0.3); }
.lc-pick__pic.is-face { padding: 0; border-radius: 50%; overflow: hidden; }
.lc-pick__pic.is-face img { width: 100%; height: 100%; object-fit: cover; display: block; }
.lc-pick__words { display: flex; flex-direction: column; min-width: 0; }
.lc-pick__name { font-weight: bold; font-size: 18px; line-height: 1.2; }
.lc-pick__sub { font-size: 16px; line-height: 1.3; color: var(--rui-soft, var(--muted)); }
.lc-quote { margin: 0 0 10px; padding: 10px 12px; border-radius: 12px; font: italic 18px/1.35 var(--title-font); color: #2A1A0E; background: var(--paper); }
.lc-mavis { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 8px; }
.lc-mavis img { flex: none; width: 64px; height: 64px; border-radius: 50%; object-fit: cover; border: 2px solid var(--rose); background: #2A1020; }
.lc-mavis p { margin: 0 0 8px; font-size: 18px; line-height: 1.4; }
.lc-h { margin: 16px 0 6px; font: bold 22px/1.2 var(--title-font); color: var(--rui-gold, var(--gold)); }
.lc-h:first-child { margin-top: 0; }
.lc-key { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 8px; }
.lc-key li { display: flex; align-items: center; gap: 10px; font-size: 16px; line-height: 1.3; }
.lc-key__pic { flex: none; width: 40px; height: 40px; padding: 6px; box-sizing: border-box; border-radius: 50%; border: 1px solid var(--rui-line, var(--line)); color: var(--rui-gold, var(--gold)); }
.lc-links { display: flex; flex-wrap: wrap; gap: 10px; margin: 6px 0 0; }
.lc-links .rui-btn { text-decoration: none; }
.lc-keys { margin: 0; padding-left: 20px; }
.lc-keys li { font-size: 16px; line-height: 1.5; }
.lc-keys kbd { display: inline-block; min-width: 1.4em; padding: 0 6px; border-radius: 6px; border: 1px solid var(--rui-line, var(--line)); font: bold 16px/1.4 var(--font); text-align: center; }
/* HOW TO PLAY'S STEPS (lastcall-main.js GUIDE): a picture of the game on an iPhone on the left, its few words on the right */
.lc-rule { margin: 0 0 12px; padding: 10px 12px; border-radius: 14px; font-size: 18px; line-height: 1.4; background: rgba(242, 196, 109, 0.12); border: 1px solid rgba(242, 196, 109, 0.45); }
.lc-rule b { color: var(--rui-gold, var(--gold)); }
.lc-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); gap: 10px; counter-reset: step; }
.lc-step { display: flex; gap: 12px; align-items: flex-start; padding: 8px; border-radius: 14px; background: var(--rui-panel-2, rgba(255, 255, 255, 0.05)); border: 1px solid var(--rui-line, var(--line)); }
.lc-step__pic { flex: none; display: block; width: 132px; height: auto; aspect-ratio: 3 / 4; object-fit: cover; border-radius: 10px; border: 1px solid var(--rui-line, var(--line)); background: #0A050A; }
.lc-step__words { min-width: 0; }
.lc-step__title { margin: 2px 0 4px; font: bold 20px/1.2 var(--rui-title-font, var(--title-font)); color: var(--rui-gold, var(--gold)); }
.lc-step__title::before { counter-increment: step; content: counter(step) ". "; }
.lc-step__p { margin: 0; font-size: 16px; line-height: 1.4; }
@media (max-width: 360px) { .lc-step__pic { width: 108px; } }

/* ---- THE ROOMS (readable rooms: js/room-ui.js): Case Files, The Board, Your Office --------------------------------- */
.rui.lc-room[data-paint] { background: linear-gradient(180deg, rgba(20, 10, 20, 0.86), rgba(20, 10, 20, 0.94)), var(--rui-paint) center / cover no-repeat, #140A14; }
.rui.lc-room[data-side="horde"][data-paint] { background: linear-gradient(180deg, rgba(11, 7, 18, 0.86), rgba(11, 7, 18, 0.94)), var(--rui-paint) center / cover no-repeat, #0B0712; }
.lc-nights { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr)); gap: 10px; }
.lc-night { appearance: none; display: flex; align-items: stretch; gap: 10px; min-height: 84px; padding: 0 10px 0 0; border-radius: 14px; overflow: hidden; cursor: pointer; text-align: left; font: inherit;
  color: var(--rui-ink, var(--text)); background: var(--rui-panel-2, rgba(255, 255, 255, 0.05)); border: 1px solid var(--rui-line, var(--line)); box-sizing: border-box; width: 100%; }
.lc-night:hover { filter: brightness(1.12); }
.lc-night__pic { flex: none; width: 112px; background: #0A050A center / cover no-repeat; position: relative; }
.lc-night__pic .lc-night__lock { position: absolute; inset: 0; margin: auto; width: 40px; height: 40px; padding: 7px; box-sizing: border-box; border-radius: 50%; background: rgba(0, 0, 0, 0.7); color: #fff; }
.lc-night.is-locked .lc-night__pic { filter: grayscale(0.8) brightness(0.6); }
.lc-night__words { display: flex; flex-direction: column; justify-content: center; gap: 2px; min-width: 0; padding: 6px 0; }
.lc-night__kick { font-size: 16px; line-height: 1.2; color: var(--rui-soft, var(--muted)); }
.lc-night__title { font: bold 18px/1.2 var(--title-font); color: var(--rui-gold, var(--gold)); }
.lc-night__state { font-size: 16px; line-height: 1.2; }
.lc-night__state.is-solved { color: var(--teal); }
.lc-night__state.is-shut { color: #FF8A9A; }
.lc-month { display: flex; flex-direction: column; gap: 10px; }
.lc-board { width: 100%; border-collapse: collapse; font-size: 18px; }
.lc-board th { text-align: left; font-size: 16px; color: var(--rui-soft, var(--muted)); padding: 4px 6px; border-bottom: 1px solid var(--rui-line, var(--line)); }
.lc-board td { padding: 8px 6px; border-bottom: 1px solid rgba(255, 255, 255, 0.08); }
.lc-board td.num { text-align: right; font-variant-numeric: tabular-nums; }
.lc-board th.num { text-align: right; }   /* a number's heading sits over its right-aligned numbers */
.lc-board tr.is-me td { color: var(--rui-gold, var(--gold)); font-weight: bold; background: rgba(242, 196, 109, 0.1); }
.lc-stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }
.lc-stat { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 10px 6px; border-radius: 14px; background: var(--rui-panel-2, rgba(255, 255, 255, 0.05)); border: 1px solid var(--rui-line, var(--line)); text-align: center; }
.lc-stat b { font: bold 26px/1.1 var(--title-font); color: var(--rui-gold, var(--gold)); }
.lc-stat span { font-size: 16px; line-height: 1.2; }
.lc-rank { display: flex; align-items: center; gap: 12px; }
.lc-rank__badge { flex: none; width: 64px; height: 64px; border-radius: 50%; padding: 12px; box-sizing: border-box; color: #2A1606;
  background: radial-gradient(circle at 35% 30%, #FFF8DC, var(--gold) 55%, #B8741C); box-shadow: 0 0 0 3px rgba(255, 232, 170, 0.35), 0 0 18px rgba(242, 196, 109, 0.5); }
.lc-rank__words { min-width: 0; }
.lc-rank__name { margin: 0; font: bold 22px/1.2 var(--title-font); color: var(--rui-gold, var(--gold)); }
.lc-rank__bar { display: block; height: 10px; border-radius: 5px; margin: 6px 0 4px; background: rgba(0, 0, 0, 0.5); border: 1px solid var(--rui-line, var(--line)); overflow: hidden; }
.lc-rank__bar span { display: block; height: 100%; background: linear-gradient(90deg, var(--rose), var(--gold)); }
.lc-rank__next { margin: 0; font-size: 16px; color: var(--rui-soft, var(--muted)); }

/* ---- small things -------------------------------------------------------------------------------------------------- */
.toast { position: fixed; left: 50%; bottom: calc(24px + var(--safe-b)); transform: translateX(-50%); z-index: 80; max-width: calc(100vw - 40px); padding: 12px 18px; border-radius: 14px;
  background: var(--glass-2); border: 1px solid var(--line); font-size: 18px; text-align: center; box-sizing: border-box; }
html[data-screen="case"] .toast { bottom: auto; top: calc(70px + var(--safe-t)); }
/* the shared result board (js/reward-board.js) on the 320 point iPhone (UI-23): its ways on draw their words in a little */
@media (max-width: 360px) { html[data-device="phone"] .rb .rb-foot .rb-btn { padding: 8px 6px; font-size: 16px; } }
/* a big screen: the door's column, the corner and the case's words grow with it */
@media (max-aspect-ratio: 11/10) and (min-width: 700px) and (min-height: 960px) { .door-col, .corner { zoom: 1.3; } .case-top, .say, .panel, .case-bar { zoom: 1.15; } }
@media (min-width: 1400px) and (min-height: 820px) { .door-col, .corner, .door-copy { zoom: 1.2; } }
/* Mavis keeps clear of the column at its bigger size */
@media (min-aspect-ratio: 11/10) and (min-width: 1400px) and (min-height: 820px) { .door-mavis { left: calc(max(24px, 5vw) + min(500px, 44vw) * 1.2 + 4vw); } }
@media (min-aspect-ratio: 11/10) and (min-width: 2300px) and (min-height: 1250px) { .door-mavis { left: calc(max(24px, 5vw) + min(500px, 44vw) * 1.5 + 4vw); } }
@media (min-width: 2300px) and (min-height: 1250px) { .door-col, .corner, .door-copy { zoom: 1.5; } :root { --col: 520px; } .case-top, .say, .panel, .case-bar { zoom: 1.3; } }

@media (prefers-reduced-motion: reduce) {
  .curtain-title, .door-title, .play::after, .door-mavis, .mark, .mark.is-hint, .say.is-new, .glasses .is-spill, .scene-flash, .lc-clue__pic.is-new, .tab.is-new .tab__pic, .lc-lock.is-shake { animation: none; }
  .curtain-bar span { transition: none; }
}
