/* Belege · forty:love — court green, ball yellow, warm paper */
:root {
  --paper: #f5f3ee;
  --card: #ffffff;
  --ink: #16191d;
  --ink-2: #4a5059;
  --ink-3: #7b828c;
  --line: #e4e0d7;
  --line-2: #efece5;
  --court: #1d5c45;
  --court-2: #164a37;
  --court-soft: #e3efe9;
  --ball: #d9e85a;
  --ball-ink: #3b4210;
  --red: #b4442f;
  --red-soft: #f8e6e2;
  --amber: #a8690f;
  --amber-soft: #fbf0dc;
  --blue: #2c5d8f;
  --blue-soft: #e4edf6;
  --radius: 12px;
  --radius-s: 8px;
  --shadow: 0 1px 2px rgba(22, 25, 29, .05), 0 4px 16px rgba(22, 25, 29, .04);
  --font: "Instrument Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --side: 248px;
  --side-bg: #faf9f6;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #121513; --card: #1a1e1c; --ink: #eef0ec; --ink-2: #b9bfb9; --ink-3: #868d87;
    --line: #2c322f; --line-2: #232825; --court: #5fbf93; --court-2: #7fd4ab; --court-soft: #1d2e26;
    --ball: #d9e85a; --ball-ink: #262b05; --red: #ec8a75; --red-soft: #3a211b; --amber: #e5b064; --amber-soft: #352a17;
    --blue: #8cb8e6; --blue-soft: #1c2938; --shadow: none; --side-bg: #151917; color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 15px/1.5 var(--font); }
a { color: var(--court); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { line-height: 1.2; margin: 0; letter-spacing: -.01em; }
h1 { font-size: 26px; font-weight: 650; }
h2 { font-size: 17px; font-weight: 650; }
h3 { font-size: 14px; font-weight: 650; }
.mono, .amt { font-family: var(--mono); font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.amt { white-space: nowrap; }
.amt.neg { color: var(--ink); }
.amt.pos { color: var(--court); }
.muted { color: var(--ink-3); }
.small { font-size: 13px; }
.nowrap { white-space: nowrap; }
.ico { width: 18px; height: 18px; flex: none; }
:focus-visible { outline: 2px solid var(--court); outline-offset: 2px; border-radius: 4px; }

/* ---------- shell (sevDesk-like structure) */
.shell { display: grid; grid-template-columns: var(--side) 1fr; min-height: 100vh; }
.side { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; padding: 18px 14px 12px; border-right: 1px solid var(--line); background: var(--side-bg); overflow-y: auto; }
.brand { display: flex; align-items: center; gap: 10px; padding: 0 8px 18px; color: var(--ink); font-weight: 680; font-size: 16px; }
.brand:hover { text-decoration: none; }
.brand-mark { width: 30px; height: 30px; flex: none; border-radius: 8px; background: var(--court); position: relative; overflow: hidden; }
.brand-mark::before { content: ""; position: absolute; width: 14px; height: 14px; border-radius: 50%; background: var(--ball); right: 5px; bottom: 5px; }
.brand-mark::after { content: ""; position: absolute; left: 6px; top: 6px; width: 10px; height: 2px; background: #fff; box-shadow: 0 5px 0 #fff, 0 10px 0 #fff; border-radius: 2px; opacity: .9; }
.brand small { display: block; font-weight: 450; font-size: 12px; color: var(--ink-3); margin-top: -1px; }
.side-search { position: relative; margin: 0 0 14px; }
.side-search .ico { position: absolute; left: 10px; top: 9.5px; z-index: 1; width: 17px; height: 17px; color: var(--ink-3); }
.side-search input[type=search] { min-height: 36px; padding: 7px 40px 7px 34px; background: var(--line-2); border-color: transparent; font-size: 14px; }
.side-search kbd { position: absolute; right: 9px; top: 10px; pointer-events: none; font: 500 11px var(--mono); color: var(--ink-3); }
.nav { display: flex; flex-direction: column; gap: 1px; }
.nav a { display: flex; align-items: center; gap: 11px; padding: 6.5px 10px; border-radius: var(--radius-s); color: var(--ink-2); font-weight: 520; font-size: 14.5px; }
.nav a:hover { background: var(--line-2); text-decoration: none; color: var(--ink); }
.nav a.on { color: var(--ink); font-weight: 650; }
.nav a.on .ico { color: var(--court); stroke-width: 2.2; }
.nav > a.on { background: var(--card); box-shadow: var(--shadow); }
.nav .count { margin-left: auto; font: 600 11.5px/1 var(--mono); background: var(--amber-soft); color: var(--amber); padding: 4px 6px; border-radius: 20px; }
.nav .soon { margin-left: auto; font-size: 11px; color: var(--ink-3); font-weight: 500; }
.nav-section { margin: 13px 10px 3px; font-size: 11px; font-weight: 650; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }
.nav-sub { margin: 2px 0 6px 19px; padding-left: 12px; border-left: 1.5px solid var(--line); display: flex; flex-direction: column; gap: 1px; }
.nav-sub a { padding: 6px 10px; font-size: 14px; font-weight: 480; }
.nav-sub a.on { color: var(--court); font-weight: 600; }
.side-foot { margin-top: auto; padding-top: 14px; display: flex; flex-direction: column; gap: 6px; }
.side-foot form { margin: 0; }
.side-btn { all: unset; display: flex; align-items: center; gap: 11px; padding: 8px 10px; color: var(--ink-2); cursor: pointer; border-radius: var(--radius-s); width: calc(100% - 20px); font-size: 14px; }
.side-btn:hover { background: var(--line-2); color: var(--ink); }
.me { border-top: 1px solid var(--line); padding-top: 10px; position: relative; }
.me summary { list-style: none; display: flex; align-items: center; gap: 10px; padding: 6px 8px; border-radius: var(--radius-s); cursor: pointer; }
.me summary::-webkit-details-marker { display: none; }
.me summary:hover { background: var(--line-2); }
.avatar { width: 30px; height: 30px; border-radius: 50%; background: var(--ink); color: var(--paper); display: grid; place-items: center; font-weight: 650; font-size: 13px; flex: none; }
.me-x { flex: 1; min-width: 0; line-height: 1.25; }
.me-x b { display: block; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.me-x small { color: var(--ink-3); font-size: 12px; }
.me-menu { position: absolute; bottom: 100%; left: 0; right: 0; margin-bottom: 6px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-s); box-shadow: 0 8px 30px rgba(0,0,0,.12); padding: 6px; }
.me-menu a, .me-menu button { all: unset; box-sizing: border-box; width: 100%; display: flex; gap: 10px; align-items: center; padding: 8px 10px; border-radius: 6px; cursor: pointer; color: var(--ink); font-size: 14px; }
.me-menu a:hover, .me-menu button:hover { background: var(--line-2); text-decoration: none; }
.main { min-width: 0; padding: 30px 40px 80px; max-width: 1320px; width: 100%; }
.topbar { display: flex; align-items: center; gap: 12px; margin-bottom: 24px; flex-wrap: wrap; }
.topbar h1 { margin-right: auto; }
.tabbar, .scrim { display: none; }

/* ---------- elements */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px; padding: 8px 16px; border-radius: var(--radius-s);
  border: 1px solid var(--line); background: var(--card); color: var(--ink); font: 560 14px/1 var(--font); cursor: pointer; white-space: nowrap; }
.btn:hover { border-color: var(--ink-3); text-decoration: none; }
.btn.primary { background: var(--court); border-color: var(--court); color: #fff; }
.btn.primary:hover { background: var(--court-2); }
@media (prefers-color-scheme: dark) { .btn.primary { color: #0c1a13; } }
.btn.ball { background: var(--ball); border-color: var(--ball); color: var(--ball-ink); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--ink-2); }
.btn.ghost:hover { background: var(--line-2); }
.btn.danger { color: var(--red); }
.btn.sm { min-height: 32px; padding: 6px 11px; font-size: 13px; }
.btn[disabled] { opacity: .5; pointer-events: none; }
.btn .ico { width: 16px; height: 16px; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-h { display: flex; align-items: center; gap: 10px; padding: 16px 18px 0; }
.card-h h2 { margin-right: auto; }
.card-b { padding: 16px 18px; }
.grid { display: grid; gap: 18px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g-main { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); }
.stack > * + * { margin-top: 18px; }

.badge { display: inline-flex; align-items: center; gap: 5px; padding: 2px 8px; border-radius: 20px; font-size: 12px; font-weight: 560; white-space: nowrap; background: var(--line-2); color: var(--ink-2); }
.badge.ok { background: var(--court-soft); color: var(--court); }
.badge.warn { background: var(--amber-soft); color: var(--amber); }
.badge.err { background: var(--red-soft); color: var(--red); }
.badge.info { background: var(--blue-soft); color: var(--blue); }
.badge.ball { background: var(--ball); color: var(--ball-ink); }
.dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; display: inline-block; }

.flash { margin-bottom: 18px; padding: 12px 16px; border-radius: var(--radius-s); background: var(--court-soft); color: var(--court); font-weight: 520; display: flex; gap: 10px; align-items: center; }
.flash.err { background: var(--red-soft); color: var(--red); }

/* forms */
label { display: block; font-size: 13px; font-weight: 560; color: var(--ink-2); margin-bottom: 5px; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=date], input[type=month], input[type=search], input[type=url], select, textarea {
  width: 100%; min-height: 40px; padding: 8px 11px; border: 1px solid var(--line); border-radius: var(--radius-s); background: var(--card); color: var(--ink); font: 15px var(--font); }
textarea { min-height: 80px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--court); box-shadow: 0 0 0 3px var(--court-soft); }
.field { margin-bottom: 14px; }
.row { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; }
.check { display: flex; gap: 9px; align-items: flex-start; font-weight: 450; color: var(--ink); font-size: 14px; cursor: pointer; }
.check input { margin-top: 3px; width: 17px; height: 17px; accent-color: var(--court); }
.hint { font-size: 12.5px; color: var(--ink-3); margin-top: 4px; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: var(--radius-s); overflow: hidden; background: var(--card); }
.seg a, .seg label { padding: 8px 13px; color: var(--ink-2); font-size: 13.5px; font-weight: 540; margin: 0; cursor: pointer; white-space: nowrap; }
.seg a + a, .seg label + label { border-left: 1px solid var(--line); }
.seg a.on, .seg input:checked + span { background: var(--ink); color: var(--paper); }
.seg a:hover { text-decoration: none; background: var(--line-2); }
.seg a.on:hover { background: var(--ink); }
.seg input { display: none; }
.seg label { padding: 0; } .seg label span { display: block; padding: 8px 13px; }

/* filters */
.filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 16px; }
.filters .search { flex: 1 1 240px; position: relative; }
.filters .search .ico { position: absolute; left: 11px; top: 11px; color: var(--ink-3); }
.filters .search input { padding-left: 36px; }
.filters select { width: auto; min-width: 150px; }

/* lists */
.list { list-style: none; margin: 0; padding: 0; }
.item { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 12px 18px; border-top: 1px solid var(--line-2); color: var(--ink); }
.item:first-child { border-top: 0; }
a.item:hover { background: var(--line-2); text-decoration: none; }
.thumb { width: 44px; height: 52px; border-radius: 6px; background: var(--line-2); border: 1px solid var(--line); display: grid; place-items: center; color: var(--ink-3); font: 600 10px var(--mono); text-transform: uppercase; overflow: hidden; }
.thumb.out { background: var(--court-soft); color: var(--court); border-color: transparent; }
.item .t { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.item .s { font-size: 13px; color: var(--ink-3); display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 2px; }
.item .r { text-align: right; }
.month-h { position: sticky; top: 0; z-index: 2; display: flex; justify-content: space-between; padding: 10px 18px; background: var(--paper); border-bottom: 1px solid var(--line); font-weight: 650; font-size: 13px; color: var(--ink-2); text-transform: uppercase; letter-spacing: .04em; }

table.t { width: 100%; border-collapse: collapse; font-size: 14px; }
table.t th { text-align: left; font-size: 12px; font-weight: 600; color: var(--ink-3); text-transform: uppercase; letter-spacing: .04em; padding: 10px 14px; border-bottom: 1px solid var(--line); }
table.t td { padding: 11px 14px; border-bottom: 1px solid var(--line-2); vertical-align: top; }
table.t tr:last-child td { border-bottom: 0; }
table.t .num { text-align: right; }

/* ---------- dashboard: the score */
.score { display: grid; grid-template-columns: auto 1fr auto; gap: 26px; align-items: center; padding: 22px 24px; background: var(--court); color: #fff; border-radius: var(--radius); position: relative; overflow: hidden; }
.score::after { content: ""; position: absolute; inset: 14px; border: 1.5px solid rgba(255, 255, 255, .16); border-radius: 4px; pointer-events: none; }
.score::before { content: ""; position: absolute; top: 14px; bottom: 14px; left: 50%; border-left: 1.5px solid rgba(255, 255, 255, .16); pointer-events: none; }
@media (prefers-color-scheme: dark) { .score { background: #17382b; } }
.score .big { font: 600 48px/1 var(--mono); letter-spacing: -.04em; position: relative; z-index: 1; }
.score .big small { font-size: 18px; opacity: .7; letter-spacing: 0; }
.score .lbl { position: relative; z-index: 1; }
.score .lbl b { display: block; font-size: 19px; }
.score .lbl span { opacity: .75; font-size: 14px; }
.score .act { position: relative; z-index: 1; display: flex; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
.score .btn { border-color: rgba(255,255,255,.25); background: rgba(255,255,255,.08); color: #fff; }
.score .btn.ball { background: var(--ball); color: var(--ball-ink); border-color: var(--ball); }
.meter { position: relative; z-index: 1; height: 8px; border-radius: 8px; background: rgba(255,255,255,.14); margin-top: 12px; overflow: hidden; }
.meter i { display: block; height: 100%; background: var(--ball); border-radius: 8px; transition: width .6s cubic-bezier(.2,.8,.2,1); }
.monthnav { display: inline-flex; align-items: center; gap: 4px; }
.monthnav a { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 8px; color: var(--ink-2); }
.monthnav a:hover { background: var(--line-2); }
.monthnav b { min-width: 130px; text-align: center; }

.todo { display: flex; align-items: center; gap: 14px; padding: 14px 18px; border-top: 1px solid var(--line-2); color: var(--ink); }
.todo:first-child { border-top: 0; }
a.todo:hover { background: var(--line-2); text-decoration: none; }
.todo .n { font: 600 22px/1 var(--mono); min-width: 40px; }
.todo .n.zero { color: var(--court); }
.todo .x { flex: 1; }
.todo .x b { display: block; font-weight: 600; }
.todo .x span { font-size: 13px; color: var(--ink-3); }

.source { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-top: 1px solid var(--line-2); font-size: 14px; }
.source:first-child { border-top: 0; }
.source .nm { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* dropzone */
.drop { border: 1.5px dashed var(--line); border-radius: var(--radius); padding: 22px; text-align: center; color: var(--ink-2); transition: border-color .15s, background .15s; cursor: pointer; background: var(--card); }
.drop:hover, .drop.over { border-color: var(--court); background: var(--court-soft); }
.drop b { color: var(--ink); }
.drop .ico { width: 26px; height: 26px; color: var(--court); margin-bottom: 6px; }
.progress { margin-top: 12px; display: none; text-align: left; }
.progress.on { display: block; }
.progress .bar { height: 6px; border-radius: 6px; background: var(--line-2); overflow: hidden; }
.progress .bar i { display: block; height: 100%; width: 0; background: var(--court); transition: width .3s; }
.progress ul { list-style: none; padding: 0; margin: 8px 0 0; font-size: 13px; max-height: 160px; overflow: auto; }
.progress li { padding: 3px 0; display: flex; gap: 8px; }

/* ---------- document detail */
.doc-layout { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(360px, 1fr); gap: 20px; align-items: start; }
.preview { position: sticky; top: 20px; height: calc(100vh - 120px); min-height: 420px; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); background: var(--line-2); }
.preview iframe, .preview img { width: 100%; height: 100%; border: 0; object-fit: contain; display: block; }
.amounts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.amounts input { font-family: var(--mono); text-align: right; }
.amounts .gross input { font-weight: 650; border-color: var(--ink-3); }
.tx-chip { display: flex; gap: 12px; align-items: center; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius-s); margin-bottom: 8px; }
.tx-chip .x { flex: 1; min-width: 0; font-size: 13.5px; }
.tx-chip .x b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tx-chip form { margin: 0; }
.conf { height: 4px; width: 46px; border-radius: 4px; background: var(--line-2); overflow: hidden; display: inline-block; vertical-align: middle; }
.conf i { display: block; height: 100%; background: var(--court); }
.sticky-actions { position: sticky; bottom: 0; background: linear-gradient(transparent, var(--card) 30%); padding: 18px 18px 16px; display: flex; gap: 10px; flex-wrap: wrap; margin: 0 -18px -16px; border-radius: 0 0 var(--radius) var(--radius); }

/* ---------- bank */
.acc-strip { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 4px; margin-bottom: 18px; scrollbar-width: thin; }
.acc { flex: 0 0 auto; min-width: 190px; padding: 12px 14px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--card); color: var(--ink); }
.acc:hover { text-decoration: none; border-color: var(--ink-3); }
.acc.on { border-color: var(--court); box-shadow: 0 0 0 3px var(--court-soft); }
.acc b { display: block; }
.acc .meta { font-size: 12.5px; color: var(--ink-3); display: flex; gap: 8px; align-items: center; margin-top: 3px; }
.tx { display: grid; grid-template-columns: 92px minmax(0, 1fr) 120px; gap: 6px 16px; padding: 14px 18px; border-top: 1px solid var(--line-2); }
.tx:first-child { border-top: 0; }
.tx .d { font-size: 13px; color: var(--ink-3); padding-top: 1px; }
.tx .who { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tx .why { font-size: 13px; color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.tx .a { text-align: right; font-weight: 600; }
.tx .ops { grid-column: 2 / -1; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.sugg { display: inline-flex; align-items: center; gap: 8px; padding: 5px 6px 5px 11px; border: 1px dashed var(--court); border-radius: 30px; font-size: 13px; background: var(--court-soft); color: var(--court); }
.sugg form { margin: 0; }
.sugg button { all: unset; cursor: pointer; background: var(--court); color: #fff; padding: 3px 10px; border-radius: 20px; font-weight: 600; font-size: 12px; }
.linked { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; color: var(--court); font-weight: 560; }
.tx.done { opacity: .62; }
.tx.done:hover { opacity: 1; }

dialog { border: 0; border-radius: var(--radius); padding: 0; width: min(520px, calc(100vw - 24px)); background: var(--card); color: var(--ink); box-shadow: 0 20px 60px rgba(0,0,0,.25); }
dialog::backdrop { background: rgba(22, 25, 29, .45); }
dialog .card-b { padding: 20px; }
.results { list-style: none; padding: 0; margin: 10px 0 0; max-height: 300px; overflow: auto; }
.results li button { all: unset; box-sizing: border-box; width: 100%; display: flex; justify-content: space-between; gap: 10px; padding: 10px 12px; border-radius: 8px; cursor: pointer; }
.results li button:hover { background: var(--line-2); }

.empty { padding: 40px 20px; text-align: center; color: var(--ink-3); }
.empty b { display: block; color: var(--ink); font-size: 16px; margin-bottom: 4px; }

.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 20px; overflow-x: auto; }
.tabs a { padding: 10px 14px; color: var(--ink-2); font-weight: 540; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tabs a.on { color: var(--ink); border-color: var(--court); }
.tabs a:hover { text-decoration: none; color: var(--ink); }
details.box { border: 1px solid var(--line); border-radius: var(--radius-s); padding: 0 14px; margin-bottom: 10px; background: var(--card); }
details.box summary { padding: 12px 0; cursor: pointer; font-weight: 600; display: flex; gap: 10px; align-items: center; }
details.box[open] summary { border-bottom: 1px solid var(--line-2); margin-bottom: 14px; }

/* login */
.login { min-height: 100vh; display: grid; place-items: center; padding: 20px; }
.login .card { width: min(400px, 100%); }

/* ---------- mobile */
@media (max-width: 960px) {
  .g-main, .doc-layout, .g3 { grid-template-columns: 1fr; }
  .preview { position: relative; top: 0; height: 60vh; }
}
@media (max-width: 760px) {
  .shell { grid-template-columns: 1fr; }
  .side { position: fixed; left: 0; top: 0; bottom: 0; z-index: 40; width: min(300px, 86vw); transform: translateX(-100%); transition: transform .22s ease; box-shadow: 0 0 40px rgba(0,0,0,.2); }
  body.side-open .side { transform: none; }
  body.side-open .scrim { display: block; position: fixed; inset: 0; z-index: 35; background: rgba(22,25,29,.4); }
  .main { padding: 18px 14px 110px; }
  h1 { font-size: 22px; }
  .g2 { grid-template-columns: 1fr; }
  .score { grid-template-columns: 1fr; gap: 14px; padding: 20px; }
  .score .act { justify-content: flex-start; }
  .score::before { display: none; }
  .tx { grid-template-columns: minmax(0, 1fr) auto; }
  .tx .d { grid-column: 1 / -1; order: -1; }
  .tx .ops { grid-column: 1 / -1; }
  .item { padding: 12px 14px; gap: 12px; }
  .filters select { flex: 1 1 140px; min-width: 0; }
  .tabbar { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
    background: var(--card); border-top: 1px solid var(--line); padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); }
  .tabbar a { display: flex; flex-direction: column; align-items: center; gap: 3px; font-size: 11px; color: var(--ink-3); padding: 4px 0; min-height: 44px; }
  .tabbar a.on { color: var(--court); }
  .tabbar a:hover { text-decoration: none; }
  .tabbar .fab { align-self: center; }
  .tabbar .fab span { width: 52px; height: 52px; margin-top: -24px; border-radius: 50%; background: var(--ball); color: var(--ball-ink); display: grid; place-items: center; box-shadow: 0 6px 18px rgba(0,0,0,.18); }
  .tabbar .fab .ico { width: 24px; height: 24px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* planned areas */
.soon-card { display: grid; grid-template-columns: 96px 1fr; gap: 24px; padding: 28px; align-items: start; max-width: 820px; }
.soon-card h2 { margin-bottom: 8px; }
.soon-card p { margin: 0 0 12px; color: var(--ink-2); }
.soon-ill { width: 96px; height: 96px; border-radius: 24px; background: var(--court-soft); color: var(--court); display: grid; place-items: center; }
.soon-ill .ico { width: 44px; height: 44px; stroke-width: 1.4; }
@media (max-width: 760px) { .soon-card { grid-template-columns: 1fr; } }
details.inline-edit { display: inline-block; position: relative; }
details.inline-edit summary { list-style: none; }
details.inline-edit summary::-webkit-details-marker { display: none; }
.inline-pop { position: absolute; right: 0; top: calc(100% + 6px); z-index: 10; width: 360px; text-align: left; box-shadow: 0 12px 40px rgba(0,0,0,.15); }
.home-tile { display: flex; flex-direction: column; gap: 6px; color: var(--ink); }
.home-tile:hover { text-decoration: none; border-color: var(--court); }
.home-tile .ico { width: 26px; height: 26px; color: var(--court); margin-bottom: 4px; }
fieldset.ro { border: 0; padding: 0; margin: 0; min-width: 0; }
/* never let a wide row push the page sideways on phones */
html, body { overflow-x: clip; }
.seg { max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.seg::-webkit-scrollbar { display: none; }
@media (max-width: 760px) {
  .acc { min-width: 150px; padding: 10px 12px; }
  .preview { height: 38vh; min-height: 260px; }
  .sticky-actions { position: static; background: none; margin: 0; padding: 14px 0 0; }
  .doc-layout { gap: 14px; }
}
