:root {
  color-scheme: light;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #17231d;
  background: #f5f6f2;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  --green: #246b50;
  --green-dark: #164832;
  --green-light: #e6f1e9;
  --muted: #65736a;
  --line: #dfe5de;
  --card: #fff;
  --orange: #a45b25;
  --shadow: 0 16px 48px rgb(29 54 39 / 8%);
}

* {
  box-sizing: border-box;
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
}

button {
  color: inherit;
  font: inherit;
}

.site-header,
.site-footer {
  width: min(100% - 40px, 980px);
  margin-inline: auto;
}

.site-header {
  display: flex;
  min-height: 76px;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--green-dark);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.02em;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 10px;
  background: var(--green);
  color: white;
  font-size: 14px;
}

.header-note,
.site-footer {
  color: var(--muted);
  font-size: 12px;
}

.page-shell {
  width: min(100% - 32px, 760px);
  min-height: calc(100vh - 138px);
  margin: 10px auto 32px;
}

.hero-card,
.scenario-intro-card,
.game-card,
.loading-card,
.error-card {
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--card);
  box-shadow: var(--shadow);
}

.hero-card {
  overflow: hidden;
}

.scenario-intro-card {
  overflow: hidden;
  border-radius: 24px;
}

.scenario-intro-art {
  position: relative;
  display: grid;
  min-height: 340px;
  overflow: hidden;
  place-items: end center;
  background:
    radial-gradient(circle at 82% 45%, rgb(255 255 255 / 52%) 0 17%, transparent 17.2%),
    radial-gradient(circle at 17% 76%, rgb(255 255 255 / 42%) 0 12%, transparent 12.2%),
    linear-gradient(145deg, #edf7ff, #dcecff);
}

.intro-duration {
  position: absolute;
  z-index: 1;
  top: 24px;
  left: 26px;
  padding: 9px 14px;
  border: 1px solid rgb(255 255 255 / 80%);
  border-radius: 999px;
  background: rgb(255 255 255 / 88%);
  color: #536b81;
  font-size: 13px;
  font-weight: 700;
}

.intro-character {
  position: relative;
  z-index: 1;
  display: grid;
  width: min(76%, 350px);
  height: 300px;
  place-items: end center;
}

.intro-character .character-avatar {
  width: min(100%, 270px);
  height: auto;
  aspect-ratio: 1;
  border: 0;
  box-shadow: none;
}

.scenario-intro-content {
  padding: clamp(24px, 6vw, 42px);
}

.intro-character-label {
  margin: 0 0 10px;
  color: #416bc4;
  font-size: 15px;
  font-weight: 700;
}

.scenario-intro-content h1 {
  max-width: 100%;
  font-size: clamp(27px, 6vw, 38px);
  letter-spacing: -0.04em;
}

.intro-description {
  margin: 16px 0 24px;
  color: #64758b;
  font-size: 16px;
  line-height: 1.75;
}

.intro-start-button {
  width: 100%;
  min-height: 58px;
  border-radius: 999px;
  font-size: 16px;
}

.scenario-preview {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.scenario-preview-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 20px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgb(255 255 255 / 76%);
}

.preview-number {
  display: grid;
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  place-items: center;
  border-radius: 11px;
  background: var(--green-light);
  color: var(--green-dark);
  font-size: 12px;
  font-weight: 700;
}

.scenario-preview-card h2 {
  margin: 0;
  font-size: 14px;
}

.scenario-preview-card p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
}

.hero-card {
  border-color: #d8e6d9;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
  padding: 8px 12px;
  border: 1px solid rgb(36 107 80 / 14%);
  border-radius: 999px;
  background: rgb(255 255 255 / 72%);
  color: var(--green-dark);
  font-size: 11px;
  font-weight: 700;
}

.hero-badge-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #55a675;
  box-shadow: 0 0 0 4px rgb(85 166 117 / 14%);
}

.hero-top h1 span {
  color: var(--green);
}

.hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 24px;
}

.hero-stats span {
  padding: 8px 11px;
  border: 1px solid rgb(36 107 80 / 12%);
  border-radius: 10px;
  background: rgb(255 255 255 / 68%);
  color: #56665b;
  font-size: 11px;
}

.hero-stats strong {
  color: var(--green-dark);
  font-size: 12px;
}

.hero-bottom .primary-button {
  min-width: 190px;
}

