:root {
  color-scheme: dark;
  --forest: #ff5366;
  --forest-deep: #ffebed;
  --forest-soft: #37171e;
  --moss: #ff7b87;
  --paper: #08090c;
  --paper-bright: #101115;
  --ink: #f4f0f2;
  --muted: #aaa2a8;
  --line: #29272d;
  --line-strong: #403941;
  --amber: #ff4659;
  --danger: #ff8792;
  --shadow: 0 24px 80px rgb(0 0 0 / 54%);
  --surface: #121216;
  --surface-raised: #18181e;
  --surface-inset: #0c0c10;
  --surface-hover: #21161b;
  --text-soft: #c6bfc3;
  --text-dim: #958c92;
  --text-faint: #716a72;
  --red-border: #642a35;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* { box-sizing: border-box; }

html, body { width: 100%; min-width: 320px; min-height: 100%; margin: 0; }

body {
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}

button, input, textarea, select { font: inherit; }
button { color: inherit; }
button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible, summary:focus-visible, a:focus-visible {
  outline: 3px solid rgb(217 144 72 / 70%);
  outline-offset: 2px;
}

[hidden] { display: none !important; }
.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; }

.login-screen {
  display: grid;
  min-height: 100svh;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(ellipse at 8% 12%, rgb(217 144 72 / 15%), transparent 35%),
    radial-gradient(ellipse at 94% 87%, rgb(23 59 49 / 12%), transparent 38%),
    var(--paper);
}

.login-card {
  width: min(100%, 438px);
  padding: 42px;
  border: 1px solid rgb(213 221 212 / 85%);
  border-radius: 24px;
  background: rgb(255 255 252 / 92%);
  box-shadow: var(--shadow);
}

