:root {
  color-scheme: light;
  --bg: #FCFAF6;
  --surface: #FFFFFF;
  --surface-2: #F4F0E8;
  --ink: #1E2421;
  --muted: #555E59;
  --border: #1E2421;
  --border-soft: #DCD6CA;
  --offset: 0 3px 0 #1E2421;
  --offset-sm: 0 2px 0 #1E2421;

  /* Default theme: weekend (Vibrant Forest Green) */
  --accent: #197A4B;
  --accent-hover: #13613B;
  --accent-bright: #26A668;
  --accent-text: #125936;
  --tint: #E3F6EB;
  --critter-a: #35C17B;
  --critter-b: #FFD15C;
  --poster-bg: #EBF9F1;

  --kakao-bg: #FEE500;
  --kakao-hover: #F2DA00;
  --kakao-ink: #191919;

  --pill-close-bg: #FFF4D6;
  --pill-close-ink: #6B4A00;
  --pill-diff-bg: #FFEAE6;
  --pill-diff-ink: #9E271A;

  --font-display: 'Plus Jakarta Sans', 'Noto Sans KR', 'Pretendard', 'Apple SD Gothic Neo', 'Malgun Gothic', system-ui, sans-serif;
  --font-sans: 'Noto Sans KR', 'Plus Jakarta Sans', 'Pretendard', 'Apple SD Gothic Neo', 'Malgun Gothic', system-ui, sans-serif;

  font-family: var(--font-sans);
  color: var(--ink);
  background: var(--bg);
  font-size: 16px;
  line-height: 1.55;
  word-break: keep-all;
  -webkit-font-smoothing: antialiased;
}

:root[data-theme="travel"] {
  --accent: #1F56D9;
  --accent-hover: #1845B3;
  --accent-bright: #6E9BFF;
  --accent-text: #153D9E;
  --tint: #E6EEFF;
  --critter-a: #6E9BFF;
  --critter-b: #FFB84D;
  --poster-bg: #EDF2FF;
}

:root[data-theme="love"] {
  --accent: #C93B2B;
  --accent-hover: #A62D20;
  --accent-bright: #FF6B57;
  --accent-text: #9E271A;
  --tint: #FFEAE6;
  --critter-a: #FF6B57;
  --critter-b: #FFD15C;
  --poster-bg: #FFF0ED;
}

:root[data-theme="food"] {
  --accent: #C2591A;
  --accent-hover: #9E4612;
  --accent-bright: #F28B44;
  --accent-text: #8C3D0E;
  --tint: #FFF0E4;
  --critter-a: #F28B44;
  --critter-b: #66C796;
  --poster-bg: #FFF6EE;
}

:root[data-theme="contact"] {
  --accent: #6D3FC0;
  --accent-hover: #5830A1;
  --accent-bright: #9E74EB;
  --accent-text: #4F2B91;
  --tint: #F1EAFF;
  --critter-a: #9467E6;
  --critter-b: #FFCA63;
  --poster-bg: #F7F3FF;
}

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

body {
  min-width: 280px;
  min-height: 100dvh;
  margin: 0;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--ink);
}

a { color: inherit; }
button, input, textarea { font: inherit; }
svg { display: block; max-width: 100%; height: auto; }

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}
h1:focus { outline: none; }

h1, h2, h3, p { margin: 0; }
h1, h2, h3 {
  font-family: var(--font-sans);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--ink);
}
h1 { font-size: clamp(1.45rem, 3.8vw, 2.15rem); line-height: 1.24; }
h2 { font-size: 1.15rem; line-height: 1.32; }
h3 { font-size: 1rem; line-height: 1.35; }

main, .site-header, .site-footer {
  width: min(100% - 32px, 920px);
  margin: 0 auto;
}
main { flex: 1; }

/* ===== Global Header & Footer ===== */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 0 14px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: var(--ink);
}

.brand-wordmark {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: -0.045em;
  line-height: 1;
}

