:root {
  --paper: #f3eee4;
  --paper-2: #e9e2d4;
  --ink: #1c1b18;
  --ink-2: #4a463e;
  --muted: #7a7366;
  --line: #d6cdbb;
  --accent: #a8382a;      /* vermilion, like a temple seal */
  --accent-ink: #fff8f0;
  --button: #fbf8f2;
  --button-hover: #efe8da;
  --shadow: 0 1px 0 rgba(28, 27, 24, .06), 0 8px 30px rgba(28, 27, 24, .08);
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --mincho: "Hiragino Mincho ProN", "Yu Mincho", "YuMincho", "Noto Serif JP", "Songti SC", serif;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #171613;
    --paper-2: #201e1a;
    --ink: #ece6da;
    --ink-2: #c8c0b1;
    --muted: #8f8778;
    --line: #36322b;
    --accent: #c9523f;
    --accent-ink: #1a0f0b;
    --button: #221f1b;
    --button-hover: #2c2924;
    --shadow: 0 1px 0 rgba(0, 0, 0, .4), 0 10px 30px rgba(0, 0, 0, .35);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }

html, body { margin: 0; }

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

button, input, select { font: inherit; color: inherit; }

a { color: var(--accent); text-underline-offset: 2px; }

.muted { color: var(--muted); }

