:root {
  --bg-0: #05060a;
  --bg-1: #0b0d14;
  --glass: rgba(255, 255, 255, 0.06);
  --glass-strong: rgba(255, 255, 255, 0.1);
  --glass-border: rgba(255, 255, 255, 0.14);
  --glass-highlight: rgba(255, 255, 255, 0.22);
  --text: rgba(255, 255, 255, 0.94);
  --text-dim: rgba(255, 255, 255, 0.58);
  --text-faint: rgba(255, 255, 255, 0.34);
  --accent: #7eb6ff;
  --accent-2: #c5a3ff;
  --success: #5dde9f;
  --danger: #ff7b8a;
  --radius-lg: 28px;
  --radius-md: 18px;
  --radius-sm: 12px;
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
  --shadow-glass: 0 8px 32px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.12);
  --font: "SF Pro Display", "SF Pro Text", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
}

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

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: var(--font);
  color: var(--text);
  background: var(--bg-0);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

button,
input,
select {
  font: inherit;
  color: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

.stage {
  position: relative;
  min-height: 100vh;
  isolation: isolate;
}

.aurora {
  position: fixed;
  inset: -20% -10%;
  z-index: -2;
  background:
    radial-gradient(40% 35% at 20% 20%, rgba(126, 182, 255, 0.28), transparent 60%),
    radial-gradient(35% 40% at 80% 15%, rgba(197, 163, 255, 0.22), transparent 55%),
    radial-gradient(45% 35% at 60% 80%, rgba(93, 222, 159, 0.12), transparent 60%),
    radial-gradient(30% 30% at 10% 75%, rgba(255, 123, 138, 0.1), transparent 55%),
    linear-gradient(180deg, #07080f 0%, #05060a 100%);
  filter: saturate(1.15);
  animation: aurora-drift 22s var(--ease-in-out) infinite alternate;
}

.aurora::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: radial-gradient(ellipse at center, black 20%, transparent 75%);
  opacity: 0.35;
  pointer-events: none;
}

@keyframes aurora-drift {
  from { transform: translate3d(-2%, -1%, 0) scale(1); }
  to { transform: translate3d(2%, 2%, 0) scale(1.05); }
}

.noise {
  position: fixed;
  inset: 0;
  z-index: -1;
  opacity: 0.04;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.shell {
  width: min(1080px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 1.25rem 0 4rem;
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 2.5rem;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 11px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.35), rgba(255, 255, 255, 0.05)),
    linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: var(--shadow-glass);
  position: relative;
  overflow: hidden;
}

.brand-mark::after {
  content: "";
  position: absolute;
  inset: 1px;
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.25), transparent 45%);
  pointer-events: none;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.45rem 0.8rem;
  border-radius: 999px;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  color: var(--text-dim);
  font-size: 0.82rem;
}

.pill .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 0 3px rgba(93, 222, 159, 0.18);
}

.pill.warn .dot {
  background: #ffc857;
  box-shadow: 0 0 0 3px rgba(255, 200, 87, 0.18);
}

.hero {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 2rem;
  align-items: center;
  min-height: calc(100vh - 8rem);
}

@media (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
    gap: 1.5rem;
  }
}

.hero-copy h1 {
  margin: 0 0 1rem;
  font-size: clamp(2.4rem, 5vw, 3.6rem);
  line-height: 1.02;
  letter-spacing: -0.045em;
  font-weight: 650;
}

.hero-copy p {
  margin: 0;
  max-width: 34ch;
  color: var(--text-dim);
  font-size: 1.05rem;
  line-height: 1.55;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 1.5rem;
}

.meta-chip {
  padding: 0.55rem 0.85rem;
  border-radius: 999px;
  border: 1px solid var(--glass-border);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-dim);
  font-size: 0.8rem;
}

.glass-card {
  position: relative;
  border-radius: var(--radius-lg);
  background: linear-gradient(165deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.04));
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow-glass);
  backdrop-filter: blur(28px) saturate(160%);
  -webkit-backdrop-filter: blur(28px) saturate(160%);
  overflow: hidden;
}

.glass-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--glass-highlight), transparent);
  pointer-events: none;
}

.composer {
  padding: 1.35rem;
}

.composer-label {
  margin: 0 0 0.85rem;
  color: var(--text-dim);
  font-size: 0.86rem;
}

