:root {
  color-scheme: light;
  --paper: #f8f7f3;
  --ink: #171717;
  --muted: #64615c;
  --line: #d8d2c7;
  --white: #ffffff;
  --green: #315c4b;
  --plum: #673647;
  --denim: #315a7c;
  --gold: #a57637;
  --shadow: 0 18px 45px rgba(23, 23, 23, 0.13);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Hiragino Sans", "Yu Gothic", "Meiryo", system-ui, sans-serif;
}

button,
select {
  font: inherit;
}

.app-shell {
  min-height: 100vh;
}

.hero {
  position: relative;
  min-height: 88vh;
  display: grid;
  align-items: end;
  overflow: hidden;
}

.hero__image,
.hero__shade {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hero__image {
  object-fit: cover;
}

.hero__shade {
  background: linear-gradient(90deg, rgba(15, 15, 15, 0.78), rgba(15, 15, 15, 0.28) 58%, rgba(15, 15, 15, 0.08));
}

.hero__content {
  position: relative;
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
  padding: 0 0 clamp(80px, 11vh, 124px);
  color: var(--white);
}

.eyebrow {
  margin: 0 0 12px;
  color: currentColor;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
  opacity: 0.8;
}

h1,
h2,
legend {
  margin: 0;
  letter-spacing: 0;
  line-height: 1.14;
}

h1 {
  max-width: 780px;
  font-size: clamp(2.4rem, 7vw, 5.9rem);
}

h2,
legend {
  font-size: clamp(1.5rem, 3vw, 2.35rem);
  font-weight: 800;
}

.lead {
  max-width: 620px;
  margin: 22px 0 28px;
  color: rgba(255, 255, 255, 0.9);
  font-size: clamp(1rem, 2vw, 1.18rem);
  line-height: 1.8;
}

.primary-link,
.submit-button,
.ghost-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  border-radius: 6px;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.primary-link,
.submit-button {
  border: 0;
  background: var(--green);
  color: var(--white);
  padding: 0 22px;
  font-weight: 800;
  box-shadow: var(--shadow);
}

.primary-link:hover,
.submit-button:hover {
  transform: translateY(-1px);
  background: #24483a;
}

.diagnosis,
.results {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 56px 0;
}

.section-heading {
  margin-bottom: 28px;
}

.section-heading .eyebrow,
.results .eyebrow {
  color: var(--green);
}

.quiz {
  display: grid;
  gap: 24px;
}

.quiz-step {
  margin: 0;
  padding: 0;
  border: 0;
}

.hint {
  margin: 8px 0 18px;
  color: var(--muted);
}

.style-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(190px, 1fr));
  gap: 14px;
}

.style-card,
.option-card,
.product-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.78);
}

.style-card,
.option-card {
  position: relative;
  display: grid;
  cursor: pointer;
  overflow: hidden;
}

.style-card input,
.option-card input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.style-card__body {
  min-height: 286px;
  padding: 16px;
  display: grid;
  gap: 12px;
}

.card-image {
  display: block;
  width: 100%;
  border-radius: 6px;
  background-repeat: no-repeat;
  background-color: #e8e2d8;
  box-shadow: inset 0 0 0 1px rgba(23, 23, 23, 0.08);
}

.style-image {
  aspect-ratio: 4 / 5;
  background-image: url("assets/style-sprite.png");
  background-size: 200% 200%;
}

.style-minimal {
  background-position: 0 0;
}

.style-street {
  background-position: 100% 0;
}

.style-mode {
  background-position: 0 100%;
}

.style-classic {
  background-position: 100% 100%;
}

.swatches {
  display: flex;
  gap: 6px;
}

.swatch {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 1px solid rgba(0, 0, 0, 0.15);
}

.card-title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 800;
}

.card-copy {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.55;
}

.style-card:has(input:checked),
.option-card:has(input:checked) {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(49, 92, 75, 0.14);
  background: var(--white);
}

.option-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
}

.option-grid.compact {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.option-card__body {
  min-height: 198px;
  padding: 12px;
  display: grid;
  align-content: start;
  gap: 9px;
}

.lifestyle-image {
  aspect-ratio: 16 / 10;
  background-image: url("assets/lifestyle-sprite.png");
  background-size: 300% 200%;
}

.life-commute {
  background-position: 0 0;
}

.life-remote {
  background-position: 50% 0;
}

.life-active {
  background-position: 100% 0;
}

.life-office {
  background-position: 0 100%;
}

.life-night {
  background-position: 50% 100%;
}

.life-travel {
  background-position: 100% 100%;
}

.option-grid.compact .option-card__body {
  min-height: 84px;
  padding: 15px;
  align-content: center;
}

.settings-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.select-field {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-weight: 700;
}

select {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--white);
  color: var(--ink);
  padding: 0 12px;
}

