/* Home Helper design system: warm family look.
   One accent (terracotta) on sage-grey neutrals, spruce-green ink, soft rounded shapes.
   Radius scale: 10 (small) / 14 (controls) / 20 (cards) / 28 (sheets, panels) / pill. Nested radii follow outer = inner + padding. */

@font-face {
  font-family: "Onest";
  src: url("/fonts/onest-cyrillic-wght-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Onest";
  src: url("/fonts/onest-latin-wght-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --bg: #eef2ee;
  --bg-2: #e3eae4;
  --surface: #ffffff;
  --surface-2: #f5f8f5;
  --text: #15241e;
  --muted: #566860;
  --line: #d9e2db;
  --accent: #b94a2f;
  --accent-hi: #a13d25;
  --accent-soft: rgb(185 74 47 / 0.11);
  --on-accent: #ffffff;
  --ok: #1d6b52;
  --ok-soft: rgb(29 107 82 / 0.12);
  --warn: #8a5a00;
  --warn-soft: rgb(217 154 26 / 0.2);
  --danger: #b0213f;
  --danger-soft: rgb(176 33 63 / 0.1);
  --shadow-1: 0 1px 2px rgb(21 36 30 / 0.06), 0 6px 18px rgb(21 36 30 / 0.06);
  --shadow-2: 0 2px 4px rgb(21 36 30 / 0.08), 0 16px 40px rgb(21 36 30 / 0.16);
  --ring: rgb(185 74 47 / 0.45);
  --img-outline: oklch(0 0 0 / 0.1);
  --r-sm: 10px;
  --r-md: 14px;
  --r-lg: 20px;
  --r-xl: 28px;
  --sq-light: #e8efe9;
  --sq-dark: #7c9b8b;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0f1816;
    --bg-2: #0a1210;
    --surface: #17231f;
    --surface-2: #1d2c27;
    --text: #e8f0ea;
    --muted: #9fb2a8;
    --line: #28392f;
    --accent: #ea8262;
    --accent-hi: #f19a7e;
    --accent-soft: rgb(234 130 98 / 0.16);
    --on-accent: #1d0e08;
    --ok: #62c3a1;
    --ok-soft: rgb(98 195 161 / 0.16);
    --warn: #f0bd5a;
    --warn-soft: rgb(240 189 90 / 0.18);
    --danger: #ff8aa0;
    --danger-soft: rgb(255 138 160 / 0.14);
    --shadow-1: 0 1px 2px rgb(0 0 0 / 0.3), 0 6px 18px rgb(0 0 0 / 0.25);
    --shadow-2: 0 2px 4px rgb(0 0 0 / 0.4), 0 16px 40px rgb(0 0 0 / 0.5);
    --ring: rgb(234 130 98 / 0.55);
    --img-outline: oklch(1 0 0 / 0.1);
    --sq-light: #2b3d36;
    --sq-dark: #16241f;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
    --bg: #0f1816;
    --bg-2: #0a1210;
    --surface: #17231f;
    --surface-2: #1d2c27;
    --text: #e8f0ea;
    --muted: #9fb2a8;
    --line: #28392f;
    --accent: #ea8262;
    --accent-hi: #f19a7e;
    --accent-soft: rgb(234 130 98 / 0.16);
    --on-accent: #1d0e08;
    --ok: #62c3a1;
    --ok-soft: rgb(98 195 161 / 0.16);
    --warn: #f0bd5a;
    --warn-soft: rgb(240 189 90 / 0.18);
    --danger: #ff8aa0;
    --danger-soft: rgb(255 138 160 / 0.14);
    --shadow-1: 0 1px 2px rgb(0 0 0 / 0.3), 0 6px 18px rgb(0 0 0 / 0.25);
    --shadow-2: 0 2px 4px rgb(0 0 0 / 0.4), 0 16px 40px rgb(0 0 0 / 0.5);
    --ring: rgb(234 130 98 / 0.55);
    --img-outline: oklch(1 0 0 / 0.1);
    --sq-light: #2b3d36;
    --sq-dark: #16241f;
    color-scheme: dark;
  }


* { box-sizing: border-box; margin: 0; }
html { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; text-size-adjust: 100%; }
body {
  font: 400 16px/1.5 "Onest", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--text);
  background: var(--bg);
  min-height: 100dvh;
}
[hidden] { display: none !important; }

main { max-width: 640px; margin: 0 auto; padding: 18px 16px calc(172px + env(safe-area-inset-bottom)); }
main:has(> .welcome) { max-width: none; padding: 0; }
h1, h2, h3 { text-wrap: balance; letter-spacing: -0.012em; }
h1 { font-size: 1.55rem; line-height: 1.15; font-weight: 750; }
h2 { font-size: 1.12rem; line-height: 1.25; font-weight: 700; margin: 22px 0 10px; }
h3 { font-size: 1rem; font-weight: 650; }
p { text-wrap: pretty; }
strong { font-weight: 650; }
.muted { color: var(--muted); font-size: 0.9rem; }
.sub { margin: 14px 0 8px; font-size: 0.95rem; }

/* ---------- surfaces ---------- */
.view { display: block; }
.card {
  background: var(--surface);
  border-radius: var(--r-lg);
  padding: 16px;
  margin-top: 12px;
  box-shadow: var(--shadow-1);
}
.view > :first-child { margin-top: 0; }
.view > h2:first-child { margin-top: 4px; }
.pill {
  display: inline-block; margin-top: 4px; padding: 2px 10px; border-radius: 999px;
  background: var(--accent-soft); color: var(--accent); font-size: 0.78rem; font-weight: 650;
}
.hdr { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.hdr h1 { overflow-wrap: anywhere; }
.hdr-actions { display: flex; gap: 2px; align-items: center; flex: none; }

/* ---------- forms ---------- */
form { display: grid; gap: 10px; }
.field { display: grid; gap: 5px; }
.field > .muted { font-weight: 550; }
input, select, textarea {
  font: inherit; color: inherit; width: 100%; min-height: 48px;
  background: var(--surface-2); border: 1.5px solid var(--line); border-radius: var(--r-md); padding: 11px 14px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}
textarea { min-height: 160px; resize: vertical; line-height: 1.5; }
input::placeholder, textarea::placeholder { color: var(--muted); opacity: 0.85; }
input:hover, select:hover, textarea:hover { border-color: color-mix(in srgb, var(--accent) 35%, var(--line)); }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--ring); background: var(--surface); }
input:disabled, textarea:disabled, select:disabled { opacity: 0.65; cursor: not-allowed; }
select {
  appearance: none; -webkit-appearance: none; padding-right: 40px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 256 256' fill='%23566860'%3E%3Cpath d='M213.66,101.66l-80,80a8,8,0,0,1-11.32,0l-80-80A8,8,0,0,1,53.66,90.34L128,164.69l74.34-74.35a8,8,0,0,1,11.32,11.32Z'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center;
}
input[type="checkbox"] {
  appearance: none; -webkit-appearance: none; flex: none; width: 24px; height: 24px; min-height: 0; padding: 0;
  border-radius: 8px; border: 2px solid var(--line); background: var(--surface); cursor: pointer; display: inline-grid; place-content: center;
}
input[type="checkbox"]:checked {
  background: var(--accent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 256 256' fill='none' stroke='white' stroke-width='28' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M52 136l56 56 96-112'/%3E%3C/svg%3E") center / 15px no-repeat;
  border-color: var(--accent);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) input[type="checkbox"]:checked { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 256 256' fill='none' stroke='%231d0e08' stroke-width='28' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M52 136l56 56 96-112'/%3E%3C/svg%3E"); }
  :root:not([data-theme="light"]) select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 256 256' fill='%239fb2a8'%3E%3Cpath d='M213.66,101.66l-80,80a8,8,0,0,1-11.32,0l-80-80A8,8,0,0,1,53.66,90.34L128,164.69l74.34-74.35a8,8,0,0,1,11.32,11.32Z'/%3E%3C/svg%3E"); }
}
:root[data-theme="dark"] input[type="checkbox"]:checked { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 256 256' fill='none' stroke='%231d0e08' stroke-width='28' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M52 136l56 56 96-112'/%3E%3C/svg%3E"); }
:root[data-theme="dark"] select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 256 256' fill='%239fb2a8'%3E%3Cpath d='M213.66,101.66l-80,80a8,8,0,0,1-11.32,0l-80-80A8,8,0,0,1,53.66,90.34L128,164.69l74.34-74.35a8,8,0,0,1,11.32,11.32Z'/%3E%3C/svg%3E"); }

input[type="time"], input[type="date"] { min-width: 0; }
input[type="search"] { -webkit-appearance: none; appearance: none; }
.err { color: var(--danger); font-size: 0.9rem; font-weight: 550; min-height: 0; }
.err:empty { display: none; }

/* ---------- buttons ---------- */
button {
  font: inherit; font-weight: 650; cursor: pointer; min-height: 48px; padding: 0 18px;
  border: 0; border-radius: var(--r-md); background: var(--accent); color: var(--on-accent);
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  transition: transform 0.15s ease, background-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
  -webkit-tap-highlight-color: transparent;
}
button:hover { background: var(--accent-hi); }
button:active { transform: scale(0.96); }
button:focus-visible, a:focus-visible, summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
button:disabled { opacity: 0.55; cursor: not-allowed; transform: none; }
button.ghost { background: transparent; color: var(--accent); }
button.ghost:hover { background: var(--accent-soft); }
button.danger { background: var(--danger); color: #fff; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) button.danger { color: #2a0610; }
}
:root[data-theme="dark"] button.danger { color: #2a0610; }

button.danger:hover { background: color-mix(in srgb, var(--danger) 88%, black); }
button.small { min-height: 44px; padding: 0 12px; font-size: 0.88rem; font-weight: 600; }
.ico { width: 22px; height: 22px; flex: none; fill: currentColor; display: block; }
.ico.sm { width: 18px; height: 18px; }
.ico.lg { width: 28px; height: 28px; }
button.icon-btn, button.icon { min-width: 44px; width: 44px; padding: 0; border-radius: 50%; }
button.icon-btn[aria-pressed="false"] { opacity: 0.5; }
button.icon.on { background: var(--accent-soft); }
.x { min-width: 44px; width: 44px; height: 44px; padding: 0; background: transparent; color: var(--muted); border-radius: 50%; flex: none; }
.x:hover { background: var(--danger-soft); color: var(--danger); }
.x .ico { width: 20px; height: 20px; }
.row { display: flex; gap: 8px; align-items: center; }
.row > input, .row > select { flex: 1; min-width: 0; }
.col { display: grid; gap: 8px; }
.check { gap: 12px; min-height: 48px; cursor: pointer; }
hr.sep { border: 0; border-top: 1px solid var(--line); margin: 14px 0; width: 100%; }
.backbar { gap: 4px; margin-bottom: 10px; }
.backbar > button { flex: none; padding: 0 12px 0 6px; }
.backbar h2 { margin: 0; }

/* ---------- lists ---------- */
.items { list-style: none; padding: 0; margin-top: 12px; display: grid; gap: 10px; }
.item, .bar, button.note {
  background: var(--surface); border-radius: var(--r-lg); box-shadow: var(--shadow-1);
}
.item { display: flex; align-items: center; gap: 10px; padding: 4px 6px 4px 6px; min-height: 56px; }
.item label { display: flex; align-items: center; gap: 12px; flex: 1; min-height: 48px; padding-left: 10px; cursor: pointer; overflow-wrap: anywhere; }
.item.done span:not(.qty) { text-decoration: line-through; color: var(--muted); }
.item .qty, .qty { color: var(--muted); font-size: 0.85rem; font-variant-numeric: tabular-nums; }
.item strong, .stat strong, .badge, .count, .bar .qty { font-variant-numeric: tabular-nums; }
.item .grade { min-width: 48px; text-align: center; font-size: 1.3rem; padding-left: 8px; }
.bar { display: grid; gap: 6px; padding: 14px 16px; }
button.note {
  width: 100%; text-align: left; display: grid; justify-content: stretch; gap: 3px; padding: 14px 16px; min-height: 56px;
  color: var(--text); font-weight: 400; background: var(--surface);
}
button.note:hover { background: var(--surface-2); }
button.note strong { display: flex; align-items: center; gap: 6px; font-weight: 650; }
.snippet { overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; white-space: pre-line; }
.past { opacity: 0.62; }
.plain { padding-left: 22px; display: grid; gap: 4px; margin-bottom: 12px; }
.plain li::marker { color: var(--accent); }
.steps { white-space: pre-line; margin-bottom: 8px; }
.items + form { margin-top: 12px; }

/* ---------- chips, segments, badges ---------- */
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 6px; scrollbar-width: none; }
.chip {
  flex: none; min-height: 40px; padding: 0 16px; border-radius: 999px; background: var(--surface); color: var(--text);
  font-weight: 600; font-size: 0.92rem; box-shadow: var(--shadow-1);
}
.chip:hover { background: var(--surface-2); }
.chip.on { background: var(--accent); color: var(--on-accent); }
.chip .ico { width: 16px; height: 16px; }
.seg { display: flex; gap: 4px; background: var(--bg-2); padding: 4px; border-radius: var(--r-md); }
.seg button { flex: 1; background: transparent; color: var(--muted); min-height: 42px; border-radius: 10px; }
.seg button:hover { background: transparent; color: var(--text); }
.seg button.on { background: var(--surface); color: var(--text); box-shadow: var(--shadow-1); }
.badge {
  font-size: 0.74rem; font-weight: 700; padding: 3px 10px; border-radius: 999px; white-space: nowrap;
  background: var(--bg-2); color: var(--muted);
}
.badge.ok { background: var(--ok-soft); color: var(--ok); }
.badge.soon { background: var(--warn-soft); color: var(--warn); }
.badge.overdue { background: var(--danger-soft); color: var(--danger); }
.pos { color: var(--ok); }
.neg { color: var(--danger); }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 12px; }
.stat { background: var(--surface); border-radius: var(--r-md); padding: 12px; display: grid; gap: 2px; min-width: 0; box-shadow: var(--shadow-1); }
.stat strong { font-size: 1rem; overflow-wrap: anywhere; font-weight: 700; }
.track { height: 8px; border-radius: 999px; background: var(--bg-2); overflow: hidden; }
.fill { height: 100%; background: var(--accent); border-radius: 999px; }
.fill.over { background: var(--danger); }

/* ---------- avatar, count ---------- */
.avatar { display: grid; place-items: center; border-radius: 50%; overflow: hidden; background: var(--accent); color: var(--on-accent); font-weight: 700; flex: none; }
.avatar.big { width: 92px; height: 92px; font-size: 2.2rem; box-shadow: var(--shadow-1); }
.avatar img, .avatar-btn img { width: 100%; height: 100%; object-fit: cover; display: block; }
button.avatar-btn { width: 44px; height: 44px; min-height: 0; padding: 0; margin-right: 2px; border-radius: 50%; overflow: hidden; background: var(--accent); color: var(--on-accent); font-weight: 700; }
button.avatar-btn.on { box-shadow: 0 0 0 3px var(--surface), 0 0 0 5px var(--accent); }
.count { min-width: 18px; padding: 0 5px; border-radius: 999px; background: var(--danger); color: #fff; font-size: 0.68rem; line-height: 18px; text-align: center; position: absolute; top: 4px; right: 8px; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .count { color: #2a0610; }
}
:root[data-theme="dark"] .count { color: #2a0610; }


/* ---------- dock (bottom navigation) ---------- */
.tabs {
  position: fixed; left: 50%; transform: translateX(-50%); z-index: 10;
  bottom: calc(10px + env(safe-area-inset-bottom)); width: min(calc(100% - 20px), 640px);
  display: flex; gap: 2px; padding: 6px; background: var(--surface); border-radius: 26px; box-shadow: var(--shadow-2);
  overflow-x: auto; scrollbar-width: none; scroll-snap-type: x proximity;
}
.tabs::-webkit-scrollbar { display: none; }
.tabs button {
  position: relative; flex: 1 1 0; min-width: 0; min-height: 58px; padding: 7px 8px; gap: 3px; border-radius: 20px;
  flex-direction: column; background: transparent; color: var(--muted); font-size: 0.7rem; font-weight: 650; letter-spacing: 0.01em; scroll-snap-align: center;
}
.tabs button:hover { background: var(--surface-2); color: var(--text); }
.tabs button.on { background: var(--accent-soft); color: var(--accent); }
.tabs .ico { width: 24px; height: 24px; }

/* ---------- assistant ---------- */
.fab {
  position: fixed; right: 16px; z-index: 20; bottom: calc(92px + env(safe-area-inset-bottom));
  width: 58px; height: 58px; min-height: 0; padding: 0; border-radius: 50%; box-shadow: var(--shadow-2);
}
.fab .ico { width: 28px; height: 28px; }
.sheet-backdrop { position: fixed; inset: 0; z-index: 30; background: rgb(8 16 13 / 0.5); backdrop-filter: blur(2px); }
.sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 31; margin: 0 auto; max-width: 640px;
  max-height: min(84dvh, 700px); display: flex; flex-direction: column; gap: 4px;
  background: var(--surface); border-radius: var(--r-xl) var(--r-xl) 0 0; padding: 8px 16px calc(14px + env(safe-area-inset-bottom));
  box-shadow: 0 -12px 40px rgb(0 0 0 / 0.25);
}
.sheet::before { content: ""; align-self: center; width: 40px; height: 4px; border-radius: 4px; background: var(--line); margin-bottom: 4px; }
.sheet header { display: flex; justify-content: space-between; align-items: center; }
.sheet header h2 { margin: 0; }
.sheet .chat { overflow-y: auto; flex: 1; min-height: 120px; margin: 6px 0; overscroll-behavior: contain; }
.sheet .hint { min-height: 1.3em; margin-bottom: 4px; }
.mic { flex: none; width: 48px; padding: 0; border-radius: 50%; background: var(--surface-2); color: var(--text); }
.mic:hover { background: var(--bg-2); }
.mic.on { background: var(--danger); color: #fff; animation: pulse 1.2s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { box-shadow: 0 0 0 0 rgb(176 33 63 / 0.45); } 50% { box-shadow: 0 0 0 10px rgb(176 33 63 / 0); } }
body.sheet-open { overflow: hidden; }
.chat { display: grid; gap: 8px; margin: 12px 0; }
.bubble { padding: 10px 14px; border-radius: 18px; max-width: 88%; white-space: pre-wrap; overflow-wrap: anywhere; }
.bubble.me { background: var(--accent); color: var(--on-accent); margin-left: auto; border-bottom-right-radius: 6px; }
.bubble.bot { background: var(--surface-2); border-bottom-left-radius: 6px; }
.pending { border: 1.5px dashed var(--danger); border-radius: var(--r-md); padding: 12px; display: grid; gap: 8px; }

/* ---------- chat ---------- */
.chatwrap { display: flex; flex-direction: column; height: calc(100dvh - 330px); min-height: 340px; }
.chatlog { display: flex; flex-direction: column; gap: 10px; flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 14px 12px; margin: 8px 0; border-radius: var(--r-lg); background: var(--surface); box-shadow: var(--shadow-1); overscroll-behavior: contain; }
.chat-gap { flex: 1 0 0; }
.chatlog > * { flex: none; }
.chatlog > .chat-gap { flex: 1 0 0; }
.msg { display: grid; gap: 2px; justify-items: start; max-width: 88%; align-self: flex-start; }
.msg.mine { align-self: flex-end; justify-items: end; }
.msg .who { font-size: 0.78rem; font-weight: 650; color: var(--accent); padding-left: 4px; }
.msg .time { font-size: 0.72rem; display: flex; align-items: center; gap: 4px; padding: 0 4px; }
.msg .bubble { max-width: 100%; }
.msg .bubble.gone { font-style: italic; background: transparent; color: var(--muted); box-shadow: inset 0 0 0 1px var(--line); }
.msg button.small { min-height: 32px; padding: 0 4px; font-size: 0.72rem; }
.daysep { text-align: center; font-size: 0.75rem; color: var(--muted); padding: 4px 0; }

/* ---------- calendar ---------- */
.cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; margin-top: 10px; }
.cal .dow { text-align: center; font-size: 0.75rem; font-weight: 650; color: var(--muted); padding: 4px 0; }
.cal .day {
  position: relative; min-height: 46px; padding: 0; border-radius: 12px; background: var(--surface); color: var(--text);
  font-weight: 600; font-variant-numeric: tabular-nums; box-shadow: var(--shadow-1);
}
.cal .day:hover { background: var(--surface-2); }
.cal .day.out { background: transparent; box-shadow: none; color: var(--muted); opacity: 0.55; }
.cal .day.today { box-shadow: inset 0 0 0 2px var(--accent); color: var(--accent); }
.cal .day.sel { background: var(--accent); color: var(--on-accent); box-shadow: none; opacity: 1; }
.cal .dot { position: absolute; bottom: 6px; left: 50%; width: 6px; height: 6px; margin-left: -3px; border-radius: 50%; background: var(--accent); }
.cal .dot.personal { background: var(--ok); }
.cal .sel .dot { background: var(--on-accent); }

/* ---------- empty and loading states ---------- */
.empty { display: grid; justify-items: center; gap: 10px; text-align: center; padding: 28px 16px; color: var(--muted); }
.empty .badge-ico { width: 64px; height: 64px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; }
.empty .badge-ico .ico { width: 30px; height: 30px; }
.empty p { max-width: 32ch; }
.skel { display: grid; gap: 12px; margin-top: 8px; }
.skel i { display: block; height: 56px; border-radius: var(--r-lg); background: linear-gradient(100deg, var(--surface) 30%, var(--surface-2) 50%, var(--surface) 70%) 0 0 / 220% 100%; box-shadow: var(--shadow-1); animation: shimmer 1.4s ease-in-out infinite; }
.skel i:nth-child(1) { height: 44px; width: 62%; }
.skel i:nth-child(3) { height: 72px; }
@keyframes shimmer { from { background-position: 120% 0; } to { background-position: -100% 0; } }
.rise { animation: rise 0.22s cubic-bezier(0.2, 0, 0, 1) both; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ---------- media ---------- */
.qr { display: grid; place-items: center; padding: 8px 0; }
.qr svg { border-radius: var(--r-md); max-width: 100%; height: auto; box-shadow: var(--shadow-1); }
.secret, .codes {
  display: block; padding: 12px 14px; border-radius: var(--r-md); background: var(--surface-2); border: 1.5px solid var(--line);
  font: 650 1rem ui-monospace, Consolas, monospace; letter-spacing: 0.08em; word-break: break-all; user-select: all;
}
.codes { margin: 0; columns: 2; letter-spacing: 0.06em; }
.thumbs { display: flex; gap: 8px; flex-wrap: wrap; }
.thumb-wrap { position: relative; }
.thumb { width: 84px; height: 84px; min-height: 0; padding: 0; border-radius: 12px; overflow: hidden; background: var(--bg-2); outline: 1px solid var(--img-outline); outline-offset: -1px; }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb-x { position: absolute; top: -8px; right: -8px; width: 30px; height: 30px; min-height: 0; padding: 0; border-radius: 50%; background: var(--danger); color: #fff; }
.thumb-x .ico { width: 16px; height: 16px; }
.lightbox { position: fixed; inset: 0; z-index: 50; background: rgb(0 0 0 / 0.88); display: grid; place-items: center; padding: 16px; cursor: zoom-out; }
.lightbox img { max-width: 100%; max-height: 100%; border-radius: 12px; outline: 1px solid oklch(1 0 0 / 0.1); }

/* ---------- welcome screen with the cover ---------- */
.welcome { max-width: 1040px; margin: 0 auto; min-height: 100dvh; display: grid; align-content: start; }
.cover { position: relative; aspect-ratio: 3 / 2; max-height: 44dvh; width: 100%; overflow: hidden; background: var(--bg-2); }
.cover img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 70%; display: block; }
.cover .langs { position: absolute; top: 12px; right: 12px; margin: 0; }
.panel {
  position: relative; margin: -36px 12px 24px; padding: 22px 20px 20px; background: var(--surface);
  border-radius: var(--r-xl); box-shadow: var(--shadow-2); display: grid; gap: 14px;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; color: var(--muted); font-size: 0.92rem; }
.brand .mark { width: 40px; height: 40px; border-radius: 12px; background: var(--accent); color: var(--on-accent); display: grid; place-items: center; }
.brand .mark .ico { width: 24px; height: 24px; }
.panel h1 { font-size: clamp(1.3rem, 5.6vw, 1.7rem); font-weight: 780; }
.panel .lead { color: var(--muted); font-size: 0.98rem; }
.panel h2 { margin: 6px 0 0; }
.langs { display: flex; gap: 6px; }
.langs .chip { min-height: 36px; padding: 0 12px; font-size: 0.8rem; background: rgb(255 255 255 / 0.78); color: #15241e; backdrop-filter: blur(6px); }
.langs .chip.on { background: var(--accent); color: var(--on-accent); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .langs .chip:not(.on) { background: rgb(23 35 31 / 0.78); color: var(--text); }
}
:root[data-theme="dark"] .langs .chip:not(.on) { background: rgb(23 35 31 / 0.78); color: var(--text); }

@media (min-width: 900px) {
  .welcome { grid-template-columns: 1.15fr 1fr; align-items: center; gap: 0; padding: 32px; }
  .cover { aspect-ratio: auto; max-height: none; height: min(84dvh, 760px); border-radius: var(--r-xl); box-shadow: var(--shadow-2); }
  .cover img { object-position: 74% 70%; }
  .panel { margin: 0 0 0 -56px; align-self: center; padding: 32px 30px 28px; }
  .panel h1 { font-size: 2.1rem; }
}

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

/* collapsible card (car details) */
details.fold > summary { list-style: none; cursor: pointer; font-weight: 650; min-height: 44px; display: flex; align-items: center; justify-content: space-between; }
details.fold > summary::-webkit-details-marker { display: none; }
details.fold > summary::after { content: ""; width: 20px; height: 20px; background: currentColor; opacity: 0.6; transition: transform 0.15s ease; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 256 256'%3E%3Cpath d='M213.66,101.66l-80,80a8,8,0,0,1-11.32,0l-80-80A8,8,0,0,1,53.66,90.34L128,164.69l74.34-74.35a8,8,0,0,1,11.32,11.32Z'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 256 256'%3E%3Cpath d='M213.66,101.66l-80,80a8,8,0,0,1-11.32,0l-80-80A8,8,0,0,1,53.66,90.34L128,164.69l74.34-74.35a8,8,0,0,1,11.32,11.32Z'/%3E%3C/svg%3E") center / contain no-repeat; }
details.fold[open] > summary::after { transform: rotate(180deg); }
details.fold[open] > summary { margin-bottom: 8px; }
details.fold > form, details.fold > .col { margin-top: 4px; }

/* ---------- games ---------- */
.game-row { width: 100%; justify-content: flex-start; text-align: left; gap: 12px; padding: 10px 14px; min-height: 64px; background: var(--surface); color: var(--text); font-weight: 400; border-radius: var(--r-lg); box-shadow: var(--shadow-1); }
.game-row:hover { background: var(--surface-2); }
.game-row.turn { box-shadow: inset 0 0 0 2px var(--accent), var(--shadow-1); }
.game-ico { width: 44px; height: 44px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; flex: none; }
.game-main { display: grid; flex: 1; min-width: 0; gap: 1px; }
.game-main strong { overflow-wrap: anywhere; }
.game-turn { color: var(--accent); font-weight: 650; font-size: 0.9rem; }
.game-status { font-weight: 650; margin: 4px 0 0; }
.game-status.turn { color: var(--accent); }
.game-meta { text-align: center; font-variant-numeric: tabular-nums; }
.board { display: grid; grid-template-columns: repeat(8, 1fr); aspect-ratio: 1; width: 100%; max-width: 520px; margin: 12px auto; border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--shadow-1); transition: opacity 0.15s ease; }
.board.wait { opacity: 0.85; }
.board .sq { position: relative; display: grid; grid-template: 100% / 100%; place-items: center; min-height: 0; min-width: 0; padding: 0; border-radius: 0; background: var(--sq-light); box-shadow: none; }
.board button.sq { background: var(--sq-dark); }
.board button.sq:active { transform: none; }
.board .sq.last { background-image: linear-gradient(var(--accent-soft), var(--accent-soft)); }
.board .sq.sel { box-shadow: inset 0 0 0 3px var(--accent); }
.board .sq.dest::after { content: ""; position: absolute; width: 30%; height: 30%; border-radius: 50%; background: var(--accent); opacity: 0.75; }
.board .sq.mv .pc { outline: 3px solid var(--accent); outline-offset: 1px; }
.pc { width: 78%; height: 78%; border-radius: 50%; display: grid; place-items: center; box-shadow: 0 2px 3px rgb(0 0 0 / 0.4), inset 0 0 0 3px rgb(0 0 0 / 0.1); }
.pc.w { background: radial-gradient(circle at 35% 30%, #fffaf0, #e6d8bd); color: #b94a2f; }
.pc.b { background: radial-gradient(circle at 35% 30%, #46685a, #15241e); color: #f0d58a; box-shadow: 0 2px 3px rgb(0 0 0 / 0.5), inset 0 0 0 3px rgb(255 255 255 / 0.12); }
.pc .ico { width: 56%; height: 56%; }

/* "More" menu above the dock */
.more { position: fixed; z-index: 11; left: 50%; transform: translateX(-50%); bottom: calc(86px + env(safe-area-inset-bottom)); width: min(calc(100% - 20px), 640px); display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; padding: 8px; background: var(--surface); border-radius: var(--r-xl); box-shadow: var(--shadow-2); }
.more button { position: relative; flex-direction: column; gap: 4px; min-height: 64px; background: transparent; color: var(--muted); font-size: 0.78rem; font-weight: 650; border-radius: 18px; }
.more button:hover { background: var(--surface-2); color: var(--text); }
.more button.on { background: var(--accent-soft); color: var(--accent); }
.more .ico { width: 26px; height: 26px; }

.stat.purse { margin-top: 12px; padding: 16px; } .stat.purse strong { font-size: 1.8rem; }

/* ---------- crest ---------- */
.crest { display: block; filter: drop-shadow(0 2px 4px rgb(21 36 30 / 0.25)); }
button.crest-btn { min-width: 44px; width: 52px; padding: 0; border-radius: var(--r-md); flex: none; }
.crest-preview { display: grid; place-items: center; padding: 16px 0 4px; }
.crest-motto { text-align: center; font-weight: 650; font-size: 1.1rem; min-height: 1.5em; margin-bottom: 8px; }
.chip.swatch { width: 40px; padding: 0; background: var(--sw); box-shadow: inset 0 0 0 2px var(--surface), 0 0 0 1px var(--line); }
.chip.swatch.on { box-shadow: inset 0 0 0 2px var(--surface), 0 0 0 3px var(--accent); background: var(--sw); }
.chip.swatch:hover { background: var(--sw); }

.hdr > .row { min-width: 0; flex: 1; }
.hdr h1 { font-size: 1.35rem; }
.crest-preview + .crest-motto ~ .col .chips { flex-wrap: wrap; }

/* ---------- battleship ---------- */
.bs-grid { display: grid; grid-template-columns: repeat(10, 1fr); gap: 1px; width: 100%; max-width: 420px; margin: 8px auto; padding: 1px; background: var(--line); border-radius: var(--r-md); overflow: hidden; box-shadow: var(--shadow-1); }
.bs-grid.small { max-width: 260px; }
.bs-grid.wait { opacity: 0.8; }
.bs-cell { position: relative; aspect-ratio: 1; min-height: 0; min-width: 0; padding: 0; border-radius: 0; background: var(--sq-light); color: var(--text); display: grid; grid-template: 100% / 100%; place-items: center; box-shadow: none; }
button.bs-cell:hover { background: color-mix(in srgb, var(--sq-dark) 35%, var(--sq-light)); }
button.bs-cell:active { transform: none; }
.bs-cell .dot { width: 24%; height: 24%; border-radius: 50%; background: var(--muted); display: block; }
.bs-cell.hit { background: var(--danger-soft); color: var(--danger); }
.bs-cell.sunk { background: var(--danger); color: #fff; }
.bs-cell.last { outline: 2px solid var(--accent); outline-offset: -2px; }
.bs-cell.own.ship { background: var(--sq-dark); }
.bs-cell.own.ship.shot { background: var(--danger); color: #fff; }
.bs-cell .ico { width: 70%; height: 70%; }
/* ---------- sudoku ---------- */
.sudoku { display: grid; grid-template-columns: repeat(9, 1fr); width: 100%; max-width: 440px; margin: 12px auto; border: 2px solid var(--text); border-radius: var(--r-md); overflow: hidden; background: var(--surface); box-shadow: var(--shadow-1); }
.sd { aspect-ratio: 1; min-height: 0; min-width: 0; padding: 0; border-radius: 0; background: var(--surface); color: var(--accent); font-size: clamp(1rem, 5vw, 1.4rem); font-weight: 600; font-variant-numeric: tabular-nums; box-shadow: inset -1px -1px 0 var(--line); }
.sd:hover { background: var(--surface-2); }
.sd:active { transform: none; }
.sd.given { color: var(--text); font-weight: 750; }
.sd.br { box-shadow: inset -2px -1px 0 var(--text); }
.sd.bb { box-shadow: inset -1px -2px 0 var(--text); }
.sd.br.bb { box-shadow: inset -2px -2px 0 var(--text); }
.sd.peer { background: var(--surface-2); }
.sd.same { background: var(--accent-soft); }
.sd.sel { background: var(--accent); color: var(--on-accent); }
.sd.bad:not(.sel) { color: var(--danger); background: var(--danger-soft); }
.pad-row { display: grid; grid-template-columns: repeat(9, 1fr); gap: 4px; max-width: 440px; margin: 0 auto; }
.chip.pad { padding: 0; min-width: 0; min-height: 44px; font-size: 1.1rem; font-variant-numeric: tabular-nums; justify-content: center; }

/* ---------- chess ---------- */
.cboard { display: grid; grid-template-columns: repeat(8, 1fr); grid-template-rows: repeat(8, 1fr); aspect-ratio: 1; width: 100%; max-width: 520px; margin: 12px auto; border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--shadow-1); transition: opacity 0.15s ease; }
.cboard.wait { opacity: 0.85; }
.cs { position: relative; overflow: hidden; display: grid; grid-template: 100% / 100%; place-items: center; min-height: 0; min-width: 0; padding: 0; border-radius: 0; box-shadow: none; }
.cs.l { background: var(--sq-light); }
.cs.d { background: var(--sq-dark); }
.cs:hover { filter: brightness(0.96); }
.cs:active { transform: none; }
.cs.last { background-image: linear-gradient(var(--accent-soft), var(--accent-soft)); }
.cs.sel { box-shadow: inset 0 0 0 3px var(--accent); }
.cs.dest::after { content: ""; position: absolute; width: 28%; height: 28%; border-radius: 50%; background: var(--accent); opacity: 0.75; }
.cs.cap { box-shadow: inset 0 0 0 4px var(--accent); }
.cs.chk { background-image: radial-gradient(circle, var(--danger) 0%, transparent 75%); }
.cs.mv .cp { filter: drop-shadow(0 0 3px var(--accent)); }
.cp { font-size: clamp(1.5rem, 9vw, 2.9rem); line-height: 1; font-family: "Segoe UI Symbol", "Noto Sans Symbols 2", "Apple Symbols", "DejaVu Sans", serif; user-select: none; }
.cp.w { color: #ffffff; -webkit-text-stroke: 1.6px #0f1a15; paint-order: stroke fill; text-shadow: 0 1px 2px rgb(0 0 0 / 0.3); }
.cp.b { color: #0e1713; -webkit-text-stroke: 1.2px #c9dbd0; paint-order: stroke fill; }

/* ---------- family side panel ---------- */
.rail { position: fixed; right: 0; top: 50%; transform: translateY(-60%); z-index: 12; display: flex; flex-direction: column; align-items: flex-end; gap: 6px; max-height: 70dvh; }
.rail-handle { position: relative; width: 36px; min-height: 56px; padding: 0; border-radius: 18px 0 0 18px; background: var(--surface); color: var(--accent); box-shadow: var(--shadow-2); }
.rail-handle:hover { background: var(--surface-2); }
.rail-list { display: grid; gap: 4px; padding: 8px 6px; background: var(--surface); border-radius: 22px 0 0 22px; box-shadow: var(--shadow-2); overflow-y: auto; }
.rail-person { position: relative; flex-direction: column; gap: 2px; width: 60px; min-height: 64px; padding: 4px 2px; border-radius: 16px; background: transparent; color: var(--muted); font-size: 0.68rem; font-weight: 650; }
.rail-person:hover, .rail-person.on { background: var(--accent-soft); color: var(--accent); }
.rail-person .avatar { width: 40px; height: 40px; font-size: 1rem; }
.rail-name { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rail-menu { position: absolute; right: 72px; top: 36px; display: grid; gap: 6px; min-width: 170px; padding: 12px; background: var(--surface); border-radius: var(--r-lg); box-shadow: var(--shadow-2); }
.dotbadge { position: absolute; top: 4px; right: 8px; width: 11px; height: 11px; border-radius: 50%; background: var(--danger); box-shadow: 0 0 0 2px var(--surface); }
.chip.person { position: relative; gap: 6px; padding-left: 6px; }
.chip.person .dotbadge { top: 2px; right: 2px; }
.avatar.tiny { width: 26px; height: 26px; font-size: 0.8rem; }

/* ---------- assistant persona ---------- */
.ab { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; color: #fff; background: radial-gradient(circle at 30% 25%, var(--a), var(--b)); box-shadow: inset 0 0 0 2px rgb(255 255 255 / 0.25); flex: none; }
.ab .ico { width: 58%; height: 58%; }
.ab.small { width: 34px; height: 34px; }
.ab.fabicon { width: 100%; height: 100%; box-shadow: none; }
.ab.fabicon .ico { width: 56%; height: 56%; }
.fab { padding: 0; overflow: hidden; }
.picks { display: grid; grid-template-columns: repeat(auto-fill, minmax(56px, 1fr)); gap: 8px; }
.pick { min-height: 56px; padding: 0; background: transparent; border-radius: var(--r-md); box-shadow: inset 0 0 0 2px transparent; }
.pick:hover { background: var(--surface-2); }
.pick.on { box-shadow: inset 0 0 0 3px var(--accent); background: var(--accent-soft); }
.pick .ab { width: 44px; height: 44px; }


/* ---------- connect four ---------- */
.c4 { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; padding: 8px; max-width: 460px; margin: 12px auto; background: linear-gradient(160deg, #3b6bb0, #26477a); border-radius: var(--r-lg); box-shadow: var(--shadow-1); }
.c4.wait { opacity: 0.9; }
.c4col { display: grid; grid-template-rows: repeat(6, 1fr); gap: 6px; min-height: 0; min-width: 0; padding: 0; background: transparent; border-radius: 12px; box-shadow: none; }
.c4col:hover { background: rgb(255 255 255 / 0.12); }
.c4col:active { transform: none; }
.c4cell { display: block; aspect-ratio: 1; border-radius: 50%; background: #16305a; box-shadow: inset 0 3px 6px rgb(0 0 0 / 0.45); }
.c4cell.p1, .c4dot.p1 { background: radial-gradient(circle at 35% 30%, #ff8a66, #c8402a); }
.c4cell.p2, .c4dot.p2 { background: radial-gradient(circle at 35% 30%, #ffe27a, #e0a512); }
.c4cell.last { animation: c4drop 0.35s cubic-bezier(0.3, 0, 0.6, 1) both; }
.c4cell.win { box-shadow: 0 0 0 3px #fff, 0 0 12px 2px #fff; }
.c4dot { display: inline-block; width: 14px; height: 14px; border-radius: 50%; vertical-align: -2px; }
@keyframes c4drop { from { transform: translateY(-260%); } to { transform: none; } }
/* ---------- memory ---------- */
.mem { display: grid; gap: 8px; max-width: 460px; margin: 12px auto; }
.mem.wait { opacity: 0.9; }
.mc { aspect-ratio: 1; min-height: 0; min-width: 0; padding: 0; border-radius: var(--r-md); background: linear-gradient(160deg, var(--accent), var(--accent-hi)); color: #fff; box-shadow: var(--shadow-1); transition: transform 0.18s ease, background-color 0.18s ease; }
.mc .back { width: 38%; height: 38%; opacity: 0.55; }
.mc.up { background: var(--surface); color: var(--accent); }
.mc.up .ico { width: 56%; height: 56%; }
.mc.fail { box-shadow: 0 0 0 3px var(--danger); }
.mc.open { box-shadow: 0 0 0 3px var(--accent); }
.mc.done { background: var(--ok-soft); color: var(--ok); box-shadow: none; opacity: 0.85; }
.mc.done.own2 { background: var(--warn-soft); color: var(--warn); }
.rank { min-width: 1.4em; text-align: center; color: var(--accent); font-variant-numeric: tabular-nums; }
@media (prefers-reduced-motion: reduce) { .c4cell.last { animation: none; } }

/* ---------- durak ---------- */
.dk-top { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; margin: 6px 0; }
.dk-info { display: inline-flex; align-items: center; gap: 6px; font-size: 0.9rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.dk-info .red, .pcard.red { color: #c0392b; }
.dk-table { display: flex; flex-wrap: wrap; gap: 10px 12px; min-height: 130px; padding: 12px; margin: 8px 0; background: linear-gradient(160deg, #2f7d57, #1f5a3d); border-radius: var(--r-lg); box-shadow: inset 0 0 0 3px rgb(255 255 255 / 0.12); }
.dk-table .muted { color: rgb(255 255 255 / 0.7); }
.pair { position: relative; width: 62px; height: 92px; cursor: default; }
.pair .a, .pair .d { position: absolute; }
.pair .a { left: 0; top: 0; }
.pair .d { left: 16px; top: 12px; transform: rotate(8deg); }
.pair.target { outline: 3px solid #ffd54a; outline-offset: 3px; border-radius: 10px; cursor: pointer; }
.pcard { display: grid; grid-template-rows: auto 1fr; justify-items: start; width: 52px; height: 76px; padding: 4px 6px; background: #fffdf6; color: #1b2a24; border-radius: 8px; box-shadow: 0 1px 3px rgb(0 0 0 / 0.4); font-family: Georgia, serif; line-height: 1; }
.pcard b { font-size: 1.1rem; font-weight: 700; }
.pcard i { font-style: normal; font-size: 1.6rem; align-self: center; justify-self: center; }
.dk-hand { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; padding: 8px 0 12px; }
.pc-card { padding: 0; min-height: 0; min-width: 0; background: transparent; border-radius: 8px; box-shadow: none; opacity: 0.55; transition: transform 0.15s ease, opacity 0.15s ease; }
.pc-card.ok { opacity: 1; box-shadow: 0 0 0 2px var(--accent); }
.pc-card.sel { transform: translateY(-10px); }
.pc-card.trump .pcard { box-shadow: 0 0 0 2px #f0b840, 0 1px 3px rgb(0 0 0 / 0.4); }
.pc-card:hover { background: transparent; }

/* ---------- domino ---------- */
.dtile { display: inline-flex; width: 64px; height: 34px; background: #fffdf6; border-radius: 6px; box-shadow: 0 1px 3px rgb(0 0 0 / 0.4); overflow: hidden; }
.dtile .half { flex: 1; display: grid; grid-template: repeat(3, 1fr) / repeat(3, 1fr); padding: 3px; position: relative; }
.dtile .half + .half { border-left: 2px solid #1b2a24; }
.dtile .half i { display: block; }
.dtile .half i.pip { background: #1b2a24; border-radius: 50%; margin: 0.5px; }
.dm-chain { display: flex; flex-wrap: wrap; gap: 4px; justify-content: center; min-height: 80px; padding: 12px; margin: 8px 0; background: linear-gradient(160deg, #2f7d57, #1f5a3d); border-radius: var(--r-lg); box-shadow: inset 0 0 0 3px rgb(255 255 255 / 0.12); }
.dm-chain .muted { color: rgb(255 255 255 / 0.7); }
.dm-hand { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; padding: 10px 0; }
.dm-btn { padding: 0; min-height: 0; min-width: 0; background: transparent; border-radius: 8px; box-shadow: none; opacity: 0.5; transition: transform 0.15s ease; }
.dm-btn:hover { background: transparent; }
.dm-btn.ok { opacity: 1; box-shadow: 0 0 0 2px var(--accent); }
.dm-btn.sel { transform: translateY(-8px); }

/* ---------- backgammon ---------- */
.bg-board { display: grid; gap: 4px; padding: 8px; background: #7a4a24; border-radius: var(--r-lg); box-shadow: var(--shadow-1), inset 0 0 0 3px #4d2d12; }
.bg-half { display: grid; grid-template-columns: repeat(12, 1fr); gap: 2px; }
.bg-mid { display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 40px; background: #4d2d12; border-radius: 8px; }
.bgp { position: relative; display: flex; align-items: center; padding: 0; min-height: 0; min-width: 0; height: 128px; border-radius: 0; box-shadow: none; background: #e8d3a8; flex-direction: column; gap: 1px; padding-block: 2px; }
.bgp.top { justify-content: flex-start; clip-path: polygon(0 0, 100% 0, 50% 100%); padding-inline: 0; }
.bgp.bot { justify-content: flex-end; clip-path: polygon(0 100%, 100% 100%, 50% 0); }
.bgp:not(.odd) { background: #b0412a; }
.bgp.odd { background: #f0dfb8; }
.bgp:hover { filter: brightness(1.06); }
.bgp:active { transform: none; }
.bgp.sel { outline: 3px solid #ffd54a; outline-offset: -3px; }
.bgp.dest { background: #ffd54a !important; }
.bgp.src { filter: brightness(1.15); }
.bgc { display: grid; place-items: center; width: 22px; height: 22px; max-width: 90%; border-radius: 50%; font-style: normal; font-size: 0.7rem; font-weight: 700; flex: none; box-shadow: 0 1px 2px rgb(0 0 0 / 0.5); }
.bgc.w { background: radial-gradient(circle at 35% 30%, #fffdf6, #d7c9a6); color: #3a2a14; }
.bgc.b { background: radial-gradient(circle at 35% 30%, #4a4a52, #15151a); color: #fff; }
.bgbar { display: flex; gap: 2px; min-height: 24px; padding: 2px; border-radius: 6px; }
.bgbar.sel { outline: 3px solid #ffd54a; }
.bgbarbtn { padding: 2px; min-height: 0; background: transparent; box-shadow: none; }
.bgbarbtn:hover { background: rgb(255 255 255 / 0.1); }
.dice-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; min-height: 44px; padding: 6px 0; }
.die { display: grid; place-items: center; width: 40px; height: 40px; background: #fffdf6; color: #1b2a24; border-radius: 10px; font-weight: 800; font-size: 1.3rem; box-shadow: 0 2px 4px rgb(0 0 0 / 0.35); font-variant-numeric: tabular-nums; }

/* ---------- 5 letters ---------- */
.w5grid { display: grid; gap: 6px; max-width: 320px; margin: 12px auto; }
.w5row { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.w5cell { display: grid; place-items: center; aspect-ratio: 1; border-radius: 10px; background: var(--surface); box-shadow: inset 0 0 0 2px var(--line); font-weight: 800; font-size: 1.5rem; }
.w5cell.typed { box-shadow: inset 0 0 0 2px var(--accent); }
.w5cell.g { background: #2f9e5a; color: #fff; box-shadow: none; }
.w5cell.y { background: #e0a512; color: #1b1500; box-shadow: none; }
.w5cell.x { background: #6b7a73; color: #fff; box-shadow: none; }
.w5kb { display: grid; gap: 6px; max-width: 480px; margin: 8px auto; }
.w5krow { display: flex; gap: 4px; justify-content: center; }
.w5k { flex: 1; min-width: 0; min-height: 46px; padding: 0; border-radius: 8px; background: var(--surface); color: var(--text); font-weight: 700; box-shadow: var(--shadow-1); }
.w5k:hover { background: var(--surface-2); }
.w5k.wide { flex: 1.5; background: var(--accent-soft); color: var(--accent); }
.w5k.g { background: #2f9e5a; color: #fff; }
.w5k.y { background: #e0a512; color: #1b1500; }
.w5k.x { background: #6b7a73; color: #fff; opacity: 0.7; }

/* ---------- balda ---------- */
.bdgrid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; max-width: 340px; margin: 12px auto; }
.bd { position: relative; aspect-ratio: 1; min-height: 0; min-width: 0; padding: 0; border-radius: 10px; background: var(--surface-2); color: var(--text); font-size: 1.5rem; font-weight: 800; box-shadow: inset 0 0 0 2px var(--line); }
.bd.full { background: var(--surface); box-shadow: var(--shadow-1); }
.bd.cand { box-shadow: inset 0 0 0 2px var(--accent); background: var(--accent-soft); }
.bd.new { background: var(--accent-soft); color: var(--accent); box-shadow: inset 0 0 0 3px var(--accent); }
.bd.on { background: var(--accent); color: var(--on-accent); }
.bd sub { position: absolute; right: 4px; bottom: 2px; font-size: 0.65rem; font-weight: 700; opacity: 0.85; }

/* ---------- quiz ---------- */
.card.quiz h3 { font-size: 1.15rem; margin-bottom: 12px; }
.quizopt { justify-content: flex-start; text-align: left; min-height: 52px; background: var(--surface-2); color: var(--text); font-weight: 600; box-shadow: inset 0 0 0 2px var(--line); }
.quizopt:hover { background: var(--accent-soft); box-shadow: inset 0 0 0 2px var(--accent); }

/* ---------- contacts ---------- */
.rail-sep { display: block; padding: 6px 4px 2px; font-size: 0.62rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); text-align: center; border-top: 1px solid var(--line); margin-top: 4px; }
select.mini { width: auto; min-height: 36px; padding: 4px 28px 4px 10px; font-size: 0.85rem; }
.toast { position: fixed; left: 50%; bottom: calc(100px + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 60; max-width: min(92vw, 440px); padding: 12px 18px; background: var(--text); color: var(--bg); border-radius: 999px; box-shadow: var(--shadow-2); font-weight: 600; text-align: center; }

/* ---------- chores ---------- */
.chore.finished { opacity: 0.8; }
.chore .qty { color: var(--ok); font-weight: 700; }

/* ---------- weekly menu ---------- */
.menu-day { padding: 12px 14px; }
.menu-day.today { box-shadow: inset 0 0 0 2px var(--accent), var(--shadow-1); }
.menu-day h3 { margin-bottom: 8px; font-size: 0.95rem; }
.meal { display: grid; grid-template-columns: 84px 1fr; gap: 8px; align-items: center; padding: 3px 0; }
.meal select { min-height: 40px; padding: 6px 30px 6px 10px; font-size: 0.92rem; }

.x.inline { display: inline-grid; vertical-align: middle; margin-left: 4px; min-width: 32px; width: 32px; height: 32px; }

/* ---------- home screen (widgets) ---------- */
.hello { margin: 4px 0 12px; font-size: 1.35rem; }
.dash { display: grid; grid-template-columns: 1fr; gap: 12px; align-items: start; }
.widget { margin-top: 0; }
.widget h3 { font-size: 1rem; }
.wlist { list-style: none; padding: 0; display: grid; gap: 8px; margin: 8px 0 0; }
.wline { display: flex; align-items: center; gap: 10px; min-height: 36px; }
.wline .ico { color: var(--accent); }
.wline.warn .ico { color: var(--danger); }
.wline.turn span { font-weight: 650; }
.wline.done span { text-decoration: line-through; color: var(--muted); }
.wline > span { flex: 1; min-width: 0; overflow-wrap: anywhere; }
button.link { background: transparent; color: var(--text); padding: 0; min-height: 36px; font-weight: 500; text-align: left; justify-content: flex-start; gap: 10px; border-radius: 8px; }
button.link:hover { background: transparent; color: var(--accent); }
.wmsg { display: grid; gap: 1px; padding: 6px 10px; background: var(--surface-2); border-radius: 12px; }
.wmsg.me { background: var(--accent-soft); }
.wmsg span { overflow-wrap: anywhere; }
.widget form { margin-top: 10px; }
.dash-hint { margin-top: 14px; }
.wedit { list-style: none; padding: 0; display: grid; gap: 6px; margin: 0 0 8px; }
.wedit li { display: flex; align-items: center; gap: 6px; padding: 4px 6px 4px 12px; background: var(--surface-2); border-radius: var(--r-md); min-height: 48px; }
.wedit .n { color: var(--accent); font-weight: 800; width: 1.2em; }
.wedit strong { flex: 1; font-weight: 600; }
.wedit .up { transform: rotate(90deg); }
.wedit .down { transform: rotate(90deg); }

/* ---------- side navigation and wide layout (computers) ---------- */
.side { display: none; }
@media (min-width: 1024px) {
  main { max-width: none; padding: 20px 108px 48px 124px; }
  .hdr { max-width: 1180px; margin: 0 auto; }
  .view { max-width: 1180px; margin: 14px auto 0; }
  .tabs, .more { display: none !important; }
  .fab { bottom: 24px; right: 24px; }
  .side { position: fixed; z-index: 10; left: 0; top: 0; bottom: 0; width: 92px; padding: 14px 6px; display: flex; flex-direction: column; align-items: stretch; gap: 2px; overflow-y: auto; scrollbar-width: none; background: var(--surface); box-shadow: var(--shadow-1); transition-property: width; transition-duration: 0.2s; }
  .side button { position: relative; flex-direction: column; justify-content: center; gap: 4px; min-height: 64px; padding: 8px 2px; background: transparent; color: var(--muted); font-size: 0.72rem; font-weight: 600; line-height: 1.15; text-align: center; border-radius: var(--r-md); }
  .side button .lbl { display: block; max-width: 100%; overflow-wrap: anywhere; }
  .side button:hover { background: var(--surface-2); color: var(--text); }
  .side button.on { background: var(--accent-soft); color: var(--accent); }
  .side .ico { width: 28px; height: 28px; }
  .side .count { position: absolute; top: 2px; right: 14px; margin: 0; }
  .side-sep { width: 36px; margin: 6px auto; border: 0; border-top: 1px solid var(--line); }
  .side .side-fold { margin-top: auto; }
  main { transition-property: padding; transition-duration: 0.2s; }
  body.side-folded .side { width: 64px; }
  body.side-folded .side .lbl { display: none; }
  body.side-folded .side button { min-height: 52px; }
  body.side-folded .side .count { right: 4px; }
  body.side-folded .side-sep { width: 28px; }
  body.side-folded main { padding-left: 96px; }
  .dash { grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); }
  .widget.w-alerts, .widget.w-chat { grid-column: span 1; }
  .items { grid-template-columns: repeat(auto-fill, minmax(360px, 1fr)); }
  form { max-width: 640px; }
  .card form, .widget form { max-width: none; }
  .cal { max-width: 760px; }
  .cal .day { min-height: 58px; }
  .menu-day { max-width: 760px; }
  .chatwrap { height: calc(100dvh - 210px); }
  .sheet { max-width: 520px; right: 24px; left: auto; bottom: 24px; border-radius: var(--r-xl); max-height: 80dvh; }
  .sheet::before { display: none; }
  .backbar { max-width: 760px; }
}
@media (min-width: 1500px) { .dash { grid-template-columns: repeat(3, 1fr); } }

/* wide screens: weekly cards side by side, calendar next to the day's events */
@media (min-width: 1024px) {
  .view:has(> .menu-day) { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; align-items: start; }
  .view:has(> .menu-day) > :not(.menu-day) { grid-column: 1 / -1; }
  .view:has(> .menu-day) .menu-day { max-width: none; margin-top: 0; }
  .view:has(> .cal) { display: grid; grid-template-columns: minmax(0, 1fr) 400px; column-gap: 28px; align-items: start; }
  .view:has(> .cal) > :nth-child(1) { grid-column: 1; grid-row: 1; }
  .view:has(> .cal) > .cal { grid-column: 1; grid-row: 2 / span 8; max-width: none; }
  .view:has(> .cal) > :nth-child(n+3) { grid-column: 2; }
  .view:has(> .cal) .day { min-height: 64px; }
}

/* ---------- illustrated tiles, hero and quick launcher ---------- */
.tile { display: inline-grid; place-items: center; flex: none; width: var(--s, 44px); height: var(--s, 44px); border-radius: 28%; color: #fff; background: linear-gradient(145deg, var(--c1), var(--c2));
  box-shadow: 0 5px 12px -4px color-mix(in srgb, var(--c2) 65%, transparent), inset 0 1px 0 rgb(255 255 255 / 0.28); }
.tile .ico { width: 58%; height: 58%; filter: drop-shadow(0 1px 1px rgb(0 0 0 / 0.18)); }
.hero { position: relative; overflow: hidden; display: grid; align-items: end; min-height: 210px; margin-bottom: 14px; border-radius: var(--r-xl); background: var(--bg-2); box-shadow: var(--shadow-2); }
.hero-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 70%; }
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgb(8 22 18 / 0.78) 0%, rgb(8 22 18 / 0.4) 48%, transparent 78%); }
.hero-body { position: relative; z-index: 1; display: grid; gap: 8px; padding: 22px 24px; color: #fff; max-width: 640px; }
.hero-date { font-size: 0.9rem; font-weight: 600; opacity: 0.92; text-transform: capitalize; letter-spacing: 0.01em; }
.hero-hello { margin: 0; color: #fff; font-size: clamp(1.5rem, 3.6vw, 2.4rem); line-height: 1.1; text-shadow: 0 2px 10px rgb(0 0 0 / 0.35); }
.hero-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.hero-chip { min-height: 38px; padding: 0 14px; gap: 8px; border-radius: 999px; background: rgb(255 255 255 / 0.2); color: #fff; font-size: 0.88rem; font-weight: 650; backdrop-filter: blur(8px); box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.25); }
.hero-chip:hover { background: rgb(255 255 255 / 0.32); }
.launch { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 10px; margin-bottom: 14px; }
.launch-item { position: relative; flex-direction: column; justify-content: flex-start; gap: 8px; min-height: 104px; padding: 12px 6px; background: var(--surface); color: var(--text); font-size: 0.8rem; font-weight: 650; text-align: center; border-radius: var(--r-lg); box-shadow: var(--shadow-1); transition: transform 0.15s ease, box-shadow 0.15s ease; }
.launch-item:hover { background: var(--surface); box-shadow: var(--shadow-2); }
.launch-item .dotbadge { top: 8px; right: 12px; }
.widget h3 { margin: 0; }
.meal-name { display: inline-flex; align-items: center; gap: 8px; }
.side button .tile { flex: none; }
.side-fold { display: none; }
@media (min-width: 1024px) { .side-fold { display: flex; } }
.more button .tile { margin-bottom: 2px; }
@media (max-width: 600px) {
  .hero { min-height: 190px; }
  .hero::after { background: linear-gradient(0deg, rgb(8 22 18 / 0.82) 0%, rgb(8 22 18 / 0.4) 55%, transparent 100%); }
  .hero-body { padding: 16px; }
  .launch { grid-template-columns: none; grid-auto-flow: column; grid-template-rows: repeat(2, auto); grid-auto-columns: 82px; gap: 8px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; scroll-snap-type: x proximity; }
  .launch::-webkit-scrollbar { display: none; }
  .launch-item { min-height: 86px; font-size: 0.7rem; scroll-snap-align: start; }
}
@media (min-width: 1024px) { .hero { min-height: 210px; } .launch { grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); } .launch-item { min-height: 92px; } }
@media (prefers-reduced-motion: no-preference) { .launch-item:hover { transform: translateY(-2px); } }

/* ---------- weather widget ---------- */
.wx-place { display: flex; align-items: center; gap: 6px; margin: 2px 0 6px; }
.wx-now { display: flex; align-items: center; gap: 14px; }
.wx-big { display: grid; place-items: center; width: 64px; height: 64px; border-radius: 22px; color: #fff; background: linear-gradient(145deg, #4fa8dc, #2468a8); box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.3); }
.wx-big .ico { width: 40px; height: 40px; }
.wx-temp { font-size: 2.2rem; line-height: 1; font-variant-numeric: tabular-nums; }
.wx-meta { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 12px 0 4px; font-size: 0.9rem; font-variant-numeric: tabular-nums; }
.wx-meta span { display: inline-flex; align-items: center; gap: 6px; }
.wx-tip { margin: 8px 0 0; padding: 8px 12px; border-radius: var(--r-md); background: var(--accent-soft); color: var(--accent); font-weight: 600; font-size: 0.9rem; }
.wx-hours { display: flex; gap: 6px; margin: 12px 0 0; padding: 0; list-style: none; overflow-x: auto; }
.wx-hours li { display: grid; justify-items: center; gap: 4px; min-width: 52px; padding: 8px 4px; border-radius: var(--r-md); background: var(--surface-2); font-size: 0.82rem; font-variant-numeric: tabular-nums; }
.wx-credit { margin: 10px 0 0; font-size: 0.75rem; }

/* ---------- bar with the ways out of an open game ---------- */
.game-nav { position: fixed; z-index: 9; left: 50%; bottom: calc(86px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); display: flex; gap: 4px; padding: 6px; max-width: calc(100vw - 24px); border-radius: 999px; background: var(--surface); box-shadow: var(--shadow-2), 0 0 0 1px rgb(0 0 0 / 0.06); }
.game-nav button { min-height: 44px; padding: 0 14px; gap: 6px; border-radius: 999px; background: transparent; color: var(--text); font-size: 0.85rem; font-weight: 650; white-space: nowrap; }
.game-nav button:hover { background: var(--accent-soft); color: var(--accent); }
@media (max-width: 480px) { .game-nav button { padding: 0 10px; } .game-nav button span { display: none; } .game-nav button:first-child span, .game-nav button:active span { display: inline; } }
@media (min-width: 1024px) { .game-nav { bottom: 24px; left: calc(50% + 100px); } }

.bill-status { display: flex; align-items: center; gap: 6px; margin: 0; font-size: 0.88rem; font-weight: 600; color: var(--accent); font-variant-numeric: tabular-nums; }
.bill-status.over { color: var(--danger, #b3261e); }

/* ---------- chat composer and emoji ---------- */
.composer { display: flex; align-items: flex-end; gap: 8px; padding: 6px; border-radius: 26px; background: var(--surface); box-shadow: var(--shadow-1), inset 0 0 0 1px var(--line); }
.composer:focus-within { box-shadow: var(--shadow-1), inset 0 0 0 2px var(--accent); }
.chat-input { flex: 1; min-width: 0; resize: none; border: 0; outline: 0; background: transparent; box-shadow: none; padding: 10px 6px; min-height: 44px; max-height: 120px; line-height: 1.35; font: inherit; }
.chat-btn { flex: none; display: grid; place-items: center; width: 44px; height: 44px; min-height: 44px; padding: 0; border-radius: 50%; }
.chat-btn.send { background: var(--accent); color: var(--on-accent); }
.chat-btn.send:active { transform: scale(0.96); }
.chat-btn.ghost { background: transparent; color: var(--muted); }
.chat-btn.ghost[aria-expanded="true"] { background: var(--accent-soft); color: var(--accent); }
.chat-note { margin: 6px 4px 0; font-size: 0.72rem; }
.emoji-pick { margin-bottom: 8px; padding: 8px; border-radius: var(--r-lg); background: var(--surface); box-shadow: var(--shadow-2); }
.emoji-tabs { display: flex; gap: 4px; margin-bottom: 6px; }
.emoji-tabs button { width: 44px; height: 40px; min-height: 40px; padding: 0; border-radius: var(--r-md); background: transparent; color: var(--muted); }
.emoji-tabs button.on { background: var(--accent-soft); color: var(--accent); }
.emoji-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(44px, 1fr)); max-height: 168px; overflow-y: auto; }
.emoji-grid button { height: 44px; min-height: 44px; padding: 0; background: transparent; font-size: 1.6rem; line-height: 1; border-radius: var(--r-md); }
.emoji-grid button:hover { background: var(--surface-2); }
.emoji-grid button:active { transform: scale(0.96); }

/* ---------- look: theme, accent and cover choices in the settings ---------- */
.look-seg { display: flex; gap: 6px; flex-wrap: wrap; }
.look-seg button { min-height: 44px; background: var(--surface-2); color: var(--text); box-shadow: inset 0 0 0 1px var(--line); }
.look-seg button.on { background: var(--accent-soft); color: var(--accent); box-shadow: inset 0 0 0 2px var(--accent); }
.swatches { display: flex; gap: 10px; flex-wrap: wrap; }
.swatch { width: 44px; height: 44px; min-height: 44px; padding: 0; border-radius: 50%; background: var(--sw); box-shadow: inset 0 0 0 2px rgb(255 255 255 / 0.35), 0 0 0 1px var(--line); }
.swatch:hover { background: var(--sw); }
.swatch.on { box-shadow: inset 0 0 0 3px #fff, 0 0 0 3px var(--sw); }
.heroes { display: grid; grid-template-columns: repeat(auto-fill, minmax(116px, 1fr)); gap: 10px; }
.hero-opt { position: relative; display: block; min-height: 0; height: 76px; padding: 0; overflow: hidden; border-radius: var(--r-md); background: var(--bg-2) center / cover no-repeat; box-shadow: 0 0 0 1px var(--line); color: #fff; text-align: left; }
.hero-opt:hover { background-color: var(--bg-2); }
.hero-opt::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, rgb(0 0 0 / 0.62), transparent 62%); }
.hero-opt span { position: absolute; z-index: 1; left: 8px; right: 8px; bottom: 6px; font-size: 0.78rem; font-weight: 650; line-height: 1.15; }
.hero-opt.on { box-shadow: 0 0 0 3px var(--accent); }
.hero.photo::after { background: linear-gradient(90deg, rgb(6 10 14 / 0.72) 0%, rgb(6 10 14 / 0.35) 55%, rgb(6 10 14 / 0.1) 100%); }
.hero.photo .hero-img { object-position: 50% 50%; }
@media (max-width: 600px) { .hero.photo::after { background: linear-gradient(0deg, rgb(6 10 14 / 0.78) 0%, rgb(6 10 14 / 0.35) 60%, rgb(6 10 14 / 0.1) 100%); } }

/* chat on the home screen */
.widget .wlog { flex: none; height: 250px; margin: 10px 0 8px; background: var(--surface-2); box-shadow: none; }
.widget.w-chat .emoji-pick { margin-bottom: 8px; }
.widget.w-chat .composer { background: var(--surface-2); }

/* calendar: chores next to events, settings tabs */
.cal .dots { position: absolute; bottom: 5px; left: 0; right: 0; display: flex; justify-content: center; gap: 3px; }
.cal .dots .dot { position: static; margin: 0; }
.cal .dot.chore { background: #e6963a; }
.cal .sel .dots .dot { background: var(--on-accent); }
.chore-item { box-shadow: inset 3px 0 0 #e6963a; }
.settings-tabs { margin: 10px 0 4px; position: sticky; top: 0; z-index: 3; padding: 6px 0; background: var(--bg); }
.settings-tabs .chip { display: inline-flex; align-items: center; gap: 6px; }

/* checkboxes inside rows stay small squares (a row's inputs otherwise stretch) */
.row > input[type="checkbox"] { flex: none; width: 24px; height: 24px; }
.row.check { padding: 4px 2px; }

/* new game: picture cards, then who to play with and the level */
.game-picks { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 10px; }
.game-pick { flex-direction: column; justify-content: flex-start; gap: 8px; min-height: 104px; padding: 12px 6px; background: var(--surface-2); color: var(--text); font-size: 0.82rem; font-weight: 650; text-align: center; border-radius: var(--r-lg); box-shadow: inset 0 0 0 1px var(--line); }
.game-pick:hover { background: var(--surface); box-shadow: inset 0 0 0 1px var(--line), var(--shadow-1); }
.game-pick.on { background: var(--accent-soft); color: var(--accent); box-shadow: inset 0 0 0 2px var(--accent); }
.game-opts { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; }
