/* Дашборд задач IT · Nord Solis.
   Язык: спокойно и мягко. Тёмная и светлая тема по настройке устройства, тёплое «солнечное» свечение фона,
   размытие только у плавающих слоёв (шапка, меню, панель), большие скругления, тонкие линии вместо рамок,
   Inter с настройками различимости (l/I/1). Шаг отступов 4/8. Красный — только просрочка. */
@font-face { font-family: Inter; font-style: normal; font-weight: 100 900; font-display: swap; src: url('fonts/InterVariable.woff2') format('woff2'); }

:root {
  /* тёмная (по умолчанию) */
  --bg: #0d1117;
  --glow-a: rgba(232, 190, 130, .10);   /* тёплое солнце сверху слева */
  --glow-b: rgba(120, 165, 215, .08);   /* холодный свет справа снизу */
  --surface: #141a22;
  --surface-2: #19212b;
  --surface-3: #222c38;
  --glass: rgba(16, 21, 28, .72);
  --pop: rgba(20, 26, 34, .86);
  --fill: rgba(214, 230, 250, .05);
  --fill-2: rgba(214, 230, 250, .09);
  --hl: rgba(255, 255, 255, .045);      /* световая кромка сверху у плашек */
  --ink: #e9eff6;
  --ink-2: #b2bfcc;
  --ink-3: #8a97a6;
  --line: rgba(190, 210, 235, .08);
  --line-2: rgba(190, 210, 235, .15);
  --accent: #cfe3f7;
  --accent-ink: #0c1622;
  --accent-soft: rgba(150, 195, 240, .12);
  --link: #a9cdf0;
  --primary: #d6e7f8;
  --primary-ink: #0c1622;
  --primary-hover: #e6f1fc;
  --sun: #e8c695;
  --late: #f2a397;
  --late-soft: rgba(240, 130, 115, .10);
  --late-line: rgba(240, 150, 135, .30);
  --focus: rgba(170, 210, 250, .55);
  --p-urgent: #e8c695;
  --p-normal: #a9cbea;
  --shadow-row: inset 0 1px 0 var(--hl);
  --shadow-pop: 0 1px 0 var(--hl) inset, 0 16px 48px rgba(0, 0, 0, .45), 0 2px 8px rgba(0, 0, 0, .25);
  --shadow-drawer: -32px 0 80px rgba(0, 0, 0, .5);
  --scrim: rgba(6, 9, 13, .45);
  --st-new: #c3cfdd;    --st-new-bg: rgba(195, 207, 221, .10);
  --st-work: #aed0ef;   --st-work-bg: rgba(140, 190, 240, .12);
  --st-wait: #e8c695;   --st-wait-bg: rgba(232, 198, 149, .12);
  --st-review: #cdb8ea; --st-review-bg: rgba(205, 184, 234, .12);
  --st-done: #a6d2b8;   --st-done-bg: rgba(150, 210, 175, .11);
  --st-off: #8e9cab;    --st-off-bg: rgba(142, 156, 171, .10);
  --st-accept: #9fd6d2; --st-accept-bg: rgba(159, 214, 210, .11);
  --st-reject: #d9c1a6; --st-reject-bg: rgba(217, 193, 166, .11);

  --r-xs: 8px; --r-sm: 12px; --r: 16px; --r-lg: 20px; --r-xl: 24px; --pill: 999px;
  --fs-12: 12px; --fs-14: 14px; --fs-16: 16px; --fs-20: 20px; --fs-24: 24px; --fs-32: 32px;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --t: .18s;
  --blur: blur(18px) saturate(1.4);
  color-scheme: dark;
}

/* светлая — если устройство в светлом режиме */
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg: #f4f5f7;
    --glow-a: rgba(240, 196, 130, .22);
    --glow-b: rgba(140, 185, 230, .18);
    --surface: #ffffff;
    --surface-2: #f6f8fa;
    --surface-3: #edf1f5;
    --glass: rgba(246, 247, 249, .74);
    --pop: rgba(255, 255, 255, .88);
    --fill: rgba(30, 55, 85, .045);
    --fill-2: rgba(30, 55, 85, .08);
    --hl: rgba(255, 255, 255, .9);
    --ink: #17202a;
    --ink-2: #485667;
    --ink-3: #606d7e;
    --line: rgba(25, 45, 70, .08);
    --line-2: rgba(25, 45, 70, .14);
    --accent: #2d6aa6;
    --accent-ink: #ffffff;
    --accent-soft: rgba(45, 106, 166, .09);
    --link: #2a639c;
    --primary: #1c2632;
    --primary-ink: #ffffff;
    --primary-hover: #2a3746;
    --sun: #e2ad5f;
    --late: #b63e30;
    --late-soft: rgba(210, 80, 60, .07);
    --late-line: rgba(200, 80, 60, .28);
    --focus: rgba(45, 106, 166, .45);
    --p-urgent: #e0a750;
    --p-normal: #86b3dc;
    --shadow-row: 0 0 0 1px var(--line), 0 1px 2px rgba(20, 35, 55, .04);
    --shadow-pop: 0 0 0 1px var(--line), 0 16px 48px rgba(20, 35, 55, .14), 0 2px 8px rgba(20, 35, 55, .06);
    --shadow-drawer: -24px 0 64px rgba(20, 35, 55, .16);
    --scrim: rgba(30, 40, 52, .22);
    --st-new: #4d5b6b;    --st-new-bg: #eef1f5;
    --st-work: #2a659c;   --st-work-bg: #e5eff9;
    --st-wait: #8f5f18;   --st-wait-bg: #fbf0dd;
    --st-review: #6a4ca3; --st-review-bg: #f1ebfb;
    --st-done: #2c7650;   --st-done-bg: #e4f3eb;
    --st-off: #657283;    --st-off-bg: #f0f2f5;
    --st-accept: #1d746e; --st-accept-bg: #e1f3f1;
    --st-reject: #84572c; --st-reject-bg: #f6ece2;
    color-scheme: light;
  }
}

* { box-sizing: border-box; }
html { scrollbar-gutter: stable; -webkit-text-size-adjust: 100%; -webkit-tap-highlight-color: transparent; }
body {
  margin: 0; color: var(--ink);
  background:
    radial-gradient(1200px 640px at 8% -10%, var(--glow-a), transparent 60%),
    radial-gradient(1000px 700px at 100% 110%, var(--glow-b), transparent 60%),
    var(--bg);
  background-attachment: fixed;
  font: 400 var(--fs-16)/1.55 Inter, "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
  font-feature-settings: "cv05", "cv08", "cv11", "calt", "kern";  /* различимые l, I и однокомнатная a */
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; text-rendering: optimizeLegibility;
  min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column;
}
* { scrollbar-width: thin; scrollbar-color: var(--line-2) transparent; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--line-2); border-radius: 8px; border: 3px solid transparent; background-clip: padding-box; }
::selection { background: var(--accent-soft); }
a { color: var(--link); text-decoration-color: color-mix(in srgb, currentColor 40%, transparent); text-underline-offset: 3px; text-decoration-thickness: 1px; transition: text-decoration-color var(--t); }
a:hover { text-decoration-color: currentColor; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 6px; }
h1, h2, h3 { margin: 0; line-height: 1.2; text-wrap: balance; }
h1 { font-size: var(--fs-24); font-weight: 600; letter-spacing: -.025em; }
.h3, h2 { font-size: var(--fs-16); font-weight: 600; letter-spacing: -.01em; }
p { margin: 0; text-wrap: pretty; }
.muted { color: var(--ink-3); }
.small { font-size: var(--fs-14); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
s { color: var(--ink-3); }

/* ---- шапка: полупрозрачная, с размытием ---- */
.top { background: var(--glass); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.top-in { max-width: 1600px; margin: 0 auto; padding: 0 24px; display: flex; align-items: center; gap: 24px; min-height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 12px; color: var(--ink); text-decoration: none; font-weight: 600; letter-spacing: -.01em; white-space: nowrap; }
.brand-mark { display: inline-block; width: 32px; height: 32px; flex: none; background-color: currentColor; -webkit-mask: url('./nordsolis-mark.svg') center / contain no-repeat; mask: url('./nordsolis-mark.svg') center / contain no-repeat; }
.brand-co { color: var(--ink-3); font-weight: 400; font-size: var(--fs-14); }
.brand-lg { font-size: var(--fs-20); margin-bottom: 16px; }
.nav { display: flex; gap: 4px; flex: 1; min-width: 0; scrollbar-width: none; }
.nav::-webkit-scrollbar { display: none; }
.l-short { display: none; }
.nav[hidden] { display: none; }
.nav-a { display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px; min-height: 44px; border-radius: var(--pill); color: var(--ink-2); text-decoration: none; font-weight: 500; white-space: nowrap; transition: background var(--t), color var(--t); }
.nav-a:hover { background: var(--fill); color: var(--ink); }
.nav-a.is-on { background: var(--fill-2); color: var(--ink); }
.count { display: inline-flex; align-items: center; justify-content: center; min-width: 24px; height: 24px; padding: 0 8px; border-radius: var(--pill); background: var(--accent-soft); color: var(--ink); font-size: var(--fs-12); font-weight: 600; font-variant-numeric: tabular-nums; }
h2 .count, .tab .count { background: var(--fill-2); color: var(--ink-2); }
.tab.is-on .count { background: var(--accent-soft); color: var(--ink); }

.me { position: relative; margin-left: auto; }
.me > summary { list-style: none; }
.me > summary::-webkit-details-marker { display: none; }
.me-btn { display: inline-flex; align-items: center; gap: 8px; padding: 4px 12px 4px 4px; min-height: 44px; border-radius: var(--pill); cursor: pointer; transition: background var(--t); }
.me-btn:hover, .me[open] .me-btn { background: var(--fill); }
.me-name { font-weight: 500; max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.me-menu { position: absolute; right: 0; top: calc(100% + 8px); min-width: 256px; background: var(--pop); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); border-radius: var(--r-lg); box-shadow: var(--shadow-pop); padding: 8px; display: grid; gap: 4px; z-index: 30; animation: pop-in .16s var(--ease); transform-origin: top right; }
.me-head { display: grid; gap: 0; padding: 8px 12px 12px; border-bottom: 1px solid var(--line); margin-bottom: 4px; font-size: var(--fs-14); }
.me-head strong { font-size: var(--fs-16); font-weight: 600; }
.me-menu a, .me-menu .linkish { display: flex; align-items: center; min-height: 44px; padding: 0 12px; border-radius: var(--r-sm); color: var(--ink); text-decoration: none; width: 100%; font: inherit; text-align: left; transition: background var(--t); }
.me-menu a:hover, .me-menu .linkish:hover { background: var(--fill); }
.linkish { background: none; border: 0; cursor: pointer; }

.av { border-radius: 50%; object-fit: cover; flex: none; background: var(--accent-soft); box-shadow: 0 0 0 1px var(--line); }
.av-sm { width: 32px; height: 32px; }
.av-md { width: 48px; height: 48px; }
.av-lg { width: 96px; height: 96px; }
.av-initials { display: inline-flex; align-items: center; justify-content: center; color: var(--ink); font-weight: 600; font-size: var(--fs-14); }
.av-md.av-initials { font-size: var(--fs-16); }
.av-lg.av-initials { font-size: var(--fs-32); }

/* ---- страница ---- */
.main { flex: 1; width: 100%; max-width: 1600px; margin: 0 auto; padding: 32px 24px 48px; display: flex; flex-direction: column; gap: 24px; }
.foot { max-width: 1600px; width: 100%; margin: 0 auto; padding: 16px 24px 24px; color: var(--ink-3); font-size: var(--fs-14); border-top: 1px solid var(--line); }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.page-title { display: grid; gap: 8px; min-width: 0; }
.page-title h1 { overflow-wrap: anywhere; }
.lead { color: var(--ink-2); max-width: 65ch; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.page-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.crumbs { font-size: var(--fs-14); margin-bottom: -8px; }
.crumbs a { color: var(--ink-2); text-decoration: none; display: inline-flex; min-height: 32px; align-items: center; }
.crumbs a:hover { color: var(--ink); }
.quick { display: flex; gap: 8px; flex-wrap: wrap; }
.stack { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.grid-2 { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 16px; align-items: start; }
.narrow { max-width: 720px; width: 100%; }

.card { background: var(--surface); border-radius: var(--r-xl); box-shadow: var(--shadow-row); padding: 24px; display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.notice { background: var(--surface); box-shadow: var(--shadow-row); border-radius: var(--r); padding: 12px 16px 12px 20px; position: relative; overflow: hidden; }
.notice::before { content: ""; position: absolute; left: 8px; top: 12px; bottom: 12px; width: 3px; border-radius: 3px; background: var(--st-reject); }
.notice-ok { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.notice-ok::before { background: var(--st-accept); }
.prose { white-space: pre-wrap; overflow-wrap: anywhere; max-width: 72ch; }

/* ---- кнопки: мягкие, без рамок ---- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 8px 20px; border-radius: var(--pill); border: 0; background: var(--fill); color: var(--ink); font: 500 var(--fs-16)/1.25 inherit; font-family: inherit; letter-spacing: -.005em; text-decoration: none; cursor: pointer; transition: background var(--t), color var(--t), box-shadow var(--t), transform .08s; white-space: nowrap; }
.btn:hover { background: var(--fill-2); }
.btn:active { transform: scale(.98); }
.btn[disabled], .btn.is-busy { opacity: .55; pointer-events: none; }
.btn.is-busy { position: relative; }
.btn-primary { background: var(--primary); color: var(--primary-ink); font-weight: 600; box-shadow: 0 1px 0 rgba(255, 255, 255, .25) inset, 0 6px 20px -8px color-mix(in srgb, var(--primary) 60%, transparent); }
.btn-primary:hover { background: var(--primary-hover); }
.btn-primary .count { background: color-mix(in srgb, var(--primary-ink) 14%, transparent); color: inherit; }
.btn-ghost { background: transparent; color: var(--ink-2); }
.btn-ghost:hover { background: var(--fill); color: var(--ink); }
.btn-danger { color: var(--ink); background: transparent; box-shadow: inset 0 0 0 1px var(--line-2); }  /* опасное — контуром: красный занят просрочкой */
.btn-danger:hover { background: var(--ink); color: var(--bg); box-shadow: none; }
.btn-big { min-height: 56px; padding: 12px 28px; font-size: var(--fs-16); font-weight: 600; }
.btn-block { width: 100%; }
.btn .count { background: var(--fill-2); color: var(--ink-2); }

/* ---- значки: пастель, без рамок ---- */
.badge, .chip, .prio, .flag { display: inline-flex; align-items: center; height: 24px; padding: 0 10px; border-radius: var(--pill); font-size: var(--fs-12); font-weight: 500; white-space: nowrap; letter-spacing: .01em; }
.ts-new, .rs-new { color: var(--st-new); background: var(--st-new-bg); }
.ts-in_progress, .rs-review { color: var(--st-work); background: var(--st-work-bg); }
.ts-waiting, .rs-clarify { color: var(--st-wait); background: var(--st-wait-bg); }
.ts-review { color: var(--st-review); background: var(--st-review-bg); }
.ts-done, .rs-done { color: var(--st-done); background: var(--st-done-bg); }
.ts-cancelled, .rs-withdrawn { color: var(--st-off); background: var(--st-off-bg); }
.rs-accepted { color: var(--st-accept); background: var(--st-accept-bg); }
.rs-rejected { color: var(--st-reject); background: var(--st-reject-bg); }
.chip { background: transparent; box-shadow: inset 0 0 0 1px var(--line-2); color: var(--ink-2); }
.u-blocking { box-shadow: inset 0 0 0 1px var(--ink-3); color: var(--ink); font-weight: 600; }
.prio { background: var(--st-wait-bg); color: var(--st-wait); margin-right: 8px; }
.flag { background: var(--sun); color: #1b1408; margin-right: 8px; }
.role-admin { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--st-work) 60%, transparent); color: var(--st-work); }
.role-developer { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--st-accept) 60%, transparent); color: var(--st-accept); }
.role-observer { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--st-review) 60%, transparent); color: var(--st-review); }
.chip-blocked { background: var(--ink); color: var(--bg); box-shadow: none; }

/* ---- сводка: крупные спокойные цифры ---- */
.tiles { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; }
.tile { position: relative; background: var(--surface); border-radius: var(--r-lg); box-shadow: var(--shadow-row); min-width: 0; transition: background var(--t), box-shadow var(--t); }
.tile-a { display: flex; flex-direction: column; gap: 8px; padding: 16px 40px 16px 20px; height: 100%; color: var(--ink); text-decoration: none; border-radius: inherit; transition: background var(--t); }
.tile-a:hover { background: var(--fill); }
.tile-n { font-size: var(--fs-32); font-weight: 600; line-height: 1; letter-spacing: -.035em; font-variant-numeric: tabular-nums; font-feature-settings: "tnum", "ss01", "cv05", "cv08"; }
.tile-l { font-size: var(--fs-14); color: var(--ink-2); line-height: 1.3; }
.tile.is-zero .tile-n { color: var(--ink-3); font-weight: 400; }
.tile.is-alert { background: linear-gradient(180deg, var(--late-soft), transparent 140%), var(--surface); box-shadow: inset 0 0 0 1px var(--late-line); }
.tile.is-alert .tile-n, .tile.is-alert .tile-l { color: var(--late); }
.tile .tip { position: absolute; top: 8px; right: 8px; }

/* ---- подсказка «?» поверх, не в потоке ---- */
.tip { position: relative; display: inline-flex; vertical-align: middle; }
.tip-btn { width: 24px; height: 24px; border-radius: 50%; border: 0; box-shadow: inset 0 0 0 1px var(--line-2); background: transparent; color: var(--ink-3); font: 500 var(--fs-12)/1 inherit; font-family: inherit; cursor: help; display: inline-flex; align-items: center; justify-content: center; padding: 0; transition: color var(--t), box-shadow var(--t); }
.tip-btn::before { content: ""; position: absolute; inset: -10px; }
.tip-btn:hover, .tip-btn[aria-expanded="true"] { box-shadow: inset 0 0 0 1px var(--ink-3); color: var(--ink); }
.tip-pop { position: absolute; z-index: 40; top: calc(100% + 8px); right: -8px; width: max-content; max-width: min(280px, 80vw); background: var(--pop); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); color: var(--ink); font-size: var(--fs-14); font-weight: 400; line-height: 1.45; padding: 12px 16px; border-radius: var(--r-sm); box-shadow: var(--shadow-pop); visibility: hidden; opacity: 0; transform: translateY(-4px); transition: opacity var(--t) var(--ease), transform var(--t) var(--ease), visibility var(--t); pointer-events: none; text-align: left; white-space: normal; }
.tip:hover .tip-pop, .tip.is-open .tip-pop, .tip-btn:focus-visible + .tip-pop { visibility: visible; opacity: 1; transform: none; }

