/* CreemHost webmail — same tokens as the client area */
:root {
  --ink: #14211b; --ink-2: #4a5951; --ink-3: #7d8a83;
  --paper: #f6f4ef; --card: #ffffff; --line: #e3dfd6; --line-soft: #efece5;
  --brand: #0f6b45; --brand-ink: #0a4a30; --brand-tint: #e6f2ec; --brand-tint-2: #d4e9dd;
  --accent: #d98a1f; --accent-tint: #fdf1df;
  --danger: #b4332b; --danger-tint: #fbeceb;
  --hover: #faf9f5; --chip: #eeece6; --input-bg: #ffffff;
  --shadow: 0 1px 2px rgba(20,33,27,.06), 0 8px 28px rgba(20,33,27,.12);
  --radius: 10px;
  --sans: "Inter", "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --ink: #e4ebe7; --ink-2: #b6c3bc; --ink-3: #85958c;
  --paper: #0e1512; --card: #151f1a; --line: #25322b; --line-soft: #1d2822;
  --brand: #37a874; --brand-ink: #2a8a5d; --brand-tint: #15301f; --brand-tint-2: #1c3d2a;
  --accent-tint: #33270f; --danger-tint: #3a1a18;
  --hover: #1a2620; --chip: #222e28; --input-bg: #111a16;
  --shadow: 0 1px 2px rgba(0,0,0,.3), 0 10px 30px rgba(0,0,0,.45);
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; font: 14px/1.45 var(--sans); color: var(--ink); background: var(--paper); -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--brand); }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
[hidden] { display: none !important; }
svg.i { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.boot { display: grid; place-items: center; height: 100vh; color: var(--ink-3); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------- buttons, inputs ---------- */
.btn { display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 14px; border-radius: 8px; border: 1px solid var(--line);
  background: var(--card); color: var(--ink); font-weight: 500; white-space: nowrap; }
.btn:hover { background: var(--hover); }
.btn.primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn.primary:hover { background: var(--brand-ink); }
.btn.danger { color: var(--danger); }
.btn:disabled { opacity: .55; cursor: default; }
.icon-btn { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 8px; border: 0; background: transparent; color: var(--ink-2); }
.icon-btn:hover { background: var(--chip); color: var(--ink); }
.icon-btn.on { color: var(--brand); background: var(--brand-tint); }
.field { display: grid; gap: 6px; margin-bottom: 14px; }
.field label { font-weight: 600; font-size: 13px; }
.field .hint { color: var(--ink-3); font-size: 12px; }
.input, select.input { height: 40px; padding: 0 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--input-bg); width: 100%; }
.input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-tint); }
.switch { display: flex; align-items: center; gap: 10px; cursor: pointer; }
.switch input { width: 36px; height: 20px; appearance: none; border-radius: 20px; background: var(--line); position: relative; cursor: pointer; transition: background .15s; flex: none; }
.switch input::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .15s; }
.switch input:checked { background: var(--brand); }
.switch input:checked::after { transform: translateX(16px); }

