/* App, redesign 19 Nov (ref 2,4): a deep dusk sidebar (the mountain at night, a far ridge at its foot) and a pale fog
   workspace (body.weather). Headings are thin wide-tracked uppercase; cards are quiet frosted panels; seat status
   reads as a circular ring of arcs and round step markers. */
.app { display: grid; grid-template-columns: 252px minmax(0, 1fr); min-height: 100vh; }
.side { color: var(--dusk-mute); padding: 26px 20px; display: flex; flex-direction: column; gap: 34px; position: sticky; top: 0; height: 100vh; isolation: isolate; overflow: hidden;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 300 160' preserveAspectRatio='none'%3E%3Cpath d='M0 120 L40 96 L70 108 L110 60 L132 74 L150 40 L172 70 L200 58 L240 98 L270 88 L300 104 L300 160 L0 160Z' fill='%23ece8e0' fill-opacity='.07'/%3E%3Cpath d='M0 140 L60 124 L120 138 L180 116 L240 132 L300 122 L300 160 L0 160Z' fill='%23ece8e0' fill-opacity='.06'/%3E%3C/svg%3E") bottom / 100% 160px no-repeat,
    radial-gradient(120% 50% at 80% 100%, rgba(227, 162, 124, .14), transparent 70%),
    linear-gradient(180deg, #151a26, var(--dusk) 50%, #262d3d); }
.brand { display: inline-flex; align-items: center; gap: 12px; font: 400 14px var(--display); letter-spacing: .32em; text-transform: uppercase; text-decoration: none; color: var(--dusk-fg); }
.brand svg { width: 24px; height: 24px; }
.side nav { display: grid; gap: 4px; }
.side nav a { display: flex; align-items: center; gap: 12px; text-decoration: none; padding: 10px 12px; border-radius: 999px; color: var(--dusk-mute); font: 400 11.5px var(--display); letter-spacing: .2em; text-transform: uppercase; transition: background .2s, color .2s; }
.side nav a::before { content: ""; width: 7px; height: 7px; border: 1px solid currentColor; transform: rotate(45deg); opacity: .6; flex: none; }
.side nav a:hover { color: var(--dusk-fg); background: rgba(255, 255, 255, .05); }
.side nav a[aria-current="page"] { color: var(--dusk-fg); background: rgba(255, 255, 255, .08); }
.side nav a[aria-current="page"]::before { background: var(--glow); border-color: var(--glow); opacity: 1; }
.keys { margin-top: auto; border: 1px solid var(--dusk-line); padding: 16px; border-radius: var(--r); display: grid; gap: 10px; font-size: 13.5px; background: rgba(255, 255, 255, .03); }
.keys .label { color: var(--dusk-mute); }
.keys p { color: var(--dusk-fg); }
.keys.open { border-color: rgba(227, 162, 124, .45); }
.keys .btn.ghost { color: var(--dusk-fg); border-color: var(--dusk-line); justify-self: start; }
.main { padding: 24px clamp(16px, 3.4vw, 52px) 90px; min-width: 0; }
.topbar { display: flex; justify-content: space-between; align-items: center; gap: 14px; flex-wrap: wrap; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.crumb { color: var(--mute); font: 400 11px var(--display); letter-spacing: .22em; text-transform: uppercase; } .crumb b { color: var(--fg); font-weight: 500; }
.bar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.seg { display: inline-flex; border: 1px solid var(--line-2); border-radius: 999px; padding: 3px; gap: 3px; background: rgba(255, 255, 255, .35); }
.seg button { border: 0; background: none; padding: 7px 14px; border-radius: 999px; cursor: pointer; font: 400 10.5px var(--display); letter-spacing: .18em; text-transform: uppercase; color: var(--mute); transition: background .2s, color .2s; }
.seg button[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
body[data-mode="live"] .seg button[data-mode="live"][aria-pressed="true"] { background: var(--acc); }
.mode-note { margin: 14px 0 34px; font: 12.5px var(--mono); color: var(--mute); }
body[data-mode="live"] .mode-note { color: var(--acc); }
h1 { font-size: clamp(26px, 3vw, 40px); font-weight: 200; letter-spacing: .2em; }
.vhead { display: grid; gap: 12px; margin-bottom: 26px; }
.vhead p { color: var(--mute); max-width: 60ch; }

/* new split */
.new-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 28px; align-items: start; }
.sheet { padding: 30px; display: grid; gap: 18px; }
.sheet, .links-out, .scard, .vault-list, dialog.move { background: var(--panel); border: 1px solid rgba(255, 255, 255, .75); border-radius: var(--r);
  box-shadow: 0 1px 0 rgba(35, 38, 45, .05), 0 30px 60px -46px rgba(27, 33, 48, .5); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); }
.f { display: grid; gap: 7px; font: 400 10.5px var(--display); letter-spacing: .2em; text-transform: uppercase; color: var(--mute); }
.f .field { text-transform: none; letter-spacing: 0; }
.row2 { display: grid; grid-template-columns: 1fr 120px; gap: 12px; }
.how-split { justify-self: start; }
.seats-edit { display: grid; gap: 6px; max-height: 380px; overflow: auto; padding-right: 2px; }
.seat-row { display: grid; grid-template-columns: 26px minmax(0, 1fr) 120px; gap: 8px; align-items: center; }
.seat-row > span:first-child { width: 24px; height: 24px; border-radius: 50%; border: 1px solid var(--line-2); display: grid; place-items: center; font: 300 11px var(--display); color: var(--mute); }
.seat-row .field { padding: 8px 10px; font-size: 14px; }
.seat-row .field[readonly] { background: transparent; color: var(--mute); }
.sum { display: flex; justify-content: space-between; gap: 10px; border-top: 1px solid var(--line); padding-top: 14px; font-size: 14px; flex-wrap: wrap; }
.sum .off, .sum .err { color: var(--bad); }
.fine { color: var(--mute); font-size: 13.5px; line-height: 1.6; }
.warn { font-size: 13.5px; color: var(--warn); border-left: 1px solid var(--warn); padding-left: 14px; }
.out .empty, .empty { border: 1px solid var(--line-2); border-radius: var(--r); padding: 48px 28px; display: grid; gap: 20px; justify-items: center; text-align: center; color: var(--mute); background: rgba(255, 255, 255, .2); }
.empty svg { width: 150px; }
.links-out { padding: 30px; display: grid; gap: 16px; }
.links-out h2 { font-size: 20px; letter-spacing: .18em; font-weight: 300; text-transform: none; }
.glink { display: grid; gap: 10px; background: var(--acc-wash); padding: 16px; border-radius: var(--r); border: 1px solid color-mix(in srgb, var(--acc) 22%, transparent); }
.glink code, .links-out code { display: block; font-size: 12px; overflow-wrap: anywhere; max-height: 4.4em; overflow: hidden; }
.seat-links { list-style: none; margin: 0; padding: 0; display: grid; }
.seat-links li { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 11px 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.seat-links li > div:first-child { display: grid; }
.seat-links .mono { color: var(--mute); font-size: 13px; }

/* my splits */
.split-cards { display: grid; gap: 20px; }
.scard { padding: 26px 28px; display: grid; gap: 16px; }
.scard.closed { opacity: .7; }
.scard header { display: flex; justify-content: space-between; gap: 16px; align-items: center; flex-wrap: wrap; }
.scard h2 { font-size: 20px; letter-spacing: .14em; font-weight: 300; text-transform: none; }
.scard .big { display: flex; align-items: center; gap: 14px; }
.scard .big > div { display: grid; text-align: right; }
.scard .big b { font: 200 34px/1 var(--display); letter-spacing: .06em; }
.scard .big span { font-size: 12.5px; color: var(--mute); }
.ring { width: 58px; height: 58px; transform: rotate(-90deg); flex: none; }
.ring circle { fill: none; stroke-width: 3; stroke: var(--line-2); stroke-linecap: round; }
.ring circle.ok { stroke: var(--acc); } .ring circle.bad { stroke: var(--bad); }
.segbar { display: flex; gap: 4px; height: 2px; }
.segbar i { flex: 1; background: var(--line-2); }
.segbar i.ok { background: var(--acc); } .segbar i.bad { background: var(--bad); }
.seat-status { list-style: none; margin: 0; padding: 0; }
.seat-status li { display: grid; grid-template-columns: minmax(0, 1fr) 100px 80px 120px; gap: 10px; align-items: center; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.seat-status li > :last-child { justify-self: end; }

/* collect */
.vault-total { display: flex; align-items: baseline; gap: 14px; margin: 14px 0 22px; flex-wrap: wrap; }
.vault-total b { font: 200 clamp(44px, 6vw, 76px)/1 var(--display); letter-spacing: .04em; }
.vault-total span { color: var(--mute); font: 400 11px var(--display); letter-spacing: .2em; text-transform: uppercase; }
.vault-list { display: grid; }
.vrow { display: grid; grid-template-columns: 140px minmax(0, 1fr) 110px 90px; gap: 12px; align-items: center; padding: 14px 22px; border-bottom: 1px solid var(--line); font-size: 14px; }
.vrow:last-child { border-bottom: 0; }
.vrow > :last-child { justify-self: end; }
.vault-list .empty { border: 0; background: none; }
dialog.move { padding: 0; max-width: min(520px, calc(100vw - 32px)); color: var(--fg); background: rgba(246, 244, 239, .96); }
dialog.move::backdrop { background: rgba(27, 33, 48, .5); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.move form { padding: 28px; display: grid; gap: 16px; }
.move h2 { font-size: 18px; }
fieldset { border: 0; padding: 0; margin: 0; display: grid; gap: 8px; }
.opt { display: grid; grid-template-columns: 18px 1fr; gap: 10px; align-items: start; border: 1px solid var(--line); border-radius: var(--r); padding: 12px 14px; cursor: pointer; font-size: 13.5px; color: var(--mute); }
.opt b { display: block; color: var(--fg); font-size: 14.5px; font-weight: 600; }
.opt:has(input:checked) { border-color: var(--acc); background: var(--acc-wash); }
.opt input { accent-color: var(--acc); }

.help { display: grid; gap: 0; max-width: 74ch; padding: 0; list-style: none; counter-reset: h; }
.help li { counter-increment: h; position: relative; padding: 18px 0 18px 58px; border-top: 1px solid var(--line); color: var(--mute); }
.help li::before { content: counter(h); position: absolute; left: 0; top: 16px; width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--line-2); display: grid; place-items: center; font: 200 15px var(--display); color: var(--fg); }
.help b { color: var(--fg); display: block; font-weight: 600; margin-bottom: 4px; }

@media (max-width: 960px) { .new-grid { grid-template-columns: 1fr; } }
@media (max-width: 760px) {
  .app { grid-template-columns: 1fr; }
  .side { position: static; height: auto; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 12px; padding: 16px; background-size: 100% 70px, auto, auto; }
  .side nav { display: flex; gap: 2px; overflow-x: auto; width: 100%; order: 3; }
  .side nav a { white-space: nowrap; font-size: 10.5px; padding: 8px 10px; }
  .side nav a::before { display: none; }
  .keys { margin-top: 0; margin-left: auto; padding: 0; border: 0; background: none; grid-template-columns: auto; }
  .keys .label, .keys p { display: none; }
  .keys.open { display: none; }
  .sheet, .links-out { padding: 22px 18px; }
  .scard { padding: 20px 18px; }
  .seat-status li { grid-template-columns: minmax(0, 1fr) 80px 64px; }
  .seat-status li > :last-child { grid-column: 1 / -1; justify-self: start; }
  .vrow { grid-template-columns: minmax(0, 1fr) 90px; padding: 12px 16px; }
  .vrow > span:nth-child(2) { grid-column: 1 / -1; order: 3; color: var(--mute); font-size: 13px; }
  .row2 { grid-template-columns: 1fr 96px; }
  .seat-row { grid-template-columns: 24px minmax(0, 1fr) 96px; }
}
