@font-face {
  font-family: "Big Shoulders Display";
  src: url("assets/fonts/big-shoulders.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: "Zen Kaku Gothic New";
  src: url("assets/fonts/zen-kaku-400.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Zen Kaku Gothic New";
  src: url("assets/fonts/zen-kaku-500.woff2") format("woff2");
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: "Zen Kaku Gothic New";
  src: url("assets/fonts/zen-kaku-700.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}
@font-face {
  font-family: "Yuji Syuku";
  src: url("assets/fonts/yuji-syuku-stamps.woff2") format("woff2");
  font-display: block;
}

:root {
  --ink: #241b2e;
  --night: #1a1220;
  --night-2: #241830;
  --plum: #5b3884;
  --plum-2: #7a55a5;
  --plum-soft: #ece4f5;
  --indigo: #2152a6;
  --sky: #86a9f0;
  --gold: #e2ac4a;
  --gold-2: #c9a24a;
  --paper: #f6f0e4;
  --paper-2: #efe5d2;
  --paper-line: #dccfb6;
  --muted: #7d7086;
  --ok: #3f9a64;
  --red: #c8483d;
  --glass: rgba(26, 16, 32, 0.78);
  --glass-line: rgba(255, 236, 210, 0.14);
  --display:
    "Big Shoulders Display", "Arial Narrow", "Roboto Condensed", Impact,
    sans-serif;
  --body:
    "Zen Kaku Gothic New", "Hiragino Sans", "Segoe UI", system-ui, sans-serif;
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}
html,
body {
  margin: 0;
  height: 100%;
  overflow: hidden;
  background: var(--night);
  color: #f5eee2;
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.45;
  -webkit-text-size-adjust: 100%;
  overscroll-behavior: none;
}
button,
input {
  font: inherit;
  color: inherit;
}
button {
  cursor: pointer;
}
[hidden] {
  display: none !important;
}
:focus-visible {
  outline: 3px solid var(--sky);
  outline-offset: 2px;
}
kbd {
  font-family: var(--display);
  font-weight: 700;
  font-size: 0.8em;
  padding: 0.05em 0.45em;
  border: 1px solid currentColor;
  border-radius: 5px;
  opacity: 0.85;
}

.app {
  position: fixed;
  inset: 0;
  overflow: hidden;
}
.stage {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  touch-action: none;
  cursor: pointer;
}
.fader {
  position: absolute;
  inset: 0;
  background: var(--night);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
  z-index: 90;
}
.fader.on {
  opacity: 1;
}

/* ---------- buttons ---------- */
.btn {
  border: 1px solid rgba(255, 236, 210, 0.3);
  background: rgba(255, 255, 255, 0.06);
  color: inherit;
  border-radius: 999px;
  padding: 0.7em 1.4em;
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transition:
    transform 0.12s ease,
    background 0.2s ease,
    border-color 0.2s ease;
}
.btn:hover {
  background: rgba(255, 255, 255, 0.12);
  transform: translateY(-1px);
}
.btn:active {
  transform: translateY(1px);
}
.btn.primary {
  background: linear-gradient(180deg, #f0c566, var(--gold));
  border-color: #f6d58a;
  color: #2a1a10;
  box-shadow:
    0 6px 18px rgba(226, 172, 74, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.5);
}
.btn.primary:hover {
  background: linear-gradient(180deg, #f6d078, #e8b556);
}
.btn.big {
  font-size: 1.35rem;
  padding: 0.75em 1.8em;
}
.btn.small {
  font-size: 0.9rem;
  padding: 0.45em 1em;
}
.btn.ghost {
  background: transparent;
}
.btn:disabled {
  opacity: 0.45;
  cursor: default;
  transform: none;
}
.icon-btn {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid var(--glass-line);
  background: rgba(255, 255, 255, 0.06);
  display: inline-grid;
  place-items: center;
  flex: none;
}
.icon-btn svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
}
.icon-btn.light {
  border-color: rgba(255, 255, 255, 0.35);
}

/* ---------- screens ---------- */
.screen {
  position: absolute;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  padding: calc(16px + var(--safe-t)) 16px calc(16px + var(--safe-b));
  overflow: auto;
}
.keyart {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -2;
  animation: drift 40s ease-in-out infinite alternate;
}
@keyframes drift {
  from {
    transform: scale(1.04) translate(0, 0);
  }
  to {
    transform: scale(1.1) translate(-1.5%, -1%);
  }
}
.title-screen {
  place-items: stretch;
  padding: 0;
  overflow: hidden;
  background: var(--night);
}
.title-screen::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(
      90deg,
      rgba(22, 12, 30, 0.88) 0%,
      rgba(22, 12, 30, 0.62) 34%,
      rgba(22, 12, 30, 0) 62%
    ),
    radial-gradient(
      120% 90% at 0% 0%,
      rgba(22, 12, 30, 0.7) 0%,
      rgba(22, 12, 30, 0.3) 45%,
      rgba(22, 12, 30, 0) 70%
    ),
    linear-gradient(0deg, rgba(20, 10, 26, 0.85), transparent 35%);
}
.title-inner {
  align-self: start;
  padding: calc(6vh + var(--safe-t)) clamp(20px, 6vw, 80px) 0;
  max-width: 640px;
}
.kicker {
  font-family: var(--display);
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-size: 0.85rem;
  color: var(--gold);
  margin: 0 0 0.4rem;
}
.logo {
  font-family: var(--display);
  font-weight: 800;
  text-transform: uppercase;
  line-height: 0.82;
  font-size: clamp(4.4rem, 15vw, 10.5rem);
  margin: 0;
  letter-spacing: 0.01em;
  color: #fff6e6;
  text-shadow: 0 6px 40px rgba(0, 0, 0, 0.45);
}
.logo span {
  display: block;
}
.logo span:last-child {
  color: transparent;
  -webkit-text-stroke: 2px #fff6e6;
  position: relative;
}
.tagline {
  text-shadow: 0 2px 14px rgba(10, 4, 16, 0.8);
  font-size: clamp(1rem, 2.2vw, 1.2rem);
  max-width: 30em;
  color: #eadfd0;
  margin: 1rem 0 1.6rem;
}
.menu {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}
.best {
  margin-top: 1.2rem;
  font-size: 0.95rem;
  color: #d7c9b8;
}
.home {
  position: absolute;
  left: clamp(20px, 6vw, 80px);
  bottom: calc(18px + var(--safe-b));
  color: #d7c9b8;
  font-family: var(--display);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 0.85rem;
  text-decoration: none;
}
.home:hover {
  color: #fff;
}
.loading {
  position: absolute;
  right: clamp(20px, 5vw, 60px);
  bottom: calc(18px + var(--safe-b));
  font-family: var(--display);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 0.85rem;
  color: #d7c9b8;
  margin: 0;
}

/* Booklet-paper panels */
.paper {
  color-scheme: light;
  position: relative;
  background:
    repeating-linear-gradient(
      0deg,
      transparent 0 31px,
      rgba(150, 120, 80, 0.07) 31px 32px
    ),
    linear-gradient(160deg, var(--paper), var(--paper-2));
  color: var(--ink);
  border-radius: 18px;
  padding: clamp(18px, 4vw, 34px);
  width: min(560px, 100%);
  box-shadow:
    0 30px 80px rgba(0, 0, 0, 0.5),
    inset 0 0 0 1px rgba(255, 255, 255, 0.6);
}
.paper::before {
  content: "";
  position: absolute;
  inset: 10px;
  border: 1.5px solid rgba(91, 56, 132, 0.18);
  border-radius: 12px;
  pointer-events: none;
}
.paper.wide {
  width: min(760px, 100%);
}
.paper h2 {
  font-family: var(--display);
  font-weight: 800;
  text-transform: uppercase;
  font-size: clamp(2rem, 6vw, 2.8rem);
  line-height: 0.95;
  margin: 0 0 1rem;
  color: var(--plum);
}
.screen.setup,
.screen.howto,
.screen.stamps,
.screen.pause {
  background: rgba(14, 8, 18, 0.72);
  backdrop-filter: blur(6px);
}
.field {
  border: 0;
  padding: 0;
  margin: 0 0 1.1rem;
}
.field legend {
  font-family: var(--display);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-size: 0.95rem;
  color: var(--muted);
  margin-bottom: 0.45rem;
}
.field legend em {
  font-style: normal;
  color: var(--plum-2);
  margin-left: 0.4em;
}
.choices,
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.choice,
.chip {
  border: 1.5px solid var(--paper-line);
  background: rgba(255, 255, 255, 0.55);
  color: var(--ink);
  border-radius: 12px;
  padding: 0.55em 0.9em;
  text-align: left;
  line-height: 1.2;
  transition:
    border-color 0.15s,
    background 0.15s,
    transform 0.1s;
}
.choice b,
.chip b {
  display: block;
  font-weight: 700;
}
.choice small,
.chip small {
  color: var(--muted);
  font-size: 0.78rem;
}
.choice[aria-pressed="true"],
.chip[aria-pressed="true"] {
  border-color: var(--plum);
  background: var(--plum-soft);
  box-shadow: 0 0 0 1px var(--plum) inset;
}
.choice:hover,
.chip:hover {
  transform: translateY(-1px);
}
.row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}
.row.end {
  justify-content: flex-end;
  margin-top: 1.2rem;
}
.paper .btn.ghost {
  color: var(--plum);
  border-color: rgba(91, 56, 132, 0.35);
}
.steps {
  margin: 0;
  padding-left: 1.3em;
  display: grid;
  gap: 0.7rem;
}
.steps b {
  color: var(--plum);
}
.fine {
  font-size: 0.85rem;
  color: var(--muted);
  margin: 1rem 0 0;
}
.sliders {
  display: grid;
  gap: 0.6rem;
  margin-bottom: 1rem;
}
.sliders label {
  display: grid;
  grid-template-columns: 5em 1fr;
  align-items: center;
  gap: 0.8rem;
  font-weight: 700;
}
input[type="range"] {
  accent-color: var(--plum);
}
.toggle {
  display: flex;
  gap: 0.6em;
  align-items: center;
  margin: 0.4rem 0;
}
.toggle input {
  accent-color: var(--plum);
  width: 1.1em;
  height: 1.1em;
}

/* Stamp book */
.stampgrid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(118px, 1fr));
  gap: 12px;
  margin-top: 1rem;
}
.stamp {
  display: grid;
  justify-items: center;
  gap: 6px;
  text-align: center;
  font-size: 0.8rem;
  color: var(--muted);
}
.seal {
  width: 74px;
  height: 74px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  font-family: "Yuji Syuku", serif;
  font-size: 1.55rem;
  line-height: 1;
  border: 3px dashed rgba(91, 56, 132, 0.25);
  color: rgba(91, 56, 132, 0.25);
  writing-mode: vertical-rl;
}
.stamp.got .seal {
  border: 3px solid #b8322a;
  color: #b8322a;
  background: rgba(184, 50, 42, 0.06);
  transform: rotate(-4deg);
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.4);
}
.stamp.got {
  color: var(--ink);
  font-weight: 700;
}

