: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;
  --beer: #e6a13a;
  --sake: #d5e4e7;
}

* { 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;
}

a { color: inherit; }

button, input, select {
  font: inherit;
}

.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,
.section-inner,
.gift-shell,
.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: 18px;
}

.global-nav a {
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.82rem;
  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.94) 0%, rgba(5, 5, 5, 0.64) 48%, rgba(5, 5, 5, 0.2) 78%),
    linear-gradient(180deg, rgba(5, 5, 5, 0.08) 44%, rgba(5, 5, 5, 0.96) 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 56px;
}

.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, h2, h3, p { margin-top: 0; }

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: 680px;
  color: rgba(244, 240, 232, 0.8);
  font-size: 1.02rem;
  line-height: 2;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.primary-action,
.quiet-action,
.result-actions a,
.copy-button,
.submit-button {
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 10px 16px;
  border: 1px solid transparent;
  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,
.copy-button {
  border-color: rgba(255, 255, 255, 0.24);
  background: rgba(10, 10, 10, 0.48);
  color: var(--ink);
}

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

.gift-shell {
  display: grid;
  grid-template-columns: minmax(320px, 420px) minmax(0, 1fr);
  gap: 36px;
  padding: 54px 0 84px;
}

.diagnosis-panel,
.results-panel,
.guide-card,
.notice {
  border-top: 1px solid var(--line);
  background: transparent;
}

.diagnosis-panel {
  position: sticky;
  top: 24px;
  align-self: start;
  padding-top: 24px;
}

.form-grid {
  display: grid;
  gap: 20px;
}

.field label,
.field legend {
  display: block;
  margin-bottom: 10px;
  color: rgba(244, 240, 232, 0.78);
  font-size: 0.82rem;
  font-weight: 800;
}

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

select,
input[type="number"] {
  width: 100%;
  min-height: 48px;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 0;
  background: #111;
  color: var(--ink);
}

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

.segmented.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.segmented input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.segmented span {
  min-height: 42px;
  display: grid;
  place-items: center;
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: rgba(244, 240, 232, 0.78);
  font-size: 0.82rem;
  font-weight: 800;
  text-align: center;
}

.segmented input:checked + span {
  border-color: var(--gold-light);
  background: rgba(217, 168, 92, 0.16);
  color: var(--ink);
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding-top: 4px;
}

.notice {
  margin-top: 22px;
  padding-top: 18px;
  color: rgba(244, 240, 232, 0.68);
  font-size: 0.82rem;
}

.results-panel {
  padding-top: 24px;
}

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

.results-head h2 {
  margin-bottom: 4px;
  font-size: clamp(2rem, 4vw, 3rem);
}

.result-list {
  display: grid;
  gap: 18px;
}

.result-card {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 22px;
  padding: 22px 0;
  border-top: 1px solid var(--line);
}

.result-card:first-child { border-top-color: rgba(240, 207, 149, 0.45); }

.gift-visual {
  min-height: 190px;
  display: grid;
  place-items: end start;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background:
    linear-gradient(145deg, rgba(240, 207, 149, 0.22), transparent 44%),
    linear-gradient(45deg, rgba(168, 88, 84, 0.34), rgba(17, 17, 16, 0.88));
}

.gift-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gift-visual span {
  color: rgba(255, 255, 255, 0.74);
  font-family: "Yu Mincho", "Hiragino Mincho ProN", serif;
  font-size: 1.4rem;
  line-height: 1.2;
}

.result-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}

.chip {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 3px 9px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: rgba(244, 240, 232, 0.78);
  font-size: 0.74rem;
  font-weight: 800;
}

.score {
  color: var(--gold-light);
}

.rating {
  border-color: rgba(240, 207, 149, 0.36);
  background: rgba(217, 168, 92, 0.12);
  color: var(--gold-light);
}

.result-card h3 {
  margin-bottom: 8px;
  font-size: 1.35rem;
}

.result-card p {
  color: rgba(244, 240, 232, 0.74);
}

.reason {
  margin: 14px 0;
  padding-left: 14px;
  border-left: 2px solid var(--gold);
  color: rgba(244, 240, 232, 0.86);
  font-weight: 700;
}

.result-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.result-actions a {
  border-color: rgba(255, 255, 255, 0.18);
  color: var(--ink);
}

.result-actions a:first-child,
.result-actions a:nth-child(2) {
  background: rgba(217, 168, 92, 0.14);
  border-color: rgba(240, 207, 149, 0.42);
}

.empty-state {
  padding: 30px 0;
  color: rgba(244, 240, 232, 0.72);
}

.section-band {
  padding: 0 0 76px;
}

.section-heading {
  max-width: 760px;
  margin-bottom: 26px;
}

.section-heading h2 {
  margin-bottom: 14px;
  font-size: clamp(2rem, 4vw, 3.2rem);
  line-height: 1.2;
}

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

.guide-card {
  padding-top: 18px;
}

.guide-card h3 {
  margin-bottom: 8px;
}

.guide-card p {
  color: rgba(244, 240, 232, 0.72);
}

.site-footer {
  min-height: 96px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border-top: 1px solid var(--line);
  color: rgba(244, 240, 232, 0.62);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.footer-links a {
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 800;
}

@media (max-width: 900px) {
  .global-nav { display: none; }
  .hero { min-height: 78svh; }
  .gift-shell { grid-template-columns: 1fr; }
  .diagnosis-panel { position: static; }
  .guide-grid { grid-template-columns: 1fr; }
}

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

  h1 { font-size: 2.8rem; }
  .segmented,
  .segmented.three { grid-template-columns: 1fr; }
  .result-card { grid-template-columns: 1fr; }
  .gift-visual { min-height: 150px; }
  .results-head,
  .site-footer {
    align-items: flex-start;
    flex-direction: column;
  }
}
