/* AX Board. Dark ground, lime accent, square-ish (radius <= 3px). Breakpoint 900px. */
:root {
  --bg: #0c0e12;
  --panel: #13161c;
  --rule: #232832;
  --rule2: #2c323d;
  --grid: #1e232b;
  --grid2: #1b1f26;
  --ink: #eef1f5;
  --ink2: #a9b1bd;
  --ink3: #7d8693;
  --gray: #5a616c;
  --acc: #c8f03c;
  --warn: #ffb547;
  --bad: #ff7a59;
  --info: #7aa7ff;
  --sans: 'IBM Plex Sans KR', 'Malgun Gothic', 'Apple SD Gothic Neo', system-ui, sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, Consolas, monospace;
  --disp: 'Space Grotesk', 'IBM Plex Sans KR', sans-serif;
  --tap: 32px;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--sans); font-size: 13px; line-height: 1.55; overflow-x: hidden; }
a { color: var(--ink2); text-underline-offset: 2px; }
a:hover { color: var(--ink); }
h1 { margin: 0; font-family: var(--disp); font-size: 26px; font-weight: 600; letter-spacing: -0.01em; }
h2 { margin: 0; font-size: 15px; font-weight: 700; }
p { margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--acc); outline-offset: 2px; }
[hidden] { display: none !important; }

