/* ------------------------------------------------------------------
   Postbox UI.

   A tool, not a landing page: dense rows, quiet colour, monospace for
   anything an engineer needs to read literally (addresses, message ids,
   authentication verdicts). Screen space is priced -- there are no cards
   inside cards and no decorative gutters.

   The one layout rule that is load-bearing: every text cell that can
   ellipsis sits in a grid or flex track with min-width:0. Without that,
   a flex item refuses to shrink below its content and crushes its
   siblings, which is how a wide list column ends up showing a four
   character sender while a narrow phone shows the name in full.
   ------------------------------------------------------------------ */

:root {
  --bg: #eef0f4;
  --pane: #ffffff;
  --pane-2: #f7f8fa;
  --line: #dfe3e9;
  --line-soft: #ebeef2;
  --text: #13171d;
  --muted: #646c78;
  --faint: #929aa6;
  --accent: #1f6feb;
  --accent-ink: #ffffff;
  --accent-soft: rgba(31, 111, 235, .10);
  --sel: #e8effc;
  --ok: #16723a;
  --ok-bg: #e6f4ec;
  --warn: #8a5d00;
  --warn-bg: #fdf1dc;
  --bad: #ab2016;
  --bad-bg: #fdeceb;
  --neutral-bg: #eceef2;
  --mono: ui-monospace, "SF Mono", "Cascadia Mono", "JetBrains Mono", Menlo, Consolas, monospace;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  --rail-w: 212px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0a0d11;
    --pane: #14181f;
    --pane-2: #10141a;
    --line: #242b35;
    --line-soft: #1c222a;
    --text: #e5e9ef;
    --muted: #98a1ad;
    --faint: #6d7682;
    --accent: #4d94ff;
    --accent-ink: #06101f;
    --accent-soft: rgba(77, 148, 255, .14);
    --sel: #1b2431;
    --ok: #57cf8c;
    --ok-bg: #12291d;
    --warn: #e0b054;
    --warn-bg: #2a2114;
    --bad: #f08a80;
    --bad-bg: #2d1817;
    --neutral-bg: #1d232b;
  }
}

* { box-sizing: border-box; }

/* The hidden attribute only carries `display: none` at user-agent weight, so
   any element below that declares its own display -- the app frame, the gate,
   the modal sheet, the reader -- would ignore it and render anyway. This must
   stay above those rules. */
[hidden] { display: none !important; }

html, body {
  margin: 0;
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 13.5px;
  -webkit-text-size-adjust: 100%;
}

button, input, select, textarea { font: inherit; color: inherit; }
code, .mono { font-family: var(--mono); font-size: 12px; }

/* ---------------- gate (sign in / register) ---------------- */

.gate {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 24px 16px;
}

.gate-card {
  width: min(360px, 100%);
  background: var(--pane);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 22px 20px 20px;
  display: grid;
  gap: 13px;
}

.gate-brand {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 15px;
  font-weight: 640;
  letter-spacing: -.01em;
}

.gate-mark, .rail-mark {
  width: 16px; height: 16px; flex: 0 0 auto;
  border-radius: 4px;
  background: var(--accent);
  box-shadow: inset 0 0 0 2px var(--pane), inset 0 0 0 3px var(--accent);
}

.gate-tabs { display: flex; gap: 2px; background: var(--pane-2); border: 1px solid var(--line); border-radius: 7px; padding: 2px; }
.gate-tab {
  flex: 1 1 0; min-width: 0;
  padding: 6px 4px; border: 0; border-radius: 5px;
  background: transparent; color: var(--muted); cursor: pointer; font-size: 12.5px;
}
.gate-tab.is-on { background: var(--pane); color: var(--text); font-weight: 600; box-shadow: 0 1px 2px rgba(0,0,0,.06); }

.fld { display: grid; gap: 5px; min-width: 0; }
.fld > span { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
/* The address builder. The domain side gets the wider track because it holds
   a whole domain name plus a select caret -- at 375px an even split clips
   "@apolloforum.com" to "@apolloforum.cor", which reads as a typo in the one
   field the user is not allowed to typo. */
.fld-split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: 10px; }
.fld-split select { font-family: var(--mono); font-size: 12px; padding-right: 4px; }
.fld-split > label { display: grid; gap: 5px; min-width: 0; }
.fld-split > label > span { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }

