﻿:root {
  color-scheme: dark;
  --black: #080705;
  --ink: #15100a;
  --panel: rgba(19, 15, 10, 0.82);
  --gold: #d9b45f;
  --gold-bright: #f2d88a;
  --line: rgba(217, 180, 95, 0.32);
  --text: #f8f1df;
  --muted: #cdbf9f;
  --red: #8f1e1e;
  --green: #06c755;
  --serif: "Yu Mincho", "Hiragino Mincho ProN", "Noto Serif JP", serif;
  --sans: "Noto Sans JP", "Yu Gothic", "Hiragino Kaku Gothic ProN", Meiryo, sans-serif;
  font-family: var(--sans);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 18% 20%, rgba(143, 30, 30, 0.24), transparent 30%),
    linear-gradient(135deg, rgba(217, 180, 95, 0.08), transparent 28%),
    repeating-linear-gradient(45deg, rgba(217, 180, 95, 0.04) 0 1px, transparent 1px 18px),
    var(--black);
  color: var(--text);
}

button,
a {
  font: inherit;
}

button {
  cursor: pointer;
}

.app-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 28px;
  overflow-x: hidden;
}

.screen {
  display: none;
  width: min(1120px, 100%);
  max-width: 100%;
}

.screen.is-active {
  display: block;
}

.screen-home {
  width: 100%;
  min-width: 0;
  min-height: min(760px, calc(100vh - 56px));
  display: none;
  align-items: stretch;
  border: 1px solid var(--line);
  background: linear-gradient(135deg, rgba(8, 7, 5, 0.96), rgba(29, 20, 11, 0.88));
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.45);
  overflow: hidden;
}

.screen-home.is-active {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
}

.hero-media {
  position: relative;
  display: grid;
  width: 100%;
  min-width: 0;
  overflow: hidden;
  gap: 0;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-template-rows: repeat(2, minmax(0, 1fr));
  min-height: 560px;
  border-right: 1px solid var(--line);
  background: #0c0906;
}

.hero-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, transparent 55%, rgba(8, 7, 5, 0.34)),
    linear-gradient(180deg, transparent 78%, rgba(8, 7, 5, 0.52));
  pointer-events: none;
}

.hero-media img {
  display: block;
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  object-fit: cover;
  object-position: left top;
  filter: brightness(1.08) saturate(1.08) contrast(1.04);
}

.image-nobunaga {
  object-position: left 28%;
}

.image-hideyoshi {
  object-position: left 30%;
}

.image-honda {
  object-position: left 20%;
}

.image-ieyasu {
  object-position: left 30%;
}

.image-masamune {
  object-position: left 28%;
}

.image-kenshin {
  object-position: left 24%;
  filter: brightness(0.96) saturate(1.04) contrast(1.08);
}

.hero-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 18px;
  padding: clamp(36px, 5vw, 72px);
}

.hero-copy .eyebrow {
  order: 1;
}

.hero-copy h1 {
  order: 2;
}

.hero-copy .lead {
  order: 3;
}

.hero-copy .sublead {
  order: 4;
}

.hero-copy .intro {
  order: 5;
}

.hero-copy .primary-button {
  order: 6;
}

.hero-copy .note {
  order: 7;
}

.eyebrow,
.question-count,
.result-kicker,
.result-code {
  margin: 0;
  color: var(--gold-bright);
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  font-family: var(--serif);
  line-height: 1.18;
}

h1 {
  margin: 0;
  font-size: clamp(3rem, 6vw, 5.25rem);
  font-weight: 800;
}

h1 span {
  display: block;
  overflow-wrap: anywhere;
}

h1 small {
  font-size: 0.46em;
  vertical-align: baseline;
}

.lead {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(1.7rem, 3vw, 2.7rem);
  color: var(--gold);
  white-space: nowrap;
}

.sublead {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(1.08rem, 2vw, 1.35rem);
  color: var(--gold-bright);
  line-height: 1.55;
}

.intro,
.note {
  margin: 0;
  max-width: 34rem;
  line-height: 1.8;
}

.intro {
  font-size: 1.1rem;
}

.note {
  color: var(--muted);
  font-size: 0.92rem;
}