/* ---------- HUD ---------- */
.hud {
  position: absolute;
  z-index: 20;
  top: calc(10px + var(--safe-t));
  left: 10px;
  right: 10px;
  display: flex;
  align-items: center;
  gap: 10px;
  pointer-events: none;
}
.hud > * {
  pointer-events: auto;
  background: var(--glass);
  border: 1px solid var(--glass-line);
  border-radius: 14px;
  backdrop-filter: blur(8px);
  padding: 7px 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}
.hud .icon-btn {
  padding: 0;
  margin-left: auto;
  border-radius: 50%;
}
.hud-clock {
  display: grid;
  gap: 4px;
  min-width: 150px;
}
.clock {
  font-family: var(--display);
  font-weight: 800;
  font-size: 1.7rem;
  line-height: 1;
  letter-spacing: 0.02em;
}
.clock.late {
  color: #ffb08a;
}
.timeline {
  position: relative;
  height: 5px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.14);
}
.timeline i {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0;
  border-radius: 3px;
  background: linear-gradient(90deg, #f0c566, #e2764a);
}
.timeline .mark {
  position: absolute;
  top: -3px;
  width: 2px;
  height: 11px;
  background: #fff6e6;
  opacity: 0.7;
}
.timeline .m6 {
  left: 50%;
}
.timeline .m745 {
  left: 93.75%;
}
.lbl {
  display: block;
  font-family: var(--display);
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 0.68rem;
  color: #bfaecf;
}
.val {
  font-family: var(--display);
  font-weight: 800;
  font-size: 1.25rem;
  line-height: 1.05;
}
.hud-buzz {
  display: flex;
  align-items: center;
  gap: 8px;
}
.cup {
  width: 34px;
  height: 34px;
}
.cup-body {
  fill: #fbf8f2;
  stroke: #2a1c30;
  stroke-width: 1;
}
.cup-fill {
  fill: #f0c566;
  transition:
    y 0.5s ease,
    height 0.5s ease,
    fill 0.5s ease;
}
.cup-ring {
  fill: none;
  stroke: var(--indigo);
  stroke-width: 1.4;
}
.hud-buzz[data-level="tipsy"] .val,
.hud-buzz[data-level="wobbly"] .val {
  color: #ffc07a;
}
.hud-buzz[data-level="spinning"] .val {
  color: #ff8a70;
  animation: wob 1.2s ease-in-out infinite;
}
.hud-buzz[data-level="spinning"] .cup-fill,
.hud-buzz[data-level="wobbly"] .cup-fill {
  fill: #e2764a;
}
@keyframes wob {
  50% {
    transform: translateX(2px) rotate(-1deg);
  }
}
.hud-score .val.bump {
  animation: bump 0.5s ease;
}
@keyframes bump {
  30% {
    transform: scale(1.25);
    color: #ffe08a;
  }
}

.place {
  position: absolute;
  z-index: 15;
  top: calc(84px + var(--safe-t));
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--display);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.24em;
  font-size: 0.95rem;
  color: #fff6e6;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.6);
  opacity: 0;
  transition: opacity 0.6s ease;
  pointer-events: none;
  white-space: nowrap;
}
.place.show {
  opacity: 1;
}