.brand-ko-badge {
  font-size: 0.74rem;
  font-weight: 800;
  line-height: 1.2;
  background: var(--tint);
  color: var(--accent-text);
  border: 1.5px solid var(--border);
  padding: 2px 8px;
  border-radius: 7px;
  transition: background 200ms ease, color 200ms ease;
}

.site-description {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--muted);
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 9px;
  padding: 4px 10px;
  box-shadow: var(--offset-sm);
  white-space: nowrap;
}

.site-footer {
  margin-top: 36px;
  padding: 18px 0 26px;
  border-top: 1.5px dashed var(--border-soft);
  color: var(--muted);
  font-size: 0.84rem;
  display: grid;
  gap: 6px;
}
.site-footer strong {
  font-family: var(--font-display);
  font-weight: 800;
  color: var(--ink);
}
.site-footer span { margin: 0 0.25em; }
.site-footer-copyright {
  font-size: 0.75rem;
  line-height: 1.45;
  color: var(--muted);
  opacity: 0.88;
  overflow-wrap: break-word;
  text-wrap: balance;
}

/* ===== Shared Utilities ===== */
.lede {
  margin-top: 10px;
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 500;
  line-height: 1.55;
}

.fine-print {
  font-size: 0.84rem;
  color: var(--muted);
  margin-top: 8px;
  line-height: 1.5;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 10px;
  padding: 3px 10px;
  border-radius: 8px;
  background: var(--tint);
  color: var(--accent-text);
  border: 1.5px solid var(--border);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.loading {
  text-align: center;
  padding: 64px 0;
  color: var(--muted);
  font-weight: 600;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* ===== Buttons (Concept B Crisp Ink Frame) ===== */
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}
.spread { justify-content: space-between; }

.button {
  min-height: 46px;
  padding: 10px 18px;
  border: 1.5px solid var(--border);
  border-radius: 13px;
  cursor: pointer;
  font-weight: 800;
  font-size: 0.94rem;
  letter-spacing: -0.02em;
  text-align: center;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  box-shadow: var(--offset-sm);
  transition: transform 110ms ease, box-shadow 110ms ease, background 160ms ease;
}

.button:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: var(--offset);
}

.button:active:not(:disabled) {
  transform: translateY(1px);
  box-shadow: 0 1px 0 var(--border);
}

.button:disabled {
  opacity: 0.45;
  cursor: default;
  box-shadow: none;
}

.primary {
  color: #FFFFFF;
  background: var(--accent);
  box-shadow: var(--offset);
}
.primary:hover:not(:disabled) {
  background: var(--accent-hover);
}

.secondary {
  color: var(--ink);
  background: var(--surface);
}
.secondary:hover:not(:disabled) {
  background: var(--tint);
}

.kakao {
  color: var(--kakao-ink);
  background: var(--kakao-bg);
}
.kakao:hover:not(:disabled) {
  background: var(--kakao-hover);
}

/* ===== Home Screen ===== */
.home-stack {
  display: grid;
  gap: 20px;
}

.hero {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 20px;
  box-shadow: var(--offset);
  overflow: hidden;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  align-items: stretch;
}

.hero-copy {
  padding: 36px 32px 34px 36px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  min-width: 0;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  margin-bottom: 14px;
  border-radius: 8px;
  background: var(--tint);
  color: var(--accent-text);
  border: 1.5px solid var(--border);
  font-size: 0.78rem;
  font-weight: 800;
  transition: background 200ms ease, color 200ms ease;
}

.hero h1 {
  font-size: clamp(1.8rem, 4.4vw, 2.75rem);
  letter-spacing: -0.04em;
  line-height: 1.16;
  max-width: 12em;
}

.hero .lede {
  margin: 12px 0 22px;
  max-width: 28em;
}

.hero-actions {
  width: 100%;
  gap: 10px;
}

.hero-art {
  background: var(--tint);
  border-left: 1.5px solid var(--border);
  padding: 24px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  transition: background 200ms ease;
}

.hero-issue-tag {
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: var(--ink);
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 8px;
  padding: 3px 10px;
  box-shadow: var(--offset-sm);
}

