/* ============================================================
   スポーツバイク診断ツール — Production styles
   ガレージ × タイプライター。グレー＋黒文字＋オレンジ寄り赤。
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=M+PLUS+1+Code:wght@400;500;600;700;800;900&family=Yomogi&display=swap');

:root {
  --bg:         #d9d6d1;
  --paper:      #f0ede7;
  --paper-2:    #e8e4dd;
  --ink:        #1a1a1a;
  --ink-2:      #2a2826;
  --muted:      #6b6862;
  --line-soft:  rgba(26,26,26,0.18);
  --line-mid:   rgba(26,26,26,0.32);
  --accent:     #d8401a;
  --accent-2:   #b53210;
  --accent-soft:#f3c8b8;
  --mono: 'M PLUS 1 Code', ui-monospace, monospace;
  --hand: 'Yomogi', cursive;
  --maxw: 480px;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--mono);
  background: var(--bg);
  color: var(--ink);
  font-size: 14px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
  min-height: 100dvh;
}
button { font-family: inherit; cursor: pointer; }
img { max-width: 100%; display: block; }

/* ============================================================
   App shell
   ============================================================ */
.app {
  max-width: var(--maxw);
  margin: 0 auto;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--paper);
  display: flex;
  flex-direction: column;
  position: relative;
  box-shadow: 0 0 0 1px var(--line-soft), 0 24px 80px rgba(0,0,0,.06);
}

.app-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 20px 10px;
  border-bottom: 1px solid var(--line-soft);
}
.app-brand {
  display: flex; align-items: center; gap: 8px;
}
.app-mark {
  width: 26px; height: 26px;
  background: var(--ink); color: var(--paper);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--mono); font-weight: 900;
  font-size: 13px; letter-spacing: 0;
}
.app-brand-text {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .12em;
  line-height: 1.1;
}
.app-brand-text small {
  display: block;
  font-size: 9px;
  font-weight: 500;
  color: var(--muted);
  letter-spacing: .14em;
}
.app-meta {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .14em;
  color: var(--muted);
}

.app-main {
  flex: 1;
  display: flex;
  flex-direction: column;
}

/* ============================================================
   Common
   ============================================================ */
.tag {
  display: inline-block;
  font-size: 10px; font-weight: 700;
  letter-spacing: .16em;
  padding: 3px 10px;
  border: 1px solid var(--ink);
  border-radius: 2px;
  background: transparent;
}
.tag.accent {
  background: var(--accent); color: #fff;
  border-color: var(--accent);
}
.tag.ghost {
  color: var(--muted); border-color: var(--line-soft);
}

.h1 {
  font-size: 26px; font-weight: 900; line-height: 1.25;
  letter-spacing: -.01em;
  margin: 0; white-space: pre-line;
  text-wrap: pretty;
}
.h2 {
  font-size: 19px; font-weight: 800; line-height: 1.35;
  margin: 0; white-space: pre-line;
}
.h3 {
  font-size: 11px; font-weight: 700;
  letter-spacing: .14em; text-transform: uppercase;
  color: var(--ink);
  margin: 0;
}
.lede { color: var(--muted); font-size: 13px; line-height: 1.85; }

hr.divider { border: 0; border-top: 1px dashed var(--line-soft); margin: 18px 0; }
hr.divider.solid { border-top: 1px solid var(--ink); }

/* ============================================================
   START screen
   ============================================================ */
.start {
  padding: 28px 24px 32px;
  flex: 1;
  display: flex; flex-direction: column;
}
.start .tag { margin-bottom: 18px; }
.start h1 { margin-bottom: 14px; font-size: 28px; }
.start h1 em { color: var(--accent); font-style: normal; }
.start .lede { margin-bottom: 12px; }
.start-note {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
  line-height: 1.7;
  margin: 0 0 22px;
  padding: 10px 12px;
  border-left: 2px solid var(--accent);
  background: var(--paper-2);
  letter-spacing: .02em;
}
.start-note b {
  color: var(--ink);
  font-weight: 800;
  letter-spacing: .08em;
}
.start-photo {
  border: 1.5px solid var(--ink);
  aspect-ratio: 3 / 2;
  margin-bottom: 24px;
  overflow: hidden;
  background: var(--paper-2);
}
.start-photo img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}
.start-meta {
  display: grid; grid-template-columns: 1fr 1fr; gap: 12px;
  margin-bottom: 24px;
}
.start-meta-item {
  border-left: 2px solid var(--accent);
  padding-left: 10px;
}
.start-meta-key {
  font-size: 9.5px; letter-spacing: .14em;
  color: var(--muted); margin-bottom: 2px;
}
.start-meta-val {
  font-size: 14px; font-weight: 700;
}
.start-bottom { margin-top: auto; }
.start-fineprint {
  text-align: center;
  font-size: 10.5px; color: var(--muted);
  margin-top: 12px; letter-spacing: .04em;
}

/* ============================================================
   Question screen
   ============================================================ */
