/* Teacher Planner — styles (mobile first) */
:root {
  --bg: #FBF5F3; --paper: #fff; --soft: #F6EBEC; --soft2: #EFDDE0; --line: #E6DCDA; --ink: #2A2326; --txt2: #625A5E; --txt3: #746A6E;
  --acc: #A94A63; --acc-ink: #A94A63; --on-acc: #fff; --shadow: rgb(60 35 45 / .07); --hero: #F3E2E4;
  --danger: #B3261E; --warn-bg: #FBE7DC; --warn-fg: #8F3A12; --ok: #2E6B3E;
  --st-idea: #ECE8E6; --st-idea-t: #5A5250; --st-tobuy: #FBEBCF; --st-tobuy-t: #7A5310; --st-bought: #DCEAF5; --st-bought-t: #24577E;
  --st-wrapped: #EFE0F0; --st-wrapped-t: #74386F; --st-given: #DDEEDF; --st-given-t: #2E6B3E;
  --r: 16px; --serif: ui-serif, "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --safe-b: env(safe-area-inset-bottom, 0px);
}
.dark {
  --danger: #F2B8B5; --warn-bg: #45281C; --warn-fg: #F6C3A6; --ok: #A8D8B2;
  --st-idea: #3A3536; --st-idea-t: #D8D0D1; --st-tobuy: #4A3B1F; --st-tobuy-t: #F2D49A; --st-bought: #1F3647; --st-bought-t: #A9CDEA;
  --st-wrapped: #3E2840; --st-wrapped-t: #E3B8E0; --st-given: #213A27; --st-given-t: #A8D8B2;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.5 var(--sans); -webkit-font-smoothing: antialiased; }
body.modal-open { overflow: hidden; }
h1, h2, h3 { margin: 0; line-height: 1.25; }
p { margin: 0 0 10px; }
a { color: var(--acc-ink); text-decoration-thickness: 1px; text-underline-offset: 2px; }
button, input, select, textarea { font: inherit; color: inherit; }
img { max-width: 100%; }
small { font-size: 12.5px; }
:focus-visible { outline: 2px solid var(--acc); outline-offset: 2px; border-radius: 8px; }
.vh { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.muted { color: var(--txt2); } .small { font-size: 13px; } .center { text-align: center; } .neg { color: var(--danger) !important; }
.sp { flex: 1; }
[hidden] { display: none !important; }

/* ---------- shell */
.side { display: none; }
.wrap { min-height: 100vh; padding-bottom: calc(78px + var(--safe-b)); min-width: 0; }
.top { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 10px; padding: 10px 16px; padding-top: max(10px, env(safe-area-inset-top)); background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid transparent; }
@supports not (background: color-mix(in srgb, red 50%, blue)) { .top { background: var(--bg); } }
.top h1 { font: 600 21px/1.2 var(--serif); flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.top-r { display: flex; align-items: center; gap: 4px; }
.top-r .top-add { display: none; }
.brand-m { display: inline-flex; }
.logo { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 11px; background: var(--acc); color: var(--on-acc); flex: none; }
.skip { position: absolute; left: 8px; top: -60px; z-index: 50; } .skip:focus { top: 8px; }
#main { padding: 8px 16px 24px; max-width: 1120px; margin: 0 auto; outline: none; }
.foot { text-align: center; font-size: 12.5px; color: var(--txt3); padding: 8px 16px 24px; }
.foot a { color: var(--txt2); }
.bnav { position: fixed; z-index: 30; left: 0; right: 0; bottom: 0; display: flex; background: var(--paper); border-top: 1px solid var(--line); padding-bottom: var(--safe-b); }
.bnav a, .bnav button { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 2px 9px; font-size: 11px; font-weight: 600; color: var(--txt2); text-decoration: none; background: none; border: 0; cursor: pointer; min-height: 56px; }
.bnav .on { color: var(--acc-ink); }
.bnav .on svg { stroke-width: 2.1; }
.fab { position: fixed; z-index: 31; right: 16px; bottom: calc(70px + var(--safe-b)); width: 56px; height: 56px; border-radius: 18px; border: 0; background: var(--acc); color: var(--on-acc); display: grid; place-items: center; box-shadow: 0 8px 22px var(--shadow), 0 2px 6px rgb(0 0 0 / .18); cursor: pointer; }
body[data-view="settings"] .fab, body[data-view="help"] .fab, body[data-view="attendance"] .fab, body[data-view="grades"] .fab, body[data-view="assignment"] .fab { display: none; }
@media (min-width: 900px) {
  #app { display: grid; grid-template-columns: 236px 1fr; background: linear-gradient(90deg, var(--paper) 0 235px, var(--line) 235px 236px, transparent 236px); min-height: 100vh; }
  .side { display: flex; flex-direction: column; gap: 14px; position: sticky; top: 0; height: 100vh; overflow-y: auto; padding: 18px 14px; }
  .brand { display: flex; align-items: center; gap: 10px; font: 600 19px var(--serif); color: var(--ink); text-decoration: none; padding: 4px 6px; }
  .side nav { display: flex; flex-direction: column; gap: 2px; }
  .side nav a { display: flex; align-items: center; gap: 11px; padding: 9px 10px; border-radius: 11px; color: var(--txt2); text-decoration: none; font-weight: 600; font-size: 14px; }
  .side nav a:hover { background: var(--soft); color: var(--ink); }
  .side nav a.on { background: var(--soft2); color: var(--acc-ink); }
  .brandlink { margin-top: auto; font-size: 12.5px; color: var(--txt3); padding: 6px 10px; }
  .wrap { padding-bottom: 0; }
  .bnav, .fab, .brand-m { display: none; }
  .top { padding: 16px 28px; } .top h1 { font-size: 26px; }
  .top-r .top-add { display: inline-flex; margin-left: 6px; }
  #main { padding: 8px 28px 32px; }
}

/* ---------- basics */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 42px; padding: 9px 15px; border-radius: 12px; border: 1px solid var(--line); background: var(--paper); color: var(--ink); font-weight: 600; font-size: 14px; line-height: 1.2; cursor: pointer; text-decoration: none; white-space: nowrap; transition: background .15s, border-color .15s, transform .05s; }
.btn:hover { border-color: var(--txt3); }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--acc); border-color: var(--acc); color: var(--on-acc); }
.btn.primary:hover { filter: brightness(1.06); }
.btn.ghost { background: transparent; border-color: transparent; }
.btn.ghost:hover { background: var(--soft); }
.btn.danger { background: #B3261E; border-color: #B3261E; color: #fff; }
.btn.danger-t { color: var(--danger); }
.btn.sm { min-height: 34px; padding: 6px 11px; font-size: 13px; border-radius: 10px; }
.btn.big { min-height: 52px; padding: 12px 26px; font-size: 16px; border-radius: 14px; }
.btn.wide { width: 100%; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.btn svg { flex: none; }
.link { background: none; border: 0; padding: 0; color: var(--acc-ink); font-weight: 600; cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }
.icon-btn { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; border: 0; background: transparent; color: var(--txt2); cursor: pointer; position: relative; flex: none; text-decoration: none; }
.icon-btn:hover { background: var(--soft); color: var(--ink); }
.icon-btn.sm { width: 32px; height: 32px; border-radius: 9px; }
.badge { position: absolute; top: 4px; right: 3px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--acc); color: var(--on-acc); font-size: 11px; font-weight: 700; line-height: 18px; text-align: center; }
.card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; box-shadow: 0 1px 2px var(--shadow), 0 6px 18px var(--shadow); margin-bottom: 16px; min-width: 0; }
.card.tight { padding: 6px 12px; }
.c-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.c-head h2 { font: 600 17px var(--serif); display: flex; align-items: center; gap: 8px; }
.more-link { font-size: 13px; font-weight: 600; }
.grid { display: grid; gap: 0 16px; align-items: start; }
@media (min-width: 760px) { .grid { grid-template-columns: 1fr 1fr; } .grid > .ideas { grid-column: 1 / -1; } }
.toolbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.toolbar > p { margin: 0; flex: 1 1 260px; }
.search-in { flex: 1 1 200px; display: flex; align-items: center; gap: 8px; background: var(--paper); border: 1px solid var(--line); border-radius: 12px; padding: 0 12px; min-height: 42px; color: var(--txt3); }
.search-in input { border: 0; outline: 0; background: transparent; flex: 1; min-width: 0; padding: 9px 0; font-size: 16px; color: var(--ink); }
.search-in:focus-within { border-color: var(--acc); box-shadow: 0 0 0 3px var(--soft2); }
.sel-sm { position: relative; display: inline-flex; align-items: center; }
.sel-sm svg { position: absolute; right: 10px; pointer-events: none; color: var(--txt3); }
.sel-sm select { appearance: none; -webkit-appearance: none; min-height: 42px; padding: 8px 32px 8px 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--paper); font-weight: 600; font-size: 14px; cursor: pointer; }
.count { display: inline-grid; place-items: center; min-width: 20px; height: 20px; border-radius: 10px; background: var(--acc); color: var(--on-acc); font-size: 11px; }
.tabs { display: flex; gap: 6px; overflow-x: auto; padding: 2px 2px 10px; margin: 0 -2px; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.toolbar .tabs { padding-bottom: 2px; }
.tab { flex: none; display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 6px 13px; border-radius: 99px; border: 1px solid var(--line); background: var(--paper); color: var(--txt2); font-weight: 600; font-size: 13.5px; cursor: pointer; }
.tab span { font-size: 12px; color: var(--txt3); font-weight: 700; }
.tab.on { background: var(--acc); border-color: var(--acc); color: var(--on-acc); }
.tab.on span { color: var(--on-acc); opacity: .85; }
.fchips { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin-bottom: 10px; }
.fchip { display: inline-flex; align-items: center; gap: 4px; padding: 4px 8px 4px 11px; border-radius: 99px; border: 0; background: var(--soft2); color: var(--ink); font-size: 13px; font-weight: 600; cursor: pointer; }
.back { display: inline-flex; align-items: center; gap: 4px; font-size: 14px; font-weight: 600; text-decoration: none; margin: 2px 0 12px; }
.tag { display: inline-block; padding: 1px 8px; border-radius: 99px; background: var(--soft2); font-size: 12px; font-weight: 600; color: var(--ink); }
.banner { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 11px 14px; border-radius: 14px; background: var(--soft); border: 1px solid var(--soft2); margin: 0 16px 12px; font-size: 14px; }
#main .banner { margin: 0 0 14px; }
.banner span { flex: 1 1 200px; }
.banner.warn { background: var(--warn-bg); color: var(--warn-fg); border-color: transparent; }
@media (min-width: 900px) { .banner { margin: 0 28px 12px; } }
.empty { text-align: center; padding: 22px 10px; color: var(--txt2); }
.empty .e-ic { display: inline-grid; place-items: center; width: 60px; height: 60px; border-radius: 20px; background: var(--soft); color: var(--acc-ink); margin-bottom: 10px; }
.empty h3 { font: 600 18px var(--serif); color: var(--ink); margin-bottom: 4px; }
.empty p { max-width: 380px; margin: 0 auto 14px; }
.callout { display: flex; gap: 8px; align-items: flex-start; flex-wrap: wrap; padding: 10px 12px; border-radius: 12px; background: var(--soft); font-size: 13.5px; margin: 6px 0; }
.callout > span { flex: 1 1 200px; }
.callout.warn { background: var(--warn-bg); color: var(--warn-fg); }
.callout.soft { background: transparent; border: 1px dashed var(--line); }
.callout svg { margin-top: 2px; flex: none; }
.warn-t { color: var(--warn-fg); background: var(--warn-bg); padding: 8px 10px; border-radius: 10px; font-size: 13.5px; display: flex; gap: 6px; align-items: center; margin: 10px 0 0; }
.ok-t { color: var(--ok); display: flex; gap: 8px; align-items: center; margin: 0; }
.danger-zone { display: flex; justify-content: center; margin: 8px 0 20px; }
.danger-zone.left { justify-content: flex-start; margin: 10px 0 0; }
.list-foot { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; margin: 14px 0 6px; }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }

/* ---------- hero + dashboard */
.hero { background: linear-gradient(135deg, var(--hero), var(--soft)); border-radius: 22px; padding: 20px; margin-bottom: 16px; position: relative; overflow: hidden; border: 1px solid var(--soft2); }
.hero::after { content: ""; position: absolute; right: -40px; top: -40px; width: 170px; height: 170px; border-radius: 50%; border: 22px solid var(--acc); opacity: .07; pointer-events: none; }
.eyebrow { font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--txt2); margin-bottom: 4px; }
.hero h2 { font: 600 27px/1.15 var(--serif); margin-bottom: 6px; }
.lead { font-size: 16px; color: var(--ink); }
.lead b { color: var(--acc-ink); }
.qa { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 14px; }
.qa .btn { justify-content: flex-start; }
@media (min-width: 620px) { .qa { display: flex; flex-wrap: wrap; } .hero { padding: 26px 28px; } .hero h2 { font-size: 32px; } }
.start .steps li button { font-size: 15px; }
.steps { margin: 0 0 12px; padding-left: 22px; display: grid; gap: 10px; }
.steps li small { display: block; color: var(--txt2); }
.stats5 { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.stile { display: flex; flex-direction: column; align-items: center; gap: 0; padding: 10px 2px; border-radius: 13px; border: 0; cursor: pointer; text-decoration: none; min-width: 0; }
.stile b { font: 600 24px/1.1 var(--serif); }
.stile span { font-size: 11.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.bud-row { display: flex; align-items: center; gap: 18px; margin-bottom: 12px; }
.kv { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 16px; margin: 0 0 10px; flex: 1; }
.kv dt { font-size: 12px; color: var(--txt2); font-weight: 600; }
.kv dd { margin: 0; font: 600 18px/1.3 var(--serif); }
.ring { position: relative; width: 84px; height: 84px; flex: none; }
.ring b { position: absolute; inset: 0; display: grid; place-items: center; font: 700 17px var(--serif); }
.ring .r-bg { fill: none; stroke: var(--soft2); stroke-width: 9; }
.ring .r-fg { fill: none; stroke: var(--acc); stroke-width: 9; stroke-linecap: round; transition: stroke-dashoffset .5s; }
.ring.over .r-fg { stroke: var(--danger); }
.bar { position: relative; height: 8px; border-radius: 99px; background: var(--soft2); overflow: hidden; margin: 6px 0; }
.bar i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 99px; }
.bar .pl { background: var(--acc); opacity: .32; }
.bar .sp { background: var(--acc); }
.bar.over .pl, .bar.over .sp { background: var(--danger); }
.legend { font-size: 12.5px; color: var(--txt2); display: inline-flex; align-items: center; gap: 6px; }
.lg { display: inline-block; width: 12px; height: 8px; border-radius: 4px; background: var(--acc); margin-left: 6px; }
.lg.pl { opacity: .32; }
.yearnav { display: flex; align-items: center; gap: 4px; }
.yearnav h2 { font: 600 22px var(--serif); min-width: 64px; text-align: center; }

/* ---------- status chips */
.chip { display: inline-flex; align-items: center; gap: 3px; padding: 4px 8px 4px 10px; border-radius: 99px; border: 0; font-size: 12px; font-weight: 700; white-space: nowrap; cursor: pointer; line-height: 1.2; }
span.chip { cursor: default; padding-right: 10px; }
.st-idea { background: var(--st-idea); color: var(--st-idea-t); } .st-tobuy { background: var(--st-tobuy); color: var(--st-tobuy-t); }
.st-bought { background: var(--st-bought); color: var(--st-bought-t); } .st-wrapped { background: var(--st-wrapped); color: var(--st-wrapped-t); }
.st-given { background: var(--st-given); color: var(--st-given-t); }

/* ---------- gift rows */
.glist { display: flex; flex-direction: column; }
.gift { display: flex; align-items: center; gap: 8px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.gift:last-child { border-bottom: 0; }
#gbody .glist, #main > .glist { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r); padding: 2px 12px; margin-bottom: 14px; box-shadow: 0 1px 2px var(--shadow); }
.g-main { flex: 1; min-width: 0; display: flex; align-items: center; gap: 11px; background: none; border: 0; padding: 4px 0; text-align: left; cursor: pointer; }
.g-ph { width: 44px; height: 44px; border-radius: 12px; object-fit: cover; flex: none; }
.g-ic { display: grid; place-items: center; background: var(--soft); color: var(--acc-ink); }
.g-t { min-width: 0; display: flex; flex-direction: column; }
.g-t b { font-weight: 600; font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.g-t small { color: var(--txt2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hi { color: #C08A1E; display: inline-flex; vertical-align: -1px; }
.g-side { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; flex: none; }
.g-pr { font-weight: 700; font-size: 14px; }
.g-pr.est { color: var(--txt2); font-weight: 600; }
.ghead { font: 600 14px var(--sans); color: var(--txt2); margin: 16px 2px 8px; display: flex; gap: 6px; align-items: baseline; }
.ghead small { color: var(--txt3); font-weight: 600; }
.card .ghead:first-child { margin-top: 0; }
.list-sum { text-align: center; }
.ideas-mini { padding: 0; }
.ideas-mini > summary { padding: 12px 16px; cursor: pointer; font-weight: 600; display: flex; gap: 8px; align-items: center; list-style: none; }
.ideas-mini > summary::-webkit-details-marker { display: none; }
.ideas-mini .ideas { box-shadow: none; border: 0; border-top: 1px solid var(--line); border-radius: 0 0 var(--r) var(--r); margin: 0; }
.idea-add { display: flex; gap: 8px; margin-bottom: 10px; }
.idea-add input { flex: 1; min-width: 0; }
.idea-list { list-style: none; margin: 0; padding: 0; }
.idea-list li { display: flex; align-items: center; gap: 8px; padding: 8px 0; border-top: 1px solid var(--line); }
.idea-list li span { flex: 1; min-width: 0; }

/* ---------- occasions */
.occ-list { list-style: none; margin: 0; padding: 0; }
.occ-list li + li { border-top: 1px solid var(--line); }
.occ { display: flex; align-items: center; gap: 12px; padding: 10px 2px; color: var(--ink); text-decoration: none; }
.occ > svg { color: var(--txt3); flex: none; }
.cd { width: 54px; height: 54px; border-radius: 15px; background: var(--soft); color: var(--acc-ink); display: flex; flex-direction: column; align-items: center; justify-content: center; flex: none; line-height: 1; }
.cd b { font: 700 21px var(--serif); } .cd small { font-size: 11px; font-weight: 600; margin-top: 2px; }
.cd.soon { background: var(--acc); color: var(--on-acc); }
.cd.need { background: var(--warn-bg); color: var(--warn-fg); }
.cd.sm { width: 44px; height: 44px; border-radius: 12px; } .cd.sm b { font-size: 17px; }
.cd.dead { background: var(--st-tobuy); color: var(--st-tobuy-t); }
.o-t { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.o-t b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.o-t small { color: var(--txt2); }
.o-t .bar { margin: 6px 0 2px; height: 6px; }
.o-head, .p-head { display: grid; grid-template-columns: auto 1fr auto; gap: 12px 14px; align-items: center; }
.o-head > .o-ic, .o-ic { width: 52px; height: 52px; border-radius: 16px; background: var(--soft); color: var(--acc-ink); display: grid; place-items: center; flex: none; }
.o-head h2, .p-head h2 { font: 600 24px/1.2 var(--serif); }
.o-head p, .p-head p { margin: 2px 0 0; }
.o-cd { text-align: center; line-height: 1.05; color: var(--acc-ink); }
.o-cd b { display: block; font: 700 34px var(--serif); } .o-cd span { font-size: 12px; font-weight: 600; color: var(--txt2); }
.o-cd.soon b { color: var(--acc-ink); }
.o-head > .callout, .o-meta, .o-notes, .p-act { grid-column: 1 / -1; }
.o-meta { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 13.5px; color: var(--txt2); }
.o-meta span { display: inline-flex; align-items: center; gap: 6px; }
.o-meta b { color: var(--ink); }
.o-notes { background: var(--soft); border-radius: 12px; padding: 9px 12px; margin: 0; font-size: 14px; white-space: pre-wrap; }
.p-act { display: flex; gap: 8px; flex-wrap: wrap; }
.p-head .p-t { grid-column: 2 / -1; }
.rgroup { padding: 4px 0 10px; }
.rgroup + .rgroup { border-top: 1px solid var(--line); padding-top: 10px; }
.rg-h { display: flex; align-items: center; gap: 10px; font-weight: 600; }
.rg-h a { color: var(--ink); text-decoration: none; }
.none { margin: 4px 0 0; }
@media (min-width: 600px) { .rgroup .glist, .none { padding-left: 40px; } }
.cal-head { display: flex; align-items: center; gap: 6px; margin-bottom: 10px; }
.cal-head h2 { font: 600 19px var(--serif); flex: 1; text-align: center; }
.cgrid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; margin-bottom: 12px; }
.dow { text-align: center; font-size: 11px; font-weight: 700; color: var(--txt3); padding-bottom: 4px; }
.cday { min-height: 48px; border-radius: 10px; background: var(--bg); padding: 3px; overflow: hidden; display: flex; flex-direction: column; gap: 2px; }
.cday.blank { background: transparent; }
.cday .dn { font-size: 12px; font-weight: 600; color: var(--txt2); padding-left: 3px; }
.cday.today { box-shadow: inset 0 0 0 2px var(--acc); }
.cday.today .dn { color: var(--acc-ink); font-weight: 800; }
.cday.has { background: var(--soft); }
.cev { display: block; height: 6px; border-radius: 3px; background: var(--acc); font-size: 0; text-decoration: none; }
.cev.dead { background: var(--st-tobuy-t); opacity: .55; }
.cev span { display: none; }
@media (min-width: 700px) {
  .cday { min-height: 78px; }
  .cev { height: auto; font-size: 11px; line-height: 1.3; padding: 1px 5px; border-radius: 6px; color: var(--on-acc); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .cev span { display: inline; }
  .cev.dead { background: var(--st-tobuy); color: var(--st-tobuy-t); opacity: 1; }
}
.cal-list { border-top: 1px solid var(--line); }

/* ---------- people */
.people { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.people .card { margin: 0; }
.pcard { display: flex; gap: 12px; align-items: flex-start; color: var(--ink); text-decoration: none; transition: border-color .15s; }
.pcard:hover { border-color: var(--txt3); }
.pc-t { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.pc-t b { font-size: 16px; font-weight: 600; }
.pc-t small { color: var(--txt2); }
.pc-g { margin-top: 2px; }
.av { border-radius: 50%; object-fit: cover; display: inline-grid; place-items: center; color: #fff; font-weight: 700; flex: none; letter-spacing: .02em; }
.about { margin: 0; display: grid; gap: 10px; }
.about dt { font-size: 12px; font-weight: 700; color: var(--txt2); text-transform: uppercase; letter-spacing: .04em; }
.about dd { margin: 0; white-space: pre-wrap; }

/* ---------- budgets */
.blist { list-style: none; margin: 0; padding: 0; }
.brow { display: grid; grid-template-columns: 1fr auto; gap: 0 10px; padding: 10px 0; border-top: 1px solid var(--line); }
.brow:first-child { border-top: 0; padding-top: 2px; }
.brow .bar { grid-column: 1 / -1; }
.b-l { min-width: 0; display: flex; flex-direction: column; }
.b-l a { color: var(--ink); text-decoration: none; }
.b-l small { color: var(--txt2); }
.b-r { font-weight: 700; font-size: 14px; text-align: right; white-space: nowrap; }

/* ---------- notifications */
.notes { list-style: none; margin: 0; padding: 0; }
.note { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-top: 1px solid var(--line); }
.note:first-child { border-top: 0; }
.n-ic { width: 36px; height: 36px; border-radius: 12px; display: grid; place-items: center; background: var(--soft); color: var(--acc-ink); flex: none; }
.note.warn .n-ic { background: var(--warn-bg); color: var(--warn-fg); }
.n-t { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.n-t a, .n-t b { font-weight: 600; color: var(--ink); text-decoration: none; }
.n-t small { color: var(--txt2); }
.m-foot { text-align: center; margin: 14px 0 0; font-size: 14px; }
.more-list { display: flex; flex-direction: column; }
.more-list a { display: flex; align-items: center; gap: 12px; padding: 13px 4px; border-top: 1px solid var(--line); color: var(--ink); text-decoration: none; font-weight: 600; }
.more-list a:first-child { border-top: 0; }
.more-list a span { flex: 1; }
.more-list a svg:last-child { color: var(--txt3); }

/* ---------- shopping */
.shop-head .tabs { margin-top: 8px; }
.shop-g h2 { font: 600 16px var(--serif); display: flex; align-items: center; gap: 8px; margin: 18px 2px 8px; }
.shop-g h2 small { font: 600 13px var(--sans); color: var(--txt3); }
.shop-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.shop-list li { display: flex; align-items: center; gap: 6px; background: var(--paper); border: 1px solid var(--line); border-radius: 14px; padding-right: 6px; }
.shop-item { flex: 1; min-width: 0; display: flex; align-items: center; gap: 12px; padding: 14px 12px; background: none; border: 0; text-align: left; cursor: pointer; min-height: 62px; }
.box { width: 26px; height: 26px; border-radius: 8px; border: 2px solid var(--txt3); flex: none; }
.shop-item:hover .box { border-color: var(--acc); background: var(--soft); }
.s-t { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.s-t b { font-size: 16px; font-weight: 600; }
.s-t small { color: var(--txt2); }
.s-p { font-weight: 700; }

/* ---------- received + exchange */
.rlist { list-style: none; margin: 0; padding: 0; }
.rlist li { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-top: 1px solid var(--line); }
.rlist li:first-child { border-top: 0; }
.rlist li.done .r-main b { color: var(--txt2); }
.r-main { flex: 1; min-width: 0; display: flex; flex-direction: column; text-align: left; background: none; border: 0; padding: 2px 0; cursor: pointer; }
.r-main b { font-weight: 600; } .r-main small { color: var(--txt2); }
.ty input { width: 22px; height: 22px; accent-color: var(--acc); cursor: pointer; margin: 0; }
.plist { list-style: none; margin: 0 0 10px; padding: 0; }
.plist li { display: flex; align-items: center; gap: 10px; padding: 7px 0; border-top: 1px solid var(--line); }
.plist li:first-child { border-top: 0; }
.plist li > span:nth-child(2), .plist li > span:first-child { flex: 1; }
.av-s { width: 30px; height: 30px; border-radius: 50%; background: var(--soft2); color: var(--acc-ink); display: grid; place-items: center; font-size: 12px; font-weight: 700; flex: none !important; }
.inline-add { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.inline-add input, .inline-add select { flex: 1 1 140px; min-width: 0; }
.reveal-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; margin-bottom: 10px; }
.rv { display: flex; align-items: center; justify-content: center; gap: 6px; min-height: 52px; padding: 10px; border-radius: 14px; border: 1px solid var(--line); background: var(--soft); font-weight: 600; cursor: pointer; }
.rv.done { background: var(--paper); color: var(--txt2); }
.cta { text-align: center; margin: 4px 0 18px; }
.reveal { text-align: center; padding: 8px 4px; }
.reveal > svg { color: var(--acc-ink); margin-bottom: 6px; }
.reveal h2 { font: 600 22px var(--serif); margin-bottom: 6px; }
.big-name { font-size: 38px !important; color: var(--acc-ink); margin: 4px 0 8px !important; }

/* ---------- search */
.search-big { display: flex; align-items: center; gap: 10px; background: var(--paper); border: 1px solid var(--line); border-radius: 16px; padding: 0 16px; margin-bottom: 16px; color: var(--txt3); box-shadow: 0 1px 2px var(--shadow); }
.search-big:focus-within { border-color: var(--acc); box-shadow: 0 0 0 3px var(--soft2); }
.search-big input { flex: 1; border: 0; outline: 0; background: transparent; padding: 14px 0; font-size: 17px; color: var(--ink); min-width: 0; }

/* ---------- forms */
.fld { display: block; margin: 0 0 12px; min-width: 0; }
.lbl { display: block; font-size: 13px; font-weight: 600; color: var(--txt2); margin-bottom: 5px; }
.hint { display: block; color: var(--txt3); font-size: 12px; margin-top: 4px; }
.ferr { display: block; color: var(--danger); font-size: 12.5px; font-weight: 600; margin-top: 4px; }
.fld.bad input, .fld.bad select { border-color: var(--danger); }
input:not([type=checkbox]):not([type=radio]):not([type=file]), select, textarea {
  width: 100%; min-height: 44px; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--paper); color: var(--ink); font-size: 16px; outline: none; transition: border-color .15s, box-shadow .15s; }
.search-in input, .search-big input { min-height: 0 !important; border: 0 !important; box-shadow: none !important; padding-left: 0 !important; padding-right: 0 !important; }
input:focus, select:focus, textarea:focus { border-color: var(--acc); box-shadow: 0 0 0 3px var(--soft2); }
input[readonly] { background: var(--soft); }
textarea { resize: vertical; min-height: 64px; }
select { cursor: pointer; }
.dark input[type=date] { color-scheme: dark; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
@media (max-width: 360px) { .row2 { grid-template-columns: 1fr; } }
.money { position: relative; display: block; }
.money .cur { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--txt3); font-weight: 600; pointer-events: none; }
.money input { padding-left: 30px !important; }
.checks { display: flex; flex-wrap: wrap; gap: 6px; }
.checks.col { flex-direction: column; gap: 8px; margin-bottom: 12px; }
.ck { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-size: 14px; }
.checks .ck { padding: 6px 11px 6px 9px; border: 1px solid var(--line); border-radius: 99px; background: var(--paper); }
.checks.col .ck { border: 0; padding: 2px 0; background: none; }
.checks .ck:has(input:checked) { background: var(--soft2); border-color: var(--acc); }
.ck input { width: 18px; height: 18px; accent-color: var(--acc); margin: 0; flex: none; }
.ck.inline { margin-top: 6px; }
details.more { border-top: 1px solid var(--line); margin-top: 6px; padding-top: 10px; }
details.more > summary { cursor: pointer; font-weight: 600; color: var(--acc-ink); margin-bottom: 10px; }
.ph-pick { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.ph-prev { width: 64px; height: 64px; border-radius: 14px; background: var(--soft); color: var(--txt3); display: grid; place-items: center; overflow: hidden; flex: none; }
.ph-prev.round { border-radius: 50%; }
.ph-prev img { width: 100%; height: 100%; object-fit: cover; }
.g-hero { width: 100%; max-height: 220px; object-fit: cover; border-radius: 14px; margin-bottom: 12px; }
.pchips { display: flex; flex-wrap: wrap; gap: 6px; }
.pchip { display: inline-flex; align-items: center; gap: 5px; padding: 6px 11px; border-radius: 99px; border: 1px solid var(--line); background: var(--paper); font-size: 13px; font-weight: 600; cursor: pointer; color: var(--txt2); }
.pchip.on { background: var(--acc); border-color: var(--acc); color: var(--on-acc); }
.rhint:empty { display: none; }
.rhint { margin-top: -6px; margin-bottom: 12px; }
.swatches { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 8px; }
.sw { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 10px 6px; border-radius: 14px; border: 1px solid var(--line); background: var(--paper); font-size: 12.5px; font-weight: 600; cursor: pointer; }
.sw span { width: 34px; height: 34px; border-radius: 50%; background: var(--c); box-shadow: 0 0 0 4px var(--b), 0 0 0 5px var(--line); }
.sw.on { border-color: var(--acc); box-shadow: 0 0 0 2px var(--acc); }
.seg { display: inline-flex; background: var(--soft); border-radius: 12px; padding: 3px; gap: 2px; flex-wrap: wrap; }
.seg button { display: inline-flex; align-items: center; gap: 6px; border: 0; background: transparent; padding: 8px 14px; border-radius: 10px; font-weight: 600; font-size: 14px; cursor: pointer; color: var(--txt2); }
.seg button.on { background: var(--paper); color: var(--ink); box-shadow: 0 1px 3px var(--shadow), 0 1px 2px rgb(0 0 0 / .08); }
.faq { border-top: 1px solid var(--line); }
.faq:first-of-type { border-top: 0; }
.faq summary { cursor: pointer; font-weight: 600; padding: 12px 0; }
.faq div { color: var(--txt2); padding-bottom: 12px; }

/* ---------- modal + toast */
#modal { position: fixed; inset: 0; z-index: 60; background: rgb(20 12 16 / .42); display: flex; align-items: flex-end; justify-content: center; }
.sheet { background: var(--paper); width: 100%; max-width: 580px; max-height: 92vh; max-height: 92dvh; overflow-y: auto; overscroll-behavior: contain; border-radius: 22px 22px 0 0; padding: 18px 18px calc(18px + var(--safe-b)); box-shadow: 0 -10px 40px rgb(0 0 0 / .18); animation: up .22s ease-out; outline: none; }
.sheet.small { max-width: 440px; }
.sheet h2 { font: 600 20px var(--serif); }
.sheet > form > h2, .sheet > h2 { margin-bottom: 8px; }
@keyframes up { from { transform: translateY(30px); opacity: .4; } to { transform: none; opacity: 1; } }
@media (min-width: 640px) { #modal { align-items: center; padding: 20px; } .sheet { border-radius: 22px; padding: 22px 24px; } }
@media (min-width: 900px) { #modal:has(.side-sheet) { justify-content: flex-end; align-items: stretch; padding: 0; } .side-sheet { max-width: 420px; max-height: none; height: 100%; border-radius: 0; animation: none; } }
@media (prefers-reduced-motion: reduce) { .sheet { animation: none; } * { transition: none !important; } }
.mhead { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: -4px -6px 12px 0; }
.actions { display: flex; align-items: center; gap: 8px; margin-top: 16px; flex-wrap: wrap; }
.actions.center { justify-content: center; }
.sheet > form > .actions { position: sticky; bottom: calc(-18px - var(--safe-b)); background: var(--paper); padding: 12px 0 4px; margin-bottom: -4px; border-top: 1px solid var(--line); }
.onb { text-align: left; }
.onb h2 { font-size: 24px; margin-bottom: 6px; }
.onb-hero { display: flex; justify-content: center; margin: 6px 0 14px; color: var(--acc-ink); }
.onb-hero .logo { width: 64px; height: 64px; border-radius: 20px; } .onb-hero .logo svg { width: 34px; height: 34px; }
.dots { display: flex; gap: 6px; justify-content: center; margin-bottom: 14px; }
.dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--soft2); }
.dots i.on { background: var(--acc); width: 22px; border-radius: 4px; }
.choice { display: grid; gap: 10px; margin: 14px 0; }
.choice-b { text-align: left; padding: 14px 16px; border-radius: 16px; border: 1px solid var(--line); background: var(--paper); cursor: pointer; display: flex; flex-direction: column; gap: 3px; }
.choice-b:hover { border-color: var(--acc); background: var(--soft); }
.choice-b b { display: flex; align-items: center; gap: 8px; font-size: 16px; }
.choice-b small { color: var(--txt2); }
#toast { position: fixed; z-index: 70; left: 50%; bottom: calc(84px + var(--safe-b)); transform: translate(-50%, 20px); opacity: 0; pointer-events: none; max-width: calc(100% - 32px); width: max-content; display: flex; align-items: center; gap: 12px; padding: 11px 16px; border-radius: 14px; background: #2A2326; color: #fff; font-size: 14px; font-weight: 500; box-shadow: 0 10px 30px rgb(0 0 0 / .25); transition: opacity .2s, transform .2s; }
.dark #toast { background: #F3EEF0; color: #19141A; }
#toast.show { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
.t-act { background: none; border: 0; color: inherit; font-weight: 800; text-decoration: underline; cursor: pointer; padding: 4px; }
@media (min-width: 900px) { #toast { bottom: 24px; } }

/* ---------- print */
#print { display: none; }
@media print {
  body.printing #app, body.printing #modal, body.printing #toast { display: none !important; }
  body.printing #print { display: block; }
  body { background: #fff; color: #000; font-size: 11pt; }
  .pdoc header { border-bottom: 2px solid #000; margin-bottom: 12pt; padding-bottom: 6pt; }
  .pdoc h1 { font: 600 22pt var(--serif); } .pdoc header p { margin: 2pt 0 0; color: #444; }
  .pdoc h2 { font: 600 14pt var(--serif); margin: 14pt 0 6pt; } .pdoc h2 small { font: 10pt var(--sans); color: #555; }
  .pdoc table { width: 100%; border-collapse: collapse; } .pdoc th, .pdoc td { text-align: left; padding: 5pt 6pt; border-bottom: 1px solid #ccc; vertical-align: top; }
  .pdoc th { font-size: 9pt; text-transform: uppercase; color: #555; } .pdoc .n { text-align: right; } .pdoc .ck { width: 18pt; font-size: 13pt; }
  .pdoc small { color: #555; } .pdoc .tot { text-align: right; margin-top: 6pt; } .pdoc footer { margin-top: 20pt; font-size: 9pt; color: #777; text-align: center; }
  tr { break-inside: avoid; }
}

/* ================================================================ Teacher Planner additions */
:root { --g-a: #DDF0E3; --g-a-t: #1F6B3A; --g-b: #DCEAF7; --g-b-t: #24577E; --g-c: #FBF0CF; --g-c-t: #7A5310; --g-d: #FBE3D2; --g-d-t: #8F3A12; --g-f: #F8D9D7; --g-f-t: #9E1C14; }
.dark { --g-a: #1E3A28; --g-a-t: #A8D8B2; --g-b: #1F3647; --g-b-t: #A9CDEA; --g-c: #4A3B1F; --g-c-t: #F2D49A; --g-d: #48291A; --g-d-t: #F6C3A6; --g-f: #4A2222; --g-f-t: #F2B8B5; }
.g-a { background: var(--g-a); color: var(--g-a-t); } .g-b { background: var(--g-b); color: var(--g-b-t); } .g-c { background: var(--g-c); color: var(--g-c-t); }
.g-d { background: var(--g-d); color: var(--g-d-t); } .g-f { background: var(--g-f); color: var(--g-f-t); }
.st-assigned, .st-na { background: var(--st-idea); color: var(--st-idea-t); } .st-turned { background: var(--st-bought); color: var(--st-bought-t); } .st-late { background: var(--st-tobuy); color: var(--st-tobuy-t); }
.st-missing { background: var(--g-f); color: var(--g-f-t); } .st-excused { background: var(--st-wrapped); color: var(--st-wrapped-t); } .st-graded, .st-returned { background: var(--st-given); color: var(--st-given-t); }
span.chip { cursor: default; }
.row3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 12px; }
@media (max-width: 560px) { .row3 { grid-template-columns: 1fr 1fr; } .row3 > :last-child:nth-child(odd) { grid-column: 1 / -1; } }
.saved { font-size: 12px; font-weight: 600; color: var(--txt3); white-space: nowrap; display: none; }
.saved::before { content: "✓ "; color: var(--ok); }
.saved[data-st="saving"]::before { content: "• "; color: var(--txt3); }
.saved[data-st="error"] { color: var(--danger); } .saved[data-st="error"]::before { content: "! "; color: var(--danger); }
@media (min-width: 600px) { .saved { display: inline; } }
.side-tg { display: none; }
@media (min-width: 900px) {
  .side-tg { display: inline-grid; }
  body.side-min #app { grid-template-columns: 72px 1fr; background: linear-gradient(90deg, var(--paper) 0 71px, var(--line) 71px 72px, transparent 72px); }
  body.side-min .side { padding: 18px 10px; } body.side-min .side nav a span, body.side-min .brand span, body.side-min .brandlink { display: none; }
  body.side-min .side nav a { justify-content: center; padding: 10px; } body.side-min .brand { justify-content: center; }
}
@media (min-width: 900px) and (max-width: 1180px) { body:not(.side-max) #app { grid-template-columns: 220px 1fr; } }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; margin-bottom: 16px; }
.cards .card { margin: 0; }
.card.mini { padding: 14px; }
.card.span2 { grid-column: 1 / -1; }
.ccard { display: flex; flex-direction: column; gap: 2px; text-decoration: none; color: var(--ink); border-left: 5px solid var(--cc); }
.ccard b { font: 600 17px var(--serif); } .ccard small { color: var(--txt2); } .cc-m { font-size: 13px; font-weight: 600; color: var(--acc-ink); margin-top: 6px; }
.cdot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; flex: none; vertical-align: 0; }
.cchip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px 3px 8px; border-radius: 99px; background: var(--soft); font-size: 12.5px; font-weight: 600; margin: 2px 4px 2px 0; }
.flag { display: inline-flex; align-items: center; gap: 2px; padding: 1px 6px; border-radius: 6px; font-size: 10.5px; font-weight: 800; letter-spacing: .02em; margin-left: 4px; vertical-align: 1px; }
.f-iep { background: var(--st-bought); color: var(--st-bought-t); } .f-504 { background: var(--st-wrapped); color: var(--st-wrapped-t); } .f-al { background: var(--g-f); color: var(--g-f-t); } .f-med { background: var(--g-d); color: var(--g-d-t); }
.priv { display: inline-block; padding: 1px 7px; border-radius: 6px; background: var(--st-idea); color: var(--st-idea-t); font: 700 10.5px var(--sans); letter-spacing: .04em; text-transform: uppercase; vertical-align: 2px; margin-left: 4px; }
.card.private { border-style: dashed; }
.gpill, .gavg { display: inline-flex; align-items: baseline; gap: 6px; padding: 3px 9px; border-radius: 8px; font-weight: 700; font-size: 13.5px; white-space: nowrap; }
.gavg { border: 0; cursor: pointer; font-family: var(--sans); }
.gavg small { font-size: 11.5px; opacity: .85; }
.bar > i:only-child { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 99px; background: var(--acc); }
.bar.g-a, .bar.g-b, .bar.g-c, .bar.g-d, .bar.g-f { background: var(--soft2); color: inherit; }
.bar.g-a i { background: var(--g-a-t) !important; } .bar.g-b i { background: var(--g-b-t) !important; } .bar.g-c i { background: #C28A1A !important; } .bar.g-d i { background: var(--g-d-t) !important; } .bar.g-f i { background: var(--g-f-t) !important; }
.stats4, .stats5 { display: grid; gap: 8px; margin-bottom: 16px; grid-template-columns: repeat(2, 1fr); }
@media (min-width: 620px) { .stats4 { grid-template-columns: repeat(4, 1fr); } .stats5 { grid-template-columns: repeat(5, 1fr); } }
.stats5 > :first-child:nth-last-child(5) { grid-column: auto; }
@media (max-width: 619px) { .stats5 > :last-child { grid-column: 1 / -1; } }
.stats4 .stile, .stats5 .stile { background: var(--paper); border: 1px solid var(--line); color: var(--ink); padding: 12px 8px; box-shadow: 0 1px 2px var(--shadow); align-items: flex-start; border-radius: 14px; }
.stats4 .stile b, .stats5 .stile b { font-size: 24px; color: var(--acc-ink); }
.stats4 .stile span, .stats5 .stile span { color: var(--txt2); font-size: 12.5px; white-space: normal; }
.stile.warn b { color: var(--warn-fg); } .stile.warn { border-color: var(--warn-bg); }
.slist, .rows { list-style: none; margin: 0; padding: 0; }
.slist li, .srow { display: flex; align-items: center; gap: 8px; padding: 7px 0; border-top: 1px solid var(--line); }
.slist li:first-child, .srow:first-child { border-top: 0; }
.slist a, .srow > a { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; flex: 1; min-width: 0; }
.slist small { color: var(--txt2); }
.sr-t { display: flex; flex-direction: column; min-width: 0; } .sr-t b { font-weight: 600; } .sr-t b small { font-weight: 500; color: var(--txt2); } .sr-t > small { color: var(--txt2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sr-f { flex: none; }
.schecks { border: 1px solid var(--line); border-radius: 12px; padding: 8px; margin-bottom: 12px; }
.sc-tools { display: flex; gap: 10px; align-items: center; margin-bottom: 6px; } .sc-tools input { min-height: 36px !important; padding: 6px 10px !important; }
.sc-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 4px 12px; max-height: 260px; overflow-y: auto; padding: 4px; }
.catrow, .trow, .strow, .scrow, .qcrow { display: flex; gap: 8px; align-items: center; margin-bottom: 8px; }
.catrow > input[name=cn], .trow > input[name=tn], .strow > input[name=sl] { flex: 1; min-width: 0; }
.trow input[type=date] { flex: 0 1 160px; } .strow .sk { width: 54px !important; text-align: center; text-transform: uppercase; font-weight: 700; } .strow input[type=color] { width: 44px; height: 44px; padding: 2px; border: 1px solid var(--line); border-radius: 10px; background: var(--paper); }
.strow select { flex: 0 1 190px; } .qcrow input[name=qn] { flex: 1; min-width: 0; } .qcrow input[type=time] { flex: 0 0 120px; }
@media (max-width: 520px) { .strow { flex-wrap: wrap; } .strow select { flex: 1 1 100%; } .qcrow { flex-wrap: wrap; } .qcrow input[name=qn] { flex: 1 1 100%; } .qcrow input[type=time] { flex: 1; } .trow { flex-wrap: wrap; } .trow > input[name=tn] { flex: 1 1 100%; } .trow input[type=date] { flex: 1; } }
.pct { display: inline-flex; align-items: center; gap: 4px; font-weight: 600; color: var(--txt2); }
.pct input { width: 80px !important; }
.catfoot { display: flex; align-items: center; gap: 12px; }
.swrow { display: flex; flex-wrap: wrap; gap: 6px; }
.csw { width: 32px; height: 32px; border-radius: 50%; background: var(--c); cursor: pointer; position: relative; }
.csw input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.csw:has(input:checked) { box-shadow: 0 0 0 3px var(--paper), 0 0 0 5px var(--c); }
.csw:has(input:focus-visible) { outline: 2px solid var(--acc); outline-offset: 4px; }
fieldset.gset { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px 2px; margin: 0 0 12px; }
fieldset.gset legend { font-weight: 700; font-size: 13px; color: var(--txt2); padding: 0 6px; }
.seg label { display: inline-flex; } .seg label input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.seg label span { display: inline-flex; align-items: center; padding: 8px 14px; border-radius: 10px; font-weight: 600; font-size: 14px; cursor: pointer; color: var(--txt2); }
.seg label input:checked + span { background: var(--paper); color: var(--ink); box-shadow: 0 1px 3px var(--shadow), 0 1px 2px rgb(0 0 0 / .08); }
.seg label input:focus-visible + span { outline: 2px solid var(--acc); }
.strip-row { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; flex-wrap: wrap; }
.sr-l { font-size: 13px; font-weight: 600; min-width: 140px; display: inline-flex; gap: 6px; align-items: center; }
.strip { display: flex; gap: 3px; flex-wrap: wrap; }
.strip i { width: 14px; height: 22px; border-radius: 4px; background: var(--soft2); display: block; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12.5px; color: var(--txt2); align-items: center; }
.legend span { display: inline-flex; align-items: center; gap: 5px; }
.legend i { width: 12px; height: 12px; border-radius: 4px; background: var(--soft2); display: inline-block; margin: 0; opacity: 1; }
.tag.ok { background: var(--st-given); color: var(--st-given-t); } .tag.std { background: var(--st-bought); color: var(--st-bought-t); } .tag.now-tag { background: var(--acc); color: var(--on-acc); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 2px 0 8px; }
.chips .tag { background: var(--paper); border: 1px solid var(--soft2); }
.hero { display: grid; gap: 4px 16px; }
.hero .h-side { display: flex; align-items: flex-start; } .hero .qa { grid-column: 1 / -1; }
@media (min-width: 760px) { .hero { grid-template-columns: 1fr auto; } }
/* schedule */
.datenav { display: inline-flex; align-items: center; gap: 4px; }
.dn-l { font: 600 16px var(--serif); }
.dhead { font: 600 18px var(--serif); margin: 4px 2px 12px; } .dhead small { font: 600 13px var(--sans); color: var(--txt2); margin-left: 6px; }
.week, .lweek, .cweek { display: grid; gap: 10px; margin-bottom: 16px; }
@media (min-width: 900px) { .week, .lweek.week, .cweek.week { grid-template-columns: repeat(var(--n), minmax(0, 1fr)); } }
@media (min-width: 640px) and (max-width: 899px) { .week, .lweek.week, .cweek.week { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.wcol, .lday { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r); padding: 10px; min-width: 0; display: flex; flex-direction: column; gap: 8px; box-shadow: 0 1px 2px var(--shadow); }
.wcol.today, .lday.today { border-color: var(--acc); box-shadow: 0 0 0 1px var(--acc); }
.wcol.off, .lday.off { background: var(--soft); box-shadow: none; }
.wcol.over { background: var(--soft2); }
.wcol header, .lday header { display: flex; flex-direction: column; } .wcol header b, .lday header b { font: 600 15px var(--serif); } .wcol header small, .lday header small { color: var(--txt2); font-size: 12px; }
.slot { border-radius: 12px; border-left: 4px solid var(--cc); background: var(--bg); }
.slot.dragging { opacity: .4; }
.slot[draggable] { cursor: grab; }
.slot-b { display: flex; flex-direction: column; gap: 1px; width: 100%; text-align: left; background: none; border: 0; padding: 8px 10px; cursor: pointer; }
.slot-b b { font-weight: 600; font-size: 14px; } .slot-b small { color: var(--txt2); }
.sl-l { font-size: 12.5px; color: var(--acc-ink); display: inline-flex; gap: 4px; align-items: center; text-decoration: none; overflow: hidden; text-overflow: ellipsis; }
.sl-l em { color: var(--txt3); font-style: normal; }
.conf { align-self: flex-start; padding: 1px 7px; border-radius: 6px; background: var(--warn-bg); color: var(--warn-fg); font-size: 11px; font-weight: 800; margin-top: 3px; }
.dayl { list-style: none; margin: 0; padding: 0; }
.dayl li { display: flex; align-items: center; gap: 12px; padding: 10px 4px; border-top: 1px solid var(--line); border-left: 4px solid var(--cc); padding-left: 10px; margin: 0 -4px; }
.dayl li:first-child { border-top: 0; }
.dayl li.now { background: var(--soft); border-radius: 10px; } .dayl li.past { opacity: .7; }
.dl-t { display: flex; flex-direction: column; font-weight: 700; font-size: 13.5px; min-width: 66px; } .dl-t small { color: var(--txt3); font-weight: 600; }
.dl-m { flex: 1; min-width: 0; display: flex; flex-direction: column; text-align: left; background: none; border: 0; padding: 0; cursor: pointer; }
.dl-m b a { color: var(--ink); text-decoration: none; } .dl-m small { color: var(--txt2); }
.cal-title { font: 600 19px var(--serif); text-align: center; margin-bottom: 10px; }
.cday { border: 0; text-align: left; color: inherit; cursor: default; position: relative; }
button.cday { cursor: pointer; font: inherit; }
.cday.off { background: transparent; border: 1px dashed var(--line); }
.cday .rl { position: absolute; top: 3px; right: 5px; font-size: 10.5px; font-weight: 800; color: var(--acc-ink); }
.cday .cnt { font-size: 10.5px; color: var(--txt2); padding-left: 3px; display: none; }
.cev.offev { background: var(--g-f-t); } .cev.half { background: var(--st-tobuy-t); }
@media (min-width: 700px) { .cday .cnt { display: block; } .cev.offev { background: var(--g-f); color: var(--g-f-t); } .cev.half { background: var(--st-tobuy); color: var(--st-tobuy-t); } }
.cgrid.big .cday { min-height: 96px; }
.cgrid.big .dn { background: none; border: 0; padding: 0 3px; cursor: pointer; text-align: left; font: 600 12px var(--sans); color: var(--txt2); }
.ci { display: flex; align-items: center; gap: 5px; width: 100%; min-width: 0; padding: 2px 4px; border-radius: 6px; border: 0; background: none; text-align: left; font-size: 11.5px; color: var(--ink); text-decoration: none; cursor: pointer; line-height: 1.3; }
.ci span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; } .ci small { color: var(--txt2); }
.ci:hover { background: var(--soft); } .ci.off { background: var(--g-f); color: var(--g-f-t); } .ci.more, .ci.les { color: var(--acc-ink); font-weight: 600; } .ci.half { color: var(--st-tobuy-t); font-weight: 600; } .ci.sched { cursor: default; }
@media (max-width: 699px) { .cgrid.big .cday { min-height: 54px; } .cgrid.big .ci { font-size: 0; padding: 0; height: 6px; background: var(--acc); margin-top: 2px; border-radius: 3px; } .cgrid.big .ci .cdot { display: none; } .cgrid.big .ci.les, .cgrid.big .ci.more { display: none; } }
.cweek .ci, .agenda .ci, .upl .ci { font-size: 14px; padding: 7px 8px; } .cweek .ci span, .agenda .ci span { white-space: normal; }
.agenda { display: flex; flex-direction: column; gap: 2px; padding: 4px 0; }
.upl { list-style: none; margin: 0; padding: 0; }
.upl li { display: flex; align-items: center; gap: 8px; padding: 4px 0; border-top: 1px solid var(--line); } .upl li:first-child { border-top: 0; }
.ud { display: flex; flex-direction: column; align-items: center; width: 40px; flex: none; line-height: 1.1; } .ud b { font: 700 17px var(--serif); } .ud small { font-size: 11px; color: var(--txt2); }
.wkov { display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); }
@media (min-width: 900px) { .wkov { grid-template-columns: repeat(var(--n), 1fr); } }
.wk-d { display: flex; flex-direction: column; gap: 3px; padding: 10px; border-radius: 13px; background: var(--bg); text-decoration: none; color: var(--ink); border: 1px solid transparent; }
.wk-d.today { border-color: var(--acc); background: var(--soft); } .wk-d.off { opacity: .65; }
.wk-d b { font-weight: 700; } .wk-d b span { font-family: var(--serif); } .wk-d small { color: var(--txt2); font-size: 11.5px; min-height: 1em; }
.wk-l { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 600; color: var(--txt2); } .wk-l.warn { color: var(--warn-fg); }
.lplan { border: 1px dashed var(--line); background: transparent; border-radius: 10px; padding: 6px 8px; font-size: 12.5px; font-weight: 600; color: var(--txt2); cursor: pointer; display: inline-flex; align-items: center; gap: 4px; justify-content: center; }
.lplan:hover { border-color: var(--acc); color: var(--acc-ink); }
/* attendance */
.att-bar { align-items: center; }
.date-in input { min-height: 40px !important; padding: 6px 10px !important; width: auto !important; }
.att-sum { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.as { display: inline-flex; align-items: baseline; gap: 5px; padding: 5px 10px; border-radius: 99px; background: var(--paper); border: 1px solid var(--line); font-size: 13px; color: var(--txt2); }
.as b { color: var(--sc, var(--ink)); font-size: 15px; } .as.un b { color: var(--txt3); }
.att { list-style: none; margin: 0; padding: 0; }
.arow { padding: 8px 0; border-top: 1px solid var(--line); } .arow:first-child { border-top: 0; }
.ar-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ar-n { display: flex; align-items: center; gap: 10px; flex: 1 1 180px; min-width: 0; color: var(--ink); text-decoration: none; }
@media (max-width: 520px) { .ar-n { flex: 1 1 0; } .ar-top > .icon-btn { order: 2; } .ar-top > .stbtns { order: 3; } }
.ar-n span { display: flex; flex-direction: column; min-width: 0; } .ar-n b { font-weight: 600; }
.stbtns { display: flex; gap: 4px; flex-wrap: wrap; }
.stb { min-width: 44px; min-height: 44px; border-radius: 12px; border: 1.5px solid var(--line); background: var(--paper); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 4px; padding: 0 10px; color: var(--txt2); font-weight: 700; }
.stb span { display: none; font-size: 13px; font-weight: 600; }
@media (min-width: 1100px) { .stb span { display: inline; } .stb b { display: none; } }
.stb.on { background: var(--sc); border-color: var(--sc); color: #fff; }
@media (hover: hover) { .stb:hover:not(.on) { border-color: var(--sc); color: var(--sc); } }
.ar-more { display: flex; gap: 8px; margin: 8px 0 2px 44px; }
.ar-more input[type=time] { width: 130px !important; flex: none; } .ar-more input:not([type=time]) { flex: 1; min-width: 0; }
@media (max-width: 520px) { .ar-more { margin-left: 0; } .stbtns { width: 100%; } .stb { flex: 1; } }
.spark { display: flex; align-items: flex-end; gap: 3px; height: 70px; padding-top: 6px; }
.spark i { flex: 1; min-width: 4px; background: var(--acc); border-radius: 3px 3px 0 0; opacity: .75; }
.spark i.lo { background: var(--warn-fg); } .spark i.na { background: var(--soft2); }
.hscroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.heat { border-collapse: separate; border-spacing: 2px; font-size: 12px; }
.heat th { font-weight: 600; color: var(--txt2); text-align: center; padding: 2px; white-space: nowrap; } .heat thead th span { display: block; font-size: 10px; color: var(--txt3); }
.heat td { padding: 0; text-align: center; } .heat td i { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 5px; color: #fff; font-style: normal; font-size: 10px; font-weight: 700; margin: auto; }
.heat td i.na { background: var(--soft); } .heat td.n { padding: 0 6px; font-weight: 700; color: var(--ink); }
.heat th.sticky, .gb th.sticky { position: sticky; left: 0; background: var(--paper); z-index: 1; text-align: left; padding-right: 10px; min-width: 130px; }
.heat th.sticky a, .gb th.sticky a { color: var(--ink); text-decoration: none; font-weight: 600; }
.heat tr.flagged th.sticky { color: var(--warn-fg); }
/* lessons */
.sheet.wide { max-width: 760px; }
.lweek.day { grid-template-columns: 1fr; }
.lcl { border-left: 4px solid var(--cc); padding-left: 8px; display: flex; flex-direction: column; gap: 4px; }
.lcl-n { font-size: 12px; font-weight: 700; color: var(--txt2); } .lcl-n small { font-weight: 600; color: var(--txt3); }
.lcard { display: flex; flex-direction: column; padding: 7px 9px; border-radius: 10px; background: var(--soft); color: var(--ink); text-decoration: none; }
.lcard b { font-weight: 600; font-size: 13.5px; } .lcard small { color: var(--txt2); }
.lcard.done { opacity: .7; } .lcard.done b::before { content: "✓ "; color: var(--ok); }
.lgrid { display: grid; gap: 0 16px; }
@media (min-width: 760px) { .lgrid { grid-template-columns: 1fr 1fr; } .lsec.objectives, .lsec.direct, .lsec.independent { grid-column: 1 / -1; } }
.lsec h3 { font: 700 12px var(--sans); text-transform: uppercase; letter-spacing: .06em; color: var(--acc-ink); margin-bottom: 6px; }
.lsec p { margin: 0; }
.unit { padding: 10px 0; border-top: 1px solid var(--line); } .unit:first-of-type { border-top: 0; }
.u-h { display: flex; align-items: center; gap: 8px; } .ulist { margin: 6px 0 0; padding-left: 22px; font-size: 14px; }
/* grades */
.gbwrap { overflow: auto; max-height: 72vh; background: var(--paper); border: 1px solid var(--line); border-radius: var(--r); box-shadow: 0 1px 2px var(--shadow); margin-bottom: 16px; }
.gb { border-collapse: collapse; font-size: 13.5px; min-width: 100%; }
.gb th, .gb td { border-bottom: 1px solid var(--line); border-right: 1px solid var(--line); padding: 0; }
.gb thead th { position: sticky; top: 0; background: var(--paper); z-index: 2; vertical-align: bottom; padding: 8px 6px; font-weight: 600; text-align: left; }
.gb thead th.sticky { z-index: 3; }
.gb tbody th.sticky, .gb tfoot th.sticky { padding: 6px 10px; }
.gb .ah { min-width: 92px; max-width: 120px; } .gb .ah a { display: flex; flex-direction: column; color: var(--ink); text-decoration: none; }
.gb .ah b { font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .gb .ah small { font-size: 11px; color: var(--txt2); font-weight: 500; }
.gb td.avg { padding: 4px 6px; background: var(--paper); } .gb td { text-align: center; position: relative; }
.gi { width: 100% !important; min-height: 38px !important; border: 0 !important; border-radius: 0 !important; background: transparent !important; text-align: center; padding: 6px 4px !important; font-weight: 600; font-size: 14px !important; color: inherit !important; box-shadow: none !important; }
.gi:focus { outline: 2px solid var(--acc); outline-offset: -2px; background: var(--paper) !important; color: var(--ink) !important; }
.gb td.c-miss { background: var(--g-f); color: var(--g-f-t); } .gb td.c-ex { background: var(--st-wrapped); color: var(--st-wrapped-t); } .gb td.c-in { background: var(--st-bought); }
.gb td.bad, .al-s.bad { box-shadow: inset 0 0 0 2px var(--danger); }
.gb td.na { color: var(--txt3); background: var(--soft); }
.gb .cm { position: absolute; top: 3px; right: 3px; width: 6px; height: 6px; border-radius: 50%; background: var(--acc); }
.gb tfoot td, .gb tfoot th { font-weight: 700; padding: 8px 6px; background: var(--soft); position: sticky; bottom: 0; }
.gb td.n { padding: 0 8px; font-weight: 700; }
.cats-sum { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 13px; color: var(--txt2); margin-bottom: 12px; }
.hbars { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; }
.hbars li { display: grid; grid-template-columns: minmax(70px, 40%) 1fr auto; gap: 10px; align-items: center; font-size: 13.5px; }
.hbars li > span, .hbars li > a { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hb { height: 10px; border-radius: 99px; background: var(--soft2); position: relative; overflow: hidden; }
.hb i { position: absolute; inset: 0 auto 0 0; background: var(--acc); border-radius: 99px; }
.hb.g-a i { background: var(--g-a-t); } .hb.g-b i { background: var(--g-b-t); } .hb.g-c i { background: #C28A1A; } .hb.g-d i { background: var(--g-d-t); } .hb.g-f i { background: var(--g-f-t); }
.hb.g-a, .hb.g-b, .hb.g-c, .hb.g-d, .hb.g-f { background: var(--soft2); }
.mlist { list-style: none; margin: 0; padding: 0; } .mlist li { padding: 10px 0; border-top: 1px solid var(--line); } .mlist li:first-child { border-top: 0; }
.ml-n { display: flex; align-items: center; gap: 8px; color: var(--ink); text-decoration: none; margin-bottom: 6px; }
.ml-l { display: flex; flex-direction: column; gap: 4px; padding-left: 40px; }
.mitem { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 14px; } .mitem small { color: var(--txt2); }
.bulk { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 6px 0 10px; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.bulk select { width: auto !important; min-height: 36px !important; padding: 6px 10px !important; font-size: 14px !important; }
.alist { list-style: none; margin: 0; padding: 0; }
.alist li { display: grid; grid-template-columns: auto minmax(120px, 1fr) auto auto auto; gap: 6px 10px; align-items: center; padding: 8px 0; border-top: 1px solid var(--line); }
.alist li:first-child { border-top: 0; }
.alist .sel { width: 18px; height: 18px; accent-color: var(--acc); }
.al-n { display: flex; align-items: center; gap: 8px; color: var(--ink); text-decoration: none; min-width: 0; } .al-n b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.al-s { display: inline-flex; align-items: center; gap: 2px; border-radius: 10px; padding: 0 6px 0 0; }
.al-s .si { width: 64px !important; min-height: 38px !important; text-align: center; font-weight: 700; padding: 6px !important; background: transparent !important; }
.al-s small { color: inherit; opacity: .75; }
.alist .ss { width: auto !important; min-height: 38px !important; padding: 6px 8px !important; font-size: 14px !important; }
.alist .cmt { grid-column: 2 / -1; min-height: 36px !important; padding: 6px 10px !important; font-size: 14px !important; }
.alist .late { font-size: 13px; } .alist .chip { justify-self: start; }
@media (max-width: 640px) { .alist li { grid-template-columns: auto 1fr auto; } .alist .ss { grid-column: 2; } .alist .late { grid-column: 3; } .alist .chip { grid-column: 2; } }
/* homework */
.hwl { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); margin-bottom: 16px; }
.hwc { margin: 0; display: flex; flex-direction: column; gap: 6px; text-decoration: none; color: var(--ink); border-left: 5px solid var(--cc); }
.hw-t { display: flex; flex-direction: column; } .hw-t b { font-weight: 600; font-size: 15.5px; } .hw-t small { color: var(--txt2); }
.due { font-size: 13px; font-weight: 700; color: var(--txt2); } .due.soon { color: var(--acc-ink); } .due.past { color: var(--warn-fg); }
.hw-c { font-size: 13px; color: var(--txt2); } .hw-c b { color: var(--ink); }
.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th, .tbl td { text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--line); } .tbl th { font-size: 12px; color: var(--txt2); text-transform: uppercase; letter-spacing: .04em; } .tbl .n { text-align: right; }
.tbl a { color: var(--ink); text-decoration: none; font-weight: 600; }
.cbar { display: flex; align-items: center; gap: 8px; min-width: 140px; } .cbar .bar { flex: 1; margin: 0; } .cbar b { font-size: 13px; min-width: 48px; }
textarea.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 14px !important; }
/* tasks + quick */
.tasks { list-style: none; margin: 0; padding: 0; }
.tasks li { display: flex; align-items: center; gap: 8px; padding: 6px 0; border-top: 1px solid var(--line); } .tasks li:first-child { border-top: 0; }
.tasks li.done .r-main b { text-decoration: line-through; color: var(--txt3); }
.tasks li.p2 .r-main b::after { content: " ●"; color: var(--danger); font-size: 10px; vertical-align: 2px; }
.tasks .ck input { width: 22px; height: 22px; }
.idea-add select { width: auto !important; flex: none; }
.quick { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.qbtn { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 14px 6px; border-radius: 14px; border: 1px solid var(--line); background: var(--paper); cursor: pointer; font-weight: 600; font-size: 13px; color: var(--ink); text-align: center; }
.qbtn svg { color: var(--acc-ink); } .qbtn:hover { border-color: var(--acc); background: var(--soft); }
.choice-b.danger b { color: var(--danger); }
/* print additions */
@media print {
  .pdoc.land { } .pdoc table.wk td { width: 20%; } .pdoc .pslot { margin-bottom: 6pt; font-size: 9.5pt; }
  .plesson { break-after: page; } .plesson:last-child { break-after: auto; } .plesson h2 { font-size: 16pt; margin-top: 0; } .plesson .meta { color: #444; } .plesson h3 { font: 700 9pt var(--sans); text-transform: uppercase; letter-spacing: .05em; margin: 10pt 0 2pt; color: #333; } .plesson p { margin: 0 0 4pt; }
  .pdoc .lines { height: 120pt; background: repeating-linear-gradient(#fff 0 22pt, #bbb 22pt 23pt); }
  .pdoc .ptext { white-space: pre-wrap; font: 11pt var(--sans); }
  @page { margin: 14mm; }
}

/* ================================================================ phase 2: behavior, seating, parents, reports, supplies, sub notes */
.stats7 { grid-template-columns: repeat(auto-fit, minmax(112px, 1fr)) !important; }
.stats7 > * { grid-column: auto !important; }
.nomb { margin: 0; }
.bh-h { font: 700 12px var(--sans); text-transform: uppercase; letter-spacing: .05em; color: var(--txt2); margin: 14px 0 8px; }
.card > .bh-h:first-child, .bpad > .c-head + .bh-h { margin-top: 2px; }
.clist, .blist, .suplist, .shoplist, .chkl, .subsched { list-style: none; margin: 0; padding: 0; }
.crow, .brow { display: flex; gap: 10px; align-items: flex-start; padding: 10px 0; border-top: 1px solid var(--line); }
.crow:first-child, .brow:first-child { border-top: 0; }
.cr-ic, .b-ic { width: 34px; height: 34px; border-radius: 11px; background: var(--soft); color: var(--acc-ink); display: grid; place-items: center; flex: none; margin-top: 2px; }
.brow.pos .b-ic { background: var(--g-a); color: var(--g-a-t); } .brow.con .b-ic { background: var(--g-d); color: var(--g-d-t); }
.cr-m { flex: 1; min-width: 0; }
.cr-m .r-main { width: 100%; }
.cr-s { margin: 4px 0 0; white-space: pre-wrap; font-size: 14px; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.cr-o, .cr-f, .cr-l { margin: 4px 0 0; font-size: 13px; color: var(--txt2); display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.cr-f.neg { font-weight: 600; } .cr-l a { font-size: 12.5px; text-decoration: none; display: inline-flex; gap: 3px; align-items: center; }
.bp { font: 700 11.5px var(--sans); color: var(--g-a-t); background: var(--g-a); padding: 0 6px; border-radius: 99px; margin-left: 2px; vertical-align: 1px; }
.tag.sev2 { background: var(--g-d); color: var(--g-d-t); } .tag.sev3 { background: var(--g-f); color: var(--g-f-t); }
.fu .ud.late b, .fu .ud.late small { color: var(--danger); }
.fu-b { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.crow.fu { align-items: center; } .crow.fu.done { opacity: .6; }
.fam-av { width: 40px; height: 40px; background: var(--soft2); color: var(--acc-ink); }
.frow .sr-t small + small { margin-top: 1px; }
.gl { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.gl .btn { font-weight: 600; }
.fnote { margin-top: 12px; padding: 10px 12px; border-radius: 12px; background: var(--soft); } .fnote p { margin: 4px 0 0; white-space: pre-wrap; }
.kidsum { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.kid { display: flex; align-items: center; gap: 8px; padding: 6px 12px 6px 6px; border: 1px solid var(--line); border-radius: 99px; text-decoration: none; color: var(--ink); }
.kid span { display: flex; flex-direction: column; line-height: 1.2; } .kid small { color: var(--txt2); font-size: 12px; }
.tplc .tp-s { margin: 0 0 4px; } .tplc .tp-b { white-space: pre-wrap; color: var(--txt2); font-size: 13.5px; display: -webkit-box; -webkit-line-clamp: 5; -webkit-box-orient: vertical; overflow: hidden; }
.phs { display: flex; flex-wrap: wrap; gap: 6px; } .tag.ph { border: 0; cursor: pointer; font-family: ui-monospace, Menlo, Consolas, monospace; }
.tag.ph:hover { background: var(--acc); color: var(--on-acc); }
.cf-fam { display: flex; gap: 6px; align-items: center; margin: -4px 0 10px; }

/* behavior */
.btiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; }
.btile { position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 10px 4px 8px; border-radius: 14px; border: 2px solid var(--line); background: var(--paper); cursor: pointer; min-width: 0; color: var(--ink); }
.btile b { font-size: 13.5px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .btile small { font-size: 11.5px; color: var(--txt2); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.btile.on { border-color: var(--acc); background: var(--soft); box-shadow: 0 0 0 2px var(--soft2); }
.btile.on::after { content: "✓"; position: absolute; top: 4px; left: 6px; width: 20px; height: 20px; border-radius: 50%; background: var(--acc); color: var(--on-acc); font: 700 12px/20px var(--sans); text-align: center; }
.bt-n { display: flex; gap: 3px; min-height: 16px; } .bt-n i, .s-bc i { font: 700 11px/16px var(--sans); padding: 0 5px; border-radius: 99px; font-style: normal; }
.bt-n .pos, .s-bc .pos { background: var(--g-a); color: var(--g-a-t); } .bt-n .con, .s-bc .con { background: var(--g-d); color: var(--g-d-t); }
.bt-p { position: absolute; top: 5px; right: 6px; font: 700 11px/18px var(--sans); min-width: 22px; padding: 0 5px; border-radius: 99px; background: var(--soft2); color: var(--acc-ink); }
.bcats { display: flex; flex-wrap: wrap; gap: 8px; }
.bcat { display: inline-flex; align-items: center; gap: 7px; min-height: 46px; padding: 8px 14px; border-radius: 14px; border: 1px solid transparent; font-weight: 600; font-size: 14.5px; cursor: pointer; }
.bcat.pos { background: var(--g-a); color: var(--g-a-t); } .bcat.con { background: var(--g-d); color: var(--g-d-t); }
.bcat small { font: 700 11px var(--sans); background: rgb(255 255 255 / .55); color: inherit; padding: 1px 6px; border-radius: 99px; } .dark .bcat small { background: rgb(0 0 0 / .25); }
.bcat:hover { filter: brightness(.97); border-color: currentColor; } .bcat:active { transform: scale(.97); }
.bf-who { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; margin: 0 0 12px; } .bf-who span { margin-left: 6px; font-weight: 600; }
.wbars { display: grid; grid-template-columns: repeat(10, 1fr); gap: 6px; height: 170px; align-items: end; }
.wb { display: flex; flex-direction: column; align-items: center; gap: 4px; height: 100%; justify-content: flex-end; min-width: 0; }
.wb-s { width: 100%; max-width: 34px; flex: 1; display: flex; flex-direction: column-reverse; border-radius: 8px 8px 3px 3px; overflow: hidden; background: var(--soft); }
.wb-s i { display: block; } .wb-s i.p { background: var(--g-a-t); } .wb-s i.c { background: #D9822B; }
.wb small { font-size: 10.5px; color: var(--txt3); white-space: nowrap; }
.legend .lg-p { background: var(--g-a-t); } .legend .lg-c { background: #D9822B; }
.goal-t { font: 600 18px var(--serif); margin: 0; }
.tlist { list-style: none; margin: 0; padding: 0; } .tlist li { display: flex; align-items: center; gap: 10px; padding: 7px 0; border-top: 1px solid var(--line); } .tlist li:first-child { border-top: 0; }
.tlist span { flex: 1; min-width: 0; display: flex; flex-direction: column; } .tlist small { color: var(--txt2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .tlist .tp { font: 700 20px var(--serif); color: var(--acc-ink); }
.ptbl td { vertical-align: middle; } .pt-b { text-align: right; white-space: nowrap; } .pt-b .btn { margin-left: 4px; }
.choice-b.dim { opacity: .55; cursor: not-allowed; } .choice-b input { width: 18px; height: 18px; accent-color: var(--acc); }
.tnames { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin-bottom: 10px; } .tn { display: flex; align-items: center; gap: 8px; }
.tassign { display: grid; gap: 6px; max-height: 48vh; overflow-y: auto; padding: 2px; }
.ta-row { display: flex; align-items: center; gap: 10px; } .ta-row span { flex: 1; min-width: 0; font-weight: 600; font-size: 14px; } .ta-row select { width: 150px !important; min-height: 38px; padding: 6px 10px; }
.bcrow, .cbrow { display: flex; gap: 8px; align-items: center; margin-bottom: 8px; } .bcrow > input[name=bn] { flex: 1; min-width: 0; } .cbrow textarea { flex: 1; min-height: 54px; }
.dgoal { display: block; text-decoration: none; color: var(--ink); margin: 6px 0 10px; } .dgoal small { display: block; }

/* points board (projectable, student-safe) */
body[data-view="board"] .side, body[data-view="board"] .top, body[data-view="board"] .bnav, body[data-view="board"] .fab, body[data-view="board"] .foot, body[data-view="board"] #banner { display: none !important; }
body[data-view="board"] #app { display: block; background: none; } body[data-view="board"] .wrap { padding-bottom: 0; } body[data-view="board"] #main { max-width: none; padding: 16px; }
.board { min-height: calc(100vh - 32px); }
.bd-h { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; } .bd-h h2 { font: 600 clamp(24px, 4vw, 44px)/1.1 var(--serif); }
.bd-tap { font-size: 14px; }
.bd-goal { margin-bottom: 16px; } .bd-goal:empty { display: none; } .bg-t { display: flex; justify-content: space-between; align-items: center; gap: 10px; font: 600 clamp(16px, 2.2vw, 24px) var(--serif); }
.bg-t b { display: inline-flex; gap: 8px; align-items: center; } .bd-goal .bar { height: 18px; margin: 8px 0; } .bd-win { font: 700 clamp(18px, 2.4vw, 28px) var(--serif); color: var(--ok); margin: 6px 0 0; }
.bd-teams { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin-bottom: 16px; }
.bd-team { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 14px 8px; border-radius: 18px; border: 0; background: color-mix(in srgb, var(--tc) 16%, var(--paper)); border-bottom: 6px solid var(--tc); color: var(--ink); cursor: pointer; }
.bd-team b { font: 700 clamp(30px, 4.5vw, 52px)/1 var(--serif); } .bd-team span { font-weight: 700; font-size: clamp(14px, 1.6vw, 18px); }
.bd-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(clamp(110px, 12vw, 150px), 1fr)); gap: 10px; }
.bd-s { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 14px 6px 12px; border-radius: 18px; border: 1px solid var(--line); background: var(--paper); cursor: pointer; color: var(--ink); box-shadow: 0 1px 2px var(--shadow); }
.bd-s b { font-size: clamp(15px, 1.6vw, 19px); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .bd-n { font: 700 clamp(26px, 3.4vw, 40px)/1 var(--serif); color: var(--acc-ink); }
.pop { animation: pop .45s ease-out; } @keyframes pop { 0% { transform: scale(1); } 35% { transform: scale(1.08); background: var(--soft2); } 100% { transform: scale(1); } }

/* seating */
.seatwrap { display: grid; gap: 14px; align-items: start; }
@media (min-width: 1000px) { .seatwrap { grid-template-columns: minmax(0, 1fr) 320px; } }
.room-box { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r); padding: 12px; box-shadow: 0 1px 2px var(--shadow); min-width: 0; }
.room-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; padding: 2px 2px 12px; }
.front-l { display: flex; align-items: center; justify-content: center; gap: 6px; font-size: 12px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--txt3); margin: 0 0 8px; }
.room { display: grid; grid-template-columns: repeat(var(--cols), minmax(0, 1fr)); grid-template-rows: repeat(var(--rows), minmax(0, 1fr)); gap: 6px; aspect-ratio: var(--cols) / var(--rows); min-width: calc(var(--cols) * 56px); position: relative; border-radius: 12px; }
.room.m-arrange { background-image: radial-gradient(circle, var(--line) 1.3px, transparent 1.6px); background-size: calc((100% + 6px) / var(--cols)) calc((100% + 6px) / var(--rows)); background-position: calc(-3px + ((100% + 6px) / var(--cols)) / 2 - 3px) calc(-3px + ((100% + 6px) / var(--rows)) / 2 - 3px); outline: 1px dashed var(--line); }
.it { position: relative; border-radius: 12px; background: var(--soft); border: 1px solid var(--soft2); padding: 3px; min-width: 0; min-height: 0; display: flex; }
.it-round { border-radius: 50%; padding: 12%; } .it-flex { border-style: dashed; background: transparent; } .it-shape { border-style: dashed; background: var(--soft); }
.it-teacher { background: #E9DCC9; border-color: #D7C4A8; color: #5B4630; } .dark .it-teacher { background: #3E3326; border-color: #57462F; color: #E8D7BD; }
.it-board { background: #2F4A3E; border-color: #2F4A3E; color: #E9F2EC; } .it-door { background: transparent; border: 2px dashed var(--txt3); color: var(--txt2); }
.it-l { margin: auto; display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; font-weight: 700; text-align: center; line-height: 1.15; padding: 2px; overflow: hidden; }
.it-tag { position: absolute; left: 50%; bottom: -1px; transform: translate(-50%, 50%); font: 700 10px var(--sans); background: var(--paper); border: 1px solid var(--line); border-radius: 99px; padding: 0 6px; white-space: nowrap; color: var(--txt2); z-index: 1; }
.it-acc { position: absolute; top: -6px; right: -6px; font-size: 11px; background: var(--paper); border-radius: 50%; width: 18px; height: 18px; display: grid; place-items: center; border: 1px solid var(--line); }
.seats { display: grid; grid-template-columns: repeat(var(--sc), minmax(0, 1fr)); gap: 3px; width: 100%; }
.seat { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; min-width: 0; min-height: 0; padding: 3px 2px; border-radius: 9px; border: 1px solid var(--line); background: var(--paper); color: var(--ink); font-size: 11.5px; line-height: 1.1; overflow: hidden; }
button.seat { cursor: pointer; } .seat b { font-weight: 700; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .seat small { font-size: 10px; color: var(--txt3); }
.seat .av { width: 22px !important; height: 22px !important; font-size: 9px !important; }
.seat.empty { background: transparent; border-style: dashed; } .seat.empty small { color: var(--txt3); }
.seat.picked, .uchip.picked { outline: 3px solid var(--acc); outline-offset: 1px; background: var(--soft2); }
.seat.over { outline: 3px dashed var(--acc); background: var(--soft2); }
.seat.warn { box-shadow: inset 0 0 0 2px var(--danger); }
.seat.has-st { background: color-mix(in srgb, var(--stc) 18%, var(--paper)); border-color: var(--stc); }
.s-st { position: absolute; top: 2px; right: 3px; font: 800 10px/14px var(--sans); color: #fff; background: var(--stc); border-radius: 5px; padding: 0 4px; }
.s-bc { position: absolute; top: 2px; right: 2px; display: flex; gap: 2px; }
.room.m-arrange .it { cursor: grab; touch-action: none; user-select: none; } .room.m-arrange .it.sel { outline: 3px solid var(--acc); outline-offset: 2px; z-index: 2; } .room.m-arrange .it.moving { opacity: .85; z-index: 3; cursor: grabbing; box-shadow: 0 8px 20px var(--shadow); }
.room.m-arrange .it.bad { outline: 3px solid var(--danger); }
.seat-side .card { margin-bottom: 12px; } .sw-w { margin: 0 0 12px; }
.pickbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 10px 12px; border-radius: 14px; background: var(--soft); margin-bottom: 12px; font-size: 14px; } .pickbar span { flex: 1 1 180px; display: inline-flex; gap: 6px; align-items: center; }
.uchips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.uchip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px 4px 4px; border-radius: 99px; border: 1px solid var(--line); background: var(--paper); cursor: pointer; font-size: 13px; font-weight: 600; color: var(--ink); }
.uchip small { font: 700 10px var(--sans); color: var(--acc-ink); } .uchip .av { width: 26px; height: 26px; }
@media (pointer: fine) { .seatwrap.m-seat .uchip, .seatwrap.m-seat .seat.full { cursor: grab; } }
body.seat-drag, body.seat-drag * { cursor: grabbing !important; user-select: none; }
.seat-ghost { position: fixed; left: 0; top: 0; z-index: 100; pointer-events: none; display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 99px; background: var(--acc); color: var(--on-acc); font-weight: 700; font-size: 13px; box-shadow: 0 8px 22px rgb(0 0 0 / .25); }
.seat-ghost .av, .seat-ghost small { display: none; }
.palette { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px; }
.pal { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 12px; border: 1px solid var(--line); background: var(--paper); cursor: pointer; font-size: 13px; font-weight: 600; text-align: left; color: var(--ink); }
.pal:hover { border-color: var(--acc); background: var(--soft); }
.pal i { flex: none; width: 22px; height: 16px; border-radius: 4px; background: var(--soft2); border: 1px solid var(--line); }
.pal-pair i { width: 26px; height: 13px; } .pal-t4 i, .pal-round i { width: 18px; height: 18px; } .pal-round i { border-radius: 50%; } .pal-t6 i { width: 26px; height: 18px; } .pal-flex i, .pal-shape i { border-style: dashed; }
.pal-teacher i { background: #E9DCC9; } .pal-board i { background: #2F4A3E; width: 28px; height: 8px; } .pal-door i { background: transparent; border: 2px dashed var(--txt3); width: 14px; }
.mvpad { display: flex; gap: 4px; margin: 4px 0 10px; } .mvpad .icon-btn { border: 1px solid var(--line); background: var(--paper); }
.seps { display: grid; gap: 6px; margin-bottom: 8px; } .seprow { display: flex; align-items: center; gap: 8px; padding: 6px 10px; border-radius: 12px; background: var(--soft); } .seprow span { flex: 1; font-weight: 600; font-size: 14px; } .seprow small { font-weight: 500; color: var(--txt2); }
.sep-add { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; } .sep-add > span { color: var(--txt2); font-size: 14px; }
.glist2 { margin: 0 0 8px; padding-left: 0; list-style: none; display: grid; gap: 6px; } .glist2 li { display: flex; gap: 10px; padding: 8px 12px; border-radius: 12px; background: var(--soft); font-size: 14px; } .glist2 b { flex: none; min-width: 70px; }

/* reports */
.rcard { display: flex; flex-direction: column; gap: 6px; text-decoration: none; color: var(--ink); } .rcard:hover { border-color: var(--acc); } .rcard b { font: 600 17px var(--serif); } .rcard small { color: var(--txt2); }
.rep-opts .row3 > span { display: none; } .rep-range .tabs { padding-bottom: 4px; } .rep-range .tab { font-size: 13px; min-height: 32px; }
.rp-title { font: 600 18px var(--serif); }
.cmts { display: grid; gap: 12px; } .cmt-h { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 6px; } .cmt-h .sel-sm select { min-height: 34px; max-width: 220px; font-size: 13px; padding-top: 4px; padding-bottom: 4px; }
.rep-prev { overflow-x: auto; }
.pdoc.screen { font-size: 14px; } .pdoc.screen h2 { font: 600 19px var(--serif); margin: 18px 0 8px; } .pdoc.screen h2 small { font: 13px var(--sans); color: var(--txt2); } .pdoc.screen > :first-child, .pdoc.screen .rep-page > :first-child { margin-top: 0; }
.pdoc.screen h3 { font: 700 12px var(--sans); text-transform: uppercase; letter-spacing: .05em; color: var(--txt2); margin: 14px 0 6px; }
.pdoc.screen table { width: 100%; border-collapse: collapse; margin-bottom: 8px; } .pdoc.screen th, .pdoc.screen td { text-align: left; padding: 6px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
.pdoc.screen th { font-size: 11.5px; color: var(--txt2); text-transform: uppercase; letter-spacing: .03em; } .pdoc.screen .n { text-align: right; } .pdoc.screen ul { margin: 4px 0 8px; padding-left: 20px; }
.pdoc.screen .rep-page + .rep-page { border-top: 2px dashed var(--line); margin-top: 22px; padding-top: 18px; }
.pdoc .rp-n { font: 600 22px var(--serif); margin: 0 0 2px; } .pdoc .rp-m { color: var(--txt2); margin: 0 0 4px; font-size: 13px; } .pdoc .ptext { white-space: pre-wrap; }
.pdoc.screen .lines { height: 70px; background: repeating-linear-gradient(transparent 0 22px, var(--line) 22px 23px); }
.signs { display: grid; grid-template-columns: 2fr 2fr 1fr; gap: 18px; margin-top: 28px; } .signs span { border-top: 1px solid currentColor; padding-top: 4px; font-size: 12px; color: var(--txt2); }
.rp-k th { width: 22%; }

/* supplies */
.suprow { display: flex; align-items: center; gap: 8px; padding: 8px 0; border-top: 1px solid var(--line); } .suprow:first-child { border-top: 0; }
.qty { display: inline-flex; align-items: center; gap: 2px; flex: none; } .qty b { min-width: 30px; text-align: center; font-size: 15px; } .qty small { font-size: 11.5px; color: var(--txt3); max-width: 70px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.qty .icon-btn { border: 1px solid var(--line); }
.shop-add { display: grid; grid-template-columns: 1fr 76px 100px auto; gap: 8px; margin-bottom: 12px; }
.shoplist li { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-top: 1px solid var(--line); } .shoplist li:first-child { border-top: 0; }
.shoplist .ck input { width: 22px; height: 22px; } .sh-n { flex: 1; min-width: 0; display: flex; flex-direction: column; } .sh-n small { color: var(--txt2); }
.sh-q { width: 72px !important; min-height: 38px !important; padding: 6px 8px !important; text-align: center; } .sh-c { min-width: 70px; text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; }
.shoplist.done li .sh-n b { text-decoration: line-through; color: var(--txt3); }
.shop-tot { text-align: right; margin: 10px 0 0; font-size: 15px; } .shop-tot b { font: 700 19px var(--serif); margin-left: 6px; }
.chk .c-head { margin-bottom: 4px; } .chkl li { display: flex; align-items: center; gap: 6px; padding: 5px 0; border-top: 1px solid var(--line); } .chkl li:first-child { border-top: 0; } .chkl .ck { flex: 1; min-width: 0; } .chkl li.done .ck span { text-decoration: line-through; color: var(--txt3); }
.chk .idea-add { margin-top: 10px; } .chk-cards { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }

/* sub notes */
.subhd .fld { margin-bottom: 0; }
.subsched li { padding: 10px 0 10px 12px; border-top: 1px solid var(--line); border-left: 4px solid var(--cc); margin-left: -4px; display: grid; gap: 8px; }
.subsched li:first-child { border-top: 0; } .ss-h { display: flex; gap: 12px; align-items: flex-start; } .ss-h > div { display: flex; flex-direction: column; min-width: 0; } .ss-h small { color: var(--txt2); }
.subsched textarea { min-height: 48px; }
.subrep { padding: 10px 12px; border-radius: 12px; background: var(--soft); margin-bottom: 10px; } .subrep p { margin: 6px 0; white-space: pre-wrap; } .subrep small { color: var(--txt2); font-weight: 700; }

@media (max-width: 640px) {
  .shop-add { grid-template-columns: 1fr 64px; } .shop-add input[name=c] { grid-column: 1; } .shop-add .btn { grid-column: 2; grid-row: 2; }
  .tnames { grid-template-columns: 1fr; } .palette { grid-template-columns: 1fr 1fr; } .crow.fu { flex-wrap: wrap; } .fu-b { width: 100%; justify-content: flex-start; padding-left: 50px; }
  .suprow { flex-wrap: wrap; } .suprow .r-main { flex: 1 1 100%; } .signs { grid-template-columns: 1fr 1fr; }
  .btiles { grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); } .bcat { min-height: 44px; padding: 8px 12px; font-size: 14px; }
}

@media print {
  .pdoc .room { display: grid; grid-template-columns: repeat(var(--cols), minmax(0, 1fr)); grid-template-rows: repeat(var(--rows), minmax(0, 1fr)); gap: 5px; aspect-ratio: var(--cols) / var(--rows); width: min(100%, calc(128mm * var(--cols) / var(--rows))); margin: 0 auto; min-width: 0; }
  .pdoc .rep-page th, .pdoc .rep-page td { padding: 3pt 5pt; } .pdoc .signs { break-inside: avoid; }
  .pdoc .it { border: 1.5px solid #555; border-radius: 6px; padding: 2px; display: flex; background: #fff !important; color: #000 !important; position: relative; }
  .pdoc .it-board { background: #ddd !important; } .pdoc .it-door { border-style: dashed; } .pdoc .it-round { border-radius: 50%; } .pdoc .it-l { margin: auto; font-size: 8pt; font-weight: 700; display: inline-flex; gap: 3px; align-items: center; }
  .pdoc .seats { display: grid; grid-template-columns: repeat(var(--sc), minmax(0, 1fr)); gap: 2px; width: 100%; }
  .pdoc .seat { border: 1px solid #999; border-radius: 4px; display: flex; flex-direction: column; align-items: center; justify-content: center; font-size: 8pt; line-height: 1.1; padding: 1px; overflow: hidden; text-align: center; }
  .pdoc .seat b { font-weight: 700; } .pdoc .seat small { font-size: 6.5pt; color: #444; } .pdoc .seat .av { width: 22px !important; height: 22px !important; font-size: 7pt !important; }
  .pdoc .it-tag { position: absolute; bottom: -7pt; left: 50%; transform: translateX(-50%); font-size: 6.5pt; background: #fff; padding: 0 3pt; } .pdoc .it-acc { display: none; }
  .pdoc .front-l { text-align: center; font-size: 9pt; text-transform: uppercase; letter-spacing: .06em; color: #555; margin: 0 0 6pt; }
  .pdoc .rep-page, .pdoc .sub-pg { break-after: page; } .pdoc .rep-page:last-of-type, .pdoc .sub-pg:last-of-type { break-after: auto; }
  .pdoc h3 { font: 700 9pt var(--sans); text-transform: uppercase; letter-spacing: .05em; margin: 10pt 0 3pt; color: #333; }
  .pdoc .rp-n { font: 600 18pt var(--serif); margin: 0; } .pdoc .rp-m { color: #444; margin: 2pt 0 6pt; font-size: 9.5pt; }
  .pdoc .signs { display: grid; grid-template-columns: 2fr 2fr 1fr; gap: 16pt; margin-top: 24pt; } .pdoc .signs span { border-top: 1px solid #000; padding-top: 3pt; font-size: 8.5pt; color: #444; }
  .pdoc .lines.sm { height: 66pt; } .pdoc ul { margin: 2pt 0 6pt; padding-left: 16pt; }
}
a.r-main { color: var(--ink); text-decoration: none; } a.r-main:hover b { text-decoration: underline; }
.pillc { flex: none; font: 700 12px/22px var(--sans); min-width: 30px; text-align: center; padding: 0 8px; border-radius: 99px; } .pillc.pos { background: var(--g-a); color: var(--g-a-t); } .pillc.con { background: var(--g-d); color: var(--g-d-t); }
details.cmt-d > summary { cursor: pointer; font: 600 17px var(--serif); display: flex; gap: 8px; align-items: baseline; list-style-position: inside; }
details.cmt-d > summary small { font: 600 13px var(--sans); } details.cmt-d[open] > summary { margin-bottom: 10px; } .cmt-tools { margin-bottom: 10px; } .cmt-tools p { margin: 0; flex: 1 1 260px; }
.plist li > span.chip, .plist li > span.sc { flex: none; }

/* ================================================================ phase 3: birthdays, journal, focus, import, privacy, rollover, prints */
@media (min-width: 900px) and (max-height: 960px) { .side nav a { padding: 6px 10px; } .side { gap: 10px; } }
.bdrow { display: flex; gap: 10px; align-items: center; padding: 9px 0; border-top: 1px solid var(--line); } .bdrow:first-child { border-top: 0; }
.bdrow.today { background: var(--soft); border-radius: 12px; padding: 9px 8px; margin: 0 -8px; } .bd-now { color: var(--acc-ink); }
.bd-hero { display: flex; gap: 16px; align-items: center; background: var(--hero); } .bd-hero h2 { font: 600 24px var(--serif); } .bd-cake { width: 60px; height: 60px; border-radius: 18px; background: var(--acc); color: var(--on-acc); display: grid; place-items: center; flex: none; }
.bd-months { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); } .bd-m.cur { border-color: var(--acc); box-shadow: 0 0 0 2px var(--soft2); } .bd-m .c-head { margin-bottom: 6px; }
.bdm { list-style: none; margin: 0; padding: 0; display: grid; gap: 3px; } .bdm li { display: flex; gap: 8px; align-items: baseline; font-size: 14px; } .bdm b { min-width: 22px; text-align: right; color: var(--txt2); font-variant-numeric: tabular-nums; } .bdm a { color: var(--ink); text-decoration: none; } .bdm small { color: var(--acc-ink); }
.jquick form { display: flex; gap: 8px; align-items: flex-end; } .jquick textarea { flex: 1; min-height: 48px; } .jprompts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; } .jprompts .tag { font-family: var(--sans); }
.jlist { list-style: none; margin: 0; padding: 0; } .jrow { display: flex; align-items: flex-start; gap: 6px; border-top: 1px solid var(--line); } .jrow:first-child { border-top: 0; } .jrow.pinned .j-d { background: var(--acc); color: var(--on-acc); } .jrow.pinned .j-d small { color: inherit; }
.jmain { flex: 1; min-width: 0; display: flex; gap: 12px; text-align: left; background: none; border: 0; padding: 10px 0; cursor: pointer; color: var(--ink); }
.j-d { width: 46px; flex: none; display: flex; flex-direction: column; align-items: center; padding: 6px 0; border-radius: 12px; background: var(--soft); line-height: 1.1; } .j-d b { font: 700 18px var(--serif); } .j-d small { font-size: 11px; color: var(--txt2); }
.j-b { min-width: 0; display: flex; flex-direction: column; gap: 2px; } .j-b > b { font-weight: 600; } .j-b > small { color: var(--txt2); } .j-m { font-style: normal; }
.j-s { color: var(--txt2); font-size: 14px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; white-space: pre-wrap; } .priv-t { display: inline-flex; align-items: center; gap: 5px; font-style: italic; }
.j-t { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 2px; } .j-t .tag { font-style: normal; font-size: 11px; }
.jrow .icon-btn { margin-top: 10px; } .jrow .icon-btn.on { color: var(--acc-ink); background: var(--soft); }
.seg.moods { flex-wrap: wrap; } .seg.moods label span { gap: 5px; } .seg.moods i { font-style: normal; font-size: 18px; line-height: 1; }
/* focus */
@media (min-width: 900px) { .ftgrid { grid-template-columns: 1.25fr 1fr; } }
.ftcard { text-align: center; } .ft-ring { position: relative; width: min(280px, 78vw); margin: 4px auto 14px; aspect-ratio: 1; }
.ring { width: 100%; height: 100%; transform: rotate(-90deg); } .rg-bg { fill: none; stroke: var(--soft2); stroke-width: 12; } .rg-fg { fill: none; stroke: var(--acc); stroke-width: 12; stroke-linecap: round; transition: stroke-dashoffset .4s linear; }
.ph-short .rg-fg, .ph-long .rg-fg { stroke: var(--g-a-t); }
.ft-in { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; } .ft-in small { font-weight: 700; text-transform: uppercase; letter-spacing: .06em; font-size: 12px; color: var(--txt2); }
.ft-in b { font: 600 clamp(44px, 12vw, 64px)/1 var(--serif); font-variant-numeric: tabular-nums; } .rdots { display: flex; gap: 6px; } .rdots i { width: 9px; height: 9px; border-radius: 50%; background: var(--soft2); } .rdots i.on { background: var(--acc); }
.ft-ctl, .ct-ctl { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin-bottom: 12px; } .ct-pre { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; margin-bottom: 14px; } .ct-pre .tab { min-height: 34px; }
.ct-cust input { width: 96px !important; min-height: 34px !important; padding: 4px 10px !important; } .ftcard .fld { text-align: left; max-width: 420px; margin: 0 auto 6px; }
.ct-mid { font: 600 clamp(56px, 14vw, 96px)/1.05 var(--serif); font-variant-numeric: tabular-nums; margin: 10px 0 14px; } .ct-mid.done { color: var(--danger); } .ct-up { font: 700 22px var(--serif); color: var(--danger); margin: 0; }
.ct-cin { display: flex; align-items: center; gap: 6px; } .ct-cin input { width: 76px !important; } .ct-cin span { color: var(--txt2); font-size: 13px; }
.row3.r4 { grid-template-columns: repeat(4, 1fr); } @media (max-width: 700px) { .row3.r4 { grid-template-columns: 1fr 1fr; } .row3.r4 > :last-child:nth-child(odd) { grid-column: auto; } }
.ftasks li.focusing { background: var(--soft); border-radius: 12px; padding-left: 8px; padding-right: 8px; }
.tchip { display: inline-flex; align-items: center; gap: 5px; height: 34px; padding: 0 11px; border-radius: 99px; background: var(--acc); color: var(--on-acc); font: 700 13.5px var(--sans); text-decoration: none; font-variant-numeric: tabular-nums; } .tchip.paused { background: var(--soft2); color: var(--ink); }
body.ding .ftcard, body.ding .ctv { animation: ding 1.5s ease-out; } @keyframes ding { 0%, 40% { box-shadow: 0 0 0 0 var(--acc); } 20% { box-shadow: 0 0 0 10px var(--soft2); } 100% { box-shadow: 0 1px 2px var(--shadow); } }
body[data-view="classtimer"] .side, body[data-view="classtimer"] .top, body[data-view="classtimer"] .bnav, body[data-view="classtimer"] .fab, body[data-view="classtimer"] .foot, body[data-view="classtimer"] #banner { display: none !important; }
body[data-view="classtimer"] #app { display: block; background: none; } body[data-view="classtimer"] .wrap { padding-bottom: 0; } body[data-view="classtimer"] #main { max-width: none; padding: 16px; }
body[data-view="focus"] .fab, body[data-view="journal"] .fab { display: none; }
.ctv { min-height: calc(100vh - 32px); display: flex; flex-direction: column; border-radius: 24px; padding: 8px 8px 24px; transition: background .4s; }
.ct-big { flex: 1; display: grid; place-items: center; font: 600 clamp(96px, 26vw, 360px)/1 var(--serif); font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.ctv.last .ct-big { color: #C2620A; } .ctv.done { background: var(--g-f); } .ctv.done .ct-big { color: var(--danger); animation: pulse 1s ease-in-out infinite alternate; } @keyframes pulse { to { opacity: .55; } }
.ctv .ct-up { text-align: center; font-size: clamp(28px, 5vw, 56px); margin-bottom: 16px; } .ct-ctl.big .btn { min-height: 56px; font-size: 17px; }
@media (prefers-reduced-motion: reduce) { .ctv.done .ct-big, .pop, body.ding .ftcard { animation: none !important; } }
/* import */
.imap select { min-height: 38px; padding: 6px 10px; } .imap td { vertical-align: middle; } .iprev td, .iprev th { white-space: nowrap; } .iprev tr.ip-skip td, .iprev tr.ip-twice td { color: var(--txt3); } .imp-w { margin: 10px 0 0; }
/* privacy + lock */
.pv-btn.on { background: var(--acc); color: var(--on-acc); } .pv-btn.on:hover { background: var(--acc); color: var(--on-acc); filter: brightness(1.05); }
body.privacy .flag, body.privacy .it-acc, body.privacy .uchip small, body.privacy .sw-w, body.privacy .bt-n .con, body.privacy .s-bc .con, body.privacy .gl, body.privacy .pv-hide, body.privacy .cr-s, body.privacy .cr-o, body.privacy .fnote, body.privacy .tp-b { display: none !important; }
body.privacy a[href^="tel:"], body.privacy a[href^="mailto:"], body.privacy a[href^="sms:"] { display: none !important; }
body.privacy .card.private > :not(.c-head) { display: none !important; } body.privacy .card.private::after { content: "Hidden while privacy mode is on"; display: block; color: var(--txt3); font-size: 13.5px; }
body.privacy .gpill, body.privacy .gavg, body.privacy .seat.warn { filter: blur(7px); box-shadow: none; } body.privacy .seat.warn { filter: none; }
.pv-card { border-style: dashed; }
body.locked #app, body.locked #modal, body.locked #toast { visibility: hidden !important; }
#lock { position: fixed; inset: 0; z-index: 200; background: var(--bg); display: grid; place-items: center; padding: 20px; overflow-y: auto; }
.lk { width: 100%; max-width: 340px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 6px; } .lk .logo { width: 56px; height: 56px; border-radius: 18px; margin-bottom: 6px; } .lk .logo svg { width: 28px; height: 28px; }
.lk h2 { font: 600 22px var(--serif); } .lk-dots { display: flex; gap: 12px; margin: 10px 0 2px; } .lk-dots i { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--acc); } .lk-dots i.on { background: var(--acc); }
.lk-msg { min-height: 20px; color: var(--danger); font-size: 13.5px; font-weight: 600; margin: 0; }
.lk-pad { display: grid; grid-template-columns: repeat(3, 72px); gap: 12px; margin: 6px 0 10px; } .lk-k { height: 64px; border-radius: 50%; border: 1px solid var(--line); background: var(--paper); font: 600 24px var(--sans); color: var(--ink); cursor: pointer; display: grid; place-items: center; box-shadow: 0 1px 2px var(--shadow); }
.lk-k:hover { background: var(--soft); } .lk-k:active { transform: scale(.95); } .lk-k:disabled { opacity: .45; } .lk-foot { display: flex; gap: 12px; align-items: center; justify-content: center; }
.shake { animation: shake .4s; } @keyframes shake { 20%, 60% { transform: translateX(-8px); } 40%, 80% { transform: translateX(8px); } }
.pin-opts { margin: 10px 0; }
@media print {
  .bd-print { columns: 3; column-gap: 16pt; } .bdp-m { break-inside: avoid; margin-bottom: 8pt; } .bdp-m h2 { margin: 0 0 3pt; font-size: 12pt; } .bdp-m td { padding: 2pt 4pt; border-bottom: 1px solid #ddd; font-size: 9.5pt; }
  .jp { break-inside: avoid-page; margin-bottom: 14pt; } .jp h3 { margin: 6pt 0 2pt; }
  .pdoc table.gbp th, .pdoc table.gbp td { padding: 3pt 4pt; font-size: 8.5pt; border: 1px solid #bbb; } .pdoc table.gbp th { text-transform: none; }
  .pdoc table.calp { table-layout: fixed; } .pdoc table.calp td { height: 78pt; border: 1px solid #999; font-size: 7.5pt; vertical-align: top; padding: 2pt 3pt; } .pdoc table.calp td.off { background: #f1f1f1; } .pdoc table.calp td.blank { border: 0; } .pdoc table.calp td div { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; } .pdoc table.calp th { text-align: center; }
  .pdoc table.attp th, .pdoc table.attp td { border: 1px solid #999; padding: 3pt 3pt; font-size: 8.5pt; } .pdoc table.attp td:not(:first-child) { width: 18pt; } .pdoc table.attp tr { height: 17pt; }
}
.ct-cin { flex-wrap: wrap; } .ct-cin input { width: 68px !important; }
@media (max-width: 560px) { .ftcard .row2 { grid-template-columns: 1fr; } .ftbar .tabs { flex: 1 1 100%; order: 2; } .ftbar .sp { display: none; } .ftbar { flex-wrap: wrap; } }
@media (max-width: 420px) { .ftbar .tab { padding-left: 10px; padding-right: 10px; } }
@media (max-width: 560px) { .ftbar > .btn { order: 3; margin-left: auto; } }
