:root {
  color-scheme: light;
  --bg:#f6f8fc;
  --surface:#ffffff;
  --surface-2:#f1f5fb;
  --surface-3:#eaf0f8;
  --line:#e3e9f3;
  --line-strong:#cfd8e8;
  --text:#0f172a;
  --text-2:#334155;
  --muted:#5f6f84;
  --primary:#2563eb;
  --primary-600:#1d4ed8;
  --primary-50:#eff6ff;
  --primary-100:#dbeafe;
  --accent:#10b981;
  --accent-600:#059669;
  --warn:#f59e0b;
  --danger:#ef4444;
  --shadow-sm:0 1px 2px rgba(15,23,42,.06);
  --shadow-md:0 8px 24px rgba(15,23,42,.08);
  --shadow-lg:0 24px 60px rgba(37,99,235,.14);
  --radius-card:18px;
  --radius-btn:12px;
  --motion-fast:180ms;
  --motion-normal:220ms;
  --motion-ease:cubic-bezier(.2,.8,.2,1);
  --font:Inter,"Plus Jakarta Sans",ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;

  /* Compatibility aliases for existing templates/components. */
  --page-bg:var(--bg);
  --surface-1:var(--surface);
  --surface-elevated:var(--surface);
  --surface-main:var(--surface);
  --surface-secondary:var(--surface-2);
  --surface-hover:var(--surface-2);
  --card:var(--surface);
  --card-bg:var(--surface);
  --card-solid:var(--surface);
  --card-soft:var(--surface-2);
  --card-bg-hover:var(--surface-2);
  --card-bg-active:var(--primary-50);
  --border-soft:var(--line);
  --border-default:var(--line);
  --border-strong:var(--line-strong);
  --text-primary:var(--text);
  --text-secondary:var(--text-2);
  --text-muted:var(--muted);
  --text-faint:var(--muted);
  --input-bg:var(--surface);
  --input-border:var(--line-strong);
  --input-border-focus:var(--primary);
  --accent-hover:var(--primary-600);
  --accent-soft:var(--primary-50);
  --accent-border:rgba(37,99,235,.42);
  --accent-border-soft:rgba(37,99,235,.32);
  --accent-surface:var(--primary-50);
  --accent-ring:0 0 0 3px rgba(37,99,235,.12);
  --accent-ink:#fff;
  --danger-bg:#fef2f2;
  --success:var(--accent);
  --warning:var(--warn);
  --info:var(--primary);
  --radius-sm:10px;
  --radius-md:14px;
  --radius-lg:18px;
  --radius-xl:22px;
  --shadow:var(--shadow-md);
  --shadow-soft:var(--shadow-sm);
}