.checklist {
  position: absolute;
  z-index: 15;
  right: 10px;
  top: calc(80px + var(--safe-t));
  width: 290px;
  background: var(--glass);
  border: 1px solid var(--glass-line);
  border-radius: 14px;
  backdrop-filter: blur(8px);
  padding: 10px 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}
.checklist h3 {
  margin: 0 0 6px;
  font-family: var(--display);
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-size: 0.8rem;
  color: #bfaecf;
}
.checklist ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 6px;
}
.req {
  display: grid;
  grid-template-columns: 28px 1fr auto;
  gap: 8px;
  align-items: center;
  font-size: 0.86rem;
  line-height: 1.25;
}
.req img {
  width: 28px;
  height: 28px;
  border-radius: 50%;
}
.req .due {
  font-family: var(--display);
  font-weight: 700;
  font-size: 0.85rem;
  color: #bfaecf;
}
.req.urgent .due {
  color: #ffb08a;
}
.req.ready .due {
  color: #8fe0a8;
}
.req.done {
  opacity: 0.55;
  text-decoration: line-through;
}

/* Toasts */
.toasts {
  position: absolute;
  z-index: 30;
  left: 10px;
  top: calc(80px + var(--safe-t));
  display: grid;
  gap: 8px;
  width: min(360px, calc(100% - 20px));
  pointer-events: none;
}
.toast {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 10px;
  align-items: center;
  background: var(--glass);
  border: 1px solid var(--glass-line);
  border-radius: 14px;
  padding: 8px 12px 8px 8px;
  backdrop-filter: blur(8px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  animation: toastIn 0.35s cubic-bezier(0.2, 0.9, 0.3, 1.2);
  font-size: 0.9rem;
  line-height: 1.3;
  pointer-events: auto;
}
.toast.out {
  animation: toastOut 0.35s ease forwards;
}
.toast img {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
}
.toast.event {
  grid-template-columns: 76px 1fr;
  border-color: rgba(240, 197, 102, 0.45);
}
.toast.event img {
  width: 76px;
  height: 76px;
  border-radius: 10px;
}
.toast b {
  display: block;
  font-family: var(--display);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-size: 0.95rem;
}
.toast.good b {
  color: #8fe0a8;
}
.toast.gold b {
  color: #ffd98a;
}
.toast.bad b {
  color: #ffb08a;
}
@keyframes toastIn {
  from {
    transform: translateX(-30px);
    opacity: 0;
  }
}
@keyframes toastOut {
  to {
    transform: translateX(-30px);
    opacity: 0;
  }
}

/* Dock */
.dock {
  position: absolute;
  z-index: 20;
  left: 50%;
  bottom: calc(14px + var(--safe-b));
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
  align-items: stretch;
  width: min(640px, calc(100% - 20px));
}
.phone-btn,
.act-btn,
.zoom button {
  background: var(--glass);
  border: 1px solid var(--glass-line);
  backdrop-filter: blur(8px);
  border-radius: 16px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}
.phone-btn {
  position: relative;
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 1px;
  padding: 6px 14px;
  font-family: var(--display);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-size: 0.72rem;
}
.phone-btn svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
}
.badge {
  position: absolute;
  top: -6px;
  right: -6px;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 11px;
  background: var(--red);
  color: #fff;
  font-family: var(--display);
  font-size: 0.85rem;
  display: grid;
  place-items: center;
  box-shadow: 0 0 0 2px var(--night);
  animation: pop 0.4s ease;
}
@keyframes pop {
  40% {
    transform: scale(1.3);
  }
}
.act-btn {
  flex: 1;
  min-height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 8px 16px;
  font-family: var(--display);
  font-weight: 800;
  font-size: 1.2rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transition:
    background 0.2s,
    transform 0.1s,
    opacity 0.2s;
}
.act-btn:not(:disabled) {
  background: linear-gradient(180deg, #7a55a5, #5b3884);
  border-color: rgba(255, 255, 255, 0.3);
}
.act-btn:not(:disabled):hover {
  transform: translateY(-1px);
}
.act-btn:disabled {
  opacity: 0.7;
  cursor: default;
  color: #cbbdd8;
}
.act-btn kbd {
  font-size: 0.75rem;
}
.zoom {
  display: grid;
  gap: 4px;
}
.zoom button {
  width: 40px;
  flex: 1;
  font-family: var(--display);
  font-weight: 800;
  font-size: 1.2rem;
  border-radius: 12px;
}

/* ---------- phone ---------- */
.phone {
  position: absolute;
  z-index: 50;
  inset: 0;
  display: grid;
  place-items: center;
  padding: calc(12px + var(--safe-t)) 12px calc(12px + var(--safe-b));
  background: rgba(10, 6, 14, 0.45);
  animation: fadeIn 0.2s ease;
}
@keyframes fadeIn {
  from {
    opacity: 0;
  }
}
.phone-shell {
  color-scheme: light;
  width: min(420px, 100%);
  height: min(760px, 100%);
  display: grid;
  grid-template-rows: auto 1fr auto;
  background: #f5f3f8;
  color: var(--ink);
  border-radius: 30px;
  overflow: hidden;
  border: 8px solid #0e0a12;
  box-shadow:
    0 40px 90px rgba(0, 0, 0, 0.6),
    0 0 0 1px rgba(255, 255, 255, 0.08);
  animation: phoneUp 0.32s cubic-bezier(0.2, 0.9, 0.3, 1.1);
}
@keyframes phoneUp {
  from {
    transform: translateY(40px) rotate(2deg);
    opacity: 0;
  }
}
.phone-top {
  background: var(--plum);
  color: #fff;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 12px 12px 14px;
}
.phone-mark {
  width: 36px;
  height: 36px;
  flex: none;
}
.phone-mark circle {
  fill: #fff;
}
.phone-mark .r {
  fill: none;
  stroke: var(--indigo);
  stroke-width: 4;
}
.phone-top > div {
  flex: 1;
  min-width: 0;
}
.phone-ev {
  font-family: var(--display);
  font-weight: 800;
  font-size: 1.6rem;
  text-transform: uppercase;
  line-height: 0.95;
}
.phone-sub {
  font-size: 0.8rem;
  opacity: 0.85;
}
.phone-body {
  overflow: auto;
  padding: 12px;
  -webkit-overflow-scrolling: touch;
}
.phone-tabs {
  display: flex;
  border-top: 1px solid #e1daea;
  background: #fff;
}
.phone-tabs button {
  flex: 1;
  border: 0;
  background: none;
  padding: 12px 4px;
  font-size: 0.82rem;
  color: #6b6177;
  position: relative;
}
.phone-tabs button[aria-current="page"] {
  color: var(--plum);
  font-weight: 700;
  box-shadow: inset 0 3px 0 var(--plum);
}
.phone-tabs .dot {
  position: absolute;
  top: 6px;
  right: 18%;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--red);
}