.domain-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.domain-btn {
  appearance: none;
  border: 1px solid var(--glass-border);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-dim);
  border-radius: 999px;
  padding: 0.55rem 0.9rem;
  cursor: pointer;
  transition: transform 160ms var(--ease-out), background 180ms var(--ease-out), border-color 180ms var(--ease-out), color 180ms var(--ease-out);
}

.domain-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
}

.domain-btn[aria-pressed="true"] {
  background: rgba(126, 182, 255, 0.18);
  border-color: rgba(126, 182, 255, 0.45);
  color: var(--text);
}

.domain-btn:active {
  transform: scale(0.97);
}

.alias-field {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.55rem;
  align-items: stretch;
  margin-bottom: 0.85rem;
}

.alias-input-wrap {
  display: flex;
  align-items: center;
  gap: 0.15rem;
  padding: 0.2rem 0.85rem;
  min-height: 54px;
  border-radius: var(--radius-md);
  border: 1px solid var(--glass-border);
  background: rgba(0, 0, 0, 0.28);
}

.alias-input-wrap:focus-within {
  border-color: rgba(126, 182, 255, 0.55);
  box-shadow: 0 0 0 4px rgba(126, 182, 255, 0.12);
}

.alias-input-wrap input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  padding: 0.7rem 0;
  font-size: 1rem;
  letter-spacing: -0.01em;
}

.alias-input-wrap input::placeholder {
  color: var(--text-faint);
}

.alias-domain {
  color: var(--text-dim);
  white-space: nowrap;
  font-size: 0.95rem;
}

.btn {
  appearance: none;
  border: 0;
  cursor: pointer;
  border-radius: var(--radius-md);
  padding: 0 1.15rem;
  min-height: 54px;
  font-weight: 600;
  letter-spacing: -0.01em;
  transition: transform 160ms var(--ease-out), filter 180ms var(--ease-out), opacity 180ms var(--ease-out);
  position: relative;
  overflow: hidden;
}

.btn:active {
  transform: scale(0.97);
}

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.btn-primary {
  color: #071018;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.35), transparent 42%),
    linear-gradient(135deg, #9ec6ff, #d0b6ff 55%, #9ef0c8);
  box-shadow: 0 10px 30px rgba(126, 182, 255, 0.25);
}

.btn-primary:hover {
  filter: brightness(1.05);
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--glass-border);
  color: var(--text);
}

.btn-sm {
  padding: 0.45rem 0.8rem;
  font-size: 0.82rem;
  border-radius: 999px;
}

.preview {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.04);
  border: 1px dashed rgba(255, 255, 255, 0.14);
  color: var(--text-dim);
  font-size: 0.9rem;
  margin-bottom: 0.75rem;
}

.preview strong {
  color: var(--text);
  font-weight: 600;
  letter-spacing: -0.015em;
  word-break: break-all;
}

.hint {
  margin: 0;
  color: var(--text-faint);
  font-size: 0.78rem;
  line-height: 1.4;
}

.error-line {
  min-height: 1.2rem;
  margin: 0.55rem 0 0;
  color: var(--danger);
  font-size: 0.84rem;
}

.success-panel {
  display: none;
  padding: 1.35rem;
}

.success-panel.active {
  display: block;
  animation: rise 320ms var(--ease-out);
}