* { box-sizing:border-box; }
html { min-width:0; min-height:100%; scroll-behavior:smooth; background:var(--bg); }
body {
  position:relative;
  isolation:isolate;
  margin:0;
  min-width:0;
  min-height:100vh;
  overflow-x:hidden;
  color:var(--text);
  font-family:var(--font);
  font-size:16px;
  line-height:1.55;
  -webkit-font-smoothing:antialiased;
  text-rendering:optimizeLegibility;
  background:
    radial-gradient(900px 520px at 12% -8%, rgba(37,99,235,.14), transparent 60%),
    radial-gradient(760px 460px at 92% -4%, rgba(16,185,129,.12), transparent 60%),
    var(--bg);
}
body::before {
  content:"";
  position:fixed;
  inset:0;
  z-index:0;
  pointer-events:none;
  background-image:
    linear-gradient(rgba(15,23,42,.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(15,23,42,.045) 1px, transparent 1px);
  background-size:56px 56px;
  -webkit-mask-image:radial-gradient(ellipse 70% 55% at 50% 0%, #000 30%, transparent 75%);
  mask-image:radial-gradient(ellipse 70% 55% at 50% 0%, #000 30%, transparent 75%);
}
body > * { position:relative; z-index:1; }
body > .message-backdrop,
body > .modal-backdrop,
body > .mobile-inbox-backdrop,
body > .mobile-nav,
body > .toast { position:fixed; }

button,input,select,textarea { font:inherit; }
button,a { -webkit-tap-highlight-color:transparent; }
a { color:inherit; text-decoration:none; }
button { color:inherit; }
button:disabled { cursor:not-allowed; }
[hidden], .hidden { display:none !important; }
.email-address-text { direction:ltr; unicode-bidi:isolate; }
.ambient { display:none; }

:where(button,a,input,select,textarea,[tabindex]):focus-visible {
  outline:2px solid var(--primary);
  outline-offset:2px;
}

/* Shared shell */
.shell,
.topbar-inner,
.page > :not(.mobile-inbox-backdrop):not(.mobile-nav) {
  width:min(calc(100% - 48px), 1600px);
  min-width:0;
  margin-inline:auto;
}

/* Header */
.topbar {
  position:sticky;
  top:0;
  z-index:40;
  width:100%;
  height:84px;
  display:flex;
  align-items:center;
  border-bottom:1px solid var(--line);
  background:rgba(255,255,255,.82);
  -webkit-backdrop-filter:blur(12px);
  backdrop-filter:blur(12px);
  transition:box-shadow var(--motion-normal) var(--motion-ease), background var(--motion-normal) var(--motion-ease);
}
.topbar.scrolled { box-shadow:0 4px 18px rgba(15,23,42,.06); background:rgba(255,255,255,.93); }
.topbar-inner { display:flex; align-items:center; justify-content:space-between; gap:22px; height:100%; }
.brand { display:inline-flex; align-items:center; gap:11px; min-width:0; color:var(--text); }
.brand-mark {
  width:40px;
  height:40px;
  flex:0 0 40px;
  display:grid;
  place-items:center;
  border:0;
  border-radius:11px;
  color:#fff;
  background:linear-gradient(135deg,#3b82f6 0%,#22d3a0 100%);
  box-shadow:0 6px 16px rgba(59,130,246,.30);
}
.brand-mark svg { width:31px; height:31px; fill:none; stroke-linecap:round; stroke-linejoin:round; }
.brand-envelope { stroke:#fff; stroke-width:2.2; }
.brand-accent { stroke:#fff; stroke-width:2.2; }
.brand-wordmark { display:inline-flex; align-items:baseline; gap:4px; font-size:22px; line-height:1; letter-spacing:-.03em; white-space:nowrap; }
.brand-temp { font-weight:800; color:var(--text); }
.brand-mail { font-weight:500; color:#475569; }
.brand-ace { font-weight:800; color:var(--primary); background:linear-gradient(90deg,#2563eb,#10b981); -webkit-background-clip:text; background-clip:text; -webkit-text-fill-color:transparent; }
.desktop-nav { display:flex; align-items:center; gap:30px; margin-inline:auto; color:#475569; font-size:15px; font-weight:600; }
.desktop-nav a { padding:9px 2px; transition:color var(--motion-fast) var(--motion-ease); }
.desktop-nav a:hover { color:var(--primary); }
.top-actions { display:flex; align-items:center; gap:10px; overflow:visible; }

/* Reusable controls */
.icon-btn,.quiet-btn,.soft-btn,.primary-btn,.side-link,.mobile-nav-item,.mobile-plus,.toolbar-danger,.inbox-menu-delete,.active-inbox-action,.side-add,.message-close {
  border:0;
  cursor:pointer;
  transition:
    transform var(--motion-fast) var(--motion-ease),
    background var(--motion-fast) var(--motion-ease),
    border-color var(--motion-fast) var(--motion-ease),
    color var(--motion-fast) var(--motion-ease),
    box-shadow var(--motion-fast) var(--motion-ease),
    opacity var(--motion-fast) var(--motion-ease);
}
.icon-btn { width:44px; height:44px; display:grid; place-items:center; border-radius:var(--radius-btn); border:1px solid var(--line); background:var(--surface); color:var(--text-2); }
.icon-btn:hover { background:var(--primary-50); border-color:var(--primary); color:var(--primary); transform:translateY(-1px); }
.quiet-btn { min-height:42px; padding:0 16px; display:inline-flex; align-items:center; justify-content:center; border:1px solid var(--line-strong); border-radius:var(--radius-btn); background:var(--surface); color:var(--text-2); font-size:14px; font-weight:650; }
.quiet-btn:hover { background:var(--primary-50); border-color:var(--primary); color:var(--primary); transform:translateY(-1px); }
.primary-btn {
  min-height:48px;
  padding:0 20px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:9px;
  border-radius:var(--radius-btn);
  background:var(--accent);
  color:#fff;
  font-weight:750;
  box-shadow:0 6px 16px rgba(16,185,129,.25);
}
.primary-btn:hover:not(:disabled) { background:var(--accent-600); transform:translateY(-1px); box-shadow:0 8px 20px rgba(16,185,129,.28); }
.primary-btn:active:not(:disabled) { transform:scale(.97); }
.primary-btn:disabled { opacity:.48; }
.primary-btn.copy-success { background:var(--accent-600); animation:copyFlash .55s ease both; }
.soft-btn {
  min-height:42px;
  padding:0 15px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  border:1px solid var(--line-strong);
  border-radius:var(--radius-btn);
  background:var(--surface-2);
  color:var(--text-2);
  font-weight:650;
}
.soft-btn:hover:not(:disabled) { background:var(--primary-50); border-color:var(--primary); color:var(--primary); transform:translateY(-1px); }
.soft-btn:active:not(:disabled) { transform:scale(.98); }

/* Language selector */
.lang-switcher { position:relative; z-index:80; flex:0 0 auto; }
.lang-switcher-trigger {
  min-height:42px;
  padding:0 13px;
  display:inline-flex;
  align-items:center;
  gap:9px;
  border:1px solid var(--line-strong);
  border-radius:13px;
  background:var(--surface);
  color:var(--text-2);
  font-size:14px;
  font-weight:600;
  cursor:pointer;
  transition:all var(--motion-fast) var(--motion-ease);
}
.lang-switcher-trigger:hover,.lang-switcher-trigger[aria-expanded="true"] { background:var(--primary-50); border-color:var(--primary); color:var(--primary); }
.lang-switcher-globe,.lang-switcher-chevron { flex:0 0 auto; fill:none; stroke:currentColor; stroke-width:1.7; stroke-linecap:round; stroke-linejoin:round; }
.lang-switcher-globe { width:18px; height:18px; }
.lang-switcher-chevron { width:15px; height:15px; transition:transform var(--motion-fast) var(--motion-ease); }
.lang-switcher-trigger[aria-expanded="true"] .lang-switcher-chevron { transform:rotate(180deg); }
.lang-switcher-label { white-space:nowrap; }
.lang-switcher-menu {
  position:absolute;
  inset-block-start:calc(100% + 9px);
  inset-inline-end:0;
  z-index:100;
  width:224px;
  max-height:min(520px,calc(100vh - 110px));
  overflow-y:auto;
  overscroll-behavior:contain;
  padding:6px;
  border:1px solid var(--line);
  border-radius:15px;
  background:var(--surface);
  box-shadow:0 18px 46px rgba(15,23,42,.15);
}
.lang-switcher-menu[hidden] { display:none; }
.lang-switcher-option { width:100%; min-height:40px; padding:8px 11px; display:flex; align-items:center; justify-content:space-between; gap:12px; border:1px solid transparent; border-radius:9px; background:transparent; color:var(--text-2); font-size:14px; font-weight:550; text-align:start; cursor:pointer; }
.lang-switcher-option:hover,.lang-switcher-option:focus-visible { background:var(--surface-2); color:var(--text); }
.lang-switcher-option.selected { border-color:var(--primary-100); background:var(--primary-50); color:var(--primary-600); }
.lang-switcher-check { min-width:15px; color:var(--primary); font-weight:800; text-align:center; }
.lang-switcher-separator { height:1px; margin:5px 4px; background:var(--line); }

/* Main page / hero */
.page { width:100%; min-width:0; max-width:none; margin:0; padding:56px 0 110px; }
.hero { max-width:900px !important; text-align:center; margin:0 auto 34px !important; }
.hero h1 { margin:0 0 18px; color:var(--text); font-size:clamp(40px,5vw,64px); line-height:1.06; letter-spacing:-.03em; font-weight:800; text-wrap:balance; }
.hero-title-highlight { display:inline-block; color:transparent; background:linear-gradient(90deg,var(--primary),var(--accent)); -webkit-background-clip:text; background-clip:text; }
.hero p { max-width:720px; margin:0 auto; color:var(--muted); font-size:18px; line-height:1.7; text-wrap:balance; }

/* Hero email card */
.email-card {
  max-width:1060px;
  margin:0 auto 28px !important;
  padding:28px;
  border:1px solid var(--line);
  border-radius:22px;
  background:var(--surface);
  box-shadow:var(--shadow-lg);
}
.email-card-label { margin-bottom:14px; color:var(--muted); font-size:12px; font-weight:750; letter-spacing:.14em; text-transform:uppercase; }
.email-row { display:flex; align-items:center; gap:16px; min-width:0; }
.email-address { flex:1 1 auto; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; color:var(--text); font-size:clamp(28px,3vw,34px); font-weight:700; line-height:1.2; letter-spacing:-.015em; direction:ltr; unicode-bidi:isolate; }
.email-domain-accent { color:var(--primary); }
.email-actions { margin-top:22px; padding-top:18px; display:flex; flex-wrap:wrap; align-items:center; gap:10px; border-top:1px solid var(--line); }
.ready-pill { margin-inline-start:auto; display:inline-flex; align-items:center; gap:8px; min-height:36px; padding:0 12px; border-radius:999px; background:#ecfdf5; color:#047857; font-size:13px; font-weight:650; font-feature-settings:"tnum"; }
.status-dot { width:8px; height:8px; flex:0 0 8px; display:inline-block; border-radius:50%; background:var(--accent); }
.ready-pill.expiry-warning { background:#fffbeb; color:#b45309; }
.ready-pill.expiry-warning .status-dot { background:var(--warn); }
.ready-pill.expiry-danger { background:#fef2f2; color:#b91c1c; }
.ready-pill.expiry-danger .status-dot { background:var(--danger); }

/* Ads */
.ad-slot,.workspace-ad-panel {
  color:var(--muted);
  background:var(--surface-2);
  border:1px dashed var(--line-strong);
  text-align:center;
}
.ad-slot { max-width:900px; min-height:136px; margin:54px auto; display:grid; place-items:center; align-content:center; gap:6px; border-radius:var(--radius-card); }
.ad-slot span,.workspace-ad-panel span { color:var(--muted); font-size:10px; font-weight:750; letter-spacing:.14em; }
.ad-slot strong,.workspace-ad-panel strong { color:var(--muted); font-size:13px; font-weight:650; }
.ad-slot small,.workspace-ad-panel small { color:var(--muted); font-size:12px; }
.ad-slot-top { width:min(100%,900px); min-height:90px; margin:0 auto 22px !important; }
.workspace-ad-panel {
  grid-area:ad;
  width:100%;
  min-width:0;
  min-height:600px;
  height:100%;
  position:sticky;
  top:100px;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:8px;
  padding:16px;
  border-radius:18px;
  overflow:hidden;
  background:
    linear-gradient(145deg,rgba(255,255,255,.75),rgba(241,245,251,.92)),
    var(--surface-2);
}
.inbox-sidebar .ad-slot-rectangle { width:min(100%,300px); min-width:0; min-height:250px; height:250px; margin:18px auto 16px; padding:12px; border-radius:16px; }

/* Dashboard */
.workspace {
  display:grid;
  grid-template-columns:300px minmax(0,1fr) 360px;
  grid-template-areas:"ad main side";
  gap:0;
  min-width:0;
  min-height:700px;
  overflow:visible;
  border:1px solid var(--line);
  border-radius:22px;
  background:var(--surface);
  box-shadow:var(--shadow-md);
}
.workspace > * { min-width:0; }
.message-pane { grid-area:main; min-width:0; background:var(--surface); border-inline:1px solid var(--line); }
.inbox-sidebar { grid-area:side; min-width:0; padding:24px; display:flex; flex-direction:column; background:var(--surface-2); }
.side-title { padding:0 2px 14px; display:flex; align-items:center; justify-content:space-between; gap:12px; color:var(--muted); font-size:12px; font-weight:750; letter-spacing:.12em; text-transform:uppercase; }
.counter { direction:ltr; unicode-bidi:isolate; padding:4px 9px; border:1px solid var(--line); border-radius:999px; background:var(--surface); color:var(--text-2); font-size:12px; font-weight:650; font-feature-settings:"tnum"; }
.sidebar-toolbar { min-height:40px; padding:0 2px 14px; display:flex; align-items:center; justify-content:space-between; gap:10px; }
.toolbar-check { display:inline-flex; align-items:center; gap:9px; color:var(--muted); font-size:13px; font-weight:650; cursor:pointer; user-select:none; }
.toolbar-danger { min-height:36px; padding:0 11px; border:1px solid #fecaca; border-radius:10px; background:#fef2f2; color:#b91c1c; font-size:12px; font-weight:750; }
.toolbar-danger:not(:disabled):hover { background:#fee2e2; border-color:#fca5a5; }
.toolbar-danger:disabled { opacity:.45; }
.toolbar-danger[hidden] { display:none !important; }
.inbox-list { display:grid; gap:12px; max-height:none; overflow:visible; padding:1px 3px 3px 1px; scrollbar-width:thin; scrollbar-color:var(--line-strong) transparent; }

/* Inbox cards */
.inbox-chip {
  position:relative;
  min-width:0;
  min-height:76px;
  padding:15px 14px 15px 16px;
  display:flex;
  align-items:center;
  gap:14px;
  border:1px solid var(--line);
  border-inline-start:3px solid transparent;
  border-radius:16px;
  background:var(--surface);
  color:var(--text);
  box-shadow:0 0 0 rgba(0,0,0,0);
  animation:fadeUp .28s var(--motion-ease) both;
  transition:
    transform var(--motion-normal) var(--motion-ease),
    background var(--motion-normal) var(--motion-ease),
    border-color var(--motion-normal) var(--motion-ease),
    box-shadow var(--motion-normal) var(--motion-ease);
}
.inbox-chip:nth-child(2) { animation-delay:60ms; }
.inbox-chip:nth-child(3) { animation-delay:120ms; }
.inbox-chip:hover { transform:translateY(-1px); border-color:var(--line-strong); box-shadow:var(--shadow-sm); }
.inbox-chip.menu-open { z-index:120; }

.inbox-chip.selection-mode {
  grid-template-columns:auto 44px minmax(0,1fr) auto auto;
}

.inbox-chip.active { background:var(--primary-50); border-color:rgba(37,99,235,.58); border-inline-start-color:var(--primary); box-shadow:0 8px 20px rgba(37,99,235,.12); }
.inbox-chip.selected:not(.active) { border-color:rgba(37,99,235,.45); background:#f8fbff; }
.inbox-chip-main { flex:1 1 auto; min-width:0; display:block; padding:2px 0; border:0; background:transparent; color:inherit; text-align:start; cursor:pointer; }
.inbox-email { display:block; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; text-align:left; direction:ltr; unicode-bidi:isolate; }
.inbox-local-part { display:block; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; color:var(--text); font-size:16px; font-weight:600; line-height:1.3; }
.inbox-domain { display:block; margin-top:2px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; color:var(--primary); font-size:13px; font-weight:550; line-height:1.3; opacity:.88; }
.inbox-avatar { width:44px; height:44px; flex:0 0 44px; display:flex; align-items:center; justify-content:center; border-radius:50%; color:#fff; font-size:17px; font-weight:700; box-shadow:inset 0 0 0 1px rgba(255,255,255,.18); }
.avatar-gradient-0 { background:linear-gradient(135deg,#3b82f6,#6366f1); }
.avatar-gradient-1 { background:linear-gradient(135deg,#10b981,#14b8a6); }
.avatar-gradient-2 { background:linear-gradient(135deg,#8b5cf6,#d946ef); }
.avatar-gradient-3 { background:linear-gradient(135deg,#f59e0b,#f97316); }
.avatar-gradient-4 { background:linear-gradient(135deg,#06b6d4,#3b82f6); }
.avatar-gradient-5 { background:linear-gradient(135deg,#ec4899,#8b5cf6); }
.inbox-expiry { flex:0 0 auto; min-height:27px; padding:4px 10px; display:inline-flex; align-items:center; justify-content:center; border-radius:999px; white-space:nowrap; font-size:13px; font-weight:650; font-feature-settings:"tnum"; }
.inbox-expiry[hidden] { display:none; }
.inbox-expiry .expiry-dot { display:none; }
.inbox-expiry.expiry-good { background:#ecfdf5; color:#047857; }
.inbox-expiry.expiry-warning { background:#fffbeb; color:#b45309; }
.inbox-expiry.expiry-danger { background:#fef2f2; color:#b91c1c; }
.inbox-expiry.expiry-danger .expiry-time { animation:expiryPulse 1.8s ease-in-out infinite; }
.inbox-actions-wrap { position:relative; flex:0 0 auto; display:grid; place-items:center; }
.inbox-more-btn { width:40px; height:40px; display:grid; place-items:center; padding:0; border:1px solid transparent; border-radius:10px; background:transparent; color:var(--muted); opacity:.55; font-size:22px; line-height:1; cursor:pointer; }
.inbox-chip:hover .inbox-more-btn,.inbox-chip:focus-within .inbox-more-btn,.inbox-more-btn[aria-expanded="true"] { opacity:1; }
.inbox-more-btn:hover,.inbox-more-btn[aria-expanded="true"] { background:var(--surface-2); border-color:var(--line); color:var(--text-2); }
.inbox-menu { position:absolute; z-index:90; inset-block-start:calc(100% + 7px); inset-inline-end:0; width:142px; padding:6px; border:1px solid var(--line); border-radius:12px; background:var(--surface); box-shadow:0 16px 40px rgba(15,23,42,.16); }
.inbox-menu-delete { width:100%; min-height:38px; padding:0 11px; border-radius:9px; background:transparent; color:var(--danger); text-align:start; font-size:13px; font-weight:700; }
.inbox-menu-delete:hover,.inbox-menu-delete:focus-visible { background:#fef2f2; }

/* Custom selection controls */
.inbox-chip input[type="checkbox"],#selectAllInboxes,.inbox-select {
  appearance:none;
  -webkit-appearance:none;
  width:20px;
  height:20px;
  flex:0 0 20px;
  margin:0;
  position:relative;
  border:1.5px solid var(--line-strong);
  border-radius:6px;
  background:var(--surface);
  cursor:pointer;
}
.inbox-chip input[type="checkbox"]:checked,#selectAllInboxes:checked,.inbox-select:checked { background:var(--primary); border-color:var(--primary); }
.inbox-chip input[type="checkbox"]::after,#selectAllInboxes::after,.inbox-select::after {
  content:"";
  position:absolute;
  left:5px;
  top:2px;
  width:5px;
  height:9px;
  border:solid #fff;
  border-width:0 2px 2px 0;
  transform:rotate(45deg) scale(.65);
  opacity:0;
  transition:opacity 180ms ease, transform 180ms ease;
}
.inbox-chip input[type="checkbox"]:checked::after,#selectAllInboxes:checked::after,.inbox-select:checked::after { opacity:1; transform:rotate(45deg) scale(1); }

.side-add-wrap { width:100%; margin-top:12px; }
.side-add { width:100%; min-height:48px; display:flex; align-items:center; justify-content:center; gap:7px; border:1px dashed rgba(37,99,235,.62); border-radius:14px; background:var(--primary-50); color:var(--primary); font-weight:700; }
.side-add:hover:not(:disabled) { background:var(--primary-100); border-color:var(--primary); color:var(--primary-600); transform:translateY(-1px); }
.side-add:not(:disabled)::first-letter { transition:transform var(--motion-normal) var(--motion-ease); }
.side-add:disabled { opacity:.5; border-style:dashed; }
.inbox-limit-tooltip { position:static; display:block; margin-top:8px; padding:0 4px; color:var(--muted); background:transparent; border:0; box-shadow:none; font-size:12px; line-height:1.45; text-align:center; }
.inbox-limit-tooltip[hidden] { display:none !important; }
.sidebar-usage { margin-top:auto; padding:18px 4px 0; border-top:1px solid var(--line); }
.usage-meta { display:flex; align-items:center; justify-content:space-between; gap:10px; color:var(--muted); font-size:12px; font-weight:650; }
.usage-plan { color:var(--text-2); font-size:12px; font-weight:700; text-transform:uppercase; letter-spacing:.08em; }
.usage-track { height:7px; margin-top:10px; overflow:hidden; border-radius:999px; background:#e2e8f0; }
.usage-track span { display:block; width:0; height:100%; border-radius:inherit; background:var(--primary); transition:width var(--motion-normal) var(--motion-ease); }

/* Main inbox */
.pane-head { padding:24px; border-bottom:1px solid var(--line); }
.active-inbox-head { min-height:0; }
.active-inbox-card { width:100%; min-height:0; margin:0; padding:20px; display:flex; flex-direction:column; gap:9px; border:1px solid var(--primary-100); border-radius:18px; background:linear-gradient(135deg,#fff 0%,var(--primary-50) 100%); box-shadow:0 10px 28px rgba(37,99,235,.08); }
.active-inbox-label { color:var(--muted); font-size:13px; font-weight:650; }
.active-inbox-control-row { display:flex; align-items:center; gap:12px; min-width:0; }
#activeInboxAddress { flex:1 1 auto; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; color:var(--text); font-size:clamp(20px,2.15vw,26px); font-weight:700; line-height:1.3; letter-spacing:-.01em; direction:ltr; unicode-bidi:isolate; }
.active-inbox-actions { display:flex; flex:0 0 auto; align-items:center; gap:8px; }
.active-inbox-action { width:44px; height:44px; display:grid; place-items:center; padding:0; border:1px solid var(--line-strong); border-radius:12px; background:var(--surface); color:var(--text-2); font-size:21px; line-height:1; }
.active-inbox-action:hover { background:var(--primary-50); border-color:var(--primary); color:var(--primary); transform:scale(1.05); }
.active-inbox-action.copy-success { background:#ecfdf5; border-color:#a7f3d0; color:#047857; }
.connection-banner { min-height:46px; padding:0 24px; display:flex; align-items:center; gap:9px; border-bottom:1px solid var(--line); color:var(--text-2); font-size:13px; font-weight:600; }
.connection-banner .status-dot { position:relative; box-shadow:0 0 0 0 rgba(16,185,129,.26); animation:connectionPing 2s ease-out infinite; }
.connection-banner.reconnecting .status-dot { background:var(--warn); animation:none; box-shadow:none; }

.message-list { min-height:560px; max-height:640px; overflow:auto; scrollbar-width:thin; scrollbar-color:var(--line-strong) transparent; }
.message-item { padding:20px 24px; border-bottom:1px solid var(--line); background:var(--surface); color:var(--text); cursor:pointer; transition:background var(--motion-normal) var(--motion-ease), box-shadow var(--motion-normal) var(--motion-ease), transform var(--motion-normal) var(--motion-ease), opacity var(--motion-normal) var(--motion-ease); }
.message-item:hover { background:var(--surface-2); }
.message-item.active { background:var(--primary-50); box-shadow:inset 3px 0 0 var(--primary); }
html[dir="rtl"] .message-item.active { box-shadow:inset -3px 0 0 var(--primary); }
.message-item.new-arrival { animation:newMessageIn 240ms ease-out both, newMessageHighlight 1.2s ease-out 240ms both; }
.message-meta { display:flex; justify-content:space-between; gap:12px; color:var(--muted); font-size:12px; }
.message-meta time { flex:0 0 auto; direction:ltr; unicode-bidi:isolate; font-feature-settings:"tnum"; }
.message-from { min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; color:var(--text-2); font-weight:650; }
.message-subject { margin-top:7px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; color:var(--text); font-size:16px; font-weight:700; }
.message-preview { margin-top:5px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; color:var(--muted); font-size:13px; }
.otp-inline { width:max-content; max-width:100%; margin-top:10px; padding:5px 9px; border:1px solid var(--primary-100); border-radius:999px; background:var(--primary-50); color:var(--primary-600); font-size:12px; font-weight:700; }

/* Empty state */
.empty-state { min-height:560px; padding:48px 28px; display:grid; place-content:center; justify-items:center; text-align:center; color:var(--muted); }
.empty-icon { position:relative; width:72px; height:72px; display:grid; place-items:center; border:1px solid var(--line); border-radius:21px; background:var(--surface); color:var(--primary); box-shadow:var(--shadow-md); font-size:27px; animation:emptyFloat 3s ease-in-out infinite; }
.empty-icon::before { content:""; position:absolute; inset:-13px; z-index:-1; border-radius:28px; background:radial-gradient(circle,rgba(37,99,235,.13),transparent 68%); animation:emptyPulse 2.4s ease-in-out infinite; }
.empty-state h3 { margin:20px 0 7px; color:var(--text); font-size:22px; font-weight:700; letter-spacing:-.02em; }
.empty-state p { max-width:460px; margin:0; color:var(--muted); font-size:15px; line-height:1.7; }
.empty-state .empty-hint { margin-top:8px; color:var(--text-2); font-size:14px; }
.listening-dots { display:flex; align-items:center; justify-content:center; gap:5px; margin-top:18px; }
.listening-dots span { width:6px; height:6px; border-radius:50%; background:var(--primary); animation:listeningBounce 1.2s ease-in-out infinite; }
.listening-dots span:nth-child(2) { animation-delay:120ms; }
.listening-dots span:nth-child(3) { animation-delay:240ms; }

/* Message viewer */
.message-backdrop { inset:0; z-index:70; display:grid; place-items:center; padding:clamp(14px,3vw,38px); background:rgba(15,23,42,.34); -webkit-backdrop-filter:blur(7px); backdrop-filter:blur(7px); pointer-events:none; }
.message-backdrop.hidden { display:none !important; pointer-events:none !important; }
.message-backdrop:not(.hidden) { pointer-events:auto; }
.message-dialog { display:block !important; width:min(1040px,100%); height:min(860px,calc(100dvh - 48px)); min-width:0; overflow:auto; border:1px solid var(--line); border-radius:22px; background:var(--surface); color:var(--text); box-shadow:0 24px 70px rgba(15,23,42,.18); outline:none; }
.message-dialog-bar { position:sticky; top:0; z-index:3; min-height:56px; padding:0 22px; display:flex; align-items:center; gap:16px; border-bottom:1px solid var(--line); background:rgba(255,255,255,.94); -webkit-backdrop-filter:blur(10px); backdrop-filter:blur(10px); color:var(--muted); font-size:12px; font-weight:700; letter-spacing:.1em; }
.message-dialog-bar time { margin-inline-start:auto; direction:ltr; unicode-bidi:isolate; letter-spacing:normal; font-weight:550; }
.message-close { width:40px; height:40px; display:grid; place-items:center; border:1px solid var(--line); border-radius:11px; background:var(--surface); color:var(--text); font-size:23px; }
.message-close:hover { background:var(--surface-2); border-color:var(--line-strong); }
.message-detail { min-height:0; }
.detail-head { padding:28px 34px 22px; border-bottom:1px solid var(--line); }
.detail-head h1,.detail-head h2 { margin:0 0 17px; color:var(--text); font-size:clamp(23px,3vw,31px); line-height:1.2; letter-spacing:-.03em; }
.detail-meta { display:flex; flex-wrap:wrap; align-items:center; gap:10px 20px; color:var(--muted); font-size:13px; }
.detail-meta b { color:var(--text-2); direction:ltr; unicode-bidi:isolate; }
.otp-card { margin:20px 34px; padding:20px 22px; border:1px solid var(--primary-100); border-radius:18px; background:var(--primary-50); }
.otp-card small { color:var(--muted); font-size:12px; font-weight:650; letter-spacing:.06em; text-transform:uppercase; }
.otp-code { margin:10px 0 14px; color:var(--text); font:780 36px ui-monospace,SFMono-Regular,Menlo,monospace; letter-spacing:.13em; }
.copy-code { min-height:42px; padding:0 14px; border:0; border-radius:11px; background:var(--accent); color:#fff; font-weight:750; cursor:pointer; }
.copy-code:hover { background:var(--accent-600); }
.privacy-strip { margin:15px 34px; padding:12px 14px; border:1px solid var(--line); border-radius:14px; background:var(--surface-2); color:var(--text-2); font-size:13px; }
.attachments-section { padding:12px 34px 6px; }
.attachments-section h3 { margin:0 0 12px; color:var(--text-2); font-size:13px; font-weight:700; }
.attachment-row { margin:0 0 12px; padding:12px 14px; display:flex; align-items:center; justify-content:space-between; gap:12px; border:1px solid var(--line); border-radius:14px; background:var(--surface-2); color:var(--text-2); font-size:13px; }
.detail-actions { display:flex; justify-content:flex-end; padding:12px 34px; }
.danger-soft { border-color:#fecaca; background:#fef2f2; color:#b91c1c; }
.danger-soft:hover { border-color:#fca5a5; background:#fee2e2; color:#991b1b; }
.message-content { padding:0 34px 34px; overflow-wrap:anywhere; background:var(--surface); }
.safe-message-frame { width:100%; min-height:440px; display:block; border:1px solid var(--line); border-radius:12px; background:#fff; }
body.message-open { overflow:hidden; }

/* Supporting feature/content sections */
.trust-row { display:grid; grid-template-columns:repeat(3,1fr); gap:14px; margin-top:20px; }
.trust-row article { padding:20px; display:flex; gap:14px; border:1px solid var(--line); border-radius:var(--radius-card); background:rgba(255,255,255,.82); box-shadow:var(--shadow-sm); }
.trust-row article:hover { transform:translateY(-1px); border-color:var(--line-strong); }
.feature-icon { width:42px; height:42px; flex:0 0 42px; display:grid; place-items:center; border:1px solid var(--primary-100); border-radius:13px; background:var(--primary-50); color:var(--primary); }
.trust-row h3 { margin:2px 0 6px; color:var(--text); font-size:15px; }
.trust-row p { margin:0; color:var(--muted); font-size:13px; line-height:1.6; }
.content-grid { padding:74px 0 12px; display:grid; grid-template-columns:1fr 1fr; gap:80px; align-items:center; }
.section-label { color:var(--muted); font-size:12px; font-weight:800; letter-spacing:.14em; }
.content-copy h2 { margin:14px 0 18px; color:var(--text); font-size:clamp(30px,4vw,46px); line-height:1.06; letter-spacing:-.04em; }
.content-copy p { color:var(--muted); font-size:16px; line-height:1.8; }
.steps { overflow:hidden; border:1px solid var(--line); border-radius:var(--radius-card); background:var(--surface); box-shadow:var(--shadow-sm); }
.steps div { padding:18px; display:flex; align-items:center; gap:20px; border-bottom:1px solid var(--line); }
.steps div:last-child { border-bottom:0; }
.steps b { color:var(--muted); font:650 12px ui-monospace,monospace; }
.steps span { color:var(--text-2); font-size:15px; }

/* Forms, history, dialogs */
.modal-backdrop { inset:0; z-index:60; display:grid; place-items:center; padding:20px; background:rgba(15,23,42,.28); -webkit-backdrop-filter:blur(6px); backdrop-filter:blur(6px); }
.modal-backdrop.hidden { display:none !important; pointer-events:none !important; }
.modal-card { width:min(500px,100%); padding:22px; border:1px solid var(--line); border-radius:22px; background:var(--surface); box-shadow:0 24px 60px rgba(15,23,42,.16); }
.history-modal-card { width:min(620px,100%); }
.modal-head { margin-bottom:23px; display:flex; align-items:flex-start; justify-content:space-between; gap:15px; }
.modal-head h2 { margin:6px 0 0; color:var(--text); font-size:24px; letter-spacing:-.03em; }
.field-label { margin:13px 0 7px; display:flex; justify-content:space-between; color:var(--muted); font-size:13px; }
.field-label span { color:var(--muted); }
.text-input { width:100%; min-height:48px; padding:0 13px; border:1px solid var(--line-strong); border-radius:12px; background:var(--surface); color:var(--text); outline:0; }
.text-input::placeholder,input::placeholder,textarea::placeholder { color:var(--muted); opacity:1; }
.text-input:focus,input:focus-visible,select:focus-visible,textarea:focus-visible { border-color:var(--primary); box-shadow:0 0 0 3px rgba(37,99,235,.11); }
.check-row { margin-top:15px; display:flex; align-items:center; gap:9px; color:var(--muted); font-size:13px; }
.modal-actions { margin-top:24px; display:flex; justify-content:flex-end; gap:9px; }
.muted { color:var(--muted); font-size:13px; line-height:1.6; }
.history-list { display:grid; gap:9px; max-height:420px; overflow:auto; }
.history-entry { padding:13px; display:flex; align-items:center; justify-content:space-between; gap:10px; border:1px solid var(--line); border-radius:13px; background:var(--surface-2); }
.history-entry strong,.history-entry small { display:block; }
.history-entry strong { max-width:340px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; color:var(--text); font-size:14px; }
.history-entry small { margin-top:4px; color:var(--muted); font-size:12px; }

/* Toasts: high contrast on light UI */
.toast { z-index:100; left:50%; bottom:28px; transform:translate(-50%,20px); max-width:min(90vw,480px); padding:12px 16px; border:1px solid rgba(255,255,255,.12); border-radius:10px; background:#0f172a; color:#fff; box-shadow:0 16px 36px rgba(15,23,42,.22); opacity:0; pointer-events:none; font-size:13px; transition:opacity var(--motion-normal) var(--motion-ease), transform var(--motion-normal) var(--motion-ease); }
.toast.show { opacity:1; transform:translate(-50%,0); }

/* Pricing / signin / admin shared compatibility */
.pricing-wrap,.account-wrap,.admin-wrap { color:var(--text) !important; }
.pricing-head p,.account-card p,.admin-wrap > p { color:var(--muted) !important; }
.price-card,.account-card,.metric,.table-wrap { background:var(--surface) !important; color:var(--text) !important; border-color:var(--line) !important; box-shadow:var(--shadow-md); }
.price-card.featured { border-color:rgba(37,99,235,.5) !important; box-shadow:0 16px 42px rgba(37,99,235,.12); }
.plan-note,.features,.account-form label,.account-status,.metric small,.domain-table th { color:var(--muted) !important; }
.features span::before { color:var(--accent) !important; }
.domain-table th,.domain-table td { border-bottom-color:var(--line) !important; }

/* Mobile navigation */
.mobile-nav { display:none; }
.mobile-inbox-backdrop { display:none; }

/* Direction */
html[dir="rtl"] .ready-pill { margin-inline-start:0; margin-inline-end:auto; }
html[dir="rtl"] .inbox-chip-main { text-align:start; }
html[dir="rtl"] .toolbar-check { flex-direction:row-reverse; }

/* Animations */
@keyframes fadeUp { from { opacity:0; transform:translateY(8px); } to { opacity:1; transform:translateY(0); } }
@keyframes copyFlash { 0%,100% { box-shadow:0 6px 16px rgba(16,185,129,.25); } 50% { box-shadow:0 0 0 5px rgba(16,185,129,.12),0 8px 20px rgba(16,185,129,.3); } }
@keyframes connectionPing { 0% { box-shadow:0 0 0 0 rgba(16,185,129,.26); } 70% { box-shadow:0 0 0 8px rgba(16,185,129,0); } 100% { box-shadow:0 0 0 0 rgba(16,185,129,0); } }
@keyframes emptyFloat { 0%,100% { transform:translateY(0); } 50% { transform:translateY(-6px); } }
@keyframes emptyPulse { 0%,100% { opacity:.5; transform:scale(.94); } 50% { opacity:1; transform:scale(1.05); } }
@keyframes listeningBounce { 0%,60%,100% { transform:translateY(0); opacity:.45; } 30% { transform:translateY(-5px); opacity:1; } }
@keyframes newMessageIn { from { opacity:0; transform:translateY(-10px); } to { opacity:1; transform:translateY(0); } }
@keyframes newMessageHighlight { 0% { background:#dbeafe; } 100% { background:var(--surface); } }
@keyframes expiryPulse { 0%,100% { opacity:1; } 50% { opacity:.55; } }

/* <= 1199: ad rail becomes horizontal, main + sidebar stay side by side */
@media (max-width:1199px) {
  .workspace {
    grid-template-columns:minmax(0,1fr) 320px;
    grid-template-areas:
      "ad ad"
      "main side";
    min-height:0;
  }
  .workspace-ad-panel {
    position:relative;
    top:auto;
    min-height:100px;
    height:100px;
    border-radius:20px 20px 0 0;
    flex-direction:row;
  }
  .message-pane { border-inline-start:0; }
  .inbox-sidebar { border-inline-start:1px solid var(--line); }
  .content-grid { gap:40px; }
}

/* <= 899: single column dashboard */
@media (max-width:899px) {
  .workspace {
    grid-template-columns:minmax(0,1fr);
    grid-template-areas:
      "ad"
      "main"
      "side";
  }
  .workspace-ad-panel { min-height:100px; height:100px; border-radius:20px 20px 0 0; }
  .message-pane { border-inline:0; border-bottom:1px solid var(--line); }
  .inbox-sidebar { width:100%; border-inline:0; }
  .message-list { max-height:none; }
  .trust-row { grid-template-columns:1fr; }
  .content-grid { grid-template-columns:1fr; padding-top:48px; gap:28px; }
}

/* Mobile */
@media (max-width:767px) {
  body::before { display:none; }
  .shell,.topbar-inner,.page > :not(.mobile-inbox-backdrop):not(.mobile-nav) { width:calc(100% - 24px); }
  .topbar { height:68px; -webkit-backdrop-filter:blur(8px); backdrop-filter:blur(8px); }
  .topbar-inner { gap:8px; }
  .desktop-nav { display:none; }
  .quiet-btn { display:none; }
  .brand { gap:8px; }
  .brand-mark { width:36px; height:36px; flex-basis:36px; border-radius:10px; }
  .brand-mark svg { width:28px; height:28px; }
  .brand-wordmark { font-size:20px; gap:3px; }
  .page { padding-top:40px; padding-bottom:104px; }
  .hero { margin-bottom:26px !important; }
  .hero h1 { font-size:clamp(38px,11vw,48px); }
  .hero p { font-size:16px; }
  .email-card { padding:20px; border-radius:20px; }
  .email-row { align-items:stretch; }
  .email-address { align-self:center; font-size:clamp(20px,6vw,26px); }
  .primary-btn { min-height:44px; padding-inline:15px; }
  .copy-icon { display:none; }
  .email-actions { gap:8px; }
  .ready-pill { width:100%; margin:6px 0 0; justify-content:center; }
  .ad-slot-top { min-height:90px; }
  .workspace { border-radius:20px; }
  .workspace-ad-panel { min-height:100px; height:100px; padding:12px; }
  .pane-head { padding:16px; }
  .active-inbox-card { padding:16px; }
  #activeInboxAddress { font-size:18px; }
  .active-inbox-action { width:40px; height:40px; }
  .connection-banner { padding-inline:16px; }
  .message-item { padding:18px 16px; }
  .empty-state { min-height:430px; padding:40px 18px; }
  .inbox-sidebar { padding:20px 16px; }
  .message-backdrop { padding:0; }
  .message-dialog { width:100%; height:100dvh; max-height:none; border:0; border-radius:0; }
  .message-dialog-bar { padding-inline:14px; }
  .detail-head { padding:23px 18px 18px; }
  .otp-card,.privacy-strip { margin-inline:18px; }
  .attachments-section,.detail-actions { padding-inline:18px; }
  .message-content { padding:0 18px 24px; }
  .safe-message-frame { min-height:58vh; }
  .lang-switcher-trigger { gap:7px; padding-inline:10px; }
  .lang-switcher-menu { width:min(224px,calc(100vw - 24px)); }
  .mobile-nav {
    z-index:45;
    left:50%;
    bottom:12px;
    transform:translateX(-50%);
    width:min(94%,430px);
    min-height:62px;
    padding:6px;
    display:grid;
    grid-template-columns:1fr 1fr 58px 1fr;
    align-items:center;
    border:1px solid var(--line);
    border-radius:20px;
    background:rgba(255,255,255,.96);
    box-shadow:0 14px 38px rgba(15,23,42,.14);
    -webkit-backdrop-filter:blur(14px);
    backdrop-filter:blur(14px);
  }
  .mobile-nav-item { min-height:49px; display:grid; place-items:center; align-content:center; gap:2px; border:1px solid transparent; border-radius:13px; background:transparent; color:var(--muted); }
  .mobile-nav-item.active { border-color:var(--primary-100); background:var(--primary-50); color:var(--primary); }
  .mobile-nav-item small { font-size:12px; }
  .mobile-plus { width:48px; height:48px; justify-self:center; border-radius:16px; background:var(--accent); color:#fff; font-size:22px; box-shadow:0 7px 16px rgba(16,185,129,.22); }
  .mobile-inbox-backdrop:not(.hidden) { display:block; z-index:58; inset:0; background:rgba(15,23,42,.32); -webkit-backdrop-filter:blur(4px); backdrop-filter:blur(4px); }
  .inbox-sidebar.mobile-open { display:flex !important; position:fixed; z-index:59; inset:76px 12px 82px; width:auto; max-width:none; overflow:auto; border:1px solid var(--line); border-radius:18px; background:var(--surface); box-shadow:var(--shadow-lg); }
}

@media (max-width:479px) {
  .brand-wordmark { font-size:20px; }
  .brand-mail { letter-spacing:-.02em; }
  .email-row { gap:10px; }
  .soft-btn { min-height:40px; padding-inline:12px; }
  .inbox-chip { gap:10px; padding:13px 11px; }
  .inbox-avatar { width:40px; height:40px; flex-basis:40px; font-size:16px; }
  .inbox-expiry { padding-inline:8px; font-size:12px; }
  .inbox-more-btn { width:40px; height:40px; }
}

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


/* Loading skeletons */
.skeleton {
  color: transparent !important;
  min-width: min(420px, 68%);
  min-height: 1.15em;
  border-radius: 10px;
  background:
    linear-gradient(90deg, var(--surface-2) 25%, var(--surface) 42%, var(--surface-2) 62%);
  background-size: 220% 100%;
  animation: skeletonShimmer 1.25s ease-in-out infinite;
}
@keyframes skeletonShimmer {
  from { background-position: 100% 0; }
  to { background-position: -120% 0; }
}

.side-add-plus {
  display:inline-block;
  transform:rotate(0deg);
  transition:transform var(--motion-normal) var(--motion-ease);
}
.side-add:not([disabled]):hover .side-add-plus { transform:rotate(90deg); }

.email-domain-accent { color:var(--primary); }

/* Extracted message links share the OTP copy interaction. */
.extracted-links { margin:20px 34px; padding:20px 22px; border:1px solid var(--primary-100); border-radius:18px; background:var(--primary-50); min-width:0; }
.extracted-links h3 { margin:0 0 14px; color:var(--muted); font-size:13px; font-weight:700; }
.extracted-link-row + .extracted-link-row { margin-top:18px; padding-top:18px; border-top:1px solid var(--primary-100); }
.extracted-link-url { margin:0 0 12px; color:var(--text); font-size:14px; line-height:1.6; overflow-wrap:anywhere; word-break:break-word; text-align:start; unicode-bidi:plaintext; user-select:text; }
@media (max-width:680px) { .extracted-links { margin-inline:18px; padding:16px; } }

/* Media preview: scoped to the private message viewer. */
.media-privacy{display:flex;align-items:center;justify-content:space-between;gap:18px;text-align:start;padding:16px 18px;border:1px solid #dce6ef;background:#f8fafc;border-radius:14px}
.media-privacy strong{font-size:13px;color:#334155}.media-privacy p{margin:5px 0;font-size:12px}.media-privacy small{display:block;color:#64748b;line-height:1.65}.media-privacy button{flex-shrink:0;white-space:nowrap}
.media-card{margin:12px 0;border:1px solid #e2e8f0;border-radius:16px;overflow:hidden;background:#fff}.media-card .attachment-row{margin:0;border:0;border-radius:0;background:transparent;gap:14px;padding:16px}
.attachment-info{display:flex;align-items:center;gap:12px;min-width:0}.attachment-info>div{min-width:0}.attachment-info strong{display:block;color:#334155;font-size:13px;overflow-wrap:anywhere}.attachment-info small{display:block;color:#64748b;font-size:11px;margin-top:4px;overflow-wrap:anywhere}.attachment-kind{display:grid;place-items:center;width:42px;height:42px;flex-shrink:0;border-radius:12px;background:#ecfdf5;color:#047857;font-weight:700;font-size:10px;letter-spacing:.06em}
.image-preview-slot{padding:12px;border-top:1px solid #edf2f7;background:#f8fafc;min-height:100px;display:grid;place-items:center}.media-status{padding:24px;color:#64748b;font-size:13px}.image-preview-button{border:0;background:transparent;padding:0;width:100%;cursor:zoom-in;border-radius:10px;overflow:hidden}.image-preview-button img{display:block;max-width:100%;max-height:280px;width:auto;height:auto;margin:auto;border-radius:8px;object-fit:contain}.image-preview-button span{display:block;margin-top:10px;color:#047857;font-size:12px;font-weight:600}.image-preview-button:focus-visible{outline:3px solid #10b981;outline-offset:3px}.media-note{margin:0;padding:0 16px 14px;color:#64748b;font-size:12px}.media-error{display:flex;align-items:center;gap:14px;padding:14px;color:#64748b;font-size:12px}
.image-lightbox{width:min(1100px,94vw);max-height:92vh;border:1px solid #e2e8f0;border-radius:18px;padding:0;background:#fff;box-shadow:0 30px 100px #0f172a55;color:#334155}.image-lightbox::backdrop{background:#0f172acc;backdrop-filter:blur(5px)}.image-lightbox header{display:flex;justify-content:space-between;align-items:center;gap:16px;padding:16px 20px;border-bottom:1px solid #e2e8f0}.image-lightbox header strong{overflow-wrap:anywhere;min-width:0;font-size:14px}.image-lightbox header>div{display:flex;gap:8px;flex-shrink:0}.lightbox-canvas{padding:20px;background:#f8fafc;overflow:auto;display:grid;place-items:center}.lightbox-canvas img{max-width:100%;max-height:72vh;object-fit:contain}
@media(max-width:640px){.media-privacy{align-items:stretch;flex-direction:column;gap:12px}.media-privacy button{align-self:flex-start}.media-card .attachment-row{padding:12px;gap:10px}.attachment-kind{width:34px;height:34px}.image-preview-button img{max-height:220px}.media-error{flex-direction:column;text-align:center}.image-lightbox header{padding:12px;flex-wrap:wrap}.lightbox-canvas{padding:10px}}

/* Compact message spacing; privacy is an inline utility, not a card. */
.message-detail .detail-head{padding:20px 34px 16px}.message-detail .detail-head h1{margin-bottom:12px}
.message-detail .otp-card,.message-detail .extracted-links{margin-block:12px;padding:16px 18px}
.message-detail .extracted-links h3{margin-bottom:10px}
.message-detail .privacy-strip.media-privacy{margin-block:8px;padding:4px 0;border:0;border-radius:0;background:transparent;gap:12px}
.message-detail .media-privacy p{margin:0;font-size:12px;line-height:1.5;color:#64748b}
.message-detail .media-privacy small{font-size:11px;line-height:1.5;margin-top:3px}
.message-detail .media-privacy button{min-height:34px;padding:7px 10px;font-size:12px}
.message-detail .attachments-section{padding-block:6px 0}.message-detail .attachments-section h3{margin-bottom:8px}
.message-detail .media-card{margin-block:8px}.message-detail .media-card .attachment-row{padding:12px 14px}
.message-detail .image-preview-slot{padding:8px}.message-detail .detail-actions{padding-block:8px}
.message-detail .message-content{padding-bottom:20px}
@media(max-width:640px){.message-detail .detail-head{padding:16px 18px 12px}.message-detail .otp-card,.message-detail .extracted-links{padding:14px}.message-detail .media-privacy{gap:6px}.message-detail .media-card .attachment-row{padding:10px 12px}}

/* Inbox cards: full address and a quiet metadata row. */
.inbox-sidebar{padding-inline:12px}.inbox-heading{gap:10px;margin-bottom:12px}.inbox-heading-label{display:flex;align-items:center;gap:12px;min-width:0}.inbox-heading .toolbar-check{gap:5px;font-size:11px;letter-spacing:0;text-transform:none;white-space:nowrap}.inbox-heading .counter{flex-shrink:0}
#inboxSelectionToolbar[hidden]{display:none}#inboxSelectionToolbar{margin:0 0 10px}.inbox-list{gap:9px;padding:0}
.inbox-chip,.inbox-chip.selection-mode{display:flex;gap:9px;min-height:80px;padding:13px 12px;border:1px solid #e2e8f0;border-radius:14px;box-shadow:none;cursor:pointer;animation:none;align-items:flex-start;transform:none}
.inbox-chip:hover{transform:none;border-color:#cbd5e1;box-shadow:0 2px 8px #0f172a06;background:#f8fafc}.inbox-chip.active{background:#f0fdf8;border-color:#6ee7b7;box-shadow:none}.inbox-chip.active:hover{background:#eafaf3}.inbox-chip.selected:not(.active){background:#f0fdf8;border-color:#a7f3d0}
.inbox-card-content{min-width:0;flex:1}.inbox-chip .inbox-chip-main{width:100%;padding:0;margin:0;text-align:start}.inbox-chip .inbox-email{display:block;overflow:visible;text-overflow:clip;white-space:normal;overflow-wrap:anywhere;font-size:14px;font-weight:650;line-height:1.5;color:#1e293b;direction:ltr;unicode-bidi:isolate;text-align:left}
.inbox-chip .inbox-select{margin-top:3px;flex-shrink:0}.inbox-card-footer{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-top:9px}.inbox-card-stats{display:flex;align-items:center;gap:9px;min-width:0;color:#64748b;font-size:12px;font-variant-numeric:tabular-nums}.inbox-message-count{display:inline-flex;align-items:center;gap:5px;min-width:25px}.inbox-stat-divider{color:#cbd5e1}
.inbox-chip .inbox-expiry{min-width:58px;min-height:24px;padding:3px 7px;border-radius:7px;font-size:11px;font-weight:600}.inbox-chip .inbox-expiry.expiry-good{background:#f1f5f9;color:#64748b}.inbox-chip.active .inbox-expiry.expiry-good{background:#e0f2e9;color:#47665a}.inbox-chip .inbox-expiry.expiry-danger .expiry-time{animation:none}
.inbox-delete-btn{border:1px solid transparent;border-radius:7px;background:#fff1f2;color:#be123c;padding:5px 9px;min-height:28px;font-family:inherit;font-size:11px;font-weight:600;line-height:1.3;cursor:pointer;flex-shrink:0}.inbox-delete-btn:hover{background:#ffe4e6;border-color:#fecdd3;color:#9f1239}.inbox-delete-btn:focus-visible,.inbox-chip-main:focus-visible{outline:2px solid #10b981;outline-offset:3px}.inbox-delete-btn:disabled{opacity:.5;cursor:wait}
@media(max-width:680px){.inbox-sidebar{padding-inline:12px}.inbox-heading-label{gap:10px}.inbox-chip{padding:12px;min-height:78px}}

/* Final polish: stable geometry and accessible destructive confirmation. */
.inbox-heading{margin-bottom:10px}.inbox-heading .toolbar-check{font-size:12px}.inbox-chip .inbox-email{font-size:15px;font-weight:550;line-height:1.5;letter-spacing:-.015em}
.inbox-chip,.inbox-chip.selection-mode{border-inline-start:3px solid transparent;min-height:86px;padding:13px 11px}.inbox-chip.active{border-inline-start-color:#10b981}
.inbox-card-footer{margin-top:10px}.inbox-card-stats{font-size:13px;gap:7px}.inbox-message-count svg{width:16px;height:16px}.inbox-active-mark{width:14px;flex:0 0 14px;text-align:center;color:#059669;font-size:13px;font-weight:700}.inbox-chip .inbox-expiry{font-size:12px;min-width:62px;padding:4px 8px;min-height:28px}
.inbox-delete-btn{font-size:12px;min-height:34px;min-width:52px;padding:7px 10px}.inbox-chip-main{min-height:24px}
.inbox-delete-dialog{width:min(440px,calc(100vw - 32px));max-height:85vh;overflow:auto;box-sizing:border-box;border:1px solid #e2e8f0;border-radius:20px;padding:26px;background:#fff;color:#1e293b;box-shadow:0 25px 80px #0f172a33;text-align:start}.inbox-delete-dialog::backdrop{background:#0f172a66;backdrop-filter:blur(4px)}
.delete-dialog-icon{width:40px;height:40px;display:grid;place-items:center;border-radius:12px;background:#fff1f2;color:#be123c;font-size:26px;margin-bottom:16px}.inbox-delete-dialog h2{font-size:20px;font-weight:650;line-height:1.3;margin:0 0 10px}.inbox-delete-dialog p{font-size:14px;color:#64748b;line-height:1.65;margin:0 0 16px}.delete-dialog-addresses{list-style:none;padding:12px 14px;margin:0 0 22px;border:1px solid #e2e8f0;border-radius:10px;background:#f8fafc;font-size:13px;line-height:1.7;overflow-wrap:anywhere;text-align:left}.delete-dialog-addresses li+li{margin-top:6px}.delete-dialog-actions{display:flex;justify-content:flex-end;gap:10px;flex-wrap:wrap}.delete-dialog-actions button{min-height:40px;padding:9px 16px;font-size:13px;font-weight:600}.delete-dialog-confirm{border:1px solid #e11d48;background:#e11d48;color:#fff;border-radius:10px;font-family:inherit;cursor:pointer}.delete-dialog-confirm:hover{background:#be123c;border-color:#be123c}.delete-dialog-actions button:focus-visible{outline:3px solid #94a3b8;outline-offset:3px}
@media(max-width:640px){.inbox-delete-btn{min-height:40px}.inbox-delete-dialog{padding:22px}.inbox-chip,.inbox-chip.selection-mode{min-height:90px}}

/* Stable readable address typography, independent of length and viewport. */
.inbox-chip .inbox-email{font-size:16px;font-weight:500;letter-spacing:0;line-height:1.5;white-space:normal;overflow-wrap:anywhere;word-break:normal}
.inbox-chip,.inbox-chip.selection-mode{min-height:88px;padding:12px 11px}
/* Small contextual confirmation aligned with the targeted inbox. */
.inbox-delete-dialog{position:fixed;inset:auto;margin:0;width:320px;max-width:calc(100vw - 24px);padding:16px;border-radius:13px;max-height:calc(100vh - 24px);box-shadow:0 12px 40px #0f172a26}
.inbox-delete-dialog::backdrop{background:#0f172a26;backdrop-filter:none}
.inbox-delete-dialog h2{font-size:16px;line-height:1.4;margin:0 0 10px;font-weight:600}
.inbox-delete-dialog .delete-dialog-addresses{margin:0 0 14px;padding:8px 10px;font-size:14px;line-height:1.5;border-radius:8px}
.inbox-delete-dialog .delete-dialog-actions{gap:8px}.inbox-delete-dialog .delete-dialog-actions button{min-height:34px;padding:7px 12px;font-size:12px;border-radius:8px}
@media(max-width:640px){.inbox-chip .inbox-email{font-size:16px}.inbox-delete-dialog{padding:16px}.inbox-delete-dialog .delete-dialog-actions button{min-height:40px}}
