/* จดเวร — สไตล์ทั้งหมด (ไม่มี inline style / ไม่พึ่งฟอนต์ภายนอก เพื่อใช้ออฟไลน์ได้และผ่าน CSP) */
:root {
  --bg: #F1F5F5;
  --surface: #FFFFFF;
  --surface-2: #E6EDEE;
  --ink: #12262B;
  --muted: #56696E;
  --line: #D3DEDF;
  --accent: #0D6C74;
  --accent-ink: #FFFFFF;
  --accent-soft: #D7ECEE;
  --good: #187A52;
  --bad: #BE3A2D;
  --bad-soft: #E9A79F;
  --warn-bg: #FFF1D6;
  --warn-ink: #6B4300;
  --hero-bg: #0B4A50;
  --hero-ink: #FFFFFF;
  --hero-dim: #A9CBCF;
  --hero-pos: #9DE6C0;
  --hero-neg: #FFB9AE;
  --scrim: rgba(10, 24, 28, .48);
  --shadow: 0 -8px 40px rgba(10, 24, 28, .22);
  --font: -apple-system, BlinkMacSystemFont, "Sukhumvit Set", "Thonburi", "Noto Sans Thai", "Sarabun", "Tahoma", "Segoe UI", system-ui, sans-serif;
  --tabs-h: 64px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0E181B; --surface: #152327; --surface-2: #1D2F34; --ink: #E7EFF0; --muted: #94A9AE; --line: #284147;
    --accent: #55C4CC; --accent-ink: #06272B; --accent-soft: #1A3B40; --good: #58D49C; --bad: #FF8D80; --bad-soft: #7A3F3A;
    --warn-bg: #3A2D12; --warn-ink: #F6D58E; --hero-bg: #16393E; --hero-ink: #F1F8F8; --hero-dim: #8FB0B5; --hero-pos: #8FE0B8; --hero-neg: #FFAFA3;
    --scrim: rgba(0, 0, 0, .6); --shadow: 0 -8px 40px rgba(0, 0, 0, .55);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0E181B; --surface: #152327; --surface-2: #1D2F34; --ink: #E7EFF0; --muted: #94A9AE; --line: #284147;
  --accent: #55C4CC; --accent-ink: #06272B; --accent-soft: #1A3B40; --good: #58D49C; --bad: #FF8D80; --bad-soft: #7A3F3A;
  --warn-bg: #3A2D12; --warn-ink: #F6D58E; --hero-bg: #16393E; --hero-ink: #F1F8F8; --hero-dim: #8FB0B5; --hero-pos: #8FE0B8; --hero-neg: #FFAFA3;
  --scrim: rgba(0, 0, 0, .6); --shadow: 0 -8px 40px rgba(0, 0, 0, .55);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html.locked body { overflow: hidden; }
body {
  margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.55 var(--font);
  -webkit-tap-highlight-color: transparent; font-variant-numeric: tabular-nums;
  padding-bottom: calc(var(--tabs-h) + env(safe-area-inset-bottom) + 16px);
}
h1, h2, h3, p, ul, dl, dd, dt, table, figure { margin: 0; padding: 0; }
ul { list-style: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2.5px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.noscript { padding: 24px; }
.pos { color: var(--good); } .neg { color: var(--bad); }

#view { max-width: 640px; margin: 0 auto; padding: calc(env(safe-area-inset-top) + 10px) 16px 8px; outline: none; }
.view { display: flex; flex-direction: column; gap: 14px; }
.page-title { font-size: 26px; line-height: 1.25; font-weight: 700; padding: 8px 0 0; }

/* ---------- แท็บล่าง ---------- */
#tabs {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; display: flex; justify-content: center;
  background: var(--surface); border-top: 1px solid var(--line);
  padding-bottom: env(safe-area-inset-bottom);
}
#tabs a {
  flex: 1; max-width: 160px; height: var(--tabs-h); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  color: var(--muted); text-decoration: none; font-size: 12.5px; font-weight: 600;
}
#tabs svg { width: 25px; height: 25px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
#tabs a[aria-current="page"] { color: var(--accent); }
#tabs a[aria-current="page"] svg { stroke-width: 2.2; }

