:root{
  --bg:#0b1220;
  --surface:#1e293b;
  --surface-soft:#172235;
  --surface-muted:#0f172a;
  --border:#334155;
  --text:#e2e8f0;
  --text-muted:#94a3b8;
  --primary:#3b82f6;
  --primary-hover:#2563eb;
  --success:#166534;
  --danger:#991b1b;
  --radius:12px;
  --radius-sm:8px;
  --space-1:6px;
  --space-2:10px;
  --space-3:14px;
  --space-4:20px;
}

*{box-sizing:border-box}
html{scroll-behavior:smooth}
body{font-family:Inter,system-ui,sans-serif;background:var(--bg);color:var(--text);margin:0;line-height:1.45}
.container{max-width:1200px;margin:0 auto;padding:var(--space-4)}
.room-shell{padding-top:18px}

.page-head{display:flex;align-items:flex-start;justify-content:space-between;gap:var(--space-3);margin-bottom:var(--space-2)}
.page-head h1{margin:0 0 4px;font-size:1.9rem;line-height:1.2}

.card{background:var(--surface);padding:var(--space-3);border-radius:var(--radius);margin:var(--space-3) 0;border:1px solid var(--border)}
.card.soft{background:var(--surface-soft)}
.section-card{scroll-margin-top:86px}

.grid{display:grid;gap:var(--space-3)}
.two-up{grid-template-columns:repeat(auto-fit,minmax(280px,1fr))}
.layout-grid{grid-template-columns:repeat(auto-fit,minmax(360px,1fr))}
.kpi-grid{grid-template-columns:repeat(auto-fit,minmax(180px,1fr));margin-top:var(--space-2)}
.kpi{margin:0}
.kpi-label{font-size:.78rem;color:var(--text-muted);text-transform:uppercase;letter-spacing:.04em;margin:0 0 4px}
.kpi-value{font-size:1.2rem;font-weight:700;margin:0}

.section-tabs{position:sticky;top:0;z-index:5;display:flex;gap:var(--space-2);flex-wrap:wrap;padding:var(--space-2);background:rgba(11,18,32,.92);border:1px solid var(--border);border-radius:var(--radius);backdrop-filter:blur(4px)}
.section-tabs a{display:inline-flex;align-items:center;justify-content:center;padding:8px 12px;background:var(--surface-muted);border:1px solid var(--border);border-radius:999px;color:var(--text);text-decoration:none;font-size:.92rem}
.section-tabs a:hover,.section-tabs a:focus-visible{background:#1b2740;border-color:#4b638c;outline:none}

h2,h3{margin:0 0 var(--space-2)}
h3{font-size:1rem}
p{margin:6px 0}

form{display:grid;gap:8px}
label{display:grid;gap:4px;font-size:14px}
input,textarea,select,button,summary{font:inherit}
input,textarea,select,button{width:100%;padding:10px;border-radius:var(--radius-sm);border:1px solid var(--border);background:var(--bg);color:var(--text)}
input:focus,textarea:focus,select:focus,button:focus-visible{outline:2px solid #60a5fa;outline-offset:1px}
button{cursor:pointer;background:var(--primary);font-weight:600;border-color:transparent;transition:background .18s ease,opacity .18s ease}
button:hover{background:var(--primary-hover)}
button:disabled{opacity:.55;cursor:not-allowed}
button.danger{background:var(--danger)}
button.danger:hover{background:#7f1d1d}

.btn-group{display:grid;grid-template-columns:1fr 1fr;gap:8px}
.vote-btn.is-active{outline:2px solid #86efac;background:#14532d}
.inline-counter{display:flex;gap:8px;align-items:center}
.inline-counter input{max-width:96px;text-align:center}
.inline-counter button{width:auto;min-width:44px}
.counter-row label{margin-bottom:4px}
.toast{position:sticky;top:10px;z-index:10;padding:10px 14px;border-radius:10px;margin-bottom:10px;background:#14532d;border:1px solid #166534;color:#dcfce7}
.toast.err{background:#7f1d1d;border-color:#991b1b;color:#fee2e2}

details{background:var(--surface-muted);border:1px solid var(--border);border-radius:var(--radius-sm);padding:var(--space-2)}
summary{cursor:pointer;font-weight:600;color:var(--text)}
details[open] summary{margin-bottom:var(--space-2)}

.row-actions{display:grid;gap:8px;min-width:220px}
.row-actions form{margin:0}

.pill{display:inline-block;padding:2px 10px;border-radius:999px;background:#334155;font-size:12px}
.ok{background:var(--success)}
.bad{background:var(--danger)}

.muted{color:var(--text-muted);font-size:.92rem}
.lang-switch{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.lang-switch a{color:#bfdbfe;text-decoration:none}
.lang-switch a:hover{text-decoration:underline}

.list{list-style:none;padding:0;margin:8px 0 0;display:grid;gap:8px}
.list li,.list-item{display:flex;align-items:flex-start;justify-content:space-between;gap:10px;background:var(--surface-muted);padding:10px;border-radius:var(--radius-sm);border:1px solid #223049}
.split-item{align-items:flex-start}
.stack{display:grid;gap:8px;margin-top:var(--space-2)}
.checked{text-decoration:line-through;opacity:.7}
.mini-stats{display:flex;gap:16px;flex-wrap:wrap;margin-top:8px}
.mono{font-family:ui-monospace,SFMono-Regular,Menlo,monospace;word-break:break-all}

@media (max-width:900px){
  .container{padding:14px}
  .page-head{flex-direction:column}
  .layout-grid{grid-template-columns:1fr}
}

@media (max-width:640px){
  .page-head h1{font-size:1.45rem}
  .section-tabs{top:6px}
  .row-actions{min-width:0}
  .list li,.list-item{flex-direction:column}
}