.progress-dashboard,
.scenario-select {
  margin-top: 22px;
  padding: clamp(20px, 4vw, 30px);
  border: 1px solid var(--line);
  border-radius: 20px;
  background: white;
  box-shadow: 0 10px 30px rgb(29 54 39 / 5%);
}

.dashboard-heading,
.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 18px;
}

.dashboard-heading .eyebrow,
.section-heading .eyebrow {
  margin-bottom: 6px;
}

.dashboard-heading h2,
.section-heading h2 {
  margin: 0;
  font-size: clamp(19px, 4vw, 24px);
  letter-spacing: -0.03em;
}

.local-save-note,
.section-hint {
  color: var(--muted);
  font-size: 10px;
  text-align: right;
}

.local-save-note::before {
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-right: 6px;
  border-radius: 50%;
  background: #64a77d;
  content: "";
  vertical-align: 1px;
}

.progress-top-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(150px, 0.85fr);
  gap: 12px;
}

.xp-card,
.activity-card {
  min-width: 0;
  padding: 17px;
  border: 1px solid #e4eae2;
  border-radius: 15px;
  background: #f9fbf8;
}

.xp-card {
  background: linear-gradient(120deg, #f1f8ef, #f7faf4 76%);
}

.xp-heading {
  display: flex;
  align-items: center;
  gap: 11px;
}

.xp-icon {
  display: grid;
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  place-items: center;
  border-radius: 13px;
  background: #e1efdc;
  color: #957123;
  font-size: 21px;
}

.dashboard-label {
  display: block;
  color: var(--muted);
  font-size: 10px;
  font-weight: 600;
}

.xp-heading strong,
.activity-card > strong {
  display: block;
  margin-top: 3px;
  color: var(--green-dark);
  font-size: 21px;
  letter-spacing: -0.03em;
}

.activity-card > strong {
  margin-top: 10px;
  font-size: 26px;
}

.activity-card > strong small {
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
}

.activity-card p,
.xp-caption {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.5;
}

.level-row,
.skill-row-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.level-row {
  margin: 14px 0 7px;
  color: #536258;
  font-size: 10px;
  font-weight: 600;
}

.dashboard-meter {
  height: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: #e9eee7;
}

.dashboard-meter span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #47956a, #8ac16c);
  transition: width 300ms ease;
}

.dashboard-lower-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 12px;
}

.skill-progress,
.relationship-progress {
  min-width: 0;
  padding: 17px;
  border: 1px solid #e7ebe5;
  border-radius: 15px;
  background: #fff;
}

.skill-progress h3,
.relationship-progress h3 {
  margin: 0 0 16px;
  color: #34443a;
  font-size: 13px;
}

.skill-row + .skill-row {
  margin-top: 13px;
}

.skill-row-label {
  margin-bottom: 6px;
  color: #536258;
  font-size: 10px;
}

.skill-row-label strong {
  color: var(--green-dark);
  font-variant-numeric: tabular-nums;
}

