:root {
  --bg: #f6f7fb;
  --surface: #ffffff;
  --surface-2: #f1f3f9;
  --text: #0f172a;
  --text-2: #475569;
  --muted: #8a94a8;
  --border: #e4e8f0;
  --primary: #4f46e5;
  --primary-2: #7c3aed;
  --primary-hover: #4338ca;
  --primary-soft: #eef0ff;
  --danger: #dc2626;
  --danger-soft: #fef2f2;
  --success: #16a34a;
  --hero-a: #eef0ff;
  --hero-b: #f6f7fb;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.05);
  --shadow: 0 1px 3px rgba(15, 23, 42, 0.05), 0 10px 30px -12px rgba(15, 23, 42, 0.12);
  --shadow-lg: 0 20px 50px -20px rgba(79, 70, 229, 0.35);
  --radius: 16px;
  --radius-sm: 10px;
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, Consolas, monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b0d14;
    --surface: #131722;
    --surface-2: #1a1f2d;
    --text: #e8ebf3;
    --text-2: #b4bccd;
    --muted: #7d879c;
    --border: #252b3a;
    --primary: #818cf8;
    --primary-2: #a78bfa;
    --primary-hover: #a5b4fc;
    --primary-soft: #1e2140;
    --danger: #f87171;
    --danger-soft: #2a1618;
    --hero-a: #161a33;
    --hero-b: #0b0d14;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 20px 50px -20px rgba(0, 0, 0, 0.7);
  }
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.55;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}

