/* KKIIC Center — calm, clear staff workspace. Math blue, Reading red. */
:root {
  --navy: #123456; --navy-2: #1b4470; --ink: #172b40; --ink-2: #4a5d72; --muted: #74859a;
  --bg: #f4f6f9; --card: #fff; --line: #e2e8ef; --line-2: #eef2f6;
  --blue: #1F6FB2; --blue-soft: #e7f0fa; --red: #C8323C; --red-soft: #fbeaeb;
  --green: #1f8a5b; --green-soft: #e5f4ec; --amber: #b7791f; --amber-soft: #fdf3e1; --info: #6b4fbb; --info-soft: #efebfa;
  --radius: 14px; --shadow: 0 1px 2px rgba(18, 52, 86, .06), 0 4px 16px rgba(18, 52, 86, .05);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 15px/1.45 var(--font); color: var(--ink); background: var(--bg); }
a { color: inherit; }
button, input, select { font: inherit; color: inherit; }
h1, h2, h3 { margin: 0; line-height: 1.2; }
.ic { width: 18px; height: 18px; flex: none; }
.ic.ext { width: 13px; height: 13px; opacity: .55; margin-left: auto; }
.ic.spin { animation: spin 1s linear infinite; }
.ic.turn { transform: rotate(-90deg); }
@keyframes spin { to { transform: rotate(360deg); } }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
:focus-visible { outline: 3px solid rgba(31, 111, 178, .45); outline-offset: 2px; border-radius: 6px; }

