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

:root {
  --y: #FFD600;
  --y-soft: #FFE54D;
  --y-pale: #FFF3B0;
  --y-faint: rgba(255,214,0,0.06);
  --y-tag-text: #7A6B00;
  --g: #bbbbbb;
  --g-mid: #aaaaaa;
  --g-dark: #666;
  --ink: #1A1A1A;
  --ink-2: #444444;
  --ink-3: #777777;
  --bg: #FAFAF7;
  --surface: #FFFFFF;
  --rule: #E5E5E0;
  --muted-bg: #F0F0EC;
  --green: #1a7a3a;
  --green-pale: #e6f4ea;
  --green-text: #145a2a;
  --blue: #2563eb;
  --blue-pale: #e8f0fe;
  --blue-text: #1a4dab;
  --amber: #b8860b;
  --amber-pale: #fef3cd;
  --amber-text: #856404;
  --rose: #be185d;
  --rose-pale: #fce4ec;
  --rose-text: #881337;
  --max-w: 1200px;
  --content-pad: 64px;
}

body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { font-family: 'Newsreader', Georgia, serif; font-weight: 600; line-height: 1.3; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; font-family: inherit; font-size: inherit; }
input, textarea, select { font-family: inherit; font-size: inherit; }

.mono { font-family: 'Geist Mono', monospace; }

/* ── Nav ── */
header {
  position: sticky; top: 0; z-index: 100;
  background: var(--bg);
  border-bottom: 1px solid var(--rule);
}
nav {
  max-width: var(--max-w); margin: 0 auto; padding: 0 48px;
  height: 56px;
  display: flex; justify-content: space-between; align-items: center;
}
.wordmark {
  font-family: 'Inter', sans-serif;
  font-weight: 500; font-size: 15px; letter-spacing: 0.5px;
}
.wordmark-plus {
  font-weight: 800; font-size: 17px; color: var(--y);
}
.nav-links { display: flex; gap: 32px; }
.nav-link { font-size: 14px; color: var(--ink-2); font-weight: 500; transition: color 0.15s; }
.nav-link:hover, .nav-link.active { color: var(--ink); }
.nav-link.active { color: var(--y); font-weight: 700; }

/* ── Layout ── */
.page { max-width: var(--max-w); margin: 0 auto; padding: 0 var(--content-pad); }

/* ── Landing ── */
.landing { display: flex; flex-direction: column; align-items: center; }

.hero {
  display: flex; flex-direction: column; align-items: center;
  padding: 64px 48px 0; width: 100%; position: relative;
}
.hero-deco {
  font-family: 'Geist Mono', monospace; font-size: 36px; font-weight: 700;
  color: var(--y); opacity: 0.6; margin-bottom: 8px;
}
.hero h1 {
  font-family: 'Newsreader', Georgia, serif;
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 500; letter-spacing: -1px;
  text-align: center; margin-bottom: 16px; line-height: 1.1;
}
.hero .subtitle {
  font-size: 17px; color: var(--ink-2); text-align: center;
  letter-spacing: 0.2px; margin-bottom: 28px;
}

.input-card {
  width: 100%; max-width: 580px;
  background: var(--surface); border: 1px solid #F0F0EC;
  border-radius: 12px; padding: 20px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.04);
  margin-bottom: 28px;
}
.input-card:focus-within {
  border-color: var(--y);
  box-shadow: 0 0 0 3px rgba(255,214,0,0.18);
}
.input-card textarea {
  width: 100%; min-height: 120px; padding: 0;
  font-size: 15px; line-height: 1.6;
  background: transparent; border: none; color: var(--ink-2);
  resize: vertical; outline: none;
}
.input-card textarea::placeholder { color: var(--g); }

