/* Light, rounded, calm. Large text. One accent blue; status colours come from the database. */
:root {
  --bg: #f4f7fb; --surface: #ffffff; --soft: #eef3f8; --line: #e1e8ef; --fg: #17212b; --muted: #56677a;
  --accent: #1a66d1; --accent-soft: #e7f0fd; --warn: #f0a020; --warn-soft: #fdf3df; --warn-text: #8a5300; --ok: #3aa655;
  --radius: 16px; --radius-s: 10px; --shadow: 0 1px 2px rgba(20, 40, 60, .06), 0 4px 14px rgba(20, 40, 60, .05);
  --font: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: light;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--fg); font-family: var(--font); font-size: 17px; line-height: 1.45; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--accent); }
h1, h2, h3 { margin: 0; line-height: 1.2; }
/* Text contrast: --fg, --muted, --accent, --warn-text all reach >= 4.5:1 on every background used here. */
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
/* .sr needs a positioned parent, or it escapes scrolling rows and widens the page on phones */
.count, .cm { position: relative; }
.sr { position: absolute; left: 0; top: 0; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 60; background: var(--surface); padding: 10px 16px; border-radius: 10px; box-shadow: var(--shadow); }
.skip:focus { top: 12px; }
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; transition: none !important; } }
[hidden] { display: none !important; }

.app { display: grid; grid-template-columns: 250px minmax(0, 1fr); min-height: 100vh; }
.app.with-panel { grid-template-columns: 250px minmax(0, 1fr) 460px; }

/* ---- sidebar ---- */
.side { background: var(--surface); border-right: 1px solid var(--line); padding: 22px 14px; display: flex; flex-direction: column; gap: 6px; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.brand { display: flex; min-height: 40px; align-items: center; gap: 10px; font-weight: 700; font-size: 22px; padding: 0 8px 14px; text-decoration: none; color: var(--fg); }
.brand-mark { width: 34px; height: 34px; border-radius: 10px; background: var(--accent); color: #fff; display: grid; place-items: center; font-size: 18px; }
.side-label { font-size: 14px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); padding: 12px 8px 4px; }
.side-link { display: flex; align-items: center; gap: 12px; padding: 8px; border-radius: 12px; text-decoration: none; color: var(--fg); font-weight: 500; }
.side-link:hover { background: var(--soft); }
.side-link.active { background: var(--accent-soft); }
.side-link img, .side-link .ph { width: 46px; height: 46px; border-radius: 10px; object-fit: cover; flex: none; background: var(--soft); }
.side-link .count { margin-left: auto; background: var(--warn-soft); color: var(--warn-text); border: 1px solid var(--warn); border-radius: 999px; font-size: 14px; padding: 1px 9px; font-weight: 700; }
.side-sub { display: flex; flex-direction: column; gap: 2px; padding-left: 58px; }
.side-sub a { text-decoration: none; color: var(--muted); padding: 4px 8px; border-radius: 8px; font-size: 15px; min-height: 40px; display: flex; align-items: center; }
.side-sub a.active, .side-sub a:hover { color: var(--fg); background: var(--soft); }

/* ---- main ---- */
.main { padding: 26px 30px 60px; min-width: 0; outline: none; }
.section-title { font-size: 21px; font-weight: 700; margin: 26px 0 12px; display: flex; align-items: center; gap: 10px; }
.muted { color: var(--muted); }
.small { font-size: 15px; }
.lead { color: var(--muted); margin: -4px 0 14px; max-width: 70ch; }
.sub-title { font-size: 18px; font-weight: 700; margin: 18px 0 8px; }
.sub-title .muted { font-weight: 400; }

/* welcome card (main page, once) */
.welcome { display: flex; gap: 16px; align-items: flex-start; justify-content: space-between; background: var(--accent-soft); border-radius: var(--radius); padding: 16px 20px; margin-bottom: 4px; }
.welcome p { margin: 0 0 4px; }
.welcome p:last-child { margin: 0; }
.welcome .btn { flex: none; }

/* help page */
.page-title { font-size: 30px; font-weight: 800; margin: 6px 0 12px; }
.guide-nav { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 18px; }
.guide { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); gap: 16px; align-items: start; }
.guide-sec { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px 22px; scroll-margin-top: 16px; }
.guide-sec h2 { font-size: 22px; margin-bottom: 8px; }
.guide-sec ul { margin: 0; padding-left: 20px; }
.guide-sec li { margin: 6px 0; }
.guide-sec li ul { margin-top: 4px; }
.guide-sec p { margin: 8px 0; }
code { font-family: Consolas, "Cascadia Mono", monospace; font-size: .92em; background: var(--soft); padding: 1px 6px; border-radius: 6px; overflow-wrap: anywhere; }
.empty { color: var(--muted); background: var(--surface); border-radius: var(--radius); padding: 18px 20px; border: 1px dashed var(--line); }