.composer.hide {
  display: none;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.success-email {
  margin: 0.35rem 0 1rem;
  font-size: clamp(1.2rem, 3vw, 1.55rem);
  letter-spacing: -0.03em;
  font-weight: 650;
  word-break: break-all;
}

.success-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.timer {
  margin-top: 1rem;
  color: var(--text-dim);
  font-size: 0.85rem;
}

/* Inbox layout */
.inbox-top {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.inbox-identity h1 {
  margin: 0.2rem 0 0.35rem;
  font-size: clamp(1.35rem, 3vw, 1.85rem);
  letter-spacing: -0.03em;
}

.inbox-identity p {
  margin: 0;
  color: var(--text-dim);
  font-size: 0.9rem;
}

.inbox-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.layout {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: 1rem;
  min-height: 72vh;
}

@media (max-width: 900px) {
  .layout {
    grid-template-columns: 1fr;
  }
}

.panel {
  min-height: 560px;
  display: flex;
  flex-direction: column;
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.1rem 0.7rem;
  color: var(--text-dim);
  font-size: 0.84rem;
}

.message-list {
  list-style: none;
  margin: 0;
  padding: 0.25rem 0.55rem 0.85rem;
  overflow: auto;
  max-height: min(72vh, 820px);
}

.message-item {
  width: 100%;
  text-align: left;
  appearance: none;
  border: 1px solid transparent;
  background: transparent;
  border-radius: 14px;
  padding: 0.85rem 0.8rem;
  cursor: pointer;
  transition: background 160ms var(--ease-out), border-color 160ms var(--ease-out), transform 160ms var(--ease-out);
  opacity: 0;
  transform: translateY(8px);
  animation: item-in 360ms var(--ease-out) forwards;
}

.message-item:nth-child(1) { animation-delay: 0ms; }
.message-item:nth-child(2) { animation-delay: 40ms; }
.message-item:nth-child(3) { animation-delay: 80ms; }
.message-item:nth-child(4) { animation-delay: 120ms; }
.message-item:nth-child(5) { animation-delay: 160ms; }
.message-item:nth-child(6) { animation-delay: 200ms; }
.message-item:nth-child(7) { animation-delay: 240ms; }
.message-item:nth-child(8) { animation-delay: 280ms; }

@keyframes item-in {
  to {
    opacity: 1;
    transform: none;
  }
}

.message-item:hover {
  background: rgba(255, 255, 255, 0.05);
}

.message-item.active {
  background: rgba(126, 182, 255, 0.12);
  border-color: rgba(126, 182, 255, 0.28);
}

.message-item:active {
  transform: scale(0.985);
}

.msg-top {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.25rem;
}

.msg-from {
  font-weight: 600;
  font-size: 0.92rem;
  letter-spacing: -0.01em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.msg-date {
  color: var(--text-faint);
  font-size: 0.75rem;
  flex-shrink: 0;
}

.msg-subject {
  font-size: 0.88rem;
  margin-bottom: 0.2rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.msg-snippet {
  color: var(--text-dim);
  font-size: 0.8rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.empty {
  margin: auto;
  padding: 2rem;
  text-align: center;
  color: var(--text-dim);
}

.empty strong {
  display: block;
  color: var(--text);
  margin-bottom: 0.35rem;
  letter-spacing: -0.02em;
}

.empty em {
  color: var(--text);
  font-style: normal;
  font-weight: 600;
}

.empty-illustration {
  width: 52px;
  height: 52px;
  margin: 0 auto 0.85rem;
  border-radius: 16px;
  display: grid;
  place-items: center;
  font-size: 1.35rem;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.reader-hint {
  color: var(--text-faint);
  font-size: 0.78rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.reader-panel .reader {
  flex: 1;
}

.reader {
  padding: 0.35rem 1.15rem 1.25rem;
  overflow: auto;
  max-height: min(72vh, 820px);
  display: flex;
  flex-direction: column;
  min-height: 0;
  flex: 1;
}

.list-welcome {
  margin: 0.35rem 0.7rem 0.9rem;
  padding: 1rem 1rem 1.05rem;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid rgba(255, 255, 255, 0.09);
  color: var(--text-dim);
  animation: item-in 420ms var(--ease-out) both;
}

.list-welcome-badge {
  display: inline-flex;
  padding: 0.28rem 0.65rem;
  border-radius: 999px;
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #9ec6ff;
  background: rgba(126, 182, 255, 0.12);
  border: 1px solid rgba(126, 182, 255, 0.24);
  margin-bottom: 0.7rem;
}

.list-welcome strong {
  display: block;
  color: var(--text);
  font-size: 1rem;
  letter-spacing: -0.02em;
  margin-bottom: 0.35rem;
}

.list-welcome p {
  margin: 0 0 0.8rem;
  font-size: 0.88rem;
  line-height: 1.5;
}

.list-welcome em {
  color: var(--text);
  font-style: normal;
  font-weight: 600;
  word-break: break-all;
}

.list-welcome-points {
  margin: 0;
  padding-left: 1.1rem;
  display: grid;
  gap: 0.35rem;
  font-size: 0.84rem;
  line-height: 1.4;
}

.welcome-card,
.reader-view {
  animation: item-in 420ms var(--ease-out) both;
}

.reader-view {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 100%;
}

.welcome-card {
  padding: 0.55rem 0.15rem 0.4rem;
}

.welcome-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  font-size: 0.75rem;
  letter-spacing: 0.02em;
  color: #9ef0c8;
  background: rgba(158, 240, 200, 0.1);
  border: 1px solid rgba(158, 240, 200, 0.22);
  margin-bottom: 0.9rem;
}

.welcome-title {
  margin: 0 0 0.55rem;
  font-size: clamp(1.35rem, 2.4vw, 1.7rem);
  letter-spacing: -0.035em;
  line-height: 1.15;
}

.welcome-lead {
  margin: 0 0 1.1rem;
  color: var(--text-dim);
  line-height: 1.55;
  font-size: 0.95rem;
  max-width: 36rem;
}

.welcome-address {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.45rem 0.75rem;
  align-items: center;
  padding: 0.9rem 1rem;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  margin-bottom: 1rem;
}

.welcome-address .welcome-label {
  grid-column: 1 / -1;
}

.welcome-address code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: clamp(0.92rem, 2vw, 1.05rem);
  letter-spacing: -0.02em;
  word-break: break-all;
  color: var(--text);
}

.welcome-label {
  display: block;
  color: var(--text-faint);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.2rem;
}

.welcome-steps {
  list-style: none;
  margin: 0 0 1rem;
  padding: 0;
  display: grid;
  gap: 0.65rem;
}

.welcome-steps li {
  display: grid;
  gap: 0.15rem;
  padding: 0.8rem 0.9rem;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.07);
}

.welcome-steps strong {
  letter-spacing: -0.02em;
}

.welcome-steps span {
  color: var(--text-dim);
  font-size: 0.86rem;
  line-height: 1.45;
}

.welcome-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin-bottom: 0.9rem;
}

.welcome-meta > div {
  padding: 0.8rem 0.9rem;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.07);
}

.welcome-meta strong {
  display: block;
  font-size: 0.9rem;
  letter-spacing: -0.01em;
}

.welcome-note {
  margin: 0;
  color: var(--text-faint);
  font-size: 0.82rem;
  line-height: 1.5;
}

.reader-meta {
  flex-shrink: 0;
  margin-bottom: 0.9rem;
  padding-bottom: 0.9rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.reader-meta h2 {
  margin: 0 0 0.65rem;
  font-size: 1.25rem;
  letter-spacing: -0.025em;
  line-height: 1.25;
}

.reader-row {
  display: flex;
  gap: 0.5rem;
  color: var(--text-dim);
  font-size: 0.84rem;
  margin-top: 0.25rem;
}

.reader-row span:first-child {
  color: var(--text-faint);
  min-width: 3.2rem;
}

.reader-row span:last-child {
  color: var(--text);
  word-break: break-word;
}

.reader-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  color: rgba(255, 255, 255, 0.9);
  line-height: 1.65;
  font-size: 1rem;
  word-break: break-word;
}

.reader-text {
  flex: 1;
  white-space: pre-wrap;
  font-family: inherit;
  margin: 0;
  padding: 1rem 1.05rem;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.92);
  font-size: 0.98rem;
  line-height: 1.65;
  min-height: 52vh;
  overflow: auto;
}

.reader-frame {
  width: 100%;
  flex: 1;
  min-height: 52vh;
  height: 52vh;
  border: 0;
  border-radius: 14px;
  background: #fff;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 1.4rem;
  transform: translateX(-50%) translateY(20px) scale(0.96);
  opacity: 0;
  pointer-events: none;
  padding: 0.75rem 1rem;
  border-radius: 999px;
  background: rgba(20, 22, 30, 0.82);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: var(--shadow-glass);
  transition: transform 220ms var(--ease-out), opacity 220ms var(--ease-out);
  z-index: 50;
  font-size: 0.88rem;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0) scale(1);
}