.cta-btn {
  display: flex; justify-content: center; align-items: center;
  padding: 16px 44px; font-weight: 700; font-size: 16px;
  background: var(--y); color: var(--ink); border: none; border-radius: 8px;
  letter-spacing: 0.5px; transition: background 0.15s; white-space: nowrap;
  box-shadow: 0 4px 16px rgba(241,194,50,0.25);
}
.cta-btn:hover { background: var(--y-soft); }
.cta-btn:disabled { opacity: 0.5; cursor: not-allowed; }

.input-helper { font-size: 13px; color: var(--amber); margin-top: 12px; text-align: center; }

/* ── Memory Guide ── */
.memory-guide {
  width: 100%; display: flex; justify-content: center;
  padding: 48px 48px; margin-top: 20px;
}
.guide-card {
  max-width: 720px; width: 100%;
  background: var(--y-pale); border-radius: 20px;
  padding: 36px 40px; display: flex; flex-direction: column; gap: 20px;
}
.guide-heading {
  display: flex; align-items: center; gap: 8px;
}
.guide-heading-label {
  font-family: 'Geist Mono', monospace; font-size: 11px;
  font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase;
  color: var(--ink-2);
}
.guide-desc {
  font-size: 15px; line-height: 1.6; color: var(--ink-2);
}
.prompt-block {
  background: var(--surface); border: 1px solid var(--rule);
  border-radius: 12px; padding: 20px 24px;
  font-family: 'Inter', sans-serif; font-size: 13px; line-height: 1.7;
  color: var(--ink-2); white-space: pre-wrap; max-height: 280px; overflow-y: auto;
}
.copy-btn {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--y); border: none; border-radius: 6px;
  padding: 10px 20px; font-weight: 600; font-size: 14px;
  color: var(--ink); cursor: pointer; transition: background 0.15s;
  align-self: flex-start;
}
.copy-btn:hover { background: var(--y-soft); }
.guide-ref {
  font-family: 'Geist Mono', monospace; font-size: 11px;
  color: var(--ink-3); letter-spacing: 0.5px;
}
a.guide-ref:hover { color: var(--ink-2); text-decoration: underline; }

/* ── Footer Bar ── */
.footer-bar {
  width: 100%; display: flex; justify-content: center; align-items: center;
  gap: 40px; padding: 24px 48px 28px;
  background: var(--y-pale); margin-top: auto;
}
.footer-bar span {
  font-family: 'Geist Mono', monospace; font-size: 11px;
  font-weight: 500; letter-spacing: 1.2px; color: #888;
}
.footer-dot {
  font-size: 11px; color: #B0B0B0;
}

/* ── Buttons ── */
.btn-primary {
  padding: 10px 28px; font-weight: 600; font-size: 14px;
  background: var(--y); color: var(--ink); border: none; border-radius: 6px;
  transition: background 0.15s; white-space: nowrap;
}
.btn-primary:hover { background: var(--y-soft); }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-secondary {
  padding: 7px 18px; font-weight: 500; font-size: 13px;
  background: none; color: var(--ink-2);
  border: 1px solid var(--rule); border-radius: 6px; transition: all 0.15s;
}
.btn-secondary:hover { border-color: var(--y); color: var(--ink); }
.btn-secondary.active { border-color: var(--y); background: var(--y-faint); color: var(--ink); }

.btn-text {
  padding: 7px 0; font-weight: 500; font-size: 13px;
  background: none; color: var(--ink-3); border: none; transition: color 0.15s;
}
.btn-text:hover { color: var(--ink); }

/* ── Results Page ── */
.results-page { padding: 40px var(--content-pad); max-width: var(--max-w); margin: 0 auto; }

.back-link {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 13px; font-weight: 500; color: var(--ink-3);
  margin-bottom: 28px; cursor: pointer; transition: color 0.15s;
  background: none; border: none;
}
.back-link:hover { color: var(--ink); }

