/* Voty Mail — phone first. One column under 760px, list + message to 1100px, three panes above. */

:root {
  --navy: #12306b;
  --navy-2: #1b3f8a;
  --navy-soft: #e8edf7;
  --accent: #e8552f;
  --ink: #12151c;
  --body: #3d4451;
  --muted: #6b7280;
  --faint: #9aa1ad;
  --line: #e4e7ec;
  --canvas: #f6f7f9;
  --surface: #ffffff;
  --raised: #ffffff;
  --hover: #f1f4f9;
  --ok: #0f6d43;
  --ok-soft: #e4f3ea;
  --warn: #8a5a00;
  --warn-soft: #fdf3dc;
  --danger: #9b1c1c;
  --danger-soft: #fdecec;
  --unread: #12306b;
  --focus: #3b6fe0;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(16, 24, 40, 0.06), 0 12px 32px rgba(16, 24, 40, 0.12);
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --navy-soft: #1c2740;
    --ink: #eef1f6;
    --body: #c9cfda;
    --muted: #9aa3b2;
    --faint: #6b7385;
    --line: #29303d;
    --canvas: #0e1218;
    --surface: #151a22;
    --raised: #1b212b;
    --hover: #1d2430;
    --ok: #5cc794;
    --ok-soft: #12301f;
    --warn: #e5b554;
    --warn-soft: #33290f;
    --danger: #f19191;
    --danger-soft: #3a1717;
    --unread: #9db8ff;
    --focus: #8fb0ff;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 12px 32px rgba(0, 0, 0, 0.5);
  }
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; height: 100%; }
body {
  font: 16px/1.45 var(--sans);
  color: var(--ink);
  background: var(--canvas);
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior-y: none;
}
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--navy-2); }
@media (prefers-color-scheme: dark) { a { color: var(--unread); } }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.grow { flex: 1; }
code { font-family: var(--mono); font-size: 0.9em; }

.ic { width: 20px; height: 20px; flex: none; }
.ic.sm { width: 14px; height: 14px; }
.ic.xl { width: 44px; height: 44px; stroke-width: 1.5; }