input[type=text], input[type=password], input[type=search], input[type=email], select, textarea {
  width: 100%; min-width: 0;
  padding: 7px 9px;
  background: var(--pane-2);
  border: 1px solid var(--line);
  border-radius: 6px;
  outline: none;
}
input:focus, select:focus, textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
#gate-address, #reg-local, #compose-to, #compose-cc { font-family: var(--mono); font-size: 12.5px; }

.gate-error { margin: 0; color: var(--bad); font-size: 12.5px; }
.gate-note { margin: 0; color: var(--ok); font-size: 12.5px; }

.gate-brand { position: relative; }
.gate-back { position: absolute; right: -4px; top: -2px; }

/* A code field and the control that mails one, side by side. The button keeps
   its own width so a countdown label does not reflow the input beside it. */
.fld-code { display: grid; gap: 5px; min-width: 0; }
.fld-code > span { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.code-row { display: grid; grid-template-columns: minmax(0, 1fr) 116px; gap: 8px; }
.code-row input { font-family: var(--mono); letter-spacing: .18em; }
.code-row .btn { padding: 7px 4px; font-size: 12px; }

.gate-foot { display: flex; flex-wrap: wrap; gap: 4px 14px; justify-content: center; }
.gate-link {
  padding: 2px 0; border: 0; background: transparent;
  color: var(--muted); cursor: pointer; font-size: 12px;
}
.gate-link:hover { color: var(--accent); text-decoration: underline; }

/* A section rule inside a sheet: a label and a line, not a card in a card. */
.sec {
  margin-top: 4px; padding-bottom: 5px; border-bottom: 1px solid var(--line);
  font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted);
}

.btn {
  padding: 7px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--pane);
  cursor: pointer;
  white-space: nowrap;
}
.btn:hover { border-color: var(--faint); }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); font-weight: 600; }
.btn-primary:hover { filter: brightness(1.06); }
.btn-wide { width: 100%; }
.btn[disabled] { opacity: .55; cursor: default; }

/* ---------------- app frame ---------------- */

.app {
  height: 100dvh;
  display: grid;
  grid-template-columns: var(--rail-w) clamp(330px, 32vw, 560px) minmax(0, 1fr);
  background: var(--line);
  gap: 1px;
}

.rail, .list, .reader { background: var(--pane); min-width: 0; min-height: 0; }

/* ---------------- account switcher (top right) ---------------- */

/* Fixed to the top right of the viewport rather than placed in a pane, because
   which pane occupies that corner changes with the breakpoint: the reader on a
   desktop, the list on a phone. The panes that CAN sit under it reserve room
   for it instead, so it never covers a control. */
.switcher { position: fixed; top: 6px; right: 8px; z-index: 35; }