.chat {
  display: grid;
  gap: 10px;
}
.msg {
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 8px;
  align-items: end;
}
.msg img {
  width: 34px;
  height: 34px;
  border-radius: 50%;
}
.bubble {
  background: #fff;
  border: 1px solid #e1daea;
  border-radius: 16px 16px 16px 4px;
  padding: 8px 11px;
  font-size: 0.92rem;
  line-height: 1.35;
}
.bubble .who {
  display: block;
  font-size: 0.72rem;
  color: #6b6177;
  font-weight: 700;
  margin-bottom: 1px;
}
.bubble .when {
  font-size: 0.7rem;
  color: #9a8fa6;
  margin-left: 6px;
  font-weight: 400;
}
.reqcard {
  margin-top: 7px;
  border-radius: 10px;
  border: 1px solid #d9cce8;
  background: #f4eefb;
  padding: 7px 9px;
  font-size: 0.82rem;
  display: grid;
  gap: 4px;
}
.reqcard .st {
  font-family: var(--display);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 700;
  font-size: 0.78rem;
}
.reqcard.done {
  border-color: #a9dbb9;
  background: #eef9f1;
}
.reqcard.done .st {
  color: var(--ok);
}
.reqcard.missed {
  opacity: 0.6;
}
.reqcard .row {
  gap: 6px;
}
.mini {
  border: 1px solid #cdbfe0;
  background: #fff;
  color: var(--plum);
  border-radius: 999px;
  padding: 3px 10px;
  font-size: 0.78rem;
  font-weight: 700;
}
.me {
  justify-self: end;
  background: var(--plum);
  color: #fff;
  border-radius: 16px 16px 4px 16px;
  padding: 7px 11px;
  font-size: 0.88rem;
  max-width: 80%;
}