/* ---------- login ---------- */
.login { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.login-card { width: min(400px, 100%); background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 32px 28px; box-shadow: var(--shadow); }
.login-card h1 { font-size: 22px; margin: 18px 0 4px; letter-spacing: -.01em; }
.login-card p.sub { color: var(--ink-3); margin: 0 0 22px; }
.login-card .btn { width: 100%; justify-content: center; height: 42px; }
.notice { padding: 10px 12px; border-radius: 8px; background: var(--accent-tint); color: var(--ink); margin-bottom: 16px; font-size: 13px; }
.notice.error { background: var(--danger-tint); color: var(--danger); }
.mark { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; font-size: 16px; letter-spacing: -.01em; }
.mark img { width: 28px; height: 28px; }

/* ---------- shell ---------- */
.shell { display: grid; grid-template-columns: 240px minmax(320px, 420px) 1fr; grid-template-rows: 56px 1fr; height: 100vh; height: 100dvh; }
.topbar { grid-column: 1 / -1; display: flex; align-items: center; gap: 12px; padding: 0 14px 0 18px; background: var(--card); border-bottom: 1px solid var(--line); }
.topbar .mark { width: 208px; }
.search { flex: 1; max-width: 620px; position: relative; }
.search svg { position: absolute; left: 12px; top: 10px; color: var(--ink-3); }
.search input { width: 100%; height: 38px; border-radius: 10px; border: 1px solid transparent; background: var(--paper); padding: 0 36px 0 38px; }
.search input:focus { outline: none; background: var(--card); border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-tint); }
.search .clear { position: absolute; right: 4px; top: 3px; width: 32px; height: 32px; }
.topbar .spacer { flex: 1; }
.avatar { width: 34px; height: 34px; border-radius: 50%; display: inline-grid; place-items: center; font-weight: 700; font-size: 13px; color: #fff; background: var(--brand); flex: none; text-transform: uppercase; }
.avatar.lg { width: 42px; height: 42px; font-size: 15px; }
.menu-wrap { position: relative; }
.menu { position: absolute; right: 0; top: 42px; min-width: 230px; background: var(--card); border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow); padding: 6px; z-index: 40; }
.menu.left { left: 0; right: auto; }
.menu .who { padding: 8px 10px 10px; border-bottom: 1px solid var(--line-soft); margin-bottom: 4px; }
.menu .who small { color: var(--ink-3); display: block; }
.menu button, .menu a { display: flex; gap: 10px; align-items: center; width: 100%; padding: 8px 10px; border: 0; background: none; border-radius: 6px; text-align: left; color: var(--ink); text-decoration: none; }
.menu button:hover, .menu a:hover { background: var(--hover); }