/* ---- списки задач и запросов: отдельные мягкие плашки ---- */
.rows { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.trow { position: relative; display: grid; grid-template-columns: 52px minmax(0, 1fr); align-items: center; background: var(--surface); border-radius: var(--r); box-shadow: var(--shadow-row); transition: background var(--t) var(--ease), box-shadow var(--t); }
.trow:hover, .trow:focus-within { background: var(--surface-2); }
.row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 16px; align-items: center; padding: 12px 20px 12px 0; min-height: 60px; color: var(--ink); text-decoration: none; border-radius: 0 var(--r) var(--r) 0; }
.row:focus-visible { outline-offset: -2px; border-radius: var(--r); }
.t-done { display: contents; }
.t-check { display: grid; place-items: center; width: 52px; height: 60px; padding: 0; border: 0; background: transparent; border-radius: var(--r) 0 0 var(--r); cursor: pointer; color: var(--ink); }
.t-check.is-static { cursor: default; }
.circle { display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--ink-2) 70%, transparent); font-size: var(--fs-12); line-height: 1; transition: box-shadow var(--t), background var(--t), transform .2s var(--ease); }
.t-check:hover .circle, .t-check:focus-visible .circle, .t-check.is-done .circle, .trow.is-completing .circle { box-shadow: inset 0 0 0 1.5px var(--st-done); background: var(--st-done-bg); }
.t-check:hover .circle::after, .t-check:focus-visible .circle::after, .t-check.is-done .circle::after, .trow.is-completing .circle::after { content: "✓"; color: var(--st-done); font-weight: 600; }
.trow.is-completing .circle { transform: scale(1.1); }
.t-check.is-static:not(.is-done) .circle { opacity: .35; }
.trow.is-completing .row { animation: t-dissolve 5s linear both; pointer-events: none; }
@keyframes t-dissolve { from { opacity: 1; } to { opacity: .25; } }
.t-undo { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); display: flex; align-items: center; gap: 12px; padding-left: 32px; background: linear-gradient(90deg, transparent, var(--surface-2) 24px); z-index: 2; animation: fade-in .2s var(--ease); }
.t-undo[hidden] { display: none; }
.t-undo-text { font-size: var(--fs-14); color: var(--ink-2); white-space: nowrap; }
.btn-sm { min-height: 40px; padding: 8px 16px; font-size: var(--fs-14); background: var(--primary); color: var(--primary-ink); font-weight: 600; }
.btn-sm:hover { background: var(--primary-hover); }
/* группы по приоритету: точка цвета, название, число справа */
.tgroups { display: grid; gap: 24px; }
.tgroup { display: grid; gap: 8px; }
.g-label { display: flex; align-items: center; gap: 8px; min-height: 24px; padding: 0 8px; font-size: var(--fs-12); font-weight: 500; color: var(--ink-2); letter-spacing: .04em; text-transform: uppercase; }
.g-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--p-normal); flex: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--p-normal) 18%, transparent); }
.tgroup[data-priority="urgent"] .g-dot, .q-prio:has(input:checked) .g-dot { background: var(--p-urgent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--p-urgent) 20%, transparent); }
.g-n { margin-left: auto; color: var(--ink-3); font-variant-numeric: tabular-nums; letter-spacing: 0; }
/* быстрое добавление: одна мягкая строка */
.quick-add { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto 48px auto; gap: 8px; align-items: center; padding: 6px; background: var(--surface); border-radius: var(--r-lg); box-shadow: var(--shadow-row); transition: box-shadow var(--t); }
.quick-add:has(.quick-light) {grid-template-columns:minmax(0,1fr) 92px auto 48px auto;}
.quick-light {display:grid;gap:2px;color:var(--ink-2);font-size:12px;min-width:0;}
.quick-light input {width:100%;min-width:0;min-height:44px;padding:8px;}
.light-budget {border:1px solid var(--line-2);border-radius:16px;padding:16px;min-width:0;display:grid;gap:12px;}
.light-budget legend {padding:0 8px;font-weight:600;}
.light-budget input[type=range] {width:100%;min-height:44px;accent-color:var(--link);}
@media(max-width:640px){.quick-add:has(.quick-light){grid-template-columns:minmax(0,1fr) 76px 44px;}.quick-add:has(.quick-light) input[type=text]{grid-column:1/-1;}.quick-add:has(.quick-light) .q-prio{grid-column:1;grid-row:2;}.quick-light{grid-column:2;grid-row:2;}.quick-add:has(.quick-light) .q-add{grid-column:3;grid-row:2;}}
.quick-add:focus-within { box-shadow: var(--shadow-row), 0 0 0 3px var(--accent-soft); }
.quick-add input[type=text] { min-height: 48px; padding: 12px 16px; background: transparent; border-radius: var(--r-sm); }
.quick-add input[type=text]:hover, .quick-add input[type=text]:focus { background: transparent; border-color: transparent; }
.q-prio { position: relative; display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 16px; border-radius: var(--pill); background: var(--fill); color: var(--ink-2); font-size: var(--fs-14); cursor: pointer; user-select: none; transition: background var(--t), color var(--t); }
.q-prio:hover { background: var(--fill-2); }
.q-prio input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; }
.q-prio:has(input:checked) { color: var(--st-wait); background: var(--st-wait-bg); }
.q-prio:has(input:focus-visible) { outline: 2px solid var(--focus); outline-offset: 2px; }
.q-add { width: 44px; height: 44px; padding: 0; border: 0; border-radius: 50%; background: var(--primary); color: var(--primary-ink); font-family: inherit; font-size: 24px; font-weight: 400; line-height: 1; cursor: pointer; transition: background var(--t), transform .08s; }
.q-add:hover { background: var(--primary-hover); }
.q-add:active { transform: scale(.94); }
.quick-add > .tip { margin-right: 8px; }
.q-err { grid-column: 1 / -1; padding: 0 12px 8px; }
.row-main { display: grid; gap: 4px; min-width: 0; }
.row-title { font-weight: 500; letter-spacing: -.01em; overflow-wrap: anywhere; display: flex; align-items: center; flex-wrap: wrap; gap: 0; }
.row-sub { color: var(--ink-3); font-size: var(--fs-14); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row-meta { display: grid; grid-template-columns: 160px 96px 128px; gap: 12px; align-items: center; justify-items: start; font-size: var(--fs-14); }
.rows .row-meta:has(.u-blocking, .u-important, .u-nice) { grid-template-columns: 200px 140px; }
.who { color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.due { font-variant-numeric: tabular-nums; color: var(--ink-2); }
.is-late, .due.is-late { color: var(--late); font-weight: 600; }

.cards, .people { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.cards { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }
.rcard { display: flex; flex-direction: column; gap: 8px; padding: 20px 24px; height: 100%; background: var(--surface); border-radius: var(--r-lg); box-shadow: var(--shadow-row); color: var(--ink); text-decoration: none; transition: background var(--t); }
.rcard:hover { background: var(--surface-2); }
.rcard-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.rcard-title { font-size: var(--fs-16); font-weight: 600; letter-spacing: -.01em; overflow-wrap: anywhere; }
.rcard-ans { font-size: var(--fs-14); color: var(--ink-2); overflow-wrap: anywhere; }
.hero-action { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; }

.people { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.pcard { display: flex; gap: 16px; align-items: center; padding: 16px 20px; background: var(--surface); border-radius: var(--r-lg); box-shadow: var(--shadow-row); color: var(--ink); text-decoration: none; height: 100%; transition: background var(--t); }
.pcard:hover { background: var(--surface-2); }
.pcard.is-blocked { opacity: .7; }
.pcard-body { display: grid; gap: 4px; min-width: 0; }
.pcard-name { font-weight: 600; }
.pcard-mail { color: var(--ink-3); font-size: var(--fs-14); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pcard-meta { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.profile { flex-direction: row; align-items: flex-start; gap: 24px; }
.profile-body { display: flex; flex-direction: column; gap: 8px; min-width: 0; flex: 1; }
.mini { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.mini li { display: flex; justify-content: space-between; gap: 12px; align-items: center; }

.empty { background: transparent; border: 1px dashed var(--line-2); border-radius: var(--r-lg); padding: 40px 24px; text-align: center; color: var(--ink-2); display: grid; gap: 16px; justify-items: center; }
.filter-note { color: var(--ink-2); font-size: var(--fs-14); padding: 0 8px; }

/* ---- вкладки и фильтры ---- */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); overflow-x: auto; overflow-y: hidden; scrollbar-width: none; }
.tab { display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px; min-height: 44px; color: var(--ink-2); text-decoration: none; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; font-weight: 500; transition: color var(--t), border-color var(--t); }
.tab:hover { color: var(--ink); }
.tab.is-on { color: var(--ink); border-bottom-color: var(--ink); }
.task-extra { border: 1px solid var(--line); border-radius: var(--r-md); }
.task-extra > summary { min-height: 44px; padding: 12px 16px; cursor: pointer; color: var(--ink-2); }
.task-extra > summary:hover { color: var(--ink); background: var(--fill-2); }
.task-extra > summary:focus-visible { outline: 2px solid var(--ink); outline-offset: 4px; }
.task-extra-body { display: grid; gap: 16px; padding: 16px; }
.employee-welcome { width: min(calc(100% - 32px), 720px); margin: 32px auto; }
.task-progress-totals { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.task-progress-totals > a { display: grid; gap: 8px; padding: 24px; background: var(--surface); border-radius: var(--r-lg); color: var(--ink); text-decoration: none; }
.task-progress-totals strong { font-size: var(--fs-32); }
.task-progress-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(100%,320px),1fr)); gap: 24px; margin-top: 24px; }
.task-progress-person { display: grid; gap: 16px; margin: 0; }
.task-progress-person > header { display: flex; align-items: center; gap: 16px; min-width: 0; }
.task-progress-person h2 { font-size: var(--fs-20); overflow-wrap: anywhere; }
.task-progress-person header p { margin: 4px 0 0; }
.task-progress-metrics { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; }
.task-progress-metric { display: grid; align-content: center; gap: 4px; min-height: 72px; padding: 12px; color: var(--ink); background: var(--fill-2); border-radius: var(--r-sm); text-decoration: none; }
.task-progress-metric strong { font-size: var(--fs-24); }
.task-progress-metric span { font-size: var(--fs-14); }
.task-progress-metric.needs-attention { box-shadow: inset 0 0 0 1px var(--focus); }
.task-progress-metric:hover, .task-progress-totals > a:hover { background: var(--accent-soft); }
.task-progress-more { margin-top: 24px; }
.task-progress-more > summary { min-height: 44px; padding: 12px 0; cursor: pointer; }
.task-progress-compact { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(100%,280px),1fr)); gap: 8px; margin-top: 16px; }
.task-progress-compact > a { display: flex; align-items: center; gap: 12px; padding: 16px; min-height: 72px; background: var(--fill-2); border-radius: var(--r-sm); text-decoration: none; }
.task-progress-compact > a > span:last-child { display: grid; gap: 4px; min-width: 0; overflow-wrap: anywhere; }
@media(max-width:600px) { .task-progress-totals { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; } .task-progress-totals > a { padding: 16px; } }
.filters { display: grid; grid-template-columns: minmax(200px, 2fr) repeat(4, minmax(140px, 1fr)) auto; gap: 12px; align-items: end; background: var(--surface); border-radius: var(--r-lg); padding: 16px; box-shadow: var(--shadow-row); }
.filters:has(.f-item:nth-child(5):last-child) { grid-template-columns: repeat(3, minmax(160px, 240px)) auto; }
.filters[action$="/inbox"] { grid-template-columns: repeat(3,minmax(0,1fr)) auto; }
.b-cols.no-requests {grid-template-columns:minmax(0,1fr);}
@media(max-width:1100px) { .filters[action$="/inbox"] {grid-template-columns:repeat(2,minmax(0,1fr));} .filters[action$="/inbox"] .f-go {grid-column:1/-1;} }
.f-item { display: grid; gap: 4px; min-width: 0; }
.f-item > label { font-size: var(--fs-12); color: var(--ink-3); font-weight: 500; text-transform: uppercase; letter-spacing: .05em; }
.f-go { display: flex; gap: 8px; }

/* ---- формы ---- */
.form { display: flex; flex-direction: column; gap: 20px; }
.form > .btn, .form > .check { align-self: flex-start; }
.field { display: grid; gap: 8px; border: 0; margin: 0; padding: 0; min-width: 0; }
.field > label, .field > legend { font-weight: 500; font-size: var(--fs-14); color: var(--ink-2); padding: 0; }
.req { color: var(--ink-3); }
.opt { color: var(--ink-3); font-weight: 400; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
input[type=text], input[type=search], input[type=date], input[type=number], textarea, select, .dd-btn {
  width: 100%; min-height: 44px; padding: 8px 14px; border: 1px solid transparent; border-radius: var(--r-sm); background: var(--fill); color: var(--ink); font: inherit; transition: background var(--t), border-color var(--t), box-shadow var(--t); }
input[type=search] { border-radius: var(--pill); padding-left: 40px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%238a97a6' stroke-width='1.6' stroke-linecap='round'%3E%3Ccircle cx='7' cy='7' r='5'/%3E%3Cpath d='m11 11 3.5 3.5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: 16px 50%; }
textarea { resize: vertical; min-height: 96px; line-height: 1.55; }
input[type=number] { appearance: textfield; -moz-appearance: textfield; min-height: 44px; }
input[type=number]::-webkit-inner-spin-button, input[type=number]::-webkit-outer-spin-button { appearance: none; margin: 0; }
input[type=range] { appearance: none; display: block; width: 100%; height: 44px; padding: 0; border: 0; background: transparent; cursor: pointer; accent-color: var(--primary); }
input[type=range]::-webkit-slider-runnable-track { height: 8px; border-radius: 4px; background: var(--surface-3); border: 1px solid var(--line-2); }
input[type=range]::-moz-range-track { height: 8px; border-radius: 4px; background: var(--surface-3); border: 1px solid var(--line-2); }
input[type=range]::-webkit-slider-thumb { appearance: none; width: 24px; height: 24px; margin-top: -9px; border-radius: 50%; border: 2px solid var(--surface); background: var(--primary); }
input[type=range]::-moz-range-thumb { width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--surface); background: var(--primary); }
input[type=range]:focus-visible { outline: 2px solid var(--link); outline-offset: 4px; }
input[type=range]:disabled { opacity: .45; cursor: default; }
input::placeholder, textarea::placeholder { color: var(--ink-3); }
input:hover, textarea:hover, select:hover, .dd-btn:hover { background-color: var(--fill-2); }
input:focus, textarea:focus, select:focus, .dd-btn:focus { outline: none; border-color: var(--focus); background-color: var(--fill-2); box-shadow: 0 0 0 3px var(--accent-soft); }
.has-err input, .has-err textarea, .has-err .dd-btn, .has-err select { border-color: var(--late-line); }
.err { font-size: var(--fs-14); font-weight: 500; color: var(--ink); display: flex; gap: 8px; align-items: center; }
.err::before { content: "!"; display: inline-flex; width: 20px; height: 20px; border-radius: 50%; background: var(--ink); color: var(--bg); align-items: center; justify-content: center; font-size: var(--fs-12); font-weight: 600; flex: none; }
.hint { font-size: var(--fs-14); color: var(--ink-3); }
.form-err { background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line-2); border-radius: var(--r); padding: 12px 16px; font-weight: 500; }
.form-actions { display: flex; gap: 8px; flex-wrap: wrap; padding-top: 8px; }
.privacy { font-size: var(--fs-14); color: var(--ink-3); background: var(--fill); border-radius: var(--r-sm); padding: 8px 12px; }
.radio-row { display: flex; flex-wrap: wrap; gap: 8px; }
.radio { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 8px 16px; border-radius: var(--pill); cursor: pointer; background: var(--fill); transition: background var(--t), box-shadow var(--t); }
.radio:hover { background: var(--fill-2); }
.radio:has(input:checked) { box-shadow: inset 0 0 0 1.5px var(--accent); background: var(--accent-soft); color: var(--ink); font-weight: 600; }
.radio input { accent-color: var(--accent); width: 18px; height: 18px; margin: 0; }
.check { display: inline-flex; gap: 8px; align-items: center; min-height: 44px; cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--accent); }
.inline-form { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.inline-form > label { font-weight: 500; font-size: var(--fs-14); }
.inline-form .dd, .inline-form select { width: 220px; }
.danger-zone { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; padding: 16px 0; }
.danger-zone p { display: flex; gap: 8px; align-items: center; }
[data-show-when][hidden] { display: none; }

/* ---- свой выпадающий список (app.js) ---- */
.dd { position: relative; width: 100%; }
.dd select { position: absolute; inset: 0; opacity: 0; pointer-events: none; width: 100%; height: 100%; }
.dd-btn { display: flex; align-items: center; justify-content: space-between; gap: 8px; text-align: left; cursor: pointer; }
.dd-btn span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dd-btn::after { content: ""; flex: none; width: 7px; height: 7px; border-right: 1.5px solid var(--ink-3); border-bottom: 1.5px solid var(--ink-3); transform: translateY(-2px) rotate(45deg); transition: transform var(--t) var(--ease); }
.dd.is-open .dd-btn::after { transform: translateY(2px) rotate(-135deg); }
.dd-list { position: absolute; z-index: 50; top: calc(100% + 6px); left: 0; min-width: 100%; max-height: 300px; overflow: auto; margin: 0; padding: 6px; list-style: none; background: var(--pop); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); border-radius: var(--r); box-shadow: var(--shadow-pop); animation: pop-in .14s var(--ease); transform-origin: top; }
.dd-list[hidden] { display: none; }
.dd-opt { display: flex; align-items: center; min-height: 44px; padding: 8px 12px; border-radius: var(--r-xs); cursor: pointer; white-space: normal; overflow-wrap: anywhere; transition: background .12s; }
.dd-opt:hover, .dd-opt.is-active { background: var(--fill-2); }
.dd-opt[aria-selected="true"] { color: var(--ink); font-weight: 600; background: var(--accent-soft); }
.dd-opt[aria-disabled="true"] { opacity: .45; cursor: not-allowed; background: transparent; }