.pmap {
  display: grid;
  gap: 8px;
}
.pmap .seg {
  display: inline-flex;
  background: #fff;
  border: 1px solid #e1daea;
  border-radius: 999px;
  padding: 3px;
  justify-self: start;
}
.pmap .seg button {
  border: 0;
  background: none;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 0.85rem;
  color: #6b6177;
}
.pmap .seg button[aria-pressed="true"] {
  background: var(--plum);
  color: #fff;
  font-weight: 700;
}
.pmap svg {
  width: 100%;
  height: auto;
  background: #fff;
  border: 1px solid #e1daea;
  border-radius: 14px;
  display: block;
  touch-action: manipulation;
}
.pmap .room {
  fill: #fbfafd;
  stroke: #cfc5dc;
  stroke-width: 1.5;
}
.pmap .tbl {
  cursor: pointer;
}
.pmap .tbl rect,
.pmap .tbl circle {
  stroke: #cfc5dc;
  stroke-width: 1;
  fill: #e6e0ee;
}
.pmap .tbl.tried rect,
.pmap .tbl.tried circle {
  fill: #b79bd6;
}
.pmap .tbl.mark rect,
.pmap .tbl.mark circle {
  fill: #f0c566;
  stroke: #b0782a;
}
.pmap .tbl.rare rect,
.pmap .tbl.rare circle {
  fill: #ffd98a;
  stroke: #c98a1e;
  stroke-width: 2.5;
}
.pmap .tbl text {
  font-size: 9.5px;
  font-weight: 700;
  fill: #3a3044;
  pointer-events: none;
}
.pmap .me-dot {
  fill: var(--indigo);
  stroke: #fff;
  stroke-width: 2;
}
.pmap .feat {
  font-size: 12px;
}
.pmap .legend {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  font-size: 0.75rem;
  color: #6b6177;
}
.pmap .legend i {
  display: inline-block;
  width: 12px;
  height: 9px;
  border-radius: 2px;
  margin-right: 4px;
  vertical-align: -1px;
}
.pmap .legend .l0 {
  background: #e6e0ee;
}
.pmap .legend .l1 {
  background: #b79bd6;
}
.pmap .legend .l2 {
  background: #f0c566;
}
.vend {
  background: #fff;
  border: 1px solid #e1daea;
  border-radius: 14px;
  padding: 10px 12px;
}
.vend h4 {
  margin: 0;
  font-family: var(--display);
  font-size: 1.3rem;
  font-weight: 800;
  text-transform: uppercase;
  line-height: 1;
}
.vend .loc {
  font-size: 0.8rem;
  color: #6b6177;
}
.srow {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 1px 10px;
  border-bottom: 1px solid #eee7f3;
  padding: 7px 0;
  font-size: 0.88rem;
}
.srow:last-child {
  border-bottom: 0;
}
.srow .sn {
  font-weight: 700;
  line-height: 1.25;
}
.srow .sg {
  font-size: 0.78rem;
  color: #6b6177;
}
.srow .sp {
  grid-row: 1 / span 2;
  grid-column: 2;
  align-self: center;
  text-align: right;
  font-size: 0.82rem;
  color: #6b6177;
}
.srow .tag {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 700;
  border-radius: 6px;
  padding: 0 5px;
  margin-left: 4px;
  background: #e2eaf9;
  color: var(--indigo);
}
.srow .tag.hit {
  background: #fdf0d2;
  color: #8a5a10;
}
.find input {
  width: 100%;
  border: 1px solid #e1daea;
  background: #fff;
  border-radius: 12px;
  padding: 11px 13px;
  font-size: 16px;
}
.fchips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 8px 0;
}
.fchips button {
  flex: none;
  border: 1px solid #e1daea;
  background: #fff;
  border-radius: 999px;
  padding: 5px 11px;
  font-size: 0.82rem;
}
.fchips button[aria-pressed="true"] {
  background: var(--plum-soft);
  border-color: var(--plum-2);
  color: var(--plum);
  font-weight: 700;
}
.fres {
  display: grid;
  gap: 8px;
}
.fres .vend {
  padding: 8px 10px;
}
.go {
  margin-top: 6px;
}
.empty {
  text-align: center;
  color: #6b6177;
  padding: 24px 8px;
  font-size: 0.9rem;
}
.buy .total {
  display: flex;
  justify-content: space-between;
  font-family: var(--display);
  font-weight: 800;
  font-size: 1.3rem;
  margin: 8px 2px;
}
.buy .over {
  color: var(--red);
}