.rail { background: var(--card); border-right: 1px solid var(--line); padding: 14px 10px; display: flex; flex-direction: column; gap: 2px; overflow-y: auto; }
.compose-btn { height: 44px; justify-content: center; margin: 2px 4px 12px; border-radius: 12px; font-size: 15px; }
.nav-item { display: flex; align-items: center; gap: 12px; height: 36px; padding: 0 12px; border-radius: 8px; border: 0; background: none; color: var(--ink-2); text-align: left; width: 100%; }
.nav-item:hover { background: var(--hover); color: var(--ink); }
.nav-item.active { background: var(--brand-tint); color: var(--brand-ink); font-weight: 600; }
:root[data-theme="dark"] .nav-item.active { color: var(--ink); }
.nav-item .count { margin-left: auto; font-size: 12px; font-weight: 600; color: var(--ink-2); }
.nav-item.active .count { color: inherit; }
.nav-item .count.badge { background: var(--brand); color: #fff; padding: 1px 7px; border-radius: 10px; }
.nav-sep { height: 1px; background: var(--line-soft); margin: 10px 8px; }
.nav-label { font-size: 12px; color: var(--ink-3); padding: 6px 12px 4px; }
.quota { margin-top: auto; padding: 14px 12px 4px; font-size: 12px; color: var(--ink-3); }
.quota .bar { height: 6px; border-radius: 4px; background: var(--chip); overflow: hidden; margin-top: 6px; }
.quota .bar span { display: block; height: 100%; background: var(--brand); width: 0; }
.quota .bar.high span { background: var(--accent); }

/* ---------- list ---------- */
.list { background: var(--card); border-right: 1px solid var(--line); display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.list-head { display: flex; align-items: center; gap: 6px; padding: 10px 10px 8px 14px; border-bottom: 1px solid var(--line-soft); }
.list-head h2 { font-size: 17px; margin: 0; letter-spacing: -.01em; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.filters { display: flex; gap: 6px; padding: 8px 14px; border-bottom: 1px solid var(--line-soft); overflow-x: auto; scrollbar-width: none; }
.chip { height: 28px; padding: 0 11px; border-radius: 14px; border: 1px solid var(--line); background: var(--card); font-size: 12.5px; color: var(--ink-2); white-space: nowrap; }
.chip.on { background: var(--ink); color: var(--card); border-color: var(--ink); }
.bulk { display: flex; align-items: center; gap: 2px; padding: 6px 10px; border-bottom: 1px solid var(--line-soft); background: var(--brand-tint); }
.bulk .n { font-weight: 600; margin-right: auto; padding-left: 4px; }
.rows { overflow-y: auto; flex: 1; min-height: 0; }
.row { display: grid; grid-template-columns: 22px 1fr auto; gap: 2px 10px; padding: 11px 14px 11px 10px; border-bottom: 1px solid var(--line-soft); cursor: pointer; position: relative; }
.row:hover { background: var(--hover); }
.row.active { background: var(--brand-tint); }
.row.active::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--brand); }
.row .sel { grid-row: 1 / span 3; align-self: start; margin-top: 2px; width: 16px; height: 16px; accent-color: var(--brand); }
.row .who { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink-2); }
.row .when { font-size: 12px; color: var(--ink-3); white-space: nowrap; }
.row .subj { grid-column: 2 / -1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink-2); }
.row .prev { grid-column: 2 / -1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink-3); font-size: 13px; }
.row.unread .who, .row.unread .subj { color: var(--ink); font-weight: 700; }
.row.unread::after { content: ""; position: absolute; left: 4px; top: 17px; width: 6px; height: 6px; border-radius: 50%; background: var(--brand); }
.row .meta { grid-column: 2 / -1; display: flex; gap: 8px; align-items: center; margin-top: 3px; flex-wrap: wrap; }
.row .flags { display: inline-flex; gap: 4px; color: var(--ink-3); }
.row .flags .i { width: 15px; height: 15px; }
.row .flags .star { color: var(--accent); fill: var(--accent); }
.pill { display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 8px; border-radius: 11px; font-size: 12px; background: var(--chip); color: var(--ink-2); white-space: nowrap; }
.pill .i { width: 14px; height: 14px; }
.pill.open { background: var(--brand-tint); color: var(--brand-ink); font-weight: 600; }
:root[data-theme="dark"] .pill.open { color: var(--brand); }
.pill.warn { background: var(--accent-tint); color: #94600f; }
.empty { padding: 48px 24px; text-align: center; color: var(--ink-3); }
.empty svg.i { width: 40px; height: 40px; stroke-width: 1.4; margin-bottom: 10px; color: var(--line); }
.pager { display: flex; align-items: center; justify-content: space-between; padding: 8px 12px; border-top: 1px solid var(--line-soft); font-size: 12.5px; color: var(--ink-3); }

/* ---------- reader ---------- */
.reader { background: var(--card); display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.reader-bar { display: flex; align-items: center; gap: 2px; padding: 8px 12px; border-bottom: 1px solid var(--line-soft); }
.reader-bar .grow { flex: 1; }
.reader-body { overflow-y: auto; flex: 1; min-height: 0; padding: 22px 28px 28px; }
.reader h1 { font-size: 21px; margin: 0 0 18px; letter-spacing: -.015em; line-height: 1.3; overflow-wrap: anywhere; }
.sender { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 14px; }
.sender .names { flex: 1; min-width: 0; }
.sender .names strong { font-size: 15px; }
.sender .names .addr { color: var(--ink-3); margin-left: 6px; }
.sender .names .to { color: var(--ink-3); font-size: 13px; margin-top: 2px; overflow-wrap: anywhere; }
.sender .date { color: var(--ink-3); font-size: 13px; white-space: nowrap; }
.track-box { border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; margin: 0 0 16px; background: var(--paper); }
.track-box .head { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.track-box ul { margin: 8px 0 0; padding: 0; list-style: none; font-size: 13px; color: var(--ink-2); display: grid; gap: 4px; }
.track-box .note { font-size: 12px; color: var(--ink-3); margin-top: 8px; }
.imgbar { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 8px; background: var(--accent-tint); font-size: 13px; margin-bottom: 14px; }
.imgbar button { margin-left: auto; height: 30px; }
.msg-frame { width: 100%; border: 0; min-height: 340px; height: 56vh; background: #fff; border-radius: 6px; display: block; }
.atts { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line-soft); }
.att { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border: 1px solid var(--line); border-radius: 10px; min-width: 200px; max-width: 280px; text-decoration: none; color: var(--ink); background: var(--card); }
.att:hover { border-color: var(--brand); }
.att .ext { width: 34px; height: 34px; border-radius: 7px; display: grid; place-items: center; background: var(--brand-tint); color: var(--brand-ink); font-size: 10px; font-weight: 700; text-transform: uppercase; flex: none; }
.att .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
.att small { color: var(--ink-3); display: block; }
.reply-row { display: flex; gap: 10px; margin-top: 22px; flex-wrap: wrap; }
.blank { display: grid; place-items: center; text-align: center; color: var(--ink-3); flex: 1; padding: 30px; }
.blank svg.i { width: 56px; height: 56px; stroke-width: 1.2; color: var(--line); margin-bottom: 12px; }

.shell.page-mode .list { display: none; }
.shell.page-mode .reader { grid-column: 2 / -1; }
.att .nm-wrap { min-width: 0; flex: 1; }

/* ---------- compose ---------- */
.compose { position: fixed; right: 24px; bottom: 0; width: 600px; max-width: calc(100vw - 24px); height: min(680px, calc(100vh - 70px)); background: var(--card);
  border: 1px solid var(--line); border-bottom: 0; border-radius: 12px 12px 0 0; box-shadow: var(--shadow); display: flex; flex-direction: column; z-index: 30; }
.compose.max { right: 50%; transform: translateX(50%); bottom: 4vh; width: min(980px, 94vw); height: 90vh; border-radius: 12px; border-bottom: 1px solid var(--line); }
.compose.min { height: 46px; width: 320px; overflow: hidden; }
.compose-head { display: flex; align-items: center; gap: 4px; padding: 0 6px 0 16px; height: 46px; background: var(--ink); color: var(--card); border-radius: 12px 12px 0 0; flex: none; cursor: pointer; }
.compose-head strong { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.compose-head .saved { font-size: 12px; opacity: .7; margin-right: 6px; }
.compose-head .icon-btn { color: var(--card); width: 32px; height: 32px; }
.compose-head .icon-btn:hover { background: rgba(255,255,255,.12); color: var(--card); }
.addr-line { display: flex; align-items: flex-start; gap: 8px; padding: 4px 14px; border-bottom: 1px solid var(--line-soft); position: relative; flex: none; }
.addr-line > span { color: var(--ink-3); width: 38px; padding-top: 9px; flex: none; }
.chips { display: flex; flex-wrap: wrap; gap: 4px; flex: 1; align-items: center; min-height: 38px; }
.chips input { border: 0; background: transparent; flex: 1; min-width: 140px; height: 32px; outline: none; }
.addr-chip { display: inline-flex; align-items: center; gap: 4px; height: 26px; padding: 0 4px 0 10px; border-radius: 13px; background: var(--chip); font-size: 13px; max-width: 100%; }
.addr-chip.bad { background: var(--danger-tint); color: var(--danger); }
.addr-chip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.addr-chip button { border: 0; background: none; width: 20px; height: 20px; display: grid; place-items: center; border-radius: 50%; color: var(--ink-3); padding: 0; }
.addr-chip button:hover { background: var(--line); }
.addr-line .toggles { display: flex; gap: 2px; padding-top: 4px; }
.addr-line .toggles button { border: 0; background: none; color: var(--ink-3); padding: 6px; border-radius: 6px; }
.addr-line .toggles button:hover { color: var(--ink); background: var(--hover); }
.suggest { position: absolute; left: 60px; top: 42px; min-width: 300px; max-width: calc(100% - 70px); background: var(--card); border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow); padding: 4px; z-index: 50; }
.suggest button { display: flex; gap: 10px; align-items: center; width: 100%; border: 0; background: none; padding: 7px 8px; border-radius: 6px; text-align: left; }
.suggest button.hl, .suggest button:hover { background: var(--brand-tint); }
.suggest .avatar { width: 28px; height: 28px; font-size: 11px; }
.suggest small { display: block; color: var(--ink-3); }
.subject-line input { border: 0; background: transparent; width: 100%; height: 42px; outline: none; font-weight: 500; }
.subject-line { padding: 0 14px; border-bottom: 1px solid var(--line-soft); flex: none; }
.tools { display: flex; gap: 2px; padding: 4px 8px; border-bottom: 1px solid var(--line-soft); flex: none; flex-wrap: wrap; }
.tools button { min-width: 32px; height: 30px; border: 0; background: none; border-radius: 6px; color: var(--ink-2); font-weight: 600; }
.tools button:hover { background: var(--chip); color: var(--ink); }
.tools .sep { width: 1px; background: var(--line); margin: 5px 4px; }
.editor { flex: 1; overflow-y: auto; padding: 14px 16px; outline: none; min-height: 120px; line-height: 1.55; overflow-wrap: anywhere; }
.editor:empty::before { content: attr(data-placeholder); color: var(--ink-3); }
.editor blockquote { margin: 0 0 0 .4em; padding-left: .8em; border-left: 3px solid var(--line); color: var(--ink-2); }
.editor .sig { color: var(--ink-2); }
.editor img { max-width: 100%; }
.files { display: flex; flex-wrap: wrap; gap: 6px; padding: 6px 14px; flex: none; }
.files:empty { display: none; }
.file-chip { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 4px 0 10px; border-radius: 8px; background: var(--chip); font-size: 12.5px; max-width: 260px; }
.file-chip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-chip small { color: var(--ink-3); }
.file-chip button { border: 0; background: none; width: 22px; height: 22px; padding: 0; color: var(--ink-3); display: grid; place-items: center; border-radius: 4px; }
.compose-foot { display: flex; align-items: center; gap: 6px; padding: 10px 12px; border-top: 1px solid var(--line-soft); flex: none; }
.split { display: inline-flex; }
.split .btn.primary:first-child { border-radius: 8px 0 0 8px; padding: 0 18px; }
.split .btn.primary + .btn.primary { border-radius: 0 8px 8px 0; padding: 0 8px; border-left: 1px solid rgba(255,255,255,.3); }
.track-toggle { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 10px; border-radius: 8px; border: 1px solid var(--line); background: var(--card); color: var(--ink-2); font-size: 13px; }
.track-toggle.on { background: var(--brand-tint); color: var(--brand-ink); border-color: var(--brand-tint-2); font-weight: 600; }
:root[data-theme="dark"] .track-toggle.on { color: var(--brand); }
.compose-foot .grow { flex: 1; }
.drop-hint { position: absolute; inset: 46px 0 0; background: color-mix(in srgb, var(--brand) 10%, transparent); border: 2px dashed var(--brand); border-radius: 0 0 12px 12px; display: grid; place-items: center; font-weight: 600; color: var(--brand-ink); pointer-events: none; }

/* ---------- dialogs ---------- */
.overlay { position: fixed; inset: 0; background: rgba(10,20,15,.42); display: grid; place-items: center; z-index: 60; padding: 16px; }
.dialog { width: min(560px, 100%); max-height: calc(100vh - 32px); overflow-y: auto; background: var(--card); border-radius: 14px; box-shadow: var(--shadow); }
.dialog header { display: flex; align-items: center; padding: 16px 18px; border-bottom: 1px solid var(--line-soft); position: sticky; top: 0; background: var(--card); z-index: 1; }
.dialog header h2 { margin: 0; font-size: 17px; flex: 1; }
.dialog .body { padding: 18px; }
.dialog footer { display: flex; gap: 8px; justify-content: flex-end; padding: 12px 18px; border-top: 1px solid var(--line-soft); }
.sig-editor { border: 1px solid var(--line); border-radius: 8px; min-height: 110px; padding: 10px 12px; outline: none; background: var(--input-bg); }
.sig-editor:focus { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-tint); }
.sched-list { display: grid; gap: 6px; }
.sched-list button { display: flex; justify-content: space-between; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--card); text-align: left; }
.sched-list button:hover { border-color: var(--brand); background: var(--brand-tint); }
.sched-list small { color: var(--ink-3); }
.custom-time { display: flex; gap: 8px; margin-top: 12px; }

/* ---------- contacts / scheduled pages ---------- */
.page { overflow-y: auto; flex: 1; padding: 22px 28px; }
.page h1 { font-size: 21px; margin: 0 0 4px; }
.page p.sub { color: var(--ink-3); margin: 0 0 18px; }
.table { width: 100%; border-collapse: collapse; }
.table th { text-align: left; font-size: 12px; color: var(--ink-3); font-weight: 600; padding: 8px 10px; border-bottom: 1px solid var(--line); }
.table td { padding: 10px; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
.table td.act { text-align: right; white-space: nowrap; }
.add-row { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 18px; }
.add-row .input { flex: 1; min-width: 160px; }

/* ---------- toasts ---------- */
#toasts { position: fixed; left: 20px; bottom: 20px; display: grid; gap: 8px; z-index: 80; }
.toast { display: flex; align-items: center; gap: 14px; min-width: 280px; max-width: calc(100vw - 40px); padding: 11px 12px 11px 16px; border-radius: 10px; background: var(--ink); color: var(--card); box-shadow: var(--shadow); }
.toast span { flex: 1; }
.toast button { border: 0; background: none; color: #7fd6a8; font-weight: 700; padding: 4px 6px; border-radius: 6px; }
:root[data-theme="dark"] .toast { background: #e4ebe7; color: #14211b; }
:root[data-theme="dark"] .toast button { color: var(--brand-ink); }
.toast.error { background: var(--danger); color: #fff; }

/* ---------- mobile ---------- */
.only-sm { display: none !important; }
@media (max-width: 1100px) {
  .shell { grid-template-columns: 220px minmax(300px, 360px) 1fr; }
  .topbar .mark { width: 188px; }
}
@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr; grid-template-rows: 56px 1fr; }
  .only-sm { display: inline-grid !important; }
  .hide-sm { display: none !important; }
  .topbar { padding: 0 8px; gap: 6px; }
  .topbar .mark { width: auto; }
  .topbar .mark span { display: none; }
  .rail { position: fixed; top: 0; bottom: 0; left: 0; width: 280px; z-index: 55; transform: translateX(-100%); transition: transform .2s; box-shadow: var(--shadow); padding-top: 18px; }
  .rail.open { transform: none; }
  .scrim { position: fixed; inset: 0; background: rgba(10,20,15,.4); z-index: 54; }
  .list, .reader, .shell.page-mode .reader { grid-column: 1; grid-row: 2; border-right: 0; }
  .shell.reading .list { display: none; }
  .shell:not(.reading) .reader { display: none; }
  .reader-body { padding: 16px 16px 24px; }
  .reader h1 { font-size: 19px; }
  .sender .date { display: none; }
  .msg-frame { height: 70vh; }
  .compose, .compose.max { inset: 0; width: 100%; max-width: none; height: 100%; border-radius: 0; transform: none; }
  .compose-head { border-radius: 0; }
  .compose.min { inset: auto 0 0 auto; width: 100%; height: 46px; }
  .fab { position: fixed; right: 18px; bottom: 22px; width: 56px; height: 56px; border-radius: 16px; border: 0; background: var(--brand); color: #fff; display: grid; place-items: center; box-shadow: var(--shadow); z-index: 20; }
  .fab svg.i { width: 24px; height: 24px; }
  .page { padding: 16px; }
  .table .hide-sm { display: none; }
  #toasts { left: 12px; right: 12px; bottom: 88px; }
  .toast { min-width: 0; }
  .att { min-width: 0; max-width: 100%; flex: 1 1 100%; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
