/* kabu.css - the KABU design system (2026 edition).
 *
 * WHAT IT SHOULD FEEL LIKE
 *   Calm, warm and exact - a tool, not a dashboard toy. Quiet by
 *   default; LOUD only when something needs a person (late, cancelled,
 *   failed, money that does not add up). Staff look at it for twelve
 *   hours, so nothing glows, bounces or blinks.
 *
 * RULES THAT CAME FROM THE RESEARCH, NOT FROM TASTE
 *   - No motion on anything a cashier taps. Square lost customers over
 *     a half-second slide. Pressing is instant: a darker fill, a 1px nudge.
 *   - Money in tabular figures, so columns of rupees line up.
 *   - Nothing a finger needs is smaller than 44px.
 *   - The kitchen is dark and high-contrast (body.dark): read from two
 *     metres, under heat lamps, with wet hands.
 *   - Works with no internet: fonts live in ui/fonts, nothing loads
 *     from outside.
 *
 * THE PIECES
 *   Type     Geist for everything you read, Bricolage Grotesque for the
 *            few things that are the point of a screen (the big number,
 *            the table name, the clock), Geist Mono for codes.
 *   Colour   warm paper, near-black ink, ONE accent - Kabu ember, from
 *            the robot's side pods - and four plain signals: basil
 *            (good), saffron (wait), chilli (wrong), indigo (info).
 *   Shape    soft 16px cards on a paper ground, hairline borders, one
 *            glass top bar.
 *
 * The customer-facing half (kiosk, robot) deliberately does NOT use
 * this file - it has its own, more theatrical identity.
 */

@font-face { font-family: "Geist"; src: url("fonts/Geist.woff2") format("woff2");
  font-weight: 100 900; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
                 U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2190-2199,
                 U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Geist"; src: url("fonts/Geist-ext.woff2") format("woff2");
  font-weight: 100 900; font-display: swap;
  unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF,
                 U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Geist Mono"; src: url("fonts/GeistMono.woff2") format("woff2");
  font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Bricolage Grotesque"; src: url("fonts/Bricolage.woff2") format("woff2");
  font-weight: 200 800; font-display: swap; }

/* ================================================================ tokens */

:root {
  --font: "Geist", "Segoe UI Variable Text", "Segoe UI", system-ui, sans-serif;
  --display: "Bricolage Grotesque", "Geist", system-ui, sans-serif;
  --mono: "Geist Mono", "Cascadia Mono", ui-monospace, Consolas, monospace;

  --paper:   oklch(97.4% 0.007 80);    /* the warm ground */
  --paper-2: oklch(95.1% 0.009 78);    /* wells, inputs, pressed */
  --card:    oklch(99.7% 0.002 80);
  --ink:     oklch(21% 0.012 60);
  --ink-2:   oklch(44% 0.013 60);
  --ink-3:   oklch(61% 0.011 60);
  --line:    oklch(90.6% 0.009 75);
  --line-2:  oklch(84.5% 0.011 75);

  --ember:        oklch(67% 0.185 48);   /* the one accent */
  --ember-strong: oklch(60% 0.19 45);
  --ember-soft:   oklch(94.6% 0.038 62);
  --ember-ink:    oklch(46% 0.14 45);

  --good: oklch(57% 0.13 155);  --good-soft: oklch(95.2% 0.035 155);  --good-ink: oklch(40% 0.1 155);
  --warn: oklch(73% 0.15 75);   --warn-soft: oklch(95.8% 0.05 88);    --warn-ink: oklch(48% 0.11 62);
  --bad:  oklch(58% 0.2 27);    --bad-soft:  oklch(95.2% 0.03 25);    --bad-ink:  oklch(46% 0.17 27);
  --info: oklch(54% 0.16 262);  --info-soft: oklch(95.3% 0.024 262);  --info-ink: oklch(42% 0.14 262);

  --glass: oklch(98.6% 0.005 80 / .78);
  --scrim: oklch(18% 0.02 60 / .42);
  --ring:  0 0 0 3px oklch(67% 0.185 48 / .32);

  --r-xs: 8px; --r-sm: 12px; --r: 16px; --r-lg: 22px;
  --shadow-1: 0 1px 0 oklch(20% 0.02 60 / .03), 0 1px 2px oklch(20% 0.02 60 / .05);
  --shadow-2: 0 1px 2px oklch(20% 0.02 60 / .05), 0 10px 28px -12px oklch(20% 0.02 60 / .16);
  --shadow-3: 0 2px 6px oklch(20% 0.02 60 / .08), 0 30px 70px -20px oklch(20% 0.02 60 / .34);

  /* old names, kept so nothing breaks */
  --sunk: var(--paper-2);
  --radius: var(--r); --radius-sm: var(--r-sm);
  --shadow: var(--shadow-1); --shadow-lift: var(--shadow-3);
  --ember-hover: var(--ember-strong);

  color-scheme: light;
}