.spin {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-top-color: rgba(255, 255, 255, 0.9);
  animation: spin 0.7s linear infinite;
  display: inline-block;
  vertical-align: middle;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
  .aurora,
  .message-item,
  .success-panel.active {
    animation: none !important;
  }
  .message-item {
    opacity: 1;
    transform: none;
  }
}

.trust-list {
  margin: 1rem 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.45rem;
  color: var(--text-dim);
  font-size: 0.92rem;
  line-height: 1.4;
}

.trust-list li {
  position: relative;
  padding-left: 1.15rem;
}

.trust-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.45rem;
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 0 10px rgba(126, 182, 255, 0.45);
}

.docs-steps {
  margin: 0.4rem 0 0.8rem;
  padding-left: 1.2rem;
  color: var(--text-dim);
  line-height: 1.55;
}

.docs-steps li + li {
  margin-top: 0.35rem;
}

.price-hero {
  display: flex;
  align-items: baseline;
  gap: 0.65rem;
  margin: 0.85rem 0 1rem;
  padding: 0.95rem 1.05rem;
  border-radius: 16px;
  background: rgba(126, 182, 255, 0.1);
  border: 1px solid rgba(126, 182, 255, 0.22);
}

.price-hero strong {
  font-size: 2rem;
  letter-spacing: -0.04em;
}

.price-hero span {
  color: var(--text-dim);
}

.price-table {
  margin-top: 0.55rem;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.price-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 1rem;
  padding: 0.7rem 0.9rem;
  color: var(--text-dim);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.price-row:first-child {
  border-top: 0;
}

.price-row.head {
  color: var(--text-faint);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  background: rgba(255, 255, 255, 0.04);
}

.badge-paid,
.badge-free {
  display: inline-block;
  margin-left: 0.35rem;
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  vertical-align: middle;
}

.badge-paid {
  color: #ffd89a;
  background: rgba(255, 196, 120, 0.12);
  border: 1px solid rgba(255, 196, 120, 0.28);
}

.badge-free {
  color: #9ef0c8;
  background: rgba(158, 240, 200, 0.12);
  border: 1px solid rgba(158, 240, 200, 0.25);
}

/* —— Docs —— */
.docs-shell,
.admin-shell {
  max-width: 1100px;
  margin: 0 auto;
  padding: 1.25rem 1.25rem 3rem;
}

.docs-hero {
  margin: 1.5rem 0 1.25rem;
}

.docs-kicker {
  margin: 0 0 0.45rem;
  color: var(--accent);
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.docs-hero h1 {
  margin: 0 0 0.65rem;
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  letter-spacing: -0.04em;
  line-height: 1.1;
}

.docs-hero p {
  margin: 0;
  max-width: 40rem;
  color: var(--text-dim);
  line-height: 1.55;
}

.docs-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 1rem;
  align-items: start;
}

.docs-sidebar {
  position: sticky;
  top: 1rem;
  display: grid;
  gap: 0.85rem;
  align-content: start;
}

.docs-toc {
  padding: 1rem;
  display: grid;
  gap: 0.45rem;
}

.docs-price-panel {
  padding: 1rem 1.05rem 1.1rem;
}

.docs-price-panel h2 {
  margin: 0 0 0.55rem;
  font-size: 1.05rem;
}

.docs-price-panel .price-hero {
  flex-direction: column;
  align-items: flex-start;
  gap: 0.2rem;
  margin: 0.7rem 0 0.85rem;
  padding: 0.8rem 0.9rem;
}

.docs-price-panel .price-hero strong {
  font-size: 1.7rem;
}

.docs-price-panel ul {
  margin: 0;
  padding-left: 1.05rem;
}

.docs-price-panel li {
  font-size: 0.86rem;
}

.btn-docs {
  white-space: nowrap;
  padding: 0.65rem 1rem;
  font-size: 0.9rem;
  font-weight: 650;
  letter-spacing: -0.01em;
  box-shadow: 0 8px 24px rgba(90, 150, 255, 0.28);
}

.docs-toc-title {
  margin: 0 0 0.35rem;
  color: var(--text-faint);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.docs-toc a {
  color: var(--text-dim);
  font-size: 0.9rem;
  padding: 0.35rem 0.45rem;
  border-radius: 8px;
}

.docs-toc a:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
}

.docs-main {
  display: grid;
  gap: 1rem;
}

.docs-card {
  padding: 1.25rem 1.35rem;
}

.docs-card h2 {
  margin: 0 0 0.7rem;
  font-size: 1.2rem;
  letter-spacing: -0.02em;
}

.docs-card p,
.docs-card li {
  color: var(--text-dim);
  line-height: 1.55;
}

.docs-card ul {
  margin: 0.5rem 0 0.75rem;
  padding-left: 1.15rem;
}

.docs-card code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.86em;
  color: var(--text);
}

.method {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 0.2rem 0.45rem;
  border-radius: 6px;
  margin-right: 0.4rem;
  vertical-align: middle;
}

.method.post {
  color: #9ef0c8;
  background: rgba(158, 240, 200, 0.12);
  border: 1px solid rgba(158, 240, 200, 0.25);
}

.method.get {
  color: #9ec4ff;
  background: rgba(126, 182, 255, 0.12);
  border: 1px solid rgba(126, 182, 255, 0.25);
}

.code-block {
  margin: 0.75rem 0;
  padding: 0.95rem 1rem;
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.08);
  overflow-x: auto;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.8rem;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.88);
  white-space: pre;
}

/* —— Admin —— */
.admin-title {
  margin: 0.2rem 0 0.45rem;
  font-size: clamp(1.5rem, 3vw, 2rem);
  letter-spacing: -0.03em;
}

.admin-lead {
  margin: 0 0 1rem;
  color: var(--text-dim);
  line-height: 1.5;
}

.admin-login {
  max-width: 440px;
  margin: 2rem auto 0;
  padding: 1.4rem 1.5rem;
}

.admin-form {
  display: grid;
  gap: 0.75rem;
}

.admin-form.compact {
  margin-bottom: 1rem;
}

.admin-form label {
  display: grid;
  gap: 0.35rem;
  color: var(--text-dim);
  font-size: 0.85rem;
}

.admin-form input,
.admin-form select {
  width: 100%;
  padding: 0.7rem 0.85rem;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.05);
  outline: none;
}

.admin-form input:focus,
.admin-form select:focus {
  border-color: rgba(126, 182, 255, 0.45);
  box-shadow: 0 0 0 3px rgba(126, 182, 255, 0.12);
}

.admin-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.6rem;
}

.admin-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.65rem;
  margin: 0.5rem 0 1rem;
}

.tester-key-row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 0.5rem;
  align-items: end;
  margin: 0.85rem 0 0.35rem;
}

.tester-key-row .tester-label {
  grid-column: 1 / -1;
}

.tester-label {
  display: block;
  color: var(--text-faint);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.3rem;
}

.tester-key-row input,
.tester-field input,
.tester-field select {
  width: 100%;
  padding: 0.7rem 0.85rem;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.05);
  outline: none;
}

.tester-key-row input:focus,
.tester-field input:focus,
.tester-field select:focus {
  border-color: rgba(126, 182, 255, 0.45);
  box-shadow: 0 0 0 3px rgba(126, 182, 255, 0.12);
}

.tester-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin: 0.9rem 0 0.85rem;
}

.tester-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 0.75rem;
}

.tester-meta {
  color: var(--text-faint);
  font-size: 0.8rem;
}

.tester-output {
  min-height: 180px;
  max-height: 420px;
  overflow: auto;
}

.stat-chip {
  padding: 0.85rem 0.95rem;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  display: grid;
  gap: 0.25rem;
}

.stat-chip span {
  color: var(--text-faint);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.stat-chip strong {
  font-size: 1.35rem;
  letter-spacing: -0.03em;
}

.admin-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.admin-card {
  padding: 1rem 1.1rem 1.15rem;
}

.admin-list {
  display: grid;
  gap: 0.65rem;
  max-height: 420px;
  overflow: auto;
  padding-right: 0.2rem;
}

.admin-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.75rem;
  align-items: start;
  padding: 0.85rem 0.9rem;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.admin-item.compact {
  grid-template-columns: 1fr;
}

.admin-item-main {
  display: grid;
  gap: 0.28rem;
  min-width: 0;
}

.admin-item-main strong {
  letter-spacing: -0.015em;
}

.admin-item-main strong em {
  font-style: normal;
  color: var(--text-dim);
  font-weight: 500;
}

.admin-item-main > span,
.admin-notes,
.admin-meta {
  color: var(--text-dim);
  font-size: 0.82rem;
  line-height: 1.4;
  word-break: break-word;
}

.admin-meta {
  color: var(--text-faint);
  font-size: 0.76rem;
}

.admin-item-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  justify-content: flex-end;
}

.admin-item-actions .danger {
  color: var(--danger);
}

.admin-empty {
  margin: 0;
  color: var(--text-faint);
  font-size: 0.9rem;
  padding: 0.4rem 0.1rem;
}

.token-line {
  display: block;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.78rem;
  padding: 0.45rem 0.55rem;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid rgba(255, 255, 255, 0.08);
  cursor: pointer;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.usage-row {
  display: grid;
  gap: 0.35rem;
}

.usage-bar {
  height: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.usage-bar i {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  border-radius: inherit;
}

@media (max-width: 900px) {
  .docs-layout,
  .admin-grid,
  .tester-grid {
    grid-template-columns: 1fr;
  }

  .docs-sidebar {
    position: static;
  }

  .btn-docs {
    white-space: normal;
    text-align: center;
  }

  .admin-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .admin-form-row,
  .tester-key-row {
    grid-template-columns: 1fr;
  }

  .tester-key-row .btn {
    width: 100%;
  }

  .admin-item {
    grid-template-columns: 1fr;
  }

  .admin-item-actions {
    justify-content: flex-start;
  }
}
