@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url('fonts/inter-latin-wght-normal.woff2') format('woff2-variations');
  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: 'Inter';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url('fonts/inter-latin-ext-wght-normal.woff2') format('woff2-variations');
  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;
}

:root {
  --bg: #000;
  --panel: #080808;
  --panel-2: #0b0b0c;
  --line: #141416;
  --line-2: #1f1f23;
  --hover: #0f0f11;
  --active: #131315;
  --text: #e4e4e7;
  --strong: #fafafa;
  --muted: #a1a1aa;
  --dim: #71717a;
  --faint: #52525b;
  --ghost: #3f3f46;
  --btn: #111113;
  --btn-line: #2a2a30;
  --green: #10b981;
  --amber: #f59e0b;
  --red: #f87171;
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { min-height: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 14px/1.5 var(--font); -webkit-font-smoothing: antialiased; overflow-y: auto; }
[hidden] { display: none !important; }
svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
svg.fill { fill: currentColor; stroke: none; }
button { font-family: inherit; }
a { color: inherit; }
.mono { font-family: var(--mono); }
::-webkit-scrollbar { width: 3px; height: 3px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #1d1d20; border-radius: 99px; }
:focus-visible { outline: 1px solid #52525b; outline-offset: 2px; }

.title-gradient {
  background: linear-gradient(180deg, #fff 20%, #52525b 100%);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.title-gradient-soft {
  background: linear-gradient(180deg, #d4d4d8 0%, #71717a 100%);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}

/* ---------- top actions ---------- */
.top-actions { position: fixed; top: 18px; right: 18px; z-index: 80; display: flex; gap: 8px; }
.top-action {
  height: 36px; padding: 0 14px; border-radius: 8px; border: 1px solid var(--btn-line); background: var(--btn); color: var(--text);
  font-size: 13px; font-weight: 650; display: inline-flex; align-items: center; gap: 8px; cursor: pointer;
  transition: background .16s, border-color .16s, color .16s;
}
.top-action:hover { background: #18181b; color: #fff; border-color: #3f3f46; }
.top-action svg { color: var(--muted); width: 14px; height: 14px; }
.top-action.on { border-color: #3f3f46; background: #18181b; }

.account-panel {
  position: fixed; top: 62px; right: 18px; z-index: 90; width: min(300px, calc(100vw - 36px));
  background: #0a0a0b; border: 1px solid var(--line-2); border-radius: 12px; padding: 8px; box-shadow: 0 20px 50px rgb(0 0 0 / .7);
  animation: drop .14s ease-out;
}
@keyframes drop { from { opacity: 0; transform: translateY(-4px); } }
.ap-head { padding: 8px 10px 10px; border-bottom: 1px solid var(--line); margin-bottom: 6px; }
.ap-title { font-weight: 650; color: var(--strong); }
.ap-sub { font-size: 12px; color: var(--dim); }
.ap-stats { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 6px; padding: 4px 4px 8px; }
.ap-stat { background: var(--panel-2); border: 1px solid var(--line); border-radius: 8px; padding: 8px; text-align: center; }
.ap-stat b { display: block; font-size: 15px; color: var(--strong); }
.ap-stat span { font-size: 10px; text-transform: uppercase; letter-spacing: .08em; color: var(--faint); }
.ap-item { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 10px; border: 0; border-radius: 8px; background: none; color: var(--muted); font-size: 13px; font-weight: 500; cursor: pointer; text-align: left; }
.ap-item:hover { background: var(--hover); color: var(--strong); }
.ap-item.danger:hover { color: var(--red); }

/* ---------- centered views (auth + home) ---------- */
.center-view { min-height: 100vh; display: flex; flex-direction: column; align-items: center; padding: 84px 16px 40px; }
.hero-title { margin: 0; font-size: clamp(34px, 7vw, 76px); font-weight: 800; letter-spacing: -.045em; line-height: 1.05; text-align: center; word-break: break-word; padding-bottom: 4px; }
.tagline { margin: 14px 0 0; color: var(--faint); font-size: 16px; text-align: center; }

.generate {
  margin-top: 34px; border: 0; background-color: transparent; cursor: pointer; padding: 4px 10px;
  font-size: clamp(30px, 5vw, 48px); font-weight: 750; letter-spacing: -.04em; line-height: 1.15;
  transition: transform .15s ease, filter .15s ease;
}
.generate:hover { filter: brightness(1.35); transform: translateY(-1px); }
.generate:active { transform: scale(.98); }
.generate:disabled { opacity: .5; cursor: default; }
.hint { color: var(--faint); font-size: 12.5px; text-align: center; margin: 8px 0 0; min-height: 1em; }

.divider { display: flex; align-items: center; gap: 20px; width: min(320px, 100%); margin: 26px 0 22px; color: var(--faint); font-size: 11px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; }
.divider::before, .divider::after { content: ''; flex: 1; height: 1px; background: var(--line-2); }

.custom { width: min(520px, 100%); display: grid; gap: 12px; justify-items: center; }
.custom-input { display: flex; align-items: center; width: 100%; height: 48px; background: var(--panel); border: 1px solid var(--line-2); border-radius: 12px; overflow: hidden; transition: border-color .15s; }
.custom-input:focus-within { border-color: #3f3f46; }
.custom-input input { flex: 1; min-width: 0; height: 100%; padding: 0 4px 0 16px; border: 0; background: none; color: var(--strong); font: 500 15px var(--font); text-align: right; }
.custom-input input:focus { outline: none; }
.custom-input input::placeholder { color: var(--ghost); }
.custom-input .at { color: var(--dim); font-weight: 600; padding: 0 2px; }
.custom-input select { flex: 1; min-width: 0; height: 100%; border: 0; background: none; color: var(--muted); font: 500 15px var(--font); padding: 0 12px 0 2px; cursor: pointer; }
.custom-input select:focus { outline: none; }
.custom-input select option { background: #0a0a0b; color: var(--text); }

.ttl-chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.chip { height: 28px; padding: 0 12px; border-radius: 99px; border: 1px solid var(--line-2); background: transparent; color: var(--dim); font-size: 12px; font-weight: 600; cursor: pointer; transition: all .15s; }
.chip:hover { color: var(--text); border-color: #2a2a30; }
.chip.on { background: #18181b; color: var(--strong); border-color: #3f3f46; }

.solid-btn { height: 40px; padding: 0 20px; border-radius: 10px; border: 0; background: #fafafa; color: #09090b; font-size: 13.5px; font-weight: 700; cursor: pointer; transition: background .15s, transform .1s; }
.solid-btn:hover { background: #e4e4e7; }
.solid-btn:active { transform: scale(.98); }
.solid-btn:disabled { opacity: .5; cursor: default; }

.active-list { width: min(520px, 100%); margin-top: 38px; display: grid; gap: 6px; }
.al-head { display: flex; justify-content: space-between; align-items: center; font-size: 11px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--faint); padding: 0 4px 4px; }
.al-head a { color: var(--dim); text-decoration: none; letter-spacing: .08em; }
.al-head a:hover { color: var(--text); }
.al-row { display: flex; align-items: center; gap: 12px; padding: 11px 14px; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; text-decoration: none; color: var(--text); transition: border-color .15s, background .15s; }
.al-row:hover { border-color: var(--line-2); background: var(--panel-2); }
.al-addr { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
.al-meta { font-size: 12px; color: var(--faint); font-variant-numeric: tabular-nums; white-space: nowrap; }
.al-meta.temp { color: #a16207; }
.badge { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 99px; background: #fafafa; color: #000; font-size: 11px; font-weight: 700; display: inline-grid; place-items: center; }
.kind-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--ghost); flex: none; }
.kind-dot.temp { background: var(--amber); }
.kind-dot.box { background: #e4e4e7; }

.foot { margin-top: auto; padding-top: 70px; display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 12px; color: var(--faint); font-size: 12.5px; }
.foot .sep { color: var(--ghost); font-size: 8px; }
.foot-link { border: 0; background: none; color: var(--muted); font-size: 12.5px; font-weight: 500; cursor: pointer; padding: 0; }
.foot-link:hover { color: #fff; }
.live { display: inline-flex; align-items: center; gap: 6px; color: var(--dim); }
.live b { color: var(--text); font-size: 13px; }
.live-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ghost); box-shadow: 0 0 0 0 transparent; flex: none; }
.live-dot.on { background: var(--green); box-shadow: 0 0 8px rgb(16 185 129 / .55); }
.pulse.on { animation: pulse-soft 2s infinite ease-in-out; }
@keyframes pulse-soft { 50% { opacity: .5; transform: scale(.9); } }

/* auth */
.auth-form { width: min(340px, 100%); display: grid; gap: 10px; margin-top: 40px; }
.auth-form .hint:empty, .auth-form .error:empty { display: none; }
.label-line { margin: 0 0 4px; display: flex; align-items: center; gap: 16px; color: var(--faint); font-size: 11px; font-weight: 500; letter-spacing: .14em; }
.label-line::before, .label-line::after { content: ''; flex: 1; height: 1px; background: var(--line-2); }
.field-row input, .field input, .field select, .field textarea {
  width: 100%; height: 44px; padding: 0 14px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--panel); color: var(--strong); font: 500 14px var(--font);
}
.field-row input:focus, .field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: #3f3f46; }
.field-row input::placeholder, .field input::placeholder, .field textarea::placeholder { color: var(--ghost); }
.error { color: var(--red); font-size: 12.5px; margin: 0; min-height: 1em; text-align: center; }
.shake { animation: shake .4s cubic-bezier(.36,.07,.19,.97) both; }
@keyframes shake { 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }

/* ---------- inbox view ---------- */
#inbox { padding: 22px 16px 24px; min-height: 100vh; display: flex; flex-direction: column; }
.ib-head { display: flex; flex-direction: column; align-items: center; gap: 4px; padding-bottom: 30px; }
.ib-host { font-size: 18px; font-weight: 800; letter-spacing: -.03em; text-decoration: none; }
.new-addr { color: var(--muted); text-decoration: none; font-size: 17px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; transition: color .15s; }
.new-addr:hover { color: #fff; }
.ib-address { margin: 22px 0 0; font-size: clamp(20px, 3.4vw, 36px); font-weight: 700; letter-spacing: -.035em; color: #fff; text-align: center; word-break: break-all; line-height: 1.2; cursor: pointer; }
.ib-tools { margin-top: 18px; display: flex; align-items: center; gap: 18px; flex-wrap: wrap; justify-content: center; }
.timer { display: inline-flex; align-items: center; gap: 8px; color: var(--strong); font-size: 18px; font-weight: 700; font-variant-numeric: tabular-nums; }
.timer svg { color: var(--dim); width: 14px; height: 14px; }
.timer.perm { font-size: 13px; font-weight: 600; color: var(--muted); letter-spacing: .02em; }
.timer.low { color: var(--amber); }
.vsep { width: 1px; height: 22px; background: var(--line-2); }
.copy-btn { display: inline-flex; align-items: center; gap: 8px; border: 0; background: none; color: var(--dim); font-size: 14px; font-weight: 500; cursor: pointer; padding: 4px 2px; transition: color .15s; }
.copy-btn:hover { color: #fff; }
.copy-btn svg { width: 14px; height: 14px; }
.tool-pill { display: inline-flex; align-items: center; gap: 2px; height: 38px; padding: 0 6px; border: 1px solid var(--line-2); border-radius: 10px; background: var(--panel); }
.tool-pill .pill-sep { width: 1px; height: 16px; background: var(--line-2); margin: 0 4px; }
.pill-btn { width: 30px; height: 30px; display: inline-grid; place-items: center; border: 0; border-radius: 7px; background: none; color: var(--dim); cursor: pointer; transition: color .15s, background .15s; position: relative; }
.pill-btn:hover { color: #fff; background: var(--hover); }
.pill-btn.key { color: var(--amber); }
.pill-btn.danger:hover { color: var(--red); }
.pill-btn svg { width: 14px; height: 14px; }
.pill-btn[data-tip]:hover::after { content: attr(data-tip); position: absolute; top: calc(100% + 8px); left: 50%; transform: translateX(-50%); white-space: nowrap; padding: 5px 8px; border-radius: 6px; background: #18181b; border: 1px solid #27272a; color: var(--text); font-size: 11.5px; font-weight: 500; z-index: 20; pointer-events: none; }

.ib-grid { flex: 1; width: min(1152px, 100%); margin: 0 auto; display: grid; grid-template-columns: 276px 1fr; gap: 16px; min-height: 560px; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; min-width: 0; }
.list-panel { display: flex; flex-direction: column; overflow: hidden; max-height: calc(100vh - 290px); min-height: 560px; }
.lp-search { position: relative; margin: 14px 14px 12px; }
.lp-search svg { position: absolute; left: 12px; top: 11px; width: 13px; height: 13px; color: var(--faint); }
.lp-search input { width: 100%; height: 36px; padding: 0 12px 0 33px; border-radius: 9px; border: 1px solid transparent; background: #0e0e10; color: var(--text); font: 13.5px var(--font); }
.lp-search input::placeholder { color: var(--faint); }
.lp-search input:focus { outline: none; border-color: var(--line-2); }
.lp-bar { display: flex; align-items: center; justify-content: space-between; padding: 10px 16px; border-top: 1px solid var(--line); }
.lp-tabs { display: flex; gap: 14px; }
.lp-tabs button { border: 0; background: none; padding: 0; color: var(--faint); font-size: 10.5px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; cursor: pointer; }
.lp-tabs button.on { color: var(--muted); }
.lp-tabs button:hover { color: var(--text); }
.lp-bar-right { display: flex; align-items: center; gap: 4px; }
.mini-icon { width: 24px; height: 24px; display: inline-grid; place-items: center; border: 0; background: none; color: var(--faint); border-radius: 6px; cursor: pointer; }
.mini-icon:hover { color: var(--text); background: var(--hover); }
.mini-icon svg { width: 12px; height: 12px; }
.lp-bar .live-dot { width: 6px; height: 6px; margin-left: 6px; }
.spin svg { animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.msg-list { list-style: none; margin: 0; padding: 0; overflow-y: auto; flex: 1; }
.msg { padding: 12px 16px; border-top: 1px solid #0e0e10; cursor: pointer; transition: background .12s; display: grid; gap: 2px; }
.msg:first-child { border-top: 0; }
.msg:hover { background: var(--hover); }
.msg.active { background: var(--active); box-shadow: inset 2px 0 0 #e4e4e7; }
.msg .r1 { display: flex; align-items: baseline; gap: 8px; }
.msg .who { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); font-size: 13px; font-weight: 500; }
.msg .when { color: var(--faint); font-size: 11px; font-variant-numeric: tabular-nums; flex: none; }
.msg .subj { color: var(--text); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.msg .snip { color: var(--faint); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.msg .meta { display: flex; gap: 6px; align-items: center; color: var(--ghost); font-size: 11px; overflow: hidden; white-space: nowrap; margin-top: 2px; }
.msg .meta > span:not(.tag) { overflow: hidden; text-overflow: ellipsis; display: inline-flex; align-items: center; }
.msg .meta svg { width: 11px; height: 11px; }
.msg.unread .who { color: #fff; font-weight: 650; }
.msg.unread .subj { color: #fff; font-weight: 600; }
.msg.unread .who::before { content: ''; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: #fff; margin-right: 8px; vertical-align: 2px; }
.list-empty { padding: 90px 20px; text-align: center; color: var(--faint); font-size: 12.5px; display: grid; justify-items: center; gap: 12px; }
.list-empty svg { width: 26px; height: 26px; color: var(--ghost); stroke-width: 1.6; }
.more-btn { margin: 8px 14px 14px; height: 32px; border: 1px solid var(--line-2); border-radius: 8px; background: none; color: var(--dim); font-size: 12px; cursor: pointer; }
.more-btn:hover { color: #fff; }

.tag { display: inline-flex; align-items: center; height: 18px; padding: 0 7px; border-radius: 99px; font-size: 10.5px; font-weight: 600; background: #141416; color: var(--dim); }
.tag.ok { color: var(--green); background: rgb(16 185 129 / .1); }
.tag.err { color: var(--red); background: rgb(248 113 113 / .1); }
.tag.wait { color: var(--amber); background: rgb(245 158 11 / .1); }

.reader { display: flex; flex-direction: column; overflow: hidden; max-height: calc(100vh - 290px); min-height: 560px; }
.reader-empty { margin: auto; color: #27272a; font-size: 11px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; }
#readerBody { display: flex; flex-direction: column; flex: 1; min-height: 0; }
.r-head { padding: 22px 26px 18px; border-bottom: 1px solid var(--line); display: grid; gap: 14px; }
.r-top { display: flex; align-items: flex-start; gap: 14px; }
.r-subject { flex: 1; margin: 0; font-size: 19px; font-weight: 700; letter-spacing: -.02em; color: #fff; word-break: break-word; }
.r-actions { display: flex; gap: 2px; flex: none; }
.r-from { display: flex; align-items: center; gap: 12px; }
.avatar { width: 36px; height: 36px; border-radius: 50%; background: #18181b; border: 1px solid #27272a; color: var(--muted); display: grid; place-items: center; font-weight: 700; font-size: 14px; flex: none; text-transform: uppercase; }
.r-who { min-width: 0; flex: 1; }
.r-name { color: var(--strong); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.r-name span { color: var(--dim); font-weight: 400; font-size: 12.5px; }
.r-to { color: var(--faint); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.r-date { color: var(--faint); font-size: 12px; white-space: nowrap; }
.back-btn { display: none; }
.notice { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 26px; border-bottom: 1px solid var(--line); background: #0c0a05; color: #b45309; font-size: 12px; }
.notice button { height: 26px; padding: 0 10px; border-radius: 6px; border: 1px solid #3a2a0e; background: none; color: var(--amber); font-size: 11.5px; font-weight: 600; cursor: pointer; }
.delivery { padding: 12px 26px; border-bottom: 1px solid var(--line); display: grid; gap: 6px; font-size: 12.5px; color: var(--muted); }
.delivery .err-text { color: var(--red); font-family: var(--mono); font-size: 11px; word-break: break-word; opacity: .85; }
.delivery button { justify-self: start; height: 26px; padding: 0 10px; border-radius: 6px; border: 1px solid var(--line-2); background: none; color: var(--text); font-size: 11.5px; cursor: pointer; }
.r-frame-wrap { flex: 1; min-height: 0; padding: 16px; display: flex; }
.r-frame { flex: 1; width: 100%; border: 0; border-radius: 10px; background: #fff; }
.r-frame.dark { background: var(--panel); }
.r-atts { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 16px 16px; }
.att { display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 12px; border-radius: 8px; border: 1px solid var(--line-2); background: var(--panel-2); color: var(--text); text-decoration: none; font-size: 12.5px; max-width: 280px; }
.att:hover { border-color: #3f3f46; }
.att span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.att .sz { color: var(--faint); flex: none; }

/* ---------- modal ---------- */
.modal { width: min(620px, calc(100vw - 32px)); max-height: calc(100dvh - 48px); padding: 0; border: 1px solid var(--line-2); border-radius: 16px; background: #070708; color: var(--text); box-shadow: 0 30px 80px rgb(0 0 0 / .8); }
.modal::backdrop { background: rgb(0 0 0 / .72); backdrop-filter: blur(3px); }
.m-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 22px 14px; }
.m-head h3 { margin: 0; font-size: 17px; font-weight: 700; letter-spacing: -.02em; color: #fff; }
.m-body { padding: 4px 22px 18px; display: grid; gap: 12px; }
.m-foot { display: flex; justify-content: flex-end; align-items: center; gap: 8px; padding: 14px 22px 18px; border-top: 1px solid var(--line); }
.m-foot .left { margin-right: auto; display: flex; gap: 6px; }
.field { display: grid; gap: 6px; }
.field > span { font-size: 10.5px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--faint); }
.field input, .field select { height: 40px; font-size: 13.5px; }
.field textarea { height: auto; min-height: 220px; padding: 12px 14px; line-height: 1.55; resize: vertical; font-size: 13.5px; }
.field select option { background: #0a0a0b; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.ghost-btn { height: 36px; padding: 0 14px; border-radius: 9px; border: 1px solid var(--line-2); background: none; color: var(--muted); font-size: 13px; font-weight: 600; cursor: pointer; display: inline-flex; align-items: center; gap: 8px; }
.ghost-btn:hover { color: #fff; border-color: #3f3f46; }
.ghost-btn.sm { height: 28px; padding: 0 10px; font-size: 11.5px; border-radius: 7px; }
.ghost-btn.danger:hover { color: var(--red); border-color: #4a1d1d; }
.files { display: flex; flex-wrap: wrap; gap: 6px; }
.file-chip { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 8px; border-radius: 6px; background: #121214; color: var(--muted); font-size: 12px; }
.file-chip button { border: 0; background: none; color: var(--faint); cursor: pointer; font-size: 14px; padding: 0; }
.x-btn { width: 30px; height: 30px; display: grid; place-items: center; border: 0; border-radius: 8px; background: none; color: var(--dim); cursor: pointer; }
.x-btn:hover { background: var(--hover); color: #fff; }

.note { font-size: 12.5px; color: var(--dim); background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 11px 13px; line-height: 1.55; }
.note b { color: var(--text); font-weight: 600; }
.add-domain { display: flex; gap: 8px; }
.add-domain input { flex: 1; }
.domain { border: 1px solid var(--line); border-radius: 12px; background: var(--panel); }
.domain + .domain { margin-top: 8px; }
.d-row { display: flex; align-items: center; gap: 10px; padding: 12px 14px; flex-wrap: wrap; }
.d-name { flex: 1; min-width: 140px; font-weight: 650; color: #fff; }
.d-count { font-size: 12px; color: var(--faint); }
.switch { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); cursor: pointer; }
.switch input { appearance: none; width: 28px; height: 16px; border-radius: 99px; background: #27272a; position: relative; cursor: pointer; transition: background .15s; margin: 0; }
.switch input::after { content: ''; position: absolute; top: 2px; left: 2px; width: 12px; height: 12px; border-radius: 50%; background: #a1a1aa; transition: transform .15s, background .15s; }
.switch input:checked { background: var(--green); }
.switch input:checked::after { transform: translateX(12px); background: #fff; }
.dns { border-top: 1px solid var(--line); padding: 12px 14px 14px; display: grid; gap: 8px; }
.rec { display: grid; gap: 6px; padding: 10px 12px; border-radius: 9px; background: #050505; border: 1px solid var(--line); }
.rec-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 12px; }
.rec-type { font-family: var(--mono); font-size: 11px; font-weight: 700; color: #fff; background: #18181b; border-radius: 5px; padding: 1px 6px; }
.rec-purpose { flex: 1; color: var(--dim); }
.kv { display: grid; grid-template-columns: 62px 1fr auto; gap: 8px; align-items: start; font-size: 12px; }
.kv .k { color: var(--faint); padding-top: 4px; font-size: 11px; text-transform: uppercase; letter-spacing: .08em; }
.kv .v { font-family: var(--mono); font-size: 11.5px; color: var(--text); word-break: break-all; padding: 4px 8px; background: var(--panel); border: 1px solid var(--line); border-radius: 6px; }
.found { font-size: 11px; color: var(--faint); word-break: break-all; }

/* ---------- toasts ---------- */
.toasts { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%); display: grid; gap: 8px; z-index: 200; width: max-content; max-width: calc(100vw - 32px); }
.toast { padding: 10px 16px; border-radius: 10px; background: #fafafa; color: #09090b; font-size: 13px; font-weight: 600; box-shadow: 0 10px 30px rgb(0 0 0 / .6); animation: up .18s ease-out; }
.toast.err { background: #450a0a; color: #fecaca; border: 1px solid #7f1d1d; }
@keyframes up { from { opacity: 0; transform: translateY(6px); } }

/* ---------- responsive ---------- */
@media (max-width: 860px) {
  .top-actions { top: 12px; right: 12px; gap: 6px; }
  .top-action { padding: 0 11px; }
  .top-action span { display: none; }
  .center-view { padding-top: 76px; }
  #inbox { padding-top: 64px; }
  .ib-grid { grid-template-columns: 1fr; }
  .list-panel, .reader { max-height: none; min-height: 420px; }
  #inbox.reading .list-panel { display: none; }
  #inbox:not(.reading) .reader { display: none; }
  .back-btn { display: inline-grid; }
  .r-head { padding: 12px 16px 16px; }
  .r-top { flex-wrap: wrap; gap: 8px; }
  .r-actions { margin-left: auto; }
  .r-subject { order: 2; flex-basis: 100%; font-size: 17px; }
  .r-from { flex-wrap: wrap; }
  .r-date { flex-basis: 100%; padding-left: 48px; margin-top: -6px; }
  .r-frame-wrap { padding: 10px; }
  .notice, .delivery { padding-left: 16px; padding-right: 16px; }
  .grid2 { grid-template-columns: 1fr; }
  .kv { grid-template-columns: 1fr auto; }
  .kv .k { grid-column: 1 / -1; padding: 0; }
  .ib-tools { gap: 12px; }
}

/* ---------- account dashboard ---------- */
.dash { min-height: 100vh; background: radial-gradient(900px 420px at 12% 0%, rgb(30 41 59 / .55), transparent 70%), #000; }
.dash-top { height: 88px; display: flex; align-items: center; justify-content: flex-end; padding: 0 18px; border-bottom: 1px solid #16161a; background: rgb(0 0 0 / .55); }
.dash-top-actions { display: flex; gap: 10px; }
.dash-top .top-action { height: 44px; padding: 0 16px; font-size: 15px; font-weight: 700; text-decoration: none; }
.dash-top .top-action svg { width: 15px; height: 15px; color: #d4d4d8; }
.dash-wrap { width: min(1475px, 100%); margin: 0 auto; padding: 60px 24px; display: grid; grid-template-columns: 287px 1fr; gap: 30px; align-items: start; }
.card { background: #0a0a0c; border: 1px solid #1c1c21; border-radius: 14px; }
.dash-side { padding: 12px; display: grid; gap: 4px; position: sticky; top: 20px; }
.dash-side a { display: flex; align-items: center; gap: 14px; height: 54px; padding: 0 14px; border-radius: 10px; color: #a1a1aa; text-decoration: none; font-size: 19px; font-weight: 500; transition: background .15s, color .15s; }
.dash-side a svg { width: 20px; height: 20px; }
.dash-side a:hover { color: #e4e4e7; background: #111114; }
.dash-side a.on { background: #18181c; color: #fff; }
.dash-main { display: grid; gap: 30px; min-width: 0; }
#dashBody { display: grid; gap: 8px; }
.hello { padding: 38px 40px 40px; display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.hello h1 { margin: 0; font-size: 50px; font-weight: 800; letter-spacing: -.03em; color: #fff; line-height: 1.1; cursor: pointer; }
.hello-sub { margin-top: 12px; color: #a1a1aa; font-size: 19px; }
.count-pill { flex: none; margin-top: 28px; height: 40px; padding: 0 16px; display: inline-flex; align-items: center; border-radius: 99px; border: 1px solid #26262c; background: #0e0e11; color: #e4e4e7; font-size: 14px; }
#dashBody .card { padding: 28px 30px 32px; }
.card-title { margin: 0 0 22px; display: flex; align-items: center; gap: 8px; font-size: 22px; font-weight: 800; letter-spacing: -.02em; color: #fff; }
.card-title svg { width: 22px; height: 22px; }
.d-text { color: #a1a1aa; font-size: 19px; line-height: 1.3; margin: 18px 0 0; }
.d-text.small { font-size: 14px; line-height: 1.5; }
.d-text b { color: #e4e4e7; font-weight: 600; }
.d-text code, .docs code { font-family: var(--mono); font-size: 13px; color: #e4e4e7; background: #141418; padding: 1px 6px; border-radius: 5px; }
.warn-text { color: #f59e0b; }
.card-title + .d-text { margin-top: 0; }
.d-text + .dm-row { margin-top: 20px; }
.dm-row { display: flex; gap: 14px; flex-wrap: wrap; }
.d-input { height: 56px; padding: 0 16px; border-radius: 10px; border: 1px solid #26262c; background: #070709; color: #fafafa; font: 400 19px var(--font); min-width: 0; }
.d-input::placeholder { color: #71717a; }
.d-input:focus { outline: none; border-color: #52525b; }
.d-input.grow { flex: 1 1 260px; }
select.d-input { padding-right: 40px; appearance: none; cursor: pointer; flex: 0 1 260px; background: #070709 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23a1a1aa' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 14px center / 18px; }
select.d-input option { background: #0a0a0c; }
.d-btn { height: 56px; padding: 0 18px; border-radius: 10px; border: 1px solid #26262c; background: #0c0c0f; color: #fafafa; font: 700 19px var(--font); display: inline-flex; align-items: center; justify-content: center; gap: 10px; cursor: pointer; text-decoration: none; white-space: nowrap; transition: background .15s, border-color .15s; }
.d-btn svg { width: 19px; height: 19px; }
.d-btn:hover { background: #151519; border-color: #3f3f46; }
.d-btn.white { background: #fafafa; color: #09090b; border-color: #fafafa; }
.d-btn.white:hover { background: #e4e4e7; }
.d-btn.sm { height: 46px; padding: 0 16px; font-size: 16px; }
.d-btn.sm svg { width: 16px; height: 16px; }
.d-btn.danger, .d-btn.red { background: #1d0b0e; border-color: #3b1219; color: #fca5a5; }
.d-btn.danger:hover, .d-btn.red:hover { background: #2a0f14; border-color: #5b1a24; }
.d-btn.icon { width: 56px; padding: 0; }
.d-btn:disabled { opacity: .6; cursor: default; }
.dm-quick { display: flex; align-items: center; gap: 14px; margin-top: 16px; color: #a1a1aa; font-size: 16px; flex-wrap: wrap; }
.mb-list, .dd-list { display: grid; gap: 14px; }
.mb, .dd { border: 1px solid #1c1c21; border-radius: 12px; background: #070709; padding: 20px; }
.mb-top, .dd-top { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.mb-info { min-width: 0; }
.mb-addr, .dd-name { font-size: 20px; font-weight: 800; color: #fff; word-break: break-all; letter-spacing: -.01em; }
.mb-meta, .dd-meta { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 8px; color: #a1a1aa; font-size: 15px; align-items: center; }
.mb-meta > span, .dd-meta > span { display: inline-flex; align-items: center; gap: 6px; }
.mb-meta svg, .dd-meta svg { width: 14px; height: 14px; }
.mb-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.mb-actions .d-btn { height: 54px; }
.mb-token { margin-top: 18px; display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid #1c1c21; border-radius: 10px; background: #050506; }
.mb-token .mono { flex: 1; min-width: 0; font-size: 13.5px; color: #e4e4e7; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tok-btn { border: 0; background: none; color: #a1a1aa; font-size: 13px; cursor: pointer; padding: 4px 6px; border-radius: 6px; }
.tok-btn:hover { color: #fca5a5; background: #1d0b0e; }
.badge-ok, .badge-wait { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 12px; border-radius: 99px; font-size: 14px; font-weight: 700; }
.badge-ok { color: #4ade80; background: #0b2316; border: 1px solid #14532d; }
.badge-wait { color: #fbbf24; background: #261a05; border: 1px solid #5c3d0a; }
.dd-meta .badge-ok svg, .dd-meta .badge-wait svg { width: 15px; height: 15px; }
.dd-records { margin-top: 22px; }
.dd-label { color: #a1a1aa; font-size: 15px; font-weight: 700; text-transform: uppercase; letter-spacing: .02em; margin-bottom: 10px; }
.dd-rows { display: grid; gap: 10px; }
.dr { display: grid; grid-template-columns: 70px minmax(0, 200px) auto minmax(0, 1fr) auto auto; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid #1c1c21; border-radius: 9px; background: #050506; font-size: 14px; }
.dr-type { font-family: var(--mono); font-weight: 700; color: #60a5fa; font-size: 14px; }
.dr-name { color: #a1a1aa; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; }
.dr-value { color: #e4e4e7; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; }
.chip-copy { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 10px; border-radius: 7px; border: 1px solid #26262c; background: #0c0c0f; color: #e4e4e7; font-size: 12px; font-weight: 700; cursor: pointer; }
.chip-copy:hover { border-color: #52525b; }
.chip-copy svg { width: 13px; height: 13px; }
.rec-st { font-weight: 800; font-size: 15px; width: 18px; text-align: center; }
.rec-st.ok { color: #4ade80; }
.rec-st.bad { color: #f87171; cursor: help; }
.key-box { padding: 18px; border: 1px solid #1c1c21; border-radius: 10px; background: #050506; color: #4ade80; font-size: 17px; word-break: break-all; }
.key-box.dim { color: #a1a1aa; }
.key-actions { display: flex; gap: 12px; margin-top: 16px; flex-wrap: wrap; }
.code-box { margin: 22px 0 16px; padding: 22px 18px; border: 1px solid #1c1c21; border-radius: 10px; background: #050506; color: #e4e4e7; font: 14.5px/1.8 var(--mono); white-space: pre-wrap; word-break: break-all; }
.docs .doc-row { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 4px 12px; padding: 10px 0; border-top: 1px solid #141418; align-items: baseline; }
.docs .doc-row code { background: none; padding: 0; font-size: 13px; word-break: break-all; }
.docs .doc-d { grid-column: 2; color: #a1a1aa; font-size: 12.5px; word-break: break-word; }
.doc-m { font: 700 11px var(--mono); padding: 3px 0; border-radius: 5px; text-align: center; }
.doc-m.get { color: #60a5fa; background: #0b1a2e; }
.doc-m.post { color: #4ade80; background: #0b2316; }
.doc-m.delete { color: #f87171; background: #2a0f14; }
.modal .code-box { margin: 10px 0 0; font-size: 12.5px; padding: 14px; }

/* shared read-only link */
.shared-mode .new-addr, .shared-mode .lp-tabs [data-folder="sent"], .shared-mode #markAllBtn { display: none !important; }
.shared-mode .ib-host { pointer-events: none; }

@media (max-width: 980px) {
  .dash-wrap { grid-template-columns: 1fr; padding: 24px 14px 40px; gap: 16px; }
  .dash-side { position: static; display: flex; overflow-x: auto; }
  .dash-side a { height: 44px; font-size: 16px; flex: 1; justify-content: center; }
  .dash-top { height: 64px; }
  .dash-top .top-action { height: 38px; font-size: 13px; padding: 0 12px; }
  .hello { padding: 24px; }
  .hello h1 { font-size: 32px; }
  .hello-sub { font-size: 15px; }
  .count-pill { margin-top: 4px; }
  #dashBody .card { padding: 20px 16px; }
  .d-input, .d-btn { height: 48px; font-size: 16px; }
  .dm-row { gap: 10px; }
  .d-input.grow { flex: 1 1 100%; }
  select.d-input { flex: 1 1 40%; }
  .dm-row > .d-btn.white { flex: 1 1 100%; }
  .d-text { font-size: 15px; }
  .mb-actions .d-btn { height: 44px; font-size: 15px; }
  .d-btn.icon { width: 44px; }
  .dr { grid-template-columns: 52px 1fr auto; }
  .dr-value { grid-column: 1 / -2; }
}