button, input, select { font: inherit; color: inherit; }
code { font-family: var(--mono); font-size: 0.9em; background: var(--primary-soft); color: var(--primary); padding: 1px 6px; border-radius: 6px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
[hidden] { display: none !important; }

.container { width: 100%; max-width: 1140px; margin: 0 auto; padding: 0 20px; }

/* ---------------- Top bar ---------------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: color-mix(in srgb, var(--surface) 82%, transparent);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--border);
  padding-top: env(safe-area-inset-top, 0px);
}
.topbar-inner {
  max-width: 1140px;
  margin: 0 auto;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; font-size: 19px; letter-spacing: -0.02em; color: var(--text); text-decoration: none; }
.brand-mark {
  width: 34px; height: 34px; border-radius: 10px;
  display: grid; place-items: center;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  color: #fff;
  box-shadow: 0 6px 16px -6px rgba(79, 70, 229, 0.6);
}
.brand-mark svg { width: 19px; height: 19px; }

.tabs { display: flex; gap: 2px; background: var(--surface-2); padding: 4px; border-radius: 12px; border: 1px solid var(--border); }
.tab {
  border: 0; background: transparent; color: var(--text-2);
  padding: 8px 16px; border-radius: 9px; font-weight: 600; font-size: 14px; cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.tab:hover { color: var(--text); }
.tab.active { background: var(--surface); color: var(--primary); box-shadow: var(--shadow-sm); }

/* ---------------- Hero ---------------- */
.hero {
  background:
    radial-gradient(900px 380px at 15% -10%, var(--hero-a), transparent 70%),
    radial-gradient(700px 320px at 95% 0%, color-mix(in srgb, var(--primary-2) 12%, transparent), transparent 70%),
    var(--hero-b);
  padding: 44px 0 28px;
}
.hero-copy { text-align: center; max-width: 680px; margin: 0 auto 28px; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13px; font-weight: 600; color: var(--primary);
  background: var(--surface); border: 1px solid var(--border);
  padding: 5px 12px; border-radius: 999px; box-shadow: var(--shadow-sm);
}
h1 { font-size: clamp(30px, 5vw, 46px); line-height: 1.1; letter-spacing: -0.035em; margin: 16px 0 12px; font-weight: 800; }
.grad { background: linear-gradient(90deg, var(--primary), var(--primary-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lead { font-size: 17px; color: var(--text-2); margin: 0; }

.pulse { position: relative; width: 8px; height: 8px; border-radius: 50%; background: var(--success); display: inline-block; flex-shrink: 0; }
.pulse::after { content: ''; position: absolute; inset: 0; border-radius: 50%; background: var(--success); animation: ping 1.8s cubic-bezier(0, 0, 0.2, 1) infinite; }
@keyframes ping { 75%, 100% { transform: scale(2.4); opacity: 0; } }

/* ---------------- Cards ---------------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.generator { padding: 20px; max-width: 900px; margin: 0 auto; }

.address-card {
  scroll-margin-top: 84px;
  max-width: 900px;
  margin: 0 auto 16px;
  padding: 22px;
  border-radius: 20px;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  color: #fff;
  box-shadow: var(--shadow-lg);
}
.address-label { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; opacity: 0.8; }
.address-row { display: flex; align-items: center; gap: 12px; margin-top: 8px; }
.address {
  flex: 1; min-width: 0;
  font-family: var(--mono); font-weight: 600;
  font-size: clamp(17px, 3.2vw, 26px);
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.22);
  padding: 12px 16px; border-radius: 12px;
  overflow-wrap: anywhere; cursor: pointer;
}
.address-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 12px; flex-wrap: wrap; }
.address-card .meta { font-size: 13px; opacity: 0.85; }
.address-card .actions { display: flex; gap: 6px; }
.address-card .btn-ghost { color: #fff; border-color: rgba(255, 255, 255, 0.28); background: rgba(255, 255, 255, 0.08); }
.address-card .btn-ghost:hover { background: rgba(255, 255, 255, 0.18); border-color: rgba(255, 255, 255, 0.45); }
.address-card .btn-copy { background: #fff; color: var(--primary); border-color: #fff; height: 50px; padding: 0 20px; }
.address-card .btn-copy:hover { background: #eef0ff; }
@media (prefers-color-scheme: dark) {
  .address-card { background: linear-gradient(135deg, #4f46e5, #7c3aed); }
  .address-card .btn-copy { color: #4f46e5; }
}

/* ---------------- Forms ---------------- */
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field + .field, .generator > .field + .gen-row, .generator > .gen-row + .field, .generator > .field + .field { margin-top: 16px; }
.field > label { font-weight: 600; font-size: 13px; color: var(--text-2); }
.gen-row { display: grid; grid-template-columns: 1fr 1fr auto; gap: 12px; align-items: end; margin-top: 16px; }
.alias-row { grid-template-columns: 1fr 140px; margin-top: 0; }
.generator > .gen-row:last-of-type:not(.alias-row) { grid-template-columns: 1fr auto; }
#tab-temp .generator > .gen-row { grid-template-columns: 1fr 1fr auto; }

input[type='text'], input[type='email'], input[type='number'], select {
  width: 100%; height: 46px; padding: 0 14px;
  border-radius: var(--radius-sm); border: 1px solid var(--border);
  background: var(--surface-2); color: var(--text);
  font-size: 15px; transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
}
select {
  appearance: none; -webkit-appearance: none; padding-right: 38px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238a94a8' stroke-width='3' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center;
}
input:focus, select:focus { outline: none; border-color: var(--primary); background-color: var(--surface); box-shadow: 0 0 0 4px color-mix(in srgb, var(--primary) 18%, transparent); }
input::placeholder { color: var(--muted); }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex; align-items: center; gap: 8px;
  height: 38px; padding: 0 14px; border-radius: 999px;
  border: 1px solid var(--border); background: var(--surface);
  font-weight: 600; font-size: 14px; cursor: pointer; color: var(--text-2);
  transition: all 0.15s;
}
.chip:hover:not(:disabled) { border-color: var(--primary); color: var(--text); }
.chip.active { border-color: var(--primary); background: var(--primary-soft); color: var(--primary); box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 12%, transparent); }
.chip:disabled { opacity: 0.45; cursor: not-allowed; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--success); }
.dot.off { background: var(--danger); }

.check {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 9px 14px; border: 1px solid var(--border); border-radius: 12px;
  cursor: pointer; background: var(--surface); font-weight: 600; font-size: 14px;
}
.check:has(input:checked) { border-color: var(--primary); background: var(--primary-soft); }
.check input { width: 17px; height: 17px; accent-color: var(--primary); margin: 0; }
.check em { font-style: normal; font-weight: 400; color: var(--muted); font-family: var(--mono); font-size: 12px; margin-left: 4px; }

/* ---------------- Buttons ---------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  height: 40px; padding: 0 14px; border-radius: var(--radius-sm);
  border: 1px solid var(--border); background: var(--surface); color: var(--text);
  font-weight: 600; font-size: 14px; cursor: pointer; white-space: nowrap;
  transition: background 0.15s, border-color 0.15s, transform 0.05s, box-shadow 0.15s;
  -webkit-tap-highlight-color: transparent;
}
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: 0.65; cursor: progress; }
.btn .ic { width: 17px; height: 17px; flex-shrink: 0; }
.btn-primary { background: linear-gradient(135deg, var(--primary), var(--primary-2)); border-color: transparent; color: #fff; box-shadow: 0 6px 18px -8px rgba(79, 70, 229, 0.7); }
.btn-primary:hover { filter: brightness(1.06); }
.btn-ghost { background: transparent; }
.btn-ghost:hover { background: var(--surface-2); }
.btn-ghost.danger:hover { color: var(--danger); border-color: color-mix(in srgb, var(--danger) 40%, transparent); background: var(--danger-soft); }
.btn-lg { height: 46px; padding: 0 22px; font-size: 15px; }
.btn-sm { height: 32px; padding: 0 10px; font-size: 13px; }

/* ---------------- Mail area ---------------- */
.mail-area { display: grid; grid-template-columns: minmax(0, 380px) minmax(0, 1fr); gap: 16px; margin-top: 24px; }
.inbox, .viewer { min-height: 540px; overflow: hidden; }
.inbox { display: flex; flex-direction: column; }

.pane-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 16px 18px; border-bottom: 1px solid var(--border); }
.pane-head.flat { border-bottom: 0; padding-bottom: 6px; }
.pane-head h2 { margin: 0; font-size: 16px; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.badge { min-width: 24px; height: 22px; padding: 0 7px; border-radius: 999px; background: var(--primary-soft); color: var(--primary); font-size: 12px; font-weight: 700; display: inline-grid; place-items: center; }
.live { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); font-weight: 500; }