/* Memory Section */
.memory-section { display: flex; flex-direction: column; gap: 16px; margin-bottom: 24px; }
.memory-header {
  display: flex; align-items: center; gap: 8px;
}
.memory-label {
  display: flex; align-items: center; gap: 4px;
}
.memory-label-plus {
  font-family: 'Geist Mono', monospace; font-size: 11px;
  font-weight: 700; letter-spacing: 1px; color: var(--y);
}
.memory-label-text {
  font-family: 'Geist Mono', monospace; font-size: 11px;
  font-weight: 500; letter-spacing: 1.5px; color: var(--ink-2);
}
.memory-header-spacer { flex: 1; }
.edit-link {
  display: flex; align-items: center; gap: 4px;
  font-size: 12px; font-weight: 500; color: var(--ink-3);
  cursor: pointer; background: none; border: none; transition: color 0.15s;
}
.edit-link:hover { color: var(--ink); }

.memory-card {
  background: var(--y-pale); border-left: 3px solid var(--y);
  border-radius: 12px; padding: 20px 24px;
  max-height: 120px; overflow-y: auto; position: relative;
}
.memory-card p {
  font-size: 13px; font-style: italic; line-height: 1.65; color: var(--ink);
}

/* Signals (collapsible) */
.signals-wrap { margin-top: 4px; }
.signals-toggle {
  display: flex; align-items: center; gap: 6px;
  background: none; border: none; padding: 6px 0;
  font-family: 'Geist Mono', monospace; font-size: 11px;
  font-weight: 500; color: var(--ink-3); cursor: pointer;
  transition: color 0.15s;
}
.signals-toggle:hover { color: var(--ink); }
.signals-toggle-arrow {
  font-size: 10px; display: inline-block; width: 12px; text-align: center;
}
.signals-section {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px;
  background: var(--muted-bg); border-radius: 8px; padding: 16px 20px;
  margin-top: 8px; align-items: start;
}
.signals-wrap.collapsed .signals-section { display: none; }
.signal-group {
  display: flex; flex-direction: column; gap: 6px;
}
.signal-group-label {
  font-family: 'Geist Mono', monospace; font-size: 9px;
  font-weight: 700; letter-spacing: 1.5px; color: var(--ink-3);
  margin-bottom: 2px;
}
.signal-group[data-type="interest"] .signal-group-label { color: var(--green); }
.signal-group[data-type="experience"] .signal-group-label { color: var(--blue); }
.signal-group[data-type="lifestyle_constraint"] .signal-group-label { color: var(--amber); }
.signal-group[data-type="desired_experience"] .signal-group-label { color: var(--rose); }
.signal-pills { display: flex; flex-wrap: wrap; gap: 5px; }
.signal-pill {
  font-family: 'Geist Mono', monospace; font-size: 10px; font-weight: 500;
  padding: 4px 10px; border-radius: 100px;
  background: var(--surface); border: 1px solid var(--rule);
  color: var(--ink); line-height: 1.3;
}
.signal-group[data-type="interest"] .signal-pill { background: var(--green-pale); color: var(--green-text); border-color: transparent; }
.signal-group[data-type="experience"] .signal-pill { background: var(--blue-pale); color: var(--blue-text); border-color: transparent; }
.signal-group[data-type="lifestyle_constraint"] .signal-pill { background: var(--amber-pale); color: var(--amber-text); border-color: transparent; }
.signal-group[data-type="desired_experience"] .signal-pill { background: var(--rose-pale); color: var(--rose-text); border-color: transparent; }

/* Results Header */
.results-header {
  display: flex; align-items: flex-end; gap: 8px; margin-bottom: 24px;
}
.results-header h2 {
  font-family: 'Newsreader', serif; font-size: 28px; font-weight: 700;
}
.results-header .results-subtitle {
  font-size: 13px; color: var(--ink-3);
}
.results-header-spacer { flex: 1; }
.results-count {
  font-family: 'Geist Mono', monospace; font-size: 12px; color: var(--ink-3);
}