/* ---------- ปุ่ม/ฟอร์ม ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 44px; padding: 8px 16px;
  border: 1.5px solid var(--line); border-radius: 12px; background: var(--surface); font-weight: 600;
}
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.danger { background: var(--bad); border-color: var(--bad); color: #fff; }
.btn.danger-ghost { color: var(--bad); border-color: transparent; background: transparent; }
.btn.small { min-height: 36px; padding: 4px 12px; font-size: 14px; border-radius: 10px; }
.btn[disabled] { opacity: .45; pointer-events: none; }
.icon-btn {
  width: 44px; height: 44px; display: inline-grid; place-items: center; border: 0; border-radius: 12px; background: transparent; color: var(--ink);
}
.icon-btn.sm { width: 36px; height: 36px; color: var(--muted); }
.icon-btn[disabled] { opacity: .3; pointer-events: none; }
.ico { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.btn .ico { width: 18px; height: 18px; }
.input {
  width: 100%; min-height: 44px; padding: 8px 12px; border: 1.5px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--ink);
}
.input.big { font-size: 28px; font-weight: 700; min-height: 56px; }
.input.short { width: 88px; text-align: center; }
textarea.input { resize: vertical; min-height: 64px; line-height: 1.5; }
.input::placeholder { color: var(--muted); opacity: .8; }
.fld { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.fld > span, .lbl { font-size: 13.5px; color: var(--muted); font-weight: 600; }
.fld.grow { flex: 1; }
.row2 { display: flex; gap: 10px; align-items: flex-end; }
.form-err { color: var(--bad); font-weight: 600; }
.form-err:empty { display: none; }
.mform { display: flex; flex-direction: column; gap: 14px; }

.seg { display: inline-flex; padding: 3px; gap: 2px; background: var(--surface-2); border-radius: 12px; max-width: 100%; }
.seg button { border: 0; background: transparent; padding: 7px 14px; border-radius: 9px; font-weight: 600; font-size: 14.5px; color: var(--muted); min-height: 38px; }
.seg button.on { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgba(10, 24, 28, .18); }
.seg-wrap { display: flex; }
.seg-wrap .seg { width: 100%; }
.seg-wrap .seg button { flex: 1; }

/* ---------- หัวเดือน ---------- */
.mhead { display: flex; align-items: center; gap: 2px; }
.mtitle {
  flex: 1; min-width: 0; border: 0; background: transparent; padding: 4px 6px; display: flex; flex-direction: column; align-items: center; text-align: center; border-radius: 12px;
}
.mtitle.static { cursor: default; }
.mt-main { font-size: 21px; font-weight: 700; line-height: 1.3; }
.mt-sub { font-size: 13.5px; color: var(--muted); font-weight: 500; }
.today-btn { border: 1.5px solid var(--accent); color: var(--accent); background: transparent; border-radius: 999px; padding: 3px 12px; font-weight: 700; font-size: 13.5px; min-height: 32px; }
.mgrid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.mcell { min-height: 48px; border: 1.5px solid var(--line); border-radius: 12px; background: var(--surface); font-weight: 600; }
.mcell.now { border-color: var(--accent); }
.mcell.on { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.yrow { display: flex; align-items: center; justify-content: space-between; }
.yr { font-weight: 700; font-size: 18px; }

/* ---------- แบนเนอร์ ---------- */
.banner { background: var(--warn-bg); color: var(--warn-ink); border-radius: 12px; padding: 10px 14px; display: flex; flex-direction: column; gap: 8px; font-size: 14.5px; }
.banner.bad { background: color-mix(in srgb, var(--bad) 14%, var(--surface)); color: var(--ink); border: 1px solid var(--bad); }
.banner-act { display: flex; gap: 8px; }

/* ---------- ปฏิทิน ---------- */
.brushbar { display: flex; flex-direction: column; gap: 6px; }
.brush-row { display: flex; gap: 6px; overflow-x: auto; padding: 2px 0 4px; scrollbar-width: none; }
.brush-row::-webkit-scrollbar { display: none; }
.brush {
  flex: none; display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 4px 12px 4px 5px; border-radius: 999px;
  border: 1.5px solid var(--line); background: var(--surface); font-weight: 600; font-size: 14.5px;
}
.brush .pk-s, .pick .pk-s { display: inline-grid; place-items: center; min-width: 28px; height: 28px; padding: 0 5px; border-radius: 999px; background: var(--c); color: var(--ci); font-size: 13px; font-weight: 700; line-height: 1; }
.brush.on { border-color: var(--c, var(--accent)); box-shadow: 0 0 0 2.5px color-mix(in srgb, var(--c, var(--accent)) 35%, transparent); background: color-mix(in srgb, var(--c, var(--accent)) 12%, var(--surface)); }
.brush.erase { padding-left: 12px; color: var(--muted); }
.brush.erase.on { border-color: var(--bad); color: var(--bad); background: color-mix(in srgb, var(--bad) 10%, var(--surface)); box-shadow: 0 0 0 2.5px color-mix(in srgb, var(--bad) 30%, transparent); }
.brush-hint { font-size: 13.5px; color: var(--muted); display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 36px; }

.cal-wrap { display: flex; flex-direction: column; gap: 4px; touch-action: pan-y; }
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 3px; }
.wd { text-align: center; font-size: 13px; font-weight: 700; color: var(--muted); padding: 2px 0; }
.wd.we { color: var(--bad); }
.day {
  min-height: 68px; padding: 4px 3px 4px 4px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface);
  display: flex; flex-direction: column; align-items: stretch; text-align: left; position: relative; overflow: hidden;
}
.day.blank { border-color: transparent; background: transparent; pointer-events: none; }
.day .dn { font-size: 13.5px; font-weight: 700; width: 24px; height: 24px; display: grid; place-items: center; border-radius: 999px; line-height: 1; }
.day.we .dn { color: var(--bad); }
.day.today { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.day.today .dn { background: var(--accent); color: var(--accent-ink); }
.day.has { background: color-mix(in srgb, var(--accent) 5%, var(--surface)); }
.day:active { background: var(--accent-soft); }
.note-dot { position: absolute; top: 7px; right: 6px; width: 6px; height: 6px; border-radius: 50%; background: var(--muted); }
.chips { display: flex; flex-wrap: wrap; gap: 2px; margin-top: auto; }
.chip { display: inline-block; min-width: 18px; padding: 3px 4px; border-radius: 5px; background: var(--c); color: var(--ci); font-size: 11.5px; font-weight: 700; line-height: 1; text-align: center; }
.chip.big { min-width: 34px; padding: 8px 8px; font-size: 16px; border-radius: 9px; }
.more { font-size: 11px; font-weight: 700; color: var(--muted); align-self: center; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 14px; color: var(--muted); }
.legend li { display: inline-flex; align-items: center; gap: 6px; }
.legend b { color: var(--ink); }

/* ---------- แผ่นล่าง ---------- */
.scrim { position: fixed; inset: 0; z-index: 40; background: var(--scrim); opacity: 0; transition: opacity .16s; display: flex; align-items: flex-end; justify-content: center; }
.scrim.on { opacity: 1; }
.sheet {
  width: 100%; max-width: 560px; max-height: min(88vh, 88dvh); display: flex; flex-direction: column; background: var(--surface); color: var(--ink);
  border-radius: 20px 20px 0 0; box-shadow: var(--shadow); transform: translateY(24px); transition: transform .18s ease-out;
  padding-bottom: env(safe-area-inset-bottom);
}
.scrim.on .sheet { transform: none; }
.sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 12px 8px 4px 20px; }
.sheet-head h2 { font-size: 18px; font-weight: 700; line-height: 1.35; }
.sheet-body { overflow-y: auto; overscroll-behavior: contain; padding: 8px 20px 16px; display: flex; flex-direction: column; gap: 12px; }
.sheet-foot { display: flex; gap: 8px; justify-content: flex-end; padding: 10px 20px 14px; border-top: 1px solid var(--line); }
.sheet-foot .btn.danger-ghost { margin-right: auto; }
.sheet-text { color: var(--ink); }
.sheet-text.muted, .muted { color: var(--muted); font-size: 14.5px; }
.sheet-text.warn, .warn { color: var(--warn-ink); background: var(--warn-bg); border-radius: 10px; padding: 8px 12px; font-size: 14.5px; }
@media (min-width: 700px) {
  .scrim { align-items: center; }
  .sheet { border-radius: 20px; max-height: 84vh; }
}