.submit-button {
  justify-self: start;
  min-width: 190px;
}

.results {
  padding-top: 20px;
}

.is-hidden {
  display: none;
}

.results__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.ghost-button {
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
  padding: 0 16px;
}

.summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}

.summary__item {
  border-left: 4px solid var(--green);
  background: rgba(255, 255, 255, 0.72);
  border-radius: 6px;
  padding: 14px;
  line-height: 1.6;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.product-card {
  min-height: 320px;
  padding: 18px;
  display: grid;
  gap: 14px;
}

.product-card__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.tag {
  border-radius: 999px;
  background: rgba(49, 92, 75, 0.12);
  color: var(--green);
  padding: 5px 10px;
  font-size: 0.78rem;
  font-weight: 800;
  white-space: nowrap;
}

.product-card h3 {
  margin: 0;
  font-size: 1.18rem;
  line-height: 1.35;
}

.product-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

.store-links {
  display: grid;
  gap: 8px;
  align-self: end;
}

.store-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--ink);
  text-decoration: none;
  padding: 10px 12px;
  background: var(--white);
  font-weight: 800;
}

.store-link:hover {
  border-color: var(--green);
}

.store-brand {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  gap: 9px;
}

.store-logo {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: inline-grid;
  flex: 0 0 auto;
  place-items: center;
  color: var(--white);
  font-size: 0.82rem;
  font-weight: 900;
  line-height: 1;
}

.store-amazon {
  background: #232f3e;
}

.store-rakuten {
  background: #bf0000;
}

.store-zozo {
  background: #111111;
}

.store-ssense {
  background: #5b5b5b;
}

.store-farfetch {
  background: #7a5a3b;
}

.store-link > span:last-child {
  color: var(--muted);
  font-weight: 700;
}

.detail-link {
  justify-self: start;
  color: var(--green);
  font-weight: 800;
  text-decoration: none;
}

.detail-link:hover {
  text-decoration: underline;
}

.detail-page {
  width: min(1040px, calc(100% - 32px));
  margin: 0 auto;
  padding: 26px 0 64px;
}

.detail-nav {
  margin-bottom: 28px;
}

.detail-nav a {
  color: var(--green);
  font-weight: 800;
  text-decoration: none;
}

.detail-hero {
  padding: 34px 0 28px;
  border-bottom: 1px solid var(--line);
}

.detail-hero h1 {
  max-width: 760px;
  color: var(--ink);
  font-size: clamp(2rem, 5vw, 4.2rem);
}

.detail-lead {
  max-width: 680px;
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 1.08rem;
  line-height: 1.85;
}

.detail-layout {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  padding-top: 22px;
}

.detail-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.78);
  padding: 20px;
}

.detail-panel h2 {
  margin-bottom: 14px;
  font-size: 1.25rem;
}

.detail-panel p,
.detail-list {
  margin: 0;
  color: var(--muted);
  line-height: 1.75;
}

.detail-list {
  padding-left: 1.2em;
}

.detail-stores {
  margin-top: 4px;
}

.price-guide {
  padding-top: 34px;
}

.price-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.price-card {
  min-height: 360px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.82);
  padding: 18px;
  display: grid;
  gap: 13px;
}

.price-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.price-label {
  border-radius: 999px;
  background: rgba(103, 54, 71, 0.11);
  color: var(--plum);
  padding: 5px 10px;
  font-size: 0.78rem;
  font-weight: 900;
}

.price-card h3 {
  margin: 0;
  font-size: 1.08rem;
  line-height: 1.45;
}

.price-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.72;
}

.price-watch {
  padding-top: 4px;
  border-top: 1px solid var(--line);
}

@media (max-width: 860px) {
  .style-grid,
  .option-grid,
  .option-grid.compact,
  .summary,
  .product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 620px) {
  .hero {
    min-height: 82vh;
  }

  .hero__shade {
    background: linear-gradient(0deg, rgba(15, 15, 15, 0.82), rgba(15, 15, 15, 0.2));
  }

  .style-grid,
  .option-grid,
  .option-grid.compact,
  .settings-row,
  .summary,
  .product-grid {
    grid-template-columns: 1fr;
  }

  .detail-layout {
    grid-template-columns: 1fr;
  }

  .price-grid {
    grid-template-columns: 1fr;
  }

  .results__head {
    align-items: flex-start;
    flex-direction: column;
  }

  .style-card__body {
    min-height: 0;
  }

  .option-card__body {
    min-height: 0;
  }
}
