@font-face {
  font-family: "Manrope";
  src: url("/fonts/manrope-latin.woff2") format("woff2");
  font-weight: 400 800;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Manrope";
  src: url("/fonts/manrope-latin-ext.woff2") format("woff2");
  font-weight: 400 800;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* MinerSwap tokens */
:root {
  color-scheme: light;
  --green: #00d46a;
  --green-d: #00a653;
  --green-ink: #0b0b0c;
  --green-soft: #e3f9ec;
  --green-text: #007a3d;
  --bg: #f7f7f8;
  --panel: #ffffff;
  --panel-2: #f2f2f4;
  --hover: #f1f2f3;
  --ink: #0b0b0c;
  --ink-2: #2a2b2e;
  --muted: #62666d;
  --muted-2: #9a9ea5;
  --line: #ececee;
  --line-2: #dedfe2;
  --red: #d93036;
  --red-soft: #ffeceb;
  --amber-soft: #fff4dc;
  --amber-ink: #6b4a00;
  --shadow: 0 30px 60px -30px rgba(0, 0, 0, .28);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .06), 0 8px 24px -12px rgba(0, 0, 0, .14);
  --r-xl: 32px;
  --r-lg: 24px;
  --r-md: 16px;
  --r-sm: 12px;
  --font: "Manrope", ui-sans-serif, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, monospace;
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --green: #00d46a;
  --green-d: #3ff09a;
  --green-ink: #04140b;
  --green-soft: rgba(0, 212, 106, .12);
  --green-text: #3ff09a;
  --bg: #050607;
  --panel: #0b0d0e;
  --panel-2: #121516;
  --hover: rgba(255, 255, 255, .045);
  --ink: #eef1f0;
  --ink-2: #c9cecc;
  --muted: #8b9390;
  --muted-2: #5a625f;
  --line: rgba(255, 255, 255, .08);
  --line-2: rgba(255, 255, 255, .14);
  --red: #ff7a7d;
  --red-soft: rgba(255, 77, 79, .12);
  --amber-soft: rgba(255, 176, 32, .12);
  --amber-ink: #ffd07a;
  --shadow: 0 30px 80px -40px rgba(0, 0, 0, .9);
  --shadow-sm: 0 0 0 1px rgba(255, 255, 255, .06), 0 12px 32px -16px rgba(0, 0, 0, .9);
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 500 15px/1.5 var(--font);
  -webkit-font-smoothing: antialiased;
}
#app { height: 100%; }
h1, h2, h3, p { margin: 0; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
svg.icon { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.boot { display: grid; place-items: center; }
.boot img { border-radius: 50%; animation: pulse 1.2s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .5; transform: scale(.94); } }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 20px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  background: var(--panel);
  font-weight: 700;
  white-space: nowrap;
  text-decoration: none;
  transition: background .15s, border-color .15s, transform .1s;
}
.btn:hover { background: var(--hover); }
.btn:active { transform: scale(.98); }
.btn:disabled { opacity: .55; cursor: progress; }
.btn.primary { background: var(--green); border-color: var(--green); color: var(--green-ink); }
.btn.primary:hover { background: var(--green-d); border-color: var(--green-d); }
:root[data-theme="dark"] .btn.primary { box-shadow: 0 0 24px -6px rgba(0, 212, 106, .5); }
:root[data-theme="dark"] .btn.primary:hover { background: #2be38a; }
.btn.dark { background: var(--ink); border-color: var(--ink); color: var(--panel); }
.btn.danger { color: var(--red); }
.btn.danger-fill { background: var(--red); border-color: var(--red); color: #fff; }
.btn.small { min-height: 36px; padding: 0 14px; font-size: 14px; }
.btn.block { width: 100%; }
.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  flex: none;
  border: 0;
  border-radius: 50%;
  background: none;
  color: var(--muted);
}
.icon-btn:hover { background: var(--hover); color: var(--ink); }
.icon-btn[aria-pressed="true"] { color: #f5b301; }
.icon-btn[aria-pressed="true"] svg { fill: currentColor; }
.icon-btn.danger:hover { color: var(--red); }
.link { padding: 0; border: 0; background: none; color: var(--ink); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--green); text-decoration-thickness: 2px; }

/* Forms */
form { display: grid; gap: 16px; }
label.field { display: grid; gap: 6px; font-weight: 700; font-size: 14px; }
input[type="text"], input[type="password"], input[type="search"], input[type="email"] {
  width: 100%;
  min-height: 48px;
  padding: 0 16px;
  border: 1px solid var(--line-2);
  border-radius: var(--r-md);
  background: var(--panel);
  font-weight: 500;
}
input:focus { outline: none; border-color: var(--green); box-shadow: 0 0 0 4px var(--green-soft); }
.address-input { display: flex; align-items: stretch; border: 1px solid var(--line-2); border-radius: var(--r-md); background: var(--panel); overflow: hidden; }
.address-input:focus-within { border-color: var(--green); box-shadow: 0 0 0 4px var(--green-soft); }
.address-input input { border: 0; border-radius: 0; box-shadow: none !important; min-width: 0; }
.address-input span { display: flex; align-items: center; padding: 0 14px; background: var(--panel-2); color: var(--muted); font-size: 14px; white-space: nowrap; }
.hint { color: var(--muted); font-size: 13px; font-weight: 500; }
.error { color: var(--red); font-size: 14px; font-weight: 700; }
.error:empty { display: none; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 15px; }
.check input { width: 20px; height: 20px; margin: 1px 0 0; flex: none; accent-color: var(--green); }

/* Sign-in screens */
.auth { min-height: 100%; display: grid; grid-template-columns: 1.1fr 1fr; }
.auth-hero {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 48px;
  padding: 40px 56px;
  background: var(--green);
  color: #0b0b0c;
  overflow: hidden;
}
:root[data-theme="dark"] .auth-hero { background: radial-gradient(120% 80% at 0% 0%, rgba(0, 212, 106, .35), transparent 60%), #050607; color: var(--ink); border-right: 1px solid var(--line); }
.auth-hero::after {
  content: "";
  position: absolute;
  inset: auto -120px -160px auto;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  border: 1px solid currentColor;
  opacity: .12;
  box-shadow: 0 0 0 60px rgba(0, 0, 0, .03), 0 0 0 120px rgba(0, 0, 0, .02);
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 18px; letter-spacing: -.01em; color: inherit; text-decoration: none; }
.brand img { width: 34px; height: 34px; border-radius: 50%; }
.brand small { font-weight: 700; font-size: 13px; padding: 2px 8px; border-radius: 999px; background: rgba(0, 0, 0, .1); }
:root[data-theme="dark"] .brand small, .sidebar .brand small { background: var(--green-soft); color: var(--green-text); }
.auth-hero h1 { font-size: clamp(44px, 6vw, 80px); line-height: .98; font-weight: 800; letter-spacing: -.045em; max-width: 9ch; }
.auth-hero .lead { margin-top: 20px; max-width: 34ch; font-size: 18px; font-weight: 600; opacity: .8; }
.perks { display: grid; gap: 12px; padding: 0; margin: 0; list-style: none; font-weight: 700; }
.perks li { display: flex; gap: 10px; align-items: center; }
.perks svg { padding: 4px; width: 26px; height: 26px; border-radius: 50%; background: #0b0b0c; color: var(--green); }
:root[data-theme="dark"] .perks svg { background: var(--green-soft); }
.auth-main { display: grid; place-items: center; padding: 40px 24px; }
.auth-card { width: 100%; max-width: 420px; }
.auth-card h2 { font-size: 32px; line-height: 1.1; font-weight: 800; letter-spacing: -.03em; margin-bottom: 8px; }
.auth-card .sub { color: var(--muted); margin-bottom: 28px; }
.auth-alt { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 16px; margin-top: 24px; font-size: 14px; }
.notice { padding: 14px 16px; border-radius: var(--r-md); background: var(--amber-soft); color: var(--amber-ink); font-size: 14px; font-weight: 600; }
.code-box {
  padding: 20px;
  border: 2px dashed var(--green);
  border-radius: var(--r-md);
  background: var(--green-soft);
  font: 700 20px var(--mono);
  letter-spacing: .04em;
  text-align: center;
  word-break: break-all;
}

/* Mailbox shell */
.shell { height: 100%; display: grid; grid-template-columns: 264px minmax(0, 1fr); }
.sidebar { display: flex; flex-direction: column; gap: 18px; min-height: 0; padding: 18px 14px; background: var(--bg); overflow-y: auto; }
.sidebar .brand { padding: 4px 8px; }
.address-card { padding: 14px; border-radius: var(--r-lg); background: var(--ink); color: var(--panel); }
:root[data-theme="dark"] .address-card { background: linear-gradient(135deg, rgba(0, 212, 106, .22), rgba(0, 212, 106, .04)); border: 1px solid rgba(0, 212, 106, .3); color: var(--ink); }
.address-card .label { font-size: 12px; font-weight: 700; opacity: .65; text-transform: uppercase; letter-spacing: .06em; }
.address-card .addr { margin: 4px 0 12px; font-weight: 800; overflow-wrap: anywhere; line-height: 1.3; }
.address-card .row { display: flex; gap: 8px; }
.address-card .btn { flex: 1; min-height: 36px; padding: 0 10px; font-size: 13px; border: 0; }
.address-card .btn.copy { background: var(--green); color: #0b0b0c; }
.address-card .btn.alias { background: rgba(255, 255, 255, .14); color: inherit; }
:root[data-theme="dark"] .address-card .btn.alias { background: rgba(255, 255, 255, .08); }
.nav { display: grid; gap: 2px; padding: 0; margin: 0; list-style: none; }
.nav-title { display: flex; justify-content: space-between; align-items: center; padding: 0 12px; margin-bottom: 4px; color: var(--muted); font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; }
.nav a {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 42px;
  padding: 0 12px;
  border-radius: 999px;
  color: var(--ink-2);
  font-weight: 700;
  text-decoration: none;
}
.nav a:hover { background: var(--hover); }
.nav a[aria-current="page"] { background: var(--green-soft); color: var(--ink); }
.nav a[aria-current="page"] svg { color: var(--green-text); }
.nav a .count { margin-left: auto; font-size: 13px; font-weight: 800; }
.nav a .badge { margin-left: auto; min-width: 22px; padding: 1px 8px; border-radius: 999px; background: var(--green); color: #0b0b0c; font-size: 12px; font-weight: 800; text-align: center; }
.nav .tag-dot { width: 10px; height: 10px; margin: 0 5px; border-radius: 50%; flex: none; }
.nav .tag-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-empty { padding: 0 12px; color: var(--muted); font-size: 13px; }
.storage { margin-top: auto; padding: 14px; border-radius: var(--r-md); background: var(--panel); border: 1px solid var(--line); font-size: 13px; }
.meter { height: 6px; margin: 8px 0 6px; border-radius: 999px; background: var(--panel-2); overflow: hidden; }
.meter span { display: block; height: 100%; border-radius: inherit; background: var(--green); }
.storage .muted { color: var(--muted); }

.main { display: grid; grid-template-rows: auto minmax(0, 1fr); min-width: 0; min-height: 0; padding: 12px 12px 12px 0; }
.topbar { display: flex; align-items: center; gap: 10px; padding: 0 4px 12px; }
.search { position: relative; flex: 1; max-width: 720px; }
.search svg { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.search input { height: 48px; padding-left: 48px; padding-right: 44px; border-radius: 999px; background: var(--panel); border-color: var(--line); }
.search .clear { position: absolute; right: 4px; top: 4px; }
.top-actions { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.avatar-btn { width: 40px; height: 40px; border: 0; border-radius: 50%; background: var(--ink); color: var(--panel); font-weight: 800; }
.menu-btn { display: none; }
.menu {
  position: fixed;
  z-index: 30;
  min-width: 240px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--panel);
  box-shadow: var(--shadow);
}
.menu .who { padding: 8px 12px 10px; border-bottom: 1px solid var(--line); margin-bottom: 6px; font-size: 13px; color: var(--muted); }
.menu .who strong { display: block; color: var(--ink); font-size: 14px; overflow-wrap: anywhere; }
.menu button { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 40px; padding: 0 12px; border: 0; border-radius: 10px; background: none; font-weight: 700; text-align: left; }
.menu button:hover { background: var(--hover); }

.content { min-height: 0; display: grid; grid-template-columns: minmax(340px, 440px) minmax(0, 1fr); gap: 12px; }
.content.single { grid-template-columns: minmax(0, 1fr); }
.pane { min-height: 0; display: flex; flex-direction: column; border-radius: var(--r-lg); background: var(--panel); border: 1px solid var(--line); overflow: hidden; }

/* List */
.list-head { display: flex; align-items: center; gap: 8px; min-height: 60px; padding: 8px 12px 8px 16px; border-bottom: 1px solid var(--line); }
.list-head h1 { font-size: 18px; font-weight: 800; letter-spacing: -.02em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list-head .sel-count { font-weight: 800; }
.list-head .spacer { flex: 1; }
.list-head input[type="checkbox"], .mail-row input[type="checkbox"] { width: 18px; height: 18px; margin: 0; accent-color: var(--green); flex: none; cursor: pointer; }
.mail-list { flex: 1; min-height: 0; margin: 0; padding: 0; list-style: none; overflow-y: auto; }
.mail-row {
  position: relative;
  display: grid;
  grid-template-columns: auto 40px minmax(0, 1fr);
  gap: 4px 12px;
  align-items: start;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
}
.mail-row:hover { background: var(--hover); }
.mail-row.active { background: var(--green-soft); }
.mail-row.active::before { content: ""; position: absolute; left: 0; top: 10px; bottom: 10px; width: 4px; border-radius: 0 4px 4px 0; background: var(--green); }
.mail-row.selected { background: var(--green-soft); }
.mail-row .pick { display: grid; gap: 6px; justify-items: center; padding-top: 2px; }
.mail-row .pick .icon-btn { width: 28px; height: 28px; }
.mail-row .pick .icon-btn svg { width: 18px; height: 18px; }
.avatar { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; color: #fff; font-weight: 800; font-size: 16px; text-transform: uppercase; }
.row-body { min-width: 0; }
.row-top { display: flex; align-items: baseline; gap: 8px; }
.row-from { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink-2); }
.row-date { flex: none; color: var(--muted); font-size: 13px; font-weight: 600; }
.row-subject { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink-2); font-size: 14px; }
.row-snippet { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; color: var(--muted); font-size: 13px; line-height: 1.45; }
.unread .row-from, .unread .row-subject { color: var(--ink); font-weight: 800; }
.unread .row-date { color: var(--ink); font-weight: 800; }
.unread .row-from::before { content: ""; display: inline-block; width: 8px; height: 8px; margin-right: 7px; border-radius: 50%; background: var(--green); vertical-align: 1px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.chip { display: inline-flex; align-items: center; gap: 4px; padding: 2px 9px; border-radius: 999px; background: var(--panel-2); color: var(--ink-2); font-size: 12px; font-weight: 700; }
.chip svg { width: 13px; height: 13px; }
.chip.code { background: var(--ink); color: var(--panel); font-family: var(--mono); border: 0; }
:root[data-theme="dark"] .chip.code { background: var(--green-soft); color: var(--green-text); }
.chip.tag { background: var(--green-soft); color: var(--green-text); }
.empty { display: grid; justify-items: center; gap: 6px; padding: 56px 24px; text-align: center; color: var(--muted); }
.empty .bubble { display: grid; place-items: center; width: 64px; height: 64px; margin-bottom: 8px; border-radius: 50%; background: var(--green-soft); color: var(--green-text); }
.empty .bubble svg { width: 28px; height: 28px; }
.empty strong { color: var(--ink); font-size: 17px; }
.more { padding: 16px; text-align: center; }
.skeleton { padding: 16px; display: grid; gap: 14px; }
.skeleton div { height: 54px; border-radius: var(--r-sm); background: linear-gradient(90deg, var(--panel-2), var(--hover), var(--panel-2)); background-size: 200% 100%; animation: shimmer 1.2s linear infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* Reader */
.reader { overflow-y: auto; }
.reader-empty { margin: auto; display: grid; justify-items: center; gap: 10px; padding: 32px; text-align: center; color: var(--muted); }
.reader-empty img { width: 72px; height: 72px; border-radius: 50%; opacity: .9; }
.reader-empty strong { color: var(--ink); font-size: 18px; }
.kbd { display: inline-block; min-width: 22px; padding: 1px 6px; border: 1px solid var(--line-2); border-bottom-width: 2px; border-radius: 6px; font: 700 12px var(--mono); color: var(--ink-2); text-align: center; }
.toolbar { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; gap: 2px; min-height: 60px; padding: 8px 12px; border-bottom: 1px solid var(--line); background: var(--panel); }
.toolbar .spacer { flex: 1; }
.toolbar .sep { width: 1px; height: 24px; margin: 0 6px; background: var(--line); }
.message { display: flex; flex-direction: column; gap: 20px; padding: 24px 28px 32px; }
.message h2 { font-size: 26px; line-height: 1.2; font-weight: 800; letter-spacing: -.025em; overflow-wrap: anywhere; }
.sender { display: flex; align-items: center; gap: 12px; }
.sender .avatar { width: 46px; height: 46px; }
.sender-info { flex: 1; min-width: 0; }
.sender-name { font-weight: 800; overflow-wrap: anywhere; }
.sender-addr { color: var(--muted); font-size: 13px; overflow-wrap: anywhere; }
.sender-date { color: var(--muted); font-size: 13px; font-weight: 600; text-align: right; }
.code-banner {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 18px;
  border-radius: var(--r-lg);
  background: var(--green);
  color: #0b0b0c;
}
:root[data-theme="dark"] .code-banner { background: var(--green-soft); color: var(--ink); border: 1px solid rgba(0, 212, 106, .35); }
.code-banner .what { flex: 1; min-width: 0; }
.code-banner .what small { display: block; font-weight: 700; opacity: .7; font-size: 13px; }
.code-banner .what strong { font: 800 28px var(--mono); letter-spacing: .12em; overflow-wrap: anywhere; }
.code-banner .btn { background: #0b0b0c; border-color: #0b0b0c; color: #fff; }
:root[data-theme="dark"] .code-banner .btn { background: var(--green); border-color: var(--green); color: #04140b; }
.info-line { display: flex; align-items: center; gap: 8px; padding: 10px 14px; border-radius: var(--r-sm); background: var(--panel-2); color: var(--muted); font-size: 13px; font-weight: 600; }
.info-line svg { width: 16px; height: 16px; }
.attachments { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; }
.attachment {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--panel);
  text-align: left;
}
.attachment:hover { border-color: var(--green); }
.attachment .ext { display: grid; place-items: center; width: 40px; height: 40px; flex: none; border-radius: 10px; background: var(--green-soft); color: var(--green-text); font-size: 11px; font-weight: 800; text-transform: uppercase; }
.attachment .meta { min-width: 0; }
.attachment .name { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 700; font-size: 14px; }
.attachment .size { color: var(--muted); font-size: 12px; }
.body-text { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; font: 500 15px/1.65 var(--font); color: var(--ink-2); }
.body-text a { color: var(--green-text); font-weight: 700; }
.body-html { width: 100%; min-height: 560px; flex: 1; border: 1px solid var(--line); border-radius: var(--r-md); background: #fff; }

/* Settings */
.settings { overflow-y: auto; }
.settings-inner { max-width: 760px; padding: 28px; display: grid; gap: 18px; }
.settings h1 { font-size: 28px; font-weight: 800; letter-spacing: -.03em; }
.card { padding: 22px; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--panel); }
.card h2 { font-size: 18px; font-weight: 800; letter-spacing: -.01em; margin-bottom: 4px; }
.card > p { color: var(--muted); margin-bottom: 16px; font-size: 14px; }
.card.danger { border-color: color-mix(in srgb, var(--red) 35%, transparent); }
.inline-form { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; }
.inline-form > * { flex: 1 1 200px; }
.inline-form .btn { flex: 0 0 auto; }
.segmented { display: inline-flex; padding: 4px; gap: 4px; border-radius: 999px; background: var(--panel-2); }
.segmented button { min-height: 36px; padding: 0 16px; border: 0; border-radius: 999px; background: none; font-weight: 700; color: var(--muted); }
.segmented button[aria-pressed="true"] { background: var(--panel); color: var(--ink); box-shadow: var(--shadow-sm); }
.list-rows { display: grid; gap: 0; margin: 0; padding: 0; list-style: none; border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; }
.list-rows li { display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 6px 8px 6px 16px; border-bottom: 1px solid var(--line); }
.list-rows li:last-child { border-bottom: 0; }
.list-rows .grow { flex: 1; min-width: 0; overflow-wrap: anywhere; font-weight: 600; }
.list-rows .muted { color: var(--muted); font-size: 13px; }
.shortcuts { display: grid; grid-template-columns: auto 1fr; gap: 10px 16px; align-items: center; font-size: 14px; }

/* Dialog, toasts */
dialog { width: min(460px, calc(100vw - 32px)); padding: 26px; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--panel); color: var(--ink); box-shadow: var(--shadow); }
dialog::backdrop { background: rgba(0, 0, 0, .5); backdrop-filter: blur(2px); }
dialog h2 { font-size: 22px; font-weight: 800; letter-spacing: -.02em; margin-bottom: 8px; }
dialog p.desc { color: var(--muted); margin-bottom: 18px; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 8px; }
.alias-preview { display: flex; align-items: center; gap: 8px; padding: 12px 12px 12px 16px; border-radius: var(--r-md); background: var(--green-soft); font-weight: 800; overflow-wrap: anywhere; }
.alias-preview span { flex: 1; min-width: 0; }
#toasts { position: fixed; left: 50%; bottom: 24px; z-index: 50; display: grid; gap: 8px; transform: translateX(-50%); width: max-content; max-width: calc(100vw - 32px); }
.toast { display: flex; align-items: center; gap: 14px; padding: 10px 10px 10px 18px; border-radius: 999px; background: var(--ink); color: var(--panel); font-weight: 700; font-size: 14px; box-shadow: var(--shadow); animation: rise .2s ease-out; }
.toast button { min-height: 32px; padding: 0 14px; border: 0; border-radius: 999px; background: var(--green); color: #0b0b0c; font-weight: 800; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } }
.scrim { display: none; }

@media (max-width: 1180px) {
  .content { grid-template-columns: minmax(0, 1fr); }
  .content.reading .list-pane { display: none; }
  .content:not(.reading) .reader-pane { display: none; }
}
@media (max-width: 880px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .sidebar { position: fixed; inset: 0 auto 0 0; z-index: 40; width: 288px; max-width: 86vw; background: var(--bg); box-shadow: var(--shadow); transform: translateX(-105%); transition: transform .2s ease; }
  .shell.drawer .sidebar { transform: none; }
  .shell.drawer .scrim { display: block; position: fixed; inset: 0; z-index: 35; background: rgba(0, 0, 0, .45); }
  .main { padding: 8px; }
  .menu-btn { display: inline-grid; }
  .topbar { gap: 4px; padding: 0 0 8px; }
  .search input { height: 44px; }
  .top-actions .hide-sm { display: none; }
  .message { padding: 18px 16px 24px; }
  .message h2 { font-size: 21px; }
  .sender-date { display: none; }
  .code-banner { flex-wrap: wrap; }
  .code-banner .what strong { font-size: 22px; }
  .toolbar { overflow-x: auto; }
  .settings-inner { padding: 18px 14px; }
}
@media (max-width: 900px) {
  .auth { grid-template-columns: minmax(0, 1fr); }
  .auth-hero { padding: 28px 20px 32px; gap: 28px; }
  .auth-hero h1 { font-size: 44px; }
  .auth-hero .lead { font-size: 16px; }
  .auth-main { padding: 28px 16px 40px; }
}
@media print {
  .sidebar, .topbar, .list-pane, .toolbar { display: none !important; }
  .shell, .content { display: block; }
  .pane { border: 0; }
}

/* ---------- MinerSwap "Future" dark skin ---------- */
:root[data-theme="dark"] {
  --fx-line: rgba(255, 255, 255, .08);
  --fx-line-2: rgba(255, 255, 255, .14);
  --fx-glow: rgba(0, 212, 106, .35);
  --glass: linear-gradient(180deg, rgba(15, 18, 19, .86), rgba(8, 10, 11, .9));
  --glass-border: linear-gradient(160deg, rgba(92, 255, 176, .42), rgba(255, 255, 255, .08) 28%, rgba(255, 255, 255, .04) 72%, rgba(0, 212, 106, .28));
}
:root[data-theme="dark"] body { background: #050607; }
:root[data-theme="dark"] body::before,
:root[data-theme="dark"] body::after { content: ""; position: fixed; pointer-events: none; z-index: 0; }
:root[data-theme="dark"] body::before {
  inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, .07) 1px, transparent 1px);
  background-size: 28px 28px;
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 25%, transparent 75%);
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 25%, transparent 75%);
}
:root[data-theme="dark"] body::after {
  left: 50%;
  top: -340px;
  width: 1100px;
  max-width: 160vw;
  height: 640px;
  transform: translateX(-50%);
  background: radial-gradient(closest-side, rgba(0, 212, 106, .2), rgba(0, 212, 106, .05) 55%, transparent);
  filter: blur(20px);
}
:root[data-theme="dark"] #app { position: relative; z-index: 1; }
:root[data-theme="dark"] .sidebar { background: transparent; }
:root[data-theme="dark"] h1, :root[data-theme="dark"] h2 { font-weight: 700; letter-spacing: -.035em; }

/* Glass panels with the green gradient edge */
:root[data-theme="dark"] .pane,
:root[data-theme="dark"] .card,
:root[data-theme="dark"] dialog,
:root[data-theme="dark"] .menu {
  border: 1px solid transparent;
  background: var(--glass) padding-box, var(--glass-border) border-box;
  box-shadow: 0 40px 120px -50px rgba(0, 212, 106, .3), inset 0 1px 0 rgba(255, 255, 255, .05);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}
:root[data-theme="dark"] .card.danger { background: var(--glass) padding-box, linear-gradient(160deg, rgba(255, 122, 125, .5), rgba(255, 255, 255, .06) 40%, rgba(255, 122, 125, .2)) border-box; }
:root[data-theme="dark"] .toolbar { background: rgba(10, 12, 13, .85); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); }
:root[data-theme="dark"] .list-head, :root[data-theme="dark"] .toolbar, :root[data-theme="dark"] .mail-row { border-color: var(--fx-line); }

/* Pill search bar like the MinerSwap top nav */
:root[data-theme="dark"] .search input { background: rgba(8, 10, 11, .62); border-color: var(--fx-line); backdrop-filter: blur(16px) saturate(140%); -webkit-backdrop-filter: blur(16px) saturate(140%); }
:root[data-theme="dark"] .search input:focus { border-color: rgba(0, 212, 106, .6); box-shadow: 0 0 0 4px rgba(0, 212, 106, .12), 0 0 30px -8px var(--fx-glow); }
:root[data-theme="dark"] input[type="text"], :root[data-theme="dark"] input[type="password"], :root[data-theme="dark"] input[type="email"], :root[data-theme="dark"] .address-input { background: rgba(255, 255, 255, .04); border-color: var(--fx-line-2); }
:root[data-theme="dark"] .address-input input { background: transparent; }
:root[data-theme="dark"] .address-input span { background: rgba(255, 255, 255, .04); }

/* Buttons */
:root[data-theme="dark"] .btn { font-weight: 600; background: rgba(255, 255, 255, .05); border-color: var(--fx-line-2); }
:root[data-theme="dark"] .btn:hover { background: rgba(255, 255, 255, .08); border-color: rgba(255, 255, 255, .28); }
:root[data-theme="dark"] .btn.primary { background: var(--green); color: #02140a; border-color: transparent; box-shadow: 0 0 0 1px rgba(0, 212, 106, .4), 0 8px 30px -8px var(--fx-glow); }
:root[data-theme="dark"] .btn.primary:hover { background: var(--green); box-shadow: 0 0 0 1px rgba(92, 255, 176, .75), 0 10px 40px -6px var(--fx-glow); }
:root[data-theme="dark"] .btn.danger-fill { background: #ff4d4f; border-color: transparent; }
:root[data-theme="dark"] .avatar-btn { background: rgba(0, 212, 106, .12); color: var(--green-d); box-shadow: inset 0 0 0 1px rgba(0, 212, 106, .45); }

/* Mono eyebrows in green, as on minerautoswap.fr */
:root[data-theme="dark"] .nav-title,
:root[data-theme="dark"] .address-card .label,
:root[data-theme="dark"] .code-banner .what small {
  font-family: var(--mono);
  font-weight: 500;
  letter-spacing: .1em;
  color: var(--green);
}
:root[data-theme="dark"] .nav-title > span::before,
:root[data-theme="dark"] .address-card .label::before { content: ""; display: inline-block; width: 14px; height: 1px; margin-right: 8px; background: currentColor; vertical-align: middle; }
:root[data-theme="dark"] .nav a[aria-current="page"] { background: rgba(0, 212, 106, .1); box-shadow: inset 0 0 0 1px rgba(0, 212, 106, .25); }
:root[data-theme="dark"] .nav a .badge { box-shadow: 0 0 16px -4px var(--fx-glow); }
:root[data-theme="dark"] .storage { background: rgba(255, 255, 255, .03); border-color: var(--fx-line); }
:root[data-theme="dark"] .meter span { box-shadow: 0 0 12px var(--fx-glow); }

/* Rows and reader */
:root[data-theme="dark"] .mail-row:hover { background: rgba(255, 255, 255, .03); }
:root[data-theme="dark"] .mail-row.active, :root[data-theme="dark"] .mail-row.selected { background: rgba(0, 212, 106, .08); }
:root[data-theme="dark"] .mail-row.active::before { box-shadow: 0 0 14px var(--fx-glow); }
:root[data-theme="dark"] .code-banner { background: linear-gradient(135deg, rgba(0, 212, 106, .16), rgba(0, 212, 106, .03)); border: 1px solid rgba(0, 212, 106, .35); box-shadow: 0 30px 80px -40px var(--fx-glow); }
:root[data-theme="dark"] .code-banner .what strong { color: #fff; text-shadow: 0 0 24px rgba(0, 212, 106, .45); }
:root[data-theme="dark"] .info-line { background: rgba(255, 255, 255, .035); border: 1px solid var(--fx-line); }
:root[data-theme="dark"] .attachment { background: rgba(255, 255, 255, .03); border-color: var(--fx-line-2); }
:root[data-theme="dark"] .body-html { border-color: var(--fx-line-2); }
:root[data-theme="dark"] .toast { background: rgba(12, 15, 16, .92); color: var(--ink); border: 1px solid var(--fx-line-2); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); }
:root[data-theme="dark"] .empty .bubble { box-shadow: inset 0 0 0 1px rgba(0, 212, 106, .35), 0 0 40px -10px var(--fx-glow); }

/* Sign-in screen */
:root[data-theme="dark"] .auth-hero { background: transparent; border-right: 1px solid var(--fx-line); }
:root[data-theme="dark"] .auth-hero h1 { font-weight: 700; background: linear-gradient(180deg, #fff 30%, rgba(255, 255, 255, .55)); -webkit-background-clip: text; background-clip: text; color: transparent; }
:root[data-theme="dark"] .auth-card { padding: 32px; border-radius: var(--r-lg); border: 1px solid transparent; background: var(--glass) padding-box, var(--glass-border) border-box; box-shadow: 0 40px 120px -50px rgba(0, 212, 106, .35), inset 0 1px 0 rgba(255, 255, 255, .05); }
:root[data-theme="dark"] .perks svg { box-shadow: inset 0 0 0 1px rgba(0, 212, 106, .4); }
@media (max-width: 880px) {
  :root[data-theme="dark"] .sidebar { background: rgba(5, 6, 7, .96); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); }
}
@media (max-width: 900px) {
  :root[data-theme="dark"] .auth-card { padding: 22px; }
}
.search svg { z-index: 1; }
:root[data-theme="dark"] .address-card .btn.copy { background: var(--green); color: #02140a; border-color: transparent; box-shadow: 0 0 0 1px rgba(0, 212, 106, .4), 0 8px 30px -8px var(--fx-glow); }
:root[data-theme="dark"] .address-card .btn.alias { background: rgba(255, 255, 255, .06); border-color: var(--fx-line-2); }
:root[data-theme="dark"] .code-banner .btn { background: var(--green); color: #02140a; border-color: transparent; box-shadow: 0 8px 30px -8px var(--fx-glow); }
:root[data-theme="dark"] .toast button { background: var(--green); color: #02140a; }
:root[data-theme="dark"] .auth-hero h1 { padding-bottom: .1em; }
.auth-main { position: relative; }
.auth-theme { position: absolute; top: 20px; right: 20px; }
.auth-theme .icon-btn { border: 1px solid var(--line-2); background: var(--panel); }
:root[data-theme="dark"] .auth-theme .icon-btn { background: rgba(8, 10, 11, .62); border-color: var(--fx-line-2); color: var(--ink); }
@media (max-width: 900px) {
  .auth-main { padding-top: 76px; }
  .auth-theme { top: 16px; right: 16px; }
}
@media (max-width: 900px) {
  .auth { position: relative; }
  .auth-main { position: static; padding-top: 28px; }
  .auth-theme { top: 22px; right: 16px; }
}

/* ---------- Accounts and profile photo ---------- */
img.avatar { display: block; object-fit: cover; background: var(--panel-2); }
.avatar-btn { display: grid; place-items: center; padding: 0; overflow: hidden; background: none; }
.avatar-btn .avatar { width: 40px; height: 40px; }
.avatar-btn:hover { box-shadow: 0 0 0 4px var(--green-soft); }
:root[data-theme="dark"] .avatar-btn { background: none; box-shadow: 0 0 0 1px rgba(0, 212, 106, .45); }
.account-menu { width: 330px; max-width: calc(100vw - 16px); max-height: calc(100vh - 90px); overflow-y: auto; }
.account-head { display: grid; justify-items: center; gap: 10px; padding: 16px 12px 18px; margin-bottom: 6px; border-bottom: 1px solid var(--line); text-align: center; }
.account-head strong { font-size: 16px; overflow-wrap: anywhere; }
.avatar-edit { position: relative; padding: 0; border: 0; border-radius: 50%; background: none; }
.avatar-edit .avatar { box-shadow: 0 0 0 3px var(--panel), 0 0 0 5px var(--green); }
.avatar-edit .cam { position: absolute; right: -4px; bottom: -4px; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--green); color: #0b0b0c; border: 2px solid var(--panel); }
.avatar-edit .cam svg { width: 14px; height: 14px; }
.avatar-edit:hover .cam { transform: scale(1.08); }
.menu-label { padding: 4px 12px 6px; color: var(--muted); font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; }
:root[data-theme="dark"] .menu-label { font-family: var(--mono); font-weight: 500; letter-spacing: .1em; color: var(--green); }
.account-list { display: grid; padding-bottom: 6px; margin-bottom: 6px; border-bottom: 1px solid var(--line); }
.menu .account-item { min-height: 48px; }
.menu .account-item .grow { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.menu .badge { min-width: 22px; padding: 1px 8px; border-radius: 999px; background: var(--green); color: #0b0b0c; font-size: 12px; font-weight: 800; text-align: center; }
.menu .sep { height: 1px; margin: 6px 0; background: var(--line); }
.photo-row { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.photo-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.menu .avatar-edit { display: block; width: auto; min-height: 0; padding: 0; border-radius: 50%; }
.menu .avatar-edit:hover { background: none; }
.menu .account-head .btn { width: auto; justify-content: center; }