.hero-art .ink-critters {
  width: min(210px, 100%);
}

/* Home Theme Selector (when multiple themes exist) */
.themes-box {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 18px;
  padding: 18px 20px;
  box-shadow: var(--offset-sm);
}

.themes-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 12px;
}

.themes-head .fine-print {
  margin-top: 0;
}

.theme-list {
  display: grid;
  gap: 10px;
}

.theme-card {
  width: 100%;
  text-align: left;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 14px;
  padding: 13px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  box-shadow: var(--offset-sm);
  cursor: pointer;
  transition: background 180ms ease, transform 120ms ease;
}

.theme-card.is-selected {
  background: var(--tint);
  box-shadow: var(--offset);
  transform: translateY(-1px);
}

.theme-card-left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.theme-icon-box {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  border: 1.5px solid var(--border);
  background: var(--tint);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.theme-card-copy {
  min-width: 0;
}

.theme-card-copy h3 {
  font-size: 0.96rem;
  font-weight: 800;
}

.theme-card-copy .fine-print {
  margin-top: 2px;
  font-size: 0.8rem;
}

.theme-pill {
  font-size: 0.74rem;
  font-weight: 800;
  padding: 3px 9px;
  border-radius: 8px;
  border: 1.5px solid var(--border);
  background: var(--surface-2);
  color: var(--ink);
  white-space: nowrap;
  flex-shrink: 0;
}

.theme-card.is-selected .theme-pill {
  background: var(--accent);
  color: #FFFFFF;
}

/* Home Recent & How-it-works Cards */
.recent-results, .how-it-works {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 18px;
  padding: 20px 22px;
  box-shadow: var(--offset-sm);
}

.section-head .fine-print { margin-top: 4px; }

.recent-list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.recent-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border: 1.5px solid var(--border);
  border-radius: 13px;
  background: var(--bg);
  text-decoration: none;
  box-shadow: var(--offset-sm);
  transition: background 150ms ease, transform 110ms ease;
}

.recent-item:hover {
  background: var(--tint);
  transform: translateY(-1px);
}

.recent-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.recent-meta {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 600;
}

.recent-arrow {
  color: var(--accent-text);
  font-weight: 800;
  font-size: 0.86rem;
  flex: 0 0 auto;
}

