/* ============================================================
   Linq — Walnut High School Publications
   Identity: cool press-blue on chalk, Bricolage display,
   monospace for anything that has to line up (rooms, bells, IDs).
   ============================================================ */

:root {
  --paper:      #f1f1ee;
  --surface:    #ffffff;
  --surface-2:  #f7f7f5;
  --ink:        #14161b;
  --ink-2:      #3d434c;
  --muted:      #767c85;
  --line:       #e3e3de;
  --line-2:     #d3d3cd;

  --accent:     #1f4fd8;
  --accent-ink: #ffffff;
  --accent-sub: #e8edfd;

  --free:       #0f7f5c;
  --free-sub:   #e4f3ed;
  --sched:      #a86608;
  --sched-sub:  #fbeedb;
  --visited:    #a5273a;
  --visited-sub:#fbe8ea;
  --out:        #5b34c4;
  --out-sub:    #ece5fb;

  --radius:     14px;
  --radius-lg:  22px;
  --shadow:     0 1px 2px rgba(20,22,27,.06), 0 8px 24px -12px rgba(20,22,27,.18);
  --shadow-lg:  0 2px 6px rgba(20,22,27,.08), 0 24px 56px -20px rgba(20,22,27,.3);

  --display: 'Bricolage Grotesque', 'Inter', system-ui, sans-serif;
  --body:    'Inter', system-ui, -apple-system, sans-serif;
  --mono:    'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace;

  --tabbar: 68px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #101216; --surface: #181b21; --surface-2: #1f232a;
    --ink: #f0f1f3; --ink-2: #c3c7ce; --muted: #8b929c;
    --line: #272b33; --line-2: #343a44;
    --accent: #6b8dff; --accent-ink: #0d1017; --accent-sub: #1c2740;
    --free: #4fc79b; --free-sub: #14322a;
    --sched: #e5a54a; --sched-sub: #35270f;
    --visited: #f0798a; --visited-sub: #3a1a20;
    --out: #a98bff; --out-sub: #241b3d;
    --shadow: 0 1px 2px rgba(0,0,0,.5), 0 8px 24px -12px rgba(0,0,0,.7);
    --shadow-lg: 0 2px 6px rgba(0,0,0,.5), 0 24px 56px -20px rgba(0,0,0,.8);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #101216; --surface: #181b21; --surface-2: #1f232a;
  --ink: #f0f1f3; --ink-2: #c3c7ce; --muted: #8b929c;
  --line: #272b33; --line-2: #343a44;
  --accent: #6b8dff; --accent-ink: #0d1017; --accent-sub: #1c2740;
  --free: #4fc79b; --free-sub: #14322a;
  --sched: #e5a54a; --sched-sub: #35270f;
  --visited: #f0798a; --visited-sub: #3a1a20;
  --out: #a98bff; --out-sub: #241b3d;
  --shadow: 0 1px 2px rgba(0,0,0,.5), 0 8px 24px -12px rgba(0,0,0,.7);
  --shadow-lg: 0 2px 6px rgba(0,0,0,.5), 0 24px 56px -20px rgba(0,0,0,.8);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font-family: var(--body); font-size: 15px; line-height: 1.45;
  -webkit-font-smoothing: antialiased; overscroll-behavior-y: none;
}
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; }
[hidden] { display: none !important; }
a { color: var(--accent); }

h1, h2, h3 { font-family: var(--display); font-weight: 800; letter-spacing: -.02em; margin: 0; }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.eyebrow {
  font-family: var(--mono); font-size: 11px; letter-spacing: .12em;
  text-transform: uppercase; color: var(--muted);
}

/* ---------- the link mark ---------- */
.mark { display: inline-flex; align-items: center; gap: 6px; font-family: var(--display); font-weight: 800; letter-spacing: -.03em; }
.mark svg { display: block; }

