/* ==========================================================================
   stackhuddle — brand system
   warm near-black ground · white ink · flame + amber accents · stacked-pill motif
   ========================================================================== */

/* Palette taken from the StackHuddle logo directions:
   ground #1E1C19 · ink #FFFFFF · flame #E85D3D · amber #F4B942 */
:root {
  --bg-0: #171512;
  --bg-1: #1e1c19;
  --surface: #1e1c19;
  --surface-2: #282520;
  --edge: #383327;
  --edge-soft: #2b2823;
  --ink: #f7f5f1;
  --ink-dim: #aaa294;
  --ink-faint: #786f60;
  --accent: #e85d3d;
  --accent-hover: #ef6e50;
  --accent-soft: rgba(232, 93, 61, 0.13);
  --amber: #f4b942;
  --amber-soft: rgba(244, 185, 66, 0.13);
  --danger: #e85d3d;
  --ok: #f4b942;
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 16px;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
  --sans: "Inter", -apple-system, system-ui, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

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

body {
  background-color: var(--bg-0);
  /* faint accent bloom up top + film grain — echoes the app icon's light-to-dark fall */
  background-image:
    radial-gradient(1100px 520px at 50% -220px, rgba(244, 185, 66, 0.05), transparent 68%),
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='2' stitchTiles='stitch'/><feColorMatrix type='saturate' values='0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)' opacity='0.035'/></svg>");
  background-attachment: fixed, fixed;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.5;
  min-height: 100svh;
  -webkit-font-smoothing: antialiased;
}

.hidden { display: none !important; }
.muted { color: var(--ink-faint); font-weight: 400; }

.screen { min-height: 100svh; padding-bottom: 56px; }

/* ---------- brand ---------- */

.lockup-slot { display: flex; align-items: center; flex-shrink: 0; }
.lockup-img { height: 30px; width: auto; display: block; }
.lockup-img-lg { height: 62px; margin: 0 auto; }
.mark { width: 30px; height: 30px; display: block; }
.only-m { display: none; }
.wordmark {
  font-weight: 600;
  letter-spacing: -0.03em;
  font-size: 1.15rem;
  color: var(--ink);
}
.home-wrap .wordmark { font-size: 2.6rem; }

/* ---------- topbar ---------- */

.topbar {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px clamp(16px, 3vw, 28px);
  padding-top: max(14px, env(safe-area-inset-top));
  border-bottom: 1px solid var(--edge-soft);
  background: rgba(23, 21, 18, 0.85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  z-index: 10;
}

.topbar-mid { flex: 1; min-width: 0; display: flex; align-items: center; justify-content: center; }

.code-chip {
  font-family: var(--mono);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.3em;
  text-indent: 0.3em;
  color: var(--amber);
  background: var(--amber-soft);
  border: 1px solid rgba(244, 185, 66, 0.3);
  border-radius: 99px;
  padding: 5px 16px;
}

.research-topic {
  font-weight: 550;
  font-size: 0.95rem;
  color: var(--ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  display: block;
  text-align: center;
}

.timer {
  font-family: var(--mono);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  min-width: 72px;
  text-align: right;
}
.timer.low { color: var(--danger); animation: pulse 1s infinite; }
@keyframes pulse { 50% { opacity: 0.4; } }

/* ---------- cards / buttons / inputs ---------- */

.card {
  background: var(--surface);
  border: 1px solid var(--edge-soft);
  border-radius: var(--r-lg);
  padding: 22px;
}
.card h2 {
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--ink-dim);
  margin-bottom: 14px;
}

.btn {
  border: 1px solid transparent;
  border-radius: var(--r-md);
  padding: 11px 20px;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  color: #fff;
  background: var(--surface-2);
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.06s ease;
  min-height: 44px;
}
.btn:active { transform: scale(0.98); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }

.btn-primary { background: var(--accent); }
.btn-primary:hover:not(:disabled) { background: var(--accent-hover); }

.btn-quiet { background: transparent; border-color: var(--edge); color: var(--ink-dim); }
.btn-quiet:hover:not(:disabled) { color: var(--ink); border-color: var(--ink-faint); }

.btn-leave {
  background: transparent;
  border-color: var(--edge);
  color: var(--ink-faint);
  padding: 7px 14px;
  min-height: 36px;
  font-size: 0.85rem;
  flex-shrink: 0;
}
.btn-leave:hover { color: var(--danger); border-color: var(--danger); }

.btn-big { padding: 15px 30px; font-size: 1.05rem; }

input, textarea {
  background: var(--bg-0);
  border: 1px solid var(--edge);
  border-radius: var(--r-md);
  color: var(--ink);
  font-family: inherit;
  font-size: 1rem; /* ≥16px prevents iOS zoom-on-focus */
  padding: 12px 15px;
  outline: none;
  width: 100%;
}
input:focus, textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
::placeholder { color: var(--ink-faint); }

.hint { color: var(--ink-faint); font-size: 0.86rem; line-height: 1.55; }

.toast {
  position: fixed;
  top: max(16px, env(safe-area-inset-top));
  left: 50%;
  transform: translateX(-50%);
  background: var(--danger);
  color: #fff;
  font-weight: 600;
  font-size: 0.9rem;
  padding: 11px 20px;
  border-radius: var(--r-md);
  z-index: 100;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  max-width: calc(100vw - 32px);
}

/* ---------- home ---------- */

.home-wrap {
  max-width: 520px;
  margin: 0 auto;
  padding: clamp(40px, 9vh, 96px) 20px 40px;
  text-align: center;
}

.tagline { color: var(--ink-dim); margin: 18px 0 34px; line-height: 1.65; font-size: 1.02rem; }

.home-card { text-align: left; display: flex; flex-direction: column; gap: 14px; }
.home-card label { color: var(--ink-dim); font-size: 0.85rem; font-weight: 500; }

.divider {
  display: flex; align-items: center; gap: 12px;
  color: var(--ink-faint); font-size: 0.82rem; margin: 2px 0;
}
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--edge-soft); }

