/* Tembra Mail — бумага, чернила, одна золотая метка. Тонкие линии вместо теней. */

:root {
  color-scheme: light;
  --bg: #f0efe9;
  --surface: #fafaf6;
  --ink: #171a18;
  --muted: #60665f;
  --line: #c9ccc3;
  --line-soft: #dfe0d8;
  --hover: #f3f2ec;
  --sel: #e7e5db;
  --gold: #edb736;
  --gold-hover: #f9c952;
  --on-gold: #171a18;
  --head: #141716;
  --head-ink: #fafaf6;
  --head-muted: #a6ada7;
  --err: #a63a2b;
  --ok: #1d6b3c;
  --btn: #171a18;
  --btn-ink: #fafaf6;
  --btn-hover: #2f3531;
  --focus: #171a18;
  --mail-bg: #ffffff;
  --r: 6px;
  --r-lg: 8px;
  --font: Arial, "Noto Sans Armenian", sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --bg: #111311;
    --surface: #171b17;
    --ink: #efefe4;
    --muted: #8f978a;
    --line: #33392e;
    --line-soft: #272c24;
    --hover: #1c211b;
    --sel: #242a22;
    --head: #0c0e0c;
    --err: #e8907e;
    --ok: #7cc795;
    --btn: #efefe4;
    --btn-ink: #111311;
    --btn-hover: #d6d6cb;
    --focus: #efefe4;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 14px/1.45 var(--font);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
[hidden] { display: none !important; }
h1, h2, h3 { font-weight: 600; margin: 0; letter-spacing: -0.005em; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: inherit; }
kbd {
  font: 11px/1 var(--font);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 2px 5px;
  background: var(--surface);
  color: var(--ink);
}
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.ic {
  width: 18px; height: 18px; flex: none;
  fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round;
}

:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.top :focus-visible { outline-color: var(--head-ink); }

/* ---------------------------------------------------------------- кнопки */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 34px; padding: 0 14px;
  border: 1px solid transparent; border-radius: var(--r);
  background: none; cursor: pointer; font-weight: 600; white-space: nowrap;
}
.btn:disabled { opacity: .55; cursor: default; }
.btn-primary { background: var(--btn); color: var(--btn-ink); }
.btn-primary:not(:disabled):hover { background: var(--btn-hover); }
.btn-gold { background: var(--gold); color: var(--on-gold); }
.btn-gold:hover { background: var(--gold-hover); }
.btn-quiet { border-color: var(--line); background: var(--surface); }
.btn-quiet:not(:disabled):hover { background: var(--hover); }
.btn-danger { background: var(--err); color: #fff; }
@media (prefers-color-scheme: dark) { .btn-danger { color: #111311; } }
.btn-small { min-height: 28px; padding: 0 10px; font-size: 13px; }
.btn-wide { width: 100%; min-height: 40px; }

.icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; padding: 0;
  border: 1px solid transparent; border-radius: var(--r);
  background: none; cursor: pointer; color: inherit;
}
.icon-btn:hover { background: var(--hover); border-color: var(--line-soft); }
.icon-btn:disabled { opacity: .45; cursor: default; }

.link-btn {
  border: 0; background: none; padding: 0; cursor: pointer;
  color: var(--ink); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--line);
}
.link-btn:hover { text-decoration-color: currentColor; }
.link-btn:disabled { color: var(--muted); text-decoration: none; cursor: default; }

.hint { color: var(--muted); font-size: 12.5px; margin: 6px 0 0; }
.form-error { color: var(--err); font-size: 13px; margin: 8px 0 0; min-height: 0; }
.form-error:empty { display: none; }
.field-label { display: block; font-weight: 600; font-size: 13px; margin: 18px 0 6px; }
.input {
  display: block; width: 100%;
  border: 1px solid var(--line); border-radius: var(--r);
  background: var(--surface); padding: 8px 10px;
}
textarea.input { resize: vertical; line-height: 1.45; }

/* ---------------------------------------------------------------- вход */

.login {
  min-height: 100%;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 32px 16px;
}
.login-card {
  width: 100%; max-width: 380px;
  background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 28px 28px 30px;
}
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 600; font-size: 15px; text-decoration: none; }
.brand img { display: block; border-radius: 6px; }
.brand-ink { margin-bottom: 26px; }
.login h1 { font-size: 21px; margin-bottom: 8px; }
.lead { color: var(--muted); margin: 0 0 4px; }
.lead b { color: var(--ink); font-weight: 600; }
.addr-field {
  display: flex; align-items: stretch;
  border: 1px solid var(--line); border-radius: var(--r); background: var(--surface);
}
.addr-field:focus-within { outline: 2px solid var(--focus); outline-offset: 1px; }
.addr-field:has([aria-invalid="true"]), .code-input[aria-invalid="true"] { border-color: var(--err); }
.addr-field input {
  flex: 1; min-width: 0; border: 0; background: none; padding: 9px 10px; font-size: 15px; outline: none;
}
.addr-suffix {
  display: flex; align-items: center; padding: 0 12px;
  color: var(--muted); border-left: 1px solid var(--line-soft); font-size: 15px;
}
.login .btn-wide { margin-top: 18px; }
.code-input {
  display: block; width: 100%;
  border: 1px solid var(--line); border-radius: var(--r); background: var(--surface);
  padding: 10px 12px; font-size: 26px; letter-spacing: .42em; text-align: center; font-variant-numeric: tabular-nums;
}
.login-alt { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 10px; margin-top: 18px; font-size: 13px; }
.login-alt #login-back { margin-left: auto; }
.login-alt .hint { margin: 0; }
.login-foot { color: var(--muted); font-size: 12px; margin: 18px 0 0; letter-spacing: .04em; }

