/* Shared from BaseGameDiscord 0.52.0. Do not edit here: change it in BaseGameDiscord and run tools/sync.mjs. */
/* Base styles shared by every game (BaseGameDiscord): the rules that were the same in every game's own stylesheet. A game's style.css comes after this file and only holds what is different for that game. */
* { box-sizing: border-box; }
body {
  background-color: var(--bg);
  background-image: radial-gradient(var(--bg-dot) 1.2px, transparent 1.3px);
  background-size: 18px 18px;
  color: var(--ink);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.45;
  -webkit-tap-highlight-color: transparent;
  -webkit-user-select: none;
  user-select: none;
}
#app {
  height: 100vh;
  height: 100dvh;
  display: flex;
  justify-content: center;
  padding: max(clamp(10px, 2.2vh, 20px), env(safe-area-inset-top)) 16px max(clamp(10px, 2.2vh, 20px), env(safe-area-inset-bottom));
}
.screen {
  width: 100%;
  max-width: 440px;
  height: 100%;
  min-height: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: clamp(8px, 1.8vh, 16px);
}
.screen[hidden], .sheet[hidden], .sheet-back[hidden] { display: none; }
.screen.center { align-items: center; text-align: center; }
.title { font-size: clamp(1.8rem, 6vh, 2.5rem); line-height: 1; margin: clamp(8px, 1.6vh, 14px) 0 0; font-weight: 900; letter-spacing: -0.03em; text-align: center; }
.small { font-size: 0.9rem; }
input, textarea, select { font-family: inherit; }
button { font: inherit; color: inherit; cursor: pointer; }
/* the big blue button every game uses (a game's own style.css may tune it) */
.big {
  appearance: none; border: 0; width: 100%;
  border-radius: 16px;
  background: var(--blue);
  box-shadow: 0 5px 0 var(--blue-edge, var(--blueEdge));
  color: #fff;
  font-size: clamp(1.05rem, 2.6vh, 1.25rem); font-weight: 900;
  padding: clamp(11px, 2vh, 16px) 20px;
  margin-bottom: 5px;
  transition: transform 0.06s, box-shadow 0.06s;
}
.big:active { transform: translateY(4px); box-shadow: 0 1px 0 var(--blue-edge, var(--blueEdge)); }
.soft:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--surface-edge); }
.big:disabled { opacity: 0.45; }
.big.secondary { background: var(--surface); color: var(--ink); border: 1.5px solid var(--surface-edge); box-shadow: 0 5px 0 var(--surface-edge); }
.soft {
  appearance: none; flex: 1;
  border: 1.5px solid var(--surface-edge);
  border-radius: 14px;
  background: var(--surface);
  box-shadow: 0 4px 0 var(--surface-edge);
  padding: clamp(9px, 1.7vh, 13px) 12px; font-weight: 800;
  margin-bottom: 4px;
}
.link { appearance: none; border: 0; background: none; color: var(--muted); font-weight: 700; padding: 8px; }
.icon {
  appearance: none; width: 40px; height: 40px; border-radius: 12px;
  border: 1.5px solid var(--surface-edge); background: var(--surface);
  display: grid; place-items: center; fill: var(--ink);
}
.brand { padding: 0; flex: none; }
.today-card {
  background: var(--surface);
  border: 1.5px solid var(--surface-edge);
  border-radius: 20px;
  padding: clamp(10px, 2vh, 16px);
  display: grid; gap: clamp(8px, 1.4vh, 12px);
  flex: none;
}
.today-line { margin: 0; text-align: center; font-weight: 700; color: var(--muted); }
.today-line b { color: var(--ink); font-variant-numeric: tabular-nums; }
.rank-line[hidden] { display: block; visibility: hidden; }   /* the space is kept, so the line appearing never moves the screen */
.menu-row { display: flex; gap: 10px; flex: none; }
.menu-row .soft { flex: 1; min-width: 0; padding-left: 4px; padding-right: 4px; font-size: clamp(0.82rem, 3.9vw, 1rem); white-space: nowrap; }
.people li { display: flex; align-items: center; gap: 10px; font-weight: 700; min-width: 0; }
.people .who { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.people .face {
  width: clamp(26px, 4vh, 34px); height: clamp(26px, 4vh, 34px); border-radius: 50%; flex: none;
  display: grid; place-items: center; overflow: hidden;
  font-size: 0.85rem; font-weight: 900; color: #fff;
}
.people .face { position: relative; }
.people .face img { width: 100%; height: 100%; object-fit: cover; display: block; }
.people .face img.face-in { position: absolute; inset: 0; animation: faceIn .25s ease-out; }
@keyframes faceIn { from { opacity: 0; } to { opacity: 1; } }
.ranks .pos { width: 1.6em; text-align: center; font-weight: 900; color: var(--muted); flex: none; font-variant-numeric: tabular-nums; }
.tabs { display: flex; gap: 4px; padding: 4px; border-radius: 14px; background: var(--bg); border: 2px solid var(--surface-edge); }
.tab {
  flex: 1; border: 0; border-radius: 10px; padding: 8px 0; font: inherit; font-weight: 900;
  background: transparent; color: var(--muted); cursor: pointer;
}
.tab[aria-selected="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 2px 0 var(--surface-edge); }
.done-head { text-align: center; display: grid; gap: clamp(3px, 0.8vh, 6px); justify-items: center; flex: none; }
.final {
  margin: 0; font-size: min(18vw, clamp(2.6rem, 10vh, 4.6rem));
  font-weight: 900; line-height: 1; letter-spacing: -0.04em; font-variant-numeric: tabular-nums;
}
.done-buttons { display: grid; gap: 8px; flex: none; }
.back svg { fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.back:active { filter: brightness(1.2); }
.rules-list { list-style: none; margin: 0; padding: 0; display: grid; gap: clamp(8px, 1.6vh, 14px); }
.rules-list li { display: flex; align-items: center; gap: 14px; color: var(--muted); font-size: clamp(0.9rem, 2.1vh, 1rem); line-height: 1.3; }
.rules-list b { color: var(--ink); }
.ri svg { width: 22px; height: 22px; fill: none; stroke: var(--tile-ink); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.tut { justify-content: flex-start; }
.tut-dots li { width: 8px; height: 8px; border-radius: 4px; background: var(--surface-edge); transition: width 0.2s; }
.tut-top #tut-skip { justify-self: end; }
.tut-body { display: grid; gap: 6px; text-align: center; flex: none; }
.tut-note { margin: 0; min-height: 2.9em; text-align: center; font-weight: 700; color: var(--muted); flex: none; }
.tut-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; flex: none; }
.test-banner[hidden] { display: none; }
html:has(.doc), html:has(.doc) body { overflow: auto; height: auto; }
.doc { max-width: 640px; margin: 0 auto; padding: 32px 16px 48px; -webkit-user-select: text; user-select: text; }
.doc h1 { font-size: 2rem; margin: 0 0 4px; }
.doc h2 { font-size: 1.2rem; margin: 28px 0 6px; }
.screen.menu { position: relative; }
.set-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 4px; font-weight: 800; }
.switch {
  appearance: none; border: 0; padding: 0; flex: none; position: relative;
  width: 52px; height: 30px; border-radius: 15px; background: var(--surface-edge); transition: background 0.15s;
}
.switch i {
  position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%;
  background: #fff; box-shadow: 0 2px 0 rgb(0 0 0 / 0.18); transition: transform 0.15s;
}
.switch[aria-checked="true"] { background: var(--blue, var(--accent)); }
.switch[aria-checked="true"] i { transform: translateX(22px); }
:root[data-theme="light"] { color-scheme: light; }
#settings .soft { flex: none; height: auto; }
.tab[hidden] { display: none; }
.tabs[hidden] { display: none; }
.tut-updated { margin: 0 auto; padding: 5px 12px; border-radius: 999px; background: var(--surface-edge); font-size: 0.82rem; font-weight: 800; text-align: center; color: var(--ink); }
.tut-updated[hidden] { display: none; }
/* colour-blind mode: right / good is blue and wrong / bad is vermilion in every game (green / red are what get confused). The selector is
   deliberately specific so it beats each game's own dark and light palettes and the themes. */
html:root[data-cb="1"] { --good: #0072b2; --bad: #d55e00; --right: #0072b2; --right-edge: #00507d; --wrong: #d55e00; --wrong-edge: #9a4300; }
html:root[data-cb="1"][data-theme="dark"] { --good: #4aa8e8; --bad: #f08a3c; --right: #4aa8e8; --right-edge: #2d7fb8; --wrong: #f08a3c; --wrong-edge: #b85f1a; }
.rank-line { margin: -4px 0 0; min-height: 1.4em; text-align: center; font-weight: 900; color: var(--accent, var(--blue)); font-variant-numeric: tabular-nums; }
.practice-btn {
  flex: none; width: 100%; box-shadow: none; font-weight: 700; color: var(--muted);
  background: color-mix(in srgb, var(--bg) 88%, var(--surface)); border-color: color-mix(in srgb, var(--bg) 80%, var(--surface-edge));
}
.practice-btn:active:not(:disabled) { transform: none; box-shadow: none; background: var(--surface); }
#board-list li { padding: 5px 10px; border-radius: 12px; }
.people li.m1 { background: linear-gradient(90deg, rgb(255 190 40 / 0.34), rgb(255 190 40 / 0.14)); }
.people li.m2 { background: linear-gradient(90deg, rgb(190 202 220 / 0.34), rgb(190 202 220 / 0.13)); }
.people li.m3 { background: linear-gradient(90deg, rgb(214 128 62 / 0.34), rgb(214 128 62 / 0.14)); }
.menu-foot { flex: none; display: grid; gap: 10px; }
.menu .brand { margin-top: auto; }
.menu .menu-foot { margin-top: auto; }
.menu .other-btn { flex: none; width: 100%; height: auto; min-height: 0; padding-top: 13px; padding-bottom: 13px; }
.og-card h3 { margin: 0; font-weight: 900; font-size: 1.3rem; }
.other-games { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 12px; justify-items: center; }
.other-games button { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 0; border: 0; background: none; box-shadow: none; cursor: pointer; color: var(--ink); font: inherit; font-weight: 800; font-size: 0.85rem; width: auto; height: auto; min-height: 0; min-width: 0; }
.other-games img { width: clamp(64px, 22vw, 84px); height: auto; aspect-ratio: 1; border-radius: 22%; display: block; box-shadow: 0 3px 0 rgba(0,0,0,0.25); }
.other-games button:active { transform: translateY(2px); }
.people li.lb-lock { display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; padding: 34px 18px; background: none; }
.lb-lock svg { fill: none; stroke: var(--muted); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; opacity: 0.9; }
.lb-lock svg .dot { fill: var(--muted); stroke: none; }
.lb-lock strong { font-size: 1.25rem; font-weight: 900; }
.lb-lock span { color: var(--muted); font-weight: 600; line-height: 1.4; max-width: 26ch; }
.sheet .ranks { padding-bottom: 12px; }
.link.surrender { color: var(--bad, #e5484d); }
.link.surrender.sure { font-weight: 900; }
.people .state.is-surrendered, .today-line .surrendered { color: var(--bad, #e5484d); font-weight: 900; }
.level + .surrendered, .level-pill + .surrendered { margin-left: 8px; }
.board-sub { margin: 0; text-align: center; color: var(--muted); font-weight: 700; flex: none; }
.board-sub[hidden] { display: none; }
/* colour-blind mode: the Easy / Medium / Hard colours become blue / amber / vermilion (they were green / blue / red) */
:root[data-cb="1"] .level.easy, :root[data-cb="1"] .stat .k.lvl.easy { background: #0072b2; }
:root[data-cb="1"] .level.medium, :root[data-cb="1"] .stat .k.lvl.medium { background: #e69f00; color: #1b1b1b; }
:root[data-cb="1"] .level.hard, :root[data-cb="1"] .stat .k.lvl.hard { background: #d55e00; }
:root[data-cb="1"] .lv-easy { --lv: #0072b2; }
:root[data-cb="1"] .lv-medium { --lv: #e69f00; }
:root[data-cb="1"] .lv-hard { --lv: #d55e00; }
/* every leaderboard row: the name on the left, the score on the right */
.people li .who { flex: 1 1 auto; min-width: 0; text-align: left; }
.people li .state { flex: none; margin-left: auto; text-align: right; white-space: nowrap; }
/* the score colours on every leaderboard row: finished in the "right" colour, still playing in the accent, first place's number in gold */
.people .state.is-done { color: inherit; }   /* a finished time reads in the normal text colour in every game (not green) */
.people .state.is-playing { color: var(--accent, var(--blue)); }
.ranks .pos.p1 { color: #e3a553; }

/* ---- the splash before a daily game (shared/client/splash.js) ---- */
.sp-overlay { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; padding: 20px max(16px, env(safe-area-inset-right, 0px)) 20px max(16px, env(safe-area-inset-left, 0px)); background-color: var(--bg, #131c26); background-image: radial-gradient(var(--bg-dot, rgba(255, 255, 255, 0.05)) 1.2px, transparent 1.3px); background-size: 18px 18px; overflow-y: auto; animation: sp-in 0.18s ease-out both; }
@keyframes sp-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.sp-card { width: min(100%, 420px); display: grid; justify-items: center; text-align: center; }
.sp-k { margin: 0 0 14px; font-size: 0.8rem; font-weight: 900; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); }
.sp-title { margin: 0; font-size: clamp(1.5rem, 7vw, 2rem); font-weight: 900; line-height: 1.1; text-wrap: balance; }
.sp-sub { margin: 8px 0 0; color: var(--muted); font-weight: 700; text-wrap: balance; }
.sp-facts { display: flex; gap: 8px; width: 100%; margin: 24px 0 12px; }
.sp-facts div { flex: 1 1 0; min-width: 0; padding: 12px 6px 10px; border-radius: 16px; background: var(--surface); border: 1px solid var(--surface-edge); display: grid; justify-items: center; gap: 3px; }
.sp-facts b { font-size: 1.6rem; font-weight: 900; line-height: 1; font-variant-numeric: tabular-nums; }
.sp-facts span { color: var(--muted); font-size: 0.68rem; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; }
.sp-note { margin: 0; color: var(--muted); font-size: 0.85rem; font-weight: 700; }
.sp-buttons { width: 100%; display: grid; gap: 10px; margin-top: 22px; }

/* a button waiting for its second press ("Clear" > "Sure?") */
button.armed { outline: 2px solid #ffb000; outline-offset: -2px; }