/* text helpers */
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.small { font-size: 12px; }
.dim { color: var(--ink3); }
.dim2 { color: var(--ink2); }
.ink { color: var(--ink); }
.acc-t { color: var(--acc); }
.warn-t { color: var(--warn); }
.bad-t { color: var(--bad); }
.info-t { color: var(--info); }
.strong { font-weight: 600; }
.lab { font-family: var(--mono); font-size: 11px; letter-spacing: .08em; color: var(--ink3); text-transform: uppercase; }
.lab.warn-t { color: var(--warn); }
.lab-n { font-family: var(--mono); font-size: 11px; color: var(--ink3); white-space: nowrap; }
.sr { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.empty { color: var(--ink3); font-size: 12px; padding: 10px 0; }
.loading { padding: 32px; }
.grow { flex: 1 1 auto; min-width: 0; }
.clamp { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.self-start { align-self: flex-start; }
.wrap { white-space: normal !important; min-width: 160px; }
.c { text-align: center; }
.r { text-align: right; }
.stack, .stack-xs, .stack-s, .stack-l { display: flex; flex-direction: column; min-width: 0; }
.stack { gap: 10px; } .stack-xs { gap: 2px; } .stack-s { gap: 8px; } .stack-l { gap: 26px; }
.pc-only { }
.mobile-only { display: none !important; }

/* controls */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; font-size: 12px; color: var(--ink); background: transparent; border: 1px solid var(--rule2); border-radius: 3px; padding: 6px 12px; min-height: var(--tap); cursor: pointer; text-decoration: none; white-space: nowrap; }
.btn:hover { border-color: var(--ink3); color: var(--ink); }
.btn:disabled { opacity: .5; cursor: default; }
.btn.pri { background: var(--acc); border-color: var(--acc); color: var(--bg); font-weight: 600; }
.btn.pri:hover { filter: brightness(1.06); }
.btn.sm { padding: 3px 8px; min-height: 26px; font-size: 12px; }
.btn.danger { color: var(--bad); border-color: rgba(255, 122, 89, .5); }
.linkbtn { background: none; border: 0; padding: 4px 0; color: var(--ink2); text-decoration: underline; text-underline-offset: 2px; cursor: pointer; font-size: 12px; min-height: var(--tap); }
.linkbtn:hover { color: var(--ink); }
.push { margin-left: auto; }
.inp, .sel { font-size: 12px; color: var(--ink); background: var(--panel); border: 1px solid var(--rule2); border-radius: 3px; padding: 6px 8px; min-height: var(--tap); min-width: 0; }
textarea.inp { resize: vertical; line-height: 1.5; font-size: 13px; }
.inp-line { flex: 1; min-width: 0; color: var(--ink); background: transparent; border: 0; border-bottom: 1px solid var(--rule2); padding: 6px 2px; min-height: var(--tap); }
.inp-line.dashed { border-bottom-style: dashed; }
.chk { display: flex; gap: 6px; align-items: center; color: var(--ink2); white-space: nowrap; min-height: var(--tap); cursor: pointer; }
.chk input { width: 16px; height: 16px; accent-color: var(--acc); }
input[type=date] { color-scheme: dark; }
.btns2, .btns3 { display: flex; gap: 6px; flex-wrap: wrap; }
.btns-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

/* login */
.login { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px 16px; }
.login-box { width: 100%; max-width: 380px; display: flex; flex-direction: column; gap: 14px; padding: 28px 24px; border: 1px solid var(--rule); border-radius: 3px; background: var(--panel); }
.login-box .brand { font-family: var(--disp); font-size: 20px; font-weight: 700; }
.login-box h1 { font-size: 22px; }
.login-box .inp { font-size: 14px; padding: 10px; min-height: 44px; }
.login-box .btn { min-height: 44px; font-size: 13px; }

/* shell */
.shell { display: flex; min-height: 100vh; }
.topbar { display: none; }
.side { width: 220px; flex-shrink: 0; padding: 24px 16px; border-right: 1px solid var(--rule); display: flex; flex-direction: column; gap: 4px; position: sticky; top: 0; height: 100vh; overflow-y: auto; background: var(--bg); }
.side-brand { font-family: var(--disp); font-size: 20px; font-weight: 700; padding: 0 10px 20px; display: flex; justify-content: space-between; align-items: center; }
.side-close { display: none; }
.nav-list { display: flex; flex-direction: column; gap: 4px; }
.nav-a { display: flex; justify-content: space-between; align-items: center; padding: 9px 10px; text-decoration: none; border-radius: 3px; color: var(--ink2); }
.nav-a:hover { color: var(--ink); background: var(--panel); }
.nav-a.on { color: var(--bg); background: var(--acc); font-weight: 600; }
.nav-a.on .nav-n { color: var(--bg) !important; }
.nav-n { color: var(--ink3); font-size: 12px; }
.side-foot { margin-top: auto; padding: 10px; border-top: 1px solid var(--rule); display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.side-foot .small { word-break: break-all; }
.backdrop { position: fixed; inset: 0; background: rgba(0, 0, 0, .55); z-index: 40; }
main { flex: 1; min-width: 0; padding: 28px 32px 48px; outline: none; }
.page { display: flex; flex-direction: column; gap: 20px; min-width: 0; max-width: 1560px; }
.page-h { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; border-bottom: 1px solid var(--rule); padding-bottom: 16px; flex-wrap: wrap; }
.sh { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding-bottom: 6px; }
.errbox { border: 1px solid var(--bad); border-radius: 3px; padding: 16px; display: flex; flex-direction: column; gap: 10px; align-items: flex-start; max-width: 640px; }
.d-ctl { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.d-title { font-size: 19px; overflow-wrap: anywhere; }
.back { align-self: flex-start; }
.note { color: var(--ink2); white-space: pre-wrap; overflow-wrap: anywhere; }
ul.plain { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 4px; }
.kv { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 4px 14px; margin: 0; }
.kv dt { color: var(--ink3); font-family: var(--mono); font-size: 11.5px; }
.kv dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }

/* rows */
.row { display: flex; gap: 12px; align-items: baseline; padding: 10px 0; border-bottom: 1px solid var(--rule); min-width: 0; }
.row.top-rule { border-top: 1px solid var(--rule); }
.link-row { text-decoration: none; color: var(--ink); }
.link-row:hover { background: var(--panel); }
.t-time { width: 82px; flex-shrink: 0; font-size: 12px; }
.t-kind { width: 70px; flex-shrink: 0; font-size: 12px; }
.t-src { width: 40px; flex-shrink: 0; font-size: 12px; }

/* home */
.home-h { align-items: flex-end; }
.tell { display: flex; gap: 8px; align-items: center; }
.tell .inp { width: 320px; font-size: 13px; padding: 8px 10px; }
.h2-label { font-size: 15px; font-weight: 700; }
.home-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 32px; }
.brief { white-space: pre-wrap; color: var(--ink2); }
.decs { display: flex; flex-direction: column; }
.dec { padding: 12px 0; border-top: 1px solid var(--rule); display: flex; flex-direction: column; gap: 6px; }
.dec:last-child { border-bottom: 1px solid var(--rule); }
.dec .btns3 { margin-top: 2px; }

/* jobs */
.job { display: flex; flex-direction: column; gap: 6px; padding: 12px; background: var(--panel); border: 1px solid var(--rule); border-radius: 3px; min-width: 0; }
.job.bad { border-color: var(--bad); }
.job.warn { border-color: var(--warn); }
.job-h, .job-f { display: flex; justify-content: space-between; gap: 10px; align-items: center; flex-wrap: wrap; }
.job-f { color: var(--ink2); font-size: 12px; }
.pbar { height: 6px; background: var(--rule); border-radius: 2px; overflow: hidden; }
.pbar > div { height: 6px; background: var(--acc); border-radius: 2px; }
.job.bad .pbar > div { background: var(--bad); }
.job.warn .pbar > div { background: var(--warn); }
.jobgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); gap: 12px; }
.snap { border: 1px solid var(--rule); border-radius: 3px; padding: 14px; min-width: 0; }

