:root {
  --bg: #f3f5f9;
  --panel: #ffffff;
  --ink: #0e1a2b;
  --ink-2: #33404f;
  --muted: #4a5565;
  --dim: #5b6676;
  --line: #dfe4ec;
  --line-2: #eef1f6;
  --line-3: #cdd5e1;
  --blue: #1f46c8;
  --blue-dk: #16348f;
  --blue-soft: #e8eefc;
  --navy: #0b1b3f;
  --nav-dim: #a9b6d3;
  --teal: #0b5e57;
  --teal-soft: #e2f3f0;
  --amber: #d9a21b;
  --amber-soft: #fffbef;
  --amber-line: #eed9a0;
  --amber-ink: #8a5a00;
  --warn-bg: #fff6ee;
  --warn-line: #f4cdae;
  --warn-ink: #8a3409;
  --warn-chip: #fde6d4;
  --meal: #a9bbd6;
  --minor: #d8dee8;
  --track: #eef1f6;
  --num: "DIN Alternate", "Bahnschrift", "Barlow Condensed", "Roboto Condensed", "Helvetica Neue", sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", "Source Han Sans SC", sans-serif;
  font-size: 15px;
  line-height: 1.6;
}
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--blue); }
a:hover { color: var(--blue-dk); }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.num { font-family: var(--num); font-variant-numeric: tabular-nums; }
.dim { color: var(--dim); }
::placeholder { color: #7a8494; }

/* 顶部 */
.top { position: sticky; top: 0; z-index: 20; background: var(--navy); color: #fff; }
.top-in {
  max-width: 1360px; margin: 0 auto; padding: 10px 32px;
  display: flex; flex-wrap: wrap; align-items: center; gap: 12px 32px;
}
.brand { display: flex; align-items: center; gap: 12px; color: #fff; text-decoration: none; }
.brand:hover { color: #fff; }
.mark {
  flex: none; width: 40px; height: 40px; border-radius: 50%;
  background: var(--blue); display: grid; place-items: center;
  font-weight: 900; font-size: 18px;
}
.brand-text { display: flex; flex-direction: column; line-height: 1.3; }
.brand-text b { font-size: 16px; letter-spacing: .04em; }
.brand-text small { font-size: 12px; color: var(--nav-dim); }
.nav { display: flex; flex-wrap: wrap; gap: 4px; flex-grow: 1; }
.nav a {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px;
  border-radius: 8px; color: var(--nav-dim); text-decoration: none; font-size: 15px; font-weight: 500;
}
.nav a:hover { color: #fff; background: rgba(255,255,255,.06); }
.nav a.on { color: #fff; background: rgba(255,255,255,.10); box-shadow: inset 0 -3px 0 #6e95ff; }
.top-side { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; }
.map-link { display: inline-flex; align-items: center; min-height: 44px; color: var(--nav-dim); font-size: 14px; text-decoration: none; }
.map-link:hover { color: #fff; }
.local-note {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 999px;
  background: rgba(255,255,255,.08); font-size: 13px; color: #ffd9bf; cursor: help;
}
.local-note i { width: 8px; height: 8px; border-radius: 50%; background: #ff9a52; }

/* 页面骨架 */
.view {
  max-width: 1360px; margin: 0 auto; padding: 32px 32px 72px;
  display: flex; flex-direction: column; gap: 24px;
}
.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 24px; }
.intro { display: flex; flex-direction: column; gap: 8px; max-width: 640px; }
.kicker { margin: 0; font-size: 13px; font-weight: 700; letter-spacing: .12em; color: var(--blue); }
h1 { margin: 0; font-size: 36px; line-height: 1.25; font-weight: 900; }
.lede { margin: 0; color: var(--muted); }
.cols { display: flex; flex-wrap: wrap; gap: 24px; align-items: flex-start; }
.col-main { flex: 999 1 640px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.col-side { flex: 1 1 320px; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.panel {
  background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 20px;
  display: flex; flex-direction: column; gap: 14px;
}
.panel h2 { margin: 0; font-size: 17px; font-weight: 700; }
.sec-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 20px; }
.sec-head h2 { margin: 0; font-size: 20px; font-weight: 700; }
.foot { margin: 0; font-size: 13px; color: var(--dim); }
.hint { margin: 0; font-size: 13px; color: var(--muted); }

/* 指标 */
.kpis { flex: 1 1 520px; max-width: 640px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.kpi { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; }
.kpi > span { display: block; font-size: 13px; color: var(--dim); }
.kpi b { font-size: 32px; font-weight: 700; line-height: 1.15; }
.kpi small { margin: 0 2px; font-size: 14px; color: var(--muted); }
.progress-card {
  flex: 0 1 380px; background: var(--panel); border: 1px solid var(--line); border-radius: 12px;
  padding: 16px 20px; display: flex; flex-direction: column; gap: 10px;
}
.pc-top { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; font-size: 14px; color: var(--muted); }
.pc-top b { font-size: 32px; font-weight: 700; color: var(--blue); line-height: 1; }
.pc-top small { font-size: 20px; color: var(--dim); }
.meter { height: 8px; border-radius: 999px; background: #e8ecf2; overflow: hidden; }
.meter > span { display: block; height: 100%; border-radius: 999px; background: var(--blue); transition: width .2s; }
.pc-note { font-size: 12px; color: var(--dim); }

/* 待确认 */
.alert {
  background: var(--warn-bg); border: 1px solid var(--warn-line); border-radius: 12px; padding: 20px 24px;
  display: flex; flex-direction: column; gap: 14px;
}
.alert-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; }
.alert-head h2 { margin: 0; display: flex; align-items: center; gap: 10px; font-size: 17px; font-weight: 700; color: var(--warn-ink); }
.alert-head a { color: var(--warn-ink); font-size: 14px; font-weight: 500; }
.alert-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 10px; }
.alert-item { background: #fff; border-radius: 8px; padding: 12px 14px; display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--muted); }
.alert-item b { font-size: 14px; color: var(--ink); }

/* 赛程总览 */
.legend { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 13px; color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 12px; height: 12px; border-radius: 3px; }
.c-match, .seg.match { background: var(--blue); }
.c-ceremony, .seg.ceremony { background: var(--amber); }
.c-meal, .seg.meal { background: var(--meal); }
.c-minor, .seg.minor { background: var(--minor); }
.weekend { display: flex; flex-direction: column; gap: 10px; }
.wk-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; }
.wk-head h3 { margin: 0; font-size: 15px; font-weight: 700; }
.wk-head span { font-size: 13px; color: var(--dim); }
.wk-days { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 12px; }
.day-card {
  display: flex; flex-direction: column; gap: 12px; padding: 16px 18px;
  background: var(--panel); border: 1px solid var(--line); border-radius: 12px;
  color: var(--ink); text-decoration: none; transition: border-color .15s, box-shadow .15s;
}
.day-card:hover { color: var(--ink); border-color: var(--blue); box-shadow: 0 4px 16px rgba(14,26,43,.08); }
.day-card.strong { border: 2px solid var(--blue); padding: 15px 17px; }
.dc-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.dc-date { display: flex; align-items: baseline; gap: 8px; }
.dc-date b { font-size: 34px; font-weight: 700; line-height: 1; }
.dc-date span { font-size: 14px; color: var(--muted); }
.pill {
  flex: none; padding: 3px 10px; border-radius: 999px; white-space: nowrap;
  background: var(--blue-soft); color: var(--blue-dk); font-size: 12px; font-weight: 700;
}
.pill.solid { background: var(--blue); color: #fff; }
.dc-wx, .wx { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); min-height: 20px; }
.dc-wx small { font-size: 12px; color: var(--dim); }
.dc-wx svg, .wx svg { color: var(--dim); flex: none; }
.bar { position: relative; height: 14px; border-radius: 4px; background: var(--track); overflow: hidden; }
.seg { position: absolute; top: 0; bottom: 0; box-shadow: inset -1px 0 0 #fff; }
.ticks { position: relative; height: 16px; margin-top: 4px; font-size: 12px; line-height: 16px; color: var(--dim); }
.ticks span { position: absolute; top: 0; }
.ticks .mid { transform: translateX(-50%); }
.ticks .end { right: 0; }
.dc-foot {
  display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 12px;
  padding-top: 10px; border-top: 1px solid #e8ecf2; font-size: 13px; color: var(--muted);
}
.dc-count b { margin-right: 4px; font-size: 24px; font-weight: 700; line-height: 1; color: var(--blue); }
.dc-span { font-size: 18px; font-weight: 600; color: var(--ink); }
.params { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.param { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--dim); }
.param.wide { grid-column: 1 / -1; }
.param input, .param select, .field, .inline-ctl select {
  width: 100%; min-height: 44px; padding: 8px 12px;
  border: 1px solid var(--line-3); border-radius: 8px; background: #fff;
  font-size: 15px; color: var(--ink);
}
.param input:focus, .param select:focus, .field:focus, .inline-ctl select:focus {
  outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(31,70,200,.15);
}
.fmt { display: flex; flex-direction: column; gap: 8px; }
.fmt-title { font-size: 13px; font-weight: 700; color: var(--dim); }
.fmt-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); }
.fmt-row > span:first-child { width: 36px; }
.team-mini { min-width: 36px; padding: 2px 6px; border-radius: 6px; text-align: center; font-size: 16px; font-weight: 600; }
.team-mini.a { background: var(--blue-soft); color: var(--blue-dk); }
.team-mini.b { background: var(--teal-soft); color: var(--teal); }
.ko { display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: 8px; padding: 6px 0; border-top: 1px solid var(--line-2); font-size: 13px; }
.ko > span:first-child { color: var(--dim); }

/* 单日安排 */
.back {
  align-self: flex-start; display: inline-flex; align-items: center; gap: 6px; min-height: 44px;
  font-size: 14px; font-weight: 500; text-decoration: none;
}
.tabs { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; -webkit-overflow-scrolling: touch; }
.tab {
  flex: none; display: flex; flex-direction: column; min-width: 104px; min-height: 56px; padding: 6px 14px;
  background: var(--panel); border: 1px solid var(--line); border-radius: 10px; color: var(--ink); text-decoration: none;
}
.tab b { font-size: 20px; font-weight: 700; line-height: 1.1; }
.tab span { font-size: 12px; line-height: 1.3; color: var(--muted); }
.tab:hover { color: var(--ink); border-color: var(--blue); }
.tab.on { background: var(--blue); border-color: var(--blue); color: #fff; }
.tab.on span { color: #fff; }
.day-head {
  background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 20px 24px;
  display: flex; flex-direction: column; gap: 16px;
}
.day-title { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; }
.day-title h1 { font-size: 30px; }
.day-title .pill { font-size: 13px; padding: 3px 12px; }
.wx { font-size: 14px; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; }
.stat { display: flex; flex-direction: column; }
.stat > span { font-size: 13px; color: var(--dim); }
.stat b { font-size: 28px; font-weight: 700; line-height: 1.15; }
.stat b.txt { font-family: inherit; font-size: 20px; line-height: 1.6; }
.timeline { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.tl-item { display: grid; grid-template-columns: 96px 28px minmax(0, 1fr); column-gap: 12px; }
.tl-time { display: flex; flex-direction: column; align-items: flex-end; padding-top: 12px; }
.tl-time b { font-size: 22px; font-weight: 700; line-height: 1.1; }
.tl-time span { font-size: 12px; color: var(--dim); }
.tl-rail { position: relative; display: flex; justify-content: center; }
.tl-rail::before { content: ""; position: absolute; top: 0; bottom: 0; width: 2px; background: var(--line); }
.tl-item:first-child .tl-rail::before { top: 16px; }
.tl-item:last-child .tl-rail::before { bottom: auto; height: 20px; }
.dot { position: relative; margin-top: 16px; width: 10px; height: 10px; border-radius: 50%; background: #c3ccda; box-shadow: 0 0 0 4px var(--bg); }
.kind-match .dot, .kind-ceremony .dot { margin-top: 20px; width: 14px; height: 14px; }
.kind-match .dot { background: var(--blue); }
.kind-ceremony .dot { background: var(--amber); }
.kind-meal .dot { background: var(--meal); }
.tl-body { min-width: 0; padding: 6px 0 10px; }
.mc, .cc {
  background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 14px 18px;
  display: flex; flex-direction: column; gap: 10px;
}
.cc { background: var(--amber-soft); border-color: var(--amber-line); }
.mc-head { display: flex; justify-content: space-between; gap: 12px; font-size: 13px; color: var(--muted); }
.cc-title { font-size: 20px; color: var(--ink); }
.pair { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.vs { font-size: 14px; font-weight: 700; color: var(--dim); }
.team {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-width: 72px; padding: 4px 14px;
  border-radius: 8px; font-family: var(--num); font-size: 30px; font-weight: 700; line-height: 1.15;
  background: #eef1f6; color: var(--ink-2);
}
.team.long { font-family: inherit; font-size: 17px; line-height: 1.9; }
.team.a { background: var(--blue-soft); color: var(--blue-dk); }
.team.b { background: var(--teal-soft); color: var(--teal); }
.team .nth {
  font-family: "PingFang SC", "Microsoft YaHei", sans-serif; font-style: normal; font-size: 12px; font-weight: 500;
  line-height: 1.6; padding: 0 6px; border-radius: 999px; background: #fff; color: var(--muted);
}
.mc-text { font-size: 20px; font-weight: 700; }
.mc-note { margin: 0; font-size: 13px; color: var(--muted); }
.mc-pitch { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding-top: 10px; border-top: 1px solid var(--line-2); }
.mc-pitch-no { padding: 1px 8px; border-radius: 999px; background: var(--navy); color: #fff; font-size: 12px; font-weight: 700; }
.mc-pitch-label { min-width: 96px; font-size: 13px; color: var(--muted); }
.steps { margin: 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 6px; }
.steps li {
  display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px 3px 4px;
  border-radius: 999px; background: #fff; border: 1px solid var(--amber-line); font-size: 13px;
}
.steps b {
  width: 20px; height: 20px; border-radius: 50%; display: inline-grid; place-items: center;
  background: var(--amber-ink); color: #fff; font-size: 12px;
}
.cc-note { margin: 0; font-size: 13px; color: var(--warn-ink); }
.tl-minor {
  display: flex; justify-content: space-between; gap: 12px; padding: 10px 16px; border-radius: 10px;
  border: 1px dashed var(--line-3); font-size: 14px; color: var(--ink-2);
}
.tl-minor.meal { background: #e9eef6; border-color: transparent; color: var(--ink); font-weight: 500; }
.pairs-row {
  display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 10px; align-items: baseline;
  padding: 8px 0; border-top: 1px solid var(--line-2); font-size: 14px; font-weight: 500;
}
.pairs-row .num { font-size: 17px; font-weight: 600; color: var(--muted); }
.byes { padding-top: 8px; border-top: 1px solid var(--line-2); font-size: 13px; color: var(--muted); }
.byes b { color: var(--ink); }
.rules { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 6px; font-size: 14px; color: var(--ink-2); }
.inline-ctl {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding-top: 12px; border-top: 1px solid var(--line-2); font-size: 14px;
}
.inline-ctl select { width: auto; min-width: 104px; }
.pager { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.pager a, .pager span {
  min-height: 52px; padding: 6px 14px; border-radius: 10px; border: 1px solid var(--line); background: var(--panel);
  display: flex; flex-direction: column; font-size: 14px; color: var(--ink); text-decoration: none;
}
.pager a:hover { color: var(--ink); border-color: var(--blue); }
.pager span { opacity: .5; }
.pager .next { align-items: flex-end; text-align: right; }
.pager small { font-size: 12px; color: var(--dim); }

/* 分类侧栏 */
.rail { flex: 1 1 220px; max-width: 280px; display: flex; flex-direction: column; gap: 8px; }
.rail-btn {
  display: flex; flex-direction: column; gap: 8px; width: 100%; min-height: 60px; padding: 10px 14px;
  background: var(--panel); border: 1px solid var(--line); border-radius: 10px; color: var(--ink); text-align: left;
}
.rail-btn:hover { border-color: var(--blue); }
.rail-btn.warn { border-color: var(--warn-line); }
.rail-btn.on { background: var(--blue); border-color: var(--blue); color: #fff; }
.rb-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; width: 100%; }
.rb-top b { font-size: 15px; }
.rb-top .num { font-size: 17px; font-weight: 600; }
.rb-track { display: block; width: 100%; height: 4px; border-radius: 999px; background: #e8ecf2; overflow: hidden; }
.rb-track span { display: block; height: 100%; background: var(--blue); }
.rail-btn.on .rb-track { background: rgba(255,255,255,.25); }
.rail-btn.on .rb-track span { background: #fff; }

/* 物资 */
.sheet { flex: 999 1 720px; min-width: 0; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.sheet-scroll { overflow-x: auto; }
.sheet-in { min-width: 860px; }
.g-cols, .g-row {
  display: grid; grid-template-columns: minmax(240px, 300px) minmax(140px, 1.2fr) 88px 88px minmax(180px, 1.6fr);
  column-gap: 8px; align-items: center; padding: 10px 16px;
}
.g-cols { padding-top: 12px; padding-bottom: 12px; background: #f6f8fb; color: var(--muted); font-size: 13px; font-weight: 500; }
.g-row { border-top: 1px solid var(--line-2); }
.g-row:hover { background: #fafbfd; }
.g-head { margin: 0; padding: 10px 16px; background: #eef2f8; font-size: 13px; font-weight: 700; letter-spacing: .08em; color: var(--blue-dk); }
.g-item { display: flex; align-items: center; gap: 14px; min-width: 0; }
.thumb {
  flex: none; width: 112px; height: 63px; padding: 0; overflow: hidden;
  border: 1px solid var(--line); border-radius: 8px; background: #fff; cursor: zoom-in;
}
.thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.thumb:hover { border-color: var(--blue); }
.thumb.empty { display: grid; place-items: center; border-style: dashed; border-color: var(--line-3); font-size: 12px; color: var(--dim); cursor: default; }
.g-name { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.g-name b { font-size: 15px; }
.done-tag { align-self: flex-start; padding: 0 8px; border-radius: 999px; background: var(--blue-soft); color: var(--blue-dk); font-size: 12px; font-weight: 500; }
.g-field { display: block; min-width: 0; }
.g-field span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.g-field input {
  width: 100%; min-height: 40px; padding: 8px 10px; border: 1px solid transparent; border-radius: 8px;
  background: #f4f6fa; font-size: 14px; color: var(--ink);
}
.g-field input:hover { border-color: var(--line-3); }
.g-field input:focus { outline: none; border-color: var(--blue); background: #fff; box-shadow: 0 0 0 3px rgba(31,70,200,.15); }
.lightbox {
  position: fixed; inset: 0; z-index: 40; padding: 24px; background: rgba(11,27,63,.78);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px;
}
.lightbox img { max-width: min(1100px, 100%); max-height: 78vh; border-radius: 8px; background: #fff; }
.lb-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 12px 16px; color: #fff; }
.lb-bar b { font-size: 16px; }
.lb-bar .btn { background: transparent; color: #fff; border-color: rgba(255,255,255,.45); }

/* 待办 */
.decide-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 10px; }
.decide {
  display: flex; align-items: flex-start; gap: 12px; padding: 12px 14px; border-radius: 10px;
  background: #fff; border: 1px solid var(--warn-line); cursor: pointer;
}
.decide.done { border-color: var(--line); }
.decide-body { display: flex; flex-direction: column; gap: 4px; font-size: 14px; }
.chk { flex: none; width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--blue); cursor: pointer; }
.chip { align-self: flex-start; padding: 0 8px; border-radius: 999px; background: #eef1f6; color: var(--ink-2); font-size: 12px; }
.chip.warn { background: var(--warn-chip); color: var(--warn-ink); font-weight: 700; }
.chip.ok { background: var(--blue-soft); color: var(--blue-dk); font-weight: 700; }
.decide.done .d-text, .todo.done .todo-text { color: var(--dim); text-decoration: line-through; }
.seg-group { display: flex; gap: 3px; padding: 3px; border-radius: 10px; background: #e8ecf2; }
.seg-group button {
  min-height: 40px; padding: 0 16px; border: 0; border-radius: 8px; background: transparent; color: var(--muted); font-size: 14px;
}
.seg-group button.on { background: #fff; color: var(--ink); font-weight: 700; box-shadow: 0 1px 2px rgba(14,26,43,.12); }
.add-form { display: flex; flex-wrap: wrap; gap: 8px; padding: 12px; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; }
.add-form label { display: flex; flex-direction: column; gap: 2px; font-size: 12px; color: var(--dim); }
.add-form .f-group { flex: 0 0 160px; }
.add-form .f-text { flex: 1 1 280px; }
.btn {
  min-height: 44px; padding: 0 18px; border-radius: 8px; border: 1px solid var(--line-3);
  background: #fff; color: var(--ink); font-weight: 500; white-space: nowrap;
}
.btn:hover { border-color: var(--blue); }
.btn.primary { background: var(--blue); border-color: var(--blue); color: #fff; font-weight: 700; }
.btn.primary:hover { background: var(--blue-dk); border-color: var(--blue-dk); }
.add-form .btn { align-self: flex-end; padding: 0 22px; }
.todo-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.todo {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 12px 8px 12px 16px;
  background: var(--panel); border: 1px solid var(--line); border-radius: 10px;
}
.todo:hover { border-color: var(--line-3); }
.todo.editing { border-color: var(--blue); }
.todo-main { display: flex; align-items: flex-start; gap: 12px; flex: 1 1 auto; min-width: 0; cursor: pointer; }
.todo-body { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.todo-actions { display: flex; flex: none; gap: 4px; }
.icon-btn {
  width: 44px; height: 44px; display: grid; place-items: center;
  border: 0; border-radius: 8px; background: transparent; color: var(--dim);
}
.icon-btn:hover { background: #eef1f6; color: var(--ink); }
.todo-editor { display: flex; flex-wrap: wrap; gap: 8px; width: 100%; }
.todo-editor .field { flex: 1 1 320px; width: auto; }
.empty-note {
  margin: 0; padding: 32px; text-align: center; color: var(--dim);
  background: var(--panel); border: 1px dashed var(--line-3); border-radius: 12px;
}

@media (max-width: 1040px) {
  .rail { flex-basis: 100%; max-width: none; flex-direction: row; overflow-x: auto; padding-bottom: 4px; }
  .rail-btn { flex: none; width: auto; min-width: 136px; }
}
@media (max-width: 960px) {
  .top { position: static; }
  .top-in, .view { padding-left: 16px; padding-right: 16px; }
  .view { padding-top: 24px; }
  h1 { font-size: 28px; }
  .day-title h1 { font-size: 24px; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: none; }
  .progress-card { flex-basis: 100%; }
}
@media (max-width: 760px) {
  .sheet-in { min-width: 0; }
  .g-cols { display: none; }
  .g-row { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; padding: 14px; }
  .g-item, .g-field.f-spec, .g-field.f-note { grid-column: 1 / -1; }
  .g-field span {
    position: static; width: auto; height: auto; overflow: visible; clip: auto;
    display: block; margin-bottom: 2px; font-size: 12px; color: var(--dim);
  }
  .thumb { width: 96px; height: 54px; }
}
@media (max-width: 640px) {
  .top-in { gap: 8px 16px; }
  .nav { order: 3; flex-basis: 100%; }
  .nav a { flex: 1; justify-content: center; }
  .top-side { margin-left: auto; }
  .local-note { font-size: 12px; padding: 4px 10px; }
  .brand-text small { display: none; }
  .alert, .day-head { padding: 16px; }
  .wk-days { grid-template-columns: minmax(0, 1fr); }
  .tl-item { grid-template-columns: 56px 20px minmax(0, 1fr); column-gap: 8px; }
  .tl-time b { font-size: 19px; }
  .mc, .cc { padding: 12px 14px; }
  .team { min-width: 56px; padding: 2px 10px; font-size: 24px; }
  .team.long { font-size: 15px; }
  .todo { padding-left: 12px; }
  .add-form .f-group { flex-basis: 100%; }
}