.steps-grid {
  list-style: none;
  padding: 0;
  margin: 14px 0 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.step-card {
  padding: 15px 14px;
  border-radius: 14px;
  background: var(--bg);
  border: 1.5px solid var(--border);
  display: grid;
  gap: 6px;
  align-content: start;
}

.step-card .fine-print { margin-top: 0; }

.step-num {
  width: 26px;
  height: 26px;
  border-radius: 8px;
  background: var(--tint);
  color: var(--accent-text);
  border: 1.5px solid var(--border);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 0.82rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* ===== Main Panel (Quiz, Waiting, Invite, Error) ===== */
.panel {
  max-width: 680px;
  margin: 4px auto 0;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 20px;
  box-shadow: var(--offset);
  overflow: hidden;
}

.panel-band {
  background: var(--tint);
  border-bottom: 1.5px solid var(--border);
  padding: 12px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 0.8rem;
  font-weight: 800;
  color: var(--ink);
}

.panel-band.is-bright {
  background: var(--accent-bright);
  color: var(--ink);
}

.panel-band-label {
  font-family: var(--font-display);
  letter-spacing: 0.02em;
}

.panel-body {
  padding: clamp(18px, 4vw, 32px);
}

.panel-body > .actions,
.panel-body > .button {
  margin-top: 20px;
}

.mascot-stage {
  display: flex;
  justify-content: center;
  margin: 0 0 12px;
}

.invite-meta {
  display: inline-flex;
  align-items: center;
  margin-top: 14px;
  padding: 5px 11px;
  border-radius: 9px;
  background: var(--surface-2);
  border: 1.5px solid var(--border);
  color: var(--ink);
  font-size: 0.82rem;
  font-weight: 700;
}

/* ===== Quiz Controls ===== */
.quiz-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  color: var(--accent-text);
  font-weight: 800;
  font-size: 0.86rem;
}

.quiz-counter {
  font-family: var(--font-display);
  background: var(--surface);
  color: var(--ink);
  border: 1.5px solid var(--border);
  border-radius: 8px;
  padding: 2px 9px;
  font-size: 0.8rem;
}

progress {
  display: block;
  appearance: none;
  width: 100%;
  height: 10px;
  margin: 10px 0 22px;
  color: var(--accent);
  border: 1.5px solid var(--border);
  background: var(--surface-2);
  border-radius: 6px;
  overflow: hidden;
}
progress::-webkit-progress-bar { background: var(--surface-2); }
progress::-webkit-progress-value { background: var(--accent-bright); }
progress::-moz-progress-bar { background: var(--accent-bright); }

.options {
  border: 0;
  padding: 0;
  margin: 20px 0 0;
  min-width: 0;
  display: grid;
  gap: 10px;
}

.option {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 54px;
  padding: 12px 14px;
  border: 1.5px solid var(--border);
  border-radius: 13px;
  background: var(--surface);
  cursor: pointer;
  font-weight: 600;
  box-shadow: var(--offset-sm);
  transition: background 140ms ease, transform 110ms ease;
}

.option:hover {
  background: var(--tint);
  transform: translateY(-1px);
}

.option:has(input:checked) {
  background: var(--tint);
  box-shadow: var(--offset);
  font-weight: 700;
}

.option input {
  margin: 0;
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  accent-color: var(--accent);
}

/* ===== Share, Nickname, Owner Preview ===== */
.message {
  color: var(--ink);
  font-size: 0.88rem;
  font-weight: 600;
}
.message:not(:empty) { margin-top: 10px; }

.share-controls { margin-top: 16px; }

.share-url {
  width: 100%;
  min-width: 0;
  border: 1.5px solid var(--border);
  border-radius: 11px;
  background: var(--bg);
  color: var(--ink);
  padding: 11px 12px;
  margin-bottom: 10px;
  font-size: 0.88rem;
}

.share-fallback { margin-top: 10px; }
.share-fallback[hidden] { display: none; }

.owner-preview {
  margin-top: 20px;
  padding: 16px 18px;
  border-radius: 16px;
  background: var(--bg);
  border: 1.5px solid var(--border);
  box-shadow: var(--offset-sm);
}

.nickname-box {
  margin-top: 16px;
  padding: 12px 14px;
  border-radius: 14px;
  background: var(--bg);
  border: 1.5px solid var(--border);
}

.nickname-box summary {
  cursor: pointer;
  font-weight: 800;
  font-size: 0.9rem;
  color: var(--ink);
}

.nickname-row {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}

.nickname-input {
  flex: 1;
  min-width: 0;
  min-height: 46px;
  padding: 9px 12px;
  border: 1.5px solid var(--border);
  border-radius: 11px;
  background: var(--surface);
  color: var(--ink);
}

/* ===== Result Screen (Concept B Report Stack) ===== */
.result-stack {
  max-width: 680px;
  margin: 4px auto 0;
  display: grid;
  gap: 14px;
}

.res-hero {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 20px;
  box-shadow: var(--offset);
  overflow: hidden;
}

.res-hero-top {
  background: var(--accent-bright);
  border-bottom: 1.5px solid var(--border);
  padding: 10px 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--ink);
}

.res-hero-top-tag {
  font-family: var(--font-display);
  letter-spacing: 0.03em;
}

.res-hero-main {
  padding: 20px 20px 24px;
  text-align: center;
  background: var(--tint);
}

.res-mascot {
  display: flex;
  justify-content: center;
  margin-bottom: 6px;
}

.big-score {
  display: inline-flex;
  align-items: baseline;
  justify-content: center;
  gap: 3px;
  margin: 4px 0 8px;
  font-family: var(--font-display);
  font-size: clamp(3.2rem, 11vw, 4.4rem);
  font-weight: 800;
  line-height: 0.96;
  letter-spacing: -0.05em;
  color: var(--ink);
}