/* ── buttons ─────────────────────────────────────────────── */
.primary, .secondary, .link, .icon-btn, .write {
  appearance: none;
  border: 0;
  cursor: pointer;
  border-radius: 10px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
}
.primary { background: var(--navy); color: #fff; font-weight: 600; padding: 0 18px; }
.secondary { background: var(--surface); color: var(--ink); border: 1px solid var(--line); font-weight: 600; padding: 0 16px; }
.link { background: none; color: var(--navy-2); padding: 0 6px; min-height: 36px; font-weight: 500; }
@media (prefers-color-scheme: dark) { .link { color: var(--unread); } }
.link.danger, .danger { color: var(--danger); }
.primary.small, .secondary.small { min-height: 36px; padding: 0 12px; font-size: 14px; }
.wide { width: 100%; }
button:disabled { opacity: 0.45; cursor: not-allowed; }
.icon-btn { background: none; width: 44px; padding: 0; color: var(--ink); border-radius: 50%; }
.icon-btn.spin .ic { animation: spin 0.9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Hover only where there is a real pointer; on a phone a tapped row would stay shaded. */
@media (hover: hover) {
  .primary:hover { background: var(--navy-2); }
  .secondary:hover, .icon-btn:hover, .nav-item:hover, .row:hover { background: var(--hover); }
}

/* ── the gate ────────────────────────────────────────────── */
.gate {
  min-height: 100%;
  display: grid;
  place-items: center;
  padding: calc(24px + var(--safe-top)) 16px calc(24px + var(--safe-bottom));
  background: linear-gradient(180deg, var(--navy) 0, var(--navy) 38%, var(--canvas) 38%);
}
.gate-card {
  width: 100%;
  max-width: 400px;
  background: var(--surface);
  border-radius: 18px;
  box-shadow: var(--shadow);
  padding: 24px 22px 20px;
  display: grid;
  gap: 10px;
}
.gate-card form { display: grid; gap: 10px; }
.gate-loading { text-align: center; color: var(--muted); padding: 40px; }
.gate-brand { display: flex; align-items: center; gap: 10px; font-weight: 700; color: var(--navy); margin-bottom: 4px; }
@media (prefers-color-scheme: dark) { .gate-brand { color: var(--ink); } }
.gate-brand img { border-radius: 10px; }
.gate-card h1 { margin: 6px 0 0; font-size: 24px; }
.gate-lede { margin: 0 0 6px; color: var(--muted); }
.gate-card label { font-size: 14px; font-weight: 600; color: var(--body); margin-top: 4px; }
.gate-card input {
  width: 100%;
  min-height: 48px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--raised);
  font-size: 17px;
}
.gate-msg { margin: 4px 0 0; min-height: 1.2em; font-size: 14px; color: var(--danger); }

/* ── app shell ───────────────────────────────────────────── */
.app { height: 100dvh; display: flex; position: relative; overflow: hidden; }

.nav {
  position: fixed;
  inset: 0 auto 0 0;
  width: min(86vw, 300px);
  background: var(--surface);
  border-right: 1px solid var(--line);
  z-index: 40;
  transform: translateX(-102%);
  transition: transform 0.22s ease;
  display: flex;
  flex-direction: column;
  padding: calc(12px + var(--safe-top)) 10px calc(12px + var(--safe-bottom));
  overflow-y: auto;
}
.app.drawer-open .nav { transform: none; box-shadow: var(--shadow); }
.scrim { position: fixed; inset: 0; background: rgba(8, 12, 20, 0.45); z-index: 39; opacity: 0; pointer-events: none; transition: opacity 0.2s; }
.app.drawer-open .scrim { opacity: 1; pointer-events: auto; }
.nav-head { display: flex; align-items: center; gap: 10px; padding: 4px 6px 12px; }
.nav-head img { border-radius: 8px; }
.brand { font-size: 18px; flex: 1; }
.write { background: var(--navy); color: #fff; font-weight: 600; margin: 0 6px 12px; min-height: 48px; }
.write::before { content: ""; }
.nav-group { border-top: 1px solid var(--line); margin-top: 8px; padding-top: 8px; }
.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 46px;
  padding: 0 12px;
  border-radius: 10px;
  color: var(--ink);
  text-decoration: none;
}
.nav-item.on { background: var(--navy-soft); color: var(--navy); font-weight: 600; }
@media (prefers-color-scheme: dark) { .nav-item.on { color: var(--ink); } }
.nav-label { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.2; overflow: hidden; }
.nav-label span, .nav-label { text-overflow: ellipsis; white-space: nowrap; }
.nav-label small { color: var(--muted); font-weight: 400; font-size: 12px; }
.count { background: var(--navy); color: #fff; border-radius: 999px; font-size: 12px; font-weight: 700; padding: 1px 8px; }
.nav-foot { margin-top: auto; border-top: 1px solid var(--line); padding-top: 8px; }
.whoami { padding: 8px 12px; font-size: 13px; color: var(--muted); display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.whoami span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.whoami .link { white-space: nowrap; flex: none; }

.list-pane {
  position: relative;
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  padding-top: var(--safe-top);
}
.bar {
  display: flex;
  align-items: center;
  gap: 4px;
  min-height: 56px;
  padding: 0 6px;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
  flex: none;
}
.bar h1, .bar h2 { flex: 1; margin: 0 6px; font-size: 18px; font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sync-line { font-size: 13px; color: var(--muted); padding: 6px 16px; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 8px; }
.sync-line.warn { color: var(--warn); background: var(--warn-soft); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); flex: none; }
.dot.off { background: var(--warn); }

.list { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; padding-bottom: calc(96px + var(--safe-bottom)); }
.row {
  display: flex;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
  color: var(--ink);
  background: none;
  width: 100%;
  text-align: left;
  border-left: 0;
  border-right: 0;
  border-top: 0;
  cursor: pointer;
}
.row.on { background: var(--navy-soft); }
.row-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.row-top { display: flex; align-items: baseline; gap: 8px; }
.row-who { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--body); }
.row time { font-size: 13px; color: var(--muted); flex: none; }
.row-subject { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--body); }
.row-snippet { font-size: 14px; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.row.unread .row-who, .row.unread .row-subject { color: var(--ink); font-weight: 700; }
.row.unread time { color: var(--unread); font-weight: 700; }
.row.unread .avatar { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--unread); }

.avatar {
  --hue: 215;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  flex: none;
  display: grid;
  place-items: center;
  font-weight: 700;
  color: #fff;
  background: hsl(var(--hue) 45% 42%);
  font-size: 16px;
  margin-top: 2px;
}
.avatar.lg { width: 44px; height: 44px; }

.chips { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 5px; }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  line-height: 1;
  padding: 4px 8px;
  border-radius: 999px;
  background: var(--navy-soft);
  color: var(--navy);
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}
@media (prefers-color-scheme: dark) { .chip { color: var(--ink); } }
.chip.ghost { background: transparent; border: 1px solid var(--line); color: var(--muted); font-weight: 500; }
.chip.ok { background: var(--ok-soft); color: var(--ok); }
.chip.warn { background: var(--warn-soft); color: var(--warn); }