.join-row { display: flex; gap: 10px; }
.join-row input {
  font-family: var(--mono);
  text-transform: uppercase;
  letter-spacing: 0.4em;
  text-indent: 0.4em;
  text-align: center;
}

.how {
  margin-top: 40px;
  list-style: none;
  counter-reset: step;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.how li {
  counter-increment: step;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 11px 4px;
  font-size: 0.9rem;
  color: var(--ink-dim);
  border-bottom: 1px solid var(--edge-soft);
}
.how li:last-child { border-bottom: none; }
.how li::before {
  content: counter(step, decimal-leading-zero);
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--accent);
  flex-shrink: 0;
}

/* ---------- lobby ---------- */

.lobby-grid {
  display: grid;
  grid-template-columns: 270px minmax(0, 1fr) 270px;
  gap: 18px;
  max-width: 1180px;
  margin: 24px auto 0;
  padding: 0 clamp(14px, 3vw, 20px);
  align-items: start;
}

.player-list { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.player-list li {
  display: flex; align-items: center; gap: 10px;
  background: var(--bg-0);
  border: 1px solid var(--edge-soft);
  border-radius: var(--r-md);
  padding: 11px 14px;
  font-weight: 500;
  font-size: 0.94rem;
}
.player-list li .slot {
  font-family: var(--mono);
  font-size: 0.76rem;
  color: var(--ink-faint);
  flex-shrink: 0;
}
.player-list li .badge {
  margin-left: auto;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  padding: 3px 9px;
  border-radius: 99px;
  background: var(--accent-soft);
  color: var(--accent);
  white-space: nowrap;
}
.player-list li .badge.done { background: var(--amber-soft); color: var(--amber); }
.player-list li .badge.now { background: var(--accent); color: #fff; }
.player-list li.me { border-color: rgba(232, 93, 61, 0.45); }
.player-list li.gone { opacity: 0.4; }
.player-list li .host-dot {
  width: 14px; height: 6px;
  background: var(--amber);
  border-radius: 99px;
  flex-shrink: 0;
}

.shuffle-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 20px;
}

.category-picker { width: 100%; margin-bottom: 18px; }
.picker-label {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--ink-faint);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  text-align: center;
  margin-bottom: 10px;
}
.cat-select-wrap { position: relative; max-width: 320px; margin: 0 auto; }
#category-select {
  appearance: none;
  -webkit-appearance: none;
  width: 100%;
  background: var(--bg-0);
  border: 1px solid var(--edge);
  border-radius: var(--r-md);
  color: var(--ink);
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 500;
  padding: 11px 42px 11px 15px;
  cursor: pointer;
  min-height: 44px;
}
#category-select:hover:not(:disabled) { border-color: var(--ink-faint); }
#category-select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); outline: none; }
#category-select:disabled { cursor: default; opacity: 0.65; }
.cat-caret {
  position: absolute;
  right: 17px;
  top: calc(50% - 6px);
  width: 9px;
  height: 9px;
  border-right: 2px solid var(--ink-faint);
  border-bottom: 2px solid var(--ink-faint);
  transform: rotate(45deg);
  pointer-events: none;
}