/* ---------- login ---------- */
#login {
  min-height: 100dvh; display: grid; place-items: center; padding: 24px;
  background:
    radial-gradient(120% 80% at 80% -10%, var(--accent-sub), transparent 60%),
    var(--paper);
}
.login-card {
  width: 100%; max-width: 380px; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 30px 26px 26px; box-shadow: var(--shadow);
}
.login-card h1 { font-size: 40px; margin: 14px 0 2px; }
.login-sub { color: var(--muted); font-size: 13.5px; margin: 0 0 22px; }
.field { display: block; margin-bottom: 12px; }
.field span { display: block; font-size: 12px; color: var(--muted); margin-bottom: 5px; font-weight: 500; }
.field input {
  width: 100%; padding: 12px 13px; border: 1px solid var(--line-2); border-radius: 11px;
  background: var(--surface-2); outline: none; transition: border-color .12s, box-shadow .12s;
}
.field input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-sub); }
.check { display: flex; align-items: center; gap: 9px; font-size: 13.5px; color: var(--ink-2); margin: 14px 0 18px; }
.check input { width: 17px; height: 17px; accent-color: var(--accent); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 18px; border-radius: 12px; font-weight: 600; font-size: 14.5px;
  border: 1px solid transparent; transition: transform .08s, background .15s, opacity .15s;
}
.btn:active { transform: scale(.985); }
.btn-primary { background: var(--accent); color: var(--accent-ink); width: 100%; }
.btn-primary:disabled { opacity: .55; cursor: default; }
.btn-ghost { background: var(--surface); border-color: var(--line-2); color: var(--ink); }
.btn-quiet { color: var(--muted); font-weight: 500; }
.btn-danger { background: var(--visited-sub); color: var(--visited); }
.btn-block { width: 100%; }
.btn-lg { padding: 15px 20px; font-size: 16px; border-radius: 14px; }

.notice { font-size: 13px; padding: 10px 12px; border-radius: 10px; margin-bottom: 14px; }
.notice-error { background: var(--visited-sub); color: var(--visited); }
.notice-ok { background: var(--free-sub); color: var(--free); }
.login-hint { margin-top: 18px; font-size: 12px; color: var(--muted); line-height: 1.5; }

/* ---------- app shell ---------- */
#app { max-width: 620px; margin: 0 auto; padding-bottom: calc(var(--tabbar) + env(safe-area-inset-bottom)); }
.view { padding: 0 16px 28px; }

.pinned {
  position: sticky; top: 0; z-index: 40; background: var(--paper);
  padding: 8px 16px 6px;
}
.pinned::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: -14px; height: 14px;
  background: linear-gradient(var(--paper), transparent); pointer-events: none;
}

/* active trip strip */
.strip {
  display: flex; align-items: center; gap: 12px; width: 100%;
  background: var(--accent); color: var(--accent-ink);
  border-radius: 14px; padding: 10px 12px; text-align: left; box-shadow: var(--shadow);
}
.strip.is-out { background: var(--out); }
.strip-time {
  font-family: var(--mono); font-size: 11px; letter-spacing: .06em; text-transform: uppercase;
  background: rgba(255,255,255,.22); padding: 4px 7px; border-radius: 7px; white-space: nowrap;
}
.strip-main { flex: 1; min-width: 0; }
.strip-main b { display: block; font-size: 14px; font-weight: 650; }
.strip-main small { display: block; opacity: .8; font-size: 11.5px; }
.strip-cta {
  background: var(--accent-ink); color: var(--accent); border-radius: 999px;
  padding: 6px 13px; font-size: 12.5px; font-weight: 700; letter-spacing: .02em;
}

/* ---------- ticker ---------- */
.ticker {
  position: relative; overflow: hidden; margin: 12px 0 4px;
  border: 1px solid var(--line); border-radius: 13px; background: var(--surface);
  height: 54px;
}
.ticker-rail { position: absolute; inset: 0; }
.ticker-item {
  position: absolute; inset: 0; display: flex; align-items: center; gap: 10px;
  padding: 0 10px 0 13px; opacity: 0; transform: translateY(100%);
  transition: opacity .38s ease, transform .38s cubic-bezier(.2,.8,.3,1);
}
.ticker-item.is-in  { opacity: 1; transform: translateY(0); }
.ticker-item.is-out { opacity: 0; transform: translateY(-100%); }
.ticker-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--sched); flex: none; }
.ticker-text { flex: 1; min-width: 0; font-size: 13.5px; }
.ticker-text b { font-weight: 650; }
.ticker-text small { display: block; color: var(--muted); font-size: 11.5px; }
.ticker-btn {
  flex: none; background: var(--accent-sub); color: var(--accent); font-weight: 700;
  font-size: 12.5px; padding: 7px 13px; border-radius: 999px;
}
.ticker-empty { display: flex; align-items: center; height: 100%; padding: 0 13px; color: var(--muted); font-size: 13px; }

/* ---------- clock ---------- */
.clock { margin: 16px 0 18px; }
.clock-top { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 7px; }
.clock-title { font-family: var(--display); font-size: 27px; font-weight: 800; letter-spacing: -.03em; }
.clock-left { font-family: var(--mono); font-size: 12.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.clock-left b { color: var(--ink); font-size: 15px; }
.bar { height: 7px; border-radius: 999px; background: var(--line); overflow: hidden; }
.bar > i { display: block; height: 100%; background: var(--ink); border-radius: 999px; transition: width .6s ease; }
.clock-foot { display: flex; justify-content: space-between; margin-top: 6px; font-family: var(--mono); font-size: 11px; color: var(--muted); }
.clock.is-off .clock-title { color: var(--muted); }

/* ---------- search + filters ---------- */
.search { position: relative; margin-bottom: 10px; }
.search input {
  width: 100%; padding: 12px 13px 12px 38px; border-radius: 12px;
  border: 1px solid var(--line-2); background: var(--surface); outline: none;
}
.search input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-sub); }
.search svg { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--muted); }

.filters { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; margin-bottom: 6px; scrollbar-width: none; }
.filters::-webkit-scrollbar { display: none; }
.chip {
  flex: none; padding: 7px 12px; border-radius: 999px; font-size: 12.5px; font-weight: 550;
  border: 1px solid var(--line-2); background: var(--surface); color: var(--ink-2); white-space: nowrap;
}
.chip[aria-pressed="true"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.chip small { font-family: var(--mono); opacity: .6; margin-left: 4px; font-size: 10.5px; }

/* ---------- teacher list ---------- */
.section-head { display: flex; align-items: baseline; gap: 9px; margin: 20px 0 8px; }
.section-head h2 { font-size: 19px; }

.rows { border-top: 1px solid var(--line); }
.row {
  display: flex; align-items: center; gap: 12px; width: 100%; text-align: left;
  padding: 12px 2px; border-bottom: 1px solid var(--line); background: none;
}
.row:active { background: var(--surface-2); }
.row-main { flex: 1; min-width: 0; }
.row-name { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 15px; }
.row-name .room {
  font-family: var(--mono); font-size: 11.5px; font-weight: 500; color: var(--ink-2);
  background: var(--surface-2); border: 1px solid var(--line); border-radius: 6px; padding: 1px 6px;
}
.row-sub { font-size: 12.5px; color: var(--muted); margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row-state { flex: none; font-size: 11px; font-family: var(--mono); letter-spacing: .06em; text-transform: uppercase; padding: 4px 8px; border-radius: 7px; }
.s-free    { color: var(--free);    background: var(--free-sub); }
.s-sched   { color: var(--sched);   background: var(--sched-sub); }
.s-visited { color: var(--visited); background: var(--visited-sub); }
.s-out     { color: var(--out);     background: var(--out-sub); }
.s-noclass { color: var(--muted);   background: var(--surface-2); }
.row.is-noclass .row-name { color: var(--muted); }

.empty { padding: 34px 8px; text-align: center; color: var(--muted); font-size: 13.5px; }

/* ---------- going soon cards ---------- */
.soon { display: grid; gap: 10px; }
.soon-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 13px 14px; box-shadow: var(--shadow);
}
.soon-top { display: flex; align-items: center; gap: 8px; }
.soon-top .name { font-weight: 650; font-size: 15.5px; }
.soon-when { margin-left: auto; font-family: var(--mono); font-size: 11.5px; color: var(--sched); }
.soon-sub { font-size: 12.5px; color: var(--muted); margin: 3px 0 11px; display: flex; align-items: center; gap: 7px; }
.soon-actions { display: flex; gap: 8px; }
.soon-actions .btn { flex: 1; padding: 10px 14px; }

/* avatars */
.avatars { display: inline-flex; }
.avatars img, .avatars span {
  width: 22px; height: 22px; border-radius: 50%; object-fit: cover;
  border: 2px solid var(--surface); margin-left: -7px; background: var(--accent-sub);
  color: var(--accent); font-size: 9px; font-weight: 700; display: inline-flex;
  align-items: center; justify-content: center; letter-spacing: -.02em;
}
.avatars :first-child { margin-left: 0; }

/* ---------- trips ---------- */
.pass {
  background: var(--accent); color: var(--accent-ink); border-radius: 20px;
  padding: 20px 20px 18px; box-shadow: var(--shadow-lg); margin-bottom: 14px;
}
.pass.is-out { background: var(--out); }
.pass-head { display: flex; justify-content: space-between; font-family: var(--mono); font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; opacity: .85; }
.pass h2 { font-size: 30px; margin: 10px 0 1px; }
.pass .pass-room { font-family: var(--mono); font-size: 14px; opacity: .85; }
.pass-rule { height: 1px; background: rgba(255,255,255,.3); margin: 15px 0; position: relative; }
.pass-rule::before, .pass-rule::after {
  content: ''; position: absolute; top: -2.5px; width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent-ink);
}
.pass-rule::before { left: 0; } .pass-rule::after { right: 0; }
.pass-times { display: flex; align-items: flex-end; gap: 18px; }
.pass-elapsed { font-family: var(--mono); font-size: 38px; font-weight: 600; line-height: 1; letter-spacing: -.02em; }
.pass-time-col .eyebrow { color: rgba(255,255,255,.75); }
.pass-time-col b { font-family: var(--mono); font-size: 15px; font-weight: 500; }
.pass-party { display: flex; align-items: center; gap: 9px; margin: 14px 0 4px; font-size: 12.5px; opacity: .92; }
.pass-party .avatars img, .pass-party .avatars span { border-color: var(--accent); }
.pass.is-out .avatars img, .pass.is-out .avatars span { border-color: var(--out); }
.barcode-box { background: #fff; border-radius: 12px; padding: 12px 10px 8px; margin-top: 14px; text-align: center; }
.barcode-box svg { width: 100%; height: 62px; display: block; }
.barcode-num { font-family: var(--mono); font-size: 13px; letter-spacing: .38em; color: #14161b; margin-top: 5px; }

.callout {
  display: flex; gap: 10px; align-items: flex-start; background: var(--surface);
  border: 1px solid var(--line); border-radius: 12px; padding: 11px 13px; font-size: 13px; color: var(--ink-2);
}
.callout .dot { width: 20px; height: 20px; border-radius: 50%; background: var(--sched-sub); color: var(--sched); display: grid; place-items: center; font-size: 12px; font-weight: 800; flex: none; }

.list-card {
  display: flex; align-items: center; gap: 12px; width: 100%; text-align: left;
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px;
  padding: 12px 13px; margin-bottom: 8px;
}
.list-card .when { font-family: var(--mono); font-size: 13px; font-weight: 500; color: var(--ink); flex: none; }
.list-card .who { flex: 1; min-width: 0; }
.list-card .who b { display: block; font-weight: 600; font-size: 14.5px; }
.list-card .who small { color: var(--muted); font-size: 12px; }
.list-card .room { font-family: var(--mono); font-size: 11.5px; color: var(--muted); }

.hist { border-top: 1px solid var(--line); }
.hist-row { display: flex; align-items: center; gap: 12px; padding: 11px 2px; border-bottom: 1px solid var(--line); font-size: 14px; }
.hist-row .d { font-family: var(--mono); font-size: 11px; color: var(--muted); width: 52px; flex: none; text-transform: uppercase; }
.hist-row .n { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hist-row .r { font-family: var(--mono); font-size: 11.5px; color: var(--muted); }
.hist-row .m { font-family: var(--mono); font-size: 12px; color: var(--ink-2); width: 52px; text-align: right; flex: none; }

/* ---------- me ---------- */
.idcard {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 18px; box-shadow: var(--shadow); margin-bottom: 12px;
}
.idcard-top { display: flex; gap: 14px; align-items: center; }
.idcard-photo { width: 74px; height: 74px; border-radius: 16px; object-fit: cover; flex: none; background: var(--surface-2); }
.idcard-photo.initials { display: grid; place-items: center; font-family: var(--display); font-size: 26px; font-weight: 800; color: var(--accent); background: var(--accent-sub); }
.idcard-top h2 { font-size: 24px; }
.idcard-top .eyebrow { margin-bottom: 3px; }
.idcard-top p { margin: 2px 0 0; color: var(--muted); font-size: 13px; }
.idcard-bar { margin-top: 16px; background: var(--surface-2); border-radius: 12px; padding: 12px 10px 8px; text-align: center; }
.idcard-bar svg { width: 100%; height: 56px; }
.idcard-foot { display: flex; justify-content: space-between; margin-top: 10px; }

.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 12px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; }
.stat.wide { grid-column: 1 / -1; }
.stat b { display: block; font-family: var(--display); font-size: 34px; font-weight: 800; line-height: 1.05; letter-spacing: -.03em; }
.stat p { margin: 3px 0 0; font-size: 12.5px; color: var(--muted); }
.meter { height: 6px; background: var(--line); border-radius: 999px; margin-top: 10px; overflow: hidden; }
.meter > i { display: block; height: 100%; background: var(--accent); border-radius: 999px; }
.deptlist { display: grid; gap: 7px; margin-top: 10px; }
.deptrow { display: flex; align-items: center; gap: 9px; font-size: 13px; }
.deptrow .track { flex: 1; height: 5px; background: var(--line); border-radius: 999px; overflow: hidden; }
.deptrow .track i { display: block; height: 100%; background: var(--accent); }
.deptrow .n { font-family: var(--mono); font-size: 12px; color: var(--muted); }

.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 4px 14px; margin-bottom: 12px; }
.panel-row { display: flex; align-items: center; gap: 10px; width: 100%; padding: 13px 0; border-bottom: 1px solid var(--line); text-align: left; font-size: 14.5px; }
.panel-row:last-child { border-bottom: 0; }
.panel-row .lbl { flex: 1; }
.panel-row .val { color: var(--muted); font-size: 13px; font-family: var(--mono); }

/* ---------- tab bar ---------- */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
  display: flex; background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: blur(14px); border-top: 1px solid var(--line);
  padding-bottom: env(safe-area-inset-bottom);
}
.tabbar > button {
  flex: 1; display: grid; justify-items: center; gap: 3px; padding: 11px 0 9px;
  color: var(--muted); font-size: 10.5px; font-weight: 600; letter-spacing: .02em;
}
.tabbar > button[aria-current="page"] { color: var(--accent); }
.tabbar .ind { width: 30px; height: 24px; border-radius: 8px; display: grid; place-items: center; }
.tabbar > button[aria-current="page"] .ind { background: var(--accent-sub); }
.tabbar .badge {
  position: absolute; transform: translate(13px,-9px); background: var(--visited); color: #fff;
  font-size: 9px; font-weight: 700; min-width: 15px; height: 15px; border-radius: 999px;
  display: grid; place-items: center; padding: 0 4px;
}