/* Dark: the kitchen always; any screen when someone chooses it. */
body.dark, :root[data-theme="dark"] {
  --paper:   oklch(15.5% 0.008 260);
  --paper-2: oklch(23% 0.011 260);
  --card:    oklch(19.5% 0.01 260);
  --ink:     oklch(97% 0.004 260);
  --ink-2:   oklch(79% 0.01 260);
  --ink-3:   oklch(61% 0.012 260);
  --line:    oklch(28% 0.012 260);
  --line-2:  oklch(35% 0.014 260);
  --ember-soft: oklch(30% 0.07 50);
  --ember-ink:  oklch(82% 0.12 60);
  --good-soft: oklch(28% 0.05 155);  --good-ink: oklch(84% 0.11 155);
  --warn-soft: oklch(30% 0.06 80);   --warn-ink: oklch(87% 0.12 85);
  --bad-soft:  oklch(29% 0.08 27);   --bad-ink:  oklch(82% 0.11 27);
  --info-soft: oklch(28% 0.06 262);  --info-ink: oklch(83% 0.08 262);
  --glass: oklch(19% 0.01 260 / .78);
  --scrim: oklch(5% 0.01 260 / .6);
  --shadow-1: none;
  --shadow-2: 0 10px 28px -12px oklch(0% 0 0 / .6);
  color-scheme: dark;
}

/* ================================================================ base */

* { box-sizing: border-box; margin: 0; }
html, body { height: 100%; }
body {
  background: var(--paper); color: var(--ink);
  font-family: var(--font); font-size: 15px; line-height: 1.45;
  font-feature-settings: "ss01", "cv11";
  -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent;
  text-rendering: optimizeLegibility;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: none; box-shadow: var(--ring); }
::selection { background: var(--ember-soft); }
[hidden] { display: none !important; }

/* ================================================================ layout */

.app { display: grid; grid-template-rows: auto 1fr; height: 100dvh; }
.row   { display: flex; align-items: center; gap: 10px; }
.stack { display: flex; flex-direction: column; gap: 10px; }
.wrap  { flex-wrap: wrap; }
.grow  { flex: 1; min-width: 0; }
.scroll { overflow: auto; overscroll-behavior: contain; }
.pad   { padding: 18px 20px; }
.gap-4 { gap: 4px; } .gap-16 { gap: 16px; } .gap-24 { gap: 24px; }
.spacer { flex: 1; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ================================================================ the top bar
 * The same on every screen: brand, which screen, search, status, clock,
 * who is signed in. Built by kabu.js shell(). */

.topbar {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; gap: 12px;
  height: 60px; padding: 0 16px 0 18px;
  background: var(--glass); backdrop-filter: saturate(1.6) blur(18px);
  -webkit-backdrop-filter: saturate(1.6) blur(18px);
  border-bottom: 1px solid var(--line);
}
.brand { display: inline-flex; align-items: center; gap: 7px;
  font-family: var(--display); font-weight: 800; font-size: 21px;
  letter-spacing: -.035em; color: var(--ink); text-decoration: none; }
.brand::before {                    /* the ember "pod" */
  content: ""; width: 11px; height: 11px; border-radius: 50%;
  background: var(--ember); box-shadow: 0 0 0 3px var(--ember-soft); }
.topbar .where { color: var(--ink-2); font-weight: 600; }

.screen-pill { display: inline-flex; align-items: center; gap: 8px;
  height: 36px; padding: 0 10px 0 12px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--card);
  font-weight: 600; font-size: 14px; }