/* ---------------------------------------------------------------- каркас */

.app { height: 100%; display: flex; flex-direction: column; }
.top {
  flex: none; height: 48px;
  display: flex; align-items: center; gap: 10px;
  padding: 0 10px 0 16px;
  background: var(--head); color: var(--head-ink);
}
.top .brand { color: var(--head-ink); font-size: 15px; }
.top-right { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.who { color: var(--head-muted); font-size: 13px; margin-right: 8px; white-space: nowrap; }
.who b { color: var(--head-ink); font-weight: 600; }
.top-btn { color: var(--head-ink); }
.top-btn:hover { background: #262b27; border-color: #353b36; }
.nav-toggle, .compose-top { display: none; }

.cols {
  flex: 1; min-height: 0;
  display: grid; grid-template-columns: 228px minmax(340px, 420px) minmax(0, 1fr);
}

/* ---------------------------------------------------------------- левая колонка */

.side {
  display: flex; flex-direction: column;
  padding: 14px 10px 12px;
  border-right: 1px solid var(--line);
  overflow-y: auto;
  background: var(--bg);
}
.compose-btn { width: 100%; min-height: 40px; justify-content: flex-start; padding: 0 14px; font-size: 14.5px; }
.draft-note { margin: 8px 4px 0; font-size: 12.5px; color: var(--muted); }
.side-h {
  margin: 22px 10px 6px;
  font-size: 11px; font-weight: 600; letter-spacing: .09em; text-transform: uppercase; color: var(--muted);
}
.nav-list { list-style: none; margin: 0; padding: 0; }
.nav-link {
  position: relative;
  display: flex; align-items: center; gap: 10px;
  min-height: 34px; padding: 0 10px;
  border-radius: var(--r);
  text-decoration: none;
}
.nav-link:hover { background: var(--hover); }
.nav-link[aria-current="page"] { background: var(--sel); font-weight: 600; }
.nav-link[aria-current="page"]::before {
  content: ""; position: absolute; left: 0; top: 8px; bottom: 8px; width: 2px; border-radius: 2px; background: var(--ink);
}
.nav-link .ic { color: var(--muted); }
.nav-link[aria-current="page"] .ic { color: var(--ink); }
.nav-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-count { font-size: 12.5px; font-variant-numeric: tabular-nums; color: var(--muted); }
.nav-count.has { color: var(--ink); font-weight: 600; }
.side-foot { margin: auto 10px 0; padding-top: 18px; font-size: 12px; color: var(--muted); }

/* ---------------------------------------------------------------- список */

.list {
  display: flex; flex-direction: column; min-height: 0; min-width: 0;
  border-right: 1px solid var(--line);
  background: var(--surface);
}
.list-head { flex: none; padding: 14px 14px 10px; border-bottom: 1px solid var(--line); }
.list-title-row { display: flex; align-items: baseline; gap: 10px; margin-bottom: 10px; }
.list-title-row h1 { font-size: 17px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list-count { color: var(--muted); font-size: 12.5px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.search {
  display: flex; align-items: center; gap: 8px;
  border: 1px solid var(--line); border-radius: var(--r);
  padding: 0 10px; background: var(--bg);
}
.search:focus-within { outline: 2px solid var(--focus); outline-offset: 1px; background: var(--surface); }
.search .ic { color: var(--muted); width: 16px; height: 16px; }
.search input { flex: 1; min-width: 0; border: 0; background: none; height: 32px; outline: none; }
.list-scroll { flex: 1; min-height: 0; overflow-y: auto; }
.items { list-style: none; margin: 0; padding: 0; }
.row { position: relative; border-bottom: 1px solid var(--line-soft); }
.row-link {
  display: grid; grid-template-columns: minmax(0, 1fr) auto;
  gap: 1px 10px;
  padding: 9px 14px 10px 22px;
  text-decoration: none;
  outline-offset: -2px;
}
.row-link:hover { background: var(--hover); }
.row-link[aria-current="true"] { background: var(--sel); }
.row-link[aria-current="true"]::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--ink);
}
.row-dot {
  position: absolute; left: 9px; top: 15px; width: 7px; height: 7px; border-radius: 50%; background: var(--ink);
}
.row-from { display: flex; align-items: center; gap: 6px; min-width: 0; }
.row-from-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row-side { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 12.5px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.row-side .ic { width: 14px; height: 14px; }
.row-subj {
  grid-column: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.row-snip {
  grid-column: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); font-size: 13px;
}
.row.unread .row-from-name, .row.unread .row-subj { font-weight: 600; }
.row:not(.unread) .row-from-name { color: var(--ink); }
.row-star {
  position: absolute; right: 8px; bottom: 6px;
  width: 30px; height: 30px; color: var(--muted);
}
.row-star[aria-pressed="true"], .star-btn[aria-pressed="true"] { color: var(--ink); }
.row-star[aria-pressed="true"] .ic, .star-btn[aria-pressed="true"] .ic { fill: var(--gold); stroke: var(--ink); }
.row .row-snip { padding-right: 26px; }

.tag {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 11px; font-weight: 600; letter-spacing: .04em; color: var(--muted); text-transform: lowercase;
  white-space: nowrap;
}
.tag::before { content: ""; width: 6px; height: 6px; border-radius: 1px; background: var(--gold); }
.list-empty { color: var(--muted); text-align: center; padding: 48px 20px; margin: 0; }
.more { display: flex; margin: 14px auto 18px; }
.list-loading { opacity: .6; }

/* ---------------------------------------------------------------- письмо */

.reader { display: flex; flex-direction: column; min-width: 0; min-height: 0; background: var(--surface); outline: none; }
.reader-empty {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px;
  color: var(--muted); text-align: center; padding: 20px;
}
.reader-empty img { opacity: .9; }
.reader-bar {
  flex: none; display: flex; align-items: center; gap: 2px;
  padding: 7px 12px; border-bottom: 1px solid var(--line);
}
.reader-bar .sep { width: 1px; height: 20px; background: var(--line); margin: 0 6px; }
.reader-bar .spacer { flex: 1; }
.bar-btn {
  display: inline-flex; align-items: center; gap: 6px;
  height: 32px; padding: 0 10px;
  border: 1px solid transparent; border-radius: var(--r); background: none; cursor: pointer; font-size: 13px;
}
.bar-btn:hover { background: var(--hover); border-color: var(--line-soft); }
.back-btn { display: none; }
.reader-scroll { flex: 1; min-height: 0; display: flex; flex-direction: column; overflow: hidden; }
.reader-head { flex: none; max-height: 52%; overflow-y: auto; padding: 18px 24px 14px; border-bottom: 1px solid var(--line-soft); }
.subj-row { display: flex; align-items: flex-start; gap: 12px; }
.subj { font-size: 20px; line-height: 1.3; flex: 1; min-width: 0; overflow-wrap: anywhere; }
.subj-row .tag { margin-top: 6px; }
.meta { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 3px 12px; margin: 14px 0 0; font-size: 13px; }
.meta dt { color: var(--muted); }
.meta dd { margin: 0; overflow-wrap: anywhere; }
.meta .addr { color: var(--muted); }
.meta .name { font-weight: 600; }
.notice {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  margin: 12px 0 0; padding: 8px 12px;
  border: 1px solid var(--line); border-left: 3px solid var(--gold); border-radius: var(--r);
  font-size: 13px; background: var(--bg);
}
.notice .btn { margin-left: auto; }
.atts { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 0; padding: 0; }
.att {
  display: flex; align-items: center; gap: 10px; max-width: 280px;
  padding: 6px 10px 6px 6px; border: 1px solid var(--line); border-radius: var(--r);
  text-decoration: none; background: var(--surface);
}
.att:hover { background: var(--hover); }
.att-thumb {
  width: 36px; height: 36px; flex: none; border-radius: 4px; border: 1px solid var(--line-soft);
  display: flex; align-items: center; justify-content: center; overflow: hidden; background: var(--bg); color: var(--muted);
}
.att-thumb img { width: 100%; height: 100%; object-fit: cover; }
.att-text { min-width: 0; display: flex; flex-direction: column; }
.att-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.att-size { color: var(--muted); font-size: 12px; }
.thread { margin: 16px 0 0; }
.thread h3 { font-size: 11px; letter-spacing: .09em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
.thread ol { list-style: none; margin: 0; padding: 0; border: 1px solid var(--line-soft); border-radius: var(--r); }
.thread li + li { border-top: 1px solid var(--line-soft); }
.thread a {
  display: grid; grid-template-columns: 16px minmax(90px, 160px) minmax(0, 1fr) auto; align-items: center; gap: 10px;
  padding: 6px 10px; text-decoration: none; font-size: 13px;
}
.thread a:hover { background: var(--hover); }
.thread a[aria-current="page"] { background: var(--sel); }
.thread .ic { width: 14px; height: 14px; color: var(--muted); }
.t-from { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.t-snip { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); }
.t-date { color: var(--muted); font-size: 12px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.reader-body { flex: 1; min-height: 0; display: flex; }
.mail-frame { flex: 1; width: 100%; border: 0; background: var(--mail-bg); }
.plain {
  flex: 1; overflow-y: auto; margin: 0; padding: 20px 24px 32px;
  white-space: pre-wrap; overflow-wrap: anywhere; font: 14.5px/1.6 var(--font); max-width: 820px;
}
.plain a { text-underline-offset: 2px; }
.plain .q { color: var(--muted); }
@media (prefers-color-scheme: dark) {
  .reader-body:has(.mail-frame) { padding: 12px; background: var(--surface); }
  .mail-frame { border-radius: var(--r); }
}

/* ---------------------------------------------------------------- окна */

.dlg {
  border: 1px solid var(--line); border-radius: var(--r-lg);
  background: var(--surface); color: var(--ink);
  padding: 0; width: min(560px, calc(100vw - 32px)); max-height: calc(100vh - 48px);
}
.dlg::backdrop { background: rgba(20, 23, 22, .45); }
.dlg.small { width: min(440px, calc(100vw - 32px)); }
.dlg-head {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 10px 10px 18px; border-bottom: 1px solid var(--line);
}
.dlg-head h2 { font-size: 15px; flex: 1; }
.dlg-body { padding: 16px 18px 6px; }
.dlg-body h2 { font-size: 16px; margin-bottom: 8px; }
.dlg-body .field-label:first-of-type { margin-top: 8px; }
.dlg-foot {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 18px; border-top: 1px solid var(--line-soft);
}
.keys { margin: 18px 0 8px; font-size: 13px; }
.keys summary { cursor: pointer; color: var(--muted); }
.keys dl { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; margin: 10px 0 0; }
.keys dd { margin: 0; }

/* новое письмо */
.compose { width: min(780px, calc(100vw - 32px)); height: min(720px, calc(100vh - 48px)); }
.compose[open] { display: flex; }
.compose-form { display: flex; flex-direction: column; flex: 1; min-height: 0; width: 100%; position: relative; }
.compose-saved { margin: 0 6px 0 0; }
.cf-rows { flex: none; }
.cf-row {
  display: flex; align-items: center; gap: 10px;
  padding: 0 18px; min-height: 40px; border-bottom: 1px solid var(--line-soft);
}
.cf-row label { width: 56px; flex: none; color: var(--muted); font-size: 13px; }
.cf-row input, .cf-row select {
  flex: 1; min-width: 0; border: 0; background: none; height: 38px; outline: none; font-size: 14px;
}
.cf-row select { cursor: pointer; }
.cf-row:focus-within { box-shadow: inset 2px 0 0 var(--ink); }
.cf-row.bad label { color: var(--err); }
.cf-row.bad { box-shadow: inset 2px 0 0 var(--err); }
.cf-toggles { display: flex; gap: 10px; font-size: 13px; }
.toolbar {
  flex: none; display: flex; align-items: center; gap: 2px; flex-wrap: wrap;
  padding: 6px 12px; border-bottom: 1px solid var(--line-soft);
}
.tb {
  width: 32px; height: 30px; display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid transparent; border-radius: var(--r); background: none; cursor: pointer; font-size: 15px;
}
.tb:hover { background: var(--hover); border-color: var(--line-soft); }
.tb[aria-pressed="true"], .tb[aria-expanded="true"] { background: var(--sel); border-color: var(--line); }
.tb-sep { width: 1px; height: 18px; background: var(--line); margin: 0 6px; }
.linkbar {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  padding: 8px 18px; border-bottom: 1px solid var(--line-soft); background: var(--bg); font-size: 13px;
}
.linkbar input { flex: 1; min-width: 160px; border: 1px solid var(--line); border-radius: var(--r); padding: 4px 8px; background: var(--surface); }
.editor-wrap { flex: 1; min-height: 160px; position: relative; display: flex; }
.editor {
  flex: 1; overflow-y: auto; padding: 14px 18px 24px; outline: none;
  font: 14.5px/1.55 var(--font); overflow-wrap: anywhere;
}
.editor:focus-visible { outline: none; box-shadow: inset 2px 0 0 var(--focus); }
.editor p, .editor div { margin: 0; }
.editor blockquote { margin: 6px 0 6px 2px; padding-left: 12px; border-left: 2px solid var(--line); color: var(--muted); }
.editor ul, .editor ol { margin: 4px 0; padding-left: 26px; }
.editor a { color: inherit; text-underline-offset: 2px; }
.drop-hint {
  position: absolute; inset: 8px; display: flex; align-items: center; justify-content: center;
  border: 1.5px dashed var(--ink); border-radius: var(--r); background: color-mix(in srgb, var(--surface) 92%, transparent);
  font-weight: 600; pointer-events: none;
}
.cf-fwd { padding: 8px 18px; border-top: 1px solid var(--line-soft); font-size: 13px; }
.cf-fwd label { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; }
.files { list-style: none; margin: 0; padding: 0 18px; display: flex; flex-wrap: wrap; gap: 8px; }
.files:not(:empty) { padding-top: 10px; padding-bottom: 2px; border-top: 1px solid var(--line-soft); }
.file {
  position: relative; display: flex; align-items: center; gap: 8px; max-width: 260px;
  padding: 5px 4px 5px 10px; border: 1px solid var(--line); border-radius: var(--r); font-size: 13px; overflow: hidden;
}
.file .att-name { max-width: 150px; }
.file.bad { border-color: var(--err); }
.file.bad .att-size { color: var(--err); }
.file .icon-btn { width: 26px; height: 26px; }
.file .icon-btn .ic { width: 15px; height: 15px; }
.file progress {
  position: absolute; left: 0; right: 0; bottom: 0; width: 100%; height: 2px; border: 0; appearance: none; background: var(--line-soft);
}
.file progress::-webkit-progress-bar { background: var(--line-soft); }
.file progress::-webkit-progress-value { background: var(--ink); }
.file progress::-moz-progress-bar { background: var(--ink); }
.compose-error { padding: 0 18px; }
.compose .dlg-foot { border-top: 1px solid var(--line-soft); margin-top: 10px; }
.compose .dlg-foot .btn-primary { min-width: 96px; }
.cf-discard { margin-left: auto; }

/* уведомление */
.toast {
  position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); z-index: 50;
  display: flex; align-items: center; gap: 16px;
  max-width: calc(100vw - 32px); padding: 10px 16px;
  background: var(--head); color: var(--head-ink); border-radius: var(--r); font-size: 13.5px;
  border: 1px solid #3a413b;
}
.toast .link-btn { color: var(--gold); text-decoration-color: currentColor; font-weight: 600; }
.toast.error { border-left: 3px solid #e8907e; }

/* ---------------------------------------------------------------- узкие экраны */

@media (max-width: 1180px) {
  .cols { grid-template-columns: 200px minmax(300px, 360px) minmax(0, 1fr); }
  .bar-btn .lbl { display: none; }
  .bar-btn { padding: 0 8px; }
}

@media (max-width: 860px) {
  .cols { grid-template-columns: minmax(0, 1fr); position: relative; }
  .nav-toggle, .compose-top { display: inline-flex; }
  .side-foot { display: none; }
  .top { padding-left: 6px; gap: 6px; }
  .who { display: none; }
  .side {
    position: absolute; z-index: 20; top: 0; bottom: 0; left: 0; width: min(290px, 84vw);
    transform: translateX(-102%); transition: transform .18s ease; visibility: hidden;
    border-right: 1px solid var(--line);
  }
  .app.nav-open .side { transform: none; visibility: visible; }
  .scrim { position: absolute; inset: 0; z-index: 10; background: rgba(20, 23, 22, .4); }
  .app[data-view="list"] .reader { display: none; }
  .app[data-view="reader"] .list { display: none; }
  .list { border-right: 0; }
  .back-btn { display: inline-flex; }
  .reader-bar { padding: 6px 6px; overflow-x: auto; }
  .reader-head { padding: 14px 16px 12px; max-height: 46%; }
  .subj { font-size: 18px; }
  .plain { padding: 16px; }
  .thread a { grid-template-columns: 16px minmax(0, 1fr) auto; }
  .thread .t-snip { display: none; }
  .compose { width: 100vw; height: 100%; max-width: none; max-height: none; margin: 0; border-radius: 0; border: 0; }
  .dlg.small { width: calc(100vw - 24px); }
  .cf-row { padding: 0 12px; }
  .toolbar { padding: 4px 6px; }
  .editor { padding: 12px; }
  #cf-limits { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}