/* ---------- pour sheet ---------- */
.pour {
  position: absolute;
  z-index: 45;
  inset: 0;
  display: grid;
  align-items: end;
  justify-items: center;
  padding: 12px 12px calc(12px + var(--safe-b));
  background: linear-gradient(
    0deg,
    rgba(10, 6, 14, 0.6),
    rgba(10, 6, 14, 0.15)
  );
  animation: fadeIn 0.2s ease;
}
.pour-card {
  color-scheme: light;
  width: min(880px, 100%);
  max-height: min(86vh, 720px);
  display: grid;
  grid-template-rows: auto 1fr;
  background:
    repeating-linear-gradient(
      0deg,
      transparent 0 27px,
      rgba(150, 120, 80, 0.06) 27px 28px
    ),
    linear-gradient(160deg, var(--paper), var(--paper-2));
  color: var(--ink);
  border-radius: 22px;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.55);
  overflow: hidden;
  animation: phoneUp 0.3s cubic-bezier(0.2, 0.9, 0.3, 1.1);
}
.pour-head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px 18px 10px;
  border-bottom: 1.5px dashed var(--paper-line);
}
.pour-head > div {
  flex: 1;
  min-width: 0;
}
.pour-head .kicker {
  color: var(--plum-2);
}
.pour-head h2 {
  margin: 0;
  font-family: var(--display);
  font-weight: 800;
  text-transform: uppercase;
  font-size: clamp(1.6rem, 5vw, 2.3rem);
  line-height: 0.95;
}
.pour .btn.ghost {
  color: var(--plum);
  border-color: rgba(91, 56, 132, 0.35);
}
.pour-body {
  overflow: auto;
  padding: 14px 16px 18px;
}
.lineup {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 12px;
}
.bottle {
  position: relative;
  display: grid;
  grid-template-rows: 150px auto;
  border: 1.5px solid var(--paper-line);
  background: rgba(255, 255, 255, 0.55);
  border-radius: 16px;
  padding: 10px 10px 12px;
  text-align: left;
  transition:
    transform 0.15s ease,
    box-shadow 0.15s ease,
    border-color 0.15s;
  color: var(--ink);
}
.bottle:hover,
.bottle:focus-visible {
  transform: translateY(-4px);
  box-shadow: 0 12px 26px rgba(60, 30, 70, 0.18);
  border-color: var(--plum-2);
}
.bottle img {
  justify-self: center;
  align-self: end;
  max-height: 146px;
  filter: drop-shadow(0 6px 6px rgba(40, 20, 30, 0.25));
}
.bottle .bn {
  font-weight: 700;
  line-height: 1.2;
  margin-top: 8px;
  font-size: 0.92rem;
}
.bottle .bg {
  font-size: 0.78rem;
  color: var(--muted);
  line-height: 1.25;
}
.bottle .bp {
  font-family: var(--display);
  font-weight: 800;
  font-size: 1.05rem;
  margin-top: 3px;
}
.bottle .flags {
  position: absolute;
  top: 8px;
  left: 8px;
  right: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.flag {
  font-size: 0.66rem;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 6px;
  background: var(--plum-soft);
  color: var(--plum);
}
.flag.req {
  background: #fdf0d2;
  color: #8a5a10;
}
.flag.new {
  background: #e2eaf9;
  color: var(--indigo);
}
.flag.rare {
  background: #ffd98a;
  color: #5a3a00;
}
.flag.tried {
  background: #e8e2d6;
  color: #6b5a44;
}
.bottle.rare {
  border-color: #e2ac4a;
  box-shadow: 0 0 0 2px rgba(226, 172, 74, 0.35);
}

.tasting {
  display: grid;
  grid-template-columns: minmax(120px, 200px) 1fr;
  gap: 18px;
  align-items: start;
}
.pourcup {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(
    circle at 50% 42%,
    #ffffff 0%,
    #f5f1ea 60%,
    #e2d8c8 100%
  );
  box-shadow:
    inset 0 -10px 24px rgba(80, 60, 40, 0.18),
    0 16px 30px rgba(40, 20, 30, 0.25);
  display: grid;
  place-items: center;
  overflow: hidden;
}
.pourcup::before,
.pourcup::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  border: 7px solid var(--indigo);
}
.pourcup::before {
  inset: 16%;
}
.pourcup::after {
  inset: 38%;
}
.pourcup .liquid {
  position: absolute;
  inset: 8%;
  border-radius: 50%;
  background: radial-gradient(
    circle at 45% 38%,
    rgba(255, 255, 255, 0.55),
    var(--sake, rgba(250, 240, 200, 0.25)) 55%
  );
  transform: scale(0);
  transition: transform 1.1s cubic-bezier(0.3, 0.7, 0.2, 1);
  z-index: 1;
  mix-blend-mode: multiply;
}
.pourcup.full .liquid {
  transform: scale(1);
}
.pourcup .liquid.cloudy {
  background: radial-gradient(
    circle at 45% 38%,
    rgba(255, 255, 255, 0.95),
    rgba(240, 236, 226, 0.92) 60%
  );
  mix-blend-mode: normal;
}
.pourcup .bubbles {
  position: absolute;
  inset: 20%;
  z-index: 2;
  background-image:
    radial-gradient(circle, rgba(255, 255, 255, 0.9) 1.5px, transparent 2px),
    radial-gradient(circle, rgba(255, 255, 255, 0.8) 1px, transparent 1.5px);
  background-size:
    18px 22px,
    13px 17px;
  animation: fizz 1.4s linear infinite;
  opacity: 0;
}
.pourcup.full .bubbles.on {
  opacity: 1;
}
@keyframes fizz {
  to {
    background-position:
      0 -44px,
      0 -34px;
  }
}
.tnote h3 {
  margin: 0;
  font-family: var(--display);
  font-weight: 800;
  text-transform: uppercase;
  font-size: 1.7rem;
  line-height: 1;
}
.tnote .sub {
  color: var(--muted);
  font-size: 0.88rem;
  margin: 3px 0 8px;
}
.tnote .note {
  font-size: 1.05rem;
  font-style: italic;
  margin: 6px 0;
}
.tnote .note.blur {
  filter: blur(1.1px);
  letter-spacing: 0.04em;
}
.meters {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 6px 12px;
  margin: 6px 0;
}
.meter {
  font-size: 0.8rem;
}
.meter b {
  display: block;
  font-family: var(--display);
  font-weight: 800;
  font-size: 1.15rem;
}
.meter span {
  color: var(--muted);
}
.smvbar {
  position: relative;
  height: 8px;
  border-radius: 4px;
  background: linear-gradient(90deg, #e7b3c8, #ede3f4 45%, #bbd0f3);
  margin: 4px 0 2px;
}
.smvbar i {
  position: absolute;
  top: -4px;
  width: 4px;
  height: 16px;
  border-radius: 2px;
  background: var(--ink);
  transform: translateX(-50%);
  left: var(--at, 50%);
  transition: left 0.8s cubic-bezier(0.3, 0.7, 0.2, 1);
}
.badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 6px 0;
}
.badge-s {
  border: 1px solid var(--plum-2);
  color: var(--plum);
  background: var(--plum-soft);
  border-radius: 8px;
  padding: 2px 8px;
  font-size: 0.8rem;
  font-weight: 700;
}
.gloss {
  font-size: 0.82rem;
  line-height: 1.35;
  background: var(--plum-soft);
  border-radius: 10px;
  padding: 7px 10px;
  margin: 6px 0;
}
.gloss p {
  margin: 0;
}
.gloss p + p {
  margin-top: 4px;
}
.wins {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 8px 0;
}
.win {
  display: flex;
  gap: 8px;
  align-items: center;
  font-size: 0.88rem;
  font-weight: 700;
  background: #fff7e2;
  border: 1px solid #f0d28f;
  border-radius: 10px;
  padding: 5px 9px;
}
.win img {
  width: 24px;
  height: 24px;
  border-radius: 50%;
}
.win.style {
  background: #eef3fd;
  border-color: #bfd0f2;
}
.decide {
  position: sticky;
  bottom: -18px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 10px -4px -18px;
  padding: 10px 4px 16px;
  background: linear-gradient(0deg, var(--paper-2) 70%, rgba(239, 229, 210, 0));
}
.decide .btn {
  width: 100%;
  text-transform: none;
  letter-spacing: 0.01em;
  font-size: 1.05rem;
  padding: 0.8em 0.8em;
  line-height: 1.15;
}
.decide .btn small {
  display: block;
  font-family: var(--body);
  font-weight: 500;
  font-size: 0.78rem;
  opacity: 0.8;
}
.decide .dump {
  background: #fff;
  color: var(--ink);
  border-color: var(--paper-line);
}
.buytoggle {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  font-weight: 700;
}
.buytoggle input {
  width: 1.2em;
  height: 1.2em;
  accent-color: var(--plum);
}