.screen-pill .venue { color: var(--ink-3); font-weight: 500; }

.search-trigger { display: inline-flex; align-items: center; gap: 10px;
  height: 38px; min-width: 240px; padding: 0 8px 0 12px; border-radius: 12px;
  border: 1px solid var(--line); background: var(--paper-2); color: var(--ink-3);
  font-size: 14px; }
.search-trigger .grow { text-align: left; }

.status-chip { display: inline-flex; align-items: center; gap: 7px; height: 32px;
  padding: 0 11px; border-radius: 999px; font-size: 13px; font-weight: 600;
  background: var(--paper-2); color: var(--ink-2); white-space: nowrap; }
.status-chip.bad  { background: var(--bad-soft);  color: var(--bad-ink); }
.status-chip.warn { background: var(--warn-soft); color: var(--warn-ink); }
.clock { font-family: var(--display); font-weight: 600; font-size: 17px;
  letter-spacing: -.02em; font-variant-numeric: tabular-nums; min-width: 72px;
  text-align: right; }

.person { display: inline-flex; align-items: center; gap: 9px; height: 40px;
  padding: 0 12px 0 4px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--card); font-weight: 600; font-size: 14px; }
.person small { color: var(--ink-3); font-weight: 500; }

.avatar { display: inline-grid; place-items: center; flex: none;
  width: 32px; height: 32px; border-radius: 50%; font-size: 12.5px; font-weight: 700;
  letter-spacing: .02em; background: var(--paper-2); color: var(--ink-2); }
