/* ILA Control Tower — Organic Glass. Warm ground, glass chrome, matte data, emerald accent. */

:root {
  color-scheme: light;
  --ground: #ede6da; --ground2: #e3dacb;
  --orb1: rgba(46, 157, 111, .26); --orb2: rgba(236, 160, 98, .30); --orb3: rgba(170, 150, 110, .22);
  --glass: rgba(255, 252, 246, .64); --glass-b: rgba(255, 255, 255, .72); --sh-glass: 0 1px 0 rgba(255, 255, 255, .6) inset, 0 12px 34px -16px rgba(70, 52, 30, .28);
  --surface: #fffdf9; --surface2: #f8f4ed; --soft: #f1ebe1; --inbg: #fbf8f2;
  --line: rgba(64, 50, 34, .09); --line2: rgba(64, 50, 34, .17); --inline: rgba(64, 50, 34, .16);
  --text: #231f1a; --text2: #5d564c; --text3: #91887b;
  --accent: #1f7a57; --accent2: #2e9d6f; --accent-soft: rgba(31, 122, 87, .11); --accent-line: rgba(31, 122, 87, .35);
  --warm: #d9853f; --warm-soft: rgba(217, 133, 63, .13);
  --bad: #c43d3a; --bad-soft: rgba(196, 61, 58, .10); --warn: #a8701a; --warn-soft: rgba(214, 150, 40, .15); --ok: #1f7a57;
  --sh1: 0 1px 2px rgba(60, 44, 24, .06), 0 0 0 1px var(--line); --sh2: 0 10px 28px -14px rgba(60, 44, 24, .35), 0 0 0 1px var(--line);
  --c0: #2a78d6; --c1: #eb6834; --c2: #1baf7a; --c3: #eda100; --c4: #e87ba4; --c5: #008300; --c6: #4a3aa7; --c7: #e34948;
  --abb: #2a78d6; --wt: #eb6834;
  --v-com: #6a55c8; --v-pln: #58626f; --v-plnb: #e2d9ca;
  --r-shell: 26px; --r-card: 20px; --r-ctl: 11px;
  --ease: cubic-bezier(.2, .8, .2, 1); --spring: cubic-bezier(.3, 1.4, .5, 1);
  font-family: Inter, system-ui, -apple-system, 'Segoe UI', sans-serif; font-size: 13.5px; color: var(--text);
  -webkit-font-smoothing: antialiased;
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --ground: #15130f; --ground2: #1c1914;
  --orb1: rgba(52, 170, 120, .16); --orb2: rgba(214, 130, 70, .14); --orb3: rgba(120, 100, 70, .14);
  --glass: rgba(33, 29, 24, .66); --glass-b: rgba(255, 240, 220, .08); --sh-glass: 0 1px 0 rgba(255, 240, 220, .05) inset, 0 16px 40px -18px rgba(0, 0, 0, .7);
  --surface: #1e1b17; --surface2: #25211c; --soft: #2c2721; --inbg: #23201b;
  --line: rgba(255, 238, 215, .08); --line2: rgba(255, 238, 215, .15); --inline: rgba(255, 238, 215, .14);
  --text: #f2ece2; --text2: #bdb3a4; --text3: #877d70;
  --accent: #3fb07f; --accent2: #5cc496; --accent-soft: rgba(63, 176, 127, .14); --accent-line: rgba(63, 176, 127, .4);
  --warm: #e59a58; --warm-soft: rgba(229, 154, 88, .14);
  --bad: #e66767; --bad-soft: rgba(230, 103, 103, .13); --warn: #d9a441; --warn-soft: rgba(217, 164, 65, .14); --ok: #3fb07f;
  --sh1: 0 1px 2px rgba(0, 0, 0, .3), 0 0 0 1px var(--line); --sh2: 0 14px 30px -14px rgba(0, 0, 0, .7), 0 0 0 1px var(--line);
  --c0: #3987e5; --c1: #d95926; --c2: #199e70; --c3: #c98500; --c4: #d55181; --c5: #2f9a2f; --c6: #9085e9; --c7: #e66767;
  --abb: #3987e5; --wt: #d95926;
  --v-com: #9d8cf0; --v-pln: #a9a092; --v-plnb: #3a342c;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { background: var(--ground); overflow: hidden; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
button:disabled { cursor: default; opacity: .4; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
.grow { flex: 1; }
.muted { color: var(--text3); }
.neg { color: var(--bad); font-weight: 650; }
.warn { color: var(--warn); }
.ok { color: var(--ok); }
.ic { flex: none; display: block; }
h1, h2, h3 { margin: 0; letter-spacing: -.015em; }
.fine { font-size: 12px; color: var(--text3); line-height: 1.5; margin: 6px 0 0; }

/* ground: soft light behind everything, never interactive */
.ground { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; background: radial-gradient(120% 90% at 10% 0%, var(--ground2), var(--ground) 60%); }
.ground i { position: absolute; border-radius: 50%; filter: blur(70px); }
.ground i:nth-child(1) { width: 46vw; height: 46vw; left: -12vw; top: -14vw; background: var(--orb1); }
.ground i:nth-child(2) { width: 38vw; height: 38vw; right: -10vw; top: 18vh; background: var(--orb2); }
.ground i:nth-child(3) { width: 34vw; height: 34vw; left: 32vw; bottom: -18vw; background: var(--orb3); }

/* ---------------------------------------------------------------- shell */
.app { position: relative; z-index: 1; height: 100vh; display: grid; grid-template-columns: 212px minmax(0, 1fr); gap: 12px; padding: 12px; }
.side, .top, .pl-side, .menu, .modal, .drawer, .selbar, .vtabs, .lane, .tray, .sct, .mchip { -webkit-backdrop-filter: blur(18px) saturate(1.35); backdrop-filter: blur(18px) saturate(1.35); }
.side { display: flex; flex-direction: column; gap: 4px; padding: 14px 10px; border-radius: var(--r-shell); background: var(--glass); border: 1px solid var(--glass-b); box-shadow: var(--sh-glass); min-height: 0; }
.brand { display: flex; align-items: center; gap: 10px; padding: 2px 6px 16px; }
.mark { width: 36px; height: 36px; border-radius: 12px; display: grid; place-items: center; font-size: 11.5px; font-weight: 800; letter-spacing: .06em; color: #fff; background: linear-gradient(150deg, var(--accent), var(--accent2)); box-shadow: 0 8px 18px -8px var(--accent); }
.bname { font-weight: 700; font-size: 14px; letter-spacing: -.01em; }
.navs { display: grid; gap: 3px; }
.nav { display: flex; align-items: center; gap: 12px; height: 42px; padding: 0 12px; border-radius: 13px; color: var(--text2); font-weight: 560; transition: background .16s var(--ease), color .16s; }
.nav:hover { background: var(--soft); color: var(--text); }
.nav.on { background: var(--surface); color: var(--text); box-shadow: var(--sh1); }
.nav.on .ic { color: var(--accent); }
.proj { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-radius: 13px; font-size: 12.5px; color: var(--text2); text-align: left; min-width: 0; }
.proj span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.proj:hover { background: var(--soft); }
.main { display: flex; flex-direction: column; gap: 12px; min-width: 0; min-height: 0; }
.top { flex: none; height: 60px; display: flex; align-items: center; gap: 12px; padding: 0 12px 0 22px; border-radius: 22px; background: var(--glass); border: 1px solid var(--glass-b); box-shadow: var(--sh-glass); }
.ttl { display: flex; align-items: baseline; gap: 14px; min-width: 0; }
.ttl h1 { font-size: 19px; font-weight: 760; }
.tsub { font-size: 12.5px; color: var(--text3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tbtns { display: flex; gap: 2px; }
.find { display: inline-flex; align-items: center; gap: 7px; height: 36px; padding: 0 12px; border-radius: var(--r-ctl); background: var(--surface); box-shadow: var(--sh1); color: var(--text3); }
.find input { border: 0; outline: 0; background: transparent; width: 130px; color: var(--text); }
.find.sm { height: 32px; }
.find.sm input { width: 110px; }
.page { flex: 1; min-height: 0; overflow: auto; padding: 2px 2px 96px; }
body[data-page="plan"] .page { overflow: hidden; padding-bottom: 2px; }

/* ---------------------------------------------------------------- controls */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 36px; padding: 0 15px; border-radius: var(--r-ctl); background: var(--surface); box-shadow: var(--sh1); font-weight: 600; white-space: nowrap; transition: transform .14s var(--ease), box-shadow .16s, background .16s; }
.btn:hover:not(:disabled) { box-shadow: var(--sh2); transform: translateY(-1px); }
.btn:active:not(:disabled) { transform: translateY(0) scale(.98); }
.btn.primary { background: linear-gradient(150deg, var(--accent), var(--accent2)); color: #fff; box-shadow: 0 8px 20px -10px var(--accent); }
.btn.primary.danger { background: var(--bad); }
.btn.ghost { background: transparent; box-shadow: none; color: var(--text2); }
.btn.ghost:hover:not(:disabled) { background: var(--soft); box-shadow: none; color: var(--text); }
.btn.sm { height: 30px; padding: 0 11px; border-radius: 9px; font-size: 12.5px; }
.btn.big { height: 46px; width: 100%; font-size: 14px; border-radius: 14px; }
.ib { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 11px; color: var(--text2); transition: background .15s, color .15s; }
.ib:hover:not(:disabled) { background: var(--soft); color: var(--text); }
.ib.sm { width: 28px; height: 28px; border-radius: 8px; }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 11px; border-radius: 999px; background: var(--soft); font-size: 12.5px; font-weight: 600; color: var(--text2); white-space: nowrap; }
.chip:hover { color: var(--text); background: var(--line2); }
.chip.sm { height: 24px; padding: 0 9px; font-size: 12px; }
.chip.ghost { background: transparent; box-shadow: inset 0 0 0 1px var(--line2); }
.chip.ghost:hover { background: var(--soft); }
.seg { display: inline-flex; gap: 2px; padding: 3px; border-radius: 12px; background: var(--soft); }
.seg button { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 11px; border-radius: 9px; color: var(--text2); font-weight: 560; font-size: 12.5px; transition: background .15s, color .15s; }
.seg button:hover:not(:disabled) { color: var(--text); }
.seg button.on { background: var(--surface); color: var(--text); box-shadow: var(--sh1); font-weight: 650; }
.seg.sm button { height: 26px; padding: 0 10px; }
.pill { display: inline-flex; align-items: center; gap: 4px; height: 22px; padding: 0 8px; border-radius: 999px; font-size: 11.5px; font-weight: 650; background: var(--soft); color: var(--text2); }
.pill.live { background: var(--accent-soft); color: var(--accent); }
.pill.bad { background: var(--bad-soft); color: var(--bad); }
.linkbtn { color: var(--accent); font-weight: 650; }
.linkbtn:hover { text-decoration: underline; }
.dot { display: inline-block; flex: none; width: 9px; height: 9px; border-radius: 50%; background: var(--c0); }
.dot.big { width: 26px; height: 26px; box-shadow: 0 0 0 2px var(--surface); }
.dot.big.on { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--text); }
.c0 { --lc: var(--c0); } .c1 { --lc: var(--c1); } .c2 { --lc: var(--c2); } .c3 { --lc: var(--c3); } .c4 { --lc: var(--c4); } .c5 { --lc: var(--c5); } .c6 { --lc: var(--c6); } .c7 { --lc: var(--c7); }
.dot[class*=" c"] { background: var(--lc); }
.tdot { display: inline-block; flex: none; width: 9px; height: 9px; border-radius: 3px; background: var(--abb); }
.t-WT { --tc: var(--wt); } .t-ABB { --tc: var(--abb); }
.tdot.t-WT { background: var(--wt); }
.sq { display: inline-block; flex: none; width: 10px; height: 10px; border-radius: 3px; background: var(--st); }

/* stages: one hue each, always with their name */
.st0 { --st: #bdb4a6; --stx: #2b261f; } .st1 { --st: #8a5cc6; --stx: #fff; } .st2 { --st: #e0a032; --stx: #2b2210; } .st3 { --st: #23918d; --stx: #fff; }
.st4 { --st: #4f6bd6; --stx: #fff; } .st5 { --st: #7cba4a; --stx: #1d2a12; } .st6 { --st: #1f7a57; --stx: #fff; }
:root[data-theme="dark"] .st0 { --st: #6c6457; --stx: #f2ece2; } :root[data-theme="dark"] .st6 { --st: #2f9b6c; }
.rs0 { --st: #bdb4a6; --stx: #2b261f; } .rs1 { --st: #4f6bd6; --stx: #fff; } .rs2 { --st: #23918d; --stx: #fff; } .rs3 { --st: #1f7a57; --stx: #fff; }
.spill { display: inline-flex; align-items: center; justify-content: center; height: 26px; min-width: 112px; padding: 0 10px; border-radius: 8px; background: var(--st); color: var(--stx); font-size: 12px; font-weight: 650; white-space: nowrap; transition: transform .15s var(--spring), filter .15s; }
.spill:hover { filter: brightness(1.06); transform: scale(1.03); }
span.spill { min-width: 0; height: 24px; }
.tpill { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px; border-radius: 8px; background: color-mix(in srgb, var(--tc) 13%, transparent); color: color-mix(in srgb, var(--tc) 80%, var(--text)); font-size: 12px; font-weight: 650; }
.tpill::before { content: ''; width: 7px; height: 7px; border-radius: 2px; background: var(--tc); }
.tpill:hover { background: color-mix(in srgb, var(--tc) 22%, transparent); }
.tchip { font-size: 10.5px; font-weight: 650; padding: 1px 6px; border-radius: 5px; background: color-mix(in srgb, var(--tc) 14%, transparent); color: color-mix(in srgb, var(--tc) 80%, var(--text)); }
.flag { display: inline-flex; align-items: center; gap: 3px; color: var(--bad); font-size: 11.5px; font-weight: 650; }
.flag.note { color: var(--text3); }

/* toggle */
.tg { display: inline-flex; align-items: center; gap: 10px; font-size: 13px; color: var(--text2); cursor: pointer; }
.tg input { position: absolute; opacity: 0; width: 0; }
.tg span { flex: none; width: 34px; height: 20px; border-radius: 999px; background: var(--line2); position: relative; transition: background .18s; }
.tg span::after { content: ''; position: absolute; left: 3px; top: 3px; width: 14px; height: 14px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, .25); transition: transform .2s var(--spring); }
.tg input:checked + span { background: var(--accent); }
.tg input:checked + span::after { transform: translateX(14px); }
.tg input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---------------------------------------------------------------- overlays */
.menu { position: fixed; z-index: 60; min-width: 190px; max-width: 340px; padding: 6px; border-radius: 15px; background: color-mix(in srgb, var(--surface) 93%, transparent); border: 1px solid var(--glass-b); box-shadow: 0 18px 44px -14px rgba(40, 28, 14, .45); display: none; }
:root[data-theme="dark"] .menu { background: rgba(38, 34, 28, .92); }
.menu.on { display: block; animation: rise .16s var(--ease); }
.menu > button { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; min-height: 34px; padding: 6px 10px; border-radius: 9px; text-align: left; font-size: 13px; }
.menu > button:hover, .menu > button:focus-visible { background: var(--soft); outline: none; }
.menu > button.on { font-weight: 650; }
.menu > button.on .ic { color: var(--accent); }
.menu > button.danger { color: var(--bad); }
.menu hr { border: 0; border-top: 1px solid var(--line); margin: 5px 4px; }
.menu .mhead { padding: 6px 10px 4px; font-size: 11.5px; color: var(--text3); font-weight: 600; }
.menu.wide { max-width: 380px; }
.menu.wide button > span { display: grid; gap: 2px; }
.menu.wide small { color: var(--text3); font-size: 11.5px; font-weight: 450; }
.menu.stages > button { justify-content: flex-start; padding: 4px; }
.menu.stages .spill { min-width: 150px; }
.mcal { width: 262px; padding: 4px; }
.mch { display: flex; justify-content: space-between; padding: 4px 4px 8px; font-size: 12.5px; }
.mcg { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; }
.mcg .wh { font-size: 10.5px; color: var(--text3); text-align: center; padding-bottom: 2px; }
.mcg button { height: 36px; border-radius: 8px; display: grid; place-items: center; align-content: center; font-size: 12.5px; font-weight: 600; line-height: 1.05; }
.mcg button small { font-size: 9px; color: var(--text3); font-weight: 500; min-height: 9px; }
.mcg button:hover, .mcg button:focus-visible { background: var(--soft); outline: none; }
.mcg button.off { color: var(--text3); font-weight: 450; }
.mcg button.full small { color: var(--warn); }
.mcg button.today { box-shadow: inset 0 0 0 1.5px var(--accent); }
.mcg button.on { background: var(--accent); color: #fff; }
.mcg button.on small { color: #fff; }
.mcal .clr { width: 100%; margin-top: 6px; height: 30px; border-radius: 8px; font-size: 12.5px; color: var(--text2); }
.mcal .clr:hover { background: var(--soft); }
.tip { position: fixed; z-index: 80; pointer-events: none; max-width: 280px; padding: 7px 10px; border-radius: 10px; background: rgba(28, 24, 19, .94); color: #f6f1e8; font-size: 12px; line-height: 1.45; box-shadow: 0 10px 26px -10px rgba(0, 0, 0, .5); opacity: 0; transition: opacity .12s; }
.tip.on { opacity: 1; }
.tip .muted { color: #b3a998; } .tip .neg { color: #ff9b97; } .tip .ok { color: #7fd8ac; }
.toast { position: fixed; z-index: 70; left: 50%; bottom: 22px; transform: translate(-50%, 20px); display: flex; align-items: center; gap: 14px; padding: 10px 12px 10px 16px; border-radius: 14px; background: rgba(28, 24, 19, .94); color: #f6f1e8; font-size: 13px; box-shadow: 0 14px 34px -12px rgba(0, 0, 0, .5); opacity: 0; pointer-events: none; transition: opacity .2s, transform .25s var(--spring); }
.toast.on { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
.tbtn { color: #7fd8ac; font-weight: 700; padding: 4px 8px; border-radius: 8px; }
.tbtn:hover { background: rgba(255, 255, 255, .08); }
body:has(.selbar.on) .toast { bottom: 88px; }
.veil { position: fixed; inset: 0; z-index: 50; display: none; place-items: center; background: rgba(30, 22, 12, .28); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }
.veil.on { display: grid; animation: fade .15s; }
.modal { width: min(460px, calc(100vw - 32px)); max-height: calc(100vh - 40px); overflow: auto; border-radius: 24px; background: var(--surface); border: 1px solid var(--glass-b); box-shadow: 0 30px 70px -24px rgba(40, 26, 10, .55); animation: rise .2s var(--ease); }
.modal.wide { width: min(640px, calc(100vw - 32px)); }
.modal header { display: flex; align-items: center; justify-content: space-between; padding: 18px 18px 4px 22px; }
.modal h3 { font-size: 17px; font-weight: 720; }
.mbody { padding: 10px 22px 6px; }
.modal footer { display: flex; align-items: center; gap: 8px; padding: 14px 18px 18px 22px; }
.form { display: grid; gap: 7px; }
.form label, .sublab { font-size: 12.5px; font-weight: 600; color: var(--text2); margin-top: 6px; }
.form input:not([type=checkbox]):not([type=radio]), .form select, .form textarea, .dgrid select, .dgrid input, .fld select, .rules input, .nl textarea { height: 38px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--line2); background: var(--inbg); outline: none; transition: border-color .15s, box-shadow .15s; width: 100%; }
.form textarea, .nl textarea { height: auto; padding: 9px 12px; resize: vertical; line-height: 1.45; }
.form input:focus, .form select:focus, .form textarea:focus, .dgrid select:focus, .dgrid input:focus, .fld select:focus, .rules input:focus, .nl textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.form .two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.form .two label { display: block; margin-bottom: 6px; }
.form.inline { grid-template-columns: 90px 1fr; align-items: center; max-width: 520px; }
.form.inline label { margin: 0; }
.form .seg { justify-self: start; }
.form .tg { margin-top: 8px; }
.ocards { display: grid; gap: 6px; }
.ocard { display: grid; grid-template-columns: auto 1fr; column-gap: 10px; row-gap: 1px; align-items: center; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line2); cursor: pointer; margin: 0 !important; transition: border-color .15s, background .15s; }
.ocard input { grid-row: span 2; accent-color: var(--accent); margin: 0; }
.ocard b { font-size: 13px; color: var(--text); }
.ocard small { font-size: 12px; color: var(--text3); font-weight: 450; }
.ocard:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.swatch { display: flex; gap: 8px; flex-wrap: wrap; padding: 4px 2px; }
.cgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.cgrid > div { padding: 12px 14px; border-radius: 14px; background: var(--surface2); display: grid; }
.cgrid b { font-size: 24px; font-weight: 760; }
.cgrid span { font-size: 12px; color: var(--text2); }
.solve { display: flex; align-items: baseline; gap: 10px; margin-top: 14px; padding: 14px 16px; border-radius: 16px; background: var(--accent-soft); }
.solve b { font-size: 34px; font-weight: 800; color: var(--accent); letter-spacing: -.03em; }
.solve span { color: var(--text2); }
.dragghost { position: fixed; left: 0; top: 0; z-index: 90; pointer-events: none; display: none; }
.dragghost.on { display: block; }
.gcard { padding: 8px 14px; border-radius: 12px; background: var(--surface); box-shadow: 0 18px 36px -12px rgba(40, 26, 10, .5), 0 0 0 1px var(--accent-line); font-size: 13px; }
body.dragging, body.dragging * { cursor: grabbing !important; user-select: none; }
.lifted { opacity: .35; }

/* drawer: the kit */
.drawer { position: fixed; z-index: 40; top: 12px; right: 12px; bottom: 12px; width: min(390px, calc(100vw - 24px)); border-radius: 26px; background: var(--glass); border: 1px solid var(--glass-b); box-shadow: 0 30px 60px -20px rgba(40, 26, 10, .45); transform: translateX(calc(100% + 24px)); transition: transform .3s var(--ease); display: flex; flex-direction: column; overflow: hidden; }
:root[data-theme="dark"] .drawer { background: rgba(33, 29, 24, .9); }
.drawer.on { transform: none; }
.drawer header { display: flex; align-items: center; gap: 4px; padding: 14px 12px 6px; }
.drawer h2 { font-size: 20px; font-weight: 760; padding: 0 6px; }
.dbody { padding: 6px 20px 24px; overflow: auto; display: grid; gap: 16px; align-content: start; }
.dline { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.stepper { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(7, 1fr); }
.stepper li { position: relative; }
.stepper li::before { content: ''; position: absolute; top: 9px; left: -50%; right: 50%; height: 2px; background: var(--line2); }
.stepper li:first-child::before { display: none; }
.stepper li.done::before, .stepper li.cur::before { background: var(--accent); }
.stepper button { position: relative; width: 100%; display: grid; justify-items: center; gap: 5px; }
.stepper i { width: 20px; height: 20px; border-radius: 50%; background: var(--surface); box-shadow: inset 0 0 0 2px var(--line2); transition: transform .18s var(--spring); }
.stepper button:hover i { transform: scale(1.15); }
.stepper li.done i { background: var(--accent); box-shadow: none; }
.stepper li.cur i { background: var(--st); box-shadow: 0 0 0 4px color-mix(in srgb, var(--st) 25%, transparent); }
.stepper span { font-size: 10px; color: var(--text3); text-align: center; line-height: 1.2; }
.stepper li.cur span { color: var(--text); font-weight: 700; }
.dgrid { display: grid; grid-template-columns: 96px 1fr; gap: 10px 12px; align-items: center; }
.dgrid > label { font-size: 12.5px; color: var(--text3); font-weight: 600; }
.dgrid select, .dgrid input { height: 34px; }
.nl { display: grid; gap: 6px; font-size: 12.5px; color: var(--text3); font-weight: 600; }
.hist { display: grid; gap: 6px; font-size: 12.5px; }
.hist > div { display: flex; align-items: center; gap: 8px; }
.hist .muted { margin-left: auto; }
.drift { display: flex; gap: 10px; padding: 12px; border-radius: 14px; background: var(--warn-soft); color: var(--warn); }
.drift > div { display: grid; gap: 2px; color: var(--text); }
.drift span { font-size: 12px; color: var(--text2); }
.dbtn { margin-top: 6px; }

/* the bar for many kits */
.selbar { position: fixed; z-index: 45; left: 50%; bottom: 20px; transform: translate(-50%, 140%); display: flex; align-items: center; gap: 4px; padding: 7px 8px 7px 18px; border-radius: 18px; background: rgba(28, 24, 19, .9); color: #f6f1e8; box-shadow: 0 20px 44px -16px rgba(0, 0, 0, .6); transition: transform .3s var(--spring); }
.selbar.on { transform: translate(-50%, 0); }
.selbar .btn.ghost { color: #e9e2d6; }
.selbar .btn.ghost:hover { background: rgba(255, 255, 255, .1); color: #fff; }
.selbar .ib { color: #e9e2d6; }
.selbar .ib:hover { background: rgba(255, 255, 255, .1); color: #fff; }
.vsep { width: 1px; height: 22px; background: rgba(255, 255, 255, .16); margin: 0 6px; }

.empty { display: grid; justify-items: center; text-align: center; gap: 10px; padding: 90px 20px; }
.empty h2 { font-size: 22px; }
.empty p { color: var(--text2); max-width: 420px; margin: 0 0 6px; line-height: 1.5; }
.empty.sm { padding: 40px 20px; }
.empty .row { display: flex; gap: 8px; }
.eart { width: 86px; height: 86px; border-radius: 28px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); margin-bottom: 6px; }

/* ---------------------------------------------------------------- cards */
.card { background: var(--surface); border-radius: var(--r-card); box-shadow: var(--sh1); padding: 16px 18px; min-width: 0; }
.card > header { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; min-height: 26px; flex-wrap: wrap; }
.card h3 { font-size: 14.5px; font-weight: 680; display: flex; align-items: center; gap: 8px; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--text2); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.lk { display: inline-block; width: 16px; height: 3px; border-radius: 2px; background: var(--text2); }
.lk.s-com { background: var(--v-com); } .lk.s-pln { background: var(--v-pln); } .lk.s-del { background: var(--accent); height: 8px; border-radius: 3px; }
.lk.s-base { background: var(--text3); }
.lk.dash { background: repeating-linear-gradient(90deg, currentColor 0 5px, transparent 5px 8px); height: 2px; }
.lk.s-com.dash { color: var(--v-com); } .lk.s-base.dash { color: var(--text3); }
.lk.s-plnb { background: var(--v-plnb); width: 11px; height: 11px; border-radius: 3px; } .lk.s-delb { background: var(--accent); width: 11px; height: 11px; border-radius: 3px; }
.lk.s-need { background: var(--text); } .lk.s-got { background: var(--tc); height: 8px; border-radius: 3px; } .lk.s-firm.dash { color: var(--tc); }
.lk.st6, .lk.st3, .lk.st0 { background: var(--st); width: 11px; height: 11px; border-radius: 3px; }

/* charts */
.chart { width: 100%; min-height: 60px; }
.chart svg { display: block; overflow: visible; }
.chart .grid { stroke: var(--line); stroke-width: 1; }
.chart .grid.zero { stroke: var(--line2); }
.chart .ax { font-size: 10.5px; fill: var(--text3); font-variant-numeric: tabular-nums; }
.chart .ax.yr { fill: var(--text2); font-weight: 700; }
.chart .today { stroke: var(--warm); stroke-width: 1.5; stroke-dasharray: 3 3; }
.chart .tlab { font-size: 10px; fill: var(--warm); font-weight: 650; }
.chart .cross { stroke: var(--text3); stroke-width: 1; }
.chart .shade { fill: var(--bad-soft); }
.chart .line { fill: none; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.chart .line.dash { stroke-dasharray: 5 4; }
.chart .s-com { stroke: var(--v-com); } .chart .s-pln { stroke: var(--v-pln); } .chart .s-base { stroke: var(--text3); stroke-width: 1.5; }
.chart .s-del.line { stroke: var(--accent); stroke-width: 2.5; } .chart .s-del.area { fill: var(--accent); opacity: .12; stroke: none; }
.chart .s-del.end { fill: var(--accent); stroke: var(--surface); stroke-width: 2; }
.chart .s-plnb { fill: var(--v-plnb); } .chart .s-delb { fill: var(--accent); }
.chart .s-need { stroke: var(--text); }
.chart .s-got.line, .chart .s-firm.line, .chart .s-bal.line { stroke: var(--tc); }
.chart .s-got.area, .chart .s-bal.area { fill: var(--tc); opacity: .12; stroke: none; }

/* ---------------------------------------------------------------- overview */
.ov { display: grid; gap: 12px; }
.ovtop { display: flex; align-items: center; gap: 6px; font-size: 12.5px; padding: 0 4px; }
.hero4 { display: grid; grid-template-columns: 1.3fr repeat(4, minmax(0, 1fr)); gap: 12px; }
.focal, .tile { text-align: left; border-radius: 22px; padding: 16px 18px; display: flex; flex-direction: column; gap: 3px; min-width: 0; transition: transform .2s var(--spring), box-shadow .2s; }
.focal:hover, .tile:hover { transform: translateY(-3px); }
.focal { color: #fff; background: radial-gradient(120% 140% at 0% 0%, #3fb586 0%, #1f7a57 55%, #155c41 100%); box-shadow: 0 22px 44px -22px rgba(21, 92, 65, .8); }
.focal .fl { font-size: 12.5px; font-weight: 650; opacity: .85; }
.focal b { font-size: 46px; font-weight: 800; letter-spacing: -.04em; line-height: 1.05; }
.focal .fs { font-size: 13px; opacity: .85; }
.fbar { height: 7px; border-radius: 4px; background: rgba(255, 255, 255, .22); overflow: hidden; margin-top: 10px; }
.fbar i { display: block; height: 100%; background: #fff; border-radius: 4px; }
.fp { font-size: 12px; opacity: .8; margin-top: 4px; }
.tile { background: var(--surface); box-shadow: var(--sh1); }
.tile:hover { box-shadow: var(--sh2); }
.tile .tl { font-size: 12.5px; font-weight: 600; color: var(--text2); }
.tile > b { font-size: 30px; font-weight: 760; letter-spacing: -.03em; line-height: 1.15; }
.tile > b small { font-size: 16px; color: var(--text3); font-weight: 600; }
.tile .ts { font-size: 12px; color: var(--text3); }
.tile.warn > b { color: var(--warn); }
.tbar { display: flex; gap: 2px; height: 7px; border-radius: 4px; overflow: hidden; margin-top: 8px; background: var(--soft); }
.tbar i { background: var(--st); }
.bline { display: flex; align-items: center; gap: 7px; font-size: 13px; margin-top: 8px; }
.bline b { font-size: 13px; }
.ovgrid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 12px; }
.c8 { grid-column: span 8; } .c7 { grid-column: span 7; } .c5 { grid-column: span 5; } .c4 { grid-column: span 4; }
.pipe { display: grid; gap: 2px; }
.prow { display: grid; grid-template-columns: 128px 1fr 40px; align-items: center; gap: 10px; height: 33px; padding: 0 8px; border-radius: 10px; text-align: left; font-size: 12.5px; }
.prow:hover { background: var(--soft); }
.pn { display: flex; align-items: center; gap: 8px; color: var(--text2); white-space: nowrap; }
.pb { height: 10px; border-radius: 5px; background: var(--soft); overflow: hidden; }
.pb i { display: block; height: 100%; border-radius: 5px; background: var(--st); transition: width .5s var(--ease); }
.prow b { text-align: right; font-variant-numeric: tabular-nums; }
.att { display: grid; gap: 2px; }
.arow { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 12px; text-align: left; font-size: 13px; }
.arow span { flex: 1; }
.arow:hover { background: var(--soft); }
.arow > .ic:first-child { color: var(--warn); }
.arow.bad > .ic:first-child { color: var(--bad); }
.arow > .ic:last-child { color: var(--text3); }
.clear { display: flex; align-items: center; gap: 8px; padding: 18px 10px; color: var(--accent); font-weight: 650; }
.orders { display: grid; gap: 2px; }
.orow { display: grid; grid-template-columns: minmax(130px, 200px) 1fr 76px 118px 34px; align-items: center; gap: 12px; height: 38px; padding: 0 8px; border-radius: 10px; text-align: left; font-size: 12.5px; }
.orow:hover { background: var(--soft); }
.orow .onm { display: flex; align-items: center; gap: 8px; min-width: 0; }
.orow .onm b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.orow .onm small { color: var(--text3); }
.obar { display: flex; height: 10px; border-radius: 5px; background: var(--soft); overflow: hidden; gap: 1px; }
.obar i { display: block; height: 100%; background: var(--st); }
.obar i.st3 { opacity: .55; }
.onum { text-align: right; color: var(--text3); font-variant-numeric: tabular-nums; }
.onum b { color: var(--text); }
.owin { color: var(--text3); white-space: nowrap; }
.odone { display: flex; align-items: center; gap: 6px; padding: 8px; font-size: 12px; color: var(--text3); }
.odone .ic { color: var(--accent); }
.mini + .mini { margin-top: 6px; }
.mt2 { display: flex; align-items: center; gap: 7px; font-size: 12.5px; font-weight: 650; }

/* ---------------------------------------------------------------- plan */
.pl { display: flex; flex-direction: column; gap: 10px; height: 100%; min-height: 0; }
.pl-tabs { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 0 2px; }
.sct { position: relative; display: inline-flex; align-items: center; gap: 9px; height: 44px; padding: 0 12px 0 14px; border-radius: 15px; background: var(--glass); border: 1px solid var(--glass-b); color: var(--text2); transition: transform .18s var(--spring), box-shadow .18s, background .18s; }
.sct:hover { transform: translateY(-1px); color: var(--text); }
.sct.on { background: var(--surface); color: var(--text); box-shadow: var(--sh2); border-color: transparent; }
.sct b { font-weight: 650; font-size: 13px; white-space: nowrap; }
.sct .live { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.sct .spk polyline { fill: none; stroke: var(--text3); stroke-width: 1.6; stroke-linejoin: round; }
.sct.on .spk polyline { stroke: var(--accent); }
.sct .ot { font-size: 12px; font-weight: 700; color: var(--accent); font-variant-numeric: tabular-nums; }
.sct .ot.bad { color: var(--bad); }
.sct .more { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 7px; color: var(--text3); }
.sct .more:hover { background: var(--soft); color: var(--text); }
.sct.add { width: 44px; padding: 0; justify-content: center; }
.ychips { display: flex; gap: 2px; padding: 3px; border-radius: 12px; background: var(--glass); border: 1px solid var(--glass-b); }
.ychip { height: 28px; padding: 0 10px; border-radius: 9px; font-size: 12.5px; font-weight: 600; color: var(--text3); }
.ychip.on { background: var(--surface); color: var(--text); box-shadow: var(--sh1); }
.pl-main { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
.pl-main.wp { grid-template-columns: minmax(0, 1fr) 296px; }
.pl-card { background: var(--surface); border-radius: var(--r-card); box-shadow: var(--sh1); display: flex; flex-direction: column; min-height: 0; overflow: hidden; }
.pl-wrap { flex: 1; min-height: 0; overflow: auto; position: relative; outline: none; }
.pl-grid { border-collapse: separate; border-spacing: 0; table-layout: fixed; width: max-content; font-variant-numeric: tabular-nums; font-size: 12.5px; user-select: none; }
.pl-grid col.cl { width: 236px; } .pl-grid col.ct { width: 74px; } .pl-grid col.cc { width: var(--cw); }
.pl-grid th, .pl-grid td { height: 30px; padding: 0 8px; text-align: right; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pl-grid .lab { position: sticky; left: 0; z-index: 2; background: var(--surface); text-align: left; padding-left: 14px; }
.pl-grid .tot { position: sticky; left: 236px; z-index: 2; background: var(--surface); box-shadow: inset -1px 0 var(--line2); font-weight: 600; color: var(--text2); overflow: visible; }
.pl-grid thead th { position: sticky; z-index: 3; background: var(--surface); }
.pl-grid thead th.corner { left: 0; z-index: 5; text-align: left; vertical-align: bottom; padding: 0 10px 6px 12px; box-shadow: inset -1px -1px var(--line2); }
.pl-grid.z-month tr.ty th { top: 0; height: 26px; } .pl-grid.z-month tr.tq th { top: 26px; height: 20px; } .pl-grid.z-month tr.tp th { top: 46px; }
.pl-grid.z-quarter tr.ty th { top: 0; height: 26px; } .pl-grid.z-quarter tr.tp th { top: 26px; }
.pl-grid.z-year tr.tp th { top: 0; height: 34px; }
.pl-grid .yr { text-align: center; font-size: 12px; font-weight: 750; letter-spacing: .02em; overflow: visible; }
.pl-grid .yr span { position: sticky; left: 330px; right: 12px; padding: 0 6px; }
.pl-grid .yr.y0 { background: color-mix(in srgb, var(--accent) 10%, var(--surface)); color: var(--accent); }
.pl-grid .yr.y1 { background: color-mix(in srgb, var(--warm) 13%, var(--surface)); color: color-mix(in srgb, var(--warm) 75%, var(--text)); }
.pl-grid .qt { text-align: center; font-size: 10.5px; font-weight: 650; color: var(--text3); letter-spacing: .04em; }
.pl-grid .qt.q0 { background: var(--surface2); } .pl-grid .qt.q1 { background: var(--surface); }
.pl-grid .per { font-size: 11.5px; font-weight: 650; color: var(--text2); box-shadow: inset 0 -1px var(--line2); text-align: right; }
.pl-grid .per.now { color: var(--accent); box-shadow: inset 0 -2px var(--accent); }
.pl-grid .per.past { color: var(--text3); font-weight: 500; }
.pl-grid .ys { box-shadow: inset 2px 0 var(--line2); }
.pl-grid .per.ys { box-shadow: inset 2px 0 var(--line2), inset 0 -1px var(--line2); }
.pl-grid .per.ys.now { box-shadow: inset 2px 0 var(--line2), inset 0 -2px var(--accent); }
.pl-grid td.now:not(.sel) { background-color: color-mix(in srgb, var(--accent) 4%, transparent); }
.zoom { display: inline-flex; gap: 1px; padding: 2px; border-radius: 9px; background: var(--soft); }
.zoom button { height: 24px; padding: 0 8px; border-radius: 7px; font-size: 11.5px; font-weight: 600; color: var(--text3); }
.zoom button.on { background: var(--surface); color: var(--text); box-shadow: var(--sh1); }
/* the strip */
.pl-grid tr.strip td { height: 70px; vertical-align: bottom; padding: 0 2px 4px; box-shadow: inset 0 -1px var(--line); }
.pl-grid tr.strip td.ys { box-shadow: inset 2px 0 var(--line2), inset 0 -1px var(--line); }
.pl-grid tr.strip td.lab { vertical-align: middle; }
.slab { display: grid; gap: 4px; }
.slab b { font-size: 12.5px; }
.slab .lg { display: flex; align-items: center; gap: 4px 7px; flex-wrap: wrap; font-size: 10.5px; color: var(--text3); font-weight: 500; }
.slab .lg i { display: inline-block; width: 9px; height: 9px; border-radius: 2px; }
.slab .lg .k1 { background: var(--accent); } .slab .lg .k2 { background: var(--accent-line); } .slab .lg .k3 { height: 0; width: 11px; border-top: 2px dashed var(--text2); border-radius: 0; } .slab .lg .k4 { border-radius: 50%; background: var(--v-com); width: 7px; height: 7px; }
.sb { position: relative; height: 56px; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; }
.sb .bf, .sb .bc { display: block; width: 58%; flex: none; }
.sb .bf { background: var(--accent); border-radius: 0 0 2px 2px; opacity: .85; }
.sb .bc { background: repeating-linear-gradient(135deg, var(--accent-line) 0 3px, transparent 3px 6px); border-radius: 3px 3px 0 0; }
.sb .bf:only-of-type, .sb .bc + .bf { border-radius: 3px 3px 2px 2px; }
.sb .ot { position: absolute; left: 10%; right: 10%; height: 0; border-top: 2px dashed var(--text2); }
.sb .ot.over { border-top-color: var(--bad); }
.sb .dm { position: absolute; left: 50%; width: 7px; height: 7px; margin: 0 0 -3px -3.5px; border-radius: 50%; background: var(--v-com); box-shadow: 0 0 0 2px var(--surface); }
.sb .gh { position: absolute; bottom: 0; left: 16%; right: 16%; border: 1.5px dashed var(--text3); border-bottom: 0; border-radius: 3px 3px 0 0; }
/* sections and rows */
.pl-grid tr.sec td { height: 38px; background: var(--surface2); box-shadow: inset 0 1px var(--line); }
.pl-grid tr.sec td.lab { background: var(--surface2); }
.sx { display: flex; align-items: center; gap: 9px; font-size: 13px; }
.sx b { font-weight: 720; }
.sxn { font-size: 12px; color: var(--text3); font-weight: 500; }
.pm { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 7px; box-shadow: inset 0 0 0 1px var(--line2); color: var(--text2); background: var(--surface); }
.pm:hover { color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent-line); }
.ll { display: flex; align-items: center; gap: 7px; overflow: hidden; }
.ll .kind { font-size: 11px; color: var(--text3); font-weight: 450; white-space: nowrap; }
.lname { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: left; border-radius: 5px; }
.lname:hover { color: var(--accent); }
.pl-grid tr.row td { box-shadow: inset 0 -1px var(--line); }
.pl-grid tr.row td.ys { box-shadow: inset 2px 0 var(--line2), inset 0 -1px var(--line); }
.pl-grid tr.row td.tot { box-shadow: inset -1px 0 var(--line2), inset 0 -1px var(--line); }
.pl-grid tr.strong td { font-weight: 700; color: var(--text); }
.pl-grid tr.strong td.lab { font-weight: 700; }
.pl-grid td.calc { color: var(--text2); }
.pl-grid tr.strong td.calc { color: var(--text); }
.pl-grid td.c.in { background: var(--inbg); border: solid var(--surface); border-width: 3px 2px; border-radius: 8px; box-shadow: inset 0 0 0 1px var(--inline); color: var(--text); font-weight: 600; cursor: cell; }
.pl-grid td.c.in.ys { box-shadow: inset 0 0 0 1px var(--inline); border-left: 2px solid var(--line2); }
.pl-grid td.c.in.held { box-shadow: inset 0 0 0 1px var(--accent-line), inset 0 -2px var(--accent); font-weight: 750; }
.pl-grid td.c.in.dflt { color: var(--text3); font-weight: 450; }
.pl-grid td.c.pv { background: color-mix(in srgb, var(--lc) calc(var(--h, 0) * 26%), transparent); cursor: cell; }
.pl-grid td.c.pv.pin { position: relative; border: solid var(--surface); border-width: 3px 2px; border-radius: 8px; box-shadow: inset 0 0 0 1.5px var(--lc); font-weight: 700; color: var(--text); overflow: visible; }
.pl-grid td.c.pv.pin::before { content: ''; position: absolute; left: 4px; top: 4px; width: 5px; height: 5px; border-radius: 50%; background: var(--lc); }
.pl-grid td.c.ed:not(.in):not(.pin):hover { box-shadow: inset 0 0 0 1px var(--line2); }
.pl-grid td.c.past { color: var(--text3); }
.pl-grid td.c.pv.past { opacity: .55; }
.pl-grid td.c.neg { color: var(--bad); font-weight: 700; }
.pl-grid tr.fc .lname { font-style: italic; }
.pl-grid tr.fc td.c.pv { background-image: repeating-linear-gradient(135deg, color-mix(in srgb, var(--lc) 14%, transparent) 0 3px, transparent 3px 7px); }
.pl-grid td.sel { background: color-mix(in srgb, var(--accent) 16%, var(--surface)) !important; }
.pl-grid td.act { outline: 2px solid var(--accent); outline-offset: -2px; }
.gap { display: inline-block; margin-left: 5px; padding: 0 5px; border-radius: 6px; font-size: 11px; font-weight: 700; line-height: 17px; }
.gap.neg { background: var(--bad-soft); color: var(--bad); }
.gap.warn { background: var(--warn-soft); color: var(--warn); }
.pl-grid tr.addr td { height: 34px; box-shadow: inset 0 -1px var(--line); }
.addl { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 8px; border-radius: 8px; color: var(--accent); font-weight: 600; font-size: 12.5px; }
.addl:hover { background: var(--accent-soft); }
.pl-grid tr.brk td { height: 24px; padding: 0 2px; vertical-align: bottom; }
.pl-grid tr.brk td.lab { background: var(--surface); }
.bk button { width: 100%; height: 19px; display: inline-flex; align-items: center; justify-content: center; gap: 5px; border-radius: 7px 7px 2px 2px; background: var(--accent-soft); box-shadow: inset 0 0 0 1px var(--accent-line), inset 0 -2px var(--accent); color: var(--accent); font-size: 11px; font-weight: 750; }
.bk button:hover { background: color-mix(in srgb, var(--accent) 20%, transparent); }
.bk .neg, .bk .warn { font-size: 10.5px; }
.pl-input { position: absolute; z-index: 6; border: 2px solid var(--accent); border-radius: 8px; padding: 0 7px; text-align: right; background: var(--surface); color: var(--text); font-weight: 650; font-variant-numeric: tabular-nums; outline: none; box-shadow: 0 10px 24px -8px rgba(31, 122, 87, .45); }
.pl-status { flex: none; display: flex; align-items: center; gap: 12px; height: 36px; padding: 0 16px; box-shadow: inset 0 1px var(--line); font-size: 12.5px; color: var(--text2); white-space: nowrap; overflow: hidden; }
.pl-status .v { font-weight: 750; color: var(--text); font-variant-numeric: tabular-nums; }
.pl-side { border-radius: var(--r-card); background: var(--glass); border: 1px solid var(--glass-b); box-shadow: var(--sh-glass); padding: 18px 16px; overflow: auto; display: flex; flex-direction: column; gap: 14px; min-height: 0; }
.sx-head { display: flex; align-items: center; gap: 8px; }
.sx-head h2 { font-size: 18px; font-weight: 760; }
.scnote { margin: -6px 0 0; font-size: 12.5px; color: var(--text2); line-height: 1.5; white-space: pre-wrap; }
.hero { display: flex; align-items: center; justify-content: space-between; padding: 12px 14px 12px 16px; border-radius: 16px; background: var(--surface); box-shadow: var(--sh1); }
.hero b { font-size: 30px; font-weight: 800; letter-spacing: -.03em; display: block; line-height: 1.1; }
.hero span { font-size: 12px; color: var(--text3); }
.hero.good b { color: var(--accent); } .hero.warn b { color: var(--warn); }
.ring { width: 46px; height: 46px; transform: rotate(-90deg); }
.ring circle { fill: none; stroke: var(--soft); stroke-width: 4; }
.ring .v { stroke: var(--accent); stroke-linecap: round; }
.hero.warn .ring .v { stroke: var(--warn); }
.kv { display: grid; grid-template-columns: 1fr auto; gap: 9px 10px; margin: 0; font-size: 12.5px; }
.kv dt { color: var(--text2); }
.kv dd { margin: 0; text-align: right; font-weight: 650; font-variant-numeric: tabular-nums; }
.kv small { color: var(--text3); font-weight: 500; }
.dlt { margin-left: 6px; font-size: 11px; font-weight: 700; padding: 1px 5px; border-radius: 5px; background: var(--soft); color: var(--text2); }
.dlt.good { background: var(--accent-soft); color: var(--accent); } .dlt.bad { background: var(--bad-soft); color: var(--bad); }
.fld { display: grid; gap: 5px; font-size: 12px; color: var(--text3); font-weight: 600; }
.fld select { height: 34px; }
.sx-rule { display: grid; gap: 10px; padding-top: 12px; box-shadow: inset 0 1px var(--line); }
.sx-rule .btn { justify-self: start; }

/* ---------------------------------------------------------------- month */
.mo { display: grid; gap: 0; }
.mstrip { display: flex; gap: 6px; overflow-x: auto; padding: 2px 2px 8px; scrollbar-width: thin; }
.mchip { flex: none; min-width: 62px; height: 58px; display: grid; grid-template-rows: auto auto 4px; align-content: center; gap: 2px; padding: 6px 10px 7px; border-radius: 15px; background: var(--glass); border: 1px solid var(--glass-b); text-align: left; transition: transform .18s var(--spring), box-shadow .18s; }
.mchip:hover { transform: translateY(-2px); }
.mchip .mn { font-size: 11.5px; font-weight: 650; color: var(--text2); display: flex; gap: 4px; align-items: baseline; }
.mchip .mn small { font-size: 10px; color: var(--text3); font-weight: 500; }
.mchip b { font-size: 16px; font-weight: 760; line-height: 1.1; min-height: 18px; font-variant-numeric: tabular-nums; }
.mchip .mb { display: flex; height: 4px; border-radius: 2px; background: var(--soft); overflow: hidden; }
.mchip .mb i { display: block; height: 100%; }
.mchip .mb .d { background: var(--accent); } .mchip .mb .r { background: #7cba4a; }
.mchip.on { background: var(--surface); box-shadow: var(--sh2), inset 0 0 0 1.5px var(--accent); border-color: transparent; }
.mchip.cur .mn::after { content: ''; width: 5px; height: 5px; border-radius: 50%; background: var(--warm); align-self: center; }
.mchip.all, .mchip.none { min-width: 70px; }
.msep { flex: none; width: 1px; margin: 8px 4px; background: var(--line2); }
.mhead { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin: 14px 2px 12px; }
.mtitle { display: grid; gap: 2px; }
.mtitle h2 { font-size: 27px; font-weight: 780; letter-spacing: -.03em; }
.mtiles { display: flex; gap: 8px; flex-wrap: wrap; }
.mt { min-width: 84px; padding: 8px 12px 9px; border-radius: 14px; background: var(--surface); box-shadow: var(--sh1); text-align: left; display: grid; gap: 1px; transition: transform .16s var(--spring), box-shadow .16s; }
.mt[data-act]:hover { transform: translateY(-2px); box-shadow: var(--sh2); }
.mt b { font-size: 20px; font-weight: 760; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.mt span { font-size: 11.5px; color: var(--text3); white-space: nowrap; }
.mt.good b { color: var(--accent); } .mt.warn b { color: var(--warn); } .mt.bad b { color: var(--bad); } .mt.muted b { color: var(--text2); }
.mt.on { box-shadow: inset 0 0 0 2px var(--accent), var(--sh1); }
.batt { display: flex; gap: 2px; height: 30px; border-radius: 11px; overflow: hidden; margin: 0 2px; }
.bseg { min-width: 24px; background: var(--st); color: var(--stx); font-size: 12px; font-weight: 700; display: grid; place-items: center; transition: filter .15s, flex .4s var(--ease); }
.bseg:hover { filter: brightness(1.08); }
.batt:has(.bseg.on) .bseg:not(.on) { filter: saturate(.25) opacity(.45); }
.blegend { display: flex; gap: 4px 16px; flex-wrap: wrap; margin: 9px 4px 0; }
.bl { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text2); padding: 2px 0; }
.bl i { width: 9px; height: 9px; border-radius: 3px; background: var(--st); }
.bl b { color: var(--text); font-variant-numeric: tabular-nums; }
.bl.on { color: var(--text); font-weight: 700; text-decoration: underline; text-underline-offset: 4px; }
.mbar { display: flex; align-items: center; gap: 10px; margin: 16px 2px 10px; flex-wrap: wrap; }
.vtabs { display: inline-flex; gap: 2px; padding: 3px; border-radius: 13px; background: var(--glass); border: 1px solid var(--glass-b); }
.vtabs button { display: inline-flex; align-items: center; gap: 7px; height: 32px; padding: 0 13px; border-radius: 10px; color: var(--text2); font-weight: 600; }
.vtabs button:hover { color: var(--text); }
.vtabs button.on { background: var(--surface); color: var(--text); box-shadow: var(--sh1); }
.vtabs button.on .ic { color: var(--accent); }
.tcard { background: var(--surface); border-radius: 18px; box-shadow: var(--sh1); overflow: hidden; }
.tcard.flat { box-shadow: none; border-radius: 12px; }
.ktable { width: 100%; border-collapse: separate; border-spacing: 0; font-variant-numeric: tabular-nums; }
.ktable th { height: 36px; padding: 0 10px; text-align: left; font-size: 11.5px; font-weight: 650; color: var(--text3); box-shadow: inset 0 -1px var(--line2); background: var(--surface); position: sticky; top: 0; z-index: 1; }
.ktable td { height: 42px; padding: 0 10px; box-shadow: inset 0 -1px var(--line); }
.ktable .num { text-align: right; }
.ktable .ck { width: 40px; text-align: center; padding: 0; }
.ktable .fl { width: 56px; }
.ktable input[type=checkbox] { width: 16px; height: 16px; accent-color: var(--accent); cursor: pointer; vertical-align: middle; }
.ktable .gh td { height: 46px; background: var(--surface2); }
.ghd { display: flex; align-items: center; gap: 10px; }
.ghd b { font-size: 13.5px; }
.ghd .pm { box-shadow: none; background: transparent; }
.ghd .mini { display: flex; gap: 1px; width: 140px; height: 8px; border-radius: 4px; overflow: hidden; background: var(--soft); }
.ghd .mini i { background: var(--st); }
.wk { color: var(--text3); }
.kr td { transition: background .12s; }
.kr:hover td { background: color-mix(in srgb, var(--soft) 60%, transparent); }
.kr.picked td { background: var(--accent-soft); }
.kr.open td { background: color-mix(in srgb, var(--accent) 7%, transparent); }
.kr.open td:first-child { box-shadow: inset 3px 0 var(--accent), inset 0 -1px var(--line); }
.kno { font-weight: 750; font-size: 13.5px; padding: 3px 6px; margin-left: -6px; border-radius: 7px; }
.kno:hover { background: var(--soft); color: var(--accent); }
.cellbtn { height: 30px; padding: 0 9px; margin-left: -9px; border-radius: 8px; font-size: 12.5px; white-space: nowrap; }
.cellbtn:hover { background: var(--soft); }
.cellbtn.empty { color: var(--text3); box-shadow: inset 0 0 0 1px var(--line2); border-style: dashed; }
.truck { display: inline-flex; align-items: center; gap: 5px; height: 26px; padding: 0 9px; border-radius: 8px; background: var(--accent-soft); color: var(--accent); font-weight: 700; font-size: 12px; }
.truck.bad { background: var(--bad-soft); color: var(--bad); }
.truck.none { background: var(--warn-soft); color: var(--warn); }
.board { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(150px, 1fr); gap: 10px; overflow-x: auto; align-items: start; padding-bottom: 6px; }
.lane { border-radius: 18px; background: var(--glass); border: 1px solid var(--glass-b); padding: 10px; min-height: 240px; transition: background .15s, box-shadow .15s; }
.lane header { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.lane header .spill { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.lane header b { color: var(--text2); font-size: 13px; font-variant-numeric: tabular-nums; }
.lane.dropok { background: var(--accent-soft); box-shadow: inset 0 0 0 2px var(--accent-line); }
.cards { display: flex; flex-direction: column; gap: 7px; margin-top: 10px; }
.kcard { padding: 9px 11px; border-radius: 13px; background: var(--surface); box-shadow: var(--sh1); cursor: grab; display: grid; gap: 5px; touch-action: none; transition: transform .2s var(--spring), box-shadow .2s; }
.kcard:hover { transform: translateY(-2px); box-shadow: var(--sh2); }
.kcard.picked { box-shadow: inset 0 0 0 2px var(--accent), var(--sh1); }
.kt { display: flex; align-items: center; gap: 7px; }
.kt b { font-size: 14px; font-weight: 760; }
.kt .flag { margin-left: auto; }
.kb { display: flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--text3); min-width: 0; }
.kb .ln { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kd { display: inline-flex; align-items: center; gap: 3px; white-space: nowrap; color: var(--text2); font-weight: 600; }
.morek { width: 100%; height: 32px; border-radius: 10px; font-size: 12.5px; color: var(--text2); font-weight: 600; }
.morek:hover { background: var(--surface); }
.cal { display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 12px; align-items: start; }
.tray { position: sticky; top: 0; border-radius: 18px; background: var(--glass); border: 1px solid var(--glass-b); padding: 12px; display: grid; gap: 10px; transition: background .15s; }
.tray header { display: flex; justify-content: space-between; align-items: baseline; }
.tray.dropok { background: var(--accent-soft); }
.tchips { display: flex; flex-wrap: wrap; gap: 5px; max-height: 52vh; overflow: auto; }
.tray .sm { font-size: 12px; margin: 0; }
.cgridw { background: var(--surface); border-radius: 18px; box-shadow: var(--sh1); overflow: hidden; }
.cwk { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); font-size: 11.5px; font-weight: 650; color: var(--text3); box-shadow: inset 0 -1px var(--line2); }
.cwk span { padding: 9px 10px; }
.calg { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.calg > .cd { min-height: 124px; }
.calg > .cd.past:not(:has(.kc)), .calg > .cd.out { min-height: 56px; }
.cd { padding: 7px; display: flex; flex-direction: column; gap: 4px; box-shadow: inset -1px -1px var(--line); min-width: 0; transition: background .15s; }
.cd.off { background: var(--surface2); }
.cd.out { background: repeating-linear-gradient(135deg, transparent 0 6px, var(--line) 6px 7px); }
.cd.past .cdh b { color: var(--text3); }
.cd.dropok { background: var(--accent-soft); box-shadow: inset 0 0 0 2px var(--accent-line); }
.cdh { display: flex; align-items: center; justify-content: space-between; font-size: 12.5px; }
.cdh b { font-weight: 700; min-width: 22px; height: 22px; display: inline-grid; place-items: center; border-radius: 999px; }
.cd.today .cdh b { background: var(--accent); color: #fff; padding: 0 6px; }
.ld { font-size: 11px; font-weight: 700; color: var(--text3); font-variant-numeric: tabular-nums; }
.ld.full { color: var(--warn); } .ld.over { color: var(--bad); }
.trks { display: grid; gap: 3px; }
.trk { display: flex; align-items: center; gap: 3px; min-height: 20px; }
.tn { display: inline-flex; align-items: center; gap: 1px; width: 26px; flex: none; font-size: 10px; color: var(--text3); font-weight: 650; }
.trk.used .tn { color: var(--accent); }
.seat { flex: 1; max-width: 36px; height: 18px; border-radius: 6px; box-shadow: inset 0 0 0 1px var(--line2); background: repeating-linear-gradient(135deg, transparent 0 4px, var(--line) 4px 5px); }
.loose { display: flex; flex-wrap: wrap; gap: 3px; padding-top: 2px; }
.kc { display: inline-flex; align-items: center; justify-content: center; flex: 1; max-width: 36px; min-width: 30px; height: 18px; padding: 0 3px; border-radius: 6px; background: var(--st); color: var(--stx); font-size: 10.5px; font-weight: 700; cursor: grab; touch-action: none; transition: transform .15s var(--spring); }
.kc:hover { transform: scale(1.1); }
.kc.hollow { background: transparent; color: color-mix(in srgb, var(--st) 75%, var(--text)); box-shadow: inset 0 0 0 1.5px var(--st); }
.kc.dim { opacity: .3; }
.kc.picked { outline: 2px solid var(--accent); outline-offset: 1px; }
.tchips .kc { flex: none; width: 40px; max-width: none; height: 22px; font-size: 11px; }

/* ---------------------------------------------------------------- busway */
.su { display: grid; gap: 12px; }
.sgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.bk4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-bottom: 8px; }
.bk4 > div { padding: 10px 12px; border-radius: 14px; background: var(--surface2); display: grid; gap: 1px; min-width: 0; }
.bk4 b { font-size: 20px; font-weight: 760; letter-spacing: -.02em; white-space: nowrap; }
.bk4 span { font-size: 11.5px; color: var(--text3); }
.bk4 .bad b { color: var(--bad); } .bk4 .good b { color: var(--accent); }
.rtable td { height: 44px; }
.cin { height: 32px; padding: 0 9px; border-radius: 9px; border: 1px solid transparent; background: var(--inbg); outline: none; box-shadow: inset 0 0 0 1px var(--inline); transition: box-shadow .15s; }
.cin:hover { box-shadow: inset 0 0 0 1px var(--line2); }
.cin:focus { box-shadow: inset 0 0 0 2px var(--accent); }
.cin.num { width: 86px; text-align: right; font-variant-numeric: tabular-nums; }
.cin.txt { width: 100%; min-width: 160px; }
.ktable .addrow td { height: 42px; }

/* ---------------------------------------------------------------- setup */
.setup { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.setup .wide { grid-column: 1 / -1; }
.brow { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.brow label.btn { cursor: pointer; }
.rules { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; }
.rules label { display: grid; gap: 6px; font-size: 12.5px; color: var(--text2); font-weight: 600; }
.rules label > span { display: flex; align-items: center; gap: 6px; }
.rules .suf { display: flex; align-items: center; gap: 8px; color: var(--text3); font-weight: 500; }
.rules .suf input { width: 80px; }
.sublab { display: block; margin: 14px 0 8px; }
.days { display: flex; gap: 6px; flex-wrap: wrap; }
.dchip { height: 34px; min-width: 52px; padding: 0 10px; border-radius: 10px; background: var(--soft); color: var(--text3); font-weight: 650; transition: background .15s, color .15s; }
.dchip.on { background: var(--accent); color: #fff; }
.vers { display: grid; gap: 2px; }
.vrow { display: flex; align-items: center; gap: 12px; padding: 8px 10px; border-radius: 10px; font-size: 13px; }
.vrow:hover { background: var(--soft); }

@keyframes rise { from { opacity: 0; transform: translateY(6px) scale(.98); } }
@keyframes fade { from { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } .page { scroll-behavior: auto; } }

/* ---------------------------------------------------------------- narrower screens */
@media (max-width: 1280px) {
  .hero4 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .hero4 .focal { grid-row: span 2; }
  .c8, .c7, .c5, .c4 { grid-column: span 12; }
  .pl-main.wp { grid-template-columns: minmax(0, 1fr) 260px; }
}
@media (max-width: 1000px) {
  .app { grid-template-columns: 64px minmax(0, 1fr); }
  .bname, .nav span, .proj span { display: none; }
  .nav { justify-content: center; padding: 0; }
  .brand { justify-content: center; padding: 2px 0 16px; }
  .proj { justify-content: center; }
  .tsub { display: none; }
  .pl-main.wp { grid-template-columns: minmax(0, 1fr); }
  .pl-main.wp .pl-side { display: none; }
  .sgrid, .setup { grid-template-columns: minmax(0, 1fr); }
  .cal { grid-template-columns: minmax(0, 1fr); }
  .tray { position: static; }
}
@media (max-width: 640px) {
  body { overflow: auto; }
  .app { display: block; height: auto; padding: 8px 8px 84px; }
  .side { position: fixed; z-index: 30; left: 8px; right: 8px; bottom: 8px; flex-direction: row; padding: 6px; border-radius: 20px; }
  .brand, .proj, .side > .grow { display: none; }
  .navs { display: flex; flex: 1; justify-content: space-around; }
  .nav { width: 48px; }
  .main { gap: 8px; }
  .top { height: 54px; padding: 0 8px 0 14px; }
  .find { display: none; }
  .page { overflow: visible; padding-bottom: 20px; }
  body[data-page="plan"] .page { height: calc(100vh - 160px); }
  .hero4 { grid-template-columns: 1fr 1fr; }
  .hero4 .focal { grid-column: span 2; grid-row: auto; }
  .bk4 { grid-template-columns: 1fr 1fr; }
  .orow { grid-template-columns: minmax(0, 1fr) 70px; }
  .orow .obar, .orow .owin, .orow > :last-child { display: none; }
  .ktable .fl, .ktable th:nth-last-child(2), .ktable td:nth-last-child(2) { display: none; }
}
@media print {
  body { overflow: visible; background: #fff; }
  .ground, .side, .top, .ovtop .btn, .selbar, .toast, .drawer { display: none !important; }
  .app { display: block; height: auto; padding: 0; }
  .page { overflow: visible; }
  .card, .tile { box-shadow: 0 0 0 1px #ddd; break-inside: avoid; }
}
.pl-side > * { flex: none; }