.sw-btn {
  display: flex; align-items: center; gap: 6px; max-width: 190px;
  padding: 4px 8px; border: 1px solid var(--line); border-radius: 7px;
  background: var(--pane); color: var(--text); cursor: pointer; font-size: 12.5px;
}
.sw-btn:hover { border-color: var(--faint); }
.sw-name { font-family: var(--mono); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sw-n {
  padding: 0 5px; border-radius: 8px; background: var(--accent); color: var(--accent-ink);
  font-family: var(--mono); font-size: 10.5px; font-weight: 700;
}
.sw-caret { color: var(--faint); font-size: 10px; }

.sw-menu {
  position: absolute; top: calc(100% + 4px); right: 0;
  width: min(280px, calc(100vw - 20px));
  display: grid; gap: 1px;
  padding: 4px; border: 1px solid var(--line); border-radius: 8px;
  background: var(--pane); box-shadow: 0 8px 28px rgba(0,0,0,.22);
}

.sw-item {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: center;
  padding: 6px 8px; border: 0; border-radius: 6px;
  background: transparent; color: var(--text); cursor: pointer; text-align: left;
}
.sw-item:hover { background: var(--line-soft); }
.sw-item.is-on { background: var(--accent-soft); }
.sw-item-who { min-width: 0; display: grid; }
.sw-item-who b { font-size: 12.5px; font-weight: 620; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sw-item-who code { font-size: 11px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sw-item-n { font-family: var(--mono); font-size: 11px; font-weight: 700; color: var(--accent); }

.sw-act {
  padding: 5px 8px; border: 0; border-radius: 6px; background: transparent;
  color: var(--muted); cursor: pointer; text-align: left; font-size: 12.5px;
}
.sw-act:hover { background: var(--line-soft); color: var(--text); }
.sw-menu .sw-act:first-of-type { margin-top: 3px; border-top: 1px solid var(--line-soft); padding-top: 7px; }


/* ---------------- rail ---------------- */

.rail {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  gap: 10px;
  padding: 11px 10px;
  background: var(--pane-2);
}

.rail-id { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 8px; align-items: center; }
.rail-who { min-width: 0; display: grid; }
.rail-who b { font-size: 13px; font-weight: 640; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* 11px keeps a 23-character address whole in a 212px rail; at 12px it clips. */
.rail-who code { font-size: 11px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* Needs higher specificity than .icon-btn, which is declared later and would
   otherwise win at equal weight and show the drawer control on desktop. */
.rail-id > .rail-close { display: none; }

.folders { display: grid; align-content: start; gap: 1px; overflow: auto; }
.f-item {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 8px;
  padding: 6px 8px; border: 0; border-radius: 6px;
  background: transparent; color: var(--text); cursor: pointer; text-align: left;
}
.f-item:hover { background: var(--line-soft); }
.f-item.is-on { background: var(--accent-soft); color: var(--accent); font-weight: 620; }
.f-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.f-n { font-family: var(--mono); font-size: 11px; color: var(--faint); }
.f-item.is-on .f-n { color: var(--accent); }
.f-n.is-unread { color: var(--text); font-weight: 700; }

.rail-foot { display: grid; gap: 1px; }
.rail-link {
  padding: 5px 8px; border: 0; border-radius: 6px; background: transparent;
  color: var(--muted); cursor: pointer; text-align: left; font-size: 12.5px;
}
.rail-link:hover { background: var(--line-soft); color: var(--text); }

.icon-btn {
  display: grid; place-items: center;
  width: 28px; height: 28px; flex: 0 0 auto;
  border: 1px solid transparent; border-radius: 6px;
  background: transparent; color: var(--muted); cursor: pointer; font-size: 14px; line-height: 1;
}
.icon-btn:hover { background: var(--line-soft); color: var(--text); }

/* ---------------- list ---------------- */

.list { display: grid; grid-template-rows: auto auto minmax(0, 1fr); }

.list-top {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 6px; align-items: center;
  padding: 8px 9px; border-bottom: 1px solid var(--line);
}
.search { min-width: 0; }
.search input { padding: 6px 9px; border-radius: 6px; }

.list-meta {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: baseline;
  padding: 6px 11px; border-bottom: 1px solid var(--line-soft);
  font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted);
}
#list-count { font-family: var(--mono); text-transform: none; letter-spacing: 0; color: var(--faint); }

.rows { overflow: auto; outline: none; }
.rows:focus-visible { box-shadow: inset 0 0 0 2px var(--accent-soft); }

/* Two lines per row. Both lines are grids whose text track is minmax(0,1fr),
   so the sender and the subject shrink by ellipsis instead of squeezing
   their neighbours -- and never the other way round. */
.row {
  display: grid; gap: 2px;
  padding: 7px 11px 8px;
  border-bottom: 1px solid var(--line-soft);
  cursor: pointer;
}
.row:hover { background: var(--pane-2); }
.row.is-sel { background: var(--sel); }
.row.is-sel .r-sub { color: var(--text); }

.r-top { display: grid; grid-template-columns: 7px minmax(0, 1fr) auto; gap: 7px; align-items: center; }
.r-bot { display: grid; grid-template-columns: 7px minmax(0, 1fr); gap: 7px; align-items: baseline; }

.r-dot { width: 7px; height: 7px; border-radius: 50%; background: transparent; }
/* Only the top line carries the unread dot; the one on the second line is a
   pure alignment spacer and must stay invisible. */
.row.is-unread .r-top .r-dot { background: var(--accent); }

.r-from {
  min-width: 0;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font-size: 13px; color: var(--muted);
}
.row.is-unread .r-from { color: var(--text); font-weight: 650; }

.r-meta { display: flex; align-items: center; gap: 6px; flex: 0 0 auto; }
.r-mark { font-size: 11px; color: var(--faint); line-height: 1; }
.r-mark.is-star { color: #d99400; }
.r-time { font-family: var(--mono); font-size: 11px; color: var(--faint); white-space: nowrap; }

.r-line { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.r-sub { font-size: 12.5px; color: var(--muted); }
.row.is-unread .r-sub { color: var(--text); font-weight: 560; }
.r-prev { font-size: 12.5px; color: var(--faint); }
.r-prev::before { content: "  ·  "; }

.r-empty, .reader-empty { display: grid; place-items: center; height: 100%; color: var(--faint); font-family: var(--mono); font-size: 12px; }
.r-empty::after { content: "没有邮件"; }
.reader-empty::after { content: "未选择邮件"; }

/* ---------------- reader ---------------- */

.reader { display: grid; grid-template-rows: minmax(0, 1fr); overflow: hidden; }
.reader-doc { display: grid; grid-template-rows: auto minmax(0, 1fr); min-height: 0; }

.rd-head { padding: 9px 150px 10px 14px; border-bottom: 1px solid var(--line); display: grid; gap: 8px; }
.rd-bar { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 6px; align-items: center; }
.rd-acts { display: flex; flex-wrap: wrap; gap: 5px; min-width: 0; }

.chip {
  padding: 4px 9px; border: 1px solid var(--line); border-radius: 5px;
  background: var(--pane); color: var(--text); cursor: pointer;
  font-size: 12px; text-decoration: none; white-space: nowrap;
}
.chip:hover { border-color: var(--faint); }
.chip.is-on { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }

.rd-subject { margin: 0; font-size: 16.5px; font-weight: 640; letter-spacing: -.012em; line-height: 1.3; overflow-wrap: anywhere; }

.rd-fields { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 1px 10px; font-family: var(--mono); font-size: 11.5px; }
.rd-k { color: var(--faint); }
.rd-v { color: var(--muted); overflow-wrap: anywhere; }
.rd-v b { color: var(--text); font-weight: 600; }

.rd-auth { display: flex; flex-wrap: wrap; gap: 5px; }
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 2px 7px; border-radius: 4px;
  font-family: var(--mono); font-size: 10.5px; letter-spacing: .01em;
  background: var(--neutral-bg); color: var(--muted);
}
/* Verdicts are spelled out in the label itself -- colour is a second signal,
   never the only one. */
.badge.v-pass { background: var(--ok-bg); color: var(--ok); }
.badge.v-fail, .badge.v-permerror, .badge.v-temperror { background: var(--bad-bg); color: var(--bad); }
.badge.v-softfail, .badge.v-neutral, .badge.v-policy { background: var(--warn-bg); color: var(--warn); }

.rd-atts { display: flex; flex-wrap: wrap; gap: 5px; }
.att {
  display: inline-grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: baseline;
  max-width: 260px;
  padding: 4px 8px; border: 1px solid var(--line); border-radius: 5px;
  background: var(--pane-2); color: var(--text); text-decoration: none; font-size: 12px;
}
.att:hover { border-color: var(--accent); }
.att-n { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.att-s { font-family: var(--mono); font-size: 10.5px; color: var(--faint); }

.rd-body { width: 100%; height: 100%; border: 0; background: var(--pane); }

/* ---------------- sheet (compose, roster, dialogs) ---------------- */

.sheet { position: fixed; inset: 0; background: rgba(8, 11, 16, .42); display: grid; place-items: center; padding: 18px; z-index: 40; }
.sheet-card {
  width: min(720px, 100%); max-height: min(86dvh, 720px); overflow: auto;
}
.sheet-card.is-wide { width: min(980px, 100%); }
.sheet-card {
  background: var(--pane); border: 1px solid var(--line); border-radius: 10px;
  padding: 14px 16px 16px; display: grid; gap: 11px;
  /* Content-height rows even when the card is stretched to the full screen on
     a phone. Without this the grid shares the spare height out between the
     rows and a four-line roster floats in the middle of nowhere. */
  align-content: start;
}
.sheet-head { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: center; }
.sheet-head h2 { margin: 0; font-size: 14.5px; font-weight: 640; }
.sheet-foot { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }
#compose-body { min-height: 190px; resize: vertical; font-family: var(--mono); font-size: 12.5px; line-height: 1.55; }

/* A table of addresses gets a scroll container rather than a wrap rule. The
   standing rule in this project is that a full address is readable at every
   width; letting the cell wrap breaks "lab-one@apolloforum.com" across three
   lines mid-word, which is the same failure as a truncated sender wearing a
   different hat. Horizontal scrolling costs the reader one gesture and costs
   the address nothing. */
.tbl-wrap { overflow-x: auto; margin: 0 -2px; }
.tbl { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.tbl th {
  text-align: left; font-size: 10.5px; text-transform: uppercase; letter-spacing: .06em;
  color: var(--muted); font-weight: 600; padding: 5px 8px; border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
.tbl td { padding: 6px 8px; border-bottom: 1px solid var(--line-soft); vertical-align: middle; white-space: nowrap; width: 1%; }
/* The address column absorbs every spare pixel. An earlier max-width:0 here
   collapsed all four columns equally and clipped every address to ten
   characters while the sheet had 300px going spare -- the same failure the
   message list must never have. */
.tbl td.c-addr, .tbl th.c-addr { font-family: var(--mono); font-size: 11.5px; width: auto; white-space: nowrap; }
.tbl td.c-num { font-family: var(--mono); font-size: 11.5px; }
.tbl td.c-act { text-align: right; white-space: nowrap; }
.tbl tr.is-off td { opacity: .5; }
.tag { padding: 1px 6px; border-radius: 3px; background: var(--neutral-bg); color: var(--muted); font-family: var(--mono); font-size: 10.5px; }
.tag.t-admin { background: var(--accent-soft); color: var(--accent); }

.reveal {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: center;
  padding: 9px 10px; border: 1px solid var(--accent); border-radius: 7px; background: var(--accent-soft);
}
.reveal code { font-size: 15px; font-weight: 600; letter-spacing: .04em; overflow-wrap: anywhere; color: var(--text); }
.reveal-k { font-size: 10.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }

.log { font-family: var(--mono); font-size: 11.5px; display: grid; gap: 1px; }
.log-row { display: grid; grid-template-columns: 130px 92px minmax(0, 1fr); gap: 8px; padding: 3px 4px; border-bottom: 1px solid var(--line-soft); }
.log-row span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.log-ok { color: var(--ok); }
.log-bad { color: var(--bad); }

.keys { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 3px 16px; font-size: 12.5px; }
.keys div { display: grid; grid-template-columns: 54px minmax(0, 1fr); gap: 8px; align-items: baseline; }
.keys kbd {
  font-family: var(--mono); font-size: 10.5px; padding: 1px 5px;
  border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 4px; background: var(--pane-2);
  justify-self: start;
}

/* ---------------- toast ---------------- */

.toast {
  position: fixed; left: 50%; bottom: 18px; transform: translateX(-50%);
  max-width: min(520px, calc(100vw - 32px));
  padding: 8px 14px; border-radius: 7px;
  background: var(--text); color: var(--pane);
  font-size: 12.5px; z-index: 60; box-shadow: 0 6px 22px rgba(0,0,0,.25);
}
.toast.is-bad { background: var(--bad); color: #fff; }

/* ---------------- responsive ---------------- */

.only-narrow { display: none; }

/* Two panes: the rail stays, the list and the reader take turns. */
@media (max-width: 1100px) {
  .app { grid-template-columns: 186px minmax(0, 1fr); }
  .app[data-pane="list"] .reader { display: none; }
  .app[data-pane="reader"] .list { display: none; }
  .only-narrow { display: grid; }
  /* Below this width the LIST can be the pane in the top right corner, so it
     is the one that has to make room for the switcher. */
  .list-top { padding-right: 150px; }
}

/* One pane: the rail becomes a drawer over the content. */
@media (max-width: 720px) {
  .app { grid-template-columns: minmax(0, 1fr); }
  .rail {
    position: fixed; inset: 0 auto 0 0; z-index: 30;
    width: min(280px, 86vw);
    transform: translateX(-102%);
    transition: transform .16s ease;
    border-right: 1px solid var(--line);
    box-shadow: 0 0 40px rgba(0,0,0,.3);
  }
  .app[data-rail="open"] .rail { transform: none; }
  .rail-id > .rail-close { display: grid; }
  .rd-head { padding: 8px 11px 9px; }
  /* On a phone the switcher sits on its own row above the panes instead of
     over them: 375px has no 150px to spare on either header. */
  /* Still top right, just on its own row: at 375px neither header has 150px
     of gutter to give up, and a control floating over the search field would
     be covering the thing the reader came to use. */
  .switcher { position: relative; top: auto; right: auto; display: flex; justify-content: flex-end; padding: 6px 10px 2px; }
  .sw-btn { max-width: 72vw; }
  .sw-menu { right: 10px; }
  .app { grid-template-rows: auto minmax(0, 1fr); }
  .list-top, .rd-head { padding-right: 11px; }
  .rd-subject { font-size: 15.5px; }
  .row { padding: 8px 11px 9px; }
  .sheet { padding: 0; place-items: stretch; }
  .sheet-card { width: 100%; max-height: 100dvh; border-radius: 0; border: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .rail { transition: none; }
}