.primary-button,
.line-button,
.ghost-button {
  min-height: 48px;
  border-radius: 6px;
  padding: 0 22px;
  border: 1px solid transparent;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.primary-button {
  width: fit-content;
  background: linear-gradient(135deg, #f2d88a, #b88936);
  color: #130e07;
  font-weight: 800;
}

.line-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 240px;
  max-width: 100%;
  background: var(--green);
  color: #fff;
  font-weight: 800;
  text-decoration: none;
  text-align: center;
  line-height: 1.35;
}

.ghost-button {
  width: fit-content;
  background: rgba(255, 255, 255, 0.04);
  border-color: var(--line);
  color: var(--text);
}

.primary-button:hover,
.line-button:hover,
.ghost-button:hover {
  transform: translateY(-1px);
  border-color: var(--gold-bright);
}

.screen-quiz {
  max-width: 760px;
  padding: clamp(28px, 5vw, 56px);
  border: 1px solid var(--line);
  background: var(--panel);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.42);
  font-family: var(--sans);
}

.quiz-top {
  display: grid;
  gap: 14px;
  margin-bottom: 34px;
}

.progress-track {
  height: 10px;
  overflow: hidden;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.1);
}

.progress-bar {
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--gold-bright), var(--red));
  transition: width 180ms ease;
}

#question-title {
  margin: 0 0 18px;
  font-family: var(--sans);
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  font-weight: 700;
  line-height: 1.48;
}

.question-options {
  display: grid;
  gap: 10px;
  margin: 0 0 22px;
}

.option-card {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: start;
  gap: 10px;
  padding: 13px 14px;
  border: 1px solid rgba(217, 180, 95, 0.22);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.045);
  font-family: var(--sans);
}

.option-mark {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 99px;
  background: rgba(242, 216, 138, 0.16);
  color: var(--gold-bright);
  font-weight: 800;
  line-height: 1;
}

.option-text {
  color: var(--text);
  font-size: 0.98rem;
  font-weight: 500;
  line-height: 1.65;
}

.choices {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 24px;
}

.choice-button {
  width: 100%;
  min-height: 56px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0 12px;
  background: rgba(255, 255, 255, 0.045);
  color: var(--text);
  font-family: var(--sans);
  font-weight: 700;
  text-align: center;
  line-height: 1.35;
}

.choice-label {
  display: block;
  margin-bottom: 4px;
  color: var(--gold-bright);
  font-weight: 800;
  font-size: 0.88rem;
}

.choice-button:hover {
  background: rgba(217, 180, 95, 0.11);
  border-color: var(--gold);
}

#back-button {
  font-family: var(--sans);
}

.axis-trends {
  margin: 18px 0 24px;
  padding: 16px;
  border: 1px solid rgba(217, 180, 95, 0.24);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.045);
}

.axis-trends h3 {
  margin: 0 0 12px;
  font-family: var(--sans);
  font-size: 0.95rem;
  color: var(--gold-bright);
}

.axis-trend-list {
  display: grid;
  gap: 11px;
}

.axis-trend p {
  margin: 0 0 6px;
  color: var(--text);
  font-family: var(--sans);
  font-size: 0.88rem;
  font-weight: 700;
  line-height: 1.35;
}

.axis-bar {
  height: 8px;
  overflow: hidden;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.12);
}

.axis-bar::before {
  content: "";
  display: block;
  width: var(--axis-left);
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--gold-bright), var(--gold));
}

.screen-result {
  padding: 0;
}

.result-layout {
  display: grid;
  grid-template-columns: minmax(340px, 0.86fr) 1.14fr;
  width: min(1120px, 100%);
  margin-inline: auto;
  border: 1px solid var(--line);
  background: linear-gradient(135deg, rgba(8, 7, 5, 0.98), rgba(23, 16, 9, 0.94));
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.45);
}

.result-image-wrap {
  min-height: 720px;
  border-right: 1px solid var(--line);
  background: #0c0906;
}

.result-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center top;
}

.result-content {
  padding: clamp(28px, 4vw, 52px);
  background:
    linear-gradient(180deg, rgba(217, 180, 95, 0.06), transparent 180px),
    rgba(8, 7, 5, 0.18);
}