/* The shuffler — a framed slab where topic candidates flicker past and the
   real one settles in. */
.shuffle-frame {
  position: relative;
  width: 100%;
  min-height: 190px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background: var(--bg-0);
  border: 1px solid var(--edge);
  border-radius: var(--r-md);
  padding: 34px clamp(20px, 5vw, 48px);
  text-align: center;
  overflow: hidden;
}
.shuffle-frame::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(420px 160px at 50% 110%, var(--accent-soft), transparent 70%);
  opacity: 0;
  transition: opacity 0.5s ease;
  pointer-events: none;
}
.shuffle-frame.settled::before { opacity: 1; }

.shuffle-corner {
  position: absolute;
  width: 9px; height: 9px;
  background: var(--edge);
  border-radius: 2px;
  transform: rotate(45deg);
  transition: background 0.4s ease;
}
.shuffle-frame.settled .shuffle-corner { background: var(--accent); }
.shuffle-corner.tl { top: 10px; left: 10px; }
.shuffle-corner.tr { top: 10px; right: 10px; }
.shuffle-corner.bl { bottom: 10px; left: 10px; }
.shuffle-corner.br { bottom: 10px; right: 10px; }

.shuffle-category {
  font-family: var(--mono);
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--ink-faint);
  transition: color 0.3s ease;
}
.shuffle-frame.settled .shuffle-category { color: var(--accent); }

.shuffle-text {
  font-size: clamp(1.7rem, 4.5vw, 2.4rem);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.025em;
  color: var(--ink);
  max-width: 520px;
}
.shuffle-frame.shuffling .shuffle-text {
  color: var(--ink-dim);
  animation: flicker 0.12s steps(2) infinite;
}
@keyframes flicker { 50% { opacity: 0.55; } }
.shuffle-frame.settled .shuffle-text { animation: settle-in 0.4s ease; }
@keyframes settle-in { from { transform: translateY(6px); opacity: 0; filter: blur(3px); } }

.wheel-actions {
  margin-top: 18px;
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  justify-content: center;
  min-height: 56px;
}

.setting { margin-bottom: 22px; }
.setting label { display: flex; justify-content: space-between; color: var(--ink-dim); font-size: 0.86rem; margin-bottom: 10px; }
.setting strong { color: var(--ink); font-family: var(--mono); font-weight: 600; }
input[type="range"] { accent-color: var(--accent); padding: 0; height: 28px; }

/* ---------- research ---------- */

.research-grid {
  display: grid;
  grid-template-columns: 1fr;
  max-width: 820px;
  margin: 20px auto 0;
  padding: 0 clamp(14px, 3vw, 20px);
  height: calc(100svh - 140px);
}

.chat-card { display: flex; flex-direction: column; min-height: 0; }

.chat-log {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 2px;
  margin-bottom: 12px;
  overscroll-behavior: contain;
}
.chat-msg {
  max-width: 90%;
  padding: 11px 15px;
  border-radius: var(--r-md);
  font-size: 0.92rem;
  line-height: 1.55;
  white-space: pre-wrap;
  word-wrap: break-word;
}
.chat-msg.user { align-self: flex-end; background: var(--accent); border-bottom-right-radius: 4px; }
.chat-msg.assistant { align-self: flex-start; background: var(--bg-0); border: 1px solid var(--edge-soft); border-bottom-left-radius: 4px; }
.chat-msg.thinking { color: var(--ink-faint); font-style: italic; }

/* assistant answers render as fact rows with a small stacked-pill marker;
   text flows inline like a normal sentence — the marker is absolutely
   positioned so it can't break the line into columns */
.chat-msg.assistant .chat-line {
  display: block;
  position: relative;
  padding: 6px 0 6px 22px;
  white-space: normal;
}
.chat-msg.assistant .chat-line + .chat-line { border-top: 1px solid var(--edge-soft); }
.chat-msg.assistant .chat-line::before {
  content: "";
  position: absolute;
  left: 0;
  top: 14px;
  width: 12px;
  height: 5px;
  border-radius: 99px;
  background: var(--amber);
}
.chat-msg.assistant .chat-line:nth-child(even)::before { background: var(--accent); }
.chat-msg.assistant strong { color: var(--ink); font-weight: 650; }
.chat-msg.assistant a {
  color: var(--amber);
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px solid rgba(244, 185, 66, 0.4);
}
.chat-msg.assistant a:hover { border-bottom-color: var(--amber); }
.chat-msg.assistant a::after { content: " ↗"; font-size: 0.8em; }
.chat-form { display: flex; gap: 10px; }
.chat-form .btn { flex-shrink: 0; }
#btn-end-research { margin-top: 12px; }