/* Buttons & fields */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px; padding: 9px 16px; border-radius: 10px; border: 1px solid var(--blue); background: var(--blue); color: #fff; font-weight: 600; cursor: pointer; text-decoration: none; white-space: nowrap; }
.btn:hover { filter: brightness(1.05); }
.btn:disabled { opacity: .6; cursor: default; }
.btn.ghost { background: #fff; color: var(--ink); border-color: var(--line); }
.btn.ghost:hover { background: var(--line-2); filter: none; }
.btn.block { width: 100%; }
.btn.messenger { background: #0866ff; border-color: #0866ff; }
.link { background: none; border: 0; padding: 0; color: var(--blue); cursor: pointer; font-weight: 600; text-decoration: none; }
.link:hover { text-decoration: underline; }
.icon-btn { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; border: 0; background: transparent; cursor: pointer; color: inherit; }
.icon-btn:hover { background: rgba(127, 140, 160, .15); }
.field { display: grid; gap: 6px; font-size: 13px; font-weight: 600; color: var(--ink-2); }
.field input, .field select, .select select { min-height: 42px; padding: 8px 12px; border: 1px solid #cfd9e4; border-radius: 10px; background: #fff; font-size: 15px; font-weight: 400; color: var(--ink); width: 100%; }
.field input:focus, .select select:focus, .search-row:focus-within { border-color: var(--blue); outline: none; box-shadow: 0 0 0 3px rgba(31, 111, 178, .15); }
.field.inline { display: flex; align-items: center; gap: 10px; }
.field.inline input { width: auto; }
.form-error { color: var(--red); font-size: 14px; margin: 0; min-height: 1em; }
.hint { color: var(--muted); font-size: 13px; margin: 0; }
.stack { display: grid; gap: 14px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 16px 0 10px; }
.pill { display: inline-block; padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; }
.demo-pill { background: var(--amber-soft); color: #8a5a10; justify-self: start; white-space: nowrap; }
.row-btns { display: flex; gap: 8px; flex-wrap: wrap; }

/* Sign-in */
.signin { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: radial-gradient(1200px 500px at 10% -10%, #dbe8f6, transparent), radial-gradient(900px 400px at 110% 110%, #f8e3e5, transparent), var(--bg); }
.signin-card { width: min(420px, 100%); background: #fff; border-radius: 20px; box-shadow: var(--shadow); padding: 32px 28px; display: grid; gap: 14px; text-align: left; }
.signin-card h1 { font-size: 26px; }
.signin-card p { margin: 0; }
.fine { font-size: 12.5px; color: var(--muted); display: flex; gap: 8px; align-items: flex-start; border-top: 1px solid var(--line-2); padding-top: 14px; }
.fine .ic { width: 15px; height: 15px; margin-top: 2px; }
.brand-mark { width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; font-weight: 800; font-size: 20px; color: #fff; background: linear-gradient(135deg, var(--blue), var(--red)); }
.brand-mark.big { width: 56px; height: 56px; font-size: 28px; border-radius: 15px; }

/* Layout */
.layout { display: flex; min-height: 100vh; }
.side { width: 248px; flex: none; background: var(--navy); color: #dfe8f2; display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; padding: 20px 12px 14px; }
.brand { display: flex; align-items: center; gap: 12px; padding: 0 10px 20px; }
.brand strong { display: block; color: #fff; font-size: 18px; letter-spacing: .02em; }
.brand span { font-size: 12px; opacity: .7; }
.nav { display: grid; gap: 2px; overflow-y: auto; flex: 1; align-content: start; }
.nav-head { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; opacity: .55; margin: 14px 12px 6px; display: flex; gap: 8px; align-items: center; }
.soon { text-transform: none; letter-spacing: 0; background: rgba(255, 255, 255, .12); padding: 1px 7px; border-radius: 999px; font-size: 10.5px; }
.nav-item { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; text-decoration: none; font-weight: 500; }
.nav-item:hover { background: rgba(255, 255, 255, .07); }
.nav-item.active { background: rgba(255, 255, 255, .14); color: #fff; box-shadow: inset 3px 0 0 #7fb6ea; }
.me { display: flex; align-items: center; gap: 10px; padding: 12px 8px 0; border-top: 1px solid rgba(255, 255, 255, .1); margin-top: 10px; }
.me-text { flex: 1; min-width: 0; }
.me-text strong { display: block; color: #fff; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.me-text span { font-size: 12px; opacity: .65; }
.avatar { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: rgba(127, 182, 234, .25); color: #fff; font-weight: 700; font-size: 13px; flex: none; }
.avatar.sm { width: 34px; height: 34px; font-size: 12px; }
.avatar.lg { width: 56px; height: 56px; font-size: 19px; }
.avatar.math { background: var(--blue-soft); color: var(--blue); }
.avatar.reading { background: var(--red-soft); color: var(--red); }
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.top { display: flex; align-items: center; gap: 14px; padding: 18px 28px 14px; background: var(--bg); position: sticky; top: 0; z-index: 5; border-bottom: 1px solid transparent; }
.top-title { flex: 1; min-width: 0; }
.eyebrow { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 600; }
.top h1 { font-size: 26px; }
.month-chip { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border: 1px solid var(--line); background: #fff; border-radius: 999px; cursor: pointer; font-size: 13px; color: var(--ink-2); }
.month-chip b { color: var(--ink); }
.month-chip:hover { border-color: #c3d0de; }
.view { padding: 4px 28px 40px; outline: none; }
.only-mobile { display: none !important; }
.chip-short { display: none; }

/* Toolbar, tiles, panels */
.toolbar { display: flex; gap: 10px; align-items: center; justify-content: flex-end; flex-wrap: wrap; margin-bottom: 14px; }
.tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-bottom: 18px; }
.tiles.small { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }
@media (min-width: 1400px) { .tiles:not(.small) { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
.tile { background: var(--card); border-radius: var(--radius); padding: 14px 16px; box-shadow: var(--shadow); display: grid; gap: 2px; border-top: 3px solid var(--line); }
.tile-label { font-size: 12.5px; font-weight: 600; color: var(--ink-2); }
.tile-value { font-size: 26px; font-weight: 750; letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
.tiles.small .tile-value { font-size: 22px; }
.tile-note { font-size: 12px; color: var(--muted); }
.tile.good { border-top-color: var(--green); } .tile.warn { border-top-color: var(--amber); } .tile.bad { border-top-color: var(--red); } .tile.info { border-top-color: var(--info); } .tile.muted { border-top-color: #b8c3cf; }
.dash-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.span2 { grid-column: span 2; }
.panel { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px 18px 18px; min-width: 0; }
.panel header { margin-bottom: 12px; }
.panel h2 { font-size: 16px; }
.panel header p { margin: 3px 0 0; }
.foot { margin-top: 16px; text-align: right; }
.bars { display: grid; gap: 9px; }
.bar-row { display: grid; grid-template-columns: minmax(90px, 34%) 1fr auto; gap: 10px; align-items: center; font-size: 13.5px; }
.bar-label { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--ink-2); }
.bar-track { height: 10px; background: var(--line-2); border-radius: 99px; overflow: hidden; }
.bar-fill { display: block; height: 100%; background: var(--navy-2); border-radius: 99px; transition: width .4s ease; }
.bar-fill.good { background: var(--green); } .bar-fill.bad { background: var(--red); } .bar-fill.info { background: var(--info); } .bar-fill.warn { background: var(--amber); }
.bar-fill.math { background: var(--blue); } .bar-fill.reading { background: var(--red); }
.bar-value { font-variant-numeric: tabular-nums; min-width: 44px; text-align: right; }
.attn { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 10px; }
.attn-item { width: 100%; display: flex; align-items: center; gap: 12px; text-align: left; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line); background: #fff; cursor: pointer; }
.attn-item:hover:not(:disabled) { border-color: #c3d0de; background: #fbfcfd; }
.attn-item:disabled { cursor: default; opacity: .7; }
.attn-count { min-width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; font-weight: 800; font-size: 17px; background: var(--line-2); }
.attn-item.warn .attn-count { background: var(--amber-soft); color: #8a5a10; }
.attn-item.bad .attn-count { background: var(--red-soft); color: var(--red); }
.attn-item.info .attn-count { background: var(--info-soft); color: var(--info); }
.attn-item.done .attn-count { background: var(--green-soft); color: var(--green); }
.attn-label { flex: 1; font-weight: 600; font-size: 14px; }
.attn-label small { display: block; font-weight: 400; color: var(--muted); font-size: 12px; }
.all-clear { display: flex; gap: 10px; align-items: center; color: var(--green); }
.all-clear p { margin: 0; }
.issues { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.issues li { display: flex; gap: 10px; padding: 10px 12px; border-radius: 10px; background: var(--amber-soft); color: #6d4a10; font-size: 14px; }
svg.daily { width: 100%; height: auto; display: block; }
svg.daily .grid { stroke: var(--line-2); }
svg.daily .v { fill: var(--blue); } svg.daily .p { fill: #f0a52b; }
svg.daily text { font-size: 11px; fill: var(--muted); }
.legend { display: flex; gap: 16px; font-size: 12.5px; margin-top: 6px; flex-wrap: wrap; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.legend i.v { background: var(--blue); } .legend i.p { background: #f0a52b; }
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table { border-collapse: collapse; width: 100%; font-size: 14px; }
table.heat th, table.heat td { padding: 7px 8px; text-align: center; border-bottom: 1px solid var(--line-2); }
table.heat thead th { font-size: 12px; color: var(--muted); font-weight: 600; }
table.heat tbody th { text-align: left; font-weight: 500; color: var(--ink-2); white-space: nowrap; }
table.heat td { color: var(--muted); font-variant-numeric: tabular-nums; }
table.heat td.on { background: rgba(31, 111, 178, var(--h)); color: var(--ink); font-weight: 700; }
table.list th, table.list td { padding: 9px 10px; text-align: left; border-bottom: 1px solid var(--line-2); }
table.list th { font-size: 12px; color: var(--muted); font-weight: 600; position: sticky; top: 0; background: #fff; }

/* States */
.state { display: grid; justify-items: center; gap: 10px; padding: 40px 16px; text-align: center; color: var(--ink-2); }
.state .ic { width: 28px; height: 28px; color: var(--muted); }
.state.error .ic { color: var(--red); }
.state p { margin: 0; max-width: 480px; }
.spinner { width: 26px; height: 26px; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--blue); animation: spin .8s linear infinite; }
.inline-loading { display: inline-flex; gap: 8px; align-items: center; }
.inline-loading .spinner { width: 14px; height: 14px; border-width: 2px; }
.inline-loading p { display: inline; margin: 0; }
.skel { background: linear-gradient(90deg, #e9eef3 25%, #f3f6f9 50%, #e9eef3 75%); background-size: 200% 100%; animation: shimmer 1.2s infinite; border-radius: var(--radius); min-height: 86px; }
.skel.tall { min-height: 220px; } .skel.bar { min-height: 46px; margin: 4px 0 14px; }
.view > .skel { min-height: 54px; margin-bottom: 8px; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* Students */
.filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 10px; }
.search-row { display: flex; align-items: center; gap: 8px; background: #fff; border: 1px solid #cfd9e4; border-radius: 10px; padding: 0 12px; min-height: 42px; color: var(--muted); }
.search-row input { border: 0; outline: 0; flex: 1; min-width: 0; padding: 9px 0; font-size: 15px; background: transparent; color: var(--ink); }
.search-row.grow { flex: 1 1 260px; }
.seg { display: inline-flex; background: #fff; border: 1px solid #cfd9e4; border-radius: 10px; padding: 3px; }
.seg button { border: 0; background: transparent; padding: 7px 12px; border-radius: 7px; cursor: pointer; font-weight: 600; color: var(--ink-2); }
.seg button.on { background: var(--navy); color: #fff; }
.select select { width: auto; max-width: 190px; }
.list-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin: 6px 2px 10px; }
.list-head p { margin: 0; }
.list-actions { display: flex; gap: 14px; font-size: 13px; }
.roster { display: grid; gap: 12px; }
.group { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; border-left: 4px solid var(--line); }
.group.current { border-left-color: var(--green); } .group.new { border-left-color: var(--info); } .group.upcoming { border-left-color: var(--blue); } .group.absent { border-left-color: var(--amber); } .group.muted { border-left-color: #b8c3cf; }
.group-head { width: 100%; display: flex; align-items: center; gap: 10px; padding: 13px 16px; background: none; border: 0; cursor: pointer; font-weight: 700; font-size: 15px; text-align: left; }
.group-head .count { margin-left: auto; background: var(--line-2); border-radius: 999px; padding: 2px 10px; font-size: 13px; font-weight: 700; color: var(--ink-2); }
.rows { border-top: 1px solid var(--line-2); }
.roster { container-type: inline-size; }
/* Narrow: each student is a compact card */
.row { position: relative; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; padding: 12px 14px; border-bottom: 1px solid var(--line-2); font-size: 14px; cursor: pointer; }
.row .who { flex: 1 1 100%; padding-right: 70px; }
.row .cell-gc { position: absolute; right: 14px; top: 14px; }
.row .cell-teacher, .row .cell-level, .row .cell-sched { font-size: 12.5px; color: var(--muted); }
.row .cell-teacher::after, .row .cell-level::after { content: " ·"; }
.row > span:empty { display: none; }
.row.head { display: none; }
/* Wide: a proper table */
@container (min-width: 900px) {
  .row { display: grid; grid-template-columns: minmax(190px, 2.2fr) minmax(110px, 1.1fr) minmax(100px, 1fr) minmax(80px, .8fr) minmax(140px, 1.4fr) minmax(100px, 1fr) 64px; gap: 12px; padding: 10px 16px; }
  .row .who { padding-right: 0; }
  .row .cell-gc { position: static; }
  .row .cell-teacher, .row .cell-level { font-size: 14px; color: inherit; }
  .row .cell-sched { font-size: 13px; color: var(--ink-2); }
  .row .cell-teacher::after, .row .cell-level::after { content: none; }
  .row.head { display: grid; }
}
.row:last-child { border-bottom: 0; }
.row:not(.head):hover { background: #f8fafc; }
.row.head { cursor: default; font-size: 12px; color: var(--muted); font-weight: 600; padding-top: 8px; padding-bottom: 8px; background: #fbfcfd; }
.who { display: flex; align-items: center; gap: 10px; min-width: 0; }
.who strong { display: block; font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.who small { display: block; color: var(--muted); font-size: 12px; }
.who > span:last-child { min-width: 0; }
.cell-sched { color: var(--ink-2); font-size: 13px; }
.subj { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 700; background: var(--line-2); }
.subj.math { background: var(--blue-soft); color: var(--blue); }
.subj.reading { background: var(--red-soft); color: var(--red); }
.status { display: inline-block; padding: 2px 8px; border-radius: 6px; font-size: 11.5px; font-weight: 700; background: var(--line-2); color: var(--ink-2); }
.st-current { background: var(--green-soft); color: var(--green); }
.st-new, .st-eo, .st-it, .st-resume { background: var(--info-soft); color: var(--info); }
.st-absent { background: var(--amber-soft); color: #8a5a10; }
.st-discontinued { background: #eceff3; color: #6b7785; }
.pay { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 600; }
.pay.good { background: var(--green-soft); color: var(--green); } .pay.bad { background: var(--red-soft); color: var(--red); } .pay.info { background: var(--info-soft); color: var(--info); } .pay.muted { background: var(--line-2); color: var(--ink-2); }
.gc-btn { display: inline-flex; gap: 5px; align-items: center; padding: 5px 10px; border-radius: 8px; background: #0866ff; color: #fff; font-size: 12px; font-weight: 700; text-decoration: none; }
.gc-btn .ic { width: 14px; height: 14px; }

/* Sheets */
.sheet-wrap { position: fixed; inset: 0; background: rgba(15, 30, 48, .45); display: grid; place-items: center; z-index: 50; padding: 20px; animation: fade .15s ease; }
.sheet { position: relative; background: #fff; border-radius: 18px; width: min(520px, 100%); max-height: calc(100vh - 40px); overflow-y: auto; padding: 24px; box-shadow: 0 20px 60px rgba(0, 0, 0, .25); }
.sheet-wrap.wide .sheet { width: min(940px, 100%); }
.sheet h2 { font-size: 21px; padding-right: 40px; }
.sheet > p { margin: 6px 0 14px; }
.sheet-x { position: absolute; top: 14px; right: 14px; }
.sheet .search-row { margin-bottom: 10px; }
.sheet-nav { margin: 8px 0 16px; }
.sheet-nav .nav-item { color: var(--ink); }
.sheet-nav .nav-item:hover { background: var(--line-2); }
.sheet-nav .nav-head { opacity: 1; color: var(--muted); }
@keyframes fade { from { opacity: 0; } }
.profile-head { display: flex; gap: 14px; align-items: center; margin-bottom: 14px; }
.profile-head p { margin: 6px 0 0; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.profile-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.gc-block { display: flex; gap: 8px; flex-wrap: wrap; }
.gc-form { display: grid; gap: 8px; width: min(520px, 100%); }
.profile-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px; }
.pcard { border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; }
.pcard h3 { font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-bottom: 8px; }
.pcard dl { margin: 0; display: grid; gap: 7px; }
.pcard dl div { display: grid; grid-template-columns: 42% 1fr; gap: 8px; font-size: 14px; }
.pcard dt { color: var(--ink-2); }
.pcard dd { margin: 0; font-weight: 550; overflow-wrap: anywhere; }

/* Toast */
.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); opacity: 0; background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 12px; z-index: 80; transition: .25s; max-width: calc(100vw - 32px); box-shadow: 0 8px 30px rgba(0, 0, 0, .2); }
.toast.show { transform: translate(-50%, 0); opacity: 1; }
.toast.bad { background: var(--red); }

/* Tablet & phone */
@media (max-width: 860px) {
  .side { display: none; }
  .only-mobile { display: inline-grid !important; }
  .top { padding: 12px 14px 10px; gap: 8px; }
  .top h1 { font-size: 21px; }
  .eyebrow { display: none; }
  .month-chip { padding: 7px 10px; font-size: 12px; }
  .month-chip .ic { display: none; }
  .chip-long { display: none; } .chip-short { display: inline; }
  .top-title { overflow: hidden; } .top h1 { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .toolbar { flex-wrap: nowrap; } .toolbar .field.inline span { display: none; } .toolbar .field.inline input { width: 100%; }
  .top .demo-pill { display: none; }
  .view { padding: 4px 14px calc(90px + env(safe-area-inset-bottom)); }
  .dash-grid { grid-template-columns: 1fr; }
  .span2 { grid-column: auto; }
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .tile-value { font-size: 22px; }
  .tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; display: grid !important; grid-template-columns: repeat(3, 1fr); background: rgba(255, 255, 255, .96); backdrop-filter: blur(10px); border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom); }
  .tabbar a { display: grid; justify-items: center; gap: 2px; padding: 9px 0 8px; font-size: 11.5px; font-weight: 600; text-decoration: none; color: var(--muted); }
  .tabbar a.active { color: var(--blue); }
  .hide-sm { display: none; }
  .select select { max-width: 150px; }
  .filters .seg { order: 2; }
  .sheet-wrap { place-items: end stretch; padding: 0; }
  .sheet, .sheet-wrap.wide .sheet { width: 100%; max-height: 92vh; border-radius: 20px 20px 0 0; padding: 22px 18px calc(22px + env(safe-area-inset-bottom)); }
  .grid2 { grid-template-columns: 1fr; }
  .field.inline { flex: 1; }
  .toolbar { justify-content: stretch; }
}
@media (min-width: 861px) { .tabbar { display: none !important; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
