[hidden] { display: none !important; }
/* WAVMail — modern webmail. Brand: WAV gradient (green → yellow → orange) on near-black. */
:root {
  --brand-1: #9be37a; --brand-2: #ffc93c; --brand-3: #ff8a3d;
  --grad: linear-gradient(120deg, var(--brand-1), var(--brand-2) 50%, var(--brand-3));
  /* Soft light ("paper"): warm off-white instead of pure white, dark-gray text instead of black, quiet borders.
     Less glare and contrast strain for long reading. */
  --accent: #e8741c; --accent-soft: rgba(232, 116, 28, .10); --accent-ink: #a8541a;
  --ai: #7c5cd6; --ai-2: #d9468f; --ai-grad: linear-gradient(120deg, #8b6fe0, #e0629f 60%, #f2944f); --ai-soft: rgba(124, 92, 214, .09);
  --bg: #efede7; --panel: #faf9f6; --panel-2: #f5f3ee; --hover: #eeebe4; --active: #f9ecdf;
  --line: #e4e0d7; --line-2: #d6d1c6;
  --ink: #2b2a27; --ink-2: #57544d; --muted: #8d887d;
  --red: #c9474b; --green: #2e8a55; --blue: #3a74c9;
  --rail: #24221f; --rail-ink: #b3ada2;
  --paper: #fdfcf9;
  --shadow: 0 1px 2px rgba(60, 50, 30, .05), 0 8px 24px rgba(60, 50, 30, .07);
  --shadow-lg: 0 24px 64px rgba(40, 32, 20, .18);
  --radius: 14px; --radius-sm: 9px;
  --row-pad: 12px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0b0b0f; --panel: #131318; --panel-2: #17171d; --hover: #1d1d24; --active: #2a1d12;
    --line: #24242c; --line-2: #31313b; --ink: #f2f2f5; --ink-2: #c4c4cc; --muted: #80808c;
    --accent-soft: rgba(255, 138, 61, .14); --accent-ink: #ffab6b; --ai-soft: rgba(139, 92, 246, .16);
    --rail: #060608; --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 8px 24px rgba(0, 0, 0, .35);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0b0b0f; --panel: #131318; --panel-2: #17171d; --hover: #1d1d24; --active: #2a1d12;
  --line: #24242c; --line-2: #31313b; --ink: #f2f2f5; --ink-2: #c4c4cc; --muted: #80808c;
  --accent-soft: rgba(255, 138, 61, .14); --accent-ink: #ffab6b; --ai-soft: rgba(139, 92, 246, .16);
  --rail: #060608; --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 8px 24px rgba(0, 0, 0, .35);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { font-family: Inter, "Segoe UI", system-ui, -apple-system, sans-serif; font-size: 14px; color: var(--ink); background: var(--bg); -webkit-font-smoothing: antialiased; overflow: hidden; }
button { font: inherit; color: inherit; cursor: pointer; }
input, select, textarea { font: inherit; color: inherit; }
a { color: var(--accent-ink); }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.tiny { font-size: 11.5px; }
.flex { flex: 1; }
.grow { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pad { padding: 16px; }
.err { color: var(--red); }
.grad { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
kbd { font-family: ui-monospace, Consolas, monospace; font-size: 11px; background: var(--hover); border: 1px solid var(--line-2); border-bottom-width: 2px; border-radius: 5px; padding: 1px 6px; color: var(--ink-2); }
.ic { width: 18px; height: 18px; flex-shrink: 0; }
svg.ic.tiny, .ic.tiny { width: 14px; height: 14px; }
.starred { color: #f5b301 !important; fill: #f5b301; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--line-2); border-radius: 10px; border: 3px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-track { background: transparent; }

/* ---------- Buttons / inputs ---------- */
.btn { display: inline-flex; align-items: center; gap: 7px; height: 36px; padding: 0 14px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--panel); font-weight: 600; font-size: 13.5px; text-decoration: none; color: var(--ink); white-space: nowrap; transition: .15s; }
.btn:hover { background: var(--hover); }
.btn:disabled { opacity: .6; cursor: default; }
.btn .ic { width: 16px; height: 16px; }
.btn.primary { background: var(--ink); color: var(--panel); border-color: transparent; }
.btn.primary:hover { filter: brightness(1.15); }
.btn.danger { background: var(--red); color: #fff; border-color: transparent; }
.btn.ghost { background: transparent; }
.btn.small { height: 30px; padding: 0 11px; font-size: 12.5px; border-radius: 9px; }
.btn.big { height: 46px; font-size: 15px; justify-content: center; border-radius: 12px; }
.btn.ai { border: 1px solid transparent; background: linear-gradient(var(--panel), var(--panel)) padding-box, var(--ai-grad) border-box; color: var(--ink); }
.btn.ai .ic { color: var(--ai); }
.btn.ai:hover { background: linear-gradient(var(--ai-soft), var(--ai-soft)) padding-box, var(--ai-grad) border-box; }
.icon-btn { display: inline-grid; place-items: center; width: 34px; height: 34px; border: 0; border-radius: 9px; background: transparent; color: var(--ink-2); transition: .12s; flex-shrink: 0; }
.icon-btn:hover { background: var(--hover); color: var(--ink); }
.icon-btn .ic { width: 18px; height: 18px; }
.link { background: none; border: 0; color: var(--accent-ink); font-weight: 600; padding: 0 4px; }
.link:hover { text-decoration: underline; }
.input { width: 100%; height: 40px; padding: 0 12px; border: 1px solid var(--line-2); border-radius: 10px; background: var(--panel); outline: none; transition: .15s; }
.input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
select.input { padding-right: 8px; }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field > span { font-size: 12.5px; font-weight: 600; color: var(--ink-2); }
.check { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ink-2); cursor: pointer; }
.check input { accent-color: var(--accent); width: 16px; height: 16px; }
.seg { display: inline-flex; background: var(--hover); border-radius: 10px; padding: 3px; gap: 2px; }
.seg button { display: inline-flex; align-items: center; gap: 6px; border: 0; background: transparent; padding: 6px 12px; border-radius: 8px; font-weight: 600; font-size: 12.5px; color: var(--ink-2); }
.seg button .ic { width: 15px; height: 15px; }
.seg button.on { background: var(--panel); color: var(--ink); box-shadow: var(--shadow); }
.chip { height: 28px; padding: 0 12px; border-radius: 99px; border: 1px solid var(--line-2); background: var(--panel); font-size: 12.5px; font-weight: 600; color: var(--ink-2); transition: .12s; }
.chip:hover { background: var(--hover); }
.chip.on { background: var(--ink); color: var(--panel); border-color: transparent; }
.chip.ai-chip { border-color: color-mix(in srgb, var(--ai) 35%, transparent); color: var(--ai); background: var(--ai-soft); }
.tag { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 99px; background: var(--hover); color: var(--ink-2); font-size: 11.5px; font-weight: 600; text-transform: capitalize; white-space: nowrap; }
.tag.red { background: rgba(229, 72, 77, .12); color: var(--red); }
.tag.green { background: rgba(47, 158, 90, .12); color: var(--green); }
.tag.orange { background: var(--accent-soft); color: var(--accent-ink); }
.spinner { width: 26px; height: 26px; border: 3px solid var(--line-2); border-top-color: var(--accent); border-radius: 50%; animation: spin .8s linear infinite; margin: 20px auto; }
.spinner.tiny { width: 14px; height: 14px; border-width: 2px; margin: 0; display: inline-block; vertical-align: -2px; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Boot + login ---------- */
.boot { height: 100vh; display: grid; place-items: center; align-content: center; gap: 10px; background: #0b0b0f; }
.boot img { width: 72px; border-radius: 18px; }
.login { display: grid; grid-template-columns: 1.1fr 1fr; height: 100vh; background: var(--panel); }
.login-art { position: relative; overflow: hidden; background: #0b0b0f; color: #fff; display: flex; align-items: center; padding: 64px; }
.orb { position: absolute; border-radius: 50%; filter: blur(70px); opacity: .55; animation: float 14s ease-in-out infinite; }
.o1 { width: 420px; height: 420px; background: #9be37a; top: -120px; left: -80px; }
.o2 { width: 380px; height: 380px; background: #ffc93c; bottom: -140px; left: 30%; animation-delay: -4s; }
.o3 { width: 340px; height: 340px; background: #ff8a3d; top: 20%; right: -120px; animation-delay: -8s; }
@keyframes float { 50% { transform: translate(30px, -30px) scale(1.08); } }
.login-pitch { position: relative; max-width: 520px; }
.login-pitch h2 { font-size: 54px; line-height: 1.05; letter-spacing: -.03em; margin: 22px 0 28px; font-weight: 800; }
.pill { display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px; border-radius: 99px; background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .18); backdrop-filter: blur(10px); font-weight: 600; font-size: 13px; }
.feature-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.feature-list li { display: flex; align-items: center; gap: 12px; font-size: 15px; color: rgba(255, 255, 255, .9); padding: 12px 16px; border-radius: 14px; background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .1); backdrop-filter: blur(12px); }
.feature-list .ic { color: #ffc93c; }
.login-side { display: grid; place-items: center; padding: 32px; }
.login-form { width: 100%; max-width: 380px; display: flex; flex-direction: column; }
.login-logo { width: 56px; height: 56px; border-radius: 14px; margin-bottom: 18px; }
.login-form h1 { font-size: 28px; letter-spacing: -.02em; margin: 0 0 6px; }
.login-form > p { margin: 0 0 24px; }
.login-form .btn.big { margin-top: 8px; }
.login-form .tiny { margin-top: 18px; text-align: center; }
.login-err { color: var(--red); font-size: 13px; min-height: 20px; margin: 4px 0; }
.pass-wrap { position: relative; }
.pass-eye { position: absolute; right: 6px; top: 6px; border: 0; background: none; color: var(--muted); padding: 5px; }

/* ---------- Shell ---------- */
.shell { display: flex; height: 100vh; }
.rail { width: 72px; background: var(--rail); display: flex; flex-direction: column; align-items: center; padding: 14px 0; gap: 6px; flex-shrink: 0; }
.rail-logo { width: 38px; height: 38px; border-radius: 11px; margin-bottom: 14px; }
.rail-btn { width: 58px; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 9px 0 7px; border: 0; border-radius: 12px; background: none; color: var(--rail-ink); font-size: 10.5px; font-weight: 600; transition: .15s; }
.rail-btn .ic { width: 21px; height: 21px; }
.rail-btn:hover { color: #fff; background: rgba(255, 255, 255, .06); }
.rail-btn.active { color: #fff; background: rgba(255, 255, 255, .1); }
.rail-btn.active .ic { color: var(--brand-2); }
.rail-space { flex: 1; }
.rail-me { border: 0; background: none; padding: 4px; margin-top: 6px; border-radius: 50%; }
.main { flex: 1; min-width: 0; height: 100vh; }
.avatar { border-radius: 50%; display: grid; place-items: center; color: #fff; font-weight: 700; flex-shrink: 0; letter-spacing: .02em; user-select: none; }

/* ---------- Mail layout ---------- */
.mail-layout, .drive-layout { display: flex; height: 100%; }
.mail-side { width: 236px; flex-shrink: 0; background: var(--bg); display: flex; flex-direction: column; padding: 16px 10px 10px; gap: 10px; }
.compose-btn { display: flex; align-items: center; gap: 10px; height: 50px; padding: 0 18px; border: 0; border-radius: 16px; background: var(--grad); color: #1a1205; font-weight: 700; font-size: 14.5px; box-shadow: 0 6px 20px rgba(255, 138, 61, .3); transition: .15s; margin: 0 4px 6px; }
.compose-btn:hover { transform: translateY(-1px); box-shadow: 0 10px 26px rgba(255, 138, 61, .38); }
.folders { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 1px; }
.folder { display: flex; align-items: center; gap: 12px; height: 38px; padding: 0 12px; border: 0; border-radius: 10px; background: none; color: var(--ink-2); font-weight: 500; text-align: left; transition: background .12s; }
.folder .ic { width: 18px; height: 18px; color: var(--muted); }
.folder:hover { background: var(--hover); }
.folder.active { background: var(--active); color: var(--ink); font-weight: 650; }
.folder.active .ic { color: var(--accent); }
.folder.drop { background: var(--accent-soft); outline: 2px dashed var(--accent); }
.f-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.f-count { font-size: 12px; font-weight: 700; color: var(--accent-ink); }
.f-count.dim { color: var(--muted); font-weight: 600; }
.f-group { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); padding: 16px 12px 6px; }
.side-foot { border-top: 1px solid var(--line); padding-top: 8px; }
.side-link { display: flex; align-items: center; gap: 10px; width: 100%; height: 36px; padding: 0 12px; border: 0; border-radius: 10px; background: none; color: var(--ink-2); font-weight: 500; }
.side-link:hover { background: var(--hover); }

.mail-list { width: 400px; flex-shrink: 0; display: flex; flex-direction: column; background: var(--panel); border-left: 1px solid var(--line); border-right: 1px solid var(--line); border-radius: 18px 0 0 0; margin-top: 8px; overflow: hidden; }
.list-head { padding: 14px 14px 8px; border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: 10px; }
.search-wrap { position: relative; display: flex; align-items: center; }
.search-wrap > .ic { position: absolute; left: 12px; color: var(--muted); width: 17px; height: 17px; pointer-events: none; }
.search { width: 100%; height: 40px; padding: 0 12px 0 38px; border: 1px solid transparent; border-radius: 12px; background: var(--hover); outline: none; transition: .15s; }
.search:focus { background: var(--panel); border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.list-title-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.list-title { display: inline; font-size: 19px; margin: 0; letter-spacing: -.01em; }
.list-count { color: var(--muted); font-size: 12.5px; margin-left: 8px; }
.list-tools { display: flex; align-items: center; gap: 6px; }
.chips { display: flex; gap: 6px; }
.bulk { display: none; align-items: center; justify-content: space-between; background: var(--accent-soft); border-radius: 10px; padding: 3px 4px 3px 10px; }
.bulk.show { display: flex; }
.bulk-actions { display: flex; }
.bulk .icon-btn { width: 30px; height: 30px; }
.items { flex: 1; overflow-y: auto; outline: none; }
.day { position: sticky; top: 0; z-index: 1; font-size: 11.5px; font-weight: 700; color: var(--muted); padding: 10px 16px 4px; background: var(--panel); text-transform: uppercase; letter-spacing: .05em; }
.row { position: relative; display: flex; gap: 12px; padding: var(--row-pad) 14px var(--row-pad) 12px; margin: 0 6px; border-radius: 12px; cursor: pointer; transition: background .1s; }
.row:hover { background: var(--hover); }
.row.active { background: var(--active); }
.row.selected { background: var(--accent-soft); }
.row.unread::before { content: ""; position: absolute; left: 2px; top: 50%; width: 5px; height: 5px; margin-top: -2.5px; border-radius: 50%; background: var(--accent); }
.av-wrap { position: relative; }
.av-wrap { width: 38px; height: 38px; }
.row-check { position: absolute; left: 50%; top: 50%; width: 18px; height: 18px; margin: -9px 0 0 -9px; opacity: 0; cursor: pointer; accent-color: var(--accent); }
.row:hover .row-check, .row.selected .row-check { opacity: 1; }
.row:hover .av-wrap .avatar, .row.selected .av-wrap .avatar { opacity: 0; }
.row-main { flex: 1; min-width: 0; }
.row-top { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.row-from { font-size: 14px; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: flex; gap: 6px; align-items: center; }
.row-date { font-size: 12px; color: var(--muted); flex-shrink: 0; }
.row-subject { font-size: 13.5px; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-top: 1px; display: flex; gap: 5px; align-items: center; }
.row-preview { font-size: 12.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-top: 2px; }
.row.unread .row-from, .row.unread .row-subject { color: var(--ink); font-weight: 700; }
.row.unread .row-date { color: var(--accent-ink); font-weight: 600; }
.row-marks { position: absolute; right: 14px; bottom: 12px; color: var(--muted); }
.flag-dot { position: absolute; right: 14px; top: 34px; color: #f5b301; }
.flag-dot .ic { width: 14px; height: 14px; fill: #f5b301; }
.row-actions { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); display: none; gap: 2px; background: var(--panel); border-radius: 10px; box-shadow: var(--shadow); padding: 2px; }
.row:hover .row-actions { display: flex; }
.row:hover .flag-dot, .row:hover .row-marks { display: none; }
.row-actions .icon-btn { width: 30px; height: 30px; }
.row-actions .icon-btn .ic { width: 16px; height: 16px; }
.compact { --row-pad: 7px; }
.compact .row-preview { display: none; }
.compact .row .avatar { width: 30px !important; height: 30px !important; font-size: 11px !important; }
.compact .av-wrap { width: 30px; height: 30px; }
.skeleton { pointer-events: none; }
.skeleton .avatar { width: 38px; height: 38px; background: var(--hover); }
.sk-lines { flex: 1; display: grid; gap: 7px; padding-top: 3px; }
.sk-lines div { height: 10px; border-radius: 6px; background: linear-gradient(90deg, var(--hover), var(--line), var(--hover)); background-size: 200% 100%; animation: shimmer 1.2s infinite; }
.sk-lines div:nth-child(1) { width: 45%; } .sk-lines div:nth-child(2) { width: 80%; } .sk-lines div:nth-child(3) { width: 65%; }
@keyframes shimmer { to { background-position: -200% 0; } }
.list-more { padding: 10px; text-align: center; }
.list-more:empty { display: none; }
.empty { display: grid; place-items: center; text-align: center; gap: 10px; padding: 60px 20px; color: var(--muted); }
.empty > .ic { width: 40px; height: 40px; color: var(--line-2); }

/* Briefing */
.briefing-slot:empty { display: none; }
.briefing { margin: 10px 10px 4px; padding: 12px 12px 8px; border-radius: 14px; background: linear-gradient(var(--panel), var(--panel)) padding-box, var(--ai-grad) border-box; border: 1.5px solid transparent; box-shadow: 0 8px 24px rgba(139, 92, 246, .12); max-height: 46vh; overflow-y: auto; }
.brief-headline { margin: 6px 0 8px; font-weight: 600; font-size: 13.5px; }
.brief-item { display: flex; align-items: center; gap: 10px; width: 100%; border: 0; background: none; padding: 8px 6px; border-radius: 10px; text-align: left; }
.brief-item:hover { background: var(--hover); }
.bi-main { flex: 1; min-width: 0; }
.bi-top { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.bi-action { font-size: 11.5px; font-weight: 700; color: var(--ai); white-space: nowrap; }

/* ---------- Reader ---------- */
.mail-reader { flex: 1; min-width: 0; display: flex; flex-direction: column; background: var(--panel); margin-top: 8px; }
.reader-actions { display: flex; align-items: center; gap: 2px; padding: 8px 14px; border-bottom: 1px solid var(--line); min-height: 52px; }
.reader-actions .sep { width: 1px; height: 22px; background: var(--line); margin: 0 6px; }
.only-mobile { display: none; }
.reader-scroll { flex: 1; overflow-y: auto; padding: 22px 30px 40px; }
.reader-empty, .reader-loading { flex: 1; display: grid; place-items: center; align-content: center; gap: 6px; color: var(--muted); text-align: center; }
.reader-empty img { width: 64px; border-radius: 16px; opacity: .9; margin-bottom: 8px; filter: grayscale(.3); }
.reader-empty h3 { margin: 0; color: var(--ink-2); }
.subject { font-size: 23px; letter-spacing: -.015em; margin: 0 0 18px; line-height: 1.25; word-break: break-word; }
.sender { display: flex; gap: 12px; align-items: flex-start; }
.sender-info { flex: 1; min-width: 0; line-height: 1.5; }
.sender-info b { font-size: 14.5px; }
.addr-full { font-size: 12.5px; }
.addr { border-bottom: 1px dotted var(--line-2); }
.when { white-space: nowrap; }
.ai-bar { display: flex; gap: 8px; margin: 18px 0 4px; flex-wrap: wrap; }
.ai-out:empty { display: none; }
.ai-card { margin: 12px 0; padding: 14px 16px; border-radius: 14px; background: linear-gradient(var(--panel-2), var(--panel-2)) padding-box, var(--ai-grad) border-box; border: 1.5px solid transparent; box-shadow: 0 6px 20px rgba(139, 92, 246, .1); animation: pop .25s ease; }
@keyframes pop { from { opacity: 0; transform: translateY(6px); } }
.ai-card-head { display: flex; align-items: center; gap: 8px; }
.ai-card-head .ic { color: var(--ai); }
.ai-card-head b { flex: 1; font-size: 13.5px; }
.ai-card-head .icon-btn { width: 28px; height: 28px; }
.ai-tags { display: flex; gap: 6px; flex-wrap: wrap; margin: 8px 0; }
.ai-lines { margin: 6px 0; padding-left: 18px; line-height: 1.6; }
.ai-sub { font-size: 11.5px; font-weight: 700; text-transform: uppercase; color: var(--muted); letter-spacing: .05em; margin: 10px 0 6px; }
.ask { display: flex; gap: 8px; align-items: baseline; padding: 3px 0; font-size: 13.5px; }
.quick-chips { display: flex; gap: 6px; flex-wrap: wrap; margin: 10px 0; }
.ai-draft { white-space: pre-wrap; line-height: 1.6; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; font-size: 13.5px; max-height: 320px; overflow-y: auto; }
.ai-checks { display: flex; gap: 6px; align-items: flex-start; margin-top: 8px; font-size: 12.5px; color: var(--accent-ink); }
.ai-card-foot { display: flex; justify-content: flex-end; margin-top: 10px; gap: 8px; }
.reader-body { margin-top: 18px; }
.paper { background: var(--paper); border-radius: 12px; border: 1px solid var(--line); overflow: hidden; }
.mail-frame { width: 100%; border: 0; display: block; min-height: 120px; background: var(--paper); }
.plain-body { white-space: normal; line-height: 1.65; font-size: 14.5px; word-break: break-word; padding: 4px 2px; }
.img-banner { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 9px 12px; margin-bottom: 10px; border-radius: 10px; background: var(--hover); font-size: 12.5px; color: var(--ink-2); }
.atts { margin-top: 22px; }
.atts-title { display: flex; align-items: center; gap: 6px; font-weight: 600; font-size: 13px; color: var(--ink-2); margin-bottom: 10px; }
.att-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.att { position: relative; display: flex; align-items: center; gap: 10px; padding: 10px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel-2); overflow: hidden; }
.att-thumb { width: 44px; height: 44px; object-fit: cover; border-radius: 8px; }
.att-icon { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 8px; background: var(--accent-soft); color: var(--accent-ink); }
.att-info { flex: 1; min-width: 0; }
.att-name { font-weight: 600; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.att-actions { display: flex; }
.att-actions .icon-btn { width: 28px; height: 28px; }
.att-actions .icon-btn .ic { width: 15px; height: 15px; }
.quick-reply { display: flex; gap: 10px; margin-top: 28px; flex-wrap: wrap; }
.qr-btn { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 18px; border-radius: 99px; border: 1px solid var(--line-2); background: var(--panel); font-weight: 600; }
.qr-btn:hover { background: var(--hover); }

/* ---------- Compose ---------- */
.compose-dock { position: fixed; right: 20px; bottom: 0; display: flex; gap: 14px; align-items: flex-end; z-index: 50; pointer-events: none; }
.compose { pointer-events: auto; width: 580px; height: min(640px, calc(100vh - 40px)); background: var(--panel); border-radius: 16px 16px 0 0; box-shadow: var(--shadow-lg); border: 1px solid var(--line); display: flex; flex-direction: column; overflow: hidden; animation: up .22s ease; }
@keyframes up { from { transform: translateY(30px); opacity: 0; } }
.compose.min { height: 46px; width: 300px; }
.compose.min .c-body { display: none; }
.compose.max { position: fixed; inset: 4vh 8vw; width: auto; height: auto; border-radius: 16px; z-index: 60; }
.compose.dropping::after { content: "Drop files to attach"; position: absolute; inset: 46px 0 0; display: grid; place-items: center; background: color-mix(in srgb, var(--accent) 12%, var(--panel)); border: 2px dashed var(--accent); font-weight: 700; color: var(--accent-ink); }
.compose { position: relative; }
.c-head { display: flex; align-items: center; gap: 8px; height: 46px; padding: 0 6px 0 16px; background: var(--rail); color: #fff; cursor: default; flex-shrink: 0; }
.c-title { flex: 1; font-weight: 600; font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.c-head .icon-btn { color: #bbb; width: 30px; height: 30px; }
.c-head .icon-btn:hover { background: rgba(255, 255, 255, .1); color: #fff; }
.c-body { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.c-row { position: relative; display: flex; align-items: flex-start; border-bottom: 1px solid var(--line); padding: 0 14px; min-height: 42px; }
.c-row > label { width: 34px; padding-top: 12px; color: var(--muted); font-size: 13px; flex-shrink: 0; }
.recip { flex: 1; display: flex; flex-wrap: wrap; gap: 5px; padding: 7px 0; cursor: text; position: relative; }
.recip-input { flex: 1; min-width: 140px; border: 0; outline: none; background: none; height: 28px; }
.token { display: inline-flex; align-items: center; gap: 4px; height: 28px; padding: 0 4px 0 10px; border-radius: 99px; background: var(--hover); border: 1px solid var(--line-2); font-size: 13px; max-width: 260px; }
.token.bad { background: rgba(229, 72, 77, .1); border-color: rgba(229, 72, 77, .4); }
.token button { border: 0; background: none; color: var(--muted); font-size: 16px; line-height: 1; padding: 0 4px; }
.cc-toggle { display: flex; gap: 4px; padding-top: 11px; }
.sugg { position: absolute; left: 0; top: 100%; z-index: 5; min-width: 300px; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-lg); padding: 4px; display: none; }
.sugg.show { display: block; }
.sugg-item { display: block; width: 100%; text-align: left; border: 0; background: none; padding: 8px 10px; border-radius: 8px; font-size: 13px; }
.sugg-item.on, .sugg-item:hover { background: var(--hover); }
.c-subject { flex: 1; border: 0; outline: none; background: none; height: 42px; font-weight: 600; font-size: 14.5px; }
.c-toolbar { display: flex; align-items: center; gap: 1px; padding: 4px 10px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.tb { position: relative; display: grid; place-items: center; width: 30px; height: 30px; border: 0; border-radius: 7px; background: none; color: var(--ink-2); }
.tb:hover { background: var(--hover); }
.tb .ic { width: 16px; height: 16px; }
.tb input[type=color] { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.tb-sep { width: 1px; height: 18px; background: var(--line); margin: 0 4px; }
.c-scroll { flex: 1; overflow-y: auto; padding: 12px 16px; }
.c-editor { min-height: 160px; outline: none; line-height: 1.6; font-size: 14.5px; }
.c-editor p { margin: 0 0 .7em; }
.c-editor blockquote { border-left: 3px solid var(--line-2); margin: 0 0 0 4px; padding-left: 12px; color: var(--ink-2); }
.c-extra { outline: none; line-height: 1.5; font-size: 13.5px; color: var(--ink-2); }
.c-extra.collapsible:not(.open) .wm-quote-head, .c-extra.collapsible:not(.open) blockquote { display: none; }
.quote-toggle { border: 1px solid var(--line-2); background: var(--hover); border-radius: 6px; height: 16px; line-height: 6px; padding: 0 6px; color: var(--muted); font-size: 12px; margin: 6px 0; }
.wm-quote-head { color: var(--muted); margin: 6px 0; font-size: 12.5px; }
.c-atts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.c-atts:empty { display: none; }
.c-att { position: relative; display: flex; align-items: center; gap: 8px; height: 36px; padding: 0 6px 0 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel-2); max-width: 260px; overflow: hidden; font-size: 13px; }
.c-att .ic { width: 16px; height: 16px; color: var(--accent-ink); }
.c-att-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.c-att button { border: 0; background: none; color: var(--muted); font-size: 16px; }
.c-att-bar { position: absolute; left: 0; bottom: 0; height: 3px; background: var(--grad); transition: width .2s; }
.c-foot { display: flex; align-items: center; gap: 4px; padding: 10px 12px; border-top: 1px solid var(--line); }
.btn.send { background: var(--grad); color: #1a1205; border: 0; height: 38px; padding: 0 20px; margin-right: 6px; box-shadow: 0 4px 14px rgba(255, 138, 61, .3); }
.save-state { margin-left: 8px; }
.c-ai { margin-bottom: 12px; padding: 10px; border-radius: 12px; background: linear-gradient(var(--panel-2), var(--panel-2)) padding-box, var(--ai-grad) border-box; border: 1.5px solid transparent; }
.c-ai-row { display: flex; align-items: center; gap: 8px; }
.c-ai-row > .ic { color: var(--ai); }
.ai-input { flex: 1; border: 0; outline: none; background: none; height: 32px; font-size: 13.5px; }
.c-ai-presets { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.c-ai-presets .chip { height: 26px; font-size: 12px; }
.ai-status { font-size: 12.5px; color: var(--ink-2); margin-top: 6px; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.ai-status:empty { display: none; }

/* ---------- Drive ---------- */
.drive-main { flex: 1; min-width: 0; display: flex; flex-direction: column; background: var(--panel); margin-top: 8px; border-radius: 18px 0 0 0; border-left: 1px solid var(--line); position: relative; }
.drive-layout.dropping .drive-main::after { content: "Drop files to upload to WAV Drive"; position: absolute; inset: 0; display: grid; place-items: center; background: color-mix(in srgb, var(--accent) 10%, transparent); border: 3px dashed var(--accent); border-radius: 18px 0 0 0; font-size: 18px; font-weight: 700; color: var(--accent-ink); pointer-events: none; }
.drive-head { padding: 14px 20px 10px; display: flex; flex-direction: column; gap: 12px; border-bottom: 1px solid var(--line); }
.drive-head .search-wrap { max-width: 640px; }
.drive-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.crumbs { display: flex; align-items: center; gap: 2px; flex-wrap: wrap; min-width: 0; }
.crumb { border: 0; background: none; font-size: 18px; font-weight: 700; padding: 4px 8px; border-radius: 8px; color: var(--ink); }
.crumb:not(:last-child) { color: var(--muted); font-weight: 600; }
.crumb:hover { background: var(--hover); }
.drive-body { flex: 1; overflow-y: auto; padding: 8px 20px 30px; transition: opacity .15s; }
.drive-body.loading { opacity: .5; }
.d-section { font-size: 12.5px; font-weight: 700; color: var(--muted); margin: 16px 2px 10px; }
.d-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; }
.folders-grid .d-card { flex-direction: row; align-items: center; padding: 0 6px 0 0; }
.folders-grid .d-thumb { display: none; }
.folders-grid .d-name-row { padding: 14px 12px; }
.d-card { position: relative; display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 14px; background: var(--panel-2); cursor: pointer; transition: .15s; overflow: hidden; outline: none; }
.d-card:hover, .d-card:focus { border-color: var(--line-2); box-shadow: var(--shadow); transform: translateY(-1px); }
.d-card.drop, .d-tr.drop { outline: 2px dashed var(--accent); background: var(--accent-soft); }
.d-thumb { height: 128px; display: grid; place-items: center; background: var(--hover); color: var(--muted); overflow: hidden; }
.d-thumb img { width: 100%; height: 100%; object-fit: cover; }
.d-thumb .ic { width: 42px; height: 42px; }
.d-thumb.t-file-text .ic { color: #e5484d; } .d-thumb.t-file-spreadsheet .ic { color: #2f9e5a; } .d-thumb.t-file-type .ic { color: #3b82f6; } .d-thumb.t-presentation .ic { color: #f07a1a; } .d-thumb.t-music .ic { color: #8b5cf6; } .d-thumb.t-film .ic { color: #ec4899; }
.d-name-row { display: flex; align-items: center; gap: 7px; padding: 8px 4px 2px 12px; }
.d-name-row > .ic { color: var(--accent); }
.d-name { flex: 1; min-width: 0; font-weight: 600; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.d-name-row .icon-btn { width: 28px; height: 28px; opacity: 0; }
.d-card:hover .icon-btn { opacity: 1; }
.d-meta { font-size: 11.5px; color: var(--muted); padding: 0 12px 10px; }
.d-table { display: flex; flex-direction: column; }
.d-tr { display: grid; grid-template-columns: 1fr 140px 90px 40px; align-items: center; gap: 10px; padding: 6px 10px; border-radius: 10px; cursor: pointer; font-size: 13.5px; }
.d-tr:hover { background: var(--hover); }
.d-th { font-size: 12px; font-weight: 700; color: var(--muted); cursor: default; border-bottom: 1px solid var(--line); border-radius: 0; }
.d-th:hover { background: none; }
.d-cell-name { display: flex; align-items: center; gap: 10px; min-width: 0; font-weight: 500; }
.d-cell-name span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.folder-ic { color: var(--accent); }
.drive-empty > .ic { width: 56px; height: 56px; }
.storage { padding: 8px 10px; }
.storage-label { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--ink-2); margin-bottom: 8px; }
.storage-label .ic { width: 16px; height: 16px; color: var(--muted); }
.storage-bar { height: 6px; border-radius: 6px; background: var(--line); overflow: hidden; }
.storage-bar div { height: 100%; background: var(--grad); border-radius: 6px; }
.storage-bar div.full { background: var(--red); }
.upload-list { position: absolute; right: 20px; bottom: 20px; display: flex; flex-direction: column; gap: 8px; width: 320px; z-index: 5; }
.up-item { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 12px; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); font-size: 13px; }
.up-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.up-track { width: 100%; height: 4px; background: var(--line); border-radius: 4px; overflow: hidden; }
.up-bar { height: 100%; width: 0; background: var(--grad); transition: width .2s; }
.up-item.done .up-bar { background: var(--green); }
.up-item.failed .up-bar { background: var(--red); }

/* Preview */
.modal.wide.preview-modal { width: min(1200px, 96vw); }
.preview { display: grid; grid-template-columns: 1fr; gap: 16px; height: min(72vh, 820px); }
.preview.with-ai { grid-template-columns: 1fr 340px; }
.pv-main { display: grid; place-items: center; background: var(--hover); border-radius: 12px; overflow: hidden; min-height: 0; }
.pv-img { max-width: 100%; max-height: 100%; object-fit: contain; }
.pv-frame { width: 100%; height: 100%; border: 0; background: #fff; }
.pv-media { max-width: 100%; max-height: 100%; }
.pv-audio { display: grid; place-items: center; gap: 16px; }
.pv-audio .ic { width: 64px; height: 64px; color: var(--ai); }
.pv-text { width: 100%; height: 100%; margin: 0; padding: 16px; overflow: auto; font-size: 12.5px; white-space: pre-wrap; align-self: start; }
.pv-none { text-align: center; color: var(--muted); display: grid; gap: 10px; place-items: center; }
.pv-none .ic { width: 56px; height: 56px; }
.pv-ai { display: flex; flex-direction: column; min-height: 0; border-radius: 12px; border: 1.5px solid transparent; background: linear-gradient(var(--panel-2), var(--panel-2)) padding-box, var(--ai-grad) border-box; padding: 12px; }
.pv-ai-head { display: flex; gap: 8px; align-items: center; margin-bottom: 8px; }
.pv-ai-head .ic { color: var(--ai); }
.pv-ai-out { flex: 1; overflow-y: auto; font-size: 13.5px; line-height: 1.55; }
.pv-ai-out ul, .pv-ai-out ol { padding-left: 18px; margin: 6px 0; }
.pv-ai-out p { margin: 6px 0; }
.pv-ai-out h4 { margin: 10px 0 4px; }
.pv-q { margin: 10px 0 6px; padding: 8px 12px; border-radius: 12px 12px 4px 12px; background: var(--ink); color: var(--panel); font-weight: 500; margin-left: 30px; }
.pv-a { padding: 2px 2px 8px; }
.pv-ai-presets { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; }
.pv-ai-presets .chip { height: 26px; font-size: 11.5px; }
.pv-ai-input { display: flex; gap: 6px; }

/* Pickers */
.pick-list { max-height: 50vh; overflow-y: auto; border: 1px solid var(--line); border-radius: 12px; padding: 4px; margin-top: 10px; display: flex; flex-direction: column; }
.pick-row { display: flex; align-items: center; gap: 10px; width: 100%; height: 38px; padding: 0 12px; border: 0; background: none; border-radius: 8px; text-align: left; cursor: pointer; font-size: 13.5px; }
.pick-row:hover { background: var(--hover); }
.pick-row.on { background: var(--active); font-weight: 600; }
.pick-row .ic { color: var(--accent); width: 17px; height: 17px; }
.pick-row input { accent-color: var(--accent); }
.ic.push { margin-left: auto; color: var(--muted); }
.modal .crumbs { margin-top: 10px; }
.modal .crumb { font-size: 13.5px; }

/* ---------- Modal / menu / toast ---------- */
.modal-back { position: fixed; inset: 0; background: rgba(8, 8, 14, .5); backdrop-filter: blur(4px); display: grid; place-items: center; z-index: 100; animation: fade .15s; padding: 16px; }
.modal-back.out { opacity: 0; transition: opacity .18s; }
@keyframes fade { from { opacity: 0; } }
.modal { width: min(460px, 100%); max-height: calc(100vh - 32px); display: flex; flex-direction: column; background: var(--panel); border-radius: 18px; box-shadow: var(--shadow-lg); border: 1px solid var(--line); animation: pop .2s ease; }
.modal.wide { width: min(760px, 100%); }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 16px 6px 22px; }
.modal-head h2 { margin: 0; font-size: 17px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.modal-body { padding: 10px 22px 14px; overflow-y: auto; }
.modal-body > p { margin-top: 0; line-height: 1.5; }
.modal-foot { display: flex; justify-content: flex-end; align-items: center; gap: 8px; padding: 12px 18px 18px; }
.modal-foot > span:first-child { margin-right: auto; }
.settings { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 28px; }
.settings section:last-child { grid-column: 1 / -1; }
.settings h3 { font-size: 13px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin: 8px 0 12px; display: flex; align-items: center; justify-content: space-between; }
.sig-editor { min-height: 110px; border: 1px solid var(--line-2); border-radius: 10px; padding: 12px; outline: none; background: var(--panel); line-height: 1.5; }
.sig-editor:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.keys { display: grid; gap: 6px; }
.key-row { display: flex; align-items: center; gap: 14px; }
.key-row kbd { min-width: 110px; text-align: center; }
.menu { position: fixed; z-index: 200; min-width: 210px; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-lg); padding: 5px; animation: pop .12s ease; }
.menu-item { display: flex; align-items: center; gap: 10px; width: 100%; height: 36px; padding: 0 10px; border: 0; background: none; border-radius: 8px; text-align: left; font-size: 13.5px; }
.menu-item span { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.menu-item .ic { width: 16px; height: 16px; color: var(--muted); }
.menu-item:hover { background: var(--hover); }
.menu-item.danger, .menu-item.danger .ic { color: var(--red); }
.menu-sep { height: 1px; background: var(--line); margin: 4px 6px; }
#toasts { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); display: flex; flex-direction: column; gap: 8px; align-items: center; z-index: 300; pointer-events: none; }
.toast { pointer-events: auto; display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 8px 8px 8px 16px; border-radius: 12px; background: #17171c; color: #f2f2f5; box-shadow: var(--shadow-lg); font-size: 13.5px; max-width: min(560px, 92vw); animation: up .2s ease; }
.toast.out { opacity: 0; transform: translateY(10px); transition: .25s; }
.toast.error { background: #3a1316; border: 1px solid #6b2025; }
.toast.success::before { content: "✓"; color: var(--brand-1); font-weight: 800; }
.toast-action { border: 0; background: none; color: var(--brand-2); font-weight: 700; padding: 6px 8px; border-radius: 8px; }
.toast-action:hover { background: rgba(255, 255, 255, .08); }
.toast-x { border: 0; background: none; color: #888; font-size: 18px; padding: 0 6px; }

/* ---------- Responsive ---------- */
@media (max-width: 1200px) { .mail-list { width: 340px; } .mail-side { width: 210px; } }
@media (max-width: 980px) {
  .mail-side { display: none; }
  .mail-list { flex: 1; width: auto; border-radius: 0; margin: 0; border: 0; }
  .mail-reader { display: none; margin: 0; }
  .mail-layout.reading .mail-list { display: none; }
  .mail-layout.reading .mail-reader { display: flex; }
  .only-mobile { display: inline-grid; }
  .drive-side { display: none; }
  .drive-main { margin: 0; border-radius: 0; border: 0; }
  .login { grid-template-columns: 1fr; }
  .login-art { display: none; }
}
@media (max-width: 640px) {
  body { font-size: 15px; }
  .shell { flex-direction: column-reverse; }
  .rail { width: 100%; height: 62px; flex-direction: row; justify-content: space-around; padding: 0 6px env(safe-area-inset-bottom); }
  .rail-logo, .rail-space, .rail-btn[title="Keyboard shortcuts"] { display: none; }
  .rail-btn { width: auto; flex: 1; }
  .main { height: calc(100vh - 62px); }
  .mail-list::after { content: ""; }
  .list-head { padding: 10px 16px 8px; }
  .row { margin: 0; border-radius: 0; padding-left: 16px; padding-right: 16px; }
  .row-actions { display: none !important; }
  .reader-scroll { padding: 16px 16px 30px; }
  .subject { font-size: 20px; }
  .compose-dock { right: 0; left: 0; }
  .compose, .compose.max { position: fixed; inset: 0; width: 100%; height: 100%; border-radius: 0; }
  .compose.min { inset: auto 0 62px 0; height: 46px; width: 100%; }
  .settings { grid-template-columns: 1fr; }
  .preview.with-ai { grid-template-columns: 1fr; grid-template-rows: 1fr 280px; height: 80vh; }
  .d-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
  .d-tr { grid-template-columns: 1fr 40px; }
  .d-tr > :nth-child(2), .d-tr > :nth-child(3) { display: none; }
  .drive-head, .drive-body { padding-left: 16px; padding-right: 16px; }
  .upload-list { left: 16px; right: 16px; width: auto; }
}
.mobile-fab { display: none; position: absolute; right: 18px; bottom: 18px; width: 56px; height: 56px; border-radius: 18px; border: 0; background: var(--grad); color: #1a1205; place-items: center; box-shadow: 0 8px 24px rgba(255, 138, 61, .4); z-index: 3; }
.mobile-fab .ic { width: 24px; height: 24px; }
.title-wrap { display: flex; align-items: center; gap: 4px; min-width: 0; }
@media (max-width: 980px) { .mail-list { position: relative; } .mobile-fab { display: grid; } }


/* ======================= All-light theme (no black surfaces) ======================= */
:root, :root[data-theme="light"], :root[data-theme="dark"] { color-scheme: light; --rail: #f6f4ef; --rail-ink: #77726a; --primary: #c95a14; --primary-hover: #b44f10; }
.boot { background: var(--bg); }
/* Left bar */
.rail { background: var(--rail); border-right: 1px solid var(--line); }
.rail-logo { width: 40px; height: 40px; border-radius: 0; object-fit: contain; }
.rail-btn { color: var(--rail-ink); }
.rail-btn:hover { color: var(--ink); background: rgba(60, 50, 30, .06); }
.rail-btn.active { color: var(--ink); background: var(--panel); box-shadow: var(--shadow); }
.rail-btn.active .ic { color: var(--accent); }
/* Buttons and chips: warm orange instead of black */
.btn.primary { background: var(--primary); color: #fff; border-color: transparent; }
.btn.primary:hover { background: var(--primary-hover); filter: none; }
.chip.on { background: var(--accent-soft); color: var(--accent-ink); border-color: color-mix(in srgb, var(--accent) 45%, transparent); }
.cat-chip.on { box-shadow: inset 0 0 0 1.5px currentColor; }
/* Composer header */
.c-head { background: var(--panel-2); color: var(--ink); border-bottom: 1px solid var(--line); }
.c-head .icon-btn { color: var(--muted); }
.c-head .icon-btn:hover { background: var(--hover); color: var(--ink); }
.send-split .btn.send-more { border-left: 1px solid rgba(255, 255, 255, .35); }
/* Notifications (toasts) */
.toast { background: var(--panel); color: var(--ink); border: 1px solid var(--line); box-shadow: var(--shadow-lg); }
.toast.error { background: #fdf0ef; border-color: #f0c9c7; color: #8f2a2d; }
.toast.success::before { color: var(--green); }
.toast-action { color: var(--accent-ink); }
.toast-action:hover { background: var(--hover); }
.toast-x { color: var(--muted); }
/* Drive AI chat bubble */
.pv-q { background: var(--accent-soft); color: var(--ink); }
/* Sign-in page */
.login-art { background: linear-gradient(160deg, #fbf7ee, #f4efe4); color: var(--ink); }
.orb { opacity: .28; }
.login-pitch h2 { color: var(--ink); }
.pill { background: rgba(255, 255, 255, .75); border-color: var(--line); color: var(--ink-2); }
.feature-list li { background: rgba(255, 255, 255, .7); border-color: var(--line); color: var(--ink-2); }
.feature-list .ic { color: var(--accent); }
.login-logo { width: 60px; height: 60px; border-radius: 0; object-fit: contain; }
.reader-empty img { width: 70px; height: 70px; border-radius: 0; object-fit: contain; filter: none; opacity: 1; }

/* ======================= Sign-in: curved premium panel ======================= */
.login { grid-template-columns: 1.15fr 1fr; background: linear-gradient(160deg, #fbf7ee, #f4efe4); }
.login-side {
  position: relative; z-index: 1;
  background: #ffffff;
  margin-left: -72px;                      /* overlap the art so the curve sits on top of it */
  border-radius: 72px 0 0 72px;            /* big soft curve on the left edge */
  box-shadow: -30px 0 80px rgba(120, 80, 30, .10), -2px 0 0 rgba(255, 255, 255, .8);
}
/* thin brand-gradient line that follows the curve */
.login-side::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; padding-left: 3px; pointer-events: none;
  background: linear-gradient(180deg, var(--brand-1), var(--brand-2) 50%, var(--brand-3));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude;
  opacity: .55;
}
.login-form { max-width: 400px; }
.login-form h1 { font-size: 32px; letter-spacing: -.025em; }
.login-form .input { height: 46px; border-radius: 12px; background: #fcfbf8; }
.login-form .btn.big { height: 50px; border-radius: 14px; font-size: 15.5px; box-shadow: 0 10px 24px rgba(201, 90, 20, .25); }
.login-logo { width: 64px; height: 64px; margin-bottom: 22px; }
.login-art { padding: 64px 120px 64px 72px; }
@media (max-width: 980px) {
  .login { background: #fff; }
  .login-side { margin-left: 0; border-radius: 0; box-shadow: none; }
  .login-side::before { display: none; }
}