/* ---------- present ---------- */

.present-wrap {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 18px;
  max-width: 1060px;
  margin: 24px auto 0;
  padding: 0 clamp(14px, 3vw, 20px);
  align-items: start;
}

.present-stage { min-height: 420px; display: flex; align-items: center; justify-content: center; }
.stage { text-align: center; width: 100%; display: flex; flex-direction: column; align-items: center; gap: 16px; }
.stage h2 { font-size: 1.4rem; font-weight: 650; letter-spacing: -0.02em; text-transform: none; color: var(--ink); margin: 0; }
.stage p { color: var(--ink-dim); line-height: 1.6; font-size: 0.95rem; }
.stage-mark img { width: 52px; height: 52px; opacity: 0.9; }

.rec-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--danger);
  border: 1px solid rgba(210, 94, 106, 0.4);
  border-radius: 99px;
  padding: 6px 14px;
}
.rec-dot {
  width: 9px; height: 9px;
  background: var(--danger);
  border-radius: 50%;
  animation: pulse 1.1s infinite;
}

.live-transcript {
  width: 100%;
  min-height: 180px;
  max-height: 300px;
  overflow-y: auto;
  background: var(--bg-0);
  border: 1px solid var(--edge-soft);
  border-radius: var(--r-md);
  padding: 16px;
  text-align: left;
  line-height: 1.7;
  font-size: 1rem;
}
.live-transcript .interim { color: var(--ink-faint); }

#transcript-edit { min-height: 200px; resize: vertical; line-height: 1.6; }

/* ---------- judging ---------- */

.judging-wrap {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  text-align: center;
  padding: 0 24px;
}
.judging-wrap h1 { font-size: 1.5rem; font-weight: 650; letter-spacing: -0.02em; }

