:root {
  color-scheme: light;
  --ink: #1d2430;
  --muted: #647084;
  --line: #d8dee8;
  --paper: #fbfcff;
  --panel: #ffffff;
  --accent: #e45063;
  --accent-dark: #ba3047;
  --mint: #1c9a83;
  --gold: #d79a20;
  --blue: #2f73c8;
  --shadow: 0 20px 70px rgba(42, 51, 70, 0.13);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Yu Gothic", "Yu Gothic UI", sans-serif;
  color: var(--ink);
  background:
    linear-gradient(135deg, rgba(228, 80, 99, 0.08), transparent 38%),
    linear-gradient(225deg, rgba(28, 154, 131, 0.08), transparent 42%),
    #f3f6fb;
}

button {
  font: inherit;
}

.app {
  width: min(1040px, calc(100% - 32px));
  min-height: 100vh;
  margin: 0 auto;
  padding: 44px 0;
  display: grid;
  align-items: center;
}

.hidden {
  display: none !important;
}

.intro,
.question-panel,
.direction-panel,
.chart-panel,
.summary-panel,
.advice-panel,
.type-guide-panel,
.result-note {
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(216, 222, 232, 0.9);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.intro {
  padding: clamp(28px, 7vw, 76px);
  max-width: 820px;
}

.eyebrow,
.question-kicker {
  margin: 0 0 12px;
  color: var(--accent-dark);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
p {
  overflow-wrap: anywhere;
}

h1 {
  margin: 0;
  font-size: clamp(34px, 7vw, 72px);
  line-height: 1.04;
  letter-spacing: 0;
}

.lead {
  max-width: 640px;
  margin: 22px 0 0;
  color: var(--muted);
  font-size: clamp(16px, 2.6vw, 19px);
  line-height: 1.85;
}

.creator {
  margin: 22px 0 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.notice-box {
  max-width: 680px;
  margin-top: 22px;
  padding: 14px 16px;
  border: 1px solid #f0d6dc;
  border-radius: 8px;
  background: #fff7f9;
}

.notice-box p {
  margin: 0;
  color: #7b3d4b;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.7;
}

.notice-box p + p {
  margin-top: 4px;
}

.primary-button,
.secondary-button {
  min-height: 52px;
  margin-top: 34px;
  padding: 0 24px;
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 800;
}

.primary-button {
  color: #fff;
  background: var(--accent);
  box-shadow: 0 12px 28px rgba(228, 80, 99, 0.28);
}

.secondary-button {
  color: var(--accent-dark);
  background: #fff;
  border: 1px solid #efbdc6;
}

.quiz,
.result {
  width: 100%;
}

.topbar {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 18px;
}

.icon-button {
  width: 46px;
  height: 46px;
  flex: 0 0 46px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: #fff;
  color: var(--ink);
  cursor: pointer;
  font-size: 22px;
  line-height: 1;
}

.progress-wrap {
  flex: 1;
}

.progress-text {
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.progress-track {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: #e5eaf2;
}

.progress-fill {
  width: 5%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), var(--mint));
  transition: width 180ms ease;
}

.question-panel {
  min-height: 560px;
  padding: clamp(22px, 5vw, 54px);
}

.question-panel h2 {
  min-height: 86px;
  margin: 0 0 28px;
  font-size: clamp(24px, 4.2vw, 42px);
  line-height: 1.28;
  letter-spacing: 0;
}

.answers {
  display: grid;
  gap: 14px;
}

.answer-button {
  display: grid;
  grid-template-columns: 42px 1fr;
  align-items: center;
  gap: 14px;
  width: 100%;
  min-height: 72px;
  padding: 14px 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: #fff;
  cursor: pointer;
  text-align: left;
  transition: transform 120ms ease, border-color 120ms ease, box-shadow 120ms ease;
}

.answer-button:hover {
  transform: translateY(-1px);
  border-color: #f0a6b3;
  box-shadow: 0 10px 30px rgba(42, 51, 70, 0.1);
}

.answer-number {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  color: #fff;
  background: var(--ink);
  font-weight: 900;
}

.answer-label {
  font-size: clamp(15px, 2.3vw, 18px);
  font-weight: 700;
  line-height: 1.55;
}

.result {
  padding: 16px 0;
}

.result-head {
  margin-bottom: 22px;
}

.result-head h1 {
  font-size: clamp(32px, 5.5vw, 58px);
}

.result-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(300px, 0.92fr);
  gap: 18px;
  margin-bottom: 18px;
}

.chart-panel,
.direction-panel,
.summary-panel,
.advice-panel {
  padding: clamp(18px, 3vw, 28px);
}

.direction-panel,
.type-guide-panel,
.result-note {
  margin-bottom: 18px;
}

.direction-panel h2,
.type-guide-panel h2 {
  margin: 0;
  font-size: clamp(25px, 4vw, 38px);
  line-height: 1.25;
}

.direction-summary {
  max-width: 860px;
  margin: 14px 0 22px;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.8;
}

.direction-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 14px;
}