/* Results Cards Grid */
.cards-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 24px;
}
.result-card {
  background: var(--surface); border: 1px solid var(--rule);
  border-radius: 20px; padding: 24px;
  display: flex; flex-direction: column; gap: 18px;
  cursor: pointer; transition: border-color 0.15s, box-shadow 0.15s;
}
.result-card:hover {
  border-color: var(--y-pale); box-shadow: 0 4px 16px rgba(0,0,0,0.06);
}
.card-header { display: flex; gap: 16px; }
.card-content { flex: 1; display: flex; flex-direction: column; gap: 8px; }
.card-content h3 {
  font-family: 'Newsreader', serif; font-size: 18px; font-weight: 600;
}
.card-content .card-desc {
  font-size: 13px; color: var(--ink-2); line-height: 1.6;
}
.card-radar { width: 100px; height: 100px; flex-shrink: 0; }
.card-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  font-family: 'Geist Mono', monospace; font-size: 10px;
  padding: 5px 10px; border-radius: 100px; font-weight: 500;
  line-height: 1.3;
}
.chip-match { background: var(--green-pale); color: var(--green-text); }
.chip-experience { background: var(--blue-pale); color: var(--blue-text); }
.chip-goal { background: var(--amber-pale); color: var(--amber-text); }
.chip-info { background: var(--muted-bg); color: var(--ink-2); }
.chip-yellow { background: var(--y); color: var(--ink); }
.chip-muted { background: var(--muted-bg); color: var(--ink-2); }
.card-footer {
  display: flex; align-items: center; justify-content: space-between;
}
.card-explore-link {
  font-size: 13px; font-weight: 500; color: var(--y);
  background: none; border: none; cursor: pointer; padding: 6px 0;
  transition: color 0.15s;
}
.card-explore-link:hover { color: var(--y-tag-text); }

/* ── Explore ── */
.explore { padding: 32px 0 96px; }
.explore-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 24px;
}
.explore-header-left { display: flex; flex-direction: column; gap: 4px; }
.explore-header-left h1 { font-size: 1.75rem; }
.explore-header-left p { color: var(--ink-3); font-size: 13px; }
.explore-header-right { display: flex; align-items: center; gap: 12px; }

.search-bar { display: flex; gap: 8px; }
.search-bar input {
  flex: 1; padding: 9px 14px; background: var(--surface);
  border: 1px solid var(--rule); border-radius: 6px;
  color: var(--ink); outline: none; transition: border-color 0.2s;
  font-size: 14px;
}
.search-bar input::placeholder { color: var(--g); }
.search-bar input:focus { border-color: var(--y); }

