/* ===== CSS Variables ===== */
:root {
  --yellow: #FFE03D;
  --yellow-soft: #FFEC73;
  --ink: #1A1A1A;
  --ink-2: #2B2B2B;
  --muted: #6B6B6B;
  --bg: #FFFFFF;
  --card: #FFFFFF;
  --line: #ECECEC;
  --placeholder: #E5E5E5;
  --pink: #FFB1B8;
  --blue: #7FC6FF;
  --green: #66D38A;
}

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

html, body {
  background: #F2F2F2;
  font-family: "Noto Sans JP", "Hiragino Kaku Gothic ProN", "Yu Gothic", sans-serif;
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }

/* ===== Layout Shell ===== */
.stage {
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 24px 0;
}
@media (max-width: 420px) {
  .stage { padding: 0; background: #FFFFFF; }
}

.phone {
  width: 375px;
  background: #FFFFFF;
  overflow: hidden;
  position: relative;
  box-shadow: 0 24px 80px rgba(0,0,0,0.08);
  border-radius: 12px;
}
@media (max-width: 420px) {
  .phone { width: 100%; box-shadow: none; border-radius: 0; }
}
@media (min-width: 768px) {
  .phone { width: 560px; }
}

/* ===== Header ===== */
.header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 16px 12px;
  background: #FFFFFF;
  position: sticky;
  top: 0;
  z-index: 10;
  border-bottom: 1px solid var(--line);
}

.logo {
  font-family: "Inter", sans-serif;
  font-weight: 900;
  font-style: italic;
  font-size: 22px;
  letter-spacing: -0.02em;
  color: var(--ink);
  line-height: 1;
  flex-shrink: 0;
  text-decoration: none;
}

.header-actions {
  margin-left: auto;
  display: flex;
  gap: 8px;
}

/* ===== Pills / Buttons ===== */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 38px;
  padding: 0 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  border: 1.5px solid #1A1A1A;
  background: #FFFFFF;
  color: var(--ink);
  cursor: pointer;
  white-space: nowrap;
  text-decoration: none;
}
.pill.primary {
  background: var(--yellow);
  border-color: var(--yellow);
}
.pill:active { transform: translateY(1px); }
.pill svg { display: block; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 24px;
  height: 52px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: transform .12s ease, box-shadow .12s ease;
}
.btn-primary {
  background: var(--yellow);
  border: 1.5px solid var(--yellow);
  color: var(--ink);
  box-shadow: 0 4px 0 rgba(0,0,0,0.06);
}
.btn-primary:active { transform: translateY(2px); box-shadow: 0 2px 0 rgba(0,0,0,0.06); }
.btn-secondary {
  background: #FFFFFF;
  border: 1.5px solid var(--ink);
  color: var(--ink);
}

/* CTA large */
.cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  max-width: 320px;
  height: 62px;
  background: var(--yellow);
  border-radius: 999px;
  border: none;
  font-size: 17px;
  font-weight: 800;
  color: var(--ink);
  cursor: pointer;
  box-shadow: 0 6px 0 rgba(0,0,0,0.06);
  text-decoration: none;
  transition: transform .12s ease, box-shadow .12s ease;
}
.cta:active { transform: translateY(2px); box-shadow: 0 4px 0 rgba(0,0,0,0.06); }

/* ===== Affiliate notice ===== */
.affiliate-notice {
  text-align: center;
  font-size: 11px;
  color: var(--muted);
  padding: 6px 16px;
  background: #FAFAFA;
  border-bottom: 1px solid var(--line);
}

/* ===== Section ===== */
.section {
  padding: 28px 16px 32px;
}

.section-title-wrap {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin: 8px 0 18px;
}

.section-title {
  position: relative;
  display: inline-block;
  font-size: 20px;
  font-weight: 900;
  letter-spacing: -0.005em;
}
.section-title::after {
  content: "";
  position: absolute;
  left: 10%; right: 10%;
  bottom: -4px;
  height: 6px;
  background: var(--yellow);
  border-radius: 6px;
  z-index: -1;
}

.accent-lines-l, .accent-lines-r {
  display: inline-flex;
  flex-direction: column;
  gap: 3px;
}
.accent-lines-l span, .accent-lines-r span {
  display: block;
  width: 14px;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
}
.accent-lines-l span:nth-child(1) { transform: translateX(2px) rotate(28deg); }
.accent-lines-l span:nth-child(2) { transform: translateX(0) rotate(8deg); }
.accent-lines-l span:nth-child(3) { transform: translateX(2px) rotate(-12deg); }
.accent-lines-r { transform: scaleX(-1); }

/* ===== Card Grid ===== */
.grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
@media (min-width: 768px) {
  .grid { grid-template-columns: repeat(3, 1fr); gap: 16px; }
}

.card {
  background: #FFFFFF;
  border-radius: 16px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
  padding: 12px 12px 14px;
  display: flex;
  flex-direction: column;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease;
}
.card:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(0,0,0,0.1); }

.shoe-thumb {
  width: 100%;
  aspect-ratio: 1 / 1;
  background: var(--placeholder);
  border-radius: 10px;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #8A8A8A;
  font-size: 10px;
  font-family: "SF Mono", ui-monospace, monospace;
  letter-spacing: 0.02em;
  background-image: repeating-linear-gradient(135deg, rgba(0,0,0,0.03) 0 6px, transparent 6px 12px);
  overflow: hidden;
}
.shoe-thumb img { width: 100%; height: 100%; object-fit: cover; border-radius: 10px; }

.card .brand { font-size: 13px; font-weight: 700; color: var(--ink); line-height: 1.3; }
.card .model { font-size: 12px; color: #4A4A4A; line-height: 1.4; margin-top: 2px; min-height: 32px; }
.card .price { margin-top: 6px; font-size: 15px; font-weight: 800; color: var(--ink); }
.card .price .tax { font-size: 11px; font-weight: 500; color: var(--muted); margin-left: 2px; }

/* ===== Progress Bar (Quiz) ===== */
.progress-bar {
  width: 100%;
  height: 4px;
  background: var(--line);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 20px;
}
.progress-fill {
  height: 100%;
  background: var(--yellow);
  border-radius: 4px;
  transition: width 0.3s ease;
}

/* ===== Slider ===== */
input[type="range"] {
  -webkit-appearance: none;
  width: 100%;
  height: 6px;
  background: var(--line);
  border-radius: 6px;
  outline: none;
  cursor: pointer;
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 26px;
  height: 26px;
  background: var(--yellow);
  border: 2.5px solid var(--ink);
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}
input[type="range"]::-moz-range-thumb {
  width: 26px;
  height: 26px;
  background: var(--yellow);
  border: 2.5px solid var(--ink);
  border-radius: 50%;
  cursor: pointer;
}

/* ===== Filter Tags ===== */
.filter-bar {
  display: flex;
  gap: 8px;
  padding: 12px 16px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  border-bottom: 1px solid var(--line);
}
.filter-bar::-webkit-scrollbar { display: none; }

.filter-tag {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  height: 34px;
  padding: 0 14px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  border: 1.5px solid var(--line);
  background: #FFFFFF;
  color: var(--muted);
  cursor: pointer;
  white-space: nowrap;
  transition: all .15s ease;
}
.filter-tag.active {
  background: var(--ink);
  color: #FFFFFF;
  border-color: var(--ink);
}

/* ===== Eyebrow ===== */
.eyebrow {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
  margin: 14px 0 8px;
}
.eyebrow .slash { color: var(--yellow); font-weight: 900; font-size: 18px; line-height: 1; }
.eyebrow .slash.right { transform: scaleX(-1); }

/* ===== Footer Space ===== */
.footer-space { height: 32px; }

/* ===== More Button ===== */
.more-wrap { display: flex; justify-content: center; padding: 8px 16px 32px; }
.more-btn {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 240px;
  height: 52px;
  padding: 0 22px;
  border-radius: 999px;
  background: #FFFFFF;
  border: 1.5px solid var(--ink);
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
  cursor: pointer;
}

/* ===== Tag badge ===== */
.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  background: var(--yellow);
  color: var(--ink);
}
.badge.main { background: var(--ink); color: #FFFFFF; }

/* ===== Share buttons ===== */
.share-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 20px;
  height: 46px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  border: 1.5px solid;
  text-decoration: none;
  transition: opacity .15s;
}
.share-btn:active { opacity: 0.8; }
.share-x { background: #000000; color: #FFFFFF; border-color: #000000; }
.share-line { background: #06C755; color: #FFFFFF; border-color: #06C755; }

/* ===== Quiz option buttons ===== */
.option-btn {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 14px;
  border: 2px solid var(--line);
  background: #FFFFFF;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
  transition: all .15s ease;
}
.option-btn:hover { border-color: var(--yellow); background: #FFFDE8; }
.option-btn.selected { border-color: var(--ink); background: var(--yellow); }
.option-icon {
  width: 36px;
  height: 36px;
  background: var(--placeholder);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}

/* ===== Result card ===== */
.result-card {
  background: #FFFFFF;
  border-radius: 20px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
  padding: 16px;
  margin-bottom: 16px;
}
.result-card .shoe-img {
  width: 100%;
  aspect-ratio: 4/3;
  background: var(--placeholder);
  border-radius: 14px;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-image: repeating-linear-gradient(135deg, rgba(0,0,0,0.03) 0 6px, transparent 6px 12px);
  overflow: hidden;
}
.result-card .shoe-img img { width: 100%; height: 100%; object-fit: cover; }

/* ===== Personality label ===== */
.personality-wrap {
  text-align: center;
  padding: 24px 16px;
  background: linear-gradient(135deg, #FFFDE8 0%, #FFF9C4 100%);
  border-radius: 16px;
  margin-bottom: 24px;
}
.personality-label {
  font-size: 24px;
  font-weight: 900;
  color: var(--ink);
  line-height: 1.2;
}
.personality-desc {
  font-size: 13px;
  color: var(--muted);
  margin-top: 8px;
  line-height: 1.6;
}

/* ===== Detail page ===== */
.detail-hero {
  width: 100%;
  aspect-ratio: 4/3;
  background: var(--placeholder);
  background-image: repeating-linear-gradient(135deg, rgba(0,0,0,0.03) 0 6px, transparent 6px 12px);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.detail-hero img { width: 100%; height: 100%; object-fit: cover; }

.score-bar-wrap { margin-top: 8px; }
.score-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}
.score-label { font-size: 12px; font-weight: 700; width: 72px; flex-shrink: 0; color: var(--muted); }
.score-track {
  flex: 1;
  height: 8px;
  background: var(--line);
  border-radius: 8px;
  overflow: hidden;
}
.score-fill {
  height: 100%;
  background: var(--yellow);
  border-radius: 8px;
  transition: width 0.5s ease;
}
.score-num { font-size: 12px; font-weight: 700; width: 28px; text-align: right; }

/* ===== Diagnosis mode card ===== */
.mode-card {
  border: 2px solid var(--line);
  border-radius: 20px;
  padding: 24px 20px;
  cursor: pointer;
  transition: all .2s ease;
  text-decoration: none;
  display: block;
  color: var(--ink);
}
.mode-card:hover, .mode-card:focus {
  border-color: var(--yellow);
  background: #FFFDE8;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.08);
}
.mode-icon {
  width: 56px;
  height: 56px;
  background: var(--yellow);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  margin-bottom: 16px;
}
.mode-title { font-size: 20px; font-weight: 900; margin-bottom: 6px; }
.mode-meta { font-size: 12px; color: var(--muted); margin-bottom: 10px; }
.mode-desc { font-size: 14px; line-height: 1.7; color: #3A3A3A; }