/* ---------- sheets and modals ---------- */
.scrim {
  position: fixed; inset: 0; z-index: 60; background: rgba(15,17,22,.45);
  opacity: 0; transition: opacity .22s; backdrop-filter: blur(1.5px);
}
.scrim.is-open { opacity: 1; }

.sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 61; max-height: 88dvh; overflow: auto;
  background: var(--surface); border-radius: 22px 22px 0 0; box-shadow: var(--shadow-lg);
  transform: translateY(100%); transition: transform .3s cubic-bezier(.25,.9,.3,1);
  padding: 8px 18px calc(22px + env(safe-area-inset-bottom));
  max-width: 620px; margin: 0 auto;
}
.sheet.is-open { transform: translateY(0); }
.grabber { width: 38px; height: 4px; border-radius: 999px; background: var(--line-2); margin: 6px auto 14px; }

.modal {
  position: fixed; inset: 0; z-index: 61; display: grid; place-items: center; padding: 20px;
  pointer-events: none;
}
.modal-box {
  width: 100%; max-width: 380px; background: var(--surface); border-radius: 20px;
  box-shadow: var(--shadow-lg); padding: 22px; pointer-events: auto;
  transform: scale(.94); opacity: 0; transition: transform .2s cubic-bezier(.25,.9,.3,1), opacity .18s;
}
.modal.is-open .modal-box { transform: scale(1); opacity: 1; }

