:root {
  color-scheme: dark;
  --bg: #090909;
  --surface: #111110;
  --surface-soft: #171614;
  --ink: #f4f0e8;
  --muted: #aaa49b;
  --line: rgba(244, 240, 232, 0.14);
  --gold: #d9a85c;
  --gold-light: #f0cf95;
  --wine: #a85854;
  --sake: #d5e4e7;
  --beer: #e6a13a;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "BIZ UDPGothic", "Yu Gothic", "Hiragino Sans", Meiryo, sans-serif;
  font-size: 16px;
  line-height: 1.75;
}

body::selection { background: var(--gold); color: #111; }

a { color: inherit; }
button, input { font: inherit; }
h1, h2, h3, p { margin-top: 0; }

.display {
  font-family: "Yu Mincho", "Hiragino Mincho ProN", "Hiragino Mincho Pro", serif;
  font-weight: 600;
  letter-spacing: 0;
}

.site-header {
  position: absolute;
  z-index: 20;
  top: 0;
  left: 0;
  width: 100%;
  border-bottom: 1px solid rgba(255, 255, 255, 0.11);
  background: linear-gradient(180deg, rgba(5, 5, 5, 0.76), transparent);
}

.header-inner,
.diagnosis-shell,
.result-inner,
.section-inner,
.site-footer {
  width: min(1160px, calc(100% - 48px));
  margin-inline: auto;
}

.header-inner {
  min-height: 82px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: baseline;
  gap: 12px;
  text-decoration: none;
}

.brand strong {
  font-family: "Yu Mincho", "Hiragino Mincho ProN", serif;
  font-size: 1.35rem;
  font-weight: 700;
}

.brand span {
  color: rgba(255, 255, 255, 0.58);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.global-nav {
  display: flex;
  align-items: center;
  gap: 16px;
}

.global-nav a {
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.78rem;
  font-weight: 700;
  text-decoration: none;
}

.global-nav a:hover,
.global-nav a[aria-current="page"] { color: var(--gold-light); }

.hero {
  min-height: min(720px, 82svh);
  display: grid;
  align-items: end;
  background:
    linear-gradient(90deg, rgba(5, 5, 5, 0.95) 0%, rgba(5, 5, 5, 0.66) 48%, rgba(5, 5, 5, 0.18) 78%),
    linear-gradient(180deg, rgba(5, 5, 5, 0.08) 44%, rgba(5, 5, 5, 0.97) 100%),
    url("../../assets/saketokura-hero-v2.png") center / cover no-repeat;
}

.hero-inner {
  width: min(1160px, calc(100% - 48px));
  margin-inline: auto;
  padding: 140px 0 58px;
}

.kicker,
.section-label {
  color: var(--gold-light);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.kicker {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 18px;
}

.kicker::before {
  content: "";
  width: 36px;
  height: 1px;
  background: currentColor;
}

h1 {
  max-width: 860px;
  margin-bottom: 22px;
  font-size: clamp(3rem, 6vw, 5.3rem);
  line-height: 1.12;
  text-wrap: balance;
}

.hero-lead {
  max-width: 690px;
  color: rgba(244, 240, 232, 0.82);
  font-size: 1.02rem;
  line-height: 2;
}

.hero-actions,
.form-actions,
.share-actions,
.result-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.hero-actions { margin-top: 30px; }

.primary-action,
.quiet-action,
.submit-button,
.reset-button,
.share-button,
.share-actions a,
.result-links a {
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 16px;
  border: 1px solid transparent;
  border-radius: 0;
  text-decoration: none;
  font-weight: 800;
  cursor: pointer;
  transition: transform 160ms ease, background 160ms ease, border-color 160ms ease;
}

.primary-action,
.submit-button {
  background: var(--ink);
  color: #111;
}

.quiet-action,
.reset-button,
.share-button,
.share-actions a {
  border-color: rgba(255, 255, 255, 0.24);
  background: rgba(10, 10, 10, 0.48);
  color: var(--ink);
}

.primary-action:hover,
.quiet-action:hover,
.submit-button:hover,
.reset-button:hover,
.share-button:hover,
.share-actions a:hover,
.result-links a:hover { transform: translateY(-2px); }

.diagnosis-shell { padding: 84px 0 104px; }

.quiz-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 42px;
}

.quiz-head h2,
.section-heading h2,
.about-inner h2 {
  margin: 8px 0 0;
  font-size: clamp(2.1rem, 4vw, 3.8rem);
  line-height: 1.28;
}

.progress {
  min-width: 112px;
  margin: 0;
  color: var(--gold-light);
  font-size: 0.82rem;
  font-weight: 800;
  text-align: right;
}

fieldset {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

legend {
  width: 100%;
  margin-bottom: 18px;
  color: var(--ink);
  font-family: "Yu Mincho", "Hiragino Mincho ProN", serif;
  font-size: 1.2rem;
  font-weight: 700;
}

legend > span {
  margin-right: 10px;
  color: var(--gold);
  font-family: "BIZ UDPGothic", "Yu Gothic", sans-serif;
  font-size: 0.7rem;
}

.favorite-field,
.question-card {
  padding: 28px 0 32px;
  border-top: 1px solid var(--line);
}

.drink-options {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.drink-options label,
.choice-pair label {
  position: relative;
  cursor: pointer;
}

.drink-options input,
.choice-pair input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.drink-options label > span,
.choice-pair label > span {
  min-height: 74px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 14px 16px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: #111;
  transition: border-color 160ms ease, background 160ms ease, color 160ms ease;
}

.drink-options label > span { align-items: center; text-align: center; }

.drink-options small,
.choice-pair small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.72rem;
}

.choice-pair b { font-size: 0.94rem; }

.drink-options input:checked + span,
.choice-pair input:checked + span {
  border-color: var(--gold-light);
  background: var(--gold-light);
  color: #111;
}

.drink-options input:checked + span small,
.choice-pair input:checked + span small { color: rgba(17, 17, 17, 0.68); }

.drink-options input:focus-visible + span,
.choice-pair input:focus-visible + span {
  outline: 2px solid var(--sake);
  outline-offset: 3px;
}

.question-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 36px;
}

.choice-pair {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.choice-pair label > span { min-height: 106px; }

.form-actions {
  align-items: center;
  padding-top: 30px;
  border-top: 1px solid var(--line);
}

.submit-button { min-width: 220px; }
.form-error { min-height: 28px; margin: 16px 0 0; color: #f0a4a0; font-weight: 700; }

.result-band {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}

.result-inner {
  display: grid;
  grid-template-columns: minmax(260px, 0.7fr) minmax(0, 1.3fr);
  gap: 68px;
  align-items: center;
  padding: 92px 0;
}

.type-mark {
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border: 1px solid rgba(240, 207, 149, 0.58);
  background:
    linear-gradient(135deg, rgba(217, 168, 92, 0.18), transparent 48%),
    #0b0b0b;
}

.type-mark span {
  color: var(--gold-light);
  font-family: "Yu Mincho", "Hiragino Mincho ProN", serif;
  font-size: clamp(2.8rem, 7vw, 5.8rem);
  line-height: 1;
}

.result-code {
  margin: 10px 0 0;
  color: var(--gold-light);
  font-size: 0.84rem;
  font-weight: 900;
  letter-spacing: 0.14em;
}

.result-copy h2 {
  margin: 5px 0 12px;
  font-size: clamp(2.4rem, 5vw, 4.3rem);
  line-height: 1.25;
}

.result-tagline { color: var(--gold-light); font-size: 1.04rem; font-weight: 800; }
.result-description { max-width: 690px; color: #c8c2b8; line-height: 2; }

.result-details {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 32px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.result-details div { padding: 18px 20px 18px 0; }
.result-details div + div { padding-left: 20px; border-left: 1px solid var(--line); }
.result-details dt { color: var(--muted); font-size: 0.72rem; font-weight: 800; }
.result-details dd { margin: 4px 0 0; font-weight: 700; }
.recommended-block h3 { margin-bottom: 12px; font-size: 0.9rem; }
.result-links a { min-height: 40px; border-color: rgba(240, 207, 149, 0.36); color: var(--gold-light); }
.share-actions { margin-top: 28px; }

.type-section { border-bottom: 1px solid var(--line); }
.section-inner { padding: 104px 0; }

.section-heading {
  max-width: 780px;
  margin-bottom: 44px;
}

.section-heading > p:last-child { margin-top: 18px; color: var(--muted); }

.type-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}

.type-grid article {
  min-height: 214px;
  padding: 24px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  scroll-margin-top: 24px;
}

.type-grid article:target { background: rgba(217, 168, 92, 0.1); }
.type-grid b { color: var(--gold); font-size: 0.76rem; letter-spacing: 0.1em; }
.type-grid h3 { margin: 26px 0 8px; font-size: 1.12rem; }
.type-grid p { margin-bottom: 0; color: var(--muted); font-size: 0.86rem; }

.about-band { background: var(--surface); border-bottom: 1px solid var(--line); }

.about-inner {
  display: grid;
  grid-template-columns: minmax(180px, 0.55fr) minmax(0, 1.45fr);
  gap: 68px;
}

.about-inner p:last-child { max-width: 760px; color: var(--muted); line-height: 2; }

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding: 36px 0 48px;
  color: var(--muted);
  font-size: 0.78rem;
}

.footer-links { display: flex; flex-wrap: wrap; gap: 18px; }
.footer-links a { text-decoration: none; }
.footer-links a:hover { color: var(--gold-light); }

@media (max-width: 980px) {
  .global-nav { display: none; }
  .question-list { grid-template-columns: 1fr; }
  .type-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .result-inner { gap: 36px; }
}

@media (max-width: 700px) {
  .header-inner,
  .diagnosis-shell,
  .result-inner,
  .section-inner,
  .site-footer,
  .hero-inner { width: min(100% - 32px, 1160px); }

  .header-inner { min-height: 68px; }
  .brand span { display: none; }

  .hero {
    min-height: 86svh;
    background:
      linear-gradient(180deg, rgba(5, 5, 5, 0.36) 0%, rgba(5, 5, 5, 0.74) 46%, rgba(5, 5, 5, 0.98) 78%),
      url("../../assets/saketokura-hero-v2.png") 64% center / cover no-repeat;
  }

  .hero-inner { padding: 112px 0 36px; }
  h1 { font-size: clamp(2.8rem, 13vw, 4.2rem); }
  .hero-lead { font-size: 0.94rem; line-height: 1.85; }
  .hero-actions > * { flex: 1 1 160px; }

  .diagnosis-shell { padding: 62px 0 80px; }
  .quiz-head { align-items: start; }
  .drink-options { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .choice-pair { grid-template-columns: 1fr; }
  .choice-pair label > span { min-height: 82px; }
  .form-actions > * { width: 100%; }

  .result-inner { grid-template-columns: 1fr; padding: 70px 0; }
  .type-mark { width: min(70vw, 300px); }
  .result-details { grid-template-columns: 1fr; }
  .result-details div + div { padding-left: 0; border-top: 1px solid var(--line); border-left: 0; }
  .result-links a, .share-actions > * { flex: 1 1 150px; }

  .section-inner { padding: 78px 0; }
  .type-grid { grid-template-columns: 1fr; }
  .type-grid article { min-height: 170px; }
  .about-inner { grid-template-columns: 1fr; gap: 26px; }
  .site-footer { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}