.messages { list-style: none; margin: 0; padding: 0; overflow-y: auto; flex: 1; max-height: 720px; }
.messages li { position: relative; padding: 14px 18px 14px 22px; border-bottom: 1px solid var(--border); cursor: pointer; transition: background 0.12s; }
.messages li:hover { background: var(--surface-2); }
.messages li.active { background: var(--primary-soft); }
.messages li.active::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--primary); }
.messages li.unread::after { content: ''; position: absolute; left: 9px; top: 21px; width: 7px; height: 7px; border-radius: 50%; background: var(--primary); }
.messages li.unread .m-subject { font-weight: 700; color: var(--text); }
.m-top { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; }
.m-from { font-weight: 600; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.m-top > span:last-child { color: var(--muted); flex-shrink: 0; font-size: 12px; }
.m-subject { margin-top: 3px; font-size: 14px; color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.m-intro { margin-top: 2px; font-size: 13px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.messages .waiting { cursor: default; text-align: center; color: var(--text-2); padding: 70px 24px; border-bottom: 0; font-weight: 600; }
.messages .waiting:hover { background: none; }
.messages .waiting .small { font-weight: 400; color: var(--muted); }

.spinner { width: 34px; height: 34px; margin: 0 auto 16px; border: 3px solid var(--border); border-top-color: var(--primary); border-radius: 50%; animation: spin 0.9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.viewer { display: flex; flex-direction: column; }
#viewerContent { display: flex; flex-direction: column; flex: 1; }
.viewer-head { padding: 18px 20px 12px; border-bottom: 1px solid var(--border); }
.viewer-head h3 { margin: 0 0 10px; font-size: 20px; line-height: 1.3; letter-spacing: -0.01em; overflow-wrap: anywhere; }
.viewer-meta { display: grid; gap: 3px; font-size: 13px; color: var(--text-2); overflow-wrap: anywhere; }
.viewer-meta .k { display: inline-block; width: 42px; color: var(--muted); font-weight: 600; }
#vAttachments:empty { display: none; }
.viewer-tools { display: flex; justify-content: flex-end; margin-top: 8px; }
.viewer-tools:has(#textToggleBtn[hidden]) { display: none; }
#vFrame { width: 100%; min-height: 440px; border: 0; background: #fff; display: block; }
.back { display: none; margin: -4px 0 10px -8px; height: 34px; }

.empty { margin: auto; text-align: center; padding: 40px 24px; }
.empty-icon { width: 64px; height: 64px; margin: 0 auto 14px; border-radius: 18px; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary); }
.empty-icon svg { width: 30px; height: 30px; }
.empty-title { font-weight: 700; margin: 0 0 4px; }
.empty p { margin: 0; }

/* ---------------- History / aliases ---------------- */
.history { margin-top: 16px; }
.history-list, .alias-list { list-style: none; margin: 0; padding: 4px 18px 10px; }
.history-list li, .alias-list li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--border); }
.history-list li:first-child, .alias-list li:first-child { border-top: 0; }
.history-list li.current-item .h-addr { color: var(--primary); }
.h-addr, .a-addr { font-family: var(--mono); font-size: 14px; font-weight: 500; overflow-wrap: anywhere; }
.h-actions { display: flex; gap: 6px; flex-shrink: 0; }
.h-actions .btn { height: 32px; padding: 0 10px; font-size: 13px; }
.alias-list .btn { height: 32px; padding: 0 12px; font-size: 13px; flex-shrink: 0; }
#aliasBox { margin-top: 24px; }
.note { margin: 16px 0 0; padding: 14px 18px; font-size: 14px; color: var(--text-2); }

.error { color: var(--danger); margin: 12px 0 0; font-weight: 500; }

/* ---------------- Features & footer ---------------- */
.features { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin: 48px 0 8px; }
.feature { padding: 20px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.feature h3 { margin: 12px 0 4px; font-size: 15px; }
.feature p { margin: 0; font-size: 14px; color: var(--text-2); }
.f-ic { width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary); }
.f-ic svg { width: 21px; height: 21px; }

.footer { margin-top: 48px; border-top: 1px solid var(--border); background: var(--surface); padding: 22px 0 calc(22px + env(safe-area-inset-bottom, 0px)); }
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: 13px; }
.small-brand { font-size: 15px; }
.small-brand .brand-mark { width: 26px; height: 26px; border-radius: 8px; }
.small-brand .brand-mark svg { width: 15px; height: 15px; }

.toast {
  position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%);
  background: var(--text); color: var(--bg);
  padding: 11px 18px; border-radius: 12px; font-weight: 600; font-size: 14px;
  box-shadow: 0 12px 30px -10px rgba(0, 0, 0, 0.35); z-index: 100;
  max-width: calc(100% - 32px); animation: toast-in 0.2s ease-out;
}
.toast.error-toast { background: var(--danger); color: #fff; }
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, 8px); } }