.sheet h2, .modal-box h2 { font-size: 26px; letter-spacing: -.03em; }
.sheet-room { font-family: var(--mono); font-size: 15px; color: var(--muted); margin-left: 8px; font-weight: 500; }
.insession { background: var(--accent-sub); border-radius: 12px; padding: 12px 14px; margin: 14px 0; }
.insession b { display: block; font-size: 15.5px; font-weight: 650; margin-top: 2px; }
.insession small { color: var(--muted); font-size: 12px; }
.noclass-note { background: var(--surface-2); border-radius: 12px; padding: 12px 14px; margin: 14px 0; color: var(--muted); font-size: 13.5px; }
.teacher-note { background: var(--visited-sub); color: var(--visited); border-radius: 12px; padding: 11px 13px; margin: 12px 0; font-size: 13px; }

.kv { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; margin-bottom: 12px; }
.kv-row { display: flex; gap: 12px; padding: 11px 13px; border-bottom: 1px solid var(--line); font-size: 13.5px; }
.kv-row:last-child { border-bottom: 0; }
.kv-row .k { color: var(--muted); flex: none; width: 128px; }
.modal-box .kv-row .k { width: 104px; }
.kv-row .v { flex: 1; text-align: right; font-weight: 500; }
.sheet-actions { display: flex; gap: 9px; margin-top: 6px; }
.sheet-actions .btn { flex: 1; }
.sheet-actions .btn-primary { flex: 2; }