/* Dimension Controls */
.dim-controls {
  display: grid; grid-template-columns: repeat(6, 1fr);
  gap: 16px; margin-bottom: 36px;
}
.dim-control {
  background: var(--surface); border: 1px solid var(--rule);
  border-radius: 12px; padding: 18px 20px 14px;
  display: flex; flex-direction: column; gap: 6px;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.dim-control.active {
  border-color: var(--y);
  box-shadow: 0 2px 16px rgba(241,194,50,0.22);
}
.dim-control-header {
  display: flex; align-items: center; gap: 5px;
}
.dim-control-icon {
  display: flex; align-items: center; color: var(--ink-3);
  line-height: 0; flex-shrink: 0; opacity: 0.6;
}
.dim-control.active .dim-control-icon { opacity: 0.85; color: var(--y-tag-text); }
.dim-control-label {
  font-family: 'Geist Mono', monospace; font-size: 10px;
  font-weight: 600; letter-spacing: 0.8px; text-transform: uppercase;
  color: var(--ink-3);
}
.dim-control-phrase {
  font-family: 'Newsreader', serif; font-size: 17px; font-weight: 600;
  color: var(--ink); min-height: 22px; line-height: 1.3;
}
.dim-intensity {
  display: flex; gap: 3px; height: 5px; margin: 4px 0 2px;
}
.dim-intensity-block {
  flex: 1; height: 100%; border-radius: 2px;
  background: var(--rule);
  transition: background 0.2s;
}
.dim-intensity-block.filled { background: var(--y); }
.dim-slider-wrap { padding: 4px 0 2px; }
.dim-control input[type="range"] {
  -webkit-appearance: none; appearance: none;
  width: 100%; height: 6px; border-radius: 3px;
  background: var(--rule);
  outline: none; cursor: pointer;
}
.dim-control input[type="range"]::-webkit-slider-runnable-track {
  height: 6px; border-radius: 3px; background: transparent;
}
.dim-control input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--y); border: 2.5px solid var(--surface);
  box-shadow: 0 1px 4px rgba(0,0,0,0.18), 0 0 0 1px rgba(0,0,0,0.04);
  margin-top: -6px; cursor: grab;
  transition: transform 0.12s, box-shadow 0.12s;
}
.dim-control input[type="range"]::-webkit-slider-thumb:hover {
  transform: scale(1.15);
  box-shadow: 0 2px 8px rgba(241,194,50,0.4), 0 0 0 1px rgba(0,0,0,0.04);
}
.dim-control input[type="range"]::-webkit-slider-thumb:active {
  cursor: grabbing; transform: scale(1.1);
}
.dim-control input[type="range"]::-moz-range-track {
  height: 6px; border-radius: 3px;
  background: var(--rule); border: none;
}
.dim-control input[type="range"]::-moz-range-progress {
  height: 6px; border-radius: 3px 0 0 3px;
  background: var(--y);
}
.dim-control input[type="range"]::-moz-range-thumb {
  width: 14px; height: 14px; border-radius: 50%;
  background: var(--y); border: 2.5px solid var(--surface);
  box-shadow: 0 1px 4px rgba(0,0,0,0.18);
  cursor: grab;
}
.dim-poles {
  display: flex; justify-content: space-between; margin-top: 0;
}
.dim-pole {
  font-family: 'Geist Mono', monospace; font-size: 9px;
  color: var(--g-mid); letter-spacing: 0.3px;
}

/* Hobby Cards */
.hobby-grid-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 16px;
}
.hobby-grid-header h2 {
  font-family: 'Newsreader', serif; font-size: 20px; font-weight: 600;
}