.result-brand {
  margin: 0 0 10px;
  color: var(--muted);
  font-family: var(--sans);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.1em;
}

.result-kicker {
  display: inline-block;
  width: fit-content;
  padding: 8px 10px;
  border: 1px solid rgba(242, 216, 138, 0.46);
  background: rgba(217, 180, 95, 0.08);
}

#result-title {
  margin: 10px 0 10px;
  font-size: clamp(2rem, 4.2vw, 3.5rem);
  color: #fff6df;
  overflow-wrap: anywhere;
  text-shadow: 0 2px 18px rgba(217, 180, 95, 0.16);
}

.result-line {
  margin: 0 0 28px;
  color: var(--gold);
  font-size: 1.22rem;
  line-height: 1.65;
}

.result-indicators {
  margin: 0 0 4px;
  color: var(--gold-bright);
  font-family: var(--sans);
  font-size: clamp(1.02rem, 2.4vw, 1.22rem);
  font-weight: 800;
  line-height: 1.55;
}

.result-code {
  margin-bottom: 12px;
  color: var(--muted);
  font-size: 0.86rem;
  letter-spacing: 0.04em;
  text-transform: none;
}

.disclaimer {
  margin: -12px 0 24px;
  color: rgba(205, 191, 159, 0.74);
  font-size: 0.78rem;
  line-height: 1.7;
}

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

.insight-grid section,
.next-step,
.share-box {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 18px;
  background: rgba(255, 255, 255, 0.04);
}

.share-box {
  background:
    linear-gradient(135deg, rgba(217, 180, 95, 0.12), rgba(8, 7, 5, 0.18)),
    rgba(255, 255, 255, 0.045);
}

h3 {
  margin: 0 0 8px;
  font-family: var(--sans);
  color: var(--gold-bright);
  font-size: 1.05rem;
}

.insight-grid p,
.next-step p,
.share-box p {
  margin: 0;
  color: var(--muted);
  line-height: 1.75;
}

.next-step,
.share-box {
  margin-top: 14px;
}

.cta-row {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.share-lead,
.line-note,
.sns-note {
  font-family: var(--sans);
}

.card-result-title {
  margin-top: 4px !important;
  color: var(--text) !important;
  font-family: var(--serif);
  font-size: clamp(1.45rem, 3.6vw, 2.05rem);
  font-weight: 800;
  line-height: 1.34 !important;
}

.card-result-line {
  margin-top: 6px !important;
  color: var(--gold) !important;
  font-family: var(--serif);
  font-size: clamp(1.05rem, 2.4vw, 1.3rem);
  font-weight: 700;
}

.card-result-indicators {
  margin-top: 8px !important;
  color: var(--gold-bright) !important;
  font-family: var(--sans);
  font-size: 1rem;
  font-weight: 800;
  line-height: 1.5 !important;
}

.card-result-code {
  margin-top: 2px !important;
  color: var(--muted) !important;
  font-size: 0.88rem;
  line-height: 1.5 !important;
}

.share-lead {
  margin: 16px 0 14px !important;
  color: var(--text) !important;
  font-weight: 700;
}

.line-note,
.sns-note {
  margin-top: 10px !important;
  font-size: 0.88rem;
  line-height: 1.7;
}

.line-follow {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid rgba(217, 180, 95, 0.24);
}

/* メインLINE CTA（結果直後の目立つブロック） */
.line-cta-main {
  margin: 32px 0;
  padding: 28px 24px;
  background: linear-gradient(135deg, rgba(6,201,91,0.12), rgba(6,201,91,0.06));
  border: 2px solid rgba(6,201,91,0.5);
  border-radius: 12px;
  text-align: center;
}
.line-cta-label {
  font-size: 0.82rem;
  color: #06c95b;
  letter-spacing: 0.08em;
  margin-bottom: 6px;
  font-family: var(--sans);
}
.line-cta-title {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 10px;
}
.line-cta-desc {
  font-size: 0.92rem;
  color: var(--muted);
  line-height: 1.7;
  margin-bottom: 18px;
  font-family: var(--sans);
}
.line-cta-desc strong {
  color: #06c95b;
}
.line-button-main {
  background: linear-gradient(135deg, #06c95b, #04a048) !important;
  border-color: #06c95b !important;
  color: #fff !important;
  font-size: 1.05rem;
  padding: 0 32px;
  min-height: 54px;
  width: 100%;
  max-width: 360px;
  box-shadow: 0 4px 16px rgba(6,201,91,0.3);
}
.line-button-main:hover {
  transform: translateY(-2px) !important;
  box-shadow: 0 6px 20px rgba(6,201,91,0.4) !important;
}
.line-cta-note {
  margin-top: 10px;
  font-size: 0.78rem;
  color: var(--muted);
  font-family: var(--sans);
}

.share-status {
  min-height: 1.7em;
  margin-top: 12px !important;
  color: var(--gold-bright) !important;
}

#share-text {
  white-space: pre-line;
  color: var(--text);
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid rgba(217, 180, 95, 0.22);
  font-size: 0.94rem;
}

.share-card-preview-wrap {
  margin: 0;
  display: grid;
  place-items: center;
}

.share-card-preview {
  display: block;
  width: min(100%, 420px);
  aspect-ratio: 4 / 5;
  object-fit: contain;
  border: 2px solid rgba(242, 216, 138, 0.62);
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.34);
  box-shadow: 0 18px 52px rgba(0, 0, 0, 0.48);
}

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