/* ---- детали ---- */
.props { display: grid; grid-template-columns: minmax(120px, 200px) minmax(0, 1fr); gap: 12px 16px; margin: 0; }
.props dt { color: var(--ink-3); font-size: var(--fs-14); padding-top: 2px; }
.props dd { margin: 0; overflow-wrap: anywhere; }
.props-compact { grid-template-columns: max-content minmax(0, 1fr); gap: 8px 16px; align-items: center; }
.hist { list-style: none; margin: 0; padding: 0 0 0 16px; display: grid; gap: 12px; font-size: var(--fs-14); position: relative; }
.hist::before { content: ""; position: absolute; left: 3px; top: 6px; bottom: 6px; width: 1px; background: var(--line-2); }
.hist li { display: grid; gap: 0; position: relative; }
.hist li::before { content: ""; position: absolute; left: -16px; top: 6px; width: 7px; height: 7px; border-radius: 50%; background: var(--surface); box-shadow: inset 0 0 0 1.5px var(--ink-3); }
.h-when { color: var(--ink-3); font-size: var(--fs-12); font-variant-numeric: tabular-nums; }
.h-who { font-weight: 600; }
.more > summary { cursor: pointer; color: var(--link); font-size: var(--fs-14); padding: 8px 0; min-height: 44px; display: flex; align-items: center; }
.more .hist { margin-top: 8px; }