/* time stepper */
.stepper { background: var(--surface-2); border-radius: 14px; padding: 16px; margin: 16px 0 6px; }
.stepper-row { display: flex; align-items: center; justify-content: center; gap: 18px; }
.stepper-btn {
  width: 42px; height: 42px; border-radius: 50%; background: var(--surface);
  border: 1px solid var(--line-2); font-size: 21px; font-weight: 600; color: var(--ink);
  display: grid; place-items: center; line-height: 1;
}
.stepper-btn:disabled { opacity: .35; }
.stepper-time { font-family: var(--display); font-size: 42px; font-weight: 800; letter-spacing: -.03em; min-width: 150px; text-align: center; font-variant-numeric: tabular-nums; }
.stepper-track { height: 6px; background: var(--line); border-radius: 999px; margin: 14px 0 7px; overflow: hidden; }
.stepper-track i { display: block; height: 100%; background: var(--accent); }
.stepper-ends { display: flex; justify-content: space-between; font-family: var(--mono); font-size: 11px; color: var(--muted); }
.stepper-meta { text-align: center; font-family: var(--mono); font-size: 11.5px; color: var(--muted); margin-top: 9px; letter-spacing: .04em; }

/* fullscreen barcode */
#barcode-full {
  position: fixed; inset: 0; z-index: 90; background: #fff; display: grid;
  grid-template-rows: 1fr auto; place-items: center; padding: 26px;
}
#barcode-full .wrap { display: grid; place-items: center; width: 100%; }
#barcode-full svg { width: min(88vw, 520px); height: min(46vh, 260px); }
#barcode-full .num { font-family: var(--mono); font-size: 22px; letter-spacing: .5em; color: #14161b; margin-top: 18px; }
#barcode-full .nm { font-family: var(--display); font-size: 26px; font-weight: 800; color: #14161b; margin-bottom: 20px; }
#barcode-full .close { color: #767c85; font-size: 14px; padding: 14px; }

/* toast */
#toast {
  position: fixed; left: 50%; bottom: calc(var(--tabbar) + 18px); transform: translate(-50%, 14px);
  z-index: 95; background: var(--ink); color: var(--paper); padding: 11px 17px; border-radius: 12px;
  font-size: 13.5px; font-weight: 500; opacity: 0; transition: opacity .22s, transform .22s;
  max-width: min(90vw, 420px); box-shadow: var(--shadow-lg); text-align: center;
}
#toast.is-on { opacity: 1; transform: translate(-50%, 0); }

.spinner { width: 17px; height: 17px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