.stack-loader {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  margin-bottom: 10px;
}
.stack-loader span { border-radius: 99px; animation: stack-hop 1.5s ease-in-out infinite; }
.stack-loader .bar-top {
  width: 46px; height: 18px;
  background:
    radial-gradient(circle 2.8px at 30% 50%, #1e1c19 97%, transparent),
    radial-gradient(circle 2.8px at 50% 50%, #1e1c19 97%, transparent),
    radial-gradient(circle 2.8px at 70% 50%, #1e1c19 97%, transparent),
    #fff;
  animation-delay: 0.3s;
}
.stack-loader .bar-mid { width: 58px; height: 14px; background: var(--accent); animation-delay: 0.15s; }
.stack-loader .bar-base { width: 48px; height: 14px; background: var(--amber); }
@keyframes stack-hop { 0%, 100% { transform: translateY(0); } 30% { transform: translateY(-7px); } 60% { transform: translateY(0); } }

/* ---------- results ---------- */

.results-wrap {
  max-width: 720px;
  margin: 24px auto 0;
  padding: 0 clamp(14px, 3vw, 20px);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.judge-commentary {
  font-size: 1rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--accent-soft);
  border: 1px solid rgba(232, 93, 61, 0.3);
  border-radius: var(--r-lg);
  padding: 18px 22px;
}

.results-error {
  background: rgba(210, 94, 106, 0.1);
  border: 1px solid rgba(210, 94, 106, 0.35);
  border-radius: var(--r-lg);
  padding: 16px 20px;
  color: var(--danger);
  font-size: 0.94rem;
}

.results-list { display: flex; flex-direction: column; gap: 12px; }

.result-card {
  background: var(--surface);
  border: 1px solid var(--edge-soft);
  border-radius: var(--r-lg);
  padding: 20px 22px;
}
.result-card.first { border-color: rgba(244, 185, 66, 0.55); box-shadow: 0 0 0 1px rgba(244, 185, 66, 0.2), 0 8px 40px rgba(244, 185, 66, 0.08); }

.result-head { display: flex; align-items: center; gap: 14px; margin-bottom: 12px; }
.result-rank {
  font-family: var(--mono);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--ink-dim);
  background: var(--bg-0);
  border: 1px solid var(--edge);
  width: 34px; height: 34px;
  border-radius: var(--r-sm);
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.result-card.first .result-rank { background: var(--amber); border-color: var(--amber); color: #1e1c19; }
.result-name { font-weight: 650; font-size: 1.05rem; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.result-name .you {
  color: var(--accent);
  font-size: 0.68rem;
  font-family: var(--mono);
  font-weight: 600;
  letter-spacing: 0.1em;
  margin-left: 8px;
  vertical-align: 2px;
}
.result-score {
  margin-left: auto;
  font-family: var(--mono);
  font-size: 1.65rem;
  font-weight: 600;
  color: var(--amber);
  font-variant-numeric: tabular-nums;
}
.result-score small { font-size: 0.8rem; color: var(--ink-faint); font-weight: 400; }

.bars { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 20px; margin: 10px 0 14px; }
.bar-row { display: flex; align-items: center; gap: 10px; font-size: 0.76rem; color: var(--ink-faint); }
.bar-row .bar-label { width: 62px; flex-shrink: 0; }
.bar { flex: 1; height: 5px; background: var(--bg-0); border-radius: 99px; overflow: hidden; }
.bar i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--accent), var(--amber)); }
.bar-row .bar-val { width: 26px; text-align: right; font-family: var(--mono); }

.result-feedback { color: var(--ink-dim); font-size: 0.92rem; line-height: 1.6; }
.result-highlight { margin-top: 10px; color: var(--ink); font-size: 0.88rem; line-height: 1.5; padding-left: 12px; border-left: 2px solid var(--accent); }
.result-highlight::before { content: "Best moment — "; color: var(--accent); font-weight: 600; }
.result-total { margin-top: 10px; color: var(--ink-faint); font-size: 0.8rem; font-family: var(--mono); }

.history-list { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.history-list li {
  display: flex; gap: 14px; align-items: baseline;
  background: var(--bg-0);
  border: 1px solid var(--edge-soft);
  border-radius: var(--r-md);
  padding: 10px 14px;
  font-size: 0.88rem;
}
.history-list .h-score { font-family: var(--mono); font-weight: 600; color: var(--amber); min-width: 40px; }
.history-list .h-topic { flex: 1; color: var(--ink); min-width: 0; }
.history-list .h-date { color: var(--ink-faint); font-size: 0.78rem; flex-shrink: 0; }

.results-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  align-items: center;
  padding: 10px 0 32px;
}
.results-actions .hint { width: 100%; text-align: center; }

/* ---------- mobile ---------- */

@media (max-width: 920px) {
  .lobby-grid, .present-wrap { grid-template-columns: 1fr; }
  .research-grid { height: calc(100svh - 130px); }

  /* Put the main action (wheel / stage) first on small screens */
  .order-1m { order: 1; }
  .order-2m { order: 2; }
  .order-3m { order: 3; }

  .chat-card { height: 100%; }

  .present-stage { min-height: 340px; }

  .topbar { gap: 10px; padding-left: 14px; padding-right: 14px; }
  .topbar .only-d { display: none; }
  .topbar .only-m { display: block; } /* mark-only on phones */
  .research-topic { font-size: 0.85rem; }
  .timer { font-size: 1.05rem; min-width: 58px; }

  .card { padding: 16px; border-radius: var(--r-md); }
  .lockup-img-lg { height: 46px; }

  .btn-big { width: 100%; }
  .wheel-actions { width: 100%; }
  .wheel-actions .btn-quiet { width: 100%; }

  .bars { grid-template-columns: 1fr; }
  .result-score { font-size: 1.4rem; }
}

/* ---------- billing / plan box ---------- */

.plan-box {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--edge-soft);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.plan-name {
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--amber);
}
.plan-desc { color: var(--ink); font-size: 0.9rem; line-height: 1.5; }

/* ---------- host auth ---------- */

.auth-box { display: flex; flex-direction: column; gap: 10px; }
.auth-row { display: flex; gap: 10px; }
.auth-row input { flex: 1; min-width: 0; }
.auth-row .btn { flex-shrink: 0; }
#auth-hint a { color: var(--amber); }
.auth-status { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.auth-status strong { color: var(--ink); font-weight: 600; }
.linklike {
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  color: var(--amber);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.linklike:hover { color: var(--accent); }

.btn-copy { width: 100%; margin: 12px 0 10px; font-size: 0.88rem; }