/* ---------- end ---------- */
.end {
  place-items: stretch;
  padding: 0;
  overflow: hidden;
}
.end::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(
    90deg,
    rgba(18, 10, 26, 0.95) 0%,
    rgba(18, 10, 26, 0.86) 45%,
    rgba(18, 10, 26, 0.3) 100%
  );
}
.end-inner {
  max-height: 100%;
  overflow: auto;
  padding: calc(4vh + var(--safe-t)) clamp(18px, 5vw, 64px)
    calc(24px + var(--safe-b));
  max-width: 1040px;
  overflow: auto;
}
.end-title {
  font-family: var(--display);
  font-weight: 800;
  text-transform: uppercase;
  font-size: clamp(3rem, 10vw, 6.5rem);
  line-height: 0.85;
  margin: 0 0 1.4rem;
}
.end-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 24px;
  align-items: start;
}
.tally {
  display: grid;
  gap: 8px;
}
.tline {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px dashed rgba(255, 236, 210, 0.2);
  padding: 6px 0;
  font-size: 1.05rem;
  opacity: 0;
  transform: translateY(8px);
  animation: tin 0.45s ease forwards;
}
.tline b {
  font-family: var(--display);
  font-weight: 800;
  font-size: 1.35rem;
}
.tline small {
  display: block;
  color: #bfaecf;
  font-size: 0.8rem;
}
.tline.total {
  border-bottom: 0;
  border-top: 2px solid rgba(255, 236, 210, 0.5);
  margin-top: 6px;
  font-size: 1.3rem;
}
.tline.total b {
  font-size: 2.6rem;
  color: #ffd98a;
}
@keyframes tin {
  to {
    opacity: 1;
    transform: none;
  }
}
.receipt {
  background: #fbf8f1;
  color: #2a2230;
  font-family: "Courier New", ui-monospace, monospace;
  font-size: 0.82rem;
  padding: 18px 16px 22px;
  border-radius: 4px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
  transform: rotate(1.2deg);
  position: relative;
}
.receipt::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -8px;
  height: 8px;
  background: radial-gradient(
      circle at 6px -2px,
      transparent 6px,
      #fbf8f1 6.5px
    )
    0 0 / 12px 8px repeat-x;
}
.receipt h4 {
  text-align: center;
  margin: 0 0 8px;
  font-size: 1rem;
  letter-spacing: 0.2em;
}
.receipt .rl {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 2px 0;
}
.receipt hr {
  border: 0;
  border-top: 1px dashed #b9ad9c;
  margin: 8px 0;
}
.receipt .friends {
  margin-top: 10px;
  font-family: var(--body);
  display: grid;
  gap: 6px;
}
.receipt .friends div {
  display: flex;
  gap: 8px;
  align-items: center;
}
.receipt .friends img {
  width: 26px;
  height: 26px;
  border-radius: 50%;
}
.end-actions {
  margin-top: 1.6rem;
}

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .checklist {
    display: none;
  }
}
@media (max-width: 640px) {
  .hud {
    gap: 6px;
    flex-wrap: wrap;
  }
  .hud > * {
    padding: 5px 9px;
  }
  .hud-clock {
    min-width: 0;
    flex: 1 1 100%;
    order: -1;
    grid-template-columns: auto 1fr;
    align-items: center;
    gap: 10px;
  }
  .clock {
    font-size: 1.35rem;
  }
  .hud .icon-btn {
    position: absolute;
    right: 0;
    top: 0;
    width: 38px;
    height: 38px;
  }
  .hud-clock {
    margin-right: 46px;
  }
  .val {
    font-size: 1.05rem;
  }
  .cup {
    width: 26px;
    height: 26px;
  }
  .place {
    top: calc(118px + var(--safe-t));
    font-size: 0.8rem;
  }
  .toasts {
    top: calc(112px + var(--safe-t));
  }
  .act-btn {
    font-size: 1rem;
  }
  .act-btn kbd {
    display: none;
  }
  .zoom {
    display: none;
  }
  .tasting {
    grid-template-columns: 1fr;
  }
  .pourcup {
    width: 112px;
    justify-self: center;
  }
  .lineup {
    grid-template-columns: repeat(2, 1fr);
  }
  .bottle {
    grid-template-rows: 110px auto;
  }
  .bottle img {
    max-height: 106px;
  }
  .end-grid {
    grid-template-columns: 1fr;
  }
  .title-inner {
    padding-top: calc(4vh + var(--safe-t));
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* First-night hints */
.coach {
  position: absolute;
  z-index: 21;
  left: 50%;
  bottom: calc(84px + var(--safe-b));
  transform: translateX(-50%);
  margin: 0;
  max-width: min(460px, calc(100% - 32px));
  background: #fff6e6;
  color: var(--ink);
  border-radius: 14px;
  padding: 9px 14px;
  font-size: 0.92rem;
  line-height: 1.3;
  text-align: center;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
  animation: coachIn 0.4s cubic-bezier(0.2, 0.9, 0.3, 1.2);
  pointer-events: none;
}
.coach::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -7px;
  width: 14px;
  height: 14px;
  background: #fff6e6;
  transform: translateX(-50%) rotate(45deg);
  border-radius: 2px;
}
.coach b {
  color: var(--plum);
}
@keyframes coachIn {
  from {
    transform: translate(-50%, 10px);
    opacity: 0;
  }
}

.toast.noimg {
  grid-template-columns: 1fr;
  padding-left: 14px;
}
.touch-only {
  display: none;
}
@media (pointer: coarse) {
  kbd,
  .keys-only {
    display: none;
  }
  .touch-only {
    display: inline;
  }
}
/* How to play opens over the pause menu. */
.screen.howto {
  z-index: 60;
}
.bottle .bn kbd,
.decide kbd,
.buytoggle kbd {
  margin: 0 0.3em;
}
.bottle .bn kbd {
  margin-left: 0;
}

/* Stamps on the end screen */
.end-stamps {
  margin-top: 1.4rem;
}
.end-stamps h3 {
  font-family: var(--display);
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-size: 0.85rem;
  color: #bfaecf;
  margin: 0 0 0.6rem;
}
.end-stamps .stampgrid {
  grid-template-columns: repeat(auto-fill, minmax(92px, 1fr));
  margin: 0;
}
.end-stamps .stamp {
  color: #eadfd0;
  opacity: 0;
  animation: stampIn 0.45s cubic-bezier(0.3, 1.6, 0.5, 1) forwards;
}
.end-stamps .seal {
  width: 64px;
  height: 64px;
  background: rgba(251, 248, 241, 0.94);
}
.end-stamps .stamp.fresh span::after {
  content: " · new";
  color: #ffd98a;
}
@keyframes stampIn {
  from {
    opacity: 0;
    transform: scale(1.6) rotate(8deg);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* Briefing before the night starts */
.screen.briefing {
  background: rgba(14, 8, 18, 0.6);
  backdrop-filter: blur(4px);
  z-index: 55;
}
.brief-lead {
  margin: -0.4rem 0 1rem;
  font-size: 1rem;
}
.brief-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 10px;
}
.brief-card {
  display: grid;
  grid-template-columns: 38px 1fr;
  gap: 10px;
  align-items: start;
  background: rgba(255, 255, 255, 0.6);
  border: 1.5px solid var(--paper-line);
  border-radius: 14px;
  padding: 10px 12px;
  font-size: 0.88rem;
  line-height: 1.35;
}
.brief-card b {
  display: block;
  font-family: var(--display);
  font-weight: 800;
  font-size: 1.05rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--plum);
  margin-bottom: 2px;
}
.brief-card .ic {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--plum);
  color: #fff;
  font-family: var(--display);
  font-weight: 800;
  font-size: 1.1rem;
}
.brief-card img.ic {
  object-fit: cover;
  background: none;
}
.brief-keys {
  margin: 0.9rem 0 0;
  font-size: 0.85rem;
  color: var(--muted);
}
.brief-foot {
  justify-content: space-between;
}
.brief-foot .toggle {
  margin: 0;
  font-size: 0.9rem;
}
@media (max-width: 640px) {
  .brief-card {
    grid-template-columns: 30px 1fr;
    padding: 8px 10px;
    font-size: 0.84rem;
  }
  .brief-card .ic {
    width: 30px;
    height: 30px;
    font-size: 0.95rem;
  }
}
.briefing .paper {
  display: flex;
  flex-direction: column;
  max-height: calc(100dvh - 32px - var(--safe-t) - var(--safe-b));
}
.briefing .brief-grid {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  padding: 2px;
}
.briefing .brief-foot {
  flex: none;
  margin-top: 0.8rem;
}
@media (max-width: 640px) {
  .briefing .brief-keys {
    display: none;
  }
  .briefing .brief-lead {
    font-size: 0.92rem;
  }
}
@media (max-width: 640px) {
  /* On tall screens the painting becomes a header: the walker, their tote
     of bottles, and the lanterns stay in frame above the tally. */
  .end .keyart {
    height: 48%;
    object-position: 82% 55%;
    animation: none;
  }
  .end::before {
    background: linear-gradient(
      180deg,
      rgba(18, 10, 26, 0.1) 0%,
      rgba(18, 10, 26, 0.35) 30%,
      rgba(18, 10, 26, 1) 48%
    );
  }
  .end {
    background: rgb(18, 10, 26);
  }
  .end-inner {
    padding-top: 30vh;
  }
  .end-inner .kicker,
  .end-title {
    text-shadow: 0 2px 14px rgba(10, 4, 16, 0.85);
  }
}

