:root {
  --bg: #f4f6f2;
  --surface: #ffffff;
  --surface-2: #eef2ec;
  --text: #1c2420;
  --muted: #5f6b64;
  --border: #d9e0d8;
  --accent: #15803d;
  --accent-2: #166534;
  --accent-soft: #dcfce7;
  --danger: #b91c1c;
  --danger-soft: #fee2e2;
  --warn-soft: #fef3c7;
  --current: #fde68a;
  --shadow: 0 1px 3px rgba(0, 0, 0, .08), 0 4px 16px rgba(0, 0, 0, .05);
  --radius: 10px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #111613;
    --surface: #1a211d;
    --surface-2: #222b26;
    --text: #e6ece8;
    --muted: #9aa8a0;
    --border: #2f3a34;
    --accent: #22c55e;
    --accent-2: #4ade80;
    --accent-soft: #163a24;
    --danger: #f87171;
    --danger-soft: #3b1717;
    --warn-soft: #3a2f12;
    --current: #6b5a1a;
    --shadow: 0 1px 3px rgba(0, 0, 0, .4);
  }
}
:root[data-theme="dark"] {
  --bg: #111613; --surface: #1a211d; --surface-2: #222b26; --text: #e6ece8; --muted: #9aa8a0;
  --border: #2f3a34; --accent: #22c55e; --accent-2: #4ade80; --accent-soft: #163a24;
  --danger: #f87171; --danger-soft: #3b1717; --warn-soft: #3a2f12; --current: #6b5a1a;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font: 15px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
a { color: var(--accent); }
button { font: inherit; color: inherit; }

/* Top bar */
.topbar {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 16px;
  background: linear-gradient(90deg, #14532d, #166534 60%, #15803d);
  color: #fff;
}
.brand { display: flex; align-items: center; gap: 12px; min-width: 0; }
.logo { width: 44px; height: 44px; flex: none; image-rendering: pixelated; filter: drop-shadow(0 1px 2px rgba(0, 0, 0, .3)); }
.brand h1 { font-size: 1.25rem; margin: 0; line-height: 1.2; }
.tagline { margin: 0; font-size: .8rem; opacity: .85; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar .menu-btn { display: none; color: #fff; border-color: rgba(255, 255, 255, .35); background: rgba(255, 255, 255, .08); flex: none; }
.brand > div { min-width: 0; }

/* Layout */
.layout { flex: 1; display: grid; grid-template-columns: 300px 1fr; min-height: 0; }
.sidebar {
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex; flex-direction: column;
  height: calc(100vh - 62px);
  position: sticky; top: 0;
}
.sidebar-head { padding: 12px; border-bottom: 1px solid var(--border); }
#search {
  width: 100%; padding: 8px 10px; border-radius: 8px;
  border: 1px solid var(--border); background: var(--surface-2); color: var(--text);
}
.overall { margin-top: 8px; font-size: .82rem; color: var(--muted); }
.overall .bar { height: 6px; background: var(--surface-2); border-radius: 3px; overflow: hidden; margin-top: 4px; }
.overall .bar span { display: block; height: 100%; background: var(--accent); }

.chapter-list { list-style: none; margin: 0; padding: 6px; overflow-y: auto; flex: 1; }
.chapter-list .part-head {
  display: flex; flex-direction: column; padding: 10px 8px 6px; margin-top: 4px;
  position: sticky; top: -6px; background: var(--surface); z-index: 1; border-bottom: 1px solid var(--border);
}
.chapter-list .part-head:first-child { margin-top: 0; }
.part-label { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--accent); }
.part-title { font-weight: 700; font-size: .88rem; line-height: 1.3; }
.part-prog { font-size: .75rem; color: var(--muted); }
.part-line { margin: 0 0 2px; font-size: .78rem; color: var(--accent); font-weight: 600; }
.chapter-list li button {
  width: 100%; text-align: left; display: grid; grid-template-columns: 26px 1fr auto; gap: 8px; align-items: center;
  padding: 7px 8px; border: 0; background: none; border-radius: 8px; cursor: pointer;
}
.chapter-list li button:hover { background: var(--surface-2); }
.chapter-list li button.active { background: var(--accent-soft); font-weight: 600; }
.chapter-list .num { color: var(--muted); font-size: .8rem; text-align: right; }
.chapter-list .name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .9rem; }
.chapter-list .status { font-size: .75rem; color: var(--muted); white-space: nowrap; }
.chapter-list .status.done { color: var(--accent); font-weight: 700; }

/* Main */
.main {
  display: grid;
  grid-template-columns: minmax(280px, 640px) minmax(300px, 1fr);
  gap: 20px; padding: 16px 20px; align-items: start;
}
.chapter-head { margin-bottom: 10px; }
.chapter-title { display: flex; align-items: center; gap: 8px; }
.chapter-title h2 { font-size: 1.15rem; margin: 0; }
.eco {
  font-size: .75rem; font-weight: 700; padding: 2px 7px; border-radius: 6px;
  background: var(--accent); color: #fff; flex: none;
}
.eco:empty { display: none; }
.opening { margin: 2px 0 0; color: var(--muted); font-size: .85rem; }

/* The board sits inside a gutter so the coordinates are outside the squares. */
.board-wrap { width: 100%; aspect-ratio: 1; padding: 0 0 24px 24px; }
.board { width: 100%; height: 100%; box-shadow: var(--shadow); border-radius: 4px; }
.cg-wrap coords { opacity: 1; font: 700 13px system-ui, sans-serif; }
.cg-wrap coords coord { flex: 1 1 0; display: flex; align-items: center; justify-content: center; color: var(--muted) !important; transform: none !important; }
.cg-wrap coords.ranks { left: -24px; top: 0; width: 24px; height: 100%; }
.cg-wrap coords.files { left: 0; bottom: -24px; width: 100%; height: 24px; text-transform: lowercase; }
.board.shake { animation: shake .35s; }
@keyframes shake {
  20%, 60% { transform: translateX(-6px); }
  40%, 80% { transform: translateX(6px); }
}
cg-board square.move-dest { background: radial-gradient(rgba(20, 85, 30, .5) 19%, rgba(0, 0, 0, 0) 20%); }

.controls { display: flex; justify-content: center; gap: 8px; margin-top: 10px; }
.icon-btn {
  min-width: 44px; height: 40px; padding: 0 10px;
  border-radius: 8px; border: 1px solid var(--border);
  background: var(--surface); cursor: pointer; font-size: 1.05rem;
}
.icon-btn:hover:not(:disabled) { background: var(--surface-2); }
.icon-btn:disabled { opacity: .4; cursor: default; }

/* Panel */
.panel {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 14px; display: flex; flex-direction: column; gap: 12px;
  max-height: calc(100vh - 100px); position: sticky; top: 16px;
}
.tabs { display: grid; grid-template-columns: 1fr 1fr 1fr; background: var(--surface-2); border-radius: 8px; padding: 3px; }
.tab { border: 0; background: none; padding: 8px; border-radius: 6px; cursor: pointer; font-weight: 600; color: var(--muted); }
.tab.active { background: var(--surface); color: var(--text); box-shadow: 0 1px 2px rgba(0, 0, 0, .12); }
.tab:disabled { opacity: .4; cursor: not-allowed; }

.feedback { font-weight: 600; border-radius: 8px; padding: 8px 10px; display: none; }
.feedback.show { display: block; }
.feedback.ok { background: var(--accent-soft); color: var(--accent-2); }
.feedback.bad { background: var(--danger-soft); color: var(--danger); }
.feedback.info { background: var(--warn-soft); }

.comment { white-space: pre-wrap; overflow-wrap: anywhere; background: var(--surface-2); border-radius: 8px; padding: 10px 12px; min-height: 2.6em; }
.comment:empty { display: none; }
.comment .who { color: var(--muted); font-size: .8rem; display: block; margin-bottom: 2px; }
.comment .pre { color: var(--muted); font-style: italic; display: block; }

.branches { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.branches:empty { display: none; }
.branches .label { color: var(--muted); font-size: .85rem; }
.branch-btn {
  border: 1px solid var(--border); background: var(--surface); border-radius: 999px;
  padding: 3px 10px; cursor: pointer; font-weight: 600;
}
.branch-btn.main { border-color: var(--accent); }
.branch-btn:hover { background: var(--surface-2); }

.train-bar, .end-bar { display: flex; flex-direction: column; gap: 8px; }
.train-bar[hidden], .end-bar[hidden] { display: none; }
.train-actions, .end-bar { display: flex; flex-wrap: wrap; gap: 8px; flex-direction: row; }
.btn {
  border: 1px solid var(--border); background: var(--surface); padding: 7px 12px; border-radius: 8px;
  cursor: pointer; font-weight: 600;
}
.btn:hover:not(:disabled) { background: var(--surface-2); }
.btn:disabled { opacity: .4; cursor: default; }
.btn.primary { background: var(--accent); color: #fff; border-color: var(--accent); }
.btn.primary:hover { background: var(--accent-2); }
.btn.small { font-size: .82rem; padding: 5px 9px; }
.line-progress { font-size: .85rem; color: var(--muted); }
.line-progress .dots { display: inline-flex; gap: 4px; vertical-align: middle; margin-left: 6px; flex-wrap: wrap; }
.line-progress .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--border); }
.line-progress .dot.done { background: var(--accent); }
.line-progress .dot.cur { outline: 2px solid var(--text); outline-offset: 1px; }

/* Move list */
.moves {
  overflow-y: auto; flex: 1; min-height: 120px;
  border-top: 1px solid var(--border); padding-top: 10px; line-height: 1.9;
  font-variant-numeric: tabular-nums;
}
.move { cursor: pointer; padding: 1px 4px; border-radius: 4px; font-weight: 600; white-space: nowrap; }
.move:hover { background: var(--surface-2); }
.move.current { background: var(--current); }
.move .nag { color: var(--accent); margin-left: 1px; }
.num { color: var(--muted); margin-left: 4px; font-size: .88em; }
.variation { display: block; margin: 2px 0 2px 12px; padding-left: 8px; border-left: 2px solid var(--border); font-size: .92em; }
.variation .move { font-weight: 500; }
.inline-comment { color: var(--muted); font-size: .88em; margin: 0 3px; overflow-wrap: anywhere; }
.empty-note { color: var(--muted); font-style: italic; }

.chapter-nav { display: flex; justify-content: space-between; align-items: center; gap: 8px; border-top: 1px solid var(--border); padding-top: 10px; }
.small-link { font-size: .82rem; }

.footer {
  display: flex; gap: 8px; justify-content: center; flex-wrap: wrap;
  padding: 14px; color: var(--muted); font-size: .82rem; border-top: 1px solid var(--border);
}
.link-btn { background: none; border: 0; color: var(--muted); text-decoration: underline; cursor: pointer; padding: 0; font-size: inherit; }

.scrim { display: none; }

/* Responsive */
@media (max-width: 1100px) {
  .main { grid-template-columns: 1fr; max-width: 640px; margin: 0 auto; width: 100%; }
  .panel { position: static; max-height: none; }
  .moves { max-height: 320px; }
}
@media (max-width: 860px) {
  .topbar .menu-btn { display: inline-block; }
  .layout { grid-template-columns: 1fr; }
  .sidebar {
    position: fixed; z-index: 30; left: 0; top: 0; bottom: 0; width: min(320px, 85vw); height: 100vh;
    transform: translateX(-100%); transition: transform .2s ease;
  }
  .sidebar.open { transform: none; box-shadow: 4px 0 24px rgba(0, 0, 0, .3); }
  .scrim:not([hidden]) { display: block; position: fixed; inset: 0; background: rgba(0, 0, 0, .4); z-index: 20; }
  .main { padding: 12px 16px; }
  .brand h1 { font-size: 1.05rem; }
  .logo { width: 36px; height: 36px; }
}

/* ---------- Dragon Lair ---------- */
.lair-open-btn {
  margin-left: auto; flex: none;
  border: 1px solid rgba(255, 255, 255, .35); background: rgba(0, 0, 0, .18); color: #fff;
  border-radius: 999px; padding: 7px 14px; font-weight: 700; cursor: pointer;
}
.lair-open-btn:hover { background: rgba(255, 120, 0, .35); }
.btn.dragon { background: linear-gradient(90deg, #b91c1c, #ea580c); color: #fff; border-color: #9a3412; }
.btn.dragon:hover { filter: brightness(1.1); background: linear-gradient(90deg, #b91c1c, #ea580c); }
body.lair-open { overflow: hidden; }

.lair {
  position: fixed; inset: 0; z-index: 100;
  background: radial-gradient(ellipse at top, rgba(120, 30, 0, .75), rgba(0, 0, 0, .85));
  display: flex; align-items: center; justify-content: center; padding: 12px;
}
.lair[hidden] { display: none; }
.lair-card {
  width: min(600px, 100%); max-height: 100%; overflow-y: auto;
  background: #1b1410; color: #fbeee0; border-radius: 16px; padding: 12px;
  border: 1px solid #5a2a12; box-shadow: 0 0 60px rgba(255, 90, 0, .35);
  display: flex; flex-direction: column; gap: 10px;
}
.lair-head { display: flex; align-items: center; gap: 10px; }
.lair-head h2 { margin: 0; font-size: 1.2rem; flex: 1; }
.lair-count { font-size: .85rem; color: #ffb36b; font-weight: 700; white-space: nowrap; }
.lair-icon { background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .15); color: inherit; border-radius: 8px; width: 36px; height: 34px; cursor: pointer; }
.lair-tabs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.lair-tab {
  border: 1px solid #5a2a12; background: #2a1d16; color: #fbeee0; border-radius: 10px;
  padding: 7px 4px; font-weight: 700; font-size: .85rem; cursor: pointer;
}
.lair-tab.active { background: linear-gradient(180deg, #ea580c, #b91c1c); border-color: #fb923c; }
.lair-stage { position: relative; width: 100%; aspect-ratio: 1; border-radius: 8px; overflow: hidden; }
.lair-stage canvas { width: 100%; height: 100%; display: block; touch-action: none; cursor: crosshair; outline: none; }
.lair-overlay {
  position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; padding: 24px; gap: 6px;
  background: rgba(20, 10, 4, .72); backdrop-filter: blur(2px);
}
.lair-overlay[hidden] { display: none; }
.lair-overlay h3 { margin: 0; font-size: 1.6rem; color: #ffd27a; }
.lair-overlay p { margin: 0; max-width: 440px; line-height: 1.45; }
.lair-big { font-size: 3rem; line-height: 1; }
.lair-score { font-size: 2.4rem !important; font-weight: 900; color: #ffb000; }
.lair-muted { color: #c9b2a0; font-size: .9rem; }
.lair-reason { color: #ffb36b; font-weight: 700; }
.lair-btns { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 8px; }
.lair .btn { background: #2a1d16; color: #fbeee0; border-color: #5a2a12; }
.lair .btn.primary { background: linear-gradient(90deg, #dc2626, #ea580c); border-color: #fb923c; color: #fff; }
.lair-foot { display: flex; justify-content: flex-end; }
@media (max-width: 860px) {
  .lair-open-btn span { display: none; }
  .lair-open-btn { padding: 7px 10px; font-size: 1.1rem; }
}
@media (max-width: 480px) {
  .lair { padding: 0; }
  .lair-card { border-radius: 0; min-height: 100%; justify-content: center; }
  .lair-tab { font-size: .75rem; }
  .lair-overlay { padding: 14px; font-size: .9rem; }
  .lair-count { display: none; }
}

/* ---------- player card ---------- */
.player { margin-bottom: 10px; padding: 10px; border-radius: 10px; background: var(--surface-2); }
.player:empty { display: none; }
.p-top { display: flex; align-items: center; gap: 8px; }
.p-icon { font-size: 30px; line-height: 1; }
.p-id { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.25; }
.p-id span { font-size: .78rem; color: var(--muted); }
.p-edit { border: 0; background: none; cursor: pointer; font-size: 1rem; }
.player .bar { height: 7px; background: var(--border); border-radius: 4px; overflow: hidden; margin-top: 8px; }
.player .bar span { display: block; height: 100%; background: linear-gradient(90deg, #f59e0b, #ea580c); }
.p-xp { font-size: .75rem; color: var(--muted); margin-top: 3px; }
.p-review { width: 100%; margin-top: 8px; }

/* ---------- quest ---------- */
.quest[hidden], .quest:empty { display: none; }
.q-home, .q-run { display: flex; flex-direction: column; gap: 10px; }
.q-mission { font-size: .95rem; display: flex; gap: 10px; align-items: center; }
.q-mascot { width: 56px; height: auto; flex: none; }
.q-count { color: var(--muted); font-size: .82rem; white-space: nowrap; }
.q-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; max-height: 260px; overflow-y: auto; }
.q-list button {
  width: 100%; display: grid; grid-template-columns: 28px 1fr auto; gap: 8px; align-items: center; text-align: left;
  border: 1px solid var(--border); background: var(--surface); border-radius: 10px; padding: 8px 10px; cursor: pointer;
}
.q-list button:hover { background: var(--surface-2); }
.q-list button.next { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft); }
.q-n { width: 26px; height: 26px; border-radius: 50%; background: var(--surface-2); display: grid; place-items: center; font-weight: 700; font-size: .82rem; }
.q-label { font-weight: 600; min-width: 0; overflow-wrap: anywhere; }
.q-label small { display: block; font-weight: 400; color: var(--muted); }
.q-st { color: var(--border); letter-spacing: 1px; white-space: nowrap; }
.q-st.got, .q-stars { color: #f59e0b; }
.q-btns { display: flex; flex-wrap: wrap; gap: 8px; }
.btn.big { padding: 10px 16px; font-size: 1rem; }
.q-how, .q-empty { margin: 0; font-size: .82rem; color: var(--muted); }
.q-empty { font-size: .95rem; }
.q-title { font-weight: 700; overflow-wrap: anywhere; }
.q-step { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.q-kind { background: var(--accent); color: #fff; border-radius: 999px; padding: 2px 10px; font-weight: 700; font-size: .85rem; }
.q-range { color: var(--muted); font-size: .85rem; }
.q-hearts { margin-left: auto; letter-spacing: 2px; }
.q-pips { display: flex; flex-wrap: wrap; gap: 4px; }
.q-pip { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-size: .8rem; background: var(--surface-2); filter: grayscale(1); opacity: .55; }
.q-pip.done { background: var(--accent-soft); filter: none; opacity: 1; }
.q-pip.cur { filter: none; opacity: 1; outline: 2px solid var(--accent); }
.q-actions { display: flex; gap: 8px; }
.q-card { border-radius: 10px; padding: 12px; display: flex; flex-direction: column; gap: 6px; }
.q-card p { margin: 0; }
.q-card.win { background: var(--accent-soft); }
.q-card.lose { background: var(--danger-soft); }
.q-stars { font-size: 2rem; line-height: 1; letter-spacing: 4px; }
.q-xp { font-weight: 800; color: var(--accent-2); }
.q-rank { font-weight: 600; }
.move.static { cursor: default; }
.move.static:hover { background: none; }
.move.static.current:hover { background: var(--current); }

/* ---------- engine check (coach view) ---------- */
.move.flag-bad { box-shadow: inset 0 -2px 0 var(--danger); }
.move.flag-warn { box-shadow: inset 0 -2px 0 #d97706; }
.flag-mark { font-size: .75em; margin-left: 2px; color: #d97706; }
.move.flag-bad .flag-mark { color: var(--danger); }
.engine-note { display: block; margin-top: 6px; font-size: .85rem; color: var(--muted); }
.engine-note.bad { color: var(--danger); font-weight: 600; }
.engine-note.warn { color: #b45309; font-weight: 600; }

/* ---------- welcome ---------- */
.welcome {
  position: fixed; inset: 0; z-index: 90; background: rgba(8, 30, 16, .8);
  display: flex; align-items: center; justify-content: center; padding: 12px;
}
.welcome-card {
  width: min(560px, 100%); max-height: 100%; overflow-y: auto; background: var(--surface); color: var(--text);
  border-radius: 16px; padding: 20px; display: flex; flex-direction: column; gap: 10px; text-align: center;
  box-shadow: 0 10px 50px rgba(0, 0, 0, .5);
}
.welcome-card h2, .welcome-card p { margin: 0; }
.w-hero { width: 100%; height: auto; border-radius: 10px; image-rendering: pixelated; }
.w-lead { font-size: 1.05rem; }
.w-moves { font-family: ui-monospace, monospace; background: var(--surface-2); border-radius: 8px; padding: 6px; }
.w-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; text-align: left; }
.w-grid div { background: var(--surface-2); border-radius: 10px; padding: 8px 10px; display: flex; flex-direction: column; gap: 2px; }
.w-grid span { font-size: .84rem; color: var(--muted); }
.w-how { font-size: .88rem; text-align: left; }
.w-name { display: flex; flex-direction: column; gap: 4px; font-weight: 600; text-align: left; }
.w-name input { padding: 10px; border-radius: 8px; border: 1px solid var(--border); background: var(--surface-2); color: var(--text); font: inherit; }
@media (max-width: 520px) { .w-grid { grid-template-columns: 1fr; } }

/* Lair board with coordinates outside the squares */
.lair-board { display: grid; grid-template-columns: 18px 1fr; grid-template-rows: auto 18px; }
.lair-ranks { display: flex; flex-direction: column; }
.lair-files { grid-column: 2; display: flex; }
.lair-ranks span, .lair-files span { flex: 1; display: grid; place-items: center; font: 700 12px system-ui, sans-serif; color: #c9b2a0; }
.lair-lore { font-size: .82rem; color: #ffcf99; font-style: italic; }
@media (max-width: 480px) { .lair-lore { font-size: .74rem; } }

/* ---------- ChatGPT pixel art (PandaDesign AD01-AD14, in img/art/pixel/) ---------- */
.px { display: inline-block; width: 1.3em; height: 1.3em; vertical-align: -.28em; background-repeat: no-repeat; image-rendering: pixelated; }
.px-icon { background-image: url('../img/art/pixel/quest-icons.png'); background-size: 600% 100%; background-position: calc(var(--i) * 20%) 0; }
.px-star { background-image: url('../img/art/pixel/stars.png'); background-size: 200% 100%; background-position: calc(var(--i) * 100%) 0; }
.px-rank { background-image: url('../img/art/pixel/ranks.png'); background-size: 800% 100%; background-position: calc(var(--i) * 100% / 7) 0; }
.px-stars { display: inline-flex; gap: 1px; vertical-align: middle; }
.q-stars .px { width: 40px; height: 40px; }
.q-st .px { width: 18px; height: 18px; }
.p-icon .px { width: 40px; height: 40px; vertical-align: middle; }
.q-rank .px { width: 36px; height: 36px; }
.q-hearts .px { width: 22px; height: 22px; }
.q-pip .px { width: 20px; height: 20px; vertical-align: middle; }
.q-kind .px { filter: drop-shadow(0 0 1px rgba(255, 255, 255, .8)); }
.lair-banner { display: block; width: 100%; height: auto; max-height: 150px; object-fit: cover; border-radius: 10px; image-rendering: pixelated; }
@media (max-height: 760px), (max-width: 480px) { .lair-banner { max-height: 84px; } }
/* Keep the Lair intro and its Start button reachable on small phones. */
.lair-overlay { overflow-y: auto; justify-content: safe center; }
@media (max-width: 480px) {
  .lair-overlay { font-size: .82rem; gap: 4px; }
  .lair-overlay h3 { font-size: 1.25rem; }
  .lair-big { font-size: 2rem; }
}
.p-icon .px { width: 52px; height: 52px; margin: -6px -4px; }