.card-actions .primary-button,
.card-actions .ghost-button {
  width: 100%;
}

#restart-button {
  margin-top: 18px;
}

@media (max-width: 840px) {
  .app-shell {
    padding: 14px;
  }

  .screen-home {
    min-height: 0;
    width: 100%;
  }

  .screen-home.is-active,
  .result-layout {
    grid-template-columns: 1fr;
  }

  .screen-home.is-active {
    display: flex;
    flex-direction: column;
  }

  .hero-media {
    width: 100%;
    align-self: stretch;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-template-rows: repeat(2, minmax(0, 1fr));
    aspect-ratio: 3 / 2;
    min-height: 0;
    height: min(28vh, 240px);
    max-height: 240px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .hero-media img {
    min-height: 0;
    height: 100%;
  }

  .hero-media::after {
    background:
      linear-gradient(180deg, rgba(8, 7, 5, 0.08), transparent 34%),
      linear-gradient(180deg, transparent 70%, rgba(8, 7, 5, 0.42));
  }

  .hero-copy {
    gap: 11px;
    padding: 20px 18px 22px;
    min-width: 0;
  }

  .hero-copy .primary-button {
    order: 5;
  }

  .hero-copy .intro {
    order: 6;
  }

  h1 {
    font-size: clamp(2.05rem, 8.4vw, 3rem);
    line-height: 1.16;
  }

  .lead {
    font-size: clamp(1.08rem, 4.5vw, 1.42rem);
    white-space: normal;
  }

  .sublead {
    font-size: 1rem;
  }

  .intro {
    font-size: 0.98rem;
    line-height: 1.72;
  }

  .note {
    font-size: 0.74rem;
    line-height: 1.65;
  }

  .result-image-wrap {
    min-height: 0;
    height: min(78vh, 620px);
    max-height: 620px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

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

  .primary-button,
  .line-button,
  .ghost-button {
    width: 100%;
  }

  .cta-row {
    display: grid;
  }

  .choices {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .card-actions {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .hero-media {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-template-rows: repeat(2, minmax(0, 1fr));
    height: min(26vh, 210px);
    max-height: 210px;
  }

  .hero-copy,
  .screen-quiz,
  .result-content {
    padding: 20px 16px;
  }

  h1 {
    font-size: clamp(1.92rem, 8.8vw, 2.62rem);
  }

  .lead {
    font-size: clamp(1.04rem, 4.7vw, 1.28rem);
  }

  #result-title {
    font-size: 1.72rem;
    line-height: 1.34;
  }

  .result-line {
    margin-bottom: 18px;
    font-size: 1rem;
  }

  .insight-grid section,
  .next-step,
  .share-box {
    padding: 15px;
  }

  .result-image-wrap {
    height: min(58vh, 440px);
  }
}