.direction-grid > div {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
}

.direction-grid h3 {
  margin: 0 0 10px;
  font-size: 16px;
}

.direction-grid p,
.direction-grid ul {
  margin: 0;
  color: var(--muted);
  line-height: 1.75;
}

.direction-grid ul {
  padding-left: 1.2em;
}

.type-guide-panel,
.result-note {
  padding: clamp(18px, 3vw, 28px);
}

.guide-note,
.result-note p {
  max-width: 860px;
  margin: 12px 0 20px;
  color: var(--muted);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.75;
}

.result-note p {
  margin: 0;
}

.type-guide-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.guide-card {
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
}

.guide-card h3 {
  margin: 0 0 8px;
  color: var(--ink);
  font-size: 16px;
}

.guide-card p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.65;
}

.guide-card .guide-example {
  margin-top: 8px;
  color: var(--ink);
}

.chart-panel {
  display: grid;
  place-items: center;
}

canvas {
  width: min(100%, 580px);
  height: auto;
  aspect-ratio: 1;
}

.summary-panel h2,
.advice-panel h2 {
  margin: 0 0 18px;
  font-size: 22px;
}

.type-card {
  padding: 14px 0;
  border-top: 1px solid var(--line);
}

.type-card:first-child {
  border-top: 0;
  padding-top: 0;
}

.type-line {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 8px;
}

.type-name {
  font-size: 19px;
  font-weight: 900;
}

.type-role {
  margin-bottom: 4px;
  color: var(--accent-dark);
  font-size: 12px;
  font-weight: 900;
}

.type-score {
  color: var(--accent-dark);
  font-weight: 900;
}

.type-card p,
.advice-item p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.type-card .channel-idea {
  margin-top: 8px;
  color: var(--ink);
  font-weight: 700;
}

.type-card .role-description {
  margin-bottom: 8px;
  color: var(--ink);
  font-weight: 800;
}

.advice-panel {
  margin-top: 18px;
}

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

.advice-item {
  min-height: 150px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
}

.advice-item h3 {
  margin: 0 0 10px;
  font-size: 17px;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
}

@media (max-width: 800px) {
  .app {
    width: min(100% - 20px, 1040px);
    padding: 18px 0;
  }

  .intro {
    padding: 28px 20px;
  }

  .question-panel {
    min-height: auto;
    padding: 24px 16px;
  }

  .question-panel h2 {
    min-height: 118px;
  }

  .answer-button {
    grid-template-columns: 36px 1fr;
    min-height: 68px;
    padding: 12px;
  }

  .answer-number {
    width: 36px;
    height: 36px;
  }

  .result-grid,
  .direction-grid,
  .advice-list,
  .type-guide-grid {
    grid-template-columns: 1fr;
  }
}