/* Registration desk and info table */
.desk-card {
  width: min(560px, 100%);
}
.desk-sec + .desk-sec {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1.5px dashed var(--paper-line);
}
.desk-sec h3 {
  margin: 0 0 6px;
  font-family: var(--display);
  font-weight: 800;
  text-transform: uppercase;
  font-size: 1.2rem;
  color: var(--plum);
}
.tipquote {
  font-size: 1.05rem;
  font-style: italic;
  background: #fff7e2;
  border: 1px solid #f0d28f;
  border-radius: 12px;
  padding: 10px 12px;
  margin: 6px 0 10px;
}
.quizq {
  font-weight: 700;
  margin: 4px 0 10px;
}
.quizopts {
  display: grid;
  gap: 8px;
}
.quizopt {
  text-align: left;
  border: 1.5px solid var(--paper-line);
  background: rgba(255, 255, 255, 0.6);
  border-radius: 12px;
  padding: 9px 12px;
  color: var(--ink);
  line-height: 1.3;
}
.quizopt:hover:not(:disabled) {
  border-color: var(--plum-2);
}
.quizopt.right {
  border-color: var(--ok);
  background: #eef9f1;
  font-weight: 700;
}
.quizopt.wrong {
  border-color: var(--red);
  background: #fdeeee;
}
.quizopt:disabled {
  cursor: default;
}
.quizres {
  margin: 10px 0 0;
  font-size: 0.92rem;
}
.quizres b {
  color: var(--ok);
}
.quizres.miss b {
  color: var(--red);
}
.quizopt kbd {
  margin-right: 0.55em;
}
@media (min-width: 641px) {
  #years {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
  }
}