#toasts { position: fixed; left: 0; right: 0; bottom: calc(var(--tabs-h) + env(safe-area-inset-bottom) + 12px); z-index: 60; display: flex; justify-content: center; pointer-events: none; padding: 0 16px; }
.toast { pointer-events: auto; display: flex; align-items: center; gap: 14px; max-width: 520px; background: var(--ink); color: var(--bg); padding: 11px 16px; border-radius: 14px; font-size: 14.5px; box-shadow: 0 6px 24px rgba(0, 0, 0, .3); }
.toast-btn { border: 0; background: transparent; font-weight: 700; padding: 4px 6px; min-height: 32px; border-radius: 8px; color: color-mix(in srgb, var(--accent) 75%, var(--bg)); }

/* ---------- แผ่นรายวัน ---------- */
.picks { display: flex; flex-wrap: wrap; gap: 8px; }
.pick {
  display: inline-flex; align-items: center; gap: 7px; min-height: 46px; padding: 5px 14px 5px 6px; border-radius: 999px;
  border: 1.5px solid var(--line); background: var(--surface); font-weight: 600;
}
.pick.on { border-color: var(--c); background: color-mix(in srgb, var(--c) 16%, var(--surface)); box-shadow: 0 0 0 2px color-mix(in srgb, var(--c) 40%, transparent); }
.pick.on::after { content: "✓"; font-weight: 700; margin-left: 2px; }
.daysheet { display: flex; flex-direction: column; gap: 10px; }
.erow { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; display: flex; flex-direction: column; gap: 8px; }
.er-top { display: flex; align-items: center; gap: 8px; }
.er-pay { margin-left: auto; font-weight: 700; }
.er-fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; }

