:root {
  color-scheme: dark;
  --bg: #0a0d12;
  --ink: #f4f7fb;
  --muted: #909bb0;
  --line: #2a3342;
  --card: #1a202b;
  /* Cool accents — links, selection, focus */
  --accent: #4398D1;
  --accent-ink: #9fd0ee;
  --accent-soft: rgba(67, 152, 209, 0.16);
  --accent-mid: rgba(67, 152, 209, 0.28);
  --cyan: #6EC8D9;
  --cyan-ink: #B8E4EE;
  /* Warm accents — primary CTAs, composer edge */
  --warm: #E8953A;
  --warm-ink: #F0B56A;
  --warm-soft: rgba(232, 149, 58, 0.18);
  --orange: #E8953A;
  /* Soft gold / teal — flags & status */
  --gold: #D4B56A;
  --teal: #5BB8A8;
  --danger: #e07a6a;
  --ok: #3ecf8e;
  --shadow: 0 10px 28px rgba(0, 0, 0, 0.28);
  --focus-ring: 0 0 0 2px rgba(110, 200, 217, 0.45);
  --bar: 64px;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { min-height: 100%; }
body {
  margin: 0;
  font: 15px/1.5 Sora, system-ui, sans-serif;
  color: var(--ink);
  background: var(--bg);
}
.scene-bg { position: fixed; inset: 0; z-index: 0; background: var(--bg); overflow: hidden; }
.scene-bg .scene-layer {
  position: absolute; inset: 0; background: center / cover no-repeat; opacity: 0;
  transition: opacity 1s ease; pointer-events: none; overflow: hidden;
}
.scene-bg .scene-layer.show { opacity: 1; }
.scene-bg .scene-video {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; background: var(--bg);
}
.scene-bg::after {
  content: ""; position: absolute; inset: 0; z-index: 1; background: rgba(10, 13, 18, .48); pointer-events: none;
}
#yt-music-player { position: fixed; bottom: 0; left: 0; width: 1px; height: 1px; opacity: 0; pointer-events: none; overflow: hidden; }
.topbar, .shell { position: relative; z-index: 1; }
a { color: var(--accent-ink); }
h1, h2 { line-height: 1.25; font-weight: 680; }
h1 { font-size: 1.85rem; margin: 0; letter-spacing: -0.03em; }
h2 { font-size: 1.05rem; margin: 0 0 10px; }
button, input, textarea, select { font: inherit; color: var(--ink); }
button {
  background: var(--warm); color: #1a1208; border: 0; border-radius: 10px; padding: 9px 14px;
  cursor: pointer; font-weight: 650; box-shadow: 0 1px 0 rgba(255,255,255,.22) inset;
}
button:hover { filter: brightness(1.06); }
button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}
button.ghost:focus-visible,
a.button.ghost:focus-visible {
  border-color: var(--cyan);
}
button.ghost, a.button.ghost {
  background: transparent; color: var(--accent-ink); border: 1px solid var(--line);
  box-shadow: none; text-decoration: none; display: inline-flex; align-items: center;
}
button.ghost:hover, a.button.ghost:hover {
  border-color: rgba(67, 152, 209, .45); color: var(--cyan-ink); filter: none;
}
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.topbar {
  display: flex; align-items: center; gap: 16px; min-height: var(--bar); padding: 10px 20px;
  position: sticky; top: 0; z-index: 5;
}
html.topbar-scrolled .topbar {
  background: rgba(18, 23, 31, .72); border-bottom: 1px solid rgba(255,255,255,.12);
  backdrop-filter: blur(10px);
}
.brand { font-weight: 700; letter-spacing: -0.03em; font-size: 1.15rem; text-decoration: none; color: var(--ink); text-shadow: 0 1px 8px rgba(0,0,0,.7); }
.ai-api-banner {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: min(520px, 46vw);
  padding: 7px 12px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(232, 149, 58, .95), rgba(224, 122, 106, .92));
  border: 1px solid rgba(255, 220, 170, .55);
  box-shadow:
    0 0 0 1px rgba(232, 149, 58, .35),
    0 6px 18px rgba(0, 0, 0, .35),
    inset 0 1px 0 rgba(255, 255, 255, .28);
  color: #1a1208;
  font-size: 12.5px;
  font-weight: 650;
  line-height: 1.25;
}
.ai-api-banner-label {
  flex: 0 0 auto;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(26, 18, 8, .18);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.ai-api-banner-text {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ai-api-banner code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 11.5px;
  font-weight: 700;
  padding: 0 3px;
  border-radius: 4px;
  background: rgba(26, 18, 8, .12);
}
@media (max-width: 900px) {
  .ai-api-banner { max-width: min(280px, 42vw); font-size: 11.5px; padding: 6px 10px; }
}
.spacer { flex: 1; }
.scene-tools { display: flex; align-items: center; gap: 8px; }
.bg-reload, .lara-link {
  width: 36px; height: 36px; display: grid; place-items: center; border: 1px solid var(--line);
  background: rgba(18, 24, 34, .88); color: var(--ink); border-radius: 10px; padding: 0; text-decoration: none;
}
.lara-link { width: 32px; height: 32px; color: var(--muted); }
.bg-reload:hover, .lara-link:hover { border-color: var(--accent); color: var(--accent-ink); filter: none; }
.bg-reload:disabled { opacity: .4; cursor: default; }
button.who {
  color: var(--ink); font-size: 13px; font-weight: 650; background: rgba(18, 23, 31, .9);
  border: 1px solid var(--line); border-radius: 999px; padding: 4px 10px; box-shadow: none;
}
.who-menu { position: relative; }
.who-pop {
  position: absolute; top: calc(100% + 6px); right: 0; z-index: 40; min-width: 190px; padding: 6px;
  border-radius: 12px; border: 1px solid var(--line); background: rgba(18, 23, 31, .96); box-shadow: var(--shadow);
}
.who-pop a, .who-logout-btn {
  display: block; width: 100%; padding: 8px 10px; border-radius: 8px; color: var(--ink);
  text-decoration: none; background: transparent; border: 0; text-align: left; font-weight: 600; box-shadow: none;
}
.who-pop a:hover, .who-logout-btn:hover { background: rgba(255,255,255,.06); color: var(--accent-ink); filter: none; }
.who-logout { margin: 0; }
.shell { min-height: calc(100vh - var(--bar)); }
.shell > main { min-width: 0; }
main.page, .page-wrap { padding: 28px 32px 48px; }
main.auth { max-width: 440px; margin: 10vh auto; padding: 8px; }
.card-form, .stack {
  background: rgba(18, 24, 34, .88); border: 1px solid var(--line); border-radius: 16px;
  padding: 22px; backdrop-filter: blur(12px); box-shadow: var(--shadow);
}
.stack { margin-top: 18px; }
label { display: flex; flex-direction: column; gap: 6px; margin: 12px 0; font-weight: 600; }
input, textarea, select {
  background: #121822; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; width: 100%;
}
input:focus-visible, textarea:focus-visible, select:focus-visible {
  border-color: rgba(110, 200, 217, .55);
  box-shadow: var(--focus-ring);
}
textarea { resize: vertical; }
.form-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.form-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.ticket-close {
  width: 36px; height: 36px; display: grid; place-items: center; border-radius: 10px;
  text-decoration: none; color: var(--ink); background: transparent; border: 1px solid var(--line); font-size: 22px;
}
.muted, .hint { color: var(--muted); font-weight: 500; }
.hint.err { color: var(--danger); }
.flash { margin: 12px 16px; padding: 10px 12px; border-radius: 10px; background: rgba(62, 207, 142, .15); }
.flash.err { background: rgba(224, 122, 106, .18); }
.auth-links { margin: 14px 0 0; }
.page-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 12px; }
.page-wrap { max-width: 1100px; }
.split { display: grid; grid-template-columns: 1.4fr .6fr .8fr; gap: 10px; }
.account-layout { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(260px, .8fr); gap: 16px; }
.account-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.account-list li { display: flex; align-items: center; gap: 8px; }
.account-list a { flex: 1; text-decoration: none; color: inherit; display: flex; flex-direction: column; }
.account-list span { color: var(--muted); font-size: 13px; }
.grid { width: 100%; border-collapse: collapse; margin-top: 18px; }
.grid th, .grid td { text-align: left; padding: 8px; border-bottom: 1px solid var(--line); }
.user-actions { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 8px; }
.user-actions .inline-act { margin: 0; }
.button.ghost.compact, button.ghost.compact {
  padding: 6px 10px; font-size: 12px; background: transparent; color: var(--accent, #c4a574);
  border: 1px solid var(--line); border-radius: 8px; box-shadow: none; cursor: pointer;
}
.invite-box {
  margin-top: 12px; border-color: rgba(196, 165, 116, .35);
  box-shadow: 0 0 0 1px rgba(196, 165, 116, .12);
}
.invite-box #invite-link { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12px; }
.mailbox-details { min-width: 220px; max-width: 360px; }
.mailbox-details > summary {
  cursor: pointer; color: var(--accent, #3d7ea6); font-size: 13px; list-style: none;
}
.mailbox-details > summary::-webkit-details-marker { display: none; }
.mailbox-form { margin-top: 8px; padding: 10px; background: rgba(255,255,255,.04); border-radius: 8px; }
.mailbox-form .split { margin-top: 8px; }
.check-line { display: flex; align-items: center; gap: 8px; }
button.icon-act {
  width: 32px; height: 32px; padding: 0; background: transparent; color: var(--muted); box-shadow: none;
}
button.icon-act svg { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
button.icon-act.is-delete:hover { color: var(--danger); }
main.mail-app {
  padding: 0;
  display: flex;
  flex-direction: column;
  height: calc(100vh - var(--bar));
  max-height: calc(100vh - var(--bar));
  min-height: 0;
  overflow: hidden;
}
.mail {
  --cm-col-folders: 240px;
  --cm-col-list: 360px;
  --cm-splitter: 5px;
  flex: 1;
  min-height: 0;
  min-width: 0;
  display: grid;
  grid-template-columns: var(--cm-col-folders) var(--cm-splitter) var(--cm-col-list) var(--cm-splitter) minmax(0, 1fr);
  overflow: hidden;
}
.pane {
  min-height: 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: rgba(18, 24, 34, .78);
  border-right: 0;
  box-shadow: inset 0 1px 0 rgba(67, 152, 209, .14);
  backdrop-filter: blur(10px);
}
.mail-splitter {
  position: relative;
  z-index: 4;
  width: 100%;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: col-resize;
  touch-action: none;
  user-select: none;
}
.mail-splitter::before {
  content: "";
  position: absolute;
  inset: 0;
  width: 1px;
  margin: 0 auto;
  background: rgba(255, 255, 255, .12);
  transition: background .15s ease, box-shadow .15s ease, width .15s ease;
}
.mail-splitter:hover::before,
.mail-splitter:focus-visible::before,
.mail.is-resizing .mail-splitter.is-active::before {
  width: 2px;
  background: var(--accent);
  box-shadow: 0 0 0 1px var(--accent-soft);
}
.mail-splitter:focus-visible {
  outline: none;
}
.mail.is-resizing {
  cursor: col-resize;
  user-select: none;
}
.mail.is-resizing .pane {
  pointer-events: none;
}
.pane.reader,
#reader {
  border-right: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, .18) transparent;
  align-content: flex-start;
}
.pane-head {
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 12px;
  flex: 0 0 auto;
  position: relative;
  background: rgba(18, 24, 34, .92);
  z-index: 2;
}
#folder-list,
#threads {
  flex: 1 1 auto;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, .18) transparent;
}
#threads {
  padding: 8px 8px 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