/* tasks */
.tasks-h { align-items: center; border-bottom: 0; padding-bottom: 0; }
.tasks-h h1 { font-size: 24px; }
.filters { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.filters .inp { width: 180px; }
.addbar { display: flex; gap: 10px; align-items: center; padding: 8px 12px; background: var(--panel); border: 1px solid var(--rule); border-radius: 3px; }
.tasks-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(380px, 520px); gap: 28px; align-items: start; }
.board { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; align-content: start; }
.col { display: flex; flex-direction: column; min-width: 0; }
.colh { display: flex; justify-content: space-between; align-items: center; padding-bottom: 8px; border-bottom: 1px solid var(--rule2); font-weight: 700; }
.item { padding: 11px 8px; margin: 0 -8px; border-bottom: 1px solid var(--rule); display: flex; flex-direction: column; gap: 5px; text-decoration: none; color: var(--ink); border-radius: 3px; overflow-wrap: anywhere; }
.item:hover { background: var(--panel); color: var(--ink); }
.item.sel { background: var(--panel); }
.meta { display: flex; gap: 10px; flex-wrap: wrap; font-family: var(--mono); font-size: 11px; color: var(--ink3); }
.more-m { display: none; }
.closed { margin-top: 22px; display: flex; gap: 16px; align-items: center; flex-wrap: wrap; color: var(--ink3); }
.closed-list { margin-top: 6px; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); column-gap: 24px; }
.detail { border-left: 1px solid var(--rule); padding-left: 24px; display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.draftbox { display: flex; flex-direction: column; gap: 8px; padding: 14px; border: 1px solid var(--warn); border-radius: 3px; }
.draftbox a { color: var(--ink); text-decoration: none; }
.wbsbox { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 12px; border: 1px solid var(--rule2); border-radius: 3px; }
.wbsbox.ok { border-color: var(--acc); }
.wbsbox.warn { border-color: var(--warn); }
.memo { border-top: 1px solid var(--rule); padding-top: 12px; }
.cmt { color: var(--ink2); white-space: pre-wrap; overflow-wrap: anywhere; }
.cmt b { color: var(--ink); }
.cmt-form { display: flex; gap: 8px; align-items: center; }

/* waterfall */
.gscroll { overflow-x: auto; min-width: 0; position: relative; }
.gantt { display: grid; grid-template-columns: 170px minmax(calc(var(--cols) * 26px), 1fr); }
.g-left { position: sticky; left: 0; z-index: 2; background: var(--bg); }
.g-head { height: 34px; border-bottom: 1px solid var(--rule2); display: flex; align-items: flex-end; padding-bottom: 6px; }
.g-right { position: relative; min-width: 0; }
.g-lines { position: absolute; inset: 0; display: grid; pointer-events: none; }
.g-lines > div { border-left: 1px solid var(--grid); }
.g-lines > div.wk { border-left: 2px solid var(--rule2); }
.today-line { position: absolute; top: 0; bottom: 0; width: 2px; margin-left: -1px; background: var(--info); z-index: 1; pointer-events: none; }
.g-days { display: grid; position: relative; padding-bottom: 0; align-items: stretch; }
.dl { font-family: var(--mono); font-size: 10.5px; color: var(--ink3); padding: 3px 0 0 4px; line-height: 1.35; white-space: nowrap; overflow: hidden; }
.dl.today-t { color: var(--info); }
.gn { height: 30px; display: flex; align-items: center; gap: 4px; font-size: 12px; white-space: nowrap; overflow: hidden; border-bottom: 1px solid var(--grid2); padding-right: 6px; }
.gn.ph { font-family: var(--mono); font-size: 11px; color: var(--ink3); }
.gn .who { margin-left: 4px; }
.gt { position: relative; height: 30px; border-bottom: 1px solid var(--grid2); }
.nodate { position: absolute; left: 6px; top: 7px; font-size: 11px; color: var(--ink3); }
.bar { position: absolute; top: 8px; height: 14px; border-radius: 2px; z-index: 1; }
.b-done { background: var(--acc); }
.b-prog { background: linear-gradient(90deg, var(--acc) 0 var(--p, 50%), rgba(200, 240, 60, .22) var(--p, 50%) 100%); }
.b-block { background: rgba(255, 181, 71, .22); border: 1px solid var(--warn); }
.b-wait { background: var(--panel); border: 1px solid var(--gray); }
.b-ph { top: 13px; height: 4px; background: var(--ink3); border-radius: 1px; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; color: var(--ink2); }
.lg { display: inline-block; width: 14px; height: 8px; border-radius: 2px; vertical-align: 0; }
.lg.lg-today { width: 2px; height: 10px; background: var(--info); }

/* tables */
.tscroll { overflow-x: auto; min-width: 0; max-width: 100%; position: relative; }
.t { border-collapse: collapse; width: 100%; }
.t th { padding: 0 10px 8px; text-align: left; font-family: var(--mono); font-size: 10.5px; font-weight: 500; color: var(--ink3); border-bottom: 1px solid var(--rule2); white-space: nowrap; }
.t th.c { text-align: center; }
.t td { padding: 8px 10px; border-bottom: 1px solid var(--rule); white-space: nowrap; vertical-align: middle; }
.t .ph-row td { color: var(--ink3); font-weight: 600; }
.t .sel { min-height: 28px; padding: 3px 6px; }
.num-inp { width: 70px; }
.conf-row { background: rgba(255, 181, 71, .08); }
.sq { display: inline-block; width: 9px; height: 9px; border-radius: 2px; vertical-align: 0; }

/* mail */
.mail-grid { display: grid; grid-template-columns: minmax(280px, 360px) minmax(0, 1fr); gap: 28px; align-items: start; }
.newmail { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.newmail .inp { flex: 1; min-width: 160px; }
.threads { display: flex; flex-direction: column; border-top: 1px solid var(--rule); }
.thread { display: flex; flex-direction: column; gap: 4px; padding: 10px 8px; border-bottom: 1px solid var(--rule); text-decoration: none; color: var(--ink); border-radius: 3px; min-width: 0; }
.thread:hover, .thread.sel { background: var(--panel); color: var(--ink); }
.th-top { display: flex; gap: 8px; justify-content: space-between; min-width: 0; }
.urgent { flex-shrink: 0; font-weight: 600; }
.mail-view { border-left: 1px solid var(--rule); padding-left: 24px; display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.msgs { display: flex; flex-direction: column; }
.msg { padding: 12px 0; border-top: 1px solid var(--rule); display: flex; flex-direction: column; gap: 6px; }
.msg:last-child { border-bottom: 1px solid var(--rule); }
.msg-h { display: flex; justify-content: space-between; gap: 10px; }
.msg-b { white-space: pre-wrap; overflow-wrap: anywhere; }
.msg.mine .msg-b { color: var(--ink2); }
.attach { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

/* missed */
.missed-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px; }
.mrow { display: flex; gap: 12px; padding: 12px 0; border-top: 1px solid var(--rule); align-items: flex-start; }
.mrow:last-child { border-bottom: 1px solid var(--rule); }
.mrow b { overflow-wrap: anywhere; }
.mrow .btns3 { flex-shrink: 0; }

/* subs */
.sumgrid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); border: 1px solid var(--rule); }
.sum { padding: 14px 16px; border-right: 1px solid var(--rule); display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.sum:last-child { border-right: 0; }
.sum-l { display: flex; gap: 6px; align-items: center; color: var(--ink2); }
.big { font-family: var(--disp); font-size: 28px; font-weight: 600; line-height: 1.2; }
.big small { font-size: 12px; color: var(--ink3); font-weight: 400; }
.subs-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 28px; align-items: start; }
.subs-col { display: flex; flex-direction: column; gap: 28px; min-width: 0; }
.pform { display: flex; flex-direction: column; gap: 10px; padding: 14px; border: 1px solid var(--rule2); border-radius: 3px; background: var(--panel); }
.pform label { display: flex; flex-direction: column; gap: 4px; font-size: 11.5px; color: var(--ink3); min-width: 0; }
.pform .inp, .pform .sel { background: var(--bg); }
.pgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 160px), 1fr)); gap: 8px; }
.svcs { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 180px), 1fr)); gap: 8px; }
.svc { border: 1px solid var(--rule); border-radius: 3px; padding: 8px 10px 10px; margin: 0; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.svc legend { font-size: 12px; color: var(--ink2); padding: 0 4px; }
.payform { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.payform .inp { background: var(--bg); }
.payform .inp[name=usd] { width: 90px; }
.payform .grow { flex: 1 1 140px; }
.syncbox { padding: 12px; border: 1px solid var(--rule2); border-radius: 3px; display: flex; flex-direction: column; gap: 6px; }
.conf { display: flex; flex-direction: column; gap: 6px; padding: 12px 0; border-top: 1px solid var(--rule); }

/* assets */
.rent .cell { font-size: 12px; color: var(--ink); background: transparent; border: 1px solid transparent; border-radius: 3px; padding: 4px 6px; min-height: 28px; width: 100%; }
.rent .cell:hover { border-color: var(--rule2); }
.rent .cell:focus { border-color: var(--acc); background: var(--panel); outline: none; }
.rent td { padding: 4px 6px; }
.w-l { min-width: 190px; } .w-m { min-width: 96px; } .w-s { min-width: 90px; width: 100px; } .w-xs { min-width: 64px; width: 80px; }
.linkgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 24px; }
.lrow { display: flex; gap: 10px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--rule); }
.lrow a { color: var(--ink); overflow-wrap: anywhere; }