/* ---------- สรุป ---------- */
.hero { background: var(--hero-bg); color: var(--hero-ink); border-radius: 18px; padding: 16px 18px 12px; }
.hero-lbl { color: var(--hero-dim); font-size: 14px; font-weight: 600; }
.hero-num { font-size: 40px; line-height: 1.2; font-weight: 800; letter-spacing: -.5px; padding: 2px 0 8px; }
.hero-num.neg { color: var(--hero-neg); }
.brk { border-top: 1px solid color-mix(in srgb, var(--hero-ink) 20%, transparent); }
.brk-row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 7px 0; border-bottom: 1px solid color-mix(in srgb, var(--hero-ink) 12%, transparent); }
.brk-row:last-child { border-bottom: 0; }
.brk dt { font-size: 15px; display: flex; flex-direction: column; }
.brk dt small { color: var(--hero-dim); font-size: 12.5px; }
.brk dd { font-weight: 700; font-size: 16.5px; }
.brk dd.pos { color: var(--hero-pos); } .brk dd.neg { color: var(--hero-neg); }

.block { display: flex; flex-direction: column; gap: 10px; padding-top: 6px; }
.block h2, .catcol h3, .catedit h3 { font-size: 16.5px; font-weight: 700; }
.help { font-size: 14.5px; color: var(--muted); }
.tbl-wrap { overflow-x: auto; }
.tbl { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.tbl th, .tbl td { padding: 9px 6px; border-bottom: 1px solid var(--line); text-align: left; font-weight: 500; white-space: nowrap; }
.tbl thead th { color: var(--muted); font-size: 13px; font-weight: 700; }
.tbl th[scope="row"] { font-weight: 600; }
.tbl .r { text-align: right; }
.tbl td.neg { color: var(--bad); }
.tbl td.dim { color: var(--muted); opacity: .6; }
.tbl tfoot th, .tbl tfoot td { font-weight: 800; border-bottom: 0; border-top: 2px solid var(--ink); }
.tbl tr.cur th, .tbl tr.cur td { background: var(--accent-soft); }
.linkbtn { border: 0; background: transparent; padding: 2px 0; font-weight: 700; color: var(--accent); text-decoration: underline; text-underline-offset: 3px; min-height: 28px; }
.donut-row { display: flex; align-items: center; gap: 18px; }
.donut { width: 132px; height: 132px; flex: none; }
.donut-track { stroke: var(--surface-2); }
.donut-main { font-size: 12.5px; font-weight: 800; fill: var(--ink); }
.donut-sub { font-size: 9.5px; fill: var(--muted); }
.dl { display: flex; flex-direction: column; gap: 6px; flex: 1; font-size: 14.5px; }
.dl li { display: flex; align-items: center; gap: 8px; }
.dl li b { margin-left: auto; }
.dl.inline { flex-direction: row; flex-wrap: wrap; gap: 6px 16px; flex: none; color: var(--muted); font-size: 13.5px; }
.dl.inline li b { margin: 0; }
.sw { width: 12px; height: 12px; border-radius: 4px; background: var(--c, var(--muted)); flex: none; display: inline-block; }
.sw.in { background: var(--accent); } .sw.out { background: var(--bad-soft); }
.chart { width: 100%; height: auto; display: block; }
.chart .grid { stroke: var(--line); stroke-width: 1; stroke-dasharray: 2 3; }
.chart .axis-line { stroke: var(--muted); stroke-width: 1; }
.chart .axis { fill: var(--muted); font-size: 9.5px; font-family: var(--font); }
.chart .axis-on { fill: var(--ink); font-weight: 700; }
.chart .bar-in { fill: var(--accent); } .chart .bar-out { fill: var(--bad-soft); }
.cat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
.catcol { display: flex; flex-direction: column; gap: 6px; }
.cats li { display: flex; justify-content: space-between; gap: 10px; padding: 6px 0; border-bottom: 1px solid var(--line); font-size: 14.5px; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; padding: 6px 0 4px; }
.empty { border: 1.5px dashed var(--line); border-radius: 14px; padding: 22px 16px; color: var(--muted); text-align: center; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.print-only { display: none; }

/* ---------- บัญชี ---------- */
.mstrip { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.mstrip > div { display: flex; flex-direction: column; padding: 9px 10px; border-left: 1px solid var(--line); min-width: 0; }
.mstrip > div:first-child { border-left: 0; padding-left: 2px; }
.mstrip .lbl { font-size: 12.5px; }
.mstrip b { font-size: 17px; font-weight: 800; overflow-wrap: anywhere; }
.mstrip small { color: var(--muted); font-size: 12px; }
.mtools { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.mtools .seg button { padding: 7px 11px; }
.mtools .btn { padding: 8px 14px; }
.mlist { display: flex; flex-direction: column; gap: 10px; }
.mgroup h3 { font-size: 13.5px; color: var(--muted); font-weight: 700; padding: 2px 0 2px; }
.mgroup ul { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.mgroup li + li { border-top: 1px solid var(--line); }
.mrow { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 14px; border: 0; background: transparent; text-align: left; min-height: 56px; }
.mr-main { display: flex; flex-direction: column; min-width: 0; }
.mr-main small { color: var(--muted); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mr-amt { font-weight: 800; white-space: nowrap; }
.catchips { display: flex; flex-wrap: wrap; gap: 6px; }
.cchip { border: 1.5px solid var(--line); background: var(--surface); border-radius: 999px; padding: 4px 12px; font-size: 14px; min-height: 34px; font-weight: 600; }
.cchip.on { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }

/* ---------- ตั้งค่า ---------- */
.trows { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.trows li { display: flex; align-items: center; }
.trows li + li { border-top: 1px solid var(--line); }
.trows li.arch { opacity: .6; }
.trow { flex: 1; min-width: 0; display: flex; align-items: center; gap: 12px; padding: 10px 6px 10px 14px; border: 0; background: transparent; text-align: left; min-height: 58px; }
.trow > .chip { min-width: 40px; padding: 6px 4px; }
.tr-main { display: flex; flex-direction: column; min-width: 0; }
.tr-main small { color: var(--muted); font-size: 13px; }
.tr-mv { display: flex; padding-right: 4px; }
.opt { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 4px 0; }
.opt > span { font-weight: 600; }
.btnrow { display: flex; flex-wrap: wrap; gap: 8px; }
.status { font-weight: 700; color: var(--good); }
.status.warn { color: var(--warn-ink); background: var(--warn-bg); padding: 6px 12px; border-radius: 10px; align-self: flex-start; }
.howto { display: flex; flex-direction: column; gap: 8px; font-size: 14.5px; }
.preview { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 17px; }
.swatches { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.swatch { width: 36px; height: 36px; border-radius: 50%; border: 3px solid var(--surface); background: var(--c); box-shadow: 0 0 0 1.5px var(--line); }
.swatch.on { box-shadow: 0 0 0 3px var(--ink); }
.colorpick { width: 40px; height: 40px; padding: 0; border: 0; background: transparent; }
.cmp { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.cmp th, .cmp td { padding: 6px 4px; text-align: left; border-bottom: 1px solid var(--line); font-weight: 500; }
.cmp thead th { color: var(--muted); font-size: 13px; }
.cmp td { text-align: right; font-weight: 700; }
.catedit { display: flex; flex-direction: column; gap: 6px; }
.catlist li { display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); padding-left: 2px; }
.addrow { display: flex; gap: 8px; }

@media (min-width: 720px) {
  #view { padding-top: 24px; }
  .day { min-height: 84px; }
  .chip { font-size: 12.5px; padding: 4px 6px; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}
@media print {
  :root { --bg: #fff; --surface: #fff; --ink: #000; --muted: #444; --line: #bbb; --hero-bg: #fff; --hero-ink: #000; --hero-dim: #444; --hero-pos: #146b46; --hero-neg: #a52a1e; color-scheme: light; }
  body { padding: 0; }
  #tabs, #layer, #toasts, .no-print, .seg-wrap, .mhead .icon-btn, .today-btn, .banner { display: none !important; }
  .print-only { display: block; font-size: 20px; font-weight: 700; padding-bottom: 8px; }
  .hero { border: 1.5px solid #000; }
  .block { break-inside: avoid; }
}