.q {
  padding: 18px 22px 22px;
  flex: 1;
  display: flex; flex-direction: column;
}
.q-bar {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 18px;
}
.q-bar-text {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: .18em;
  color: var(--muted);
  white-space: nowrap;
}
.q-bar-track {
  flex: 1; display: flex; gap: 3px;
}
.q-bar-track span {
  flex: 1; height: 3px; background: var(--line-soft);
  border-radius: 0;
}
.q-bar-track span.on { background: var(--accent); }

.q-title {
  font-size: 24px;
  margin-bottom: 10px;
}
.q-hint {
  color: var(--muted);
  font-size: 12.5px;
  margin-bottom: 18px;
}
.q-hint b { color: var(--accent); font-weight: 700; }

.q-options {
  display: flex; flex-direction: column; gap: 10px;
  margin-bottom: 20px;
}

.opt {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 13px 14px;
  background: transparent;
  border: 1.5px solid var(--ink);
  border-radius: 2px;
  width: 100%;
  text-align: left;
  color: var(--ink);
  transition: background .12s, transform .08s;
}
.opt:hover { background: rgba(0,0,0,.04); }
.opt:active { transform: scale(.99); }
.opt.selected {
  background: var(--ink); color: var(--paper);
  border-color: var(--ink);
}
.opt.selected .opt-check { background: var(--accent); border-color: var(--accent); color: #fff; }
.opt.disabled {
  opacity: .35; cursor: not-allowed;
  background: var(--paper-2);
}
.opt-check {
  flex-shrink: 0;
  width: 18px; height: 18px;
  border: 1.5px solid currentColor;
  border-radius: 2px;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 800;
  margin-top: 1px;
}
.opt-check.radio { border-radius: 50%; }
.opt-text {
  display: flex; flex-direction: column; gap: 2px;
  min-width: 0; flex: 1;
}
.opt-label {
  font-size: 14px; font-weight: 700;
  line-height: 1.3;
}
.opt-sub {
  font-size: 11px; font-weight: 400;
  opacity: .7;
  line-height: 1.4;
}

.q-foot {
  margin-top: auto;
  display: flex; gap: 10px;
  padding-top: 12px;
}
.q-foot .btn-ghost { flex: 1; }
.q-foot .btn-primary { flex: 2; }

.q-warn {
  font-family: var(--mono);
  color: var(--accent);
  font-size: 11.5px;
  letter-spacing: .04em;
  font-weight: 600;
  margin-bottom: 10px;
  line-height: 1.6;
}

/* ============================================================
   Buttons
   ============================================================ */
.btn {
  display: flex; align-items: center; justify-content: center;
  gap: 8px;
  padding: 15px 18px;
  background: var(--ink); color: var(--paper);
  font-family: var(--mono);
  font-weight: 700; font-size: 13px;
  letter-spacing: .12em;
  border: none; border-radius: 2px;
  width: 100%;
  transition: opacity .12s, transform .08s;
}
.btn:active { transform: scale(.99); }
.btn-primary { background: var(--accent); color: #fff; }
.btn-ghost {
  background: transparent;
  color: var(--ink);
  border: 1.5px solid var(--ink);
}
.btn-small { padding: 11px 14px; font-size: 12px; letter-spacing: .08em; }

/* ============================================================
   Result screen
   ============================================================ */
.result {
  padding: 0 0 32px;
  flex: 1;
  display: flex; flex-direction: column;
}

.result-head {
  padding: 20px 22px 14px;
  background: var(--paper);
}
.result-eyebrow {
  font-family: var(--mono);
  font-size: 10.5px; letter-spacing: .22em;
  color: var(--accent); font-weight: 800;
  margin-bottom: 6px;
}
.result-en {
  font-family: var(--mono); font-size: 10px;
  color: var(--muted); letter-spacing: .18em;
  margin-bottom: 8px;
}
.result-title {
  font-size: 30px; font-weight: 900; line-height: 1.05;
  letter-spacing: -.01em;
  margin: 0 0 6px;
}
.result-tagline {
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: .02em;
  margin-bottom: 4px;
}

.result-photo {
  background: var(--paper);
  border-top: 1.5px solid var(--ink);
  border-bottom: 1.5px solid var(--ink);
  aspect-ratio: 16 / 9;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.result-photo img {
  width: 100%; height: 100%;
  object-fit: contain;
  padding: 8px 16px;
}

.result-section { padding: 18px 22px; }
.result-section + .result-section { padding-top: 0; }

.result-divider {
  margin: 24px 22px 8px;
  border-top: 2px dashed var(--ink-3, #b9b3aa);
  position: relative;
}
.result-divider::after {
  content: "— SECOND PICK —";
  position: absolute;
  top: -10px; left: 50%;
  transform: translateX(-50%);
  background: var(--paper);
  padding: 0 12px;
  font-size: 10px;
  letter-spacing: .18em;
  color: var(--accent);
  font-weight: 700;
}

.result-summary {
  font-size: 13px;
  line-height: 1.85;
  color: var(--ink-2);
  background: var(--paper-2);
  padding: 14px 16px;
  border-left: 3px solid var(--accent);
}

.prosCons {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 14px;
}
.pcCol {
  border: 1.5px solid var(--ink);
  padding: 11px 12px;
}
.pcCol.merit { background: rgba(216,64,26,.04); }
.pcCol .h3 { margin-bottom: 6px; }
.pcCol.merit .h3 { color: var(--accent); }
.pcCol.care  .h3 { color: var(--muted); }
.pcCol ul { margin: 0; padding-left: 14px; }
.pcCol li { font-size: 11px; line-height: 1.65; margin-bottom: 2px; }

.priceBlock {
  background: var(--ink); color: var(--paper);
  padding: 14px 16px;
  margin-top: 16px;
}
.priceBlock-key {
  font-size: 10px; letter-spacing: .18em;
  opacity: .7; margin-bottom: 2px;
}
.priceBlock-val {
  font-size: 20px; font-weight: 800;
  font-family: var(--mono);
  letter-spacing: 0;
}
.priceBlock-sub { font-size: 11px; opacity: .65; }

/* Recommended bike card */
.modelCard {
  background: var(--paper);
  border: 1.5px solid var(--ink);
  margin-top: 12px;
}
.modelCard-photo {
  background: #fff;
  border-bottom: 1.5px solid var(--ink);
  aspect-ratio: 16/10;
  display: flex; align-items: center; justify-content: center;
  position: relative;
  overflow: hidden;
}
.modelCard-photo img {
  width: 100%; height: 100%;
  object-fit: contain;
  padding: 8px;
}
.modelCard-stamp {
  position: absolute; top: 10px; left: 10px;
  background: var(--accent); color: #fff;
  font-size: 9.5px; font-weight: 800;
  letter-spacing: .16em;
  padding: 3px 9px;
}
.modelCard-body { padding: 12px 14px 14px; }
.modelCard-tag {
  font-size: 10px; letter-spacing: .14em;
  color: var(--muted); margin-bottom: 4px;
}
.modelCard-name {
  font-size: 15px; font-weight: 800;
  letter-spacing: -.01em;
  margin: 0 0 4px;
}
.modelCard-price {
  font-family: var(--mono);
  font-size: 16px; font-weight: 800;
  color: var(--accent);
  margin-bottom: 10px;
}
.modelCard .btn { padding: 11px; font-size: 12px; letter-spacing: .08em; }

/* Next picks (2nd/3rd place) */
.nextPick {
  display: flex; gap: 12px;
  padding: 12px 0;
  border-top: 1px dashed var(--line-soft);
  align-items: flex-start;
}
.nextPick:first-child { border-top: 0; }
.nextPick-photo {
  flex-shrink: 0;
  width: 84px; height: 60px;
  background: #fff;
  border: 1px solid var(--line-soft);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.nextPick-photo img { width: 100%; height: 100%; object-fit: contain; padding: 4px; }
.nextPick-body { flex: 1; min-width: 0; }
.nextPick-rank {
  font-family: var(--mono);
  font-size: 9.5px; letter-spacing: .14em;
  color: var(--accent); font-weight: 800;
}
.nextPick-name {
  font-size: 14px; font-weight: 800;
  margin: 2px 0 2px;
}
.nextPick-desc {
  font-size: 10.5px; line-height: 1.55;
  color: var(--muted);
}
.nextPick-arrow {
  flex-shrink: 0;
  align-self: center;
  font-size: 18px;
  color: var(--ink);
}

/* Foot actions */
.result-foot {
  padding: 0 22px;
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 8px; margin-top: 14px;
}
.result-foot .btn { padding: 12px; font-size: 11.5px; letter-spacing: .08em; }

.result-fineprint {
  font-size: 10.5px; color: var(--muted);
  text-align: center;
  padding: 18px 24px 0;
  line-height: 1.7;
  letter-spacing: .02em;
}

/* Footer */
.app-footer {
  text-align: center;
  padding: 18px 20px 24px;
  font-size: 10px; color: var(--muted);
  letter-spacing: .14em;
}

/* ============================================================
   Mini-table info row
   ============================================================ */
.miniSpec {
  display: grid; grid-template-columns: max-content 1fr;
  gap: 4px 14px;
  font-size: 11.5px;
  margin: 10px 0;
}
.miniSpec dt { color: var(--muted); letter-spacing: .04em; }
.miniSpec dd { margin: 0; font-weight: 600; }

/* Toast for "コピーしました" */
.toast {
  position: fixed; left: 50%; bottom: 28px;
  transform: translateX(-50%);
  background: var(--ink); color: var(--paper);
  padding: 10px 18px;
  font-size: 12px;
  letter-spacing: .08em;
  font-weight: 700;
  z-index: 100;
  animation: toastIn .2s ease, toastOut .25s ease 1.6s forwards;
}
@keyframes toastIn { from { opacity: 0; transform: translate(-50%, 10px); } to { opacity: 1; transform: translate(-50%, 0); } }
@keyframes toastOut { to { opacity: 0; transform: translate(-50%, -10px); } }

/* Transition helpers */
.fade-in { animation: fadeIn .25s ease both; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }
