:root {
  --bg0: #0f1218;
  --bg1: #161b24;
  --card: #1c2330;
  --border: rgba(255, 255, 255, 0.08);
  --text: #e8ecf4;
  --muted: #8b95a8;
  --accent: #6ee7b7;
  --accent-dim: #34d399;
  --danger: #f87171;
  --radius: 14px;
  --shadow: 0 24px 48px rgba(0, 0, 0, 0.45);
  font-family: "DM Sans", system-ui, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background: var(--bg0);
}

.bg {
  position: fixed;
  inset: 0;
  background:
    radial-gradient(900px 420px at 12% -10%, rgba(110, 231, 183, 0.12), transparent),
    radial-gradient(700px 380px at 88% 0%, rgba(96, 165, 250, 0.1), transparent),
    var(--bg0);
  z-index: -1;
}

.shell {
  max-width: 440px;
  margin: 0 auto;
  padding: 3rem 1.25rem 2rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.75rem;
}

.logo {
  font-size: 1.75rem;
  color: var(--accent);
  line-height: 1;
}

h1 {
  margin: 0;
  font-size: 1.65rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.tagline {
  margin: 0.2rem 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.35rem 1.35rem 1.5rem;
  box-shadow: var(--shadow);
}

.hint {
  margin: 0 0 1.1rem;
  font-size: 0.82rem;
  line-height: 1.45;
  color: var(--muted);
}

.hint code {
  font-size: 0.78rem;
  padding: 0.12rem 0.35rem;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.35);
  color: var(--accent-dim);
}

.status {
  min-height: 1.25rem;
  font-size: 0.88rem;
  margin-bottom: 0.75rem;
}

.status.error {
  color: var(--danger);
}

.status.ok {
  color: var(--accent-dim);
}

.button-host {
  min-height: 44px;
  display: flex;
  justify-content: center;
  margin-bottom: 0.25rem;
}

.token-panel {
  margin-top: 1.25rem;
  padding-top: 1.1rem;
  border-top: 1px solid var(--border);
}

.token-panel.hidden {
  display: none;
}

.token-panel label {
  display: block;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin-bottom: 0.45rem;
}

#token-out {
  width: 100%;
  padding: 0.65rem 0.75rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg1);
  color: var(--text);
  font-family: ui-monospace, monospace;
  font-size: 0.72rem;
  line-height: 1.4;
  resize: vertical;
}

.row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 0.65rem;
}

.btn.secondary {
  padding: 0.45rem 0.85rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  font-size: 0.85rem;
  cursor: pointer;
  font-family: inherit;
}

.btn.secondary:hover {
  background: rgba(255, 255, 255, 0.1);
}

.copy-hint {
  font-size: 0.8rem;
  color: var(--accent-dim);
}

.meta {
  margin: 0.65rem 0 0;
  font-size: 0.8rem;
  color: var(--muted);
}

.refresh-label {
  display: block;
  margin-top: 1rem;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin-bottom: 0.45rem;
}

.refresh-ta {
  width: 100%;
  padding: 0.65rem 0.75rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg1);
  color: var(--text);
  font-family: ui-monospace, monospace;
  font-size: 0.72rem;
  line-height: 1.4;
  resize: vertical;
}

.foot {
  margin-top: 1.5rem;
  text-align: center;
}

.foot a {
  color: var(--muted);
  font-size: 0.85rem;
  text-decoration: none;
}

.foot a:hover {
  color: var(--accent-dim);
}