.avatar.owner   { background: var(--ink); color: var(--paper); }
.avatar.manager { background: var(--ember); color: #fff; }
.avatar.cashier { background: var(--info-soft); color: var(--info-ink); }
.avatar.waiter  { background: var(--good-soft); color: var(--good-ink); }
.avatar.kitchen { background: var(--warn-soft); color: var(--warn-ink); }
.avatar.device  { background: var(--paper-2); color: var(--ink-3); }
.avatar.big { width: 44px; height: 44px; font-size: 15px; }

/* ================================================================ text */

h1 { font-family: var(--display); font-size: 30px; font-weight: 700; letter-spacing: -.035em; line-height: 1.1; }
h2 { font-size: 17px; font-weight: 650; letter-spacing: -.01em; }
h3 { font-size: 12px; font-weight: 650; text-transform: uppercase;
     letter-spacing: .09em; color: var(--ink-3); }
.display { font-family: var(--display); letter-spacing: -.035em; }
.lede  { color: var(--ink-2); font-size: 15.5px; max-width: 62ch; }
.muted { color: var(--ink-2); }
.hint  { color: var(--ink-3); font-size: 13px; }
.num   { font-variant-numeric: tabular-nums; font-feature-settings: "tnum"; }
.big-num { font-family: var(--display); font-size: 34px; font-weight: 700;
  letter-spacing: -.04em; line-height: 1; font-variant-numeric: tabular-nums; }
.mono  { font-family: var(--mono); font-size: .92em; }
.kbd   { display: inline-grid; place-items: center; min-width: 22px; height: 22px;
  padding: 0 6px; border-radius: 6px; border: 1px solid var(--line-2);
  border-bottom-width: 2px; background: var(--card); color: var(--ink-2);
  font: 600 11.5px/1 var(--font); }

/* ================================================================ surfaces */

.card { background: var(--card); border: 1px solid var(--line);
  border-radius: var(--r); box-shadow: var(--shadow-1); }
.card.pad, .card .pad { padding: 18px 20px; }
.card.lift { box-shadow: var(--shadow-2); }
.card-head { display: flex; align-items: center; gap: 10px;
  padding: 14px 18px; border-bottom: 1px solid var(--line); }
.card-head h2 { flex: 1; }
.well { background: var(--paper-2); border-radius: var(--r-sm); }
.divider { height: 1px; background: var(--line); margin: 10px 0; }

/* A number that is the point of a card. */
.stat { padding: 16px 18px; }
.stat .label { font-size: 12.5px; font-weight: 600; color: var(--ink-3);
  text-transform: uppercase; letter-spacing: .07em; }
.stat .value { margin-top: 8px; }
.stat .sub { margin-top: 6px; font-size: 13px; color: var(--ink-2); }
.stat.hero { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.stat.hero .label, .stat.hero .sub { color: color-mix(in oklch, var(--paper) 70%, var(--ink)); }

/* "What needs me now?" - the strip at the top of a screen. */
.notice { display: flex; align-items: center; gap: 12px; padding: 12px 16px;
  border-radius: var(--r-sm); background: var(--paper-2); color: var(--ink);
  font-weight: 500; }
.notice .icon { flex: none; }
.notice.good { background: var(--good-soft); color: var(--good-ink); }
.notice.warn { background: var(--warn-soft); color: var(--warn-ink); }
.notice.bad  { background: var(--bad-soft);  color: var(--bad-ink); }
.notice.info { background: var(--info-soft); color: var(--info-ink); }
.banner { padding: 11px 14px; border-radius: var(--r-sm); font-weight: 550; }
.banner.good { background: var(--good-soft); color: var(--good-ink); }
.banner.warn { background: var(--warn-soft); color: var(--warn-ink); }
.banner.bad  { background: var(--bad-soft);  color: var(--bad-ink); }
.banner.info { background: var(--info-soft); color: var(--info-ink); }

/* ================================================================ buttons
 * No transitions. Pressing is instant: a darker fill, a 1px nudge. */

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 16px; border-radius: var(--r-sm);
  border: 1px solid var(--line-2); background: var(--card); color: var(--ink);
  font-weight: 600; font-size: 14.5px; letter-spacing: -.005em;
  user-select: none; transition: none; white-space: nowrap; text-decoration: none; }
.btn:hover { border-color: var(--ink-3); }
.btn:active { transform: translateY(1px); background: var(--paper-2); }
.btn:disabled { opacity: .45; cursor: default; transform: none; }
.btn.primary { background: var(--ember); border-color: var(--ember); color: #fff; }
.btn.primary:hover { background: var(--ember-strong); border-color: var(--ember-strong); }
.btn.dark  { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.btn.soft  { background: var(--ember-soft); border-color: transparent; color: var(--ember-ink); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--ink-2); }
.btn.ghost:hover { background: var(--paper-2); }
.btn.danger { background: var(--bad-soft); border-color: transparent; color: var(--bad-ink); }
.btn.good  { background: var(--good); border-color: var(--good); color: #fff; }
.btn.big   { min-height: 56px; font-size: 16.5px; padding: 0 22px; border-radius: 14px; }
.btn.small { min-height: 34px; padding: 0 12px; font-size: 13px; border-radius: 10px; }
.btn.icon-only { padding: 0; width: 44px; }
.btn.small.icon-only { width: 34px; }
.btn.block { width: 100%; }

/* ================================================================ chips, badges, tabs */

.chip { display: inline-flex; align-items: center; gap: 6px; min-height: 36px;
  padding: 0 14px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--card); font-weight: 600; font-size: 14px; transition: none; }
.chip:hover { border-color: var(--line-2); }
.chip:active { background: var(--paper-2); }
.chip.on { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.chip.ember.on { background: var(--ember); border-color: var(--ember); color: #fff; }
.chip .count { font-size: 12px; opacity: .7; }

.badge { display: inline-flex; align-items: center; gap: 5px; height: 22px;
  padding: 0 8px; border-radius: 999px; font-size: 12px; font-weight: 650;
  background: var(--paper-2); color: var(--ink-2); white-space: nowrap; }
.badge.good  { background: var(--good-soft); color: var(--good-ink); }
.badge.warn  { background: var(--warn-soft); color: var(--warn-ink); }
.badge.bad   { background: var(--bad-soft);  color: var(--bad-ink); }
.badge.info  { background: var(--info-soft); color: var(--info-ink); }
.badge.ember { background: var(--ember-soft); color: var(--ember-ink); }
.badge.dark  { background: var(--ink); color: var(--paper); }

.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ink-3);
  display: inline-block; flex: none; }
.dot.good { background: var(--good); } .dot.warn { background: var(--warn); }
.dot.bad { background: var(--bad); } .dot.ember { background: var(--ember); }

/* segmented control: Today | 7 days | 30 days */
.seg { display: inline-flex; padding: 3px; gap: 2px; border-radius: 12px;
  background: var(--paper-2); border: 1px solid var(--line); }
.seg button { height: 32px; padding: 0 13px; border: 0; border-radius: 9px;
  background: transparent; color: var(--ink-2); font-weight: 600; font-size: 13.5px; }
.seg button.on, .seg button[aria-pressed="true"] { background: var(--card);
  color: var(--ink); box-shadow: var(--shadow-1); }

/* side navigation inside a screen */
.side-nav { display: flex; flex-direction: column; gap: 2px; }
.side-nav button, .side-nav a { display: flex; align-items: center; gap: 10px;
  min-height: 42px; padding: 0 12px; border: 0; border-radius: 11px;
  background: transparent; color: var(--ink-2); font-weight: 600; font-size: 14.5px;
  text-align: left; text-decoration: none; }
.side-nav button:hover, .side-nav a:hover { background: var(--paper-2); color: var(--ink); }
.side-nav .on, .side-nav [aria-current="page"] { background: var(--card); color: var(--ink);
  box-shadow: var(--shadow-1); border: 1px solid var(--line); }
.side-nav .count { margin-left: auto; }

/* ================================================================ forms */

.field { display: flex; flex-direction: column; gap: 6px; }
.field > label, .label { font-size: 13px; font-weight: 600; color: var(--ink-2); }
.field .hint { margin-top: -2px; }
.input, .select, textarea.input {
  width: 100%; min-height: 44px; padding: 0 13px;
  border: 1px solid var(--line-2); border-radius: var(--r-sm);
  background: var(--card); outline: none; }
textarea.input { padding: 10px 13px; min-height: 96px; resize: vertical; line-height: 1.45; }
.input::placeholder { color: var(--ink-3); }
.input:hover, .select:hover { border-color: var(--ink-3); }
.input:focus, .select:focus { border-color: var(--ember); box-shadow: var(--ring); }
.input.invalid { border-color: var(--bad); box-shadow: 0 0 0 3px var(--bad-soft); }
.input.num { text-align: right; }
.input.search { padding-left: 40px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' fill='none' stroke='%23999' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='8' cy='8' r='6'/%3E%3Cpath d='m16 16-3.5-3.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: 13px center; }
.select { appearance: none; padding-right: 34px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='none' stroke='%23999' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='m2 4 4 4 4-4'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; }
.input-group { display: flex; align-items: stretch; }
.input-group .addon { display: grid; place-items: center; padding: 0 12px;
  border: 1px solid var(--line-2); border-right: 0; border-radius: var(--r-sm) 0 0 var(--r-sm);
  background: var(--paper-2); color: var(--ink-2); font-weight: 600; }
.input-group .input { border-radius: 0 var(--r-sm) var(--r-sm) 0; }

/* on/off switch */
.switch { position: relative; display: inline-flex; align-items: center; flex: none;
  width: 46px; height: 28px; border-radius: 999px; border: 0; padding: 0;
  background: var(--line-2); }
.switch::after { content: ""; position: absolute; left: 3px; width: 22px; height: 22px;
  border-radius: 50%; background: #fff; box-shadow: 0 1px 2px oklch(0% 0 0 / .25); }
.switch.on, .switch[aria-checked="true"] { background: var(--good); }
.switch.on::after, .switch[aria-checked="true"]::after { left: 21px; }
.switch:disabled { opacity: .5; }

/* ================================================================ lists & tables */

table.list { width: 100%; border-collapse: collapse; }
table.list th { text-align: left; font-size: 11.5px; font-weight: 650;
  text-transform: uppercase; letter-spacing: .07em; color: var(--ink-3);
  padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
table.list td { padding: 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.list tr:last-child td { border-bottom: none; }
table.list tbody tr:hover td { background: oklch(from var(--paper-2) l c h / .55); }
table.list td.r, table.list th.r { text-align: right; }

.rows > * + * { border-top: 1px solid var(--line); }
.list-row { display: flex; align-items: center; gap: 12px; padding: 12px 16px; }

/* ================================================================ overlays */

.scrim { position: fixed; inset: 0; z-index: 50; display: none;
  align-items: center; justify-content: center; padding: 20px;
  background: var(--scrim); backdrop-filter: blur(3px); }
.scrim.open { display: flex; }
.sheet { background: var(--card); border: 1px solid var(--line); border-radius: 24px;
  padding: 24px; width: min(460px, 100%); box-shadow: var(--shadow-3);
  max-height: calc(100dvh - 40px); overflow: auto; }
.sheet h2 { font-family: var(--display); font-size: 22px; font-weight: 700;
  letter-spacing: -.03em; margin-bottom: 4px; }
.sheet.wide { width: min(720px, 100%); }

/* a panel that slides in from the right (no motion: it just appears) */
.drawer { position: fixed; top: 0; right: 0; bottom: 0; z-index: 45;
  width: min(460px, 100vw); background: var(--card); border-left: 1px solid var(--line);
  box-shadow: var(--shadow-3); display: flex; flex-direction: column; }
.drawer-head { display: flex; align-items: center; gap: 10px; padding: 16px 18px;
  border-bottom: 1px solid var(--line); }
.drawer-head h2 { flex: 1; font-family: var(--display); font-size: 21px;
  font-weight: 700; letter-spacing: -.03em; }
.drawer-body { flex: 1; overflow: auto; padding: 18px; }
.drawer-foot { padding: 14px 18px; border-top: 1px solid var(--line);
  display: flex; gap: 10px; }

/* dropdown menu */
.menu-pop { position: fixed; z-index: 60; min-width: 220px; padding: 6px;
  background: var(--card); border: 1px solid var(--line); border-radius: 14px;
  box-shadow: var(--shadow-3); }
.menu-pop button, .menu-pop a { display: flex; align-items: center; gap: 10px; width: 100%;
  min-height: 40px; padding: 0 10px; border: 0; border-radius: 9px; background: none;
  color: var(--ink); font-weight: 550; font-size: 14px; text-decoration: none; text-align: left; }
.menu-pop button:hover, .menu-pop a:hover, .menu-pop .active { background: var(--paper-2); }
.menu-pop .sep { height: 1px; background: var(--line); margin: 6px 4px; }
.menu-pop .label { padding: 8px 10px 4px; font-size: 11.5px; text-transform: uppercase;
  letter-spacing: .08em; color: var(--ink-3); }

/* the PIN pad: a manager approves right here, on this terminal */
.pinpad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 16px; }
.pinpad .btn { min-height: 62px; font-size: 23px; font-weight: 600; border-radius: 16px;
  font-variant-numeric: tabular-nums; }
.pin-dots { display: flex; gap: 14px; justify-content: center; margin: 18px 0 6px; }
.pin-dots span { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--line-2); }
.pin-dots span.filled { background: var(--ink); border-color: var(--ink); }
.pin-message { min-height: 20px; text-align: center; font-size: 14px; font-weight: 600;
  color: var(--bad-ink); }

/* ================================================================ the lock screen
 * The first thing anyone sees. Big clock, the venue's name, a PIN pad. */

.lock { position: fixed; inset: 0; z-index: 70; display: grid;
  grid-template-columns: 1.15fr 1fr; background: var(--paper); }
.lock-side { position: relative; overflow: hidden; display: flex; flex-direction: column;
  justify-content: space-between; padding: 36px 44px; color: oklch(97% 0.01 70);
  background:
    radial-gradient(120% 90% at 0% 100%, oklch(67% 0.185 48 / .95), transparent 60%),
    radial-gradient(90% 80% at 100% 0%, oklch(45% 0.12 30 / .9), transparent 65%),
    oklch(22% 0.03 40); }
.lock-side::after { content: ""; position: absolute; inset: 0; opacity: .14; pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }
.lock-side .brand { color: inherit; font-size: 26px; }
.lock-side .brand::before { box-shadow: 0 0 0 3px oklch(100% 0 0 / .25); background: #fff; }
.lock-time { font-family: var(--display); font-size: clamp(72px, 11vw, 148px); font-weight: 700;
  letter-spacing: -.06em; line-height: .9; font-variant-numeric: tabular-nums; }
.lock-date { font-size: 20px; font-weight: 500; opacity: .85; margin-top: 10px; }
.lock-title { font-family: var(--display); font-size: clamp(44px, 6.4vw, 84px); font-weight: 700;
  letter-spacing: -.045em; line-height: .95; }
.pair-code { font-family: var(--mono); font-size: 26px; letter-spacing: .12em; text-align: center;
  height: 60px; text-transform: uppercase; }
.lock-venue { font-family: var(--display); font-size: 30px; font-weight: 600; letter-spacing: -.03em; }
.lock-pad { display: flex; align-items: center; justify-content: center; padding: 32px; }
.lock-pad .inner { width: min(360px, 100%); }
.lock-pad h2 { font-family: var(--display); font-size: 28px; font-weight: 700; letter-spacing: -.035em; }
@media (max-width: 820px) {
  .lock { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
  .lock-side { padding: 22px 24px; }
  .lock-time { font-size: 64px; }
}

/* ================================================================ command palette (Ctrl K) */

.palette { position: fixed; inset: 0; z-index: 65; display: flex; justify-content: center;
  align-items: flex-start; padding: 12vh 16px 16px; background: var(--scrim); }
.palette-box { width: min(640px, 100%); background: var(--card); border: 1px solid var(--line);
  border-radius: 20px; box-shadow: var(--shadow-3); overflow: hidden; }
.palette-input { width: 100%; height: 58px; padding: 0 20px 0 50px; border: 0;
  border-bottom: 1px solid var(--line); background: transparent; outline: none; font-size: 17px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' fill='none' stroke='%23999' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='9' cy='9' r='6.5'/%3E%3Cpath d='m18 18-4.2-4.2'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: 18px center; }
.palette-list { max-height: min(56vh, 460px); overflow: auto; padding: 6px; }
.palette-group { padding: 10px 12px 4px; font-size: 11.5px; font-weight: 650;
  text-transform: uppercase; letter-spacing: .08em; color: var(--ink-3); }
.palette-item { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 46px;
  padding: 0 12px; border: 0; border-radius: 11px; background: none; text-align: left;
  font-weight: 550; }
.palette-item .hint { margin-left: auto; }
.palette-item.active { background: var(--paper-2); }
.palette-foot { display: flex; gap: 14px; padding: 10px 16px; border-top: 1px solid var(--line);
  font-size: 12.5px; color: var(--ink-3); }

/* ================================================================ feedback */

.toast { position: fixed; left: 50%; bottom: 26px; transform: translateX(-50%); z-index: 80;
  display: none; align-items: center; gap: 10px; max-width: min(90vw, 560px);
  padding: 12px 18px 12px 14px; border-radius: 14px; background: var(--ink); color: var(--paper);
  font-weight: 600; box-shadow: var(--shadow-3); }
.toast.show { display: flex; }
.toast.bad { background: var(--bad); color: #fff; }

.empty { display: flex; flex-direction: column; align-items: center; gap: 8px;
  text-align: center; color: var(--ink-3); padding: 44px 20px; }
.empty .icon { width: 30px; height: 30px; opacity: .6; }
.empty strong { color: var(--ink-2); font-size: 15.5px; }

.skeleton { border-radius: 8px; background: var(--paper-2); color: transparent !important; }

.icon { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none;
  stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; vertical-align: middle; }
.icon.sm { width: 15px; height: 15px; } .icon.lg { width: 22px; height: 22px; }

.offline-banner { position: fixed; top: 60px; left: 0; right: 0; z-index: 29;
  padding: 8px 16px; text-align: center; font-weight: 600; font-size: 14px;
  background: var(--bad); color: #fff; }

@media (prefers-reduced-motion: no-preference) {
  .palette-box, .menu-pop { animation: kabu-pop .12s ease-out; }
  @keyframes kabu-pop { from { opacity: 0; transform: translateY(-4px) scale(.99); } }
}
/* Tablets and narrow counters: the bar keeps its icons, drops its words. */
@media (max-width: 1100px) {
  .search-trigger { min-width: 0; }
  .search-trigger .grow, .search-trigger .kbd { display: none; }
  .topbar .hide-narrow { display: none; }
}