#folder-list::-webkit-scrollbar,
#threads::-webkit-scrollbar,
.reader::-webkit-scrollbar {
  width: 8px;
}
#folder-list::-webkit-scrollbar-thumb,
#threads::-webkit-scrollbar-thumb,
.reader::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, .18);
  border-radius: 8px;
}
#folder-list::-webkit-scrollbar-track,
#threads::-webkit-scrollbar-track,
.reader::-webkit-scrollbar-track {
  background: transparent;
}
#sync-state { flex: 0 0 auto; }
.mail-reload {
  width: 36px;
  height: 36px;
  margin-left: auto;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  background: rgba(18, 24, 34, .88);
  color: var(--ink);
  border-radius: 10px;
  cursor: pointer;
  padding: 0;
  box-shadow: none;
  flex: 0 0 auto;
}
.mail-reload svg { display: block; }
.mail-reload:hover { border-color: var(--accent); color: var(--accent-ink); filter: none; }
.mail-reload:disabled { opacity: .4; cursor: default; }
.mail-reload.is-busy svg { animation: mail-spin .9s linear infinite; }
@keyframes mail-spin { to { transform: rotate(360deg); } }
.compose-open,
#compose-open {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  padding: 0;
  flex: 0 0 auto;
  background: var(--warm);
  color: #1a1208;
  border: 0;
  border-radius: 10px;
  box-shadow: 0 1px 0 rgba(255, 255, 255, .22) inset;
}
.compose-open svg,
#compose-open svg { display: block; }
.compose-open:hover,
#compose-open:hover { filter: brightness(1.08); }
.list-head { flex-wrap: wrap; }
.list-head input[type="search"] { flex: 1; min-width: 120px; }
.check-line { flex-direction: row; align-items: center; margin: 0; font-size: 12px; font-weight: 600; color: var(--muted); }
.check-line input { width: auto; }
.bulk-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex: 0 0 auto;
  margin: 0 8px;
  padding: 8px 10px;
  border: 1px solid rgba(67, 152, 209, .32);
  border-radius: 12px;
  background: rgba(26, 36, 50, .96);
  box-shadow: 0 6px 18px rgba(0, 0, 0, .22);
}
.bulk-bar[hidden] { display: none !important; }
.bulk-count {
  color: var(--accent-ink);
  font-size: 13px;
  font-weight: 650;
  white-space: nowrap;
}
.bulk-actions {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.bulk-btn {
  padding: 5px 10px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  min-height: 0;
}
.bulk-trash {
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 12.5px;
  font-weight: 650;
  background: transparent;
  color: var(--danger);
  border: 1px solid rgba(224, 122, 106, .45);
  box-shadow: none;
}
.bulk-trash:hover {
  filter: none;
  background: rgba(224, 122, 106, .12);
  border-color: var(--danger);
}
.bulk-trash:disabled {
  opacity: .45;
  cursor: default;
}
#folder-list {
  display: flex;
  flex-direction: column;
  padding: 4px 0 8px;
  gap: 0;
  background: #1e1e1e;
}
.pane.folders {
  background: #1e1e1e;
  box-shadow: none;
}
.account-select-legacy { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.folders-head { gap: 10px; background: #1e1e1e; }
.account-section {
  margin: 0;
  padding: 0;
  border: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
}
.account-section.has-separator {
  margin-top: 6px;
  padding-top: 6px;
  border-top: 1px solid rgba(255, 255, 255, .08);
}
.account-section-head {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  padding: 6px 10px 6px 8px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #d6d6d6;
  box-shadow: none;
  cursor: pointer;
  text-align: left;
}
.account-section-head:hover {
  background: rgba(255, 255, 255, .06);
  filter: none;
}
.account-section.is-active > .account-section-head {
  background: rgba(67, 152, 209, .12);
  box-shadow: inset 2px 0 0 var(--cyan);
}
.account-section.is-placeholder > .account-section-head {
  opacity: .72;
  cursor: default;
}
.account-section.is-placeholder > .account-section-head:disabled {
  opacity: .72;
  cursor: default;
}
.account-section-mark {
  width: 17px;
  height: 17px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  color: rgba(200, 200, 200, .55);
}
.account-section-mark svg {
  display: block;
  transition: transform .15s ease;
}
.account-section.is-open > .account-section-head .account-section-mark svg {
  transform: rotate(90deg);
}
.account-section-meta {
  min-width: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0;
}
.account-section-label {
  font-size: 17px;
  font-weight: 600;
  line-height: 1.3;
  color: #d6d6d6;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.account-section-email {
  font-size: 15px;
  color: rgba(180, 180, 180, .7);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.account-section-hint {
  flex: 0 0 auto;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: .02em;
  color: rgba(180, 180, 180, .55);
  white-space: nowrap;
}
.account-section-body {
  display: none;
}
.account-section.is-open > .account-section-body {
  display: block;
}
.account-section-folders {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 0;
}
.account-placeholder-note {
  margin: 4px 8px 6px 28px;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.4;
}
.folder-group {
  margin: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  overflow: visible;
}
.folder-group.is-nested {
  margin: 0;
  border: 0;
  background: transparent;
}
.folder-more-group {
  margin-top: 4px;
  border: 0;
}
.folder-row {
  --folder-depth: 0;
  display: flex;
  align-items: center;
  gap: 4px;
  min-height: 22px;
  margin: 0;
  padding: 2px 8px 2px calc(6px + (var(--folder-depth) * 12px));
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #cccccc;
  box-shadow: none;
  cursor: default;
  width: 100%;
  text-align: left;
  font: inherit;
}
.folder-row:hover {
  background: rgba(255, 255, 255, .06);
  filter: none;
}
.folder-row.is-on,
.folder-row:has(.folder-btn.is-on) {
  background: rgba(67, 152, 209, .22);
  box-shadow: inset 2px 0 0 var(--cyan);
}
.folder-row.is-expandable { cursor: pointer; }
.folder-row .folder-btn { flex: 1; min-width: 0; }
.folder-more-row {
  cursor: pointer;
  color: #cccccc;
  font-weight: 500;
}
.folder-more-row:hover { filter: none; }
.folder-more-act {
  width: 22px;
  height: 22px;
  flex: 0 0 22px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 3px;
  background: transparent;
  color: rgba(180, 180, 180, .45);
  box-shadow: none;
  cursor: pointer;
  font-size: 17px;
  line-height: 1;
  opacity: 0;
}
.folder-row:hover .folder-more-act,
.folder-row:focus-within .folder-more-act {
  opacity: 1;
}
.folder-more-act:hover {
  color: var(--accent-ink);
  background: rgba(67, 152, 209, .14);
  filter: none;
}
.folder-menu {
  position: fixed;
  z-index: 40;
  min-width: 160px;
  max-height: min(70vh, 420px);
  overflow-y: auto;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(18, 24, 34, .98);
  box-shadow: var(--shadow);
}
.folder-menu button {
  width: 100%;
  margin: 0;
  padding: 8px 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--ink);
  box-shadow: none;
  text-align: left;
  font-size: 17px;
  font-weight: 550;
}
.folder-menu button:hover {
  background: rgba(67, 152, 209, .16);
  filter: none;
}
.folder-twist,
.folder-twist-spacer {
  width: 17px;
  height: 17px;
  flex: 0 0 17px;
  display: grid;
  place-items: center;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 2px;
  background: transparent;
  color: rgba(200, 200, 200, .55);
  box-shadow: none;
  cursor: pointer;
}
.folder-twist-spacer {
  cursor: default;
  pointer-events: none;
}
.folder-twist:hover {
  color: rgba(230, 230, 230, .85);
  background: rgba(255, 255, 255, .06);
  filter: none;
}
.folder-more-twist {
  width: 17px;
  flex: 0 0 17px;
  padding: 0;
  margin: 0;
  color: rgba(200, 200, 200, .55);
  font-size: inherit;
  font-weight: inherit;
  letter-spacing: normal;
  text-transform: none;
}
.folder-twist-mark {
  width: 13px;
  height: 13px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  opacity: 1;
}
.folder-twist-mark svg {
  display: block;
  transition: transform .15s ease;
}
.folder-group.is-open > .folder-row > .folder-twist .folder-twist-mark svg,
.folder-group.is-open > .folder-more-row > .folder-twist .folder-twist-mark svg {
  transform: rotate(90deg);
}
.folder-ico {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  display: grid;
  place-items: center;
  color: #E2C47A;
  opacity: .96;
  filter: drop-shadow(0 0 0.4px rgba(226, 196, 122, .35));
}
.folder-ico svg { display: block; }
.folder-twist-label {
  flex: 1;
  min-width: 0;
  text-align: left;
  font-family: Sora, system-ui, sans-serif;
  font-size: 17px;
  font-weight: 400;
  line-height: 1.5;
  color: #cccccc;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.folder-twist-meta {
  color: rgba(180, 180, 180, .5);
  font-variant-numeric: tabular-nums;
  font-size: 15px;
  flex: 0 0 auto;
}
.folder-twist-count {
  min-width: 1.2em;
  padding: 0 5px;
  border-radius: 999px;
  border: 1px solid rgba(67, 152, 209, .28);
  color: var(--accent-ink);
  font-size: 14px;
  font-weight: 650;
  line-height: 1.4;
  opacity: .95;
  flex: 0 0 auto;
}
.folder-group.is-open > .folder-row > .folder-btn .folder-twist-count,
.folder-group.is-open > .folder-more-row > .folder-twist-count { display: none; }
.folder-children {
  display: none;
  border: 0;
}
.folder-group.is-open > .folder-children {
  display: block;
}
.folder-children-inner {
  padding: 0;
  background: transparent;
}
.folder-more-empty {
  margin: 2px 8px 6px calc(6px + 17px + 4px + 18px + 4px);
  color: var(--muted);
  font-size: 16px;
  line-height: 1.4;
}
.folder-btn {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  gap: 6px;
  width: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #cccccc;
  box-shadow: none;
  text-align: left;
  font-family: Sora, system-ui, sans-serif;
  font-size: 17px;
  font-weight: 400;
  line-height: 1.5;
  min-height: 22px;
  cursor: pointer;
}
.folder-btn:hover { background: transparent; filter: none; }
.folder-btn.is-on {
  background: transparent;
  box-shadow: none;
  filter: none;
  color: #f0f0f0;
  font-weight: 400;
}
.folder-btn.is-child {
  font-family: Sora, system-ui, sans-serif;
  font-size: 17px;
  font-weight: 400;
  line-height: 1.5;
  color: #cccccc;
  border-radius: 0;
  margin: 0;
  padding: 0;
}
.folder-btn .folder-name,
.folder-btn.is-child .folder-name,
.folder-name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: left;
  font-family: Sora, system-ui, sans-serif;
  font-size: 17px;
  font-weight: 400;
  line-height: 1.5;
  letter-spacing: normal;
}
.folder-btn.is-child .badge { font-weight: 600; }
.badge {
  color: var(--cyan-ink);
  font-size: 13px;
  font-weight: 650;
  padding: 1px 7px;
  border-radius: 999px;
  background: var(--accent-soft);
  border: 1px solid rgba(67, 152, 209, .28);
}
.folder-row .badge {
  font-size: 14px;
  padding: 0 5px;
  flex: 0 0 auto;
}
.tree-group {
  display: flex;
  flex-direction: column;
  gap: 0;
  min-width: 0;
}
.tree-card {
  position: relative;
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  gap: 8px;
  align-items: start;
  margin: 0;
  padding: 10px 12px 9px 8px;
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 12px;
  background: rgba(22, 28, 38, .92);
  color: inherit;
  box-shadow: none;
  cursor: pointer;
  min-width: 0;
}
.tree-card-body {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}
.tree-card-check {
  width: 15px;
  height: 15px;
  margin: 3px 0 0;
  padding: 0;
  accent-color: var(--accent);
  cursor: pointer;
  opacity: 0;
  transition: opacity .12s ease;
}
.tree-card:hover .tree-card-check,
.tree-card.is-selected .tree-card-check,
.tree-card-check:focus-visible,
#threads.has-selection .tree-card-check {
  opacity: 1;
}
.tree-card:hover {
  border-color: rgba(67, 152, 209, .35);
  background: rgba(28, 36, 48, .96);
}
.tree-card.is-on {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px rgba(67, 152, 209, .35);
  background: rgba(26, 36, 50, .98);
}
.tree-card.is-selected {
  border-color: rgba(67, 152, 209, .55);
  background: rgba(30, 42, 58, .98);
}
.tree-card.is-selected.is-on {
  box-shadow: 0 0 0 1px rgba(67, 152, 209, .45);
}
.tree-card.unread .tree-card-who { color: #dde2e8; }
.tree-card.unread .tree-card-subject { color: #c8ced6; }
.tree-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
}
.tree-card-who {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 14px;
  font-weight: 650;
  line-height: 1.3;
  color: #c8ced6;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.tree-card-top-right {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  flex: 0 0 auto;
}
.tree-card-time {
  color: #aeb6c2;
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
}
.tree-card-more {
  width: 26px;
  height: 26px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  box-shadow: none;
  font-size: 17px;
  line-height: 1;
  cursor: pointer;
}
.tree-card-more:hover {
  color: var(--accent-ink);
  background: var(--accent-soft);
  filter: none;
}
.tree-card-subject {
  color: #aeb6c2;
  font-size: 13.5px;
  font-weight: 500;
  line-height: 1.35;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.tree-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 22px;
}
.tree-card-foot-left {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex: 1 1 auto;
}
.tree-replies-toggle {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin: 0;
  padding: 2px 6px 2px 4px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  box-shadow: none;
  font-size: 13px;
  font-weight: 550;
  cursor: pointer;
}
.tree-replies-toggle:hover {
  color: var(--accent-ink);
  background: var(--accent-soft);
  filter: none;
}
.tree-replies-icon {
  display: inline-flex;
  color: var(--accent-ink);
  opacity: .85;
}
.tree-replies-chevron {
  font-size: 12px;
  line-height: 1;
}
.tree-card-folder,
.tree-card-note {
  color: var(--cyan-ink);
  font-size: 12px;
  font-weight: 600;
}
.tree-branch {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 2px 0 0;
  padding: 0 0 0 2px;
}
.tree-child-row {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 6px;
  align-items: stretch;
  padding-left: 10px;
}
.tree-rail {
  position: relative;
  width: 18px;
  min-height: 100%;
}
.tree-rail-line {
  position: absolute;
  left: 7px;
  top: -10px;
  bottom: 50%;
  width: 0;
  border-left: 1px dashed rgba(144, 155, 176, .55);
}
.tree-rail-node {
  position: absolute;
  left: 3px;
  top: calc(50% - 5px);
  width: 9px;
  height: 9px;
  border: 1.5px solid rgba(144, 155, 176, .7);
  border-radius: 50%;
  background: var(--bg);
  box-sizing: border-box;
}
.tree-card.is-child {
  background: rgba(16, 20, 28, .94);
  border-color: rgba(255, 255, 255, .08);
}
.tree-card.is-child.is-on {
  border-color: var(--accent);
  background: rgba(24, 32, 44, .98);
}
.letter.is-focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px rgba(67, 152, 209, .28);
}
.sync-state, .empty { color: var(--muted); padding: 12px; }
.sync-state.is-busy { color: var(--accent-ink); }
.sync-state.is-ok { color: var(--teal); }
.sync-state.is-err { color: var(--danger); }
.letter {
  margin: 14px;
  padding: 0;
  background: rgba(10, 13, 18, .55);
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  flex: 0 0 auto; /* reader is a flex column — don't crush letters (kills outer scroll) */
}
.letter-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  padding: 14px 16px 12px;
  background: linear-gradient(180deg, rgba(67, 152, 209, .10), rgba(232, 149, 58, .03));
  border-bottom: 1px solid rgba(255, 255, 255, .1);
  box-shadow: inset 0 -1px 0 rgba(67, 152, 209, .22);
}
.letter-head strong {
  display: block;
  font-size: 1.05rem;
  font-weight: 680;
  line-height: 1.3;
  margin-bottom: 4px;
}
.letter-head .meta {
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.45;
}
.letter-actions { display: flex; gap: 6px; flex-wrap: wrap; flex-shrink: 0; }
.letter-actions button {
  width: auto;
  padding: 6px 8px;
  background: transparent;
  border: 1px solid var(--line);
  box-shadow: none;
  color: var(--ink); /* override base button #1a1208 (for filled warm CTAs) */
}
.letter-actions button:hover {
  border-color: rgba(232, 149, 58, .5);
  color: var(--warm-ink);
  filter: none;
}
.letter-actions button.letter-action-warm {
  color: var(--warm);
  border-color: rgba(232, 149, 58, .6);
  background: var(--warm-soft);
  font-weight: 650;
}
.letter-actions button.letter-action-warm:hover {
  color: var(--warm-ink);
  border-color: var(--warm);
  background: rgba(232, 149, 58, .28);
  filter: none;
}
.letter-actions button[data-ai] {
  border-color: rgba(67, 152, 209, .45);
  color: var(--accent-ink);
  background: transparent;
}
.letter-actions button[data-ai]:hover {
  border-color: var(--cyan);
  color: var(--cyan-ink);
  filter: none;
}
.letter-actions button.letter-action-danger {
  color: var(--danger);
  border-color: rgba(224, 122, 106, .45);
  background: transparent;
}
.letter-actions button.letter-action-danger:hover {
  color: #f0a398;
  border-color: var(--danger);
  filter: none;
}
.letter-actions button.letter-action-trash {
  min-width: 34px;
  width: 34px;
  padding: 6px;
  display: inline-grid;
  place-items: center;
  line-height: 0;
}
.letter-actions button.letter-action-trash svg {
  display: block;
}
.letter-actions button.letter-action-more {
  min-width: 34px;
  padding: 6px 10px;
  font-weight: 700;
  letter-spacing: .06em;
  line-height: 1;
  color: var(--ink);
  border-color: var(--line);
  background: transparent;
}
.letter-actions button.letter-action-more:hover,
.letter-actions button.letter-action-more:focus-visible {
  color: var(--warm-ink);
  border-color: rgba(232, 149, 58, .5);
  filter: none;
}
.letter-body { padding: 14px 16px 16px; }
.letter-body > button { margin-bottom: 10px; }
.mail-frame {
  width: 100%;
  min-height: 180px;
  border: 0;
  background: var(--bg);
  border-radius: 10px;
  display: block;
  overflow: hidden; /* height set from content; avoid nested iframe scrollbars */
}
.plain-mail {
  white-space: pre-wrap;
  font: 400 17px/1.5 Sora, system-ui, sans-serif;
  font-family: Sora, system-ui, sans-serif !important;
  font-size: 17px !important;
  font-weight: 400;
  line-height: 1.5;
  letter-spacing: normal;
  margin: 0;
  color: var(--ink);
  background: transparent;
}
.composer {
  position: fixed; z-index: 20;
  left: 18vw; top: 8vh;
  width: 63.65vw;
  height: min(78vh, 820px);
  min-width: 420px;
  min-height: 360px;
  max-width: none;
  transform: none;
  display: flex;
  flex-direction: column;
  background: #2b2f36;
  border: 1px solid #3d424a;
  border-radius: 16px;
  padding: 16px;
  box-shadow:
    0 16px 48px rgba(0, 0, 0, 0.55),
    0 0 0 1px rgba(255, 255, 255, 0.04),
    inset 0 1px 0 rgba(232, 149, 58, 0.42),
    inset 0 2px 0 rgba(67, 152, 209, 0.18);
  overflow: hidden;
  box-sizing: border-box;
}
.composer[hidden] { display: none !important; }
.composer #compose-form {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
}
.composer .form-head {
  position: relative;
  padding-bottom: 12px;
  margin-bottom: 2px;
  border-bottom: 1px solid rgba(255, 255, 255, .08);
  align-items: center;
  cursor: grab;
  user-select: none;
  flex: 0 0 auto;
  touch-action: none;
}
.composer .form-head.is-dragging { cursor: grabbing; }
.composer .compose-message-block {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  min-height: 0;
  margin-top: 2px;
}
.composer .compose-message-head {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin-bottom: 4px;
  flex: 0 0 auto;
}
.composer .compose-attach-btn {
  width: 34px;
  height: 34px;
  padding: 0;
  margin: 0;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  border-radius: 10px;
  background: rgba(232, 149, 58, 0.12);
  border: 1px solid rgba(232, 149, 58, 0.45);
  color: var(--warm-ink, #F0B56A);
  box-shadow: none;
  cursor: pointer;
  transition: color .15s ease, background .15s ease, border-color .15s ease, transform .12s ease;
}
.composer .compose-attach-btn:hover {
  background: rgba(232, 149, 58, 0.22);
  border-color: var(--warm, #E8953A);
  color: var(--warm, #E8953A);
  filter: none;
  transform: translateY(-1px);
}
.composer .compose-attach-btn:focus-visible {
  border-color: var(--warm);
  box-shadow: var(--focus-ring);
}
.composer .compose-attach-btn svg {
  display: block;
}
.composer textarea[name="body"] {
  flex: 1 1 auto;
  min-height: 120px;
  resize: none;
  width: 100%;
  box-sizing: border-box;
  font: 400 17px/1.5 Sora, system-ui, sans-serif;
  font-family: Sora, system-ui, sans-serif;
  font-size: 17px;
  font-weight: 400;
  line-height: 1.5;
}
.composer-resize {
  position: absolute;
  right: 2px;
  bottom: 2px;
  width: 18px;
  height: 18px;
  cursor: nwse-resize;
  touch-action: none;
  background:
    linear-gradient(135deg, transparent 45%, rgba(255,255,255,.22) 46%, rgba(255,255,255,.22) 54%, transparent 55%),
    linear-gradient(135deg, transparent 62%, rgba(255,255,255,.35) 63%, rgba(255,255,255,.35) 71%, transparent 72%),
    linear-gradient(135deg, transparent 79%, rgba(232,149,58,.7) 80%, rgba(232,149,58,.7) 88%, transparent 89%);
  border-radius: 0 0 14px 0;
  opacity: .85;
}
.composer-resize:hover { opacity: 1; }
body.is-composer-sizing { user-select: none; cursor: grabbing; }
body.is-composer-sizing .composer-resize { cursor: nwse-resize; }
.composer .compose-to-row,
.composer .compose-cc-field,
.composer .compose-bcc-field,
.composer > form > label,
.composer .compose-attach,
.composer .form-actions {
  flex: 0 0 auto;
}
.composer > form > label {
  margin: 8px 0 2px;
}
.composer #compose-close {
  width: 34px; height: 34px; padding: 0; margin: 0;
  display: grid; place-items: center; flex-shrink: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: var(--muted);
  font-size: 20px; line-height: 1; font-weight: 500;
  box-shadow: none;
  transition: color .15s ease, background .15s ease, border-color .15s ease;
}
.composer #compose-close:hover {
  background: rgba(110, 200, 217, 0.12);
  border-color: rgba(110, 200, 217, 0.5);
  color: var(--cyan-ink);
  filter: none;
}
.composer #compose-close:focus-visible {
  border-color: var(--cyan);
  color: var(--cyan-ink);
  box-shadow: var(--focus-ring);
}
.composer .form-head::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -1px;
  width: 56px;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--warm), var(--accent));
}
.composer .form-head h2 { color: var(--ink); }
.composer .form-actions button[type="submit"] {
  background: var(--warm);
  color: #1a1208;
  min-width: 96px;
}
.compose-to-row {
  display: flex; align-items: flex-end; gap: 10px; margin: 12px 0; flex-wrap: wrap;
}
.compose-to-row .compose-to-field {
  flex: 1 1 220px; margin: 0; min-width: 0;
}
.compose-cc-bcc-toggles {
  display: flex; align-items: center; gap: 8px; flex: 0 0 auto; padding-bottom: 8px;
}
.compose-cc-bcc-toggle {
  width: auto; padding: 0; margin: 0; border: 0; background: transparent;
  color: var(--cyan-ink); font: inherit; font-size: 13px; font-weight: 600;
  cursor: pointer; text-decoration: underline; text-underline-offset: 2px;
  text-decoration-color: rgba(110, 200, 217, .45);
}
.compose-cc-bcc-toggle:hover { color: var(--warm-ink); text-decoration-color: var(--warm); filter: none; }
.compose-cc-bcc-toggle[hidden],
.compose-cc-field[hidden],
.compose-bcc-field[hidden] { display: none !important; }
.composer .compose-cc-field,
.composer .compose-bcc-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 0 0 12px;
  font-weight: 600;
}
.compose-extra-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 28px;
}
.compose-extra-label > label {
  display: block;
  margin: 0;
  font-weight: 600;
}
.compose-field-trash {
  width: 28px;
  height: 28px;
  padding: 0;
  margin: 0;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  border-radius: 8px;
  background: transparent;
  border: 1px solid rgba(224, 122, 106, .38);
  color: var(--danger);
  box-shadow: none;
  cursor: pointer;
  transition: color .15s ease, background .15s ease, border-color .15s ease;
}
.compose-field-trash:hover {
  filter: none;
  background: rgba(224, 122, 106, .16);
  border-color: var(--danger);
  color: #f2a094;
}
.compose-field-trash:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px rgba(224, 122, 106, .35);
  border-color: var(--danger);
}
.compose-attach { margin: 8px 0 0; }
.composer .compose-attach .attach-list { margin-top: 6px; }
.attach-list {
  list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px;
}
.attach-list li {
  display: flex; align-items: center; gap: 8px; padding: 6px 8px;
  border: 1px solid rgba(67, 152, 209, .18); border-radius: 8px; background: rgba(67, 152, 209, .04);
}
.attach-list .attach-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.attach-list .attach-size { color: var(--muted); font-size: 12px; flex-shrink: 0; }
.attach-list .attach-remove {
  width: auto; padding: 2px 8px; background: transparent; border: 1px solid var(--line);
  color: var(--muted); border-radius: 6px; cursor: pointer;
}
.attach-list .attach-remove:hover { color: var(--danger); border-color: var(--danger); }
.letter-attachments {
  display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; padding-top: 10px;
  border-top: 1px solid var(--line);
}
.letter-attachments .attach-chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px;
  border: 1px solid rgba(67, 152, 209, .22); border-radius: 8px; background: rgba(255,255,255,.04);
  color: var(--ink); text-decoration: none; cursor: pointer; font: inherit;
}
.letter-attachments .attach-chip:hover {
  border-color: var(--warm);
  color: var(--warm-ink);
  background: var(--warm-soft);
}
.letter-attachments .attach-chip-meta { color: var(--muted); font-size: 12px; }
.letter-notes {
  padding: 12px 16px 16px;
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(67, 152, 209, .05), rgba(91, 184, 168, .03));
}
.letter-notes-head {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  margin-bottom: 8px;
}
.letter-notes-head strong { font-size: 14px; font-weight: 650; color: var(--cyan-ink); }
.letter-notes-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 10px; }
.letter-notes-empty { margin: 0; }
.letter-note {
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255,255,255,.03);
}
.letter-note-meta {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
  margin-bottom: 6px; color: var(--muted); font-size: 12px;
}
.letter-note-meta strong { color: var(--ink); font-weight: 650; font-size: 13px; }
.letter-note-delete {
  width: auto; margin-left: auto; padding: 2px 8px;
  color: var(--muted); border: 1px solid var(--line); border-radius: 6px;
  background: transparent; cursor: pointer; font: inherit; font-size: 12px;
}
.letter-note-delete:hover { color: var(--danger); border-color: var(--danger); }
.letter-note-body {
  margin: 0; white-space: pre-wrap; font: 13px/1.45 inherit; color: var(--ink);
}
.letter-notes-form { display: flex; flex-direction: column; gap: 8px; }
.letter-notes-form textarea {
  width: 100%; min-height: 72px; resize: vertical;
  font: inherit; color: var(--ink);
  background: rgba(0,0,0,.25); border: 1px solid var(--line); border-radius: 8px;
  padding: 8px 10px;
}
.letter-notes-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.letter-notes-actions button { width: auto; padding: 6px 10px; }
.letter-notes-status { margin: 0; }
.attach-viewer {
  position: fixed; inset: 0; z-index: 40; display: grid; place-items: center;
  background: rgba(6, 8, 12, .72); padding: 16px;
}
.attach-viewer[hidden] { display: none !important; }
.attach-viewer-panel {
  width: min(960px, 100%); max-height: calc(100vh - 32px); display: flex; flex-direction: column;
  background: rgba(18, 24, 34, .98); border: 1px solid var(--line); border-radius: 16px;
  box-shadow: var(--shadow); overflow: hidden;
}
.attach-viewer-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 14px; border-bottom: 1px solid var(--line); flex-shrink: 0;
}
.attach-viewer-head h2 {
  margin: 0; font-size: 16px; font-weight: 600; overflow: hidden;
  text-overflow: ellipsis; white-space: nowrap; min-width: 0;
}
.attach-viewer-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.attach-viewer-actions a.ghost {
  width: auto; padding: 6px 10px; text-decoration: none; color: var(--ink);
  border: 1px solid var(--line); border-radius: 8px; background: transparent;
}
.attach-viewer-body {
  flex: 1; min-height: 280px; max-height: calc(100vh - 120px); overflow: auto;
  display: grid; place-items: center; background: #0d1118; padding: 12px;
}
.attach-viewer-body img {
  max-width: 100%; max-height: calc(100vh - 160px); object-fit: contain; border-radius: 4px;
}
.attach-viewer-body iframe,
.attach-viewer-body embed,
.attach-viewer-body object {
  width: 100%; height: calc(100vh - 160px); min-height: 360px; border: 0; background: #fff;
}
.attach-viewer-fallback {
  text-align: center; color: var(--muted); padding: 24px;
}
.attach-viewer-fallback a { color: var(--accent-ink); }
.confirm-modal {
  position: fixed; inset: 0; z-index: 50; display: grid; place-items: center;
  background: rgba(6, 8, 12, .72); padding: 16px;
}
.confirm-modal[hidden] { display: none !important; }
.confirm-modal-panel {
  width: min(420px, 100%);
  background: rgba(18, 24, 34, .98);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow);
  padding: 18px 18px 16px;
}
.confirm-modal-title {
  margin: 0 0 8px;
  font-size: 1.05rem;
  font-weight: 680;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.confirm-modal-body {
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.45;
}
.confirm-modal-actions {
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
}
.confirm-modal-actions button {
  width: auto;
  min-height: 36px;
  padding: 7px 14px;
  border-radius: 10px;
  background: transparent;
  box-shadow: none;
  font-weight: 650;
}
.confirm-modal-cancel {
  color: var(--warm);
  border: 1px solid rgba(232, 149, 58, .6);
  background: var(--warm-soft);
}
.confirm-modal-cancel:hover {
  color: var(--warm-ink);
  border-color: var(--warm);
  background: rgba(232, 149, 58, .28);
  filter: none;
}
.confirm-modal-ok {
  color: var(--warm);
  border: 1px solid rgba(232, 149, 58, .6);
  background: transparent;
}
.confirm-modal-ok:hover {
  color: var(--warm-ink);
  border-color: var(--warm);
  background: var(--warm-soft);
  filter: none;
}
.confirm-modal-ok.is-danger {
  color: var(--danger);
  border-color: rgba(224, 122, 106, .55);
  background: transparent;
}
.confirm-modal-ok.is-danger:hover {
  color: #f0a398;
  border-color: var(--danger);
  background: rgba(224, 122, 106, .12);
  filter: none;
}
.pane-switch { display: none; }
@media (max-width: 980px) {
  .split, .account-layout { grid-template-columns: 1fr; }
  .mail {
    --cm-col-folders: 1fr;
    --cm-col-list: 1fr;
    grid-template-columns: 1fr;
  }
  .mail .pane { display: none; }
  .mail .mail-splitter { display: none; }
  .mail[data-show="folders"] .folders,
  .mail[data-show="list"] .list,
  .mail[data-show="read"] .reader {
    display: flex;
    min-height: 0;
    height: 100%;
  }
  .pane-switch {
    display: flex;
    flex: 0 0 auto;
    position: relative;
    bottom: auto;
    z-index: 6;
    background: rgba(18, 23, 31, .92);
  }
  .pane-switch button { flex: 1; border-radius: 0; background: transparent; box-shadow: none; }
}