/* toasts */
.toasts { position: fixed; right: 16px; bottom: 16px; display: flex; flex-direction: column; gap: 8px; z-index: 60; max-width: min(420px, calc(100vw - 32px)); }
.toast { padding: 10px 14px; border-radius: 3px; background: var(--panel); border: 1px solid var(--rule2); font-size: 13px; overflow-wrap: anywhere; }
.toast.ok { border-color: var(--acc); }
.toast.bad { border-color: var(--bad); color: var(--ink); }

/* ---------- narrow screens ---------- */
@media (max-width: 1180px) {
  .tasks-grid { grid-template-columns: minmax(0, 1fr); }
  .tasks-grid .detail { border-left: 0; padding-left: 0; border-top: 1px solid var(--rule); padding-top: 18px; }
  .tasks-grid:not(.has-detail) .detail .empty.pc-only { display: none; }
  .sumgrid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .sum:nth-child(3) { border-right: 0; }
  .sum:nth-child(-n+3) { border-bottom: 1px solid var(--rule); }
  .subs-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 900px) {
  :root { --tap: 44px; }
  body { font-size: 14px; }
  .pc-only { display: none !important; }
  .mobile-only { display: flex !important; }
  .shell { flex-direction: column; }
  .topbar { display: flex; justify-content: space-between; align-items: center; padding: 10px 16px; border-bottom: 1px solid var(--rule); position: sticky; top: 0; z-index: 30; background: var(--bg); }
  .topbar-t { font-family: var(--disp); font-size: 18px; font-weight: 700; }
  .side { display: none; position: fixed; top: 0; right: 0; bottom: 0; height: auto; width: min(300px, 86vw); z-index: 50; border-right: 0; border-left: 1px solid var(--rule); padding: 16px; }
  .side.open { display: flex; }
  .side-close { display: inline-flex; font-family: var(--sans); }
  .nav-a { min-height: 44px; font-size: 15px; }
  main { padding: 18px 16px 40px; }
  .page { gap: 22px; }
  h1 { font-size: 22px; }
  h2 { font-size: 16px; }
  .btn { font-size: 13px; padding: 10px 12px; }
  .btn.sm { min-height: 44px; padding: 8px 10px; }
  .inp, .sel { font-size: 14px; padding: 10px; }
  .inp-line { font-size: 14px; }
  .linkbtn { font-size: 13px; }
  .page-h { align-items: flex-start; }
  .page:not(.home) .page-h h1 { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

  .home-grid { grid-template-columns: minmax(0, 1fr); gap: 26px; }
  .home-main { display: contents; }
  .home-side { display: contents; }
  .home-grid > * > section, .home-grid > * > form { order: 5; }
  .home-main > section:first-child { order: 1; }
  .home-side > section:nth-child(1) { order: 2; }
  .home-side > section:nth-child(2) { order: 3; }
  .home-side > section:nth-child(3) { order: 4; }
  .home-grid .tell-m { order: 9; }
  .t-time { width: 74px; }
  .btns3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .btns2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dec .btns3 .btn, .btns2 .btn { width: 100%; }

  .tasks-h { flex-direction: column; align-items: stretch; }
  .filters { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .filters .lab-n { display: none; }
  .filters .inp { width: auto; grid-column: 1 / -1; }
  .addbar { flex-wrap: wrap; background: transparent; border: 0; padding: 0; }
  .addbar .lab-n { width: 100%; }
  .addbar .inp-line { flex: 1 1 200px; background: var(--panel); border: 1px solid var(--rule2); border-radius: 3px; padding: 10px; }
  .board { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  .col-0 { order: 1; } .col-2 { order: 2; } .col-1 { order: 3; }
  .colh { padding: 12px 0; }
  .col:not(.expanded) > .item:nth-of-type(n+4) { display: none; }
  .more-m { display: inline-flex; align-self: flex-start; margin: 6px 0; }
  .tasks.with-id .tasks-h, .tasks.with-id .addbar, .tasks.with-id .board-wrap { display: none; }
  .tasks-grid .detail { border-top: 0; padding-top: 0; }
  .tasks.with-id .detail { padding: 14px; background: var(--panel); border: 1px solid var(--rule); border-radius: 3px; }
  .d-ctl { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .d-ctl > * { width: 100%; }
  .tasks.with-id .detail .sel, .tasks.with-id .detail .inp { background: var(--bg); }
  .gantt { grid-template-columns: 116px minmax(calc(var(--cols) * 26px), 1fr); }
  .tasks.with-id .g-left { background: var(--panel); }
  .dl { font-size: 10px; padding-left: 2px; }

  .mail-grid { grid-template-columns: minmax(0, 1fr); }
  .mail-view { border-left: 0; padding-left: 0; }
  .mail.with-id .mail-list, .mail.with-id .page-h { display: none; }
  .mail:not(.with-id) .mail-view { display: none; }

  .missed-grid { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .mrow { flex-direction: column; }
  .mrow .btns3 { width: 100%; }

  .subs-col { display: contents; }
  .subs-grid { display: flex; flex-direction: column; align-items: stretch; gap: 24px; }
  .subs-grid > * , .subs-col > * { min-width: 0; max-width: 100%; }
  .s-checks { order: 1; } .s-pays { order: 2; } .s-seats { order: 3; } .s-sync { order: 4; }
  .payform .inp, .payform .sel { flex: 1 1 40%; }
  .payform .btn { flex: 1 1 40%; }
  .big { font-size: 24px; }
  .sum { padding: 12px; }

  .toasts { left: 16px; right: 16px; bottom: 16px; max-width: none; }
}
@media (max-width: 520px) {
  .sumgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sum { border-right: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
  .sum:nth-child(3) { border-right: 1px solid var(--rule); }
  .sum:nth-child(2n) { border-right: 0; }
  .sum:last-child { border-bottom: 0; grid-column: 1 / -1; }
  .sum:nth-child(4) { border-bottom: 1px solid var(--rule); }
}
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; } }