.skill-meter span {
  background: linear-gradient(90deg, #578dba, #88b8d2);
}

.dashboard-footnote {
  margin: 14px 0 0;
  color: #7a857d;
  font-size: 9px;
  line-height: 1.5;
}

.rapport-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.rapport-row + .rapport-row {
  margin-top: 14px;
}

.rapport-avatar {
  display: grid;
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  place-items: center;
  border-radius: 50%;
  background: #efe7da;
  color: #795c3b;
  font-size: 12px;
  font-weight: 700;
}

.teammate-avatar {
  background: #e8e4f2;
  color: #5b5080;
}

.rapport-content {
  min-width: 0;
  flex: 1;
}

.rapport-meter span {
  background: linear-gradient(90deg, #bc8a56, #e2bc7d);
}

.scenario-select {
  margin-bottom: 20px;
}

.scenario-select > .dashboard-footnote {
  margin-top: 12px;
}

.scenario-preview {
  gap: 9px;
  margin-top: 0;
}

.scenario-accordion {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.scenario-accordion[open] {
  border-color: #9cbea6;
  box-shadow: 0 8px 22px rgb(29 54 39 / 6%);
}

.scenario-summary {
  display: flex;
  min-height: 76px;
  align-items: center;
  gap: 12px;
  padding: 13px 15px;
  cursor: pointer;
  list-style: none;
}

.scenario-summary::-webkit-details-marker {
  display: none;
}

.scenario-summary:focus-visible {
  outline: 3px solid #92b9a0;
  outline-offset: -3px;
}

.mission-index {
  display: grid;
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  place-items: center;
  border-radius: 12px;
  background: var(--green-light);
  color: var(--green-dark);
  font-size: 11px;
  font-weight: 700;
}

.mission-main {
  display: grid;
  min-width: 0;
  flex: 1;
  gap: 5px;
}

.mission-title {
  color: #293a30;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.4;
}

.mission-meta {
  color: var(--muted);
  font-size: 10px;
}

.mission-progress {
  width: 52px;
  height: 5px;
  flex: 0 0 52px;
  overflow: hidden;
  border-radius: 999px;
  background: #edf0eb;
}

.mission-progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: #6b9e78;
}

.mission-chevron {
  color: #718076;
  font-size: 18px;
  transition: transform 160ms ease;
}

.scenario-accordion[open] .mission-chevron {
  transform: rotate(180deg);
}

.scenario-details {
  padding: 0 17px 18px 65px;
  border-top: 1px solid #edf0eb;
  animation: reveal-mission 180ms ease-out;
}

.scenario-details-description {
  margin: 14px 0;
  color: #526158;
  font-size: 12px;
  line-height: 1.65;
}

.mission-details-grid {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 16px;
  align-items: start;
}

.mission-detail-label {
  display: block;
  margin-bottom: 8px;
  color: #758078;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.goal-list {
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 0;
  color: #44534a;
  font-size: 10px;
  line-height: 1.45;
  list-style: none;
}

.goal-list li {
  position: relative;
  padding-left: 13px;
}

.goal-list li::before {
  position: absolute;
  left: 0;
  color: #5c9a70;
  content: "✓";
  font-weight: 700;
}

.mission-rapport {
  width: 116px;
  color: var(--green-dark);
  font-size: 17px;
  font-weight: 700;
}

.mission-rapport .dashboard-meter {
  margin-top: 7px;
}

.mission-play-button {
  display: flex;
  min-height: 40px;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: 15px;
  padding: 0 14px;
  border: 0;
  border-radius: 10px;
  background: var(--green);
  color: #fff;
  cursor: pointer;
  font-size: 11px;
  font-weight: 700;
  transition: background 150ms ease, transform 150ms ease;
}

.mission-play-button:hover {
  transform: translateY(-1px);
  background: var(--green-dark);
}

.mission-play-button:focus-visible {
  outline: 3px solid #92b9a0;
  outline-offset: 3px;
}

@keyframes reveal-mission {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-top {
  padding: clamp(28px, 7vw, 56px);
  background:
    radial-gradient(ellipse at 90% 5%, rgb(201 229 208 / 85%), transparent 38%),
    linear-gradient(135deg, #eff6ee, #f8faf6 68%);
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--green);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

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

h1 {
  max-width: 620px;
  margin: 0;
  font-size: clamp(30px, 7vw, 48px);
  letter-spacing: -0.05em;
  line-height: 1.12;
}

.hero-description {
  max-width: 590px;
  margin: 18px 0 0;
  color: #53635a;
  font-size: 16px;
  line-height: 1.75;
}

.hero-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 22px clamp(24px, 6vw, 48px);
}

.meta-label {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 11px;
}

.meta-value {
  font-size: 13px;
  font-weight: 600;
}

.game-card {
  padding: clamp(22px, 6vw, 42px);
}

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

.step-label {
  color: var(--green);
  font-size: 12px;
  font-weight: 700;
}

.question-count {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 11px;
}

.score-meter {
  margin-bottom: 22px;
}

.score-meter-heading,
.final-score-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
  color: #49584e;
  font-size: 13px;
  font-weight: 600;
}

.score-meter-heading strong,
.final-score-heading strong {
  color: var(--green-dark);
  font-size: 18px;
  font-variant-numeric: tabular-nums;
}

.score-meter-heading small,
.final-score-heading small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
}

.score-meter-track {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: #edf0eb;
}

.score-meter-fill {
  height: 100%;
  border-radius: inherit;
  transition: width 380ms cubic-bezier(0.2, 0.75, 0.25, 1), background-color 220ms ease;
}

.score-band-green .score-meter-fill {
  background: var(--green);
}

.score-band-yellow .score-meter-fill {
  background: #eab308;
}

.score-band-red .score-meter-fill {
  background: #dc2626;
}

.scenario-copy {
  margin: 0;
  color: #34443a;
  font-size: clamp(17px, 3vw, 20px);
  line-height: 1.8;
}

.conversation-turn {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin: 24px 0 28px;
}

.character-avatar {
  display: inline-grid;
  width: 76px;
  height: 76px;
  flex: 0 0 76px;
  overflow: hidden;
  place-items: center;
  border: 1px solid rgb(23 35 29 / 8%);
  border-radius: 50%;
  background: var(--avatar-bg);
}

.character-avatar svg {
  display: block;
  width: 100%;
  height: 100%;
}

.character-avatar.is-running {
  overflow: hidden;
  border-color: rgb(36 107 80 / 15%);
  box-shadow: 0 3px 8px rgb(29 54 39 / 12%);
}

.running-figure .runner-body {
  transform-box: view-box;
  transform-origin: 50% 50%;
  animation: runner-bounce 280ms ease-in-out infinite alternate;
}

.running-figure .runner-limb {
  transform-box: view-box;
}

.running-figure .runner-leg-back {
  transform-origin: 48px 55px;
  animation: runner-stride 360ms ease-in-out infinite alternate;
}

.running-figure .runner-leg-front {
  transform-origin: 54px 56px;
  animation: runner-stride 360ms ease-in-out infinite alternate-reverse;
}

.running-figure .runner-arm-back {
  transform-origin: 47px 39px;
  animation: runner-stride 360ms ease-in-out infinite alternate-reverse;
}

.running-figure .runner-arm-front {
  transform-origin: 59px 39px;
  animation: runner-stride 360ms ease-in-out infinite alternate;
}

.character-avatar.is-compact {
  width: 58px;
  height: 58px;
  flex-basis: 58px;
}

.conversation-content {
  min-width: 0;
}

.speaker {
  display: inline-block;
  margin: 3px 0 7px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.choice-heading {
  margin: 0 0 12px;
  color: #65736a;
  font-size: 12px;
  font-weight: 600;
}

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

.custom-answer-form {
  display: grid;
  gap: 10px;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.custom-answer-form label {
  color: #49584e;
  font-size: 13px;
  font-weight: 700;
}

.custom-answer-note {
  margin: -5px 0 0;
  color: #65736a;
  font-size: 12px;
}

.custom-answer-form textarea {
  width: 100%;
  min-height: 96px;
  padding: 13px 15px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  color: #34443a;
  font: inherit;
  font-size: 14px;
  line-height: 1.6;
  resize: vertical;
}

.custom-answer-form textarea::placeholder {
  color: #849087;
}

.custom-answer-form textarea:focus-visible {
  outline: 3px solid #92b9a0;
  outline-offset: 2px;
}

.custom-answer-form .primary-button {
  justify-self: end;
}

.custom-answer-status {
  margin: 0;
  color: #65736a;
  font-size: 13px;
}

.custom-answer-form button:disabled,
.choice-button:disabled {
  cursor: wait;
  opacity: 0.65;
}

.choice-button {
  display: flex;
  width: 100%;
  min-height: 62px;
  align-items: center;
  gap: 14px;
  padding: 15px 17px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: white;
  cursor: pointer;
  text-align: left;
  transition: border-color 150ms ease, background 150ms ease, transform 150ms ease;
}

.choice-button:hover {
  transform: translateY(-1px);
  border-color: #8ab19b;
  background: #f8fbf8;
}

.choice-button:focus-visible,
.primary-button:focus-visible,
.secondary-button:focus-visible,
.reflection-button:focus-visible {
  outline: 3px solid #92b9a0;
  outline-offset: 3px;
}

.choice-letter {
  display: grid;
  width: 30px;
  height: 30px;
  flex: 0 0 30px;
  place-items: center;
  border-radius: 10px;
  background: #eff4ef;
  color: var(--green-dark);
  font-size: 12px;
  font-weight: 700;
}

.choice-text {
  font-size: 14px;
  line-height: 1.6;
}

.feedback-panel {
  margin-top: 22px;
  padding: 19px;
  border: 1px solid #d6e6da;
  border-radius: 16px;
  background: #f4f8f3;
}

.conversation-feedback {
  display: grid;
  gap: 16px;
  padding: clamp(22px, 4vw, 34px);
  border-radius: 22px;
}

.response-panel {
  display: grid;
  gap: 16px;
  margin-top: 20px;
}

.player-message {
  max-width: 88%;
  justify-self: end;
  padding: 13px 16px;
  border: 1px solid #dce9df;
  border-radius: 16px 16px 4px 16px;
  background: #f0f6f1;
}

.player-message p,
.response-dialogue p {
  margin: 5px 0 0;
  color: #34443a;
  font-size: 13px;
  line-height: 1.7;
}

.message-label {
  display: block;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.thinking-message,
.response-turn {
  display: flex;
  align-items: flex-start;
  gap: 17px;
}

.thinking-message .character-avatar.is-compact {
  width: 48px;
  height: 48px;
  flex-basis: 48px;
}

.thinking-copy {
  display: flex;
  min-height: 42px;
  align-items: center;
  gap: 11px;
  color: #49584e;
  font-size: 12px;
}

.thinking-copy strong {
  font-weight: 600;
}

.thinking-dots {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.thinking-dots i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--green);
  animation: thinking 700ms ease-in-out infinite alternate;
}

.thinking-dots i:nth-child(2) {
  animation-delay: 120ms;
}

.thinking-dots i:nth-child(3) {
  animation-delay: 240ms;
}

.response-dialogue {
  min-width: 0;
  flex: 1;
  padding: 19px 22px;
  border: 1px solid var(--line);
  border-radius: 6px 18px 18px;
  background: #fff;
}

.response-dialogue .message-label {
  margin-bottom: 8px;
  font-size: 11px;
}

.response-dialogue p {
  margin: 0;
  color: #34443a;
  font-size: clamp(15px, 2vw, 18px);
  line-height: 1.75;
}

.character-response-card,
.coaching-feedback-card {
  min-width: 0;
  padding: clamp(15px, 3vw, 22px);
  border: 1px solid #dfe7de;
  border-radius: 16px;
  background: #fff;
}

.character-response-card {
  border-color: #d8e5eb;
  background: #f8fbfc;
}

.character-response-card .response-turn {
  align-items: center;
  gap: 13px;
}

.character-response-card .character-avatar.is-compact {
  width: 50px;
  height: 50px;
  flex-basis: 50px;
}

.character-response-card .response-dialogue {
  padding: 0;
  border: 0;
  background: transparent;
}

.character-response-card .response-dialogue p {
  font-size: 15px;
}

.coaching-feedback-card {
  border-color: #d6e6da;
  background: #fff;
}

.conversation-feedback.is-misaligned .coaching-feedback-card {
  border-color: #eadcc9;
  background: #fffdfa;
}

.explanation-title {
  margin: 0;
  color: #34443a;
  font-size: 15px;
  line-height: 1.4;
}

.feedback-panel.is-misaligned {
  border-color: #eadcc9;
  background: #fbf7f0;
}

.feedback-title {
  margin: 0 0 7px;
  color: var(--green-dark);
  font-size: 14px;
}

.is-misaligned .feedback-title {
  color: var(--orange);
}

.feedback-copy {
  margin: 0;
  color: #49584e;
  font-size: 13px;
  line-height: 1.75;
}

.feedback-summary {
  display: grid;
  gap: 14px;
}

.feedback-summary .feedback-title {
  margin: 0;
  font-size: 18px;
  line-height: 1.4;
}

.explanation-block {
  display: grid;
  gap: 8px;
}

.explanation-block .feedback-copy {
  font-size: 16px;
  line-height: 1.8;
}

.conversation-feedback .rule-list {
  gap: 14px;
  margin-top: 0;
}

.conversation-feedback .rule-card {
  padding: 18px 20px;
  border-left-width: 4px;
  border-radius: 5px 14px 14px 5px;
}

.conversation-feedback .rule-card strong {
  margin-bottom: 9px;
  font-size: 15px;
  line-height: 1.45;
}

.conversation-feedback .rule-quote,
.conversation-feedback .rule-principle {
  font-size: 14px;
  line-height: 1.75;
}

.conversation-feedback .rule-principle {
  margin-top: 10px;
}

.feedback-next-button {
  display: inline-flex;
  min-height: 50px;
  align-items: center;
  justify-content: center;
  gap: 12px;
  justify-self: end;
  padding-inline: 22px;
}

.feedback-result-button {
  min-height: 56px;
  padding-inline: 26px;
  box-shadow: 0 5px 14px rgb(22 72 50 / 18%);
  font-size: 15px;
}

.rule-list {
  display: grid;
  gap: 9px;
  margin-top: 14px;
}

.rule-card {
  padding: 12px 14px;
  border-left: 3px solid #85a990;
  border-radius: 4px 10px 10px 4px;
  background: rgb(255 255 255 / 78%);
}

.rule-card strong {
  display: block;
  margin-bottom: 5px;
  font-size: 12px;
}

.rule-quote,
.rule-principle {
  margin: 0;
  color: #58665d;
  font-size: 12px;
  line-height: 1.65;
}

.rule-principle {
  margin-top: 5px;
  color: #34443a;
}

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

.primary-button,
.secondary-button,
.reflection-button {
  min-height: 46px;
  padding: 11px 17px;
  border: 0;
  border-radius: 12px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
  transition: background 150ms ease, transform 150ms ease;
}

.primary-button {
  background: var(--green);
  color: white;
}

.primary-button:hover {
  transform: translateY(-1px);
  background: var(--green-dark);
}

.secondary-button {
  border: 1px solid var(--line);
  background: white;
  color: #394a40;
}

.secondary-button:hover {
  background: #f2f5f0;
}

.score-note {
  margin: 13px 0 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.6;
}

.report-card {
  overflow: hidden;
}

.report-intro {
  max-width: 590px;
  margin: 14px 0 0;
  color: #53635a;
  font-size: 14px;
  line-height: 1.7;
}

.final-score-card {
  display: grid;
  gap: 5px;
  max-width: 440px;
  margin: 22px auto 10px;
  padding: 18px 20px;
  border: 1px solid #d6e6da;
  border-radius: 16px;
  background: #f4f8f3;
}

.final-score-heading {
  margin-bottom: 5px;
}

.final-score-heading strong {
  font-size: 25px;
}

.final-score-card .score-meter-track {
  height: 12px;
}

.radar-wrap {
  display: grid;
  max-width: 440px;
  margin: 12px auto 0;
  place-items: center;
}

.radar-chart {
  display: block;
  width: 100%;
  overflow: visible;
}

.radar-grid {
  fill: none;
  stroke: #e4e9e2;
  stroke-width: 1;
}

.radar-axis {
  stroke: #d7ded6;
  stroke-width: 1;
}

.radar-area {
  fill: rgb(36 107 80 / 20%);
  stroke: var(--green);
  stroke-width: 2.5;
  stroke-linejoin: round;
}

.radar-point {
  fill: var(--green-dark);
  stroke: white;
  stroke-width: 2;
}

.radar-label {
  fill: #34443a;
  font-family: inherit;
  font-size: 12px;
  font-weight: 700;
}

.reflection-title {
  margin: 24px 0 10px;
  font-size: 14px;
}

.reflection-list {
  display: grid;
  gap: 8px;
}

.reflection-button {
  width: 100%;
  border: 1px solid var(--line);
  background: white;
  text-align: left;
  font-weight: 500;
  line-height: 1.55;
}

.reflection-button[aria-pressed="true"] {
  border-color: #77a389;
  background: var(--green-light);
}

.reflection-response {
  min-height: 20px;
  margin: 10px 0 0;
  color: var(--green-dark);
  font-size: 12px;
}

.loading-card,
.error-card {
  display: grid;
  min-height: 230px;
  place-content: center;
  justify-items: center;
  padding: 30px;
  color: var(--muted);
  text-align: center;
}

.loading-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 7px var(--green-light);
  animation: pulse 900ms ease-in-out infinite alternate;
}

.loading-card p {
  margin: 22px 0 0;
}

.error-card h1 {
  font-size: 24px;
}

.error-card p {
  max-width: 460px;
  line-height: 1.7;
}

.site-footer {
  padding: 0 0 25px;
  text-align: center;
}

.site-footer p {
  margin: 0;
  line-height: 1.6;
}

@keyframes pulse {
  to {
    box-shadow: 0 0 0 12px rgb(230 241 233 / 25%);
  }
}

@keyframes thinking {
  from {
    opacity: 0.35;
    transform: translateY(0);
  }

  to {
    opacity: 1;
    transform: translateY(-3px);
  }
}

@keyframes runner-bounce {
  from {
    transform: translateY(2px) rotate(-3deg);
  }

  to {
    transform: translateY(-2px) rotate(3deg);
  }
}

@keyframes runner-stride {
  from {
    transform: rotate(-32deg);
  }

  to {
    transform: rotate(32deg);
  }
}

.scenario-select {
  margin: 8px 0 22px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.section-heading {
  margin: 0 0 13px;
}

.section-heading h1 {
  font-size: clamp(23px, 4vw, 29px);
  letter-spacing: -0.04em;
}

.play-all-button {
  display: inline-flex;
  min-height: 36px;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  border: 1px solid #dce5dc;
  border-radius: 10px;
  background: #fff;
  color: var(--green-dark);
  cursor: pointer;
  font-size: 11px;
  font-weight: 700;
}

.play-all-button:hover {
  border-color: #a7c1aa;
  background: #f5f9f4;
}

.play-all-button:focus-visible {
  outline: 3px solid #92b9a0;
  outline-offset: 2px;
}

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

.scenario-accordion[open] {
  grid-column: 1 / -1;
}

.scenario-summary {
  min-height: 105px;
  gap: 13px;
  padding: 11px;
}

.mission-art {
  display: grid;
  width: 104px;
  height: 82px;
  flex: 0 0 104px;
  overflow: hidden;
  place-items: center;
  border-radius: 12px;
  background: linear-gradient(145deg, #e5f1e4, #d2e5d5);
}

.mission-art svg {
  display: block;
  width: 100%;
  height: 100%;
}

.mission-art-S2 {
  background: linear-gradient(145deg, #eceaf7, #dcdcf0);
}

.mission-art-S3 {
  background: linear-gradient(145deg, #f8ece0, #f0d8bf);
}

.mission-art-S4 {
  background: linear-gradient(145deg, #e3edf6, #cfdfed);
}

.mission-main {
  gap: 7px;
}

.mission-title {
  font-size: 12px;
}

.mission-meta {
  font-size: 10px;
}

.mission-details-grid {
  display: block;
}

.mission-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: -3px;
}

.mission-tags span {
  padding: 5px 8px;
  border-radius: 999px;
  background: #edf4ed;
  color: #4e6855;
  font-size: 9px;
  font-weight: 600;
}

.scenario-details {
  padding: 0 14px 14px;
}

.scenario-details-description {
  margin: 11px 0 10px;
  font-size: 11px;
  line-height: 1.55;
}

.mission-play-button {
  min-height: 36px;
  margin-top: 11px;
  font-size: 10px;
}

.progress-dashboard {
  display: grid;
  grid-template-columns: 118px minmax(0, 1.1fr) minmax(0, 0.9fr);
  align-items: stretch;
  gap: 10px;
  margin: 0 0 22px;
  padding: 12px;
  border-color: #e5eae3;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 8px 24px rgb(29 54 39 / 4%);
}

.xp-card,
.skill-progress,
.relationship-progress {
  min-width: 0;
  padding: 12px;
  border: 1px solid #edf0eb;
  border-radius: 12px;
}

.xp-card {
  display: flex;
  align-items: center;
  gap: 9px;
  background: #f3f8ef;
}

.xp-icon {
  width: 32px;
  height: 32px;
  flex-basis: 32px;
}

.dashboard-icon {
  display: inline-grid;
  flex: 0 0 auto;
  place-items: center;
}

.dashboard-icon svg {
  display: block;
  width: 19px;
  height: 19px;
}

.xp-card strong {
  color: var(--green-dark);
  font-size: 20px;
  line-height: 1;
}

.xp-card strong small {
  font-size: 10px;
}

.skill-progress,
.relationship-progress {
  display: grid;
  align-content: center;
  gap: 9px;
  background: #fff;
}

.skill-row {
  display: grid;
  gap: 5px;
}

.skill-row + .skill-row,
.rapport-row + .rapport-row {
  margin-top: 0;
}

.skill-row-label {
  min-height: 20px;
  margin: 0;
  gap: 7px;
  font-size: 10px;
}

.skill-row-label > span:nth-child(2) {
  min-width: 0;
  flex: 1;
}

.skill-row-label strong {
  font-size: 10px;
}

.skill-icon {
  width: 20px;
  height: 20px;
  border-radius: 7px;
  background: #eaf2ec;
  color: #447858;
}

.skill-icon-judgment {
  background: #edf0f8;
  color: #6475a4;
}

.skill-icon-tone {
  background: #f8eee4;
  color: #ad744a;
}

.skill-icon svg {
  width: 14px;
  height: 14px;
}

.dashboard-meter {
  height: 5px;
}

.rapport-row {
  gap: 8px;
}

.relation-icon {
  width: 28px;
  height: 28px;
  border-radius: 9px;
}

.relation-icon svg {
  width: 16px;
  height: 16px;
}

.rapport-content .skill-row-label {
  margin-bottom: 5px;
}

.dashboard-lower-grid,
.dashboard-heading,
.dashboard-footnote,
.xp-caption,
.level-row,
.local-save-note {
  display: none;
}

@media (max-width: 560px) {
  .site-header,
  .site-footer {
    width: min(100% - 28px, 980px);
  }

  .site-header {
    min-height: 64px;
  }

  .header-note {
    font-size: 11px;
    max-width: 110px;
    text-align: right;
  }

  .brand {
    flex-shrink: 0;
    white-space: nowrap;
  }

  .page-shell {
    width: min(100% - 20px, 760px);
    margin-top: 8px;
  }

  .hero-card,
  .scenario-intro-card,
  .game-card {
    border-radius: 18px;
  }

  .scenario-intro-art {
    min-height: 270px;
  }

  .intro-duration {
    top: 18px;
    left: 18px;
  }

  .intro-character {
    width: 78%;
    height: 245px;
  }

  .intro-character .character-avatar {
    width: min(100%, 225px);
  }

  .scenario-intro-content {
    padding: 25px 22px;
  }

  .hero-bottom {
    align-items: flex-start;
    flex-direction: column;
    gap: 13px;
  }

  .hero-bottom .primary-button {
    width: 100%;
  }

  .scenario-preview {
    grid-template-columns: 1fr;
  }

  .scenario-accordion[open] {
    grid-column: auto;
  }

  .progress-dashboard {
    grid-template-columns: 96px minmax(0, 1fr);
    gap: 8px;
    padding: 9px;
  }

  .xp-card {
    gap: 6px;
    padding: 8px;
  }

  .xp-icon {
    width: 27px;
    height: 27px;
    flex-basis: 27px;
  }

  .xp-card strong {
    font-size: 17px;
  }

  .skill-progress {
    gap: 6px;
    padding: 9px;
  }

  .skill-row-label {
    font-size: 9px;
  }

  .relationship-progress {
    grid-column: 1 / -1;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    padding: 9px;
  }

  .rapport-row {
    gap: 6px;
  }

  .rapport-content .skill-row-label {
    font-size: 9px;
  }

  .mission-art {
    width: 76px;
    height: 68px;
    flex-basis: 76px;
  }

  .scenario-summary {
    min-height: 88px;
    gap: 9px;
    padding: 9px;
  }

  .mission-progress {
    width: 34px;
    flex-basis: 34px;
  }

  .mission-title {
    font-size: 11px;
  }

  .mission-meta {
    font-size: 9px;
  }

  .score-meter {
    margin-bottom: 18px;
  }

  .radar-wrap {
    width: calc(100% + 8px);
    margin-inline: -4px;
  }

  .conversation-turn {
    gap: 11px;
  }

  .character-avatar {
    width: 60px;
    height: 60px;
    flex-basis: 60px;
  }

  .conversation-feedback {
    gap: 14px;
    padding: 18px;
    border-radius: 18px;
  }

  .character-response-card,
  .coaching-feedback-card {
    padding: 15px;
    border-radius: 15px;
  }

  .character-response-card .response-turn {
    gap: 10px;
  }

  .character-response-card .character-avatar.is-compact {
    width: 44px;
    height: 44px;
    flex-basis: 44px;
  }

  .character-response-card .response-dialogue p {
    font-size: 14px;
  }

  .feedback-next-button {
    width: 100%;
    justify-self: stretch;
  }

  .feedback-result-button {
    min-height: 56px;
  }

  .response-turn {
    gap: 11px;
  }

  .response-turn .character-avatar.is-compact {
    width: 44px;
    height: 44px;
    flex-basis: 44px;
  }

  .response-dialogue {
    padding: 14px;
  }

  .response-dialogue p {
    font-size: 15px;
    line-height: 1.65;
  }

  .feedback-summary .feedback-title {
    font-size: 17px;
  }

  .explanation-block .feedback-copy {
    font-size: 14px;
    line-height: 1.75;
  }

  .conversation-feedback .rule-card {
    padding: 15px 16px;
  }

  .conversation-feedback .rule-card strong {
    font-size: 14px;
  }

  .conversation-feedback .rule-quote,
  .conversation-feedback .rule-principle {
    font-size: 13px;
  }

}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