/* ---------------- Confirm popup ---------------- */
.confirm-overlay {
  position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; padding: 16px;
  background: rgba(0, 0, 0, 0.55); animation: fade-in 0.15s ease-out;
}
.confirm-box {
  width: 100%; max-width: 420px; background: var(--surface); color: var(--text);
  border: 1px solid var(--border-strong); border-radius: 16px; padding: 22px;
  box-shadow: 0 24px 60px -20px rgba(0, 0, 0, 0.6);
}
.confirm-msg { margin: 0 0 18px; line-height: 1.5; font-size: 15px; overflow-wrap: anywhere; }
.confirm-actions { display: flex; justify-content: flex-end; gap: 10px; flex-wrap: wrap; }
.confirm-actions .danger-btn { background: var(--danger); border-color: var(--danger); color: #fff; }
@keyframes fade-in { from { opacity: 0; } }

/* ---------------- Responsive ---------------- */
@media (max-width: 960px) {
  .features { grid-template-columns: repeat(2, 1fr); }
  .mail-area { grid-template-columns: minmax(0, 320px) minmax(0, 1fr); }
}

@media (max-width: 760px) {
  body { font-size: 14px; }
  .container, .topbar-inner { padding-left: 16px; padding-right: 16px; }
  .topbar-inner { padding-top: 10px; padding-bottom: 10px; }
  .brand { font-size: 17px; gap: 8px; }
  .brand-mark { width: 30px; height: 30px; border-radius: 9px; }
  .brand-mark svg { width: 17px; height: 17px; }
  .tabs { padding: 3px; border-radius: 10px; }
  .tab { padding: 6px 11px; font-size: 13px; border-radius: 8px; }

  .hero { padding: 22px 0 16px; }
  .hero-copy { margin-bottom: 18px; }
  .eyebrow { font-size: 12px; padding: 4px 10px; }
  h1 { font-size: 28px; margin: 12px 0 8px; }
  .lead { font-size: 14.5px; }

  .generator { padding: 16px; border-radius: 16px; }
  #tab-temp .generator > .gen-row,
  .generator > .gen-row:last-of-type:not(.alias-row) { grid-template-columns: 1fr; gap: 12px; margin-top: 14px; }
  .alias-row { grid-template-columns: 1fr 96px; }
  .gen-row .btn-lg { width: 100%; height: 50px; margin-top: 2px; }
  input[type='text'], input[type='email'], input[type='number'], select { height: 48px; font-size: 16px; }

  /* Networks: tidy 2-column grid instead of a clipped scroller */
  #providerList { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
  #providerList .chip { justify-content: center; width: 100%; height: 42px; padding: 0 10px; }
  .chip, .check { flex-shrink: 0; }
  #tab-gmail .chips { flex-direction: column; }
  #tab-gmail .check { width: 100%; }

  .address-card { padding: 16px; border-radius: 18px; margin-bottom: 14px; }
  .address-row { flex-direction: column; align-items: stretch; gap: 10px; }
  .address { text-align: center; padding: 12px 10px; font-size: 17px; }
  .address-card .btn-copy { width: 100%; height: 48px; font-size: 15px; }
  .address-foot { flex-direction: column; align-items: stretch; gap: 10px; }
  .address-card .meta { text-align: center; }
  .address-card .actions { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 8px; }
  .address-card .actions .btn { width: 100%; padding: 0 8px; height: 42px; }
  .timer { font-size: 13px; padding: 3px 9px; }

  .mail-area { grid-template-columns: 1fr; margin-top: 14px; gap: 14px; }
  .mail-area.reading .inbox { display: none; }
  .mail-area:not(.reading) .viewer { display: none; }
  .inbox, .viewer { min-height: 0; }
  .messages { max-height: none; }
  .messages .waiting { padding: 44px 20px; }
  .back { display: inline-flex; }
  .viewer-head { padding: 14px 16px 10px; }
  .viewer-head h3 { font-size: 17px; }
  #vFrame { min-height: 360px; }

  .history-list { padding: 4px 16px 10px; }
  .history-list li { flex-direction: column; align-items: stretch; gap: 10px; }
  .h-actions { display: grid; grid-template-columns: 1fr 1fr auto; }
  .h-actions .btn { width: 100%; height: 36px; }

  .features { grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 28px; }
  .feature { padding: 14px; }
  .feature h3 { font-size: 14px; margin-top: 10px; }
  .feature p { font-size: 12.5px; }
  .footer { margin-top: 32px; }
  .footer-inner { flex-direction: column; text-align: center; }

  /* Once an address exists, get the intro out of the way so the inbox is on screen */
  body.has-inbox #tab-temp .hero-copy { display: none; }
  body.has-inbox #tab-temp .hero { padding-top: 16px; }
}

@media (max-width: 380px) {
  .features { grid-template-columns: 1fr; }
  h1 { font-size: 25px; }
  .address { font-size: 14.5px; padding: 12px 8px; }
  .address-card .actions .btn { font-size: 12.5px; gap: 4px; padding: 0 4px; }
  .address-card .actions .btn .ic { width: 15px; height: 15px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---------------- Expiry timer ---------------- */
.address-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.timer {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--mono); font-weight: 600; font-size: 15px;
  background: rgba(255, 255, 255, 0.16); border: 1px solid rgba(255, 255, 255, 0.25);
  padding: 4px 10px; border-radius: 999px; font-variant-numeric: tabular-nums;
}
.timer .ic { width: 15px; height: 15px; }
.timer.warn { background: #fef3c7; color: #92400e; border-color: #fde68a; animation: nudge 1s ease-in-out infinite alternate; }
@keyframes nudge { to { transform: scale(1.05); } }

.address-card.expired { background: linear-gradient(135deg, #475569, #334155); box-shadow: none; }
.address-card.expired .address { text-decoration: line-through; opacity: 0.7; cursor: default; }
.address-card.expired #copyBtn, .address-card.expired #refreshBtn { display: none; }
.expired-note {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  margin-top: 14px; padding: 12px 14px; border-radius: 12px;
  background: rgba(255, 255, 255, 0.1); border: 1px solid rgba(255, 255, 255, 0.2); font-size: 14px;
}
.btn-light { background: #fff; color: #0f172a; border-color: #fff; }
.btn-light:hover { background: #eef0ff; }

.pill { display: inline-flex; align-items: center; height: 20px; padding: 0 8px; border-radius: 999px; font-size: 11px; font-weight: 700; letter-spacing: 0.02em; }
.pill-ok { background: color-mix(in srgb, var(--success) 14%, transparent); color: var(--success); }
.pill-muted { background: var(--surface-2); color: var(--muted); border: 1px solid var(--border); }
.h-main { min-width: 0; }
.h-sub { display: flex; align-items: center; gap: 8px; margin-top: 4px; font-size: 12px; flex-wrap: wrap; }
.history-list li.is-expired .h-addr { color: var(--muted); }
.empty-icon.small-icon { width: 48px; height: 48px; border-radius: 14px; margin-bottom: 12px; }
.empty-icon.small-icon svg { width: 24px; height: 24px; }

/* ---------------- Maintenance ---------------- */
.maintenance { padding: 80px 0; }
.maintenance-card { max-width: 560px; margin: 0 auto; padding: 44px 28px; text-align: center; }
.maintenance-card h1 { font-size: 30px; margin: 8px 0; }

@media (max-width: 760px) {
  .address-top .address-label { font-size: 11px; }
  .expired-note { flex-direction: column; align-items: stretch; text-align: center; }
}

/* ---------------- Polish ---------------- */
.nowrap { white-space: nowrap; }
h1, .lead { text-wrap: balance; }
body.has-inbox #tab-temp .hero { padding-top: 28px; }
body.has-inbox #tab-temp .hero-copy .lead,
body.has-inbox #tab-temp .hero-copy .eyebrow { display: none; }
body.has-inbox #tab-temp .hero-copy h1 { font-size: clamp(24px, 3vw, 30px); margin: 0 0 4px; }
body.has-inbox #tab-temp .hero-copy { margin-bottom: 18px; }
.chip, .btn, .tab { touch-action: manipulation; }
.gen-row > .field + .field { margin-top: 0; }

/* ---------------- Collapsible generator (mobile) ---------------- */
.new-address-btn { display: none; }
@media (max-width: 760px) {
  body.has-inbox:not(.show-generator) #generatorCard { display: none; }
  body.has-inbox .new-address-btn {
    display: flex; width: 100%; height: 46px; margin: 0 0 4px;
    background: var(--surface); border: 1px dashed color-mix(in srgb, var(--primary) 45%, var(--border));
    color: var(--primary); border-radius: 14px;
  }
  body.has-inbox.show-generator .new-address-btn { margin-bottom: 12px; border-style: solid; }
}

/* ==========================================================================
   Liquid Glass address card
   Layers ported from github.com/CodewithAsif396/ios-liquid-glass (LiquidGlass.vue)
   ========================================================================== */
.glass-scene { position: relative; max-width: 900px; margin: 0 auto; isolation: isolate; }
.glass-scene:has(#currentBox[hidden]) .glass-blobs { display: none; }

/* Colour behind the glass, so there is something to refract */
.glass-blobs {
  position: absolute; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; border-radius: 26px;
  background:
    radial-gradient(120% 90% at 50% 120%, rgba(34, 211, 238, 0.18), transparent 60%),
    linear-gradient(160deg, #0a1a3f 0%, #081230 45%, #050b22 100%);
}
.glass-blobs span { position: absolute; border-radius: 50%; will-change: transform; filter: blur(2px); }
.glass-blobs span:nth-child(1) { width: 38%; aspect-ratio: 1; left: -8%; top: -45%; background: radial-gradient(circle, #22d3ee 0%, rgba(14, 165, 233, 0.75) 35%, rgba(14, 165, 233, 0) 70%); animation: blob-a 14s ease-in-out infinite alternate; }
.glass-blobs span:nth-child(2) { width: 34%; aspect-ratio: 1; right: -6%; top: -30%; background: radial-gradient(circle, #3b82f6 0%, rgba(37, 99, 235, 0.8) 35%, rgba(37, 99, 235, 0) 70%); animation: blob-b 17s ease-in-out infinite alternate; }
.glass-blobs span:nth-child(3) { width: 30%; aspect-ratio: 1; left: 34%; bottom: -60%; background: radial-gradient(circle, #6366f1 0%, rgba(79, 70, 229, 0.75) 35%, rgba(79, 70, 229, 0) 70%); animation: blob-c 19s ease-in-out infinite alternate; }
.glass-blobs span:nth-child(4) { width: 18%; aspect-ratio: 1; right: 24%; bottom: -25%; background: radial-gradient(circle, #67e8f9 0%, rgba(34, 211, 238, 0.7) 35%, rgba(34, 211, 238, 0) 70%); animation: blob-a 12s ease-in-out infinite alternate-reverse; }
@keyframes blob-a { to { transform: translate(18%, 22%) scale(1.08); } }
@keyframes blob-b { to { transform: translate(-16%, 26%) scale(0.94); } }
@keyframes blob-c { to { transform: translate(-22%, -18%) scale(1.1); } }

.address-card.lg {
  --lg-light:
    radial-gradient(58% 140% at 100% 0%, rgba(255, 255, 255, 1) 0%, rgba(255, 255, 255, 0.5) 35%, rgba(255, 255, 255, 0) 72%),
    radial-gradient(48% 120% at 0% 100%, rgba(255, 255, 255, 0.8) 0%, rgba(255, 255, 255, 0.3) 35%, rgba(255, 255, 255, 0) 70%),
    linear-gradient(rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.16));
  position: relative;
  z-index: 1;
  background: rgba(8, 18, 48, 0.28);
  box-shadow: 0 0 0 1px rgba(56, 189, 248, 0.25), 0 20px 50px -18px rgba(14, 165, 233, 0.55);
  border-radius: 26px;
  text-shadow: 0 1px 2px rgba(15, 23, 42, 0.25);
}
.address-card.lg > :not(.lg-defs, .lg-surface, .lg-bloom, .lg-bevel, .lg-rim) { position: relative; z-index: 4; }

.lg-defs { position: absolute; width: 0; height: 0; overflow: hidden; pointer-events: none; }
.lg-surface, .lg-bevel, .lg-rim { position: absolute; inset: 0; border-radius: inherit; pointer-events: none; }
.lg-surface {
  z-index: 0;
  overflow: hidden;
  box-shadow:
    0 18px 40px -14px rgba(30, 27, 90, 0.45),
    0 2px 6px rgba(0, 0, 0, 0.08),
    inset 0 0 0 0.5px rgba(0, 0, 0, 0.06),
    inset 0 -10px 24px -18px rgba(0, 0, 0, 0.25);
}
/* Safari / Firefox: frosted glass fallback */
.address-card[data-liquid-glass='frosted'] .lg-surface { backdrop-filter: blur(22px) saturate(1.7); -webkit-backdrop-filter: blur(22px) saturate(1.7); }
.address-card[data-liquid-glass='frosted'] { background: rgba(8, 18, 48, 0.35); }

.lg-bloom {
  position: absolute; inset: -12px; z-index: 1; pointer-events: none;
  opacity: var(--lg-shine);
  background: radial-gradient(closest-side, rgba(255, 255, 255, 0.5), rgba(255, 255, 255, 0) 100%) calc(100% - 10px) 2px / 34% 22px no-repeat;
  filter: blur(4px);
}
.lg-bevel { z-index: 2; filter: blur(5px); opacity: calc(var(--lg-shine) * 0.7); }
.lg-bevel-ring, .lg-rim {
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask-composite: exclude;
}
.lg-bevel-ring { position: absolute; inset: 0; padding: 7px; border-radius: inherit; background: var(--lg-light); }
.lg-rim { z-index: 3; padding: 1.5px; background: var(--lg-light); opacity: calc(0.35 + var(--lg-shine) * 0.65); }

/* Inner controls become glassy chips instead of flat white blocks */
.address-card.lg .address { background: rgba(255, 255, 255, 0.12); border-color: rgba(255, 255, 255, 0.28); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25); }
.address-card.lg .btn-ghost { background: rgba(255, 255, 255, 0.12); border-color: rgba(255, 255, 255, 0.3); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22); }
.address-card.lg .btn-ghost:hover { background: rgba(255, 255, 255, 0.22); }
.address-card.lg .btn-copy { text-shadow: none; box-shadow: 0 6px 16px -8px rgba(15, 23, 42, 0.5); }
.address-card.lg .timer:not(.warn) { background: rgba(255, 255, 255, 0.16); border-color: rgba(255, 255, 255, 0.32); }
.address-card.lg .expired-note { background: rgba(255, 255, 255, 0.1); }

/* Expired: glass loses its colour */
.glass-scene:has(.address-card.expired) .glass-blobs span { opacity: 0.35; animation-play-state: paused; }
.address-card.lg.expired { background: rgba(8, 18, 48, 0.45); box-shadow: 0 0 0 1px rgba(148, 163, 184, 0.2); }

@media (max-width: 760px) {
  .glass-blobs { border-radius: 22px; }
  .glass-blobs span:nth-child(1) { width: 70%; top: -30%; left: -25%; }
  .glass-blobs span:nth-child(2) { width: 60%; top: 35%; right: -30%; }
  .glass-blobs span:nth-child(3) { width: 55%; bottom: -35%; left: 10%; }
  .glass-blobs span:nth-child(4) { display: none; }
  .address-card.lg { border-radius: 22px; }
}
@media (prefers-reduced-motion: reduce) { .glass-blobs span { animation: none; } }

/* ==========================================================================
   Home hero: smooth neon-navy aurora behind the liquid glass cards
   ========================================================================== */
.page-app #tab-temp .hero {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  padding-bottom: 40px;
  background: linear-gradient(165deg, #0b1d4d 0%, #081535 45%, #050c24 100%);
}
.page-app #tab-temp .hero::before {
  content: ''; position: absolute; inset: -20%; z-index: -1; pointer-events: none;
  background:
    radial-gradient(34% 42% at 22% 30%, rgba(34, 211, 238, 0.42), transparent 70%),
    radial-gradient(30% 40% at 80% 22%, rgba(59, 130, 246, 0.55), transparent 70%),
    radial-gradient(36% 44% at 62% 78%, rgba(99, 102, 241, 0.45), transparent 70%),
    radial-gradient(26% 34% at 12% 85%, rgba(14, 165, 233, 0.3), transparent 70%);
  filter: saturate(1.2);
  animation: aurora 22s ease-in-out infinite alternate;
}
@keyframes aurora {
  50% { transform: translate3d(3%, -2%, 0) scale(1.04); }
  100% { transform: translate3d(-3%, 2%, 0) scale(1); }
}

.page-app #tab-temp .hero-copy h1 { color: #fff; }
.page-app #tab-temp .hero-copy .lead { color: rgba(226, 232, 240, 0.82); }
.page-app #tab-temp .hero-copy .grad { background: linear-gradient(90deg, #67e8f9, #a5b4fc); -webkit-background-clip: text; background-clip: text; }
.page-app #tab-temp .eyebrow { background: rgba(255, 255, 255, 0.08); border-color: rgba(255, 255, 255, 0.18); color: #a5f3fc; box-shadow: none; }
body.has-inbox .new-address-btn { background: rgba(255, 255, 255, 0.06); color: #cffafe; border: 1px solid rgba(165, 243, 252, 0.35); }

.glass-blobs { display: none !important; }
.address-card.lg { background: rgba(255, 255, 255, 0.06); box-shadow: none; }
.address-card.lg.expired { background: rgba(15, 23, 42, 0.3); }
[data-liquid-glass='frosted'] .lg-surface { backdrop-filter: blur(22px) saturate(1.6); -webkit-backdrop-filter: blur(22px) saturate(1.6); }

/* ---------------- Generator form as glass (same layers as the address card) ---------------- */
.generator.lg {
  --lg-light:
    radial-gradient(58% 140% at 100% 0%, rgba(255, 255, 255, 0.9) 0%, rgba(255, 255, 255, 0.4) 35%, rgba(255, 255, 255, 0) 72%),
    radial-gradient(48% 120% at 0% 100%, rgba(255, 255, 255, 0.6) 0%, rgba(255, 255, 255, 0.2) 35%, rgba(255, 255, 255, 0) 70%),
    linear-gradient(rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.12));
  position: relative;
  background: rgba(255, 255, 255, 0.07);
  border-color: transparent;
  box-shadow: none;
  border-radius: 22px;
}
.generator.lg > :not(.lg-defs, .lg-surface, .lg-bloom, .lg-bevel, .lg-rim) { position: relative; z-index: 4; }
.generator.lg .field > label { color: rgba(226, 232, 240, 0.9); }
.generator.lg .field > label .muted { color: rgba(148, 163, 184, 0.9); }
.generator.lg input[type='text'], .generator.lg select {
  background-color: rgba(255, 255, 255, 0.1); border-color: rgba(255, 255, 255, 0.22); color: #fff;
}
.generator.lg input::placeholder { color: rgba(203, 213, 225, 0.6); }
.generator.lg select option { color: #0f172a; }
.generator.lg input:focus, .generator.lg select:focus { background-color: rgba(255, 255, 255, 0.16); border-color: #67e8f9; box-shadow: 0 0 0 4px rgba(103, 232, 249, 0.18); }
.generator.lg .chip { background: rgba(255, 255, 255, 0.08); border-color: rgba(255, 255, 255, 0.2); color: #e2e8f0; }
.generator.lg .chip:hover:not(:disabled) { border-color: rgba(103, 232, 249, 0.7); color: #fff; }
.generator.lg .chip.active { background: rgba(103, 232, 249, 0.16); border-color: #67e8f9; color: #cffafe; box-shadow: 0 0 0 3px rgba(103, 232, 249, 0.14); }
.generator.lg .btn-primary { background: linear-gradient(135deg, #06b6d4, #4f46e5); box-shadow: 0 10px 24px -10px rgba(6, 182, 212, 0.7); }
.generator.lg .muted { color: rgba(148, 163, 184, 0.9); }

/* ---------------- Frosted glass for chrome (header, menu, toast) ---------------- */
.topbar {
  background: color-mix(in srgb, var(--surface) 62%, transparent);
  backdrop-filter: blur(18px) saturate(1.8);
  -webkit-backdrop-filter: blur(18px) saturate(1.8);
  box-shadow: inset 0 -1px 0 rgba(255, 255, 255, 0.5), 0 8px 24px -18px rgba(15, 23, 42, 0.35);
}
.toast {
  background: rgba(15, 23, 42, 0.72);
  color: #fff;
  backdrop-filter: blur(16px) saturate(1.6);
  -webkit-backdrop-filter: blur(16px) saturate(1.6);
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18), 0 16px 40px -14px rgba(0, 0, 0, 0.5);
}
.toast.error-toast { background: rgba(220, 38, 38, 0.82); }

@media (prefers-reduced-motion: reduce) { .page-app #tab-temp .hero::before { animation: none; } }