.hero { display: grid; grid-template-columns: 160px minmax(0, 1fr); gap: 24px; align-items: start; }
.hero-cover { width: 160px; height: 120px; border-radius: var(--radius); object-fit: cover; background: var(--soft); box-shadow: var(--shadow); }
.hero h1 { font-size: 32px; font-weight: 800; }
.goal { font-size: 18px; color: var(--muted); margin: 4px 0 0; }
.stage-info { margin-top: 8px; background: var(--surface); border-radius: var(--radius-s); box-shadow: var(--shadow); padding: 10px 14px; display: grid; gap: 4px; justify-items: start; max-width: 760px; }
.stage-goal { line-height: 1.4; }
.stage-check summary { cursor: pointer; color: var(--accent); min-height: 36px; display: inline-flex; align-items: center; gap: 4px; }
.stage-check summary strong { color: var(--fg); }
.stage-check ul { list-style: none; margin: 2px 0 4px; padding: 0; display: grid; gap: 0; }
.stage-check .check { color: var(--fg); min-height: 36px; }
.done-item { color: var(--muted); text-decoration: line-through; }
.small-btn { min-height: 36px; padding: 4px 12px; font-size: 15px; }
.friends { margin: 8px 0 0; font-size: 15px; color: var(--fg); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.friends .muted { margin-left: -4px; }
.friends-mark { color: #d0457a; }

/* stage line */
.stages { display: flex; align-items: flex-start; margin-top: 14px; overflow-x: auto; padding-bottom: 4px; max-width: 640px; }
.stage { display: flex; flex-direction: column; align-items: center; gap: 6px; min-width: 96px; flex: 1 1 0; position: relative; background: none; border: 0; padding: 0; cursor: pointer; font-size: 15px; color: var(--muted); }
.stage::before { content: ""; position: absolute; top: 15px; right: 50%; width: 100%; height: 5px; background: var(--line); border-radius: 3px; z-index: 0; }
.stage:first-child::before { display: none; }
.stage.done::before, .stage.current::before { background: var(--ok); }
.stage .ball { width: 34px; height: 34px; border-radius: 50%; background: var(--line); position: relative; z-index: 1; display: grid; place-items: center; color: #fff; font-weight: 700; font-size: 18px; }
.stage.done .ball { background: var(--ok); }
.stage.current .ball { background: var(--accent); box-shadow: 0 0 0 5px var(--accent-soft); }
.stage.current { color: var(--accent); font-weight: 700; }
.stage.sel > span:last-child { text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 2px; }
.stage.done { color: var(--fg); }

/* toolbar */
.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin: 22px 0 10px; }
.seg { display: inline-flex; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 3px; }
.seg { flex-wrap: wrap; }
.seg button { border: 0; background: none; padding: 6px 14px; min-height: 40px; border-radius: 999px; cursor: pointer; font-size: 15px; color: var(--muted); }
.seg button[aria-pressed="true"] { background: var(--accent); color: #fff; }
.check { display: inline-flex; gap: 10px; align-items: center; font-size: 15px; color: var(--muted); cursor: pointer; min-height: 40px; }
.check input { width: 20px; height: 20px; margin: 0; accent-color: var(--accent); }
.legend { margin: 0 0 6px; font-size: 15px; }
.legend summary { cursor: pointer; color: var(--accent); display: inline-flex; align-items: center; min-height: 40px; padding: 0 4px; border-radius: 8px; }
.legend-body { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: 8px 28px; background: var(--surface); border-radius: var(--radius); padding: 14px 18px; box-shadow: var(--shadow); margin-top: 4px; }
.legend-body h3 { font-size: 16px; margin: 0 0 6px; }
.legend-body ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.legend-body li { line-height: 1.5; }
.legend-body li .dot { vertical-align: -1px; margin-right: 6px; }
.legend-body li .tag { margin-right: 2px; }
.legend-body p { margin: 0; grid-column: 1 / -1; }
.spacer { flex: 1; }

.btn { border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 7px 16px; min-height: 40px; cursor: pointer; font-size: 15px; }
.btn:hover { background: var(--soft); }
a.btn { text-decoration: none; color: var(--fg); display: inline-flex; align-items: center; }
.gap-top { margin-top: 12px; }
.side-link .ph.home, .side-link .ph.help { display: grid; place-items: center; font-size: 24px; color: var(--muted); font-weight: 700; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 600; }
.btn.primary:hover { filter: brightness(1.06); }
.btn.big { width: 100%; padding: 12px 18px; font-size: 17px; border-radius: 12px; }
.btn.icon { padding: 6px 10px; border-radius: 10px; min-width: 40px; }
.btn:disabled { opacity: .5; cursor: default; }

/* lanes: a header row (toggle, name, count, one line of description), then the cards */
.lane { padding: 10px 0 14px; border-top: 1px solid var(--line); }
.lane.collapsed { padding-bottom: 10px; }
.lane-head { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; min-width: 0; }
.lane-toggle { display: inline-flex; align-items: center; gap: 8px; border: 0; background: none; padding: 4px 8px 4px 2px; min-height: 40px; border-radius: 10px; cursor: pointer; color: var(--fg); text-align: left; }
.lane-toggle:hover { background: var(--soft); }
.caret { width: 18px; color: var(--muted); font-size: 15px; }
.lane-name { font-weight: 700; font-size: 19px; overflow-wrap: anywhere; }
.lane-count { background: var(--soft); color: var(--muted); border-radius: 999px; padding: 0 9px; font-size: 14px; font-weight: 700; }
.lane-yours { color: var(--warn-text); font-size: 14px; font-weight: 600; }
.lane-desc { font-size: 15px; color: var(--muted); line-height: 1.35; overflow-wrap: anywhere; min-width: 0; }
.lane-add { border: 0; background: none; color: var(--muted); font-size: 15px; min-height: 40px; padding: 0 10px; border-radius: 10px; cursor: pointer; }
.lane-add:hover { color: var(--accent); background: var(--soft); }
.lane-empty { margin: 0; color: var(--muted); align-self: center; padding: 8px 4px; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; margin-top: 6px; }
.quiet-lanes { border-top: 1px solid var(--line); padding: 8px 0; }
.quiet-lanes > summary { cursor: pointer; min-height: 44px; display: flex; align-items: center; flex-wrap: wrap; gap: 0 4px; font-weight: 600; color: var(--fg); padding: 0 4px; border-radius: 10px; }
.quiet-lanes > summary:hover { background: var(--soft); }
.quiet-lanes > summary .muted { font-weight: 400; }

.card { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 12px; align-items: center; text-align: left; background: var(--surface); border: 2px solid transparent; border-radius: var(--radius); padding: 10px; box-shadow: var(--shadow); cursor: pointer; min-height: 84px; width: 100%; }
.card:hover { border-color: var(--line); }
.card.selected { border-color: var(--accent); }
.card.waiting { background: linear-gradient(0deg, var(--surface), var(--surface)) padding-box, linear-gradient(var(--warn-soft), var(--warn-soft)) border-box; border-color: var(--warn); }
.card.dim { opacity: .55; }
.card.no-img { grid-template-columns: minmax(0, 1fr); padding: 12px 14px; }
.card img.thumb { width: 84px; height: 64px; border-radius: 10px; object-fit: cover; background: var(--soft); }
.card .t { font-weight: 600; font-size: 16px; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.card .meta { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; justify-content: space-between; margin-top: 6px; font-size: 15px; color: var(--muted); }
.card .meta .chip { font-weight: 600; }
.card.add { grid-template-columns: 1fr; place-items: center; color: var(--muted); border: 2px dashed var(--line); background: transparent; box-shadow: none; min-height: 60px; font-size: 15px; }
.card.add:hover { color: var(--accent); border-color: var(--accent); }
.card .game-name { font-size: 15px; color: var(--muted); }

.dot { width: 12px; height: 12px; border-radius: 50%; flex: none; display: inline-block; }
.chip { display: inline-flex; align-items: center; gap: 6px; font-size: 15px; color: var(--fg); }
.chip.big { background: var(--soft); border-radius: 999px; padding: 5px 14px 5px 10px; font-size: 15px; font-weight: 600; }
.chip.big.waiting { background: var(--warn-soft); }
.tag { font-size: 15px; font-weight: 700; border-radius: 6px; padding: 1px 8px; background: var(--soft); color: var(--muted); }
.tag.choice { background: var(--warn-soft); color: var(--warn-text); }
.tag.feedback { background: #fbe9f0; color: #a3285a; }
.cm { display: inline-flex; align-items: center; gap: 4px; }
.cm svg { width: 16px; height: 16px; }

/* home */
.strip { display: flex; gap: 12px; overflow-x: auto; padding: 4px 2px 10px; scroll-snap-type: x proximity; }
.strip .card { width: 290px; flex: none; scroll-snap-align: start; }
.games { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.game-card { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; text-decoration: none; color: var(--fg); display: flex; flex-direction: column; }
.game-card img, .game-card .ph { width: 100%; height: 150px; object-fit: cover; background: var(--soft); }
.game-card .body { padding: 14px 16px 16px; display: grid; gap: 4px; }
.game-card h3 { font-size: 21px; }

/* feed */
.feed { display: grid; gap: 2px; background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 8px; }
.feed-day { font-weight: 700; padding: 14px 10px 4px; }
.feed-item { display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 12px; padding: 8px 10px; border-radius: 10px; }
.feed-item:hover { background: var(--soft); }
.feed-item .time { color: var(--muted); font-size: 15px; }
.feed-item .who { font-weight: 600; }
.feed-item a { text-decoration: none; }
.via { font-size: 15px; color: var(--muted); border: 1px solid var(--line); border-radius: 6px; padding: 0 6px; margin-left: 6px; }
.feed-item .sum { overflow-wrap: anywhere; }

/* side panel */
.panel { background: var(--surface); border-left: 1px solid var(--line); position: sticky; top: 0; height: 100vh; overflow-y: auto; padding: 20px 22px 40px; }
.panel-top { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 15px; }
.panel-top span { min-width: 0; overflow-wrap: anywhere; }
.panel h2:focus { outline: none; }
.panel h2:focus-visible { outline: none; }  /* a heading that only receives focus to start reading from */
.panel h2 { font-size: 28px; font-weight: 800; margin: 10px 0 10px; overflow-wrap: anywhere; }
.panel h3 { font-size: 18px; margin: 22px 0 10px; padding-top: 18px; border-top: 1px solid var(--line); }
.close { margin-left: auto; border: 0; background: none; font-size: 28px; line-height: 1; cursor: pointer; color: var(--muted); width: 44px; height: 44px; border-radius: 10px; flex: none; }
.close:hover { background: var(--soft); color: var(--fg); }
.fields { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px; }
.field { display: grid; gap: 4px; font-size: 15px; color: var(--muted); min-width: 0; }
.field select, .field input, .field textarea, .input { border: 1px solid #b9c5d1; border-radius: 10px; padding: 8px 10px; background: var(--surface); font-size: 16px; width: 100%; min-height: 42px; min-width: 0; color: var(--fg); }
.hint { font-size: 15px; color: var(--muted); margin-top: -4px; }
textarea.input { min-height: 120px; resize: vertical; }
.text { white-space: pre-wrap; overflow-wrap: anywhere; }
.quote { margin: 12px 0 0; padding: 12px 16px; background: #f4f2fd; border-left: 4px solid #8a76e0; border-radius: 0 12px 12px 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.quote-by { font-size: 15px; color: var(--muted); margin-top: 6px; }
.source { font-size: 15px; margin-top: 8px; display: inline-block; }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.gallery a { display: block; }
.gallery img { width: 100%; height: 120px; object-fit: cover; border-radius: 12px; background: var(--soft); display: block; }
.gallery .cap { font-size: 15px; color: var(--muted); margin-top: 3px; }
.upload { display: inline-flex; align-items: center; gap: 8px; margin-top: 10px; cursor: pointer; }
.upload { position: relative; }
.upload input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.upload:focus-within { outline: 3px solid var(--accent); outline-offset: 2px; }

.variants { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.variant { border: 2px solid var(--line); border-radius: 14px; padding: 10px; display: flex; flex-direction: column; gap: 6px; }
.variant.chosen { border-color: var(--accent); background: var(--accent-soft); }
.variant .num { font-size: 22px; font-weight: 800; color: var(--accent); }
.variant img { width: 100%; height: 100px; object-fit: cover; border-radius: 10px; }
.variant .vt { font-weight: 600; overflow-wrap: anywhere; }
.variant .vb { font-size: 15px; color: var(--muted); white-space: pre-wrap; overflow-wrap: anywhere; flex: 1; }
.decided { margin-top: 10px; font-size: 15px; color: var(--muted); }

.comments { display: grid; gap: 14px; }
.comment { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 10px; }
.avatar { width: 40px; height: 40px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; font-weight: 700; }
.comment .who { font-weight: 700; }
.comment .when { color: var(--muted); font-size: 15px; margin-left: 8px; font-weight: 400; }
.comment .text { margin-top: 2px; }
.compose { display: grid; gap: 10px; margin-top: 14px; }
.compose textarea { min-height: 80px; }
details.hist summary { cursor: pointer; font-weight: 700; font-size: 18px; margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); }
.hist-item { font-size: 15px; padding: 6px 0; border-bottom: 1px solid var(--soft); overflow-wrap: anywhere; }
.hist-item .muted { font-size: 15px; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.settings-row { display: grid; grid-template-columns: minmax(0, 1fr) auto auto auto; gap: 6px; align-items: center; margin-bottom: 8px; }
.settings-row.with-desc { grid-template-columns: minmax(0, 1fr) auto auto auto auto; margin-bottom: 14px; }
.settings-row .desc { grid-column: 1 / -1; font-size: 15px; }
.row .input { flex: 1 1 200px; min-width: 0; }

.toast { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); background: #24313d; color: #fff; padding: 10px 18px; border-radius: 12px; font-size: 15px; z-index: 50; max-width: calc(100vw - 32px); }

/* ---- narrow screens ---- */
@media (max-width: 1100px) {
  .app.with-panel { grid-template-columns: 250px minmax(0, 1fr); }
  .panel { position: fixed; right: 0; top: 0; width: min(460px, 100vw); z-index: 20; box-shadow: -10px 0 30px rgba(20, 40, 60, .12); }
}
@media (max-width: 760px) {
  body { font-size: 16px; }
  .app, .app.with-panel { grid-template-columns: minmax(0, 1fr); }
  .side { position: static; height: auto; flex-direction: row; align-items: center; overflow-x: auto; padding: 10px 16px; gap: 8px; border-right: 0; border-bottom: 1px solid var(--line); }
  .brand { padding: 0 6px 0 0; font-size: 18px; }
  .brand span:last-child, .side-label, .side-sub { display: none; }
  .side-link { flex: none; padding: 6px 10px 6px 6px; }
  .side-link img, .side-link .ph { width: 34px; height: 34px; }
  .main { padding: 18px 16px 50px; }
  .hero { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .hero-cover { width: 100%; height: 150px; }
  .hero h1 { font-size: 28px; }
  .lane { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .lane-head { padding-top: 0; }
  .cards { grid-template-columns: minmax(0, 1fr); }
  .panel { width: 100vw; padding: 16px 16px 40px; }
  .welcome { flex-direction: column; }
  .page-title { font-size: 26px; }
  .fields { grid-template-columns: minmax(0, 1fr); }
}

/* ---- «Что делать сейчас» ---- */
kbd { font-family: inherit; font-size: 13px; font-weight: 700; border: 1px solid currentColor; border-radius: 6px; padding: 0 6px; margin-left: 10px; opacity: .75; line-height: 1.5; }
.now { margin: 22px 0 8px; background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px 20px 20px; border: 2px solid var(--accent-soft); }
.now-title { font-size: 24px; font-weight: 800; }
.now-lead { margin: 4px 0 14px; color: var(--muted); }
.now-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 270px), 1fr)); gap: 12px; }
.now-step { display: grid; grid-template-columns: auto minmax(0, 1fr); grid-template-rows: 1fr auto; gap: 10px 14px; background: var(--bg); border-radius: 14px; padding: 14px 16px; }
.now-num { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 20px; color: #fff; background: var(--accent); }
.now-step.k-choice .now-num { background: #c27a00; }
.now-step.k-feedback .now-num { background: #b8336a; }
.now-name { font-size: 20px; font-weight: 700; display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.now-count { font-size: 26px; font-weight: 800; color: var(--fg); }
.now-sub { color: var(--muted); font-size: 15px; margin-top: 2px; }
.now-go { grid-column: 1 / -1; justify-content: center; min-height: 48px; font-size: 17px; border-radius: 12px; }
.now.calm { border-color: var(--line); }
.now-calm { margin: 8px 0 0; display: flex; align-items: center; gap: 12px; font-size: 18px; }
.calm-mark { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: #e3f4e8; color: #1f7a3a; font-weight: 800; flex: none; }
.board-title { margin-top: 30px; }

/* ---- focus mode ---- */
.focus { max-width: 1000px; margin: 0 auto; }
.focus-top { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.focus-kind { font-weight: 700; font-size: 18px; }
.focus-pos { font-weight: 700; font-size: 18px; color: var(--muted); }
.focus-bar { display: block; width: 100%; height: 8px; margin: 12px 0 6px; appearance: none; border: 0; border-radius: 99px; background: var(--line); overflow: hidden; }
.focus-bar::-webkit-progress-bar { background: var(--line); border-radius: 99px; }
.focus-bar::-webkit-progress-value { background: var(--accent); border-radius: 99px; }
.focus-bar::-moz-progress-bar { background: var(--accent); border-radius: 99px; }
.focus-head { margin-top: 18px; }
.focus-crumbs { color: var(--muted); font-size: 15px; }
.focus-title { font-size: 34px; font-weight: 800; margin: 6px 0 10px; line-height: 1.2; overflow-wrap: anywhere; }
.focus-title:focus { outline: none; }
.focus-title:focus-visible { outline: none; }
.focus-prev { background: var(--soft); border-radius: 10px; padding: 8px 12px; margin: 0 0 10px; }
.focus-h { font-size: 15px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin: 22px 0 8px; }
.focus-text { font-size: 19px; max-width: 75ch; margin: 0; }
.steps { margin: 0; padding-left: 28px; display: grid; gap: 6px; }
.focus .steps { font-size: 19px; }
.steps li { padding-left: 4px; }
.focus-imgs { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 16px; }
.focus-imgs a { display: grid; gap: 4px; text-decoration: none; }
.focus-imgs img { width: 280px; max-width: 100%; height: 170px; object-fit: cover; border-radius: 12px; background: var(--soft); box-shadow: var(--shadow); }
.focus-imgs .cap { font-size: 15px; }
.fvariants { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 14px; margin-top: 20px; }
.fvariant { background: var(--surface); border: 2px solid var(--line); border-radius: 16px; padding: 14px; display: flex; flex-direction: column; gap: 8px; box-shadow: var(--shadow); }
.fvariant.chosen { border-color: var(--accent); background: var(--accent-soft); }
.fv-num { width: 38px; height: 38px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; font-weight: 800; font-size: 20px; }
.fvariant img { width: 100%; height: 150px; object-fit: cover; border-radius: 10px; }
.fv-title { font-weight: 700; font-size: 19px; overflow-wrap: anywhere; }
.fv-body { color: var(--muted); white-space: pre-wrap; overflow-wrap: anywhere; flex: 1; }
.fbtn { min-height: 48px; font-size: 17px; padding: 8px 20px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; }
.btn.ok { background: #2f8a4a; border-color: #2f8a4a; color: #fff; font-weight: 600; }
.btn.ok:hover { filter: brightness(1.06); background: #2f8a4a; }
.focus-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
textarea.focus-note { margin-top: 14px; min-height: 0; }
.focus-form { margin-top: 14px; display: grid; gap: 10px; background: var(--surface); border-radius: 14px; padding: 14px; box-shadow: var(--shadow); }
.focus-quote { font-size: 22px; margin-top: 4px; }
.focus-foot { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-top: 30px; padding-top: 16px; border-top: 1px solid var(--line); }
.focus-open { font-size: 15px; }
.focus-hint { font-size: 14px; color: var(--muted); }
.summary { margin: 0; padding-left: 22px; display: grid; gap: 6px; font-size: 17px; }
.linked { margin: 10px 0 0; font-size: 15px; }
.cover-btn { margin-top: 6px; min-height: 36px; padding: 4px 12px; font-size: 14px; }
.cover-btn[aria-pressed="true"] { background: var(--accent-soft); border-color: var(--accent); }

@media (max-width: 760px) {
  .now { padding: 14px; }
  .now-title { font-size: 21px; }
  .focus-title { font-size: 26px; }
  .focus-text, .focus .steps { font-size: 17px; }
  .focus-hint { display: none; }
  .fbtn { flex: 1 1 auto; }
  .lane-desc { flex-basis: 100%; padding-left: 28px; }
  .stages { max-width: none; }
}

/* ---- login, people, opinions ---- */
.app.logged-out { grid-template-columns: minmax(0, 1fr); }
.app.logged-out .side { display: none; }
.login { max-width: 480px; margin: 8vh auto 0; background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 28px 28px 24px; display: flex; flex-direction: column; gap: 14px; }
.login h1 { font-size: 30px; }
.login .lead { margin: 0; }
.big-mark { width: 52px; height: 52px; font-size: 26px; border-radius: 14px; }
.login-steps { margin: 0; padding-left: 22px; display: flex; flex-direction: column; gap: 6px; }
.code-input { font-size: 24px; letter-spacing: .12em; flex: 1; min-width: 0; text-align: center; }
.btn.tg { background: #229ed9; border-color: #229ed9; color: #fff; font-weight: 600; text-align: center; text-decoration: none; display: block; }
.side-user { margin-top: auto; padding: 14px 8px 0; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.side-name { font-weight: 600; overflow-wrap: anywhere; }
.opinions { margin-top: 14px; }
.opinion-list { list-style: none; margin: 6px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.opinion { background: var(--soft); border-radius: var(--radius-s); padding: 8px 12px; overflow-wrap: anywhere; }
.opinion.v-ok .verdict { color: #23743b; font-weight: 700; }
.opinion.v-not .verdict { color: #a3262f; font-weight: 700; }
.opinion.stale { opacity: .7; }
.opinion-form { margin-top: 14px; }
.op-count { font-size: 14px; color: var(--muted); }
.feedback-form { max-width: 720px; }
.people { list-style: none; margin: 8px 0 18px; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.person { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px 16px; display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; justify-content: space-between; }
.person-main { display: flex; flex-direction: column; gap: 4px; min-width: 0; flex: 1 1 320px; overflow-wrap: anywhere; }
.person.off { opacity: .65; }