.big-score span {
  font-family: var(--font-sans);
  font-size: clamp(1.15rem, 3.5vw, 1.5rem);
  font-weight: 800;
  letter-spacing: 0;
  color: var(--accent-text);
}

.res-type-badge {
  display: inline-block;
  margin: 4px auto 8px;
  padding: 7px 16px;
  border-radius: 12px;
  background: var(--surface);
  border: 1.5px solid var(--border);
  box-shadow: var(--offset-sm);
  font-size: clamp(1.15rem, 3.4vw, 1.45rem);
  font-weight: 800;
  line-height: 1.3;
  color: var(--ink);
}

.res-quote {
  margin: 4px auto 0;
  max-width: 32em;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--muted);
}

.b-card {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 18px;
  padding: 18px 20px;
  box-shadow: var(--offset-sm);
}

.b-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

/* ===== 3-Axis Spectrum Comparison Bars (Circle vs Square) ===== */
.axis-legend {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--muted);
}

.axis-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.leg-pin {
  width: 10px;
  height: 10px;
  border: 1.6px solid var(--border);
  display: inline-block;
  flex-shrink: 0;
}

.leg-pin-circle {
  border-radius: 50%;
  background: var(--accent);
}

.leg-pin-square {
  border-radius: 2.5px;
  background: var(--critter-b);
}

.axes-list {
  display: grid;
  gap: 14px;
  margin-top: 12px;
}

.b-card .axes-list {
  margin-top: 0;
}

.axis-item {
  display: grid;
  gap: 6px;
}

.axis-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  font-size: 0.88rem;
}

.axis-name {
  font-weight: 800;
  color: var(--ink);
}

.axis-tag {
  font-size: 0.74rem;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 7px;
  background: var(--tint);
  color: var(--accent-text);
  border: 1.2px solid var(--border);
  white-space: nowrap;
}

.axis-track {
  position: relative;
  height: 12px;
  border-radius: 7px;
  background: var(--surface-2);
  border: 1.5px solid var(--border);
}

.axis-fill {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  border-radius: 5px;
  background: var(--accent-bright);
  opacity: 0.45;
}

.axis-bridge {
  position: absolute;
  top: 0;
  bottom: 0;
  background: var(--accent-bright);
  opacity: 0.48;
  border-radius: 4px;
}

.axis-pin {
  position: absolute;
  top: 50%;
  width: 15px;
  height: 15px;
  transform: translate(-50%, -50%);
  border: 2px solid var(--border);
}

.axis-pin.pin-me {
  border-radius: 50%;
  background: var(--accent);
  z-index: 2;
}

.axis-pin.pin-you {
  border-radius: 3.5px;
  background: var(--critter-b);
  z-index: 1;
}

.axis-pin.is-nudged-left {
  transform: translate(calc(-50% - 4px), -50%);
}

.axis-pin.is-nudged-right {
  transform: translate(calc(-50% + 4px), -50%);
}

.axis-poles {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--muted);
}

/* ===== Commentary, Comparisons, Solo Convert, Sharing ===== */
.insight {
  background: var(--tint);
}

.insight-text {
  margin-top: 8px;
  font-size: 0.94rem;
  font-weight: 500;
  line-height: 1.6;
  color: var(--ink);
}

.talk-label {
  margin-top: 14px;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--accent-text);
}

.talk-questions {
  margin: 6px 0 0;
  padding-left: 1.2em;
  font-size: 0.9rem;
  line-height: 1.55;
  color: var(--ink);
}

.talk-questions li + li {
  margin-top: 4px;
}

.comparison-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 12px;
}

.comparison-list {
  list-style: none;
  padding: 0;
  margin: 14px 0 0;
  display: grid;
  gap: 10px;
}

.comparison-item {
  padding: 13px 14px;
  border-radius: 13px;
  border: 1.5px solid var(--border);
  background: var(--bg);
}