.login-mark { width: 56px; height: 56px; margin: 0 0 32px; }
.login-mark img, .brand img { display: block; width: 100%; height: 100%; }
.eyebrow { margin: 0 0 8px; color: var(--moss); font-size: 10px; font-weight: 760; letter-spacing: .16em; }
.login-card h1 { margin: 0; color: var(--forest-deep); font-family: Georgia, "Times New Roman", serif; font-size: clamp(30px, 8vw, 40px); font-weight: 500; letter-spacing: -.035em; line-height: 1.08; }
.login-copy { max-width: 320px; margin: 14px 0 32px; color: var(--muted); font-size: 14px; line-height: 1.65; }
.stack-form { display: grid; gap: 10px; }
.stack-form label, .dialog-card label { color: #49544c; font-size: 12px; font-weight: 680; }
.stack-form input, .dialog-card input, .dialog-card textarea, .reply-composer textarea {
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  transition: border-color .16s ease, box-shadow .16s ease;
}
.stack-form input, .dialog-card input { min-height: 46px; padding: 0 13px; }
.stack-form input:focus, .dialog-card input:focus, .dialog-card textarea:focus, .reply-composer textarea:focus { border-color: var(--moss); box-shadow: 0 0 0 3px rgb(107 128 111 / 12%); outline: none; }
.login-footnote { margin: 22px 0 0; color: #889189; font-size: 11px; text-align: center; }
.form-error { margin: 0; color: var(--danger); font-size: 12px; line-height: 1.5; }

.button {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 0 15px;
  border: 1px solid transparent;
  border-radius: 10px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
  transition: transform .16s ease, background .16s ease, border-color .16s ease, box-shadow .16s ease;
}
.button:active { transform: translateY(1px); }
.button:disabled { cursor: wait; opacity: .65; }
.button-primary { color: #fff; background: var(--forest); box-shadow: 0 5px 14px rgb(23 59 49 / 13%); }
.button-primary:hover { background: var(--forest-deep); }
.button-secondary { color: var(--forest); border-color: var(--line-strong); background: #fff; }
.button-secondary:hover { background: var(--forest-soft); }
.button-wide { width: 100%; min-height: 48px; margin-top: 8px; }
.text-button { padding: 7px 9px; border: 0; border-radius: 8px; background: transparent; color: var(--moss); cursor: pointer; font-size: 12px; font-weight: 680; }
.text-button:hover { background: var(--forest-soft); color: var(--forest); }

.mail-app { display: flex; min-height: 100svh; flex-direction: column; overflow: hidden; background: var(--paper-bright); }
.topbar {
  z-index: 2;
  display: flex;
  height: 72px;
  flex: 0 0 72px;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 0 26px;
  border-bottom: 1px solid var(--line);
  background: #fff;
}
.brand { display: inline-flex; min-width: 205px; align-items: center; gap: 11px; color: var(--forest); text-decoration: none; }
.brand img { width: 38px; height: 38px; }
.brand span { display: flex; flex-direction: column; gap: 2px; }
.brand strong { font-family: Georgia, "Times New Roman", serif; font-size: 17px; font-weight: 600; letter-spacing: -.02em; }
.brand small { color: var(--moss); font-size: 8px; font-weight: 780; letter-spacing: .18em; }
.topbar-account { display: flex; width: min(420px, 48vw); align-items: center; gap: 7px; margin-right: auto; margin-left: 32px; }
.topbar-account select { width: 100%; min-width: 0; height: 38px; padding: 0 34px 0 12px; overflow: hidden; border: 1px solid var(--line); border-radius: 9px; background-color: #fff; color: #344139; font-size: 12px; font-weight: 640; text-overflow: ellipsis; }
.topbar-actions { display: flex; align-items: center; gap: 9px; }
.icon-button { display: inline-grid; width: 38px; height: 38px; flex: 0 0 auto; place-items: center; border: 1px solid transparent; border-radius: 10px; background: transparent; color: #647168; cursor: pointer; font-size: 18px; line-height: 1; }
.icon-button:hover { border-color: var(--line); background: #f7f9f5; color: var(--forest); }
.icon-button span { font-size: 23px; }
.add-inbox-button { width: 34px; height: 34px; border-color: var(--line); color: var(--forest); font-size: 22px; }
.logout-button { color: var(--muted); }

.mail-layout { display: grid; min-height: 0; flex: 1; grid-template-columns: 220px minmax(290px, 350px) minmax(0, 1fr); }
.folder-sidebar { position: relative; display: flex; min-height: 0; flex-direction: column; padding: 22px 14px 18px; border-right: 1px solid var(--line); background: #f8f9f4; }
.compose-button { width: 100%; justify-content: flex-start; padding: 0 16px; }
.compose-button > span { font-size: 18px; font-weight: 450; }
.nav-heading { margin: 31px 11px 10px; color: #8b958d; font-size: 9px; font-weight: 780; letter-spacing: .16em; }
.folder-nav { display: grid; gap: 4px; }
.folder-link { display: grid; min-height: 41px; align-items: center; grid-template-columns: 24px 1fr auto; padding: 0 11px; border: 0; border-radius: 9px; background: transparent; color: #667168; cursor: pointer; font-size: 12px; text-align: left; }
.folder-link:hover { background: #edf1eb; color: var(--forest); }
.folder-link.is-active { background: #e8eee8; color: var(--forest); font-weight: 720; }
.nav-icon { color: #7a897d; font-size: 17px; text-align: center; }
.count-badge { min-width: 17px; color: var(--moss); font-size: 10px; font-weight: 730; text-align: right; }
.sidebar-bottom { margin-top: auto; padding: 16px 9px 0; border-top: 1px solid var(--line); }
.provider-status { display: flex; align-items: center; gap: 7px; color: #66766a; font-size: 10px; font-weight: 650; }
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: #6aa477; box-shadow: 0 0 0 3px rgb(106 164 119 / 12%); }
.sidebar-bottom p { margin: 9px 0 0; color: #929a91; font-size: 10px; line-height: 1.5; }

.thread-list-pane { display: flex; min-width: 0; min-height: 0; flex-direction: column; border-right: 1px solid var(--line); background: #fbfcf8; }
.list-heading { display: flex; align-items: center; justify-content: space-between; padding: 25px 21px 18px; }
.list-heading .eyebrow { margin-bottom: 5px; }
.list-heading h1 { margin: 0; color: var(--forest-deep); font-family: Georgia, "Times New Roman", serif; font-size: 25px; font-weight: 500; letter-spacing: -.03em; }
.search-box { display: flex; height: 38px; align-items: center; gap: 8px; margin: 0 18px 15px; padding: 0 10px; border: 1px solid var(--line); border-radius: 9px; background: #f5f7f2; color: #79867b; }
.search-box > span:first-child { font-size: 18px; }
.search-box input { width: 100%; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--ink); font-size: 11px; }
.search-box input::placeholder { color: #9aa29a; }
.search-box kbd { padding: 2px 5px; border: 1px solid var(--line); border-radius: 4px; color: #98a098; font-size: 9px; }
.thread-list { min-height: 0; flex: 1; overflow: auto; padding: 0 9px 12px; }
.thread-card { display: grid; width: 100%; gap: 5px; padding: 14px 13px 13px; border: 1px solid transparent; border-bottom-color: var(--line); border-radius: 10px; background: transparent; cursor: pointer; text-align: left; transition: background .15s ease, border-color .15s ease; }
.thread-card:hover { border-color: var(--line); background: #fff; }
.thread-card.is-selected { border-color: #dce5dc; background: #edf2ec; }
.thread-card.is-unread .thread-sender, .thread-card.is-unread .thread-subject { color: var(--forest-deep); font-weight: 760; }
.thread-row { display: flex; min-width: 0; align-items: center; justify-content: space-between; gap: 8px; }
.thread-sender { min-width: 0; overflow: hidden; color: #59645b; font-size: 11px; font-weight: 620; text-overflow: ellipsis; white-space: nowrap; }
.thread-time { flex: 0 0 auto; color: #98a199; font-size: 9px; }
.thread-subject { overflow: hidden; color: #3d4840; font-size: 11px; font-weight: 620; text-overflow: ellipsis; white-space: nowrap; }
.thread-meta { display: flex; align-items: center; gap: 6px; color: #98a199; font-size: 9px; }
.thread-unread-dot { width: 6px; height: 6px; border-radius: 50%; background: #d99048; }
.thread-attachment { color: #708576; font-size: 12px; }
.thread-count { margin-left: auto; }
.list-status { margin: 0 18px 11px; padding: 9px 10px; border: 1px solid #eedbc6; border-radius: 8px; background: #fbf3e9; color: #805c37; font-size: 11px; line-height: 1.5; }
.list-empty { display: grid; min-height: 190px; place-items: center; padding: 25px; color: #8b958d; font-size: 12px; text-align: center; line-height: 1.6; }
.load-more-wrap { padding: 4px 12px 14px; text-align: center; }
.mobile-compose { display: none; }

.thread-pane { min-width: 0; min-height: 0; overflow: hidden; background: #fff; }
.empty-thread { display: flex; height: 100%; min-height: 420px; flex-direction: column; align-items: center; justify-content: center; padding: 28px; text-align: center; }
.empty-thread h2 { margin: 4px 0 7px; color: var(--forest-deep); font-family: Georgia, "Times New Roman", serif; font-size: 27px; font-weight: 500; letter-spacing: -.025em; }
.empty-thread > p:last-child { margin: 0; color: #879188; font-size: 12px; }
.empty-illustration { position: relative; display: grid; width: 86px; height: 72px; place-items: center; margin-bottom: 28px; border: 1px solid #e8eee7; border-radius: 22px; background: #f7f9f5; color: var(--forest); transform: rotate(-3deg); }
.empty-illustration > span { font-size: 35px; }
.empty-illustration > i { position: absolute; right: -18px; width: 13px; height: 1px; background: #d5dfd4; }
.empty-illustration > i:nth-of-type(1) { top: 11px; }
.empty-illustration > i:nth-of-type(2) { top: 18px; right: -13px; width: 8px; }
.empty-illustration > i:nth-of-type(3) { bottom: 12px; left: -14px; width: 10px; }
.thread-view { display: flex; height: 100%; min-height: 0; flex-direction: column; }
.thread-toolbar { display: flex; height: 58px; flex: 0 0 58px; align-items: center; gap: 5px; padding: 0 24px; border-bottom: 1px solid var(--line); }
.thread-toolbar-spacer { flex: 1; }
.thread-toolbar .icon-button { width: 34px; height: 34px; font-size: 16px; }
.danger-icon:hover { color: var(--danger); }
.back-button { display: none; }
.thread-heading { padding: 26px 34px 19px; border-bottom: 1px solid #f0f2ee; }
.thread-heading .eyebrow { margin: 0 0 8px; }
.thread-heading h2 { margin: 0; color: var(--forest-deep); font-family: Georgia, "Times New Roman", serif; font-size: clamp(23px, 2vw, 30px); font-weight: 500; letter-spacing: -.035em; line-height: 1.16; overflow-wrap: anywhere; }
.thread-summary { margin: 11px 0 0; color: #7c877e; font-size: 11px; }
.message-list { min-height: 100px; flex: 1; overflow: auto; padding: 4px 34px 20px; }
.message-card { padding: 21px 0 24px; border-bottom: 1px solid var(--line); }
.message-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }
.message-from { display: flex; min-width: 0; align-items: center; gap: 11px; }
.message-avatar { display: grid; width: 34px; height: 34px; flex: 0 0 auto; place-items: center; border-radius: 50%; background: #e8eee8; color: var(--forest); font-family: Georgia, "Times New Roman", serif; font-size: 15px; font-weight: 650; text-transform: uppercase; }
.message-card.outbound .message-avatar { background: #f6ebdc; color: #8a6339; }
.message-from-copy { display: flex; min-width: 0; flex-direction: column; gap: 3px; }
.message-from-copy strong { overflow: hidden; color: #38443b; font-size: 11px; font-weight: 710; text-overflow: ellipsis; white-space: nowrap; }
.message-from-copy span { overflow: hidden; color: #89948b; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.message-date { padding-top: 3px; color: #98a199; font-size: 9px; white-space: nowrap; }
.message-body { margin: 18px 0 0 45px; color: #354139; font-size: 12px; line-height: 1.75; overflow-wrap: anywhere; white-space: pre-wrap; }
.message-details { margin: 10px 0 0 45px; color: #849087; font-size: 10px; }
.message-details summary { width: fit-content; cursor: pointer; }
.message-details p { margin: 7px 0 0; overflow-wrap: anywhere; }
.attachment-list { display: flex; flex-wrap: wrap; gap: 7px; margin: 15px 0 0 45px; padding: 0; list-style: none; }
.attachment-list a { display: inline-flex; max-width: 100%; align-items: center; gap: 7px; padding: 7px 10px; border: 1px solid var(--line); border-radius: 8px; color: var(--forest); font-size: 10px; text-decoration: none; }
.attachment-list a:hover { background: var(--forest-soft); }
.reply-composer { margin: 17px 34px 22px; padding: 14px 16px 12px; border: 1px solid var(--line-strong); border-radius: 12px; background: #fcfdf9; box-shadow: 0 4px 14px rgb(23 59 49 / 4%); }
.reply-label { display: flex; align-items: center; gap: 9px; margin-bottom: 10px; }
.reply-avatar { display: grid; width: 25px; height: 25px; place-items: center; border-radius: 50%; background: var(--forest); color: #fff; font-family: Georgia, "Times New Roman", serif; font-size: 12px; }
.reply-label div { display: flex; flex-direction: column; gap: 2px; }
.reply-label strong { color: #4f5d53; font-size: 10px; }
.reply-label small { color: #8d978e; font-size: 9px; }
.reply-composer textarea { min-height: 85px; padding: 8px 3px; resize: vertical; border: 0; border-radius: 0; background: transparent; font-size: 12px; line-height: 1.6; }
.reply-composer textarea:focus { box-shadow: none; }
.reply-composer textarea::placeholder, .dialog-card textarea::placeholder { color: #a2aaa3; }
.composer-footer { display: flex; min-height: 37px; align-items: center; gap: 10px; padding-top: 8px; border-top: 1px solid #edf0eb; }
.attach-button { position: relative; display: inline-flex; min-height: 32px; align-items: center; gap: 6px; color: #76847a; cursor: pointer; font-size: 10px; font-weight: 650; }
.attach-button > span:first-child { font-size: 18px; }
.attach-button input { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); }
.attach-button:focus-within { outline: 3px solid rgb(217 144 72 / 60%); outline-offset: 2px; }
.attachment-hint { min-width: 0; overflow: hidden; color: #8a958c; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.attachment-hint.is-error { color: var(--danger); }
.send-button { min-height: 34px; margin-left: auto; padding: 0 11px; border-radius: 8px; font-size: 10px; }
.send-button > span:last-child { font-size: 14px; }

.mobile-nav { display: none; }
.mail-dialog { width: min(100% - 28px, 560px); max-width: none; max-height: min(92svh, 760px); padding: 0; overflow: auto; border: 1px solid var(--line-strong); border-radius: 18px; background: #fff; box-shadow: var(--shadow); }
.mail-dialog::backdrop { background: rgb(16 35 27 / 42%); backdrop-filter: blur(4px); }
.dialog-card { display: grid; gap: 15px; padding: 25px; }
.dialog-header { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 1px; }
.dialog-header .eyebrow { margin-bottom: 4px; }
.dialog-header h2 { margin: 0; color: var(--forest-deep); font-family: Georgia, "Times New Roman", serif; font-size: 25px; font-weight: 500; }
.dialog-card label:not(.attach-button) { display: grid; gap: 7px; }
.dialog-card input, .dialog-card textarea { font-size: 12px; font-weight: 450; }
.dialog-card textarea { min-height: 110px; padding: 11px 12px; resize: vertical; line-height: 1.6; }
.dialog-card .cc-fields { margin-top: -5px; color: var(--moss); font-size: 10px; }
.cc-fields summary { width: fit-content; cursor: pointer; }
.cc-fields label { margin-top: 12px; }
.dialog-footer { justify-content: flex-end; }
.dialog-footer .attach-button { margin-right: auto; }
.dialog-note, .dialog-intro { margin: -5px 0 0; color: #859087; font-size: 10px; line-height: 1.6; }
.toast { position: fixed; z-index: 10; right: 20px; bottom: 20px; max-width: min(420px, calc(100vw - 40px)); padding: 12px 16px; border: 1px solid #d8e2d7; border-radius: 10px; background: var(--forest); color: #fff; box-shadow: 0 12px 32px rgb(16 43 36 / 20%); font-size: 12px; line-height: 1.45; }

@media (max-width: 1080px) {
  .mail-layout { grid-template-columns: 185px minmax(270px, 320px) minmax(0, 1fr); }
  .folder-sidebar { padding-right: 11px; padding-left: 11px; }
  .thread-heading { padding-right: 24px; padding-left: 24px; }
  .message-list { padding-right: 24px; padding-left: 24px; }
  .reply-composer { margin-right: 24px; margin-left: 24px; }
}

@media (max-width: 760px) {
  .mail-app { height: 100svh; min-height: 100svh; }
  .topbar { height: 62px; flex-basis: 62px; gap: 8px; padding: 0 13px; }
  .brand { min-width: 0; gap: 8px; }
  .brand img { width: 34px; height: 34px; }
  .brand strong { font-size: 15px; }
  .brand small { font-size: 7px; }
  .topbar-account { width: auto; min-width: 0; max-width: 48vw; gap: 4px; margin: 0 0 0 auto; }
  .topbar-account select { height: 35px; padding-left: 8px; font-size: 10px; }
  .add-inbox-button { width: 30px; height: 30px; }
  .topbar-actions { gap: 2px; }
  #refreshButton { width: 32px; height: 34px; }
  .logout-button { display: none; }
  .mail-layout { position: relative; display: block; min-height: 0; flex: 1; }
  .folder-sidebar { display: none; }
  .thread-list-pane { height: 100%; border-right: 0; }
  .list-heading { padding: 20px 18px 15px; }
  .list-heading h1 { font-size: 24px; }
  .mobile-compose { display: inline-grid; color: var(--forest); }
  .search-box { margin-right: 14px; margin-left: 14px; }
  .thread-list { padding-right: 10px; padding-left: 10px; }
  .thread-card { padding: 14px 12px; }
  .thread-card:hover { background: transparent; }
  .thread-pane { display: none; height: 100%; }
  .mail-layout.thread-active .thread-list-pane { display: none; }
  .mail-layout.thread-active .thread-pane { display: block; }
  .thread-view { height: 100%; }
  .thread-toolbar { height: 48px; flex-basis: 48px; gap: 2px; padding: 0 10px; }
  .thread-toolbar .icon-button { width: 34px; height: 34px; }
  .back-button { display: inline-grid; }
  .thread-heading { padding: 18px 17px 15px; }
  .thread-heading h2 { font-size: 23px; }
  .message-list { padding: 0 17px 12px; }
  .message-card { padding: 17px 0 19px; }
  .message-body { margin-left: 0; font-size: 12px; }
  .message-details, .attachment-list { margin-left: 0; }
  .reply-composer { margin: 10px 12px 10px; padding: 12px; }
  .reply-composer textarea { min-height: 72px; }
  .mobile-nav { display: grid; height: calc(59px + env(safe-area-inset-bottom)); flex: 0 0 calc(59px + env(safe-area-inset-bottom)); grid-template-columns: repeat(5, 1fr); padding: 5px 6px env(safe-area-inset-bottom); border-top: 1px solid var(--line); background: rgb(255 255 255 / 97%); }
  .mobile-folder { display: flex; min-width: 0; flex-direction: column; align-items: center; justify-content: center; gap: 2px; border: 0; border-radius: 8px; background: transparent; color: #879188; cursor: pointer; }
  .mobile-folder > span { font-size: 18px; line-height: 1; }
  .mobile-folder > small { font-size: 8px; font-weight: 650; }
  .mobile-folder.is-active { color: var(--forest); }
  .mail-layout.thread-active + .mobile-nav { display: none; }
  .empty-thread { min-height: 100%; }
}

@media (max-width: 420px) {
  .brand strong { font-size: 13px; }
  .brand small { letter-spacing: .13em; }
  .topbar { padding-right: 8px; padding-left: 9px; }
  .topbar-account { max-width: 44vw; }
  .topbar-account select { max-width: 100%; }
  .add-inbox-button { display: none; }
  .thread-time { font-size: 8px; }
  .thread-toolbar { padding-right: 7px; padding-left: 7px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}

body { background: var(--paper); }
input, textarea, select { color-scheme: dark; }
button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible, summary:focus-visible, a:focus-visible {
  outline-color: rgb(255 83 102 / 82%);
}

.login-screen {
  background:
    radial-gradient(ellipse at 8% 12%, rgb(225 39 60 / 17%), transparent 36%),
    radial-gradient(ellipse at 94% 87%, rgb(225 39 60 / 10%), transparent 38%),
    repeating-linear-gradient(90deg, transparent 0 35px, rgb(255 58 77 / 3%) 35px 36px),
    repeating-linear-gradient(0deg, rgb(255 255 255 / 2%) 0 1px, transparent 1px 5px),
    var(--paper);
}
.login-card { border-color: var(--line-strong); background: rgb(17 17 22 / 96%); }
.stack-form label, .dialog-card label { color: var(--text-soft); }
.stack-form input, .dialog-card input, .dialog-card textarea, .reply-composer textarea { background: var(--surface-inset); }
.stack-form input:focus, .dialog-card input:focus, .dialog-card textarea:focus, .reply-composer textarea:focus { box-shadow: 0 0 0 3px rgb(255 83 102 / 17%); }
.login-footnote { color: var(--text-dim); }
.button-primary { background: #c92c40; box-shadow: 0 5px 18px rgb(201 44 64 / 22%); }
.button-primary:hover { background: #a91f32; }
.button-secondary { color: var(--forest); background: var(--surface-raised); }
.button-secondary:hover { background: #262027; }
.text-button:hover { color: var(--forest-deep); }

.mail-app { background: var(--paper-bright); }
.topbar { border-bottom-color: var(--line); background: var(--surface); }
.brand { color: var(--forest); }
.topbar-account select { border-color: var(--line-strong); background-color: var(--surface-raised); color: var(--ink); }
.icon-button { color: var(--text-soft); }
.icon-button:hover { border-color: var(--line-strong); background: var(--surface-hover); color: var(--forest); }
.add-inbox-button { color: var(--forest); }
.folder-sidebar {
  background:
    linear-gradient(180deg, rgb(255 55 74 / 4%), transparent 45%),
    repeating-linear-gradient(90deg, transparent 0 31px, rgb(255 55 74 / 2%) 31px 32px),
    #0d0e12;
}
.nav-heading { color: var(--text-faint); }
.folder-link { color: var(--text-soft); }
.folder-link:hover { background: var(--surface-hover); color: var(--forest-deep); }
.folder-link.is-active { background: var(--forest-soft); color: var(--forest-deep); }
.nav-icon { color: var(--text-dim); }
.count-badge { color: var(--moss); }
.provider-status { color: var(--text-soft); }
.status-dot { background: #ef4658; box-shadow: 0 0 0 3px rgb(239 70 88 / 14%); }
.sidebar-bottom p { color: var(--text-dim); }

.thread-list-pane { background: #111216; }
.list-heading h1, .empty-thread h2, .thread-heading h2, .dialog-header h2 { color: var(--forest-deep); }
.search-box { border-color: var(--line); background: var(--surface-inset); color: var(--text-soft); }
.search-box input::placeholder { color: var(--text-dim); }
.search-box kbd { border-color: var(--line-strong); color: var(--text-dim); }
.thread-card:hover { border-color: var(--line-strong); background: var(--surface-raised); }
.thread-card.is-selected { border-color: var(--red-border); background: #25161b; }
.thread-card.is-unread .thread-sender, .thread-card.is-unread .thread-subject { color: var(--forest-deep); }
.thread-sender { color: var(--text-soft); }
.thread-time, .thread-meta { color: var(--text-dim); }
.thread-subject { color: #ddd5d9; }
.thread-attachment { color: var(--moss); }
.list-status { border-color: #62303a; background: #29171c; color: #ffb4bc; }
.list-empty, .empty-thread > p:last-child { color: var(--text-dim); }

.thread-pane {
  background:
    radial-gradient(ellipse at 88% 0%, rgb(255 54 75 / 4%), transparent 44%),
    #101115;
}
.empty-illustration { border-color: var(--line); background: var(--surface-raised); color: var(--forest); }
.empty-illustration > i { background: #70414a; }
.thread-heading { border-bottom-color: var(--line); }
.thread-summary { color: var(--text-dim); }
.message-card { border-bottom-color: var(--line); }
.message-avatar { background: #311820; color: #ff8792; }
.message-card.outbound .message-avatar { background: #2b1b20; color: #ffc0c6; }
.message-from-copy strong { color: #eee7ea; }
.message-from-copy span, .message-date, .message-details { color: var(--text-dim); }
.message-body { color: #e1dadd; }
.attachment-list a { color: var(--forest); }
.attachment-list a:hover { background: var(--forest-soft); }
.reply-composer { border-color: var(--line-strong); background: #15151a; box-shadow: 0 4px 18px rgb(0 0 0 / 20%); }
.reply-avatar { background: #c92c40; }
.reply-label strong { color: var(--text-soft); }
.reply-label small, .attach-button { color: var(--text-dim); }
.attach-button:focus-within { outline-color: rgb(255 83 102 / 82%); }
.reply-composer textarea::placeholder, .dialog-card textarea::placeholder { color: #777078; }
.composer-footer { border-top-color: var(--line); }
.attachment-hint { color: var(--text-dim); }

.mail-dialog { border-color: var(--line-strong); background: var(--surface); }
.mail-dialog::backdrop { background: rgb(0 0 0 / 72%); }
.dialog-card .cc-fields { color: var(--moss); }
.dialog-note, .dialog-intro { color: var(--text-dim); }
.toast { border-color: #ea5869; background: #b92539; box-shadow: 0 12px 32px rgb(0 0 0 / 38%); }

@media (max-width: 760px) {
  .mobile-compose { color: var(--forest); }
  .mobile-nav { background: rgb(18 18 22 / 98%); }
  .mobile-folder { color: var(--text-dim); }
  .mobile-folder.is-active { color: var(--forest); }
}