.sr-only {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

/* Header */
.top {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  max-width: 1320px; width: 100%; margin: 0 auto; padding: 18px 20px 10px;
}
.mark { display: flex; align-items: center; gap: 12px; color: var(--ink); text-decoration: none; }
.seal {
  font-family: var(--mincho); font-size: 15px; line-height: 1.05; letter-spacing: .02em;
  writing-mode: vertical-rl;
  background: var(--accent); color: var(--accent-ink);
  padding: 6px 5px; border-radius: 3px;
}
.mark-text { display: flex; flex-direction: column; line-height: 1.15; }
.name { font-size: 22px; letter-spacing: .02em; }
.sub { font-size: 13px; color: var(--muted); font-style: italic; }
.links { display: flex; flex-wrap: wrap; gap: 4px; justify-content: flex-end; }
.links button {
  background: none; border: 0; padding: 6px 10px; border-radius: 6px; cursor: pointer;
  color: var(--ink-2); font-size: 15px;
}
.links button:hover { background: var(--button-hover); color: var(--ink); }
.links a { padding: 6px 10px; border-radius: 6px; color: var(--ink-2); font-size: 15px; text-decoration: none; }
.links a:hover { background: var(--button-hover); color: var(--ink); }
.links a[hidden] { display: none; }

/* Hall */
.hall-wrap { max-width: 1320px; width: 100%; margin: 0 auto; padding: 0 20px; flex: 1; }

.period {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 12px;
  padding: 6px 2px 10px;
}
.period-main { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.period-name { font-size: 28px; letter-spacing: .01em; }
.period-note { color: var(--ink-2); font-style: italic; }
.period-side { display: flex; flex-direction: column; align-items: flex-end; text-align: right; }
.period-left { font-variant-numeric: tabular-nums; font-size: 18px; }
.ny { color: var(--muted); font-size: 14px; font-variant-numeric: tabular-nums; }

.stage {
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  background: #2a2520;
  box-shadow: var(--shadow);
}
.stage canvas { display: block; width: 100%; height: auto; touch-action: manipulation; }
/* A quiet vignette: the frame's edges rest, the lit meadow holds the eye. */
.stage::after { content: ''; position: absolute; inset: 0; pointer-events: none; border-radius: inherit; background: radial-gradient(ellipse 108% 105% at 50% 46%, rgba(0,0,0,0) 62%, rgba(10,12,10,0.1) 86%, rgba(8,10,8,0.16) 100%); }
.stage canvas.can-sit { cursor: pointer; }
/* One quiet corner control: the meadow, edge to edge. */
.full-btn {
  position: absolute; top: 10px; right: 10px; z-index: 5;
  display: grid; place-items: center; width: 34px; height: 34px; padding: 0;
  background: rgba(20, 17, 14, .35); color: #f2ead9; border: none; border-radius: 8px;
  opacity: .55; cursor: pointer; transition: opacity .3s ease;
}
.full-btn:hover, .full-btn:focus-visible { opacity: 1; background: rgba(20, 17, 14, .5); }

/* Immersive: only the meadow, edge to edge. The page's chrome steps out,
   the bar floats low over the grass, and when the hands rest everything
   fades until the pointer stirs. */
body.immersive .top, body.immersive .period, body.immersive .status,
body.immersive .today, body.immersive .foot { display: none; }
body.immersive .hall-wrap { max-width: none; padding: 0; }
body.immersive .stage {
  position: fixed; inset: 0; z-index: 20; border-radius: 0;
  display: flex; align-items: center; justify-content: center;
}
body.immersive .bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 21; margin: 0;
  padding: 10px 14px calc(10px + env(safe-area-inset-bottom));
  background: linear-gradient(to top, rgba(10, 9, 7, .28), transparent);
  transition: opacity .9s ease;
}
body.immersive .full-btn { position: fixed; z-index: 22; transition: opacity .9s ease; }
body.immersive.idle .bar, body.immersive.idle .full-btn { opacity: 0; pointer-events: none; }
/* A faint clock keeps the hour when the page's own is hidden. */
.imm-chip { display: none; }
body.immersive .imm-chip {
  display: block; position: fixed; top: 12px; left: 14px; z-index: 22;
  color: #f2ead9; background: rgba(20, 17, 14, .32); padding: 4px 10px;
  border-radius: 7px; font-size: 13px; opacity: .8; transition: opacity .9s ease;
}
body.immersive.idle .imm-chip { opacity: 0; }

.tip {
  position: absolute; pointer-events: none; transform: translate(-50%, -100%);
  background: rgba(20, 18, 15, .86); color: #f3eee4;
  padding: 3px 9px; border-radius: 4px; font-size: 14px; white-space: nowrap;
}
.toast {
  position: absolute; left: 50%; top: 14px; transform: translateX(-50%);
  background: rgba(20, 18, 15, .88); color: #f3eee4;
  padding: 6px 14px; border-radius: 6px; font-size: 15px; max-width: calc(100% - 32px); text-align: center;
}

.bar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  padding: 14px 0 6px;
}
.controls { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.controls[hidden] { display: none; }
/* The bar holds its buttons in small groups by intent — ritual, walking,
   samu, the cushion, yourself — with a breath of space between groups. A
   group whose every button is hidden takes no space at all. */
#seated-controls { gap: 18px; row-gap: 10px; }
.controls .group { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.controls .group:not(:has(button:not([hidden]))) { display: none; }
.controls .group.apart { padding-left: 10px; }
.hint { color: var(--muted); font-style: italic; font-size: 15px; }
/* The settings rest in a small tray behind one quiet word, so the bar
   holds only practice. */
.side { position: relative; display: flex; align-items: center; }
.tray {
  position: absolute; bottom: calc(100% + 10px); right: 0; z-index: 30;
  display: flex; flex-direction: column; align-items: stretch; gap: 8px;
  background: var(--paper); border: 1px solid var(--line); border-radius: 10px;
  padding: 12px; min-width: 200px; box-shadow: var(--shadow);
}
.tray[hidden] { display: none; }
.mixer summary { cursor: pointer; color: var(--ink-2); font-size: 15px; padding: 2px 0; }
.mixer[open] summary { margin-bottom: 6px; }
.mixer label { display: grid; grid-template-columns: 1fr 3.4em; grid-template-rows: auto auto; column-gap: 8px; color: var(--ink-2); font-size: 14px; margin: 6px 0 0; }
.mixer label input { grid-column: 1; grid-row: 2; width: 100%; min-width: 170px; accent-color: var(--accent); }
.mixer label output { grid-column: 2; grid-row: 2; align-self: center; text-align: right; font-variant-numeric: tabular-nums; color: var(--muted); font-size: 13px; }
.tray .hall-pick { justify-content: space-between; }
.hall-pick { color: var(--ink-2); font-size: 15px; display: flex; align-items: center; gap: 6px; }
.hall-pick[hidden] { display: none; }

button, select {
  background: var(--button); border: 1px solid var(--line); border-radius: 7px;
  padding: 7px 14px; cursor: pointer; line-height: 1.3;
}
select { padding: 6px 8px; }
button:hover:not(:disabled):not([aria-disabled="true"]), select:hover:not(:disabled) { background: var(--button-hover); }
button:disabled, select:disabled { opacity: .5; cursor: default; }
/* Resting, not refused: still tappable, and the tap says why it waits. */
button[aria-disabled="true"] { opacity: .5; cursor: default; }
/* A watcher clicked the lawn: Take a cushion beckons once, softly. */
/* The one action prompt: low over the meadow, where the eyes already are. */
.act-prompt {
  position: absolute; left: 50%; bottom: 18px; transform: translateX(-50%); z-index: 21;
  display: flex; align-items: center; gap: 10px; padding: 10px 18px 10px 10px;
  font: inherit; font-size: 16px; color: #f2ead9; background: rgba(20, 17, 14, .62);
  border: 1px solid rgba(242, 234, 217, .28); border-radius: 999px; cursor: pointer;
  backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); min-height: 44px;
}
.act-prompt[hidden] { display: none; }
button.act-prompt:hover:not(:disabled):not([aria-disabled="true"]) { background: rgba(20, 17, 14, .78); color: #f2ead9; }
/* The floating bar owns the screen's foot in the immersive view. */
body.immersive .act-prompt { bottom: 96px; }
.act-prompt kbd {
  display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%;
  background: #f2ead9; color: #2d2a26; font: 600 14px/1 system-ui, sans-serif;
}
.act-prompt[aria-disabled="true"] { opacity: .62; }
/* Before the shed: everything it lends at once, the nearest bay marked as
   the one E takes; 1–4 pick any of them, a tap too. */
.act-menu {
  position: absolute; left: 50%; bottom: 18px; transform: translateX(-50%); z-index: 21;
  display: flex; flex-direction: column; gap: 2px; padding: 8px; min-width: 250px; max-width: calc(100% - 24px); box-sizing: border-box;
  color: #f2ead9; background: rgba(20, 17, 14, .66); border: 1px solid rgba(242, 234, 217, .28); border-radius: 18px;
  backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
}
.act-menu[hidden] { display: none; }
.act-menu-cap { margin: 2px 10px 4px; font-size: 13px; font-style: italic; opacity: .8; }
.act-menu button {
  display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 6px 16px 6px 8px; text-align: left;
  font: inherit; font-size: 16px; color: inherit; background: transparent; border: 1px solid transparent; border-radius: 999px; cursor: pointer;
}
.act-menu button:hover:not(:disabled):not([aria-disabled="true"]) { background: rgba(242, 234, 217, .12); }
.act-menu button.near { border-color: rgba(242, 234, 217, .45); }
.act-menu kbd {
  flex: none; display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%;
  background: rgba(242, 234, 217, .18); color: #f2ead9; font: 600 13px/1 system-ui, sans-serif;
}
.act-menu button.near kbd { background: #f2ead9; color: #2d2a26; }
@media (hover: none) { .act-menu kbd { display: none; } .act-menu button { padding-left: 16px; } }
body.immersive .act-menu { bottom: 96px; }
@media (hover: none) { .act-prompt kbd { display: none; } .act-prompt { padding-left: 18px; } }
/* Writing a tablet: room to think in — a wide card with its own margins,
   three generous lines, each with its syllable count beside it. */
#ema-dialog { width: min(600px, calc(100vw - 24px)); max-width: none; box-sizing: border-box; }
#ema-form { padding: 28px 32px 22px; display: flex; flex-direction: column; gap: 4px; }
#ema-form h2 { margin: 0 0 4px; font-weight: normal; font-size: 26px; }
.ema-line { display: flex; align-items: center; gap: 12px; margin: 7px 0; }
.ema-line input { flex: 1; min-width: 0; box-sizing: border-box; padding: 13px 15px; font: inherit; font-size: 20px; line-height: 1.3; color: var(--ink); background: transparent; border: 1px solid var(--line); border-radius: 8px; }
.ema-meter { flex: none; min-width: 3.4em; text-align: right; font-variant-numeric: tabular-nums; color: var(--muted); font-size: 15px; }
@media (max-width: 480px) {
  #ema-form { padding: 22px 18px 18px; }
  .ema-line input { font-size: 18px; padding: 11px 12px; }
}
.ema-meter.ok { color: #4f7a3b; }
.ema-meter.over { color: #a0463a; }
.ema-room { color: var(--muted); font-size: 13px; margin: 4px 0 0; }
.ema-note { color: var(--muted); font-size: 14px; margin: 2px 0 8px; line-height: 1.5; }
.ema-actions { display: flex; gap: 10px; justify-content: flex-end; margin: 12px 0 0; }
/* The way on to the wall of haiku: a tablet also hung on your page there
   (signed in only), and the wall of marks' last line. */
.ema-mine:not([hidden]) { display: flex; gap: 10px; align-items: flex-start; margin: 10px 0 0; font-size: 15px; line-height: 1.45; color: var(--ink-2); cursor: pointer; }
.ema-mine input { margin: 4px 0 0; width: 18px; height: 18px; flex: none; accent-color: var(--accent); }
.ema-mine-note { color: #a0463a; margin: 6px 0 0; }
.ema-onward { margin: 18px 0 0; padding-top: 14px; border-top: 1px solid var(--line); font-size: 15px; color: var(--ink-2); }
.ema-onward[hidden] { display: none; }
/* An ema: five-sided, roof-shaped, blond wood with a red cord — the
   plaques on the wall, as cards to read. */
#ema-list, #ema-recent { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; }
#ema-recent { margin: 4px 0 6px; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); }
#ema-recent .ema-card { font-size: 13px; padding: 26px 10px 9px; }
.ema-card {
  position: relative; margin: 0; padding: 32px 14px 12px; white-space: pre-line;
  background: #e4cfa6; color: #2a2016; font-size: 16px; line-height: 1.45;
  clip-path: polygon(0 20px, 50% 0, 100% 20px, 100% 100%, 0 100%);
  box-shadow: inset 0 -3px 0 rgba(110, 76, 44, .25);
}
.ema-card::before {
  content: ""; position: absolute; left: 50%; top: 12px; width: 7px; height: 7px; margin-left: -3.5px;
  border-radius: 50%; background: #8f2a20;
}
.ema-card footer { margin-top: 8px; font-size: 13px; font-style: italic; color: #6e583f; }
.book { font-size: 16px; line-height: 1.55; }
.book-page h3 { margin: 0 0 10px; }
.book-page p { margin: 0 0 10px; }
.book-turn { display: flex; justify-content: space-between; align-items: center; margin: 14px 0 0; padding-top: 10px; border-top: 1px solid var(--line); }
.book-turn button:disabled { opacity: 0.35; cursor: default; }
.ema-tools { margin: 6px 0 0; display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; align-items: center; font-size: 13px; color: #6e583f; white-space: normal; }
.ema-tools button { font-size: 13px; padding: 3px 8px; color: #4a3826; }
#ema-held h3 { margin: 18px 0 8px; font-size: 15px; }
.gate-links { margin: 10px 0 0; text-align: center; }
.gate-links button { background: none; border: none; color: var(--muted); cursor: pointer; font-size: 14px; text-decoration: underline; padding: 2px 4px; }
.pulse { animation: beckon 0.9s ease 2; }
@keyframes beckon {
  50% { transform: scale(1.04); filter: brightness(1.08); }
}
/* Fingers need more button than mouse pointers do (~44 px). */
@media (pointer: coarse) {
  .bar button { padding: 11px 16px; }
  .bar select { padding: 10px 8px; }
}
/* An armed Move: the next grass click carries the cushion, and the button shows it. */
.controls button[aria-pressed="true"] { outline: 2px solid var(--accent); outline-offset: 1px; }
button:focus-visible, select:focus-visible, input:focus-visible, a:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 2px;
}
button.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
button.primary:hover:not(:disabled) { background: var(--accent); filter: brightness(1.08); }
button.quiet { background: none; border-color: transparent; color: var(--ink-2); }
button.quiet:hover { border-color: var(--line); }
.tray button[aria-pressed="false"] { color: var(--muted); } /* Bells off / Meadow off rest muted; not the stage corner toggle */

.status { margin: 6px 0 0; color: var(--ink-2); font-size: 15px; }
.today { margin: 2px 0 0; color: var(--muted); font-size: 15px; min-height: 1.5em; }

.foot { max-width: 1320px; width: 100%; margin: 0 auto; padding: 18px 20px 26px; color: var(--muted); font-size: 14px; }
.foot p { margin: 0; }

/* Gate */
dialog { color: var(--ink); background: var(--paper); border: 1px solid var(--line); box-shadow: var(--shadow); }
/* The live meadow plays clearly behind the gate card: it is the argument. */
dialog::backdrop { background: rgba(14, 13, 11, .34); }

.gate { border-radius: 14px; padding: 0; width: min(480px, calc(100vw - 32px)); }
.gate-card { padding: 30px 30px 24px; display: flex; flex-direction: column; gap: 14px; }
.gate-kanji {
  margin: 0; font-family: var(--mincho); font-size: 30px; letter-spacing: .32em; color: var(--accent);
  text-align: center;
}
.gate h1 { margin: -6px 0 0; font-weight: normal; font-size: 34px; text-align: center; letter-spacing: .03em; }
.lede { margin: 0; color: var(--ink-2); text-align: center; }
.field { display: flex; flex-direction: column; gap: 5px; font-size: 15px; color: var(--ink-2); }
.field input {
  background: var(--button); border: 1px solid var(--line); border-radius: 7px; padding: 8px 11px; font-size: 17px;
}
.check { display: flex; align-items: center; gap: 8px; font-size: 15px; color: var(--ink-2); }
.check input { width: 17px; height: 17px; accent-color: var(--accent); }
button.wide { width: 100%; padding: 11px 14px; font-size: 17px; }

/* Your figure: one row of robe swatches — the whole wardrobe of a shadow */
.figure-pick { display: flex; flex-direction: column; gap: 7px; }
.figure-pick:empty { display: none; }
.pick-cap { margin: 0; font-size: 14px; color: var(--ink-2); }
.pick-row { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.pick-row > span { width: 40px; font-size: 13px; color: var(--muted); }
.swatch {
  width: 24px; height: 24px; padding: 0; border-radius: 50%;
  border: 1px solid rgba(0, 0, 0, .3); cursor: pointer;
}
.swatch.given { background: var(--paper-2); border-style: dashed; color: var(--muted); }
.swatch.given:hover:not(:disabled) { background: var(--button-hover); }
.swatch[aria-pressed="true"] { outline: 2px solid var(--accent); outline-offset: 2px; }
.panel .figure-pick { margin: 4px 0 14px; }
.fine { margin: 0; font-size: 13px; color: var(--muted); text-align: center; }

/* Facing the wall */
.veil {
  position: fixed; inset: 0; z-index: 50; background: #050504; color: #8b857a;
  display: flex; align-items: center; justify-content: center; cursor: pointer;
}
.veil[hidden] { display: none; }
.veil-inner { display: flex; flex-direction: column; align-items: center; gap: 18px; padding: 24px; text-align: center; }
.stick { position: relative; width: 3px; height: 46vh; background: #4b3b2c; border-radius: 2px; }
.stick-burnt { position: absolute; left: 0; right: 0; top: 0; height: 0; background: #050504; }
.ember {
  position: absolute; left: 50%; width: 5px; height: 5px; margin-left: -2.5px; border-radius: 50%;
  background: #e0753c; box-shadow: 0 0 8px 2px rgba(224, 117, 60, .55); top: var(--ember, 0);
}
.veil-period { margin: 0; font-size: 18px; letter-spacing: .04em; color: #a59e91; }
.veil-hint { margin: 0; font-size: 14px; max-width: 30ch; color: #5d584f; }

/* Panels */
.panel {
  border-radius: 12px; padding: 0; width: min(620px, calc(100vw - 32px)); max-height: min(80vh, 760px);
}
.panel-head {
  position: sticky; top: 0; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 18px 22px 8px; background: var(--paper);
}
.panel-head h2 { margin: 0; font-weight: normal; font-size: 24px; }
.close { border: 0; background: none; font-size: 26px; line-height: 1; padding: 2px 8px; color: var(--muted); }
.panel-body { padding: 4px 22px 22px; }
.panel-body h3 { font-weight: normal; font-size: 19px; margin: 20px 0 6px; }
.panel-body p { margin: 0 0 12px; }
.panel-body ul, .panel-body ol { padding-left: 22px; margin: 0 0 12px; }
.panel-body li { margin-bottom: 6px; }
.bells { display: grid; grid-template-columns: max-content 1fr; gap: 6px 14px; margin: 0 0 12px; }
.bells dt { color: var(--accent); }
.fine-print { font-size: 14px; color: var(--muted); }
.bells dd { margin: 0; }

.log-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 0 0 16px; }
.log-stat { border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; }
.log-stat b { display: block; font-size: 24px; font-weight: normal; font-variant-numeric: tabular-nums; }
.log-stat span { font-size: 13px; color: var(--muted); }
.log-grid { display: grid; grid-auto-flow: column; grid-template-rows: repeat(7, 13px); gap: 3px; margin: 4px 0 6px; overflow-x: auto; padding-bottom: 2px; }
.log-day { width: 13px; height: 13px; border-radius: 3px; background: var(--paper-2); border: 1px solid var(--line); }
.log-day.some { background: color-mix(in srgb, var(--accent) 35%, var(--paper)); border-color: transparent; }
.log-day.sat { background: var(--accent); border-color: transparent; }
.log-day.today { outline: 1.5px solid var(--ink-2); outline-offset: 1px; }
.log-legend { font-size: 13px; color: var(--muted); margin: 0 0 10px; }
.log-keep { display: flex; flex-wrap: wrap; gap: 8px; }
.log-note { font-size: 13px; color: var(--muted); min-height: 1.3em; margin: 6px 0 16px; }
.name-form { display: flex; align-items: flex-end; gap: 8px; margin-top: 8px; }
.name-form .field { flex: 1; }

@media (max-width: 720px) {
  body { font-size: 16px; }
  .top { flex-direction: column; align-items: flex-start; gap: 8px; padding: 14px 16px 6px; }
  .links { justify-content: flex-start; margin-left: -10px; }
  .hall-wrap { padding: 0 16px; }
  .foot { padding: 16px; }
  .period-name { font-size: 23px; }
  .period { align-items: flex-start; }
  .bar { align-items: stretch; }
  .controls button { flex: 1 1 auto; }
  /* Each group takes its own row: the bar reads as a few short lines of
     intent rather than a wall of buttons. */
  .controls .group { flex: 1 1 100%; }
  .hint { font-size: 13px; }
  .side { width: 100%; justify-content: space-between; }
  .log-stats { grid-template-columns: 1fr 1fr 1fr; }
  .gate-card { padding: 24px 20px 20px; }
}

@media (prefers-reduced-motion: reduce) {
  dialog::backdrop { backdrop-filter: none; }
  .pulse { animation: none; }
}