.comparison-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.comparison-question {
  font-weight: 800;
  font-size: 0.92rem;
  line-height: 1.42;
}

.comparison-detail {
  margin-top: 6px;
  font-size: 0.86rem;
  font-weight: 500;
  color: var(--muted);
}

.pill {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: 8px;
  border: 1.2px solid var(--border);
  font-size: 0.75rem;
  font-weight: 800;
  flex: 0 0 auto;
  white-space: nowrap;
}

.pill-exact {
  background: var(--tint);
  color: var(--accent-text);
}

.pill-close {
  background: var(--pill-close-bg);
  color: var(--pill-close-ink);
}

.pill-different {
  background: var(--pill-diff-bg);
  color: var(--pill-diff-ink);
}

.solo-convert {
  background: var(--poster-bg);
}

.solo-convert .actions {
  margin-top: 14px;
}

.result-actions-card {
  display: grid;
  gap: 10px;
}

.voc-box summary {
  cursor: pointer;
  font-weight: 800;
  font-size: 0.92rem;
  color: var(--ink);
}

.voc-form {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.voc-input {
  width: 100%;
  min-width: 0;
  min-height: 88px;
  padding: 10px 12px;
  border: 1.5px solid var(--border);
  border-radius: 11px;
  background: var(--bg);
  color: var(--ink);
  resize: vertical;
  line-height: 1.5;
}

.voc-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.voc-count {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--muted);
}

/* ===== Mobile Responsive (<= 760px: keeps CTAs above fold on 390x844 & 375x667) ===== */
@media (max-width: 760px) {
  main, .site-header, .site-footer {
    width: min(100% - 28px, 920px);
  }
  .site-header {
    padding: 12px 0 10px;
  }
  .brand-wordmark { font-size: 1.28rem; }
  .site-description { font-size: 0.74rem; padding: 3px 8px; }

  .home-stack { gap: 14px; }

  .hero {
    grid-template-columns: 1fr;
    border-radius: 18px;
  }

  .hero-art {
    order: -1;
    border-left: 0;
    border-bottom: 1.5px solid var(--border);
    padding: 12px 14px 8px;
    gap: 6px;
  }

  .hero-art .ink-critters {
    width: 140px;
  }

  .hero-copy {
    padding: 16px 16px 18px;
    align-items: center;
    text-align: center;
  }

  .hero-eyebrow {
    margin-bottom: 8px;
    font-size: 0.74rem;
    padding: 3px 9px;
  }

  .hero h1 {
    font-size: clamp(1.5rem, 6.2vw, 1.95rem);
    max-width: none;
  }

  .hero .lede {
    margin: 8px 0 14px;
    font-size: 0.88rem;
  }

  .hero-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  .hero-actions .button {
    width: 100%;
    padding-inline: 10px;
    font-size: 0.88rem;
    min-height: 44px;
  }

  .steps-grid { grid-template-columns: 1fr; gap: 10px; }
  .recent-results, .how-it-works, .themes-box, .b-card {
    padding: 16px;
    border-radius: 16px;
  }
  .panel-band { padding: 10px 16px; }
  .panel-body { padding: 18px 16px; }
  .res-hero-top { padding: 9px 14px; font-size: 0.74rem; }
  .res-hero-main { padding: 16px 14px 18px; }
  .comparison-head { flex-direction: column; gap: 6px; }
}

/* ===== Ultra-narrow Mobile (<= 370px, e.g., 320px E2E test) ===== */
@media (max-width: 370px) {
  main, .site-header, .site-footer {
    width: calc(100% - 24px);
  }
  .site-description { display: none; }
  .hero-art .ink-critters { width: 120px; }
  .hero-copy { padding: 14px 12px 16px; }
  .hero-actions { grid-template-columns: 1fr; }
  .panel-body { padding: 14px 12px; }
  .b-card { padding: 14px 12px; }
  .button { padding-inline: 11px; font-size: 0.86rem; }
  .nickname-row { flex-direction: column; }
  .res-hero-top { flex-wrap: wrap; gap: 4px; }
}