.empty { height: 100%; min-height: 240px; display: grid; place-content: center; justify-items: center; gap: 8px; color: var(--muted); text-align: center; padding: 32px; }
.empty p { margin: 0; max-width: 34ch; }

.fab {
  position: absolute;
  right: 18px;
  bottom: calc(18px + var(--safe-bottom));
  width: 58px;
  height: 58px;
  border-radius: 18px;
  border: 0;
  background: var(--navy);
  color: #fff;
  box-shadow: var(--shadow);
  display: grid;
  place-items: center;
  z-index: 5;
  cursor: pointer;
}
.fab .ic { width: 24px; height: 24px; }

/* ── reader ──────────────────────────────────────────────── */
.read-pane {
  position: fixed;
  inset: 0;
  z-index: 20;
  background: var(--surface);
  transform: translateX(102%);
  transition: transform 0.22s ease;
  display: flex;
  flex-direction: column;
  padding-top: var(--safe-top);
}
.app.reading .read-pane { transform: none; }
.reader { display: flex; flex-direction: column; height: 100%; min-height: 0; }
.reader-scroll { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 16px 16px 24px; }
.reader-subject { font-size: 22px; line-height: 1.25; margin: 0 0 14px; overflow-wrap: anywhere; }
.meta { display: flex; gap: 12px; align-items: flex-start; }
.meta-text { min-width: 0; flex: 1; }
.meta-from { overflow-wrap: anywhere; }
.meta-text .small { overflow-wrap: anywhere; }
.status { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0 0; }
.note { margin: 10px 0; padding: 10px 12px; border-radius: 10px; font-size: 14px; display: flex; gap: 8px; align-items: flex-start; }
.note .ic { margin-top: 2px; }
.note.warn { background: var(--warn-soft); color: var(--warn); }
.note.error { background: var(--danger-soft); color: var(--danger); }
.note.ok { background: var(--ok-soft); color: var(--ok); }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; margin: 16px 0 0; }
.seg button { border: 0; background: none; min-height: 36px; padding: 0 14px; cursor: pointer; font-size: 14px; }
.seg button[aria-pressed="true"] { background: var(--navy-soft); font-weight: 600; }
.seg button + button { border-left: 1px solid var(--line); }
.body { margin-top: 16px; }
.text { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 16px; line-height: 1.55; }
.quoted { margin-top: 14px; }
.quoted summary { cursor: pointer; color: var(--muted); font-size: 14px; min-height: 36px; display: flex; align-items: center; }
.quoted .text { color: var(--muted); border-left: 3px solid var(--line); padding-left: 12px; font-size: 15px; }
.html-frame { width: 100%; min-height: 200px; border: 1px solid var(--line); border-radius: 10px; background: #fff; display: block; }
.atts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.att {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: 100%;
  min-height: 44px;
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--raised);
  cursor: pointer;
  text-decoration: none;
  color: var(--ink);
}
.att.off { opacity: 0.6; cursor: default; }
.att-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 44vw; }
.thread { margin-top: 28px; border-top: 1px solid var(--line); padding-top: 12px; }
.thread h3 { font-size: 14px; color: var(--muted); margin: 0 0 6px; font-weight: 600; }
.thread-row { display: grid; grid-template-columns: auto 1fr auto; gap: 2px 8px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); text-decoration: none; color: var(--ink); }
.thread-who { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; }
.thread-row time { font-size: 12px; color: var(--muted); }
.thread-snippet { grid-column: 1 / -1; font-size: 13px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.reader-actions {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  padding: 10px 12px calc(10px + var(--safe-bottom));
  border-top: 1px solid var(--line);
  background: var(--surface);
}
.reader-actions button {
  min-height: 48px;
  border: 1px solid var(--line);
  background: var(--raised);
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  padding: 0 6px;
}
.reader-actions button:first-child { background: var(--navy); border-color: var(--navy); color: #fff; }

/* ── settings (forwarding) ───────────────────────────────── */
.settings { padding: 16px 16px calc(96px + var(--safe-bottom)); max-width: 760px; }
.lede { color: var(--muted); margin: 0 0 16px; }
.card { background: var(--raised); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; margin-bottom: 14px; }
.ident-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.ident-addr { font-weight: 700; overflow-wrap: anywhere; min-width: 0; }
.rules { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 10px; }
.rule { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; display: grid; gap: 6px; }
.rule-line { display: flex; align-items: center; gap: 8px; }
.rule-target { flex: 1; min-width: 0; overflow-wrap: anywhere; font-weight: 600; }
.rule-actions, .code-form { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.code-form input { width: 9em; min-height: 44px; padding: 0 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); letter-spacing: 3px; font-size: 18px; }
.add-rule { display: grid; grid-template-columns: 1fr auto; gap: 8px; margin-top: 12px; }
.add-rule input, .add-rule select { min-height: 44px; border: 1px solid var(--line); border-radius: 10px; padding: 0 12px; background: var(--surface); min-width: 0; }
.add-rule input { grid-column: 1 / -1; }
.add-rule button { min-height: 44px; }

/* ── sheets: compose and review ──────────────────────────── */
.sheet-layer { position: fixed; inset: 0; z-index: 60; display: flex; align-items: stretch; justify-content: center; }
.sheet-backdrop { position: absolute; inset: 0; background: rgba(8, 12, 20, 0.5); }
.sheet {
  position: relative;
  width: 100%;
  height: 100%;
  background: var(--surface);
  display: flex;
  flex-direction: column;
  padding-top: var(--safe-top);
}
.sheet-bar { gap: 6px; padding-right: 10px; }
.sheet-bar .primary { min-height: 40px; padding: 0 16px; }
.save-state { font-size: 12px; color: var(--muted); white-space: nowrap; }
.sheet-scroll { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 8px 16px calc(24px + var(--safe-bottom)); }
.field { display: flex; align-items: center; gap: 10px; border-bottom: 1px solid var(--line); min-height: 50px; }
.field > span, .field > label { width: 64px; flex: none; color: var(--muted); font-size: 15px; }
.field input, .field select {
  flex: 1;
  min-width: 0;
  border: 0;
  background: none;
  min-height: 48px;
  font-size: 16px;
  outline-offset: -2px;
}
.field-hint { font-size: 13px; margin: 6px 0 0 74px; }
.field-hint.warn { color: var(--warn); }
.c-text {
  width: 100%;
  min-height: 42vh;
  border: 0;
  resize: vertical;
  padding: 14px 0;
  font-size: 16px;
  line-height: 1.55;
  background: none;
  outline-offset: -2px;
}
.c-atts { display: flex; flex-wrap: wrap; gap: 8px; }
.c-att { display: inline-flex; align-items: center; gap: 6px; padding: 4px 4px 4px 10px; border: 1px solid var(--line); border-radius: 10px; font-size: 14px; max-width: 100%; }
.c-att .att-name { max-width: 50vw; }
.c-att.pending { opacity: 0.6; }
.c-att .icon-btn { width: 36px; min-height: 36px; }
.c-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin: 12px 0; }
.attach-btn { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 12px; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; font-weight: 600; }
.check { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; font-size: 15px; cursor: pointer; }
.check input { width: 20px; height: 20px; }

.steps { list-style: none; display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin: 0; padding: 10px 16px; border-bottom: 1px solid var(--line); counter-reset: step; }
.steps li { font-size: 13px; font-weight: 600; color: var(--faint); text-align: center; padding: 6px 0; border-radius: 8px; background: var(--canvas); }
.steps li.done { color: var(--ok); background: var(--ok-soft); }
.steps li.now { color: #fff; background: var(--navy); }
.echo { border: 1px solid var(--line); border-radius: var(--radius); background: var(--raised); margin: 12px 0 16px; overflow: hidden; }
.echo-head { display: grid; grid-template-columns: auto 1fr; gap: 6px 12px; margin: 0; padding: 12px 14px; border-bottom: 1px solid var(--line); background: var(--canvas); font-size: 14px; }
.echo-head dt { color: var(--muted); }
.echo-head dd { margin: 0; overflow-wrap: anywhere; font-weight: 600; }
.echo-body { white-space: pre-wrap; overflow-wrap: anywhere; padding: 14px; font-size: 15px; line-height: 1.55; }
.echo-end { text-align: center; font-size: 12px; color: var(--faint); padding: 8px 0 12px; }
.confirm {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin: 0 0 10px;
  cursor: pointer;
  line-height: 1.4;
}
.confirm input { width: 24px; height: 24px; flex: none; margin: 0; }
.confirm small { display: block; color: var(--muted); margin-top: 4px; }
.confirm.checked { border-color: var(--ok); background: var(--ok-soft); }
.warn-text { color: var(--warn); font-style: normal; }
.send-zone { margin-top: 16px; display: grid; gap: 8px; }
.hold {
  position: relative;
  overflow: hidden;
  width: 100%;
  min-height: 60px;
  border: 0;
  border-radius: 14px;
  background: var(--navy);
  color: #fff;
  font-size: 17px;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  touch-action: none;
}
.hold-fill { position: absolute; inset: 0; width: calc(var(--p, 0) * 100%); background: var(--accent); }
.hold-label { position: relative; display: inline-flex; align-items: center; gap: 8px; }
.countdown { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px; border-radius: 14px; background: var(--warn-soft); color: var(--warn); font-weight: 700; font-size: 17px; }
.countdown .secondary { min-width: 110px; }

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(24px + var(--safe-bottom));
  transform: translateX(-50%);
  z-index: 80;
  background: #1b2230;
  color: #fff;
  padding: 12px 18px;
  border-radius: 12px;
  box-shadow: var(--shadow);
  font-size: 15px;
  max-width: calc(100vw - 32px);
  pointer-events: none;
}
@media (max-width: 759px) {
  .app:not(.reading) ~ .toast, .toast { bottom: calc(92px + var(--safe-bottom)); }
}

/* ── tablet: list + message ──────────────────────────────── */
@media (min-width: 760px) {
  .read-pane {
    position: static;
    transform: none;
    transition: none;
    flex: 1.35;
    min-width: 0;
    border-left: 1px solid var(--line);
  }
  .list-pane { flex: 1; max-width: 420px; }
  .app.wide .list-pane { max-width: none; }
  .app.wide .read-pane { display: none; }
  .only-narrow { display: none !important; }
  .fab { display: none; }
  .sheet-layer { align-items: center; padding: 24px; }
  .sheet { max-width: 760px; height: min(92vh, 940px); border-radius: 16px; overflow: hidden; box-shadow: var(--shadow); padding-top: 0; }
  .add-rule { grid-template-columns: 1fr auto auto; }
  .add-rule input { grid-column: auto; }
}

/* ── desktop: three panes ────────────────────────────────── */
@media (min-width: 1100px) {
  .nav { position: static; transform: none; transition: none; width: 260px; flex: none; box-shadow: none; padding-top: 12px; }
  .scrim, .only-drawer { display: none !important; }
  .list-pane { max-width: 440px; }
  .fab { display: none; }
}
@media (max-width: 1099px) {
  .write { display: none; }
}
@media (min-width: 760px) and (max-width: 1099px) {
  .fab { display: grid; }
}