.hobby-grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.hobby-card {
  background: var(--surface); border: 1px solid var(--rule);
  border-radius: 12px; overflow: hidden;
  cursor: pointer; transition: border-color 0.15s, box-shadow 0.15s;
}
.hobby-card:hover {
  border-color: var(--y-pale); box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

.hobby-card-thumb {
  position: relative; overflow: hidden;
  background: var(--muted-bg);
}
.hobby-card-thumb img {
  display: block; width: 100%; aspect-ratio: 4/5;
  object-fit: cover;
}
.hobby-card-compare {
  position: absolute; top: 10px; right: 10px;
  width: 26px; height: 26px; border-radius: 6px;
  background: rgba(255,255,255,0.85); backdrop-filter: blur(4px);
  border: 1.5px solid var(--rule);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: border-color 0.15s, background 0.15s;
  font-size: 14px; color: transparent;
}
.hobby-card-compare:hover {
  border-color: var(--y); background: rgba(255,255,255,0.95);
}
.hobby-card-compare.selected {
  border-color: var(--y); background: var(--y);
  color: var(--surface);
}

.hobby-card-body {
  padding: 14px 16px 16px;
  display: flex; flex-direction: column; gap: 6px;
}
.hobby-card-body h3 {
  font-family: 'Newsreader', serif; font-size: 22px; font-weight: 600;
  line-height: 1.3;
}
.hobby-card-body .hobby-desc {
  font-size: 12.5px; color: var(--ink-2); line-height: 1.5;
  overflow: hidden; text-overflow: ellipsis;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
}

.hobby-card-dims {
  display: grid; grid-template-columns: 1fr 1fr; gap: 4px 12px;
  margin-top: 4px;
}
.hobby-card-dim {
  display: flex; align-items: center; gap: 6px;
}
.hobby-card-dim-label {
  font-family: 'Geist Mono', monospace; font-size: 8px;
  color: var(--ink-3); width: 36px; flex-shrink: 0;
}
.hobby-card-dim-bar {
  flex: 1; height: 3px; background: var(--y-pale); border-radius: 1.5px;
  overflow: hidden;
}
.hobby-card-dim-fill {
  height: 100%; background: var(--y); border-radius: 1.5px;
}

.show-more {
  grid-column: 1 / -1;
  text-align: center; padding: 20px 0;
  display: flex; align-items: center; justify-content: center; gap: 8px;
}

/* ── Detail Page ── */
.detail-page { padding: 40px var(--content-pad); max-width: var(--max-w); margin: 0 auto; }

.detail-hero {
  display: grid; grid-template-columns: 340px 1fr; gap: 48px;
  margin-bottom: 48px;
}
.detail-hero-img {
  width: 100%; aspect-ratio: 9/16; object-fit: cover;
  border-radius: 12px;
}
.detail-hero-info {
  display: flex; flex-direction: column; justify-content: center; gap: 8px;
  padding: 16px 0;
}
.detail-hero-info h1 {
  font-family: 'Newsreader', serif; font-size: 40px; font-weight: 700;
  line-height: 1.15; margin-bottom: 0;
}
.detail-aliases {
  font-family: 'Geist Mono', monospace; font-size: 12px;
  color: var(--ink-3); margin-bottom: 16px;
}
.detail-radar-wrap { width: 100%; max-width: 260px; height: 200px; }
.detail-dims { display: flex; flex-direction: column; gap: 10px; margin-top: 8px; }
.detail-dim-row { display: flex; align-items: center; gap: 12px; }
.detail-dim-label {
  font-family: 'Geist Mono', monospace; font-size: 10px;
  color: var(--ink-3); width: 80px; flex-shrink: 0;
}
.detail-dim-bar {
  flex: 1; height: 6px; background: var(--y-pale); border-radius: 3px;
  overflow: hidden;
}
.detail-dim-fill { height: 100%; background: linear-gradient(90deg, var(--y) 0%, var(--y-soft) 100%); border-radius: 3px; }
.detail-dim-value {
  font-family: 'Geist Mono', monospace; font-size: 10px;
  color: var(--ink-3); width: 28px; text-align: right;
}

.detail-sections {
  display: grid; grid-template-columns: 1fr 1fr; gap: 32px 48px;
}
.detail-section:first-child {
  grid-column: 1 / -1;
}
.detail-section h3 {
  font-family: 'Geist Mono', monospace; font-size: 11px;
  font-weight: 600; letter-spacing: 1px; text-transform: uppercase;
  color: var(--amber); margin-bottom: 8px;
}
.detail-section p { font-size: 14.5px; line-height: 1.75; color: var(--ink-2); }

/* ── Compare Page ── */
.compare-page { padding: 40px var(--content-pad); max-width: var(--max-w); margin: 0 auto; }
.compare-page h1 {
  font-family: 'Newsreader', serif; font-size: 32px; font-weight: 700;
  margin-bottom: 28px;
}

.compare-cards {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px; margin-bottom: 40px;
}
.compare-card {
  background: var(--surface); border: 1px solid var(--rule);
  border-radius: 12px; overflow: hidden; cursor: pointer;
  transition: box-shadow 0.15s;
}
.compare-card:hover { box-shadow: 0 4px 20px rgba(0,0,0,0.08); }
.compare-card-thumb { overflow: hidden; }
.compare-card-thumb img {
  display: block; width: 100%; aspect-ratio: 3/4;
  object-fit: cover;
}
.compare-card-body { padding: 12px 14px 14px; }
.compare-card-name {
  font-family: 'Newsreader', serif; font-size: 18px; font-weight: 600;
  margin-bottom: 4px;
}
.compare-card-desc {
  font-size: 12px; color: var(--ink-2); line-height: 1.45;
  overflow: hidden; text-overflow: ellipsis;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
}

.compare-radar-wrap { max-width: 400px; height: 300px; margin: 0 auto 40px; }

/* Dim Table */
.dim-table-wrap { overflow-x: auto; margin-top: 16px; }
.dim-table { width: 100%; border-collapse: collapse; min-width: 360px; }
.dim-table th, .dim-table td { padding: 8px 12px; text-align: left; font-size: 12px; border-bottom: 1px solid var(--rule); }
.dim-table th {
  font-family: 'Geist Mono', monospace; font-size: 11px;
  color: var(--ink-3); font-weight: 600;
}
.dim-bar { height: 4px; border-radius: 2px; background: var(--y); }

/* ── Compare Bar (Explore) ── */
.compare-bar {
  position: fixed; bottom: 0; left: 0; right: 0;
  background: var(--surface); border-top: 2px solid var(--y);
  padding: 10px 24px; z-index: 150;
  display: flex; justify-content: center; align-items: center; gap: 12px;
  box-shadow: 0 -2px 16px rgba(0,0,0,0.05);
  animation: slideUp 0.2s ease-out;
}
@keyframes slideUp { from { transform: translateY(100%); } to { transform: translateY(0); } }
.compare-bar .count { font-size: 13px; font-weight: 500; }
.compare-bar .count span { color: var(--y); font-weight: 700; }
.compare-hint { font-size: 12px; color: var(--ink-3); }

/* ── States ── */
.spinner {
  display: inline-block; width: 14px; height: 14px;
  border: 2px solid var(--rule); border-top-color: var(--y);
  border-radius: 50%; animation: spin 0.6s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.loading { color: var(--ink-3); font-size: 13px; display: flex; align-items: center; gap: 8px; padding: 20px 0; }
.empty { text-align: center; padding: 48px 20px; color: var(--ink-3); }
.empty p { font-size: 14px; }
.empty p + p { margin-top: 4px; font-size: 13px; }
.empty .btn-secondary { margin-top: 14px; }

/* ── Animations ── */
@keyframes fadeUp { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes shake { 0%,100%{transform:translateX(0)} 20%{transform:translateX(-4px)} 40%{transform:translateX(4px)} 60%{transform:translateX(-3px)} 80%{transform:translateX(2px)} }
.shake { animation: shake 0.4s ease-out; border-color: var(--y) !important; }

#app > * { animation: fadeUp 0.2s ease-out; }
.result-card, .hobby-card { animation: fadeUp 0.25s ease-out backwards; }

input:focus-visible, textarea:focus-visible, button:focus-visible {
  outline: 2px solid var(--y); outline-offset: 2px;
}
.input-card textarea:focus-visible, .input-card textarea:focus { outline: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

@media (max-width: 900px) {
  :root { --content-pad: 24px; }
  .dim-controls { grid-template-columns: repeat(3, 1fr); }
  .cards-grid { grid-template-columns: 1fr; }
  .detail-hero { grid-template-columns: 260px 1fr; gap: 32px; }
  .detail-hero-info h1 { font-size: 30px; }
  .detail-sections { grid-template-columns: 1fr; }
  .compare-cards { grid-template-columns: repeat(2, 1fr); }
  .signals-section { grid-template-columns: repeat(2, 1fr); }
  .hobby-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 600px) {
  nav { padding: 0 24px; }
  .hero h1 { font-size: 2.25rem; }
  .dim-controls { grid-template-columns: repeat(2, 1fr); }
  .detail-hero { grid-template-columns: 1fr; gap: 24px; }
  .detail-hero-img { aspect-ratio: 3/4; max-height: 400px; }
  .hobby-grid { grid-template-columns: 1fr; }
  .footer-bar { flex-wrap: wrap; gap: 16px; justify-content: center; }
}