.msgs { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.msg { display: grid; gap: 4px; padding: 12px 16px; border-radius: var(--r-lg) var(--r-lg) var(--r-lg) 6px; background: var(--surface-2); box-shadow: var(--shadow-row); max-width: 92%; justify-self: start; }
.msg-it { background: var(--accent-soft); border-radius: var(--r-lg) var(--r-lg) 6px var(--r-lg); justify-self: end; box-shadow: none; }
.msg-who { font-weight: 600; font-size: var(--fs-14); }
.msg-body { white-space: pre-wrap; overflow-wrap: anywhere; }
.msg-at { font-size: var(--fs-12); color: var(--ink-3); }
.msg-form { gap: 12px; padding-top: 16px; border-top: 1px solid var(--line); }
.actions-card .act-row { display: flex; gap: 8px; flex-wrap: wrap; }
.reject > summary { list-style: none; width: max-content; }
.reject > summary::-webkit-details-marker { display: none; }
.reject[open] > summary { margin-bottom: 12px; }

/* ---- вход ---- */
.login { display: grid; gap: 16px; justify-items: center; padding-top: 10vh; }
.login-card { max-width: 440px; width: 100%; gap: 16px; padding: 40px 32px; box-shadow: var(--shadow-row), 0 24px 64px -24px rgba(0, 0, 0, .35); }
.login-dev { max-width: 440px; width: 100%; }
.dev-list { display: grid; gap: 8px; }
.dev-btn { justify-content: space-between; border-radius: var(--r); }

/* ---- адаптив ---- */
@media (max-width: 1180px) {
  .tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .filters { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .f-search { grid-column: 1 / -1; }
  .row-meta { grid-template-columns: 140px 96px 120px; }
}
@media (max-width: 900px) {
  .grid-2 { grid-template-columns: minmax(0, 1fr); }
  .top-in { flex-wrap: wrap; gap: 0 16px; padding: 0 16px; }
  .brand { min-height: 56px; }
  .nav { order: 3; flex-basis: 100%; overflow-x: auto; padding-bottom: 8px; margin: 0 -16px; padding-left: 16px; padding-right: 16px; }
  .main { padding: 20px 16px 40px; gap: 16px; }
  .foot { padding: 16px; }
}
@media (max-width: 640px) {
  h1 { font-size: var(--fs-20); }
  .brand-co, .me-name { display: none; }
  .me-btn { padding-right: 4px; }
  .l-full { display: none; }
  .l-short { display: inline; }
  .nav { gap: 0; }
  .nav-a { padding: 8px; font-size: var(--fs-14); gap: 4px; }
  /* сводка — одна строка с прокруткой вбок, чтобы задачи были видны сразу */
  .tiles { display: flex; overflow-x: auto; gap: 8px; margin: 0 -16px; padding: 2px 16px 4px; scroll-snap-type: x proximity; scroll-padding: 0 16px; scrollbar-width: none; }
  .tiles::-webkit-scrollbar { display: none; }
  .tile { flex: 0 0 132px; scroll-snap-align: start; }
  .tile-n { font-size: var(--fs-24); }
  .tile-a { padding: 12px 32px 12px 16px; gap: 4px; }
  .tile-l { font-size: var(--fs-12); }
  .tile .tip { top: 4px; right: 4px; }
  .tip-pop { position: fixed; top: auto; bottom: 16px; left: 16px; right: 16px; max-width: none; width: auto; }
  .row { grid-template-columns: minmax(0, 1fr); gap: 8px; padding: 12px 16px 12px 0; }
  .trow { grid-template-columns: 48px minmax(0, 1fr); align-items: start; }
  .t-check { width: 48px; }
  .quick-add { grid-template-columns: minmax(0, 1fr) auto 44px; }
  .quick-add > .tip { display: none; }
  .q-prio { padding: 0 14px; }
  .q-prio-l { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .row-meta, .rows .row-meta:has(.u-blocking, .u-important, .u-nice) { display: flex; flex-wrap: wrap; gap: 8px 12px; }
  .row-sub { white-space: normal; }
  .filters { grid-template-columns: 1fr 1fr; padding: 12px; }
  .filters:has(.f-item:nth-child(5):last-child) { grid-template-columns: 1fr 1fr; }
  .f-go { grid-column: 1 / -1; }
  .field-row { grid-template-columns: 1fr; }
  .card { padding: 20px; border-radius: var(--r-lg); }
  .profile { flex-direction: column; align-items: center; text-align: center; }
  .profile .pcard-meta { justify-content: center; }
  .props, .props-compact { grid-template-columns: 1fr; gap: 4px; text-align: left; }
  .props dd { margin-bottom: 8px; }
  .cards, .people { grid-template-columns: 1fr; }
  .hero-action .btn-big { width: 100%; }
  .page-actions, .page-actions .btn { width: 100%; }
  .login-card { padding: 32px 24px; }
  .inline-form .dd, .inline-form select { width: 100%; }
}
/* списки запросов: такие же отдельные плашки, как строки задач */
.rows > li:not(.trow) > .row { background: var(--surface); border-radius: var(--r); box-shadow: var(--shadow-row); padding-left: 20px; transition: background var(--t) var(--ease); }
.rows > li:not(.trow) > .row:hover { background: var(--surface-2); }
@media (max-width: 640px) { .rows > li:not(.trow) > .row { padding-left: 16px; } }

/* ================= главный экран: один блок, всё рядом ================= */
/* .td-block — самостоятельный блок: раскладка по ширине блока (container query), чтобы встать в хаб */
.td-block { container-type: inline-size; container-name: td; display: flex; flex-direction: column; gap: 24px; min-width: 0; }
.b-cols { display: grid; grid-template-columns: minmax(0, 1fr); gap: 32px; align-items: start; }
@container td (min-width: 960px) { .b-cols { grid-template-columns: minmax(0, 5fr) minmax(320px, 3fr); } .b-reqs { position: sticky; top: 88px; } }
.b-col { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.b-tasks { container-type: inline-size; container-name: task-column; }
/* The task column can be narrow even on a wide screen beside requests. */
@container task-column (max-width: 720px) {
  .row { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .row-meta { display: flex; flex-wrap: wrap; gap: 8px 12px; }
  .b-tasks .b-search { min-width: min(100%, 280px); }
}
.b-bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; min-height: 48px; }
.b-title { font-size: var(--fs-20); font-weight: 600; letter-spacing: -.02em; margin-right: auto; }
.b-reqs .b-bar .seg { margin-left: auto; }
/* переключатель: «таблетка» в мягкой дорожке */
.seg { display: inline-flex; gap: 2px; padding: 4px; background: var(--fill); border-radius: var(--pill); }
.seg-a { display: inline-flex; align-items: center; gap: 8px; min-height: 36px; padding: 0 16px; border-radius: var(--pill); color: var(--ink-2); text-decoration: none; font-size: var(--fs-14); font-weight: 500; white-space: nowrap; transition: background var(--t) var(--ease), color var(--t), box-shadow var(--t); }
.seg-a:hover { color: var(--ink); }
.seg-a.is-on { background: var(--surface-3); color: var(--ink); box-shadow: var(--shadow-row), 0 1px 3px rgba(0, 0, 0, .12); }
.seg-a .count { min-width: 20px; height: 20px; font-size: var(--fs-12); padding: 0 6px; }
.b-search { position: relative; display: flex; gap: 8px; align-items: center; flex: 1; min-width: 200px; }
.b-search input[type=search] { min-height: 44px; }
.b-filters > summary { list-style: none; }
.b-filters > summary::-webkit-details-marker { display: none; }
.b-filters[open] > summary { background: var(--fill); color: var(--ink); }
.b-filters .count { min-width: 8px; height: 8px; padding: 0; font-size: 0; background: var(--p-urgent); }
.b-filters-pop { position: absolute; z-index: 45; right: 0; top: calc(100% + 8px); width: min(560px, calc(100vw - 32px)); display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding: 16px; background: var(--pop); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); border-radius: var(--r-lg); box-shadow: var(--shadow-pop); animation: pop-in .16s var(--ease); transform-origin: top right; }
.b-filters-pop .f-go { grid-column: 1 / -1; display: flex; gap: 8px; }
.tile-a.is-on { box-shadow: inset 0 0 0 1.5px var(--accent); }
.b-reqs .row { grid-template-columns: minmax(0, 1fr); gap: 8px; }
.b-reqs .row-meta { display: flex; flex-wrap: wrap; gap: 8px; }
.b-reqs .rows .row-meta:has(.u-blocking, .u-important, .u-nice) { display: flex; }
@container td (max-width: 720px) {
  .row { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .row-meta { display: flex; flex-wrap: wrap; gap: 8px 12px; }
}
html.is-loading { cursor: progress; }
html.is-loading #board { opacity: .75; transition: opacity .2s .15s; }
/* плавная смена списков после фильтра или действия (View Transitions, где есть) */
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .22s; animation-timing-function: var(--ease); }

/* ---- боковая панель: парит над экраном, фон слегка размыт ---- */
.drawer[hidden] { display: none; }
.drawer { position: fixed; inset: 0; z-index: 60; }
.drawer-scrim { position: absolute; inset: 0; background: var(--scrim); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); animation: fade-in .2s var(--ease); }
.drawer-panel { position: absolute; top: 8px; right: 8px; bottom: 8px; width: min(720px, calc(100% - 16px)); display: flex; flex-direction: column; background: var(--bg); border-radius: var(--r-xl); box-shadow: 0 0 0 1px var(--line), var(--shadow-drawer); overflow: hidden; animation: d-in .28s var(--ease); outline: none; }
.drawer-bar { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 8px 8px 8px 12px; border-bottom: 1px solid var(--line); background: var(--glass); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); }
.drawer-full { font-size: var(--fs-14); }
.drawer-x { width: 44px; padding: 0; font-size: 24px; font-weight: 300; line-height: 1; padding-bottom: 2px; }
.drawer-body { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 24px 32px 32px; display: flex; flex-direction: column; gap: 16px; container-type: inline-size; }
.drawer-body .crumbs { display: none; }
.drawer-body .grid-2 { grid-template-columns: minmax(0, 1fr); }
.drawer-body .narrow { max-width: none; }
.drawer-body h1 { font-size: var(--fs-24); outline: none; }
.drawer-body .tiles { display: none; }
.drawer-body .card { background: var(--surface); }
html.has-drawer { overflow: hidden; }
@keyframes d-in { from { transform: translateX(32px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes pop-in { from { opacity: 0; transform: scale(.97) translateY(-4px); } to { opacity: 1; transform: none; } }
@media (max-width: 640px) {
  .drawer-panel { top: 8px; right: 0; bottom: 0; width: 100%; border-radius: var(--r-xl) var(--r-xl) 0 0; animation-name: d-up; }
  .drawer-body { padding: 16px 16px 24px; }
  .drawer-body h1 { font-size: var(--fs-20); }
  .b-search { flex-basis: 100%; order: 3; }
  .b-tasks .b-bar > .btn { margin-left: auto; padding: 8px 16px; }
  .b-tasks:has(.quick-add) .b-bar > .btn { display: none; }  /* на телефоне есть строка быстрого добавления */
  .b-filters-pop { grid-template-columns: 1fr; position: fixed; left: 16px; right: 16px; top: auto; width: auto; }
}
@keyframes d-up { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }
/* без размытия там, где оно не поддерживается: плотный фон */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .top, .drawer-bar { background: var(--bg); }
  .me-menu, .dd-list, .tip-pop, .b-filters-pop { background: var(--surface-2); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation-duration: .01ms !important; }
  .trow.is-completing .row { animation: none; opacity: .4; }
}
@media (prefers-reduced-transparency: reduce) {
  .top, .drawer-bar { background: var(--bg); -webkit-backdrop-filter: none; backdrop-filter: none; }
  .drawer-scrim { -webkit-backdrop-filter: none; backdrop-filter: none; }
}

/* ---- свой профиль: аватар ---- */
.field-label { font-weight: 500; font-size: var(--fs-14); color: var(--ink-2); }
.avatar-edit { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 8px 20px; align-items: center; }
.avatar-edit .hint, .avatar-edit .err, .avatar-edit noscript { grid-column: 1 / -1; }
.avatar-preview { display: inline-flex; border-radius: 50%; box-shadow: 0 0 0 4px var(--fill); }
.avatar-preview img { display: block; }
.avatar-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.avatar-actions label.btn { cursor: pointer; }
.avatar-edit input[type=file]:focus-visible + .btn, .avatar-actions label.btn:has(+ input:focus-visible) { outline: 2px solid var(--focus); outline-offset: 2px; }
@media (max-width: 640px) { .avatar-edit { grid-template-columns: 1fr; justify-items: start; } }
.btn[hidden] { display: none; }
#profile .form { max-width: 480px; }

/* ---- профиль: ник, должность, навыки ---- */
.pn { display: inline-grid; line-height: 1.25; }
.pn-nick { font-weight: 600; }
.pn-real { font-size: var(--fs-12); color: var(--ink-3); font-weight: 400; }
.profile-pos { color: var(--ink-2); }
.skills { display: flex; flex-wrap: wrap; gap: 6px; }
.skill { font-size: var(--fs-12); padding: 2px 10px; border-radius: var(--pill); background: var(--fill-2); color: var(--ink-2); }
.profile-about { color: var(--ink-2); max-width: 60ch; white-space: pre-wrap; }
#profile .form { max-width: 640px; }
.field-row { align-items: start; }

/* ---- Сол: персонаж вместо фото; место под ним и рамка по редкости ---- */
/* Редкость: один набор цветов на всё (рамки, подписи, плитки). Класс r-* задаёт --rc, элементы берут цвет из --rc. */
:root { --r-common: #d2c6a2; --r-uncommon: #5fd18e; --r-rare: #4fa3ff; --r-epic: #b07bff; --r-legendary: #f7c33c; --r-mythical: #ff5ba6; }
@media (prefers-color-scheme: light) { :root { --r-common: #74643e; --r-uncommon: #237b49; --r-rare: #1f6fd1; --r-epic: #7d42dc; --r-legendary: #866000; --r-mythical: #c4166f; } }
.r-common { --rc: var(--r-common); } .r-uncommon { --rc: var(--r-uncommon); } .r-rare { --rc: var(--r-rare); }
.r-epic { --rc: var(--r-epic); } .r-legendary { --rc: var(--r-legendary); } .r-mythical { --rc: var(--r-mythical); }
.r-label, .r-chip, .loot-badge, .sol-rarity { color: var(--rc, var(--r-common)); }
.av.sol { position: relative; display: inline-block; overflow: hidden; border-radius: 50%; flex: none; box-shadow: 0 0 0 2px var(--rc, var(--r-common)); }
.av.sol img { position: absolute; inset: 4%; width: 92%; height: 92%; object-fit: contain; object-position: center; }
.av.sol-portrait img { inset: auto; left: -70%; top: -30%; width: 240%; height: 240%; max-width: none; object-fit: contain; }
.av.sol-portrait img[src$="/coder.webp"] { width: 300%; height: 300%; left: -126%; top: -78%; }
.av.sol-portrait img[src$="/lantern.webp"] { width: 300%; height: 300%; left: -100%; top: -70%; }
.av-sm.sol { box-shadow: 0 0 0 1.5px var(--rc); }
.sol.r-epic { box-shadow: 0 0 0 2px var(--rc), 0 0 14px -2px var(--rc); }
.sol.r-legendary, .sol.r-mythical { box-shadow: 0 0 0 2px var(--rc), 0 0 18px -2px var(--rc); }
.sc-sunrise { background: linear-gradient(180deg, #f3b089, #7a5aa6); }
.sc-office { background: linear-gradient(180deg, #4a5b70, #222d3a); }
.sc-forest { background: linear-gradient(180deg, #3f8a63, #173d2c); }
.sc-sea { background: linear-gradient(180deg, #57a9cf, #1b4a6d); }
.sc-space { background: radial-gradient(circle at 30% 25%, #4b3a8f, #0d0a24 70%); }
.sc-night { background: linear-gradient(180deg, #26345a, #0c1222); }
.sol-card { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 20px; align-items: center; padding: 16px; border-radius: var(--r-lg); background: var(--fill); }
.sol-xl { width: 140px; height: 140px; box-shadow: 0 0 0 3px var(--rc), 0 0 28px -6px var(--rc) !important; }
.sol-info { display: grid; gap: 6px; min-width: 0; }
.sol-rarity { font-size: var(--fs-12); font-weight: 600; letter-spacing: .06em; text-transform: uppercase; }
.sol-level { font-size: var(--fs-20); font-weight: 600; letter-spacing: -.02em; }
.sol-bar { height: 8px; border-radius: var(--pill); background: var(--fill-2); overflow: hidden; max-width: 320px; }
.sol-bar span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #f2c46d, #ff9d5c); transition: width .4s var(--ease); }
@media (max-width: 640px) { .sol-card { grid-template-columns: 1fr; justify-items: start; } }
[hidden] { display: none !important; }
progress.sol-bar { appearance: none; -webkit-appearance: none; width: 100%; border: 0; display: block; }
progress.sol-bar::-webkit-progress-bar { background: var(--fill-2); border-radius: var(--pill); }
progress.sol-bar::-webkit-progress-value { background: linear-gradient(90deg, #f2c46d, #ff9d5c); border-radius: var(--pill); }
progress.sol-bar::-moz-progress-bar { background: linear-gradient(90deg, #f2c46d, #ff9d5c); border-radius: var(--pill); }

/* ---- сад проектов ---- */
.garden { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.tree-card { display: grid; height: 100%; background: var(--surface); border-radius: var(--r-xl); box-shadow: var(--shadow-row); color: var(--ink); text-decoration: none; overflow: hidden; transition: transform var(--t), box-shadow var(--t); }
.tree-card:hover { transform: translateY(-2px); }
.tree-card:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.tree-pic { display: block; aspect-ratio: 1; overflow: hidden; background: linear-gradient(180deg, #f3c9a8, #b9c6dc); }
.tree-img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.tree-card:hover .tree-img { transform: scale(1.03); }
.tree-card.is-closed .tree-img { filter: grayscale(.85) blur(2px) brightness(.8); }
.tree-body { display: grid; gap: 8px; padding: 16px 20px 20px; align-content: start; }
.tree-name { font-size: var(--fs-20); font-weight: 600; letter-spacing: -.02em; }
.tree-stage { font-size: var(--fs-12); font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: #3d9a6b; }
.tree-meta { display: flex; flex-wrap: wrap; gap: 4px 12px; color: var(--ink-3); font-size: var(--fs-14); margin: 0; }
.garden-how { margin-top: 24px; max-width: 75ch; }
.project { display: grid; grid-template-columns: minmax(0, 320px) minmax(0, 1fr); gap: 24px; align-items: center; }
.project-pic { display: block; border-radius: var(--r-xl); overflow: hidden; aspect-ratio: 1; }
.project-body { display: grid; gap: 8px; min-width: 0; }
.project-body h1 { margin: 0; }
.member-list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 16px; }
.member-list li { display: inline-flex; align-items: center; gap: 8px; }
.member-pick { display: grid; gap: 4px; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.check { display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 8px; border-radius: var(--r-sm); cursor: pointer; }
.check:hover { background: var(--fill); }
.check input { width: 18px; height: 18px; accent-color: var(--accent); }
@media (max-width: 640px) { .project { grid-template-columns: 1fr; } .project-pic { max-width: 320px; } }
@media (prefers-reduced-motion: reduce) { .tree-card, .tree-img { transition: none; } .tree-card:hover, .tree-card:hover .tree-img { transform: none; } }
#f-open_level { max-width: 120px; }
@media (max-width: 640px) {
  .garden { grid-template-columns: 1fr; gap: 12px; }
  .tree-card { grid-template-columns: 112px minmax(0, 1fr); align-items: center; }
  .tree-pic { height: 112px; }
  .tree-body { padding: 12px 16px; gap: 4px; }
  .tree-name { font-size: var(--fs-16); }
}

/* ---- знакомство (онбординг) ---- */
.onb { min-height: 100dvh; display: grid; align-content: center; justify-items: center; gap: 24px; padding: 32px 16px; }
.onb-top { width: 100%; max-width: 520px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.onb-steps { list-style: none; margin: 0; padding: 0; display: flex; gap: 8px; }
.onb-steps li { width: 32px; height: 4px; border-radius: var(--pill); background: var(--fill-2); transition: background var(--t), width var(--t); }
.onb-steps li.is-done { background: #f2c46d; }
.onb-steps li.is-on { width: 48px; background: linear-gradient(90deg, #f2c46d, #ff9d5c); }
.onb-card { width: 100%; max-width: 520px; display: grid; gap: 16px; padding: 32px; }
.onb-kicker { margin: 0; color: var(--ink-3); font-size: var(--fs-14); }
.onb-h { margin: 0; font-size: var(--fs-32); letter-spacing: -.03em; line-height: 1.1; }
.onb-nick { color: #f2c46d; }
.onb-lead { margin: 0; font-size: var(--fs-16); color: var(--ink-2); max-width: 60ch; }
.onb-reveal { position: relative; display: grid; place-items: center; padding: 24px 0 8px; }
.onb-glow { position: absolute; width: 260px; height: 260px; border-radius: 50%; background: radial-gradient(circle, rgba(255, 196, 110, .55), rgba(255, 157, 92, 0) 65%); animation: onb-pulse 4s ease-in-out infinite; }
.onb-sol { position: relative; width: 200px; height: 200px; animation: onb-rise .9s var(--ease) both; }
.onb-sol img { width: 100%; height: 100%; }
.onb-tags { display: flex; flex-wrap: wrap; justify-content: flex-start; gap: 8px; margin: 0; }
.onb-points { margin: 0; padding-left: 20px; display: grid; gap: 8px; color: var(--ink-2); }
.onb-row { display: flex; align-items: center; gap: 16px; }
.onb-how { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.onb-how li { display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: 16px; align-items: center; padding: 8px; border-radius: var(--r); background: var(--fill); }
.onb-how img { width: 72px; height: 72px; border-radius: var(--r-sm); object-fit: cover; }
.onb-how p { margin: 4px 0 0; font-size: var(--fs-14); }
.onb-skip { margin: 0; }
.onb-skip .linkish { color: var(--ink-3); font-size: var(--fs-14); min-height: 44px; }
@keyframes onb-rise { from { opacity: 0; transform: translateY(16px) scale(.85); } to { opacity: 1; transform: none; } }
@keyframes onb-pulse { 0%, 100% { transform: scale(.92); opacity: .75; } 50% { transform: scale(1.05); opacity: 1; } }
@media (max-width: 640px) { .onb { align-content: start; padding-top: 16px; } .onb-card { padding: 24px 16px; } .onb-h { font-size: var(--fs-24); } .onb-sol { width: 160px; height: 160px; } }
@media (prefers-reduced-motion: reduce) { .onb-glow, .onb-sol { animation: none; } }
.onb-mini { width: 64px; height: 64px; flex: none; }
.onb-mini img { width: 100%; height: 100%; }

/* ---- каркас: меню слева + контент на всю ширину (как LatvianEasy, стиль Nord Solis) ---- */
:root { --side-w: 264px; --side-rail: 76px; --sun-a: #f2c46d; --sun-b: #ff9d5c; --sun-soft: rgba(242, 196, 109, .14); }
body.app { display: block; }
.shell { display: grid; grid-template-columns: var(--side-w) minmax(0, 1fr); min-height: 100dvh; transition: grid-template-columns .3s var(--ease); }
html.is-rail .shell { grid-template-columns: var(--side-rail) minmax(0, 1fr); }
.col { display: flex; flex-direction: column; min-width: 0; min-height: 100dvh; }
.app .main { max-width: none; margin: 0; padding: 32px clamp(16px, 3vw, 48px) 48px; }
.app .foot { max-width: none; margin: 0; padding: 16px clamp(16px, 3vw, 48px) 24px; }
.mbar { display: none; }

.side { position: sticky; top: 0; height: 100dvh; display: flex; flex-direction: column; gap: 8px; padding: 20px 12px 16px; overflow-y: auto; overflow-x: hidden;
  background: linear-gradient(180deg, rgba(242, 196, 109, .07), transparent 220px), var(--surface); border-right: 1px solid var(--line); z-index: 25; }
.side-top { display: flex; align-items: center; gap: 8px; padding: 0 4px 12px; }
.side-top .brand { flex: 1; min-width: 0; text-decoration: none; color: var(--ink); display: flex; align-items: center; gap: 12px; }
.side-top .brand .side-t { display: grid; line-height: 1.2; font-weight: 600; }
.side-top .brand small { color: var(--ink-3); font-weight: 400; font-size: var(--fs-12); }
.side-rail, .side-close { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: var(--r-sm); border: 0; background: transparent; color: var(--ink-3); cursor: pointer; text-decoration: none; font-size: 22px; transition: background var(--t), color var(--t); }
.side-rail:hover, .side-close:hover { background: var(--fill); color: var(--ink); }
.side-close { display: none; }
.snav { display: grid; gap: 8px; }
.sgroup ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.sgroup-h { list-style: none; display: flex; align-items: center; justify-content: space-between; padding: 8px 12px; border-radius: var(--r-sm); color: var(--ink-3); font-size: var(--fs-12); font-weight: 600; letter-spacing: .08em; text-transform: uppercase; cursor: pointer; user-select: none; }
.sgroup-h::-webkit-details-marker { display: none; }
.sgroup-h:hover { color: var(--ink-2); }
.sgroup-h .i { transition: transform .25s var(--ease); }
.sgroup[open] > .sgroup-h .i { transform: rotate(90deg); }
.sitem { position: relative; display: flex; align-items: center; gap: 12px; min-height: 44px; width: 100%; padding: 8px 12px; border-radius: 14px; color: var(--ink-2); text-decoration: none; font: inherit; font-weight: 500; text-align: left; transition: background var(--t), color var(--t), transform .3s var(--ease); }
.sitem .i { flex: none; opacity: .85; }
.i { display: inline-block; flex-shrink: 0; vertical-align: middle; }
.sitem:hover { background: var(--fill); color: var(--ink); transform: translateX(2px); }
.sitem.is-on { background: linear-gradient(90deg, var(--sun-soft), rgba(255, 157, 92, .06)); color: var(--ink); }
.sitem.is-on::before { content: ""; position: absolute; left: -12px; top: 10px; bottom: 10px; width: 3px; border-radius: 0 3px 3px 0; background: linear-gradient(var(--sun-a), var(--sun-b)); }
.sitem.is-on .i { color: var(--sun-a); opacity: 1; }
.sitem .count { margin-left: auto; }
.side-foot { margin-top: auto; display: grid; gap: 4px; padding-top: 12px; border-top: 1px solid var(--line); }
.side-foot form { margin: 0; }
.side-me { display: flex; align-items: center; gap: 12px; padding: 8px; border-radius: var(--r); color: var(--ink); text-decoration: none; transition: background var(--t); }
.side-me:hover { background: var(--fill); }
.side-me-t { display: grid; gap: 2px; min-width: 0; }
.side-me-t strong { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-lvl { font-size: var(--fs-12); color: var(--ink-3); }
.side-me .sol-bar { height: 4px; }
.r-label { font-weight: 600; letter-spacing: .04em; }

/* свёрнутое меню: только иконки */
html.is-rail .side { padding-left: 10px; padding-right: 10px; }
html.is-rail .side .side-t, html.is-rail .sgroup-h, html.is-rail .side-me .side-t { display: none; }
html.is-rail .side-top { flex-direction: column; padding-bottom: 8px; }
html.is-rail .side-rail .i { transform: scaleX(-1); }
html.is-rail .sitem { justify-content: center; padding: 8px; }
html.is-rail .sitem .count { position: absolute; top: 2px; right: 2px; min-width: 18px; height: 18px; padding: 0 4px; font-size: 10px; }
html.is-rail .sitem.is-on::before { left: -10px; }
html.is-rail .side-me { justify-content: center; padding: 4px; }
html.is-rail .sgroup + .sgroup { border-top: 1px solid var(--line); padding-top: 8px; }

/* телефон и узкий планшет: меню выезжает слева (работает и без скриптов: #side) */
@media (max-width: 900px) {
  .shell, html.is-rail .shell { grid-template-columns: minmax(0, 1fr); }
  .mbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 12px; padding: 8px 16px; min-height: 56px; background: var(--glass); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); border-bottom: 1px solid var(--line); }
  .mbar .brand { flex: 1; display: flex; align-items: center; gap: 8px; color: var(--ink); text-decoration: none; font-weight: 600; }
  .mbar-menu, .mbar-me { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: var(--r-sm); color: var(--ink); }
  .side { position: fixed; inset: 0 auto 0 0; width: min(300px, 86vw); transform: translateX(-102%); transition: transform .3s var(--ease); box-shadow: var(--shadow-pop); }
  .side:target, html.nav-open .side { transform: none; }
  html.is-rail .side .side-t, html.is-rail .sgroup-h, html.is-rail .side-me .side-t { display: revert; }
  html.is-rail .sitem { justify-content: flex-start; padding: 8px 12px; }
  .side-rail { display: none; }
  .side-close { display: inline-grid; }
  .side-scrim { position: fixed; inset: 0; z-index: 24; background: rgba(5, 8, 14, .5); opacity: 0; pointer-events: none; transition: opacity .3s; }
  .side:target ~ .side-scrim, html.nav-open .side-scrim { opacity: 1; pointer-events: auto; }
  .app .main { padding: 20px 16px 40px; }
}
@media (min-width: 901px) { .side-scrim { display: none; } }
@media (prefers-reduced-motion: reduce) { .shell, .side, .sitem { transition: none; } }

/* ---- сцена на весь экран: вход и знакомство (общий блок stageLayout) ---- */
.main-bare { max-width: none; margin: 0; padding: 0; }
.stage-wrap { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(380px, 1fr); min-height: 100dvh; }
.stage { position: relative; overflow: hidden; display: grid; place-items: center; isolation: isolate; }
.stage-sky { position: absolute; inset: 0; z-index: -1; background:
  radial-gradient(60% 50% at 50% 55%, rgba(255, 214, 150, .45), transparent 70%),
  radial-gradient(40% 30% at 80% 10%, rgba(255, 255, 255, .18), transparent 70%); }
.stage::after { content: ""; position: absolute; inset: auto 0 0 0; height: 30%; background: linear-gradient(transparent, rgba(5, 8, 14, .35)); z-index: -1; }
.panel { display: flex; flex-direction: column; gap: 24px; padding: clamp(24px, 4vw, 56px); background: var(--surface); box-shadow: -1px 0 0 var(--line); }
.panel-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.panel-top .brand { display: flex; align-items: center; gap: 12px; font-weight: 600; }
.panel-body { flex: 1; display: grid; align-content: center; gap: 16px; max-width: 520px; width: 100%; }
.panel-body .form { gap: 16px; }
.btn-sun { background: linear-gradient(135deg, var(--sun-a), var(--sun-b)); color: #2a1606; border: 0; box-shadow: 0 10px 30px -10px rgba(255, 157, 92, .65); }
.btn-sun:hover { filter: brightness(1.05); transform: translateY(-1px); }
.btn-sun:active { transform: none; }
.onb-n { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--sun-soft); color: var(--sun-a); font-weight: 700; }
.onb-how li { grid-template-columns: 32px minmax(0, 1fr); padding: 12px 16px; }
.login-dev { display: grid; gap: 8px; padding-top: 16px; border-top: 1px solid var(--line); }

/* сундук и подарочный ключ */
.loot, .gift { position: relative; width: min(520px, 80%); aspect-ratio: 1; display: grid; place-items: center; }
.loot > img, .loot > span, .gift > img, .gift > span.loot-rays { grid-area: 1 / 1; }
.loot-box, .gift-box { width: 78%; filter: drop-shadow(0 30px 40px rgba(0, 0, 0, .45)); }
.loot-opened { opacity: 0; }
.loot-key { width: 34%; justify-self: end; align-self: start; transform: rotate(-18deg); animation: key-float 3.2s ease-in-out infinite; filter: drop-shadow(0 10px 20px rgba(0, 0, 0, .35)); z-index: 2; }
.gift-key { width: 40%; z-index: 2; transform: rotate(-24deg) translate(62%, -42%); animation: key-float 3.2s ease-in-out infinite; filter: drop-shadow(0 14px 24px rgba(0, 0, 0, .4)); }
.gift-box { width: 66%; transform: translate(-12%, 16%); }
.gift-tag { position: absolute; left: 6%; top: 10%; padding: 8px 16px; border-radius: var(--pill); background: rgba(10, 14, 22, .55); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); color: #ffe2a8; font-weight: 600; font-size: var(--fs-14); }
.loot-rays { width: 120%; aspect-ratio: 1; border-radius: 50%; opacity: .55; background: repeating-conic-gradient(from 0deg, rgba(255, 220, 150, .35) 0 8deg, transparent 8deg 22deg); -webkit-mask: radial-gradient(circle, #000 20%, transparent 68%); mask: radial-gradient(circle, #000 20%, transparent 68%); animation: rays-spin 40s linear infinite; pointer-events: none; }
.loot-sol { width: 62%; aspect-ratio: 1; opacity: 0; transform: translateY(30%) scale(.4); z-index: 3; filter: drop-shadow(0 0 40px rgba(255, 200, 120, .7)); }
.loot-sol-img { width: 100%; height: 100%; object-fit: contain; }
.loot-badge { align-self: end; margin-bottom: 4%; z-index: 4; padding: 8px 20px; border-radius: var(--pill); background: rgba(10, 14, 22, .7); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); font-weight: 700; letter-spacing: .1em; text-transform: uppercase; font-size: var(--fs-14); box-shadow: 0 0 0 2px currentColor; opacity: 0; transform: scale(1.6); }
.loot-sparks { width: 100%; height: 100%; position: relative; z-index: 3; pointer-events: none; }
.sp { position: absolute; left: 50%; top: 55%; width: 8px; height: 8px; border-radius: 50%; background: #ffe2a8; box-shadow: 0 0 12px 2px rgba(255, 200, 120, .9); opacity: 0; }
/* открытие: ключ в замок → тряска → вспышка → крышка → Сол → бейдж редкости */
.loot.is-opening .loot-key { animation: key-in .7s var(--ease) forwards; }
.loot.is-opening::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: radial-gradient(circle, rgba(255, 240, 200, .95), transparent 60%); opacity: 0; animation: flash .7s 1.2s ease-out both; z-index: 5; pointer-events: none; }
.loot.is-opening .loot-rays, .loot.is-open .loot-rays { opacity: 1; animation-duration: 12s; }
.loot.is-opening .loot-closed { animation: box-shake .6s .65s ease-in-out both, fade-out .2s 1.3s forwards; }
.loot.is-opening .loot-opened { animation: fade-in .2s 1.3s forwards; }
.loot.is-opening .loot-sol { animation: sol-pop .9s 1.45s cubic-bezier(.2, 1.4, .4, 1) forwards; }
.loot.is-opening .loot-badge { animation: stamp .45s 2.2s cubic-bezier(.2, 1.4, .4, 1) forwards; }
.loot.is-opening .sp { animation: spark 1.1s 1.3s ease-out forwards; }
.loot.is-open .loot-key { display: none; }
.loot.is-open .loot-closed { opacity: 0; }
.loot.is-open .loot-opened { opacity: 1; }
.loot.is-open .loot-sol { opacity: 1; transform: translateY(-14%) scale(1); }
.loot.is-open .loot-badge { opacity: 1; transform: none; }
.loot-panel .loot-text-closed { display: grid; gap: 16px; }
.loot-panel .loot-text-open { display: none; }
.loot-panel.is-open .loot-text-closed { display: none; }
.loot-panel.is-open .loot-text-open { display: grid; gap: 16px; animation: fade-up .5s var(--ease) both; }
.sp-0 { --dx: -160px; --dy: -180px; } .sp-1 { --dx: 150px; --dy: -200px; } .sp-2 { --dx: -220px; --dy: -60px; } .sp-3 { --dx: 230px; --dy: -40px; }
.sp-4 { --dx: -90px; --dy: -240px; } .sp-5 { --dx: 80px; --dy: -250px; } .sp-6 { --dx: -200px; --dy: 60px; } .sp-7 { --dx: 210px; --dy: 80px; }
.sp-8 { --dx: 0px; --dy: -260px; } .sp-9 { --dx: -130px; --dy: -120px; } .sp-10 { --dx: 130px; --dy: -110px; } .sp-11 { --dx: -60px; --dy: 120px; }
.sp-12 { --dx: 70px; --dy: 130px; } .sp-13 { --dx: 180px; --dy: -150px; }
@keyframes key-float { 0%, 100% { translate: 0 0; } 50% { translate: 0 -10px; } }
@keyframes key-in { to { transform: rotate(0deg) translate(-95%, 120%) scale(.5); opacity: 0; } }
@keyframes box-shake { 0%, 100% { transform: none; } 20% { transform: rotate(-4deg); } 40% { transform: rotate(4deg); } 60% { transform: rotate(-3deg) scale(1.03); } 80% { transform: rotate(2deg) scale(1.05); } }
@keyframes flash { 0% { opacity: 0; } 30% { opacity: 1; } 100% { opacity: 0; } }
@keyframes fade-out { to { opacity: 0; } }
@keyframes fade-in { to { opacity: 1; } }
@keyframes sol-pop { 0% { opacity: 0; transform: translateY(30%) scale(.4); } 60% { opacity: 1; } 100% { opacity: 1; transform: translateY(-14%) scale(1); } }
@keyframes stamp { from { opacity: 0; transform: scale(1.6); } to { opacity: 1; transform: none; } }
@keyframes spark { 0% { opacity: 1; transform: translate(0, 0) scale(1); } 100% { opacity: 0; transform: translate(var(--dx), var(--dy)) scale(.3); } }
@keyframes rays-spin { to { transform: rotate(360deg); } }
@keyframes fade-up { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

/* шаг 2 и 3: герой на сцене */
.stage-hero { position: relative; display: grid; justify-items: center; gap: 16px; width: min(420px, 70%); }
.stage-hero-img { width: 100%; height: auto; filter: drop-shadow(0 0 40px rgba(255, 200, 120, .5)); animation: key-float 4s ease-in-out infinite; }
.stage-nick { padding: 8px 20px; border-radius: var(--pill); background: rgba(10, 14, 22, .6); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); color: #ffe2a8; font-weight: 700; font-size: var(--fs-20); }
.stage-garden { position: relative; width: min(640px, 92%); display: grid; grid-template-columns: repeat(3, 1fr); align-items: end; gap: 8px; }
.sg { width: 100%; height: auto; border-radius: var(--r-xl); box-shadow: 0 20px 50px -20px rgba(0, 0, 0, .6); animation: fade-up .6s var(--ease) both; }
.sg-2 { animation-delay: .12s; margin-bottom: 6%; } .sg-3 { animation-delay: .24s; margin-bottom: 12%; }
.sg-sol { position: absolute; left: 50%; bottom: -14%; width: 34%; translate: -50% 0; filter: drop-shadow(0 0 30px rgba(255, 200, 120, .6)); }
.sg-sol-img { width: 100%; height: auto; }

@media (max-width: 900px) {
  .stage-wrap { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
  .stage { min-height: 44dvh; padding: 24px 0; }
  .loot, .gift { width: min(340px, 82%); }
  .panel { box-shadow: 0 -1px 0 var(--line); border-radius: var(--r-xl) var(--r-xl) 0 0; margin-top: -24px; position: relative; padding: 24px 16px 32px; }
  .panel-body { align-content: start; }
  .stage-hero { width: min(240px, 60%); }
  .stage-garden { padding-bottom: 48px; }
}
@media (prefers-reduced-motion: reduce) {
  .loot-key, .gift-key, .loot-rays, .stage-hero-img, .sg { animation: none !important; }
  .loot.is-opening *, .loot.is-opening::after { animation-duration: .01s !important; animation-delay: 0s !important; }
}

/* заглушка окна Google (только локально) и кнопка входа */
.btn-google { gap: 12px; }
.btn-google .g-dot { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: #fff; color: #4285f4; font-weight: 700; font-size: 15px; }
.acc-list { display: grid; gap: 8px; }
.acc { display: flex; align-items: center; gap: 16px; width: 100%; min-height: 64px; padding: 12px 16px; border: 0; border-radius: var(--r); background: var(--fill); color: var(--ink); font: inherit; text-align: left; cursor: pointer; transition: background var(--t), transform .25s var(--ease); }
.acc:hover { background: var(--fill-2); transform: translateX(2px); }
.acc-av { display: inline-grid; place-items: center; flex: none; width: 40px; height: 40px; border-radius: 50%; background: linear-gradient(135deg, #4a5b70, #222d3a); color: #fff; font-weight: 600; font-size: var(--fs-14); }
.acc-av-new { background: linear-gradient(135deg, var(--sun-a), var(--sun-b)); color: #2a1606; font-size: 22px; }
.acc-new { box-shadow: inset 0 0 0 1px rgba(242, 196, 109, .35); }
.acc-t { display: grid; min-width: 0; }
.acc-t span { color: var(--ink-3); font-size: var(--fs-14); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 900px) {
  .stage { min-height: 0; padding: 32px 0 48px; }
  .gift { width: min(240px, 64%); }
  .gift-key { transform: rotate(-24deg) translate(48%, -26%); width: 36%; }
  .gift-tag { left: -8%; top: 0; font-size: var(--fs-12); padding: 4px 12px; }
  .loot { width: min(280px, 72%); }
}
.gift > img, .loot > img, .loot-sol-img { height: auto; max-height: 100%; }
/* вход: спокойное дерево сада, без подарка */
.login-stage { position: relative; width: min(560px, 80%); display: grid; place-items: center; }
.login-tree { width: 100%; height: auto; border-radius: 32px; box-shadow: 0 40px 80px -30px rgba(0, 0, 0, .6); animation: key-float 6s ease-in-out infinite; }
.login-stage .gift-tag { left: 16px; top: 16px; }
.loot-tag { justify-self: start; align-self: start; position: relative; left: auto; top: auto; z-index: 4; }
.loot.is-opening .loot-tag, .loot.is-open .loot-tag { opacity: 0; transition: opacity .3s; }
@media (max-width: 900px) { .login-stage { width: min(260px, 66%); } }
@media (prefers-reduced-motion: reduce) { .login-tree { animation: none; } }

/* ---- «Мой Сол»: конструктор из слоёв ---- */
.sol-studio { display: grid; grid-template-columns: minmax(280px, 360px) minmax(0, 1fr); gap: 24px; align-items: start; }
.sol-stage-card { position: sticky; top: 16px; align-items: stretch; }
.sol-stage { position: relative; aspect-ratio: 1; border-radius: var(--r-lg); overflow: hidden; display: grid; place-items: center; box-shadow: 0 0 0 2px var(--rc), 0 0 32px -8px var(--rc); }
.sol-big { width: 100%; height: 100%; max-width: 100%; min-width: 0; object-fit: contain; transition: opacity .12s; }
.sol-stage-meta { margin: 0; font-weight: 600; }
.sol-worn { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-size: var(--fs-14); }
.sol-worn li { display: flex; justify-content: space-between; gap: 12px; }
.sol-admin { display: grid; gap: 8px; justify-items: start; padding-top: 12px; border-top: 1px solid var(--line); }
.sol-pick { display: grid; gap: 12px; min-width: 0; }
.st-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: 12px; }
.st { position: relative; display: grid; gap: 4px; }
.st form { display: contents; }
.st-btn { display: grid; gap: 4px; justify-items: center; width: 100%; padding: 8px 8px 10px; border: 0; border-radius: var(--r); background: var(--surface); box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--rc) 55%, transparent), var(--shadow-row); color: var(--ink); font: inherit; cursor: pointer; transition: transform var(--t), box-shadow var(--t), background var(--t); }
.st-btn:hover:not([disabled]) { transform: translateY(-2px); background: var(--surface-2); }
.st-btn:focus-visible { outline: 2px solid var(--rc); outline-offset: 2px; }
.st.is-on .st-btn { box-shadow: inset 0 0 0 2.5px var(--rc), 0 0 22px -6px var(--rc); background: color-mix(in srgb, var(--rc) 10%, var(--surface)); }
.st-btn img { width: 100%; height: auto; aspect-ratio: 1; border-radius: var(--r-sm); background: radial-gradient(circle at 50% 45%, color-mix(in srgb, var(--rc) 22%, transparent), transparent 70%); }
.st-name { font-size: var(--fs-14); font-weight: 600; line-height: 1.2; text-align: center; }
.st-r { display: inline-flex; align-items: center; gap: 4px; font-size: var(--fs-12); font-weight: 600; letter-spacing: .04em; color: var(--rc); }
.st.is-locked .st-btn { cursor: not-allowed; }
.st.is-locked img { filter: grayscale(.85) brightness(.6); }
.st.is-locked .st-name { color: var(--ink-3); }
.st-grant { justify-self: center; }
.st-grant .linkish { font-size: var(--fs-12); min-height: 32px; }
.st-btn[data-busy] { opacity: .6; }
.sol-gallery { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.sol-gallery li { display: grid; gap: 4px; justify-items: center; padding: 8px; border-radius: var(--r); background: var(--surface); box-shadow: var(--shadow-row); }
.sol-gallery img { width: 100%; height: auto; }
@media (max-width: 860px) {
  .sol-studio { grid-template-columns: 1fr; }
  .sol-stage-card { position: static; padding: 16px; gap: 12px; }
  .sol-stage { width: min(240px, 72%); justify-self: center; align-self: center; }
  .st-grid { grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; }
}
.sol-tabs { flex-wrap: wrap; overflow: visible; }

/* ---- вход и знакомство: одна сцена на весь экран, стеклянная карточка слева (без деления пополам) ---- */
.hero { position: relative; isolation: isolate; overflow: hidden; min-height: 100dvh; display: grid;
  grid-template-columns: minmax(340px, 500px) minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr);
  gap: 24px clamp(24px, 4vw, 72px); padding: clamp(20px, 3vw, 40px) clamp(20px, 4vw, 72px); color: #f3f6fb; }
.hero-sky { position: absolute; inset: 0; z-index: -1; pointer-events: none; background:
  radial-gradient(55% 60% at 72% 52%, rgba(255, 214, 150, .42), transparent 70%),
  radial-gradient(35% 30% at 85% 8%, rgba(255, 255, 255, .16), transparent 70%),
  linear-gradient(90deg, rgba(8, 11, 18, .62) 0%, rgba(8, 11, 18, .25) 42%, transparent 62%),
  linear-gradient(180deg, transparent 60%, rgba(5, 8, 14, .45)); }
.hero-motes { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.mote { position: absolute; width: 6px; height: 6px; border-radius: 50%; background: #ffe7b3; box-shadow: 0 0 10px 2px rgba(255, 210, 140, .7); opacity: .0; animation: mote 9s linear infinite; }
.m-0 { left: 58%; top: 80%; animation-delay: 0s; } .m-1 { left: 66%; top: 90%; animation-delay: 1.4s; } .m-2 { left: 74%; top: 85%; animation-delay: 2.8s; }
.m-3 { left: 82%; top: 92%; animation-delay: 4.1s; } .m-4 { left: 90%; top: 80%; animation-delay: 5.5s; } .m-5 { left: 62%; top: 95%; animation-delay: 6.8s; }
.m-6 { left: 78%; top: 75%; animation-delay: 3.3s; } .m-7 { left: 86%; top: 70%; animation-delay: 7.6s; } .m-8 { left: 70%; top: 72%; animation-delay: .7s; }
.m-9 { left: 95%; top: 88%; animation-delay: 2.1s; } .m-10 { left: 52%; top: 88%; animation-delay: 4.9s; } .m-11 { left: 80%; top: 98%; animation-delay: 8.2s; }
@keyframes mote { 0% { transform: translateY(0); opacity: 0; } 15% { opacity: .9; } 100% { transform: translateY(-70vh) translateX(-40px); opacity: 0; } }

.hero-top { grid-column: 1; grid-row: 1; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.hero-top .brand { display: flex; align-items: center; gap: 12px; font-weight: 600; color: #fff; }
.hero-top .brand-co { color: rgba(255, 255, 255, .65); }
.hero-card { grid-column: 1; grid-row: 2; align-self: center; display: grid; gap: 16px; padding: clamp(24px, 3vw, 40px); border-radius: 28px;
  background: rgba(13, 17, 23, .66); -webkit-backdrop-filter: blur(22px) saturate(1.4); backdrop-filter: blur(22px) saturate(1.4);
  border: 1px solid rgba(255, 255, 255, .09); box-shadow: 0 30px 80px -30px rgba(0, 0, 0, .7); color: var(--ink); }
.hero-card .panel-body { max-width: none; align-content: start; }
.hero-art { grid-column: 2; grid-row: 1 / span 2; display: grid; place-items: center; min-width: 0; }

/* вход: дерево сада растворяется в небе (без квадрата картинки) */
.hero-tree { width: min(760px, 100%); height: auto; filter: drop-shadow(0 40px 60px rgba(30, 10, 40, .45)); animation: key-float 7s ease-in-out infinite; }

/* сфера света вместо сундука */
.orb-stage { position: relative; width: min(600px, 100%); aspect-ratio: 1; display: grid; place-items: center; }
.orb-stage > * { grid-area: 1 / 1; }
.orb-rays { width: 115%; aspect-ratio: 1; border-radius: 50%; opacity: .35; background: repeating-conic-gradient(from 0deg, rgba(255, 224, 160, .4) 0 6deg, transparent 6deg 18deg); -webkit-mask: radial-gradient(circle, #000 18%, transparent 66%); mask: radial-gradient(circle, #000 18%, transparent 66%); animation: rays-spin 50s linear infinite; pointer-events: none; }
.orb-key { width: 46%; height: auto; transform: rotate(-24deg); filter: drop-shadow(0 0 28px rgba(255, 200, 110, .75)) drop-shadow(0 20px 30px rgba(0, 0, 0, .35)); animation: key-float 3.4s ease-in-out infinite; z-index: 2; }
.orb { position: relative; width: 44%; aspect-ratio: 1; border-radius: 50%; opacity: 0; transform: scale(0); z-index: 3;
  background: radial-gradient(circle at 34% 28%, #fffaf0 0%, #ffe39a 18%, #ffb35c 46%, #e2682e 74%, #8f2f17 100%);
  box-shadow: 0 0 80px 24px rgba(255, 186, 96, .55), inset -24px -34px 60px rgba(110, 25, 0, .45), inset 14px 18px 40px rgba(255, 255, 255, .55); }
.orb-core { position: absolute; inset: 22%; border-radius: 50%; background: radial-gradient(circle, rgba(255, 255, 240, .95), rgba(255, 220, 140, 0) 70%); animation: core-pulse 1.6s ease-in-out infinite; }
.orb-crack { position: absolute; left: 50%; top: 50%; width: 3px; height: 62%; border-radius: 3px; background: linear-gradient(transparent, #fffbe8 30%, #fffbe8 70%, transparent); box-shadow: 0 0 14px 4px rgba(255, 245, 200, .9); transform-origin: 50% 50%; opacity: 0; }
.c1 { transform: translate(-50%, -50%) rotate(18deg); } .c2 { transform: translate(-50%, -50%) rotate(-42deg) scaleY(.8); } .c3 { transform: translate(-50%, -50%) rotate(78deg) scaleY(.7); }
.orb-burst { position: relative; width: 100%; height: 100%; pointer-events: none; z-index: 4; }
.ob { position: absolute; left: 50%; top: 50%; width: 10px; height: 10px; margin: -5px; border-radius: 50%; background: #fff1c9; box-shadow: 0 0 16px 4px rgba(255, 200, 110, .9); opacity: 0; }
.ob-0 { --a: 0deg; } .ob-1 { --a: 22deg; } .ob-2 { --a: 45deg; } .ob-3 { --a: 67deg; } .ob-4 { --a: 90deg; } .ob-5 { --a: 112deg; } .ob-6 { --a: 135deg; } .ob-7 { --a: 157deg; }
.ob-8 { --a: 180deg; } .ob-9 { --a: 202deg; } .ob-10 { --a: 225deg; } .ob-11 { --a: 247deg; } .ob-12 { --a: 270deg; } .ob-13 { --a: 292deg; } .ob-14 { --a: 315deg; } .ob-15 { --a: 337deg; }
.orb-sol { width: 64%; aspect-ratio: 1; display: grid; place-items: end center; opacity: 0; transform: translateY(18%) scale(.3); z-index: 5; filter: drop-shadow(0 0 40px rgba(255, 205, 130, .65)); }
.orb-sol-img { width: 100%; height: auto; }
.orb-pedestal { align-self: end; margin-bottom: 14%; width: 46%; height: 9%; border-radius: 50%; background: radial-gradient(closest-side, rgba(255, 220, 150, .9), rgba(255, 170, 90, .35) 55%, transparent 100%); filter: blur(2px); opacity: 0; transform: scale(.4); z-index: 4; }
.orb-badge { align-self: end; margin-bottom: 8%; z-index: 6; padding: 8px 20px; border-radius: var(--pill); background: rgba(10, 14, 22, .72); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); font-weight: 700; letter-spacing: .12em; text-transform: uppercase; font-size: var(--fs-14); color: var(--r-common); box-shadow: 0 0 0 2px currentColor, 0 0 24px -4px currentColor; opacity: 0; transform: scale(1.6); }
.orb-badge.r-uncommon { color: var(--r-uncommon); } .orb-badge.r-rare { color: var(--r-rare); } .orb-badge.r-epic { color: var(--r-epic); } .orb-badge.r-legendary { color: var(--r-legendary); } .orb-badge.r-mythical { color: var(--r-mythical, #e0457b); }

/* таймлайн открытия: ключ → сфера из света → заряд и трещины → вспышка → Сол на пьедестале → бейдж */
.orb-stage.is-opening .orb-key { animation: key-to-orb .6s var(--ease) forwards; }
.orb-stage.is-opening .orb { animation: orb-in .55s .4s cubic-bezier(.2, 1.3, .4, 1) forwards, orb-charge .75s .95s ease-in-out, orb-pop .3s 1.7s ease-in forwards; }
.orb-stage.is-opening .orb-crack { animation: crack-in .35s 1.3s ease-out forwards; }
.orb-stage.is-opening .orb-rays { animation-duration: 8s; opacity: .7; transition: opacity .8s .9s; }
.orb-stage.is-opening::after { content: ""; position: absolute; inset: -10%; border-radius: 50%; background: radial-gradient(circle, rgba(255, 250, 225, 1), rgba(255, 230, 170, .6) 30%, transparent 60%); opacity: 0; animation: flash .8s 1.7s ease-out both; z-index: 7; pointer-events: none; }
.orb-stage.is-opening .ob { animation: burst 1s 1.75s ease-out forwards; }
.orb-stage.is-opening .orb-sol { animation: sol-rise .8s 1.95s cubic-bezier(.2, 1.4, .4, 1) forwards; }
.orb-stage.is-opening .orb-pedestal { animation: pedestal-in .6s 1.9s ease-out forwards; }
.orb-stage.is-opening .orb-badge { animation: stamp .45s 2.45s cubic-bezier(.2, 1.4, .4, 1) forwards; }
.orb-stage.is-open .orb-key, .orb-stage.is-open .orb { display: none; }
.orb-stage.is-open .orb-rays { opacity: .7; }
.orb-stage.is-open .orb-sol { opacity: 1; transform: none; }
.orb-stage.is-open .orb-pedestal { opacity: 1; transform: none; }
.orb-stage.is-open .orb-badge { opacity: 1; transform: none; }
@keyframes key-to-orb { to { transform: rotate(0) scale(.35); opacity: 0; filter: drop-shadow(0 0 40px rgba(255, 230, 160, 1)); } }
@keyframes orb-in { from { opacity: 0; transform: scale(0); } to { opacity: 1; transform: scale(1); } }
@keyframes orb-charge { 0%, 100% { transform: scale(1); } 25% { transform: scale(1.05) rotate(-3deg); } 50% { transform: scale(.97) rotate(3deg); } 75% { transform: scale(1.08) rotate(-2deg); } }
@keyframes orb-pop { to { transform: scale(1.5); opacity: 0; } }
@keyframes crack-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes core-pulse { 0%, 100% { opacity: .7; transform: scale(.9); } 50% { opacity: 1; transform: scale(1.08); } }
@keyframes burst { 0% { opacity: 1; transform: rotate(var(--a)) translateY(0) scale(1); } 100% { opacity: 0; transform: rotate(var(--a)) translateY(-260px) scale(.3); } }
@keyframes sol-rise { 0% { opacity: 0; transform: translateY(18%) scale(.3); } 60% { opacity: 1; } 100% { opacity: 1; transform: none; } }
@keyframes pedestal-in { to { opacity: 1; transform: none; } }

.hero .stage-hero, .hero .stage-garden { margin: auto; }

@media (max-width: 900px) {
  .hero { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto auto auto; gap: 16px; padding: 16px; }
  .hero-sky { background: radial-gradient(70% 40% at 50% 26%, rgba(255, 214, 150, .4), transparent 70%), linear-gradient(180deg, transparent 35%, rgba(8, 11, 18, .55)); }
  .hero-art { grid-column: 1; grid-row: 2; }
  .hero-card { grid-column: 1; grid-row: 3; padding: 24px 16px; }
  .hero-tree { width: min(360px, 92%); }
  .orb-stage { width: min(340px, 92%); }
  .mote { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .mote, .hero-tree, .orb-key, .orb-rays, .orb-core { animation: none !important; }
  .orb-stage.is-opening *, .orb-stage.is-opening::after { animation-duration: .01s !important; animation-delay: 0s !important; }
}

/* «Мой Сол»: точный готовый образ, слоты вокруг */
.sol-room { display: grid; grid-template-columns: minmax(0, 1fr) minmax(240px, 384px) minmax(0, 1fr); gap: 16px; align-items: center; }
.sol-center { display: grid; gap: 8px; justify-items: center; }
.sol-center .sol-stage { width: 100%; }
.sol-center .sol-full-stage { aspect-ratio: 1; border-radius: var(--r-lg); padding: 16px; }
.sol-full-stage .sol-big { object-fit: contain; object-position: center; }
.sol-fit-confirmation { color: var(--ink-2); line-height: 1.6; margin: 16px 0 24px; }
.sol-ready { margin: 24px 0; }
.sol-ready > summary { min-height: 44px; cursor: pointer; font-size: var(--fs-20); font-weight: 600; }
.sol-ready-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; margin-top: 24px; }
.sol-ready-fit { margin: 0; min-width: 0; }
.sol-ready-fit button { display: grid; gap: 12px; justify-items: center; width: 100%; height: 100%; border: 1px solid var(--line); border-radius: var(--r-lg); padding: 16px; color: var(--ink); background: var(--surface); font: inherit; cursor: pointer; text-align: center; }
.sol-ready-fit button:hover { border-color: var(--ink-2); }
.sol-ready-fit.is-on button { border-color: #dcc891; box-shadow: inset 0 0 0 1px #dcc891; }
.sol-ready-fit button:focus-visible { outline: 2px solid #dcc891; outline-offset: 4px; }
.sol-ready-fit button[aria-busy="true"] { opacity: .65; cursor: progress; }
.sol-ready-fit img { width: 160px; height: 160px; object-fit: contain; }
.sol-ready-fit strong { font-size: var(--fs-14); line-height: 1.5; }
.sol-ready-fit button > span { font-size: var(--fs-12); color: var(--ink-2); }
.sol-ready-fit .sol-ready-action { min-height: 32px; display: grid; align-items: center; color: var(--ink); }
.st-fit-pending { font-size: var(--fs-12); line-height: 1.4; color: var(--ink-2); }
.av.sol-portrait img[src*="/sol-fits/"] { width: 250%; height: 250%; left: -75%; top: -36%; }
@media (max-width: 640px) {
  .sol-ready-list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .sol-ready-fit button { padding: 12px 8px; }
  .sol-ready-fit img { width: 100%; height: 128px; }
}
.sol-slots { display: grid; gap: 12px; }
.sol-slot { display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: 12px; align-items: center; padding: 8px 12px 8px 8px; border-radius: var(--r); background: var(--surface-2); box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--rc) 55%, transparent); color: var(--ink); text-decoration: none; transition: background var(--t), box-shadow var(--t); }
.sol-slot:hover { background: var(--fill); }
.sol-slot.is-tab { box-shadow: inset 0 0 0 2.5px var(--rc), 0 0 18px -6px var(--rc); }
.sol-slot .st-pic { width: 72px; height: 72px; }
.sol-slot-t { display: grid; gap: 2px; font-size: var(--fs-14); min-width: 0; }
.st-pic { display: grid; place-items: center; width: 100%; aspect-ratio: 1; height: auto; border-radius: var(--r-sm); object-fit: contain; background: radial-gradient(circle at 50% 45%, color-mix(in srgb, var(--rc) 22%, transparent), transparent 70%); }
.st-soon { gap: 4px; align-content: center; color: var(--ink-3); font-size: var(--fs-12); background: repeating-linear-gradient(135deg, var(--fill) 0 8px, transparent 8px 16px); }
.st-empty { color: var(--ink-3); font-size: var(--fs-20); }
.sw { border-radius: 50%; width: 76%; margin: 12%; box-shadow: inset 0 -6px 12px rgba(0, 0, 0, .25), inset 0 4px 8px rgba(255, 255, 255, .45); }
.sol-slot .sw { width: 56px; height: 56px; margin: 8px; }
.sol-pilot { margin: 0; }
@media (max-width: 1200px) {
  .sol-room { grid-template-columns: 1fr 1fr; }
  .sol-center { grid-column: 1 / -1; grid-row: 1; }
  .sol-center .sol-stage { width: min(260px, 80%); }
  .sol-slot { grid-template-columns: 48px minmax(0, 1fr); gap: 8px; }
  .sol-slot .st-pic, .sol-slot .sw { width: 48px; height: 48px; margin: 0; }
}
.sw-0 { background-image: linear-gradient(135deg, #ffe27a, #ffb31f, #f07a12); }
.sw-1 { background-image: linear-gradient(135deg, #ffd27a, #ff8a1f, #e0560c); }
.sw-2 { background-image: linear-gradient(135deg, #fff6a8, #ffe03a, #f2b705); }
.sw-3 { background-image: linear-gradient(135deg, #ffe9a8, #f5b544, #c97a12); }
.sw-4 { background-image: linear-gradient(135deg, #ffc69a, #e07a3c, #a6461c); }
.sw-5 { background-image: linear-gradient(135deg, #ffd0b8, #ff7f5c, #e0463a); }
.sw-6 { background-image: linear-gradient(135deg, #ffe2c0, #ffaa66, #f0782e); }
.sw-7 { background-image: linear-gradient(135deg, #ffe6d6, #ffb59a, #f2826a); }
.sw-8 { background-image: linear-gradient(135deg, #ffd98a, #f0a020, #b35f05); }
.sw-9 { background-image: linear-gradient(135deg, #f6d6a8, #d99a52, #9a5a22); }
.sw-10 { background-image: linear-gradient(135deg, #d8fff0, #62e0b0, #1f9e7a); }
.sw-11 { background-image: linear-gradient(135deg, #f2ffb8, #a6e83a, #5aa012); }
.sw-12 { background-image: linear-gradient(135deg, #e0f4ff, #6cc4ff, #2a7fe0); }
.sw-13 { background-image: linear-gradient(135deg, #f0e2ff, #bb92ff, #7d4fe0); }
.sw-14 { background-image: linear-gradient(135deg, #ffe0ec, #ff8fb8, #e04a86); }
.sw-15 { background-image: linear-gradient(135deg, #ffc2c8, #f04a5a, #a81630); }
.sw-16 { background-image: linear-gradient(135deg, #ffffff, #ffe9c8, #ffc2a0); }
.sw-17 { background-image: linear-gradient(135deg, #c8f2ff, #22a6e0, #0a4fa0); }
.sw-18 { background-image: linear-gradient(135deg, #e8d0ff, #9a52f0, #5216a8); }
.sw-19 { background-image: linear-gradient(135deg, #d0fffa, #22d6c6, #0a8a90); }
.sw-20 { background-image: linear-gradient(135deg, #ffc8d0, #e8203e, #7a0a20); }
.sw-21 { background-image: linear-gradient(135deg, #d0dcff, #3d5cff, #1a1a9a); }
.sw-22 { background-image: linear-gradient(135deg, #ffd0ff, #ff3df0, #8a12ff); }
.sw-23 { background-image: linear-gradient(135deg, #fff0a0, #ff5a12, #5a0a0a); }
.sw-24 { background-image: linear-gradient(135deg, #c8fff0, #3ee8a0, #4a7aff, #a03df0); }
.sw-25 { background-image: linear-gradient(135deg, #c8d6ff, #4a5ad0, #1a1440); }
.sw-26 { background-image: linear-gradient(135deg, #fffbe0, #ffd84a, #d99a0a, #fff2b0); }
.sw-27 { background-image: linear-gradient(135deg, #ffffff, #e6ecf5, #a8b8cc, #ffffff); }
.sw-28 { background-image: linear-gradient(135deg, #ffffff, #fff27a, #ff9a1f, #e0262a); }
.sw-29 { background-image: linear-gradient(135deg, #ff4a6a, #ffb31f, #f2f23a, #3ee88a, #3db0ff, #a05aff); }
.sol-slot-t > span { min-width: 0; overflow-wrap: anywhere; line-height: 1.4; }
@media (max-width: 860px) { .sol-slot { padding: 6px 8px 6px 6px; } .sol-slot-t { font-size: var(--fs-12); } }
@media (max-width: 640px) {
  .sol-room { padding: 16px; gap: 12px; }
  .sol-slot { grid-template-columns: 32px minmax(0, 1fr); gap: 6px; min-height: 64px; }
  .sol-slot .st-pic, .sol-slot .sw { width: 32px; height: 32px; }
}
/* «Смотреть как пользователь»: яркая плашка сверху, действия выключены (запрет — на сервере) */
.va-bar { position: sticky; top: 0; z-index: 40; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 8px clamp(16px, 3vw, 32px); background: linear-gradient(90deg, #ff5f6d, #ffb347); color: #2a0a0a; font-size: var(--fs-14); box-shadow: 0 6px 20px -8px rgba(255, 95, 109, .7); }
.va-bar strong { font-weight: 700; }
.va-real { opacity: .75; }
.va-dot { width: 10px; height: 10px; border-radius: 50%; background: #2a0a0a; animation: core-pulse 1.4s ease-in-out infinite; }
.va-exit { margin-left: auto; }
.va-exit .btn { background: #2a0a0a; color: #fff; border: 0; }
.is-viewing .main form:not(.va-exit) :is(button, input, select, textarea), .is-viewing .side-foot form button { pointer-events: none; opacity: .45; }
.is-viewing .shell { min-height: calc(100dvh - 44px); }
.is-viewing .side { top: 44px; height: calc(100dvh - 44px); }

/* Hub shell: one workspace, Tasks as the current module. */
.skip-link { position: fixed; top: -80px; left: 16px; z-index: 100; padding: 12px 16px; background: var(--primary); color: var(--primary-ink); border-radius: var(--r-sm); }
.skip-link:focus { top: 16px; }
.workspace-bar { display: flex; align-items: center; gap: 16px; min-height: 64px; padding: 12px 32px; border-bottom: 1px solid var(--line); color: var(--ink-3); font-size: var(--fs-12); }
.workspace-module { display: inline-flex; align-items: center; gap: 8px; padding-left: 16px; border-left: 1px solid var(--line-2); font-weight: 600; color: var(--ink-2); }
.feedback-bell { margin-left: auto; display: inline-flex; align-items: center; justify-content: center; flex: none; gap: 8px; min-height: 44px; padding: 8px 12px; border-radius: var(--r); color: var(--ink-2); text-decoration: none; }
.feedback-bell:hover,.feedback-bell.is-on { background: var(--surface-2); color: var(--ink); }
.feedback-bell:focus-visible { outline: 2px solid var(--primary); outline-offset: 3px; }
@media(max-width:600px) { .feedback-bell-label { display:none; }.workspace-bar { gap:8px; }.workspace-module { padding-left:8px; }.feedback-bell { padding:8px; } }
.app .main { padding: 24px 32px 48px; }
.app .foot { padding: 16px 32px 88px; }
.app .page-head { margin-bottom: 8px; }
.page-title .lead { max-width: 65ch; }
.side { padding-top: 24px; }
.side-top .brand .side-t { gap: 4px; font-size: var(--fs-16); }
.brand-mark { flex: none; }
.side-top .brand small { font-size: var(--fs-12); line-height: 1.5; }
.side-rail, .side-close { width: 44px; height: 44px; flex: none; }
.snav { gap: 24px; }
.sgroup-h { min-height: 44px; padding: 8px 12px; letter-spacing: .06em; }
.sgroup ul { gap: 4px; }
.sitem { border-radius: var(--r-sm); }
.sitem:hover { transform: none; }
.sitem:active, .side-rail:active, .side-close:active { background: var(--fill-2); }
.side-me-t { gap: 4px; }
html.is-rail .side { padding-left: 12px; padding-right: 12px; }
html.is-rail .sitem.is-on::before { left: -12px; }
.universe-stage { overflow: hidden; border: 1px solid var(--line-2); border-radius: var(--r-xl); background: #171d1b; }
.universe-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 8px 16px; background: var(--surface); font-size: var(--fs-12); color: var(--ink-2); }
.universe-toolbar > span { display: inline-flex; align-items: center; gap: 8px; }
.universe-toolbar a { display: inline-flex; align-items: center; min-height: 44px; }
.universe-frame { display: block; width: 100%; height: max(680px, calc(100dvh - 256px)); border: 0; }
.universe-note { max-width: 75ch; }
@media (max-width: 900px) {
  .workspace-bar { min-height: 48px; padding: 8px 16px; }
  .app .main { padding: 24px 16px 32px; }
  .app .foot { padding: 16px 16px 88px; }
  .side, html.is-rail .side { padding: 16px 12px; }
  html.is-rail .side-top { flex-direction: row; padding-bottom: 12px; }
  html.is-rail .side-top .brand .side-t { display: grid; }
  html.is-rail .side-me { justify-content: flex-start; padding: 8px; }
  html.is-rail .sgroup-h { display: flex; }
  html.is-rail .sgroup + .sgroup { padding-top: 0; border-top: 0; }
  .universe-toolbar { flex-wrap: wrap; gap: 0; padding: 8px 16px; }
  .universe-frame { height: 720px; }
}
@media (min-width: 1600px) {
  .workspace-bar, .app .main, .app .foot { padding-left: 48px; padding-right: 48px; }
}
@media (max-width: 640px) {
  .b-tasks .b-bar > .btn { order: 4; width: 100%; justify-content: center; margin-left: 0; }
}

/* Team: head portraits in compact UI, whole original characters in personal views and grove. */
.garden-preview-intro { display: block; background: #182b24; color: #f4edda; padding: 24px; }
.garden-preview-tree { display: block; width: 100%; height: auto; border-radius: var(--r-lg); }
.garden-preview-copy { max-width: 640px; }
.garden-preview-eyebrow { font-size: var(--fs-12); letter-spacing: .08em; text-transform: uppercase; color: #dcc891; }
.garden-preview-copy h2 { font-size: clamp(24px, 2.4vw, 36px); line-height: 1.2; margin: 16px 0; }
.garden-preview-copy p { color: #c6d2bf; line-height: 1.6; }
.garden-preview-lock { display: flex; align-items: start; gap: 8px; font-size: var(--fs-14); margin-top: 24px; }
.garden-preview-lock svg { flex-shrink: 0; margin-top: 4px; }
.garden-locked-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 16px; }
.garden-locked-actions button { display: flex; align-items: center; gap: 8px; min-height: 48px; padding: 12px 16px; border: 1px solid #ffffff26; border-radius: var(--r); color: #bfc9bb; background: #ffffff06; text-align: left; font: inherit; font-size: var(--fs-14); opacity: 1; cursor: not-allowed; }
.garden-locked-actions svg { flex-shrink: 0; }
@media (max-width: 1100px) {
  .garden-preview-intro { grid-template-columns: minmax(160px, 240px) minmax(0, 1fr); gap: 24px; padding: 24px; }
  .garden-locked-actions { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .garden-preview-intro { grid-template-columns: 1fr; padding: 16px; gap: 24px; }
  .garden-preview-tree { max-height: 256px; width: 100%; object-fit: contain; }
  .garden-preview-copy h2 { margin-top: 12px; }
}
.team-full-sol { display: grid; place-items: center; width: 100%; max-width: 384px; aspect-ratio: 1; border-radius: var(--r-lg); padding: 16px; }
.team-full-sol img { width: 100%; height: 100%; min-height: 0; object-fit: contain; }
.profile-full-sol { width: clamp(160px, 22vw, 280px); }
.team-profile { display: grid; grid-template-columns: minmax(200px, 384px) minmax(0, 1fr); gap: 32px; align-items: center; }
.team-profile-info { display: grid; gap: 16px; min-width: 0; justify-items: start; }
.team-profile-info p { margin: 0; }
.leaderboard { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; max-width: 1040px; }
.leader-row { display: grid; grid-template-columns: 48px minmax(0, 1fr) auto; gap: 16px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 16px 24px; }
.leader-row.is-self { border-color: var(--r-legendary); }
.leader-rank { font-size: var(--fs-24); color: var(--ink-2); font-variant-numeric: tabular-nums; text-align: center; }
.leader-person, .team-start-list a { min-height: 48px; display: flex; align-items: center; gap: 16px; color: var(--ink); text-decoration: none; min-width: 0; }
.leader-person > span:last-child, .team-start-list a > span:last-child { display: grid; gap: 4px; min-width: 0; overflow-wrap: anywhere; }
.leader-person:hover strong, .team-start-list a:hover strong { text-decoration: underline; }
.leader-score { display: grid; gap: 4px; text-align: right; font-variant-numeric: tabular-nums; }
.leader-score strong { font-size: var(--fs-20); }
.team-waiting { max-width: 1040px; }
.team-waiting summary, .grove-waiting summary { cursor: pointer; min-height: 44px; padding: 8px 0; }
.team-start-list { list-style: none; padding: 0; margin: 16px 0 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 16px; }
@media (max-width: 640px) {
  .leader-row { grid-template-columns: 24px minmax(0, 1fr) auto; gap: 8px; padding: 16px 12px; }
  .leader-person { gap: 12px; }
  .leader-person .av { width: 40px; height: 40px; }
  .leader-rank, .leader-score strong { font-size: var(--fs-16); }
  .leader-score .small { font-size: var(--fs-12); }
  .team-profile { grid-template-columns: 1fr; gap: 24px; }
  .team-full-sol { justify-self: center; }
  .profile-full-sol { width: min(100%, 280px); }
  .team-grove { padding: 24px 16px; }
}

.hub-confirm{width:min(440px,calc(100% - 32px));max-height:calc(100dvh - 48px);overflow:auto;padding:24px;border:1px solid var(--line);border-radius:20px;color:var(--ink);background:var(--surface);box-shadow:var(--shadow)}.hub-confirm::backdrop{background:var(--scrim,rgba(0,0,0,.45))}.hub-confirm h2{font-size:20px;margin:0 0 16px}.hub-confirm p{margin:0 0 24px;white-space:pre-wrap;overflow-wrap:anywhere;line-height:1.6}.hub-confirm-actions{display:flex;justify-content:flex-end;gap:12px;flex-wrap:wrap}.hub-confirm-actions .btn{min-height:44px;min-width:96px}

/* Explicit theme mirrors the device-light token contract. */
:root[data-theme="light"] {
    --bg: #f4f5f7;
    --glow-a: rgba(240, 196, 130, .22);
    --glow-b: rgba(140, 185, 230, .18);
    --surface: #ffffff;
    --surface-2: #f6f8fa;
    --surface-3: #edf1f5;
    --glass: rgba(246, 247, 249, .74);
    --pop: rgba(255, 255, 255, .88);
    --fill: rgba(30, 55, 85, .045);
    --fill-2: rgba(30, 55, 85, .08);
    --hl: rgba(255, 255, 255, .9);
    --ink: #17202a;
    --ink-2: #485667;
    --ink-3: #606d7e;
    --line: rgba(25, 45, 70, .08);
    --line-2: rgba(25, 45, 70, .14);
    --accent: #2d6aa6;
    --accent-ink: #ffffff;
    --accent-soft: rgba(45, 106, 166, .09);
    --link: #2a639c;
    --primary: #1c2632;
    --primary-ink: #ffffff;
    --primary-hover: #2a3746;
    --sun: #e2ad5f;
    --late: #b63e30;
    --late-soft: rgba(210, 80, 60, .07);
    --late-line: rgba(200, 80, 60, .28);
    --focus: rgba(45, 106, 166, .45);
    --p-urgent: #e0a750;
    --p-normal: #86b3dc;
    --shadow-row: 0 0 0 1px var(--line), 0 1px 2px rgba(20, 35, 55, .04);
    --shadow-pop: 0 0 0 1px var(--line), 0 16px 48px rgba(20, 35, 55, .14), 0 2px 8px rgba(20, 35, 55, .06);
    --shadow-drawer: -24px 0 64px rgba(20, 35, 55, .16);
    --scrim: rgba(30, 40, 52, .22);
    --st-new: #4d5b6b;    --st-new-bg: #eef1f5;
    --st-work: #2a659c;   --st-work-bg: #e5eff9;
    --st-wait: #8f5f18;   --st-wait-bg: #fbf0dd;
    --st-review: #6a4ca3; --st-review-bg: #f1ebfb;
    --st-done: #2c7650;   --st-done-bg: #e4f3eb;
    --st-off: #657283;    --st-off-bg: #f0f2f5;
    --st-accept: #1d746e; --st-accept-bg: #e1f3f1;
    --st-reject: #84572c; --st-reject-bg: #f6ece2;
    color-scheme: light;
}

/* Hub workspace: shared frame, sober surfaces, stable navigation. */
:root { --side-w:256px; --r-xs:4px; --r-sm:8px; --r:12px; --r-lg:12px; --r-xl:16px; --focus:#e8c695; --workspace-bg:#101418; --workspace-panel:#191e23; }
:root[data-theme="light"] { --focus:#8a5a18; --workspace-bg:#f5f4f1; --workspace-panel:#ffffff; }
@media(prefers-color-scheme:light) { :root:not([data-theme="dark"]) { --focus:#8a5a18; --workspace-bg:#f5f4f1; --workspace-panel:#ffffff; } }
body.app { background:var(--workspace-bg); background-attachment:initial; }
.app .shell { transition:none; }
.app .side { padding:16px 12px; gap:12px; background:var(--surface); backdrop-filter:none; border-right:1px solid var(--line-2); overflow:hidden; }
.side-top { flex:none; padding:0 4px; min-height:48px; }
.app .snav { display:block; min-height:0; flex:1; overflow:auto; overscroll-behavior:contain; scrollbar-gutter:stable; }
.app .sgroup + .sgroup { margin-top:12px; }
.app .sgroup-h { min-height:44px; padding:8px 12px; letter-spacing:.04em; font-size:12px; line-height:20px; }
.app .sgroup ul { gap:0; }
.app .sitem { min-height:44px; padding:8px 12px; font-size:14px; line-height:20px; }
.app .sitem.is-on { background:var(--accent-soft); box-shadow:none; color:var(--ink); }
.app .sitem.is-on::before { display:none; }
.app .side-foot { flex:none; margin-top:0; padding-top:8px; gap:0; }
.app .side-me { padding:8px; gap:12px; }
.app .side-me .av { width:40px; height:40px; }
.app .side-me-t { gap:0; font-size:14px; }
.app .side-me .sol-bar { margin-top:4px; }
.nav-search { position:relative; flex:none; }
.nav-search input { width:100%; min-width:0; min-height:44px; padding:8px 12px 8px 36px; border:1px solid var(--line-2); background:var(--workspace-bg); border-radius:8px; font-size:14px; }
.nav-search > span { position:absolute; left:12px; top:8px; font-size:20px; pointer-events:none; color:var(--ink-2); }
.nav-empty { padding:12px; margin:0; font-size:14px; color:var(--ink-2); }
.snav [hidden] { display:none!important; }
.workspace-bar { justify-content:space-between; gap:16px; min-height:64px; background:var(--workspace-bg); }
.workspace-location { display:flex; align-items:center; gap:12px; min-width:0; color:var(--ink-2); font-size:14px; }
.workspace-current { color:var(--ink); font-weight:500; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.workspace-section { white-space:nowrap; }
.workspace-separator { color:var(--ink-3); }
.workspace-tools { display:flex; gap:8px; align-items:center; flex:none; }
.theme-choice { min-width:44px; min-height:44px; display:inline-flex; gap:8px; align-items:center; justify-content:center; padding:8px 12px; border:1px solid var(--line-2); border-radius:8px; background:var(--surface); color:var(--ink-2); font:inherit; font-size:12px; cursor:pointer; }
.theme-choice:hover { background:var(--surface-2); color:var(--ink); }
.theme-choice:active { background:var(--surface-3); }
.app .feedback-bell { margin-left:0; border-radius:8px; font-size:12px; }
.app .main { max-width:1440px; gap:24px; padding-top:32px; }
.app .main > * { flex-shrink:0; min-width:0; }
.app h1 { font-size:clamp(1.5rem,2.4vw,2rem); line-height:1.25; letter-spacing:-.03em; }
.app .page-head { align-items:center; margin-bottom:0; }
.app .page-title .lead { font-size:14px; line-height:1.6; margin-top:8px; }
.app .card { border:1px solid var(--line-2); box-shadow:none; background:var(--workspace-panel); border-radius:12px; }
.app .btn { border-radius:8px; box-shadow:none; min-height:44px; }
.app .btn:hover { transform:none; }
.app .btn-primary { box-shadow:none; }
.app .empty { border-style:solid; background:var(--surface); text-align:left; justify-items:start; padding:24px; max-width:80ch; }
.app .form { gap:24px; }
.app .form input:not([type="checkbox"]):not([type="radio"]), .app .dd-btn { min-height:44px; }
.app :is(input,textarea,.dd-btn) { border-radius:8px; }
.app .drawer-panel { border-radius:12px; }
.app .drawer-bar { flex-shrink:0; }
.app .drawer-body { min-height:0; }
.app .drawer-body > * { flex-shrink:0; }
.app .drawer-body > .card { overflow:visible; }
.app .drawer-body .form { padding:20px; }
.app :is(a,button,input,textarea,summary):focus-visible { outline:2px solid var(--focus); outline-offset:3px; }
.task-row-actions { grid-column:2; margin:0 8px 8px; position:relative; }
.task-row-actions > summary { display:flex; width:fit-content; gap:8px; align-items:center; list-style:none; cursor:pointer; min-height:44px; padding:8px; font-size:13px; color:var(--ink-2); border-radius:8px; }
.task-row-actions > summary::-webkit-details-marker { display:none; }
.task-row-actions > summary:hover { background:var(--fill); color:var(--ink); }
.task-row-actions[open] > summary .i { transform:rotate(90deg); }
.tasks-compact .task-row-actions .task-card-actions { position:absolute; z-index:20; bottom:100%; left:0; width:min(340px,100%); max-height:var(--task-menu-height,50vh); overflow:auto; padding:8px; border:1px solid var(--line-2); background:var(--surface); border-radius:8px; box-shadow:0 8px 24px #0002; }
.tasks-compact .task-row-actions.opens-below .task-card-actions { bottom:auto; top:100%; }
@media(min-width:901px) { html.is-rail .nav-search { display:none; } .app .snav { padding-right:4px; } }
@media(max-width:1100px) { [data-theme-label], .workspace-tools .feedback-bell-label { display:none; } .theme-choice { padding:8px; } }
@media(max-width:900px) {
 .app .side { gap:8px; }
 .app .mbar { background:var(--surface); backdrop-filter:none; }
 .workspace-bar { min-height:56px; padding:4px 16px; }
 .workspace-location { gap:8px; font-size:12px; }
 .workspace-section, .workspace-separator { display:none; }
 .app .main { padding-top:24px; }
 html.is-rail .nav-search.side-t { display:block; }
 .app .drawer-panel { border-radius:12px 12px 0 0; }
}
@media(max-width:600px) {
 .app .page-head > .btn { flex-shrink:0; }
 .app .card { padding:16px; }
 .app .drawer-body .form { padding:16px; }
 .app .form input:not([type="checkbox"]):not([type="radio"]), .app .form textarea, .app .dd-btn { font-size:16px; }
 .app .empty { padding:20px; }
 .task-row-actions { margin-left:4px; }
}
.app .side .r-label { color:var(--ink-2); }
/* Switching a stored theme must not fade navigation through unreadable colors. */
html[data-theme] .side :is(a,input,button) { transition:background-color .15s var(--ease); }
/* Sibling destinations stay visible inside complex sections, including on mobile. */
.section-nav { display:flex; gap:4px; overflow-x:auto; min-width:0; max-width:100%; padding:0 0 8px; border-bottom:1px solid var(--line-2); scrollbar-gutter:stable; }
.section-nav a { display:inline-flex; flex:none; align-items:center; gap:8px; min-height:44px; padding:8px 12px; color:var(--ink-2); font-size:14px; text-decoration:none; border-radius:8px; }
.section-nav a:hover { background:var(--fill); color:var(--ink); }
.section-nav a[aria-current] { background:var(--surface); color:var(--ink); font-weight:600; box-shadow:inset 0 -2px var(--ink); }
.drawer-body > .section-nav { display:none; }
/* Existing workshops inherit the same themes and controls; their content/art stays intact. */
.app .pw { --pw-bg:var(--workspace-bg); --pw-panel:var(--workspace-panel); --pw-line:var(--line-2); --pw-text:var(--ink); --pw-muted:var(--ink-2); --pw-accent:var(--primary); padding:0; background:transparent; border-radius:0; color-scheme:inherit; }
.app .pw :is(.pw-panel,.pw-layer article,.pw-access-person) { border-radius:12px; background:var(--workspace-panel); }
.app .pw :is(.pw-badge,.pw-layer header>strong,.pw-dependency) { color:var(--ink-2); }
.app .pw input:not([type=radio]):not([type=checkbox]), .app .pw textarea { background:var(--surface); color:var(--ink); border-color:var(--line-2); border-radius:8px; }
.app .pw .pw-button { background:var(--primary); color:var(--primary-ink); border-color:transparent; font-weight:600; }
.app .pw .pw-button:hover { background:var(--primary-hover); }
.app .pw .pw-button.pw-secondary { background:var(--surface); color:var(--ink); border-color:var(--line-2); }
.app .pw :is(.pw-goal.is-selected,.pw-topics a[aria-current],.pw-tabs a[aria-current]) { background:var(--accent-soft); color:var(--ink); border-color:var(--line-2); }
.app .pw :is(a:hover,summary:hover,.pw-entry-steps a,.pw-person-link) { color:var(--link)!important; }
.app .pw :is(.pw-layer-no,.pw-lab-label) { background:var(--surface-2); color:var(--ink); border-color:var(--line-2); }
.app .pw .pw-empty { text-align:left; justify-items:start; padding:24px; }
.app .pw :is(a,button,summary,input,textarea):focus-visible { outline:2px solid var(--focus); outline-offset:3px; }
.app .pw progress, .app .pw progress::-webkit-progress-bar { background:var(--surface-3); }
.app .pw .pw-goals summary { color:var(--ink); }
.app .hist li, .app .h-what { min-width:0; overflow-wrap:anywhere; }
.app .st-grant .linkish { min-height:44px; }
@media(max-width:600px) { .section-nav { margin-top:-8px; }.section-nav a { padding:8px 12px; }.app .pw-panel { padding:16px; } }
