@font-face {
  font-family: "Galmuri11";
  src: url("/battle/assets/Galmuri11.woff2") format("woff2");
  font-display: swap;
}

@font-face {
  font-family: "Galmuri14";
  src: url("/battle/assets/Galmuri14.woff2") format("woff2");
  font-display: swap;
}

:root {
  color-scheme: light;
  --coineasy-orange: #ff6b17;
  --coineasy-cream: #fff8f0;
  --coineasy-blush: #ffedf2;
  --coineasy-sky: #e9f7ff;
  --primary: #fb5100;
  --on-primary: #32190f;
  --secondary: #fff2e9;
  --surface: #fff8f0;
  --surface-raised: #ffffff;
  --ink: #2d211b;
  --muted: #6e625c;
  --line: #2d211b;
  --success: #18764a;
  --danger: #b5362f;
  --card: #32190f;
  --on-card: #ffffff;
  --card-muted: #f2d9cc;
  --hero-ink: #2d211b;
  --hero-muted: #65554c;
  --hero-accent: #b93800;
  --accent-text: #9f3300;
  --card-accent: #fb7d40;
  --hero-gradient: linear-gradient(130deg, #ffffff 0 58%, #fff2e9 100%);
  --decor-gradient: linear-gradient(145deg, #fb5100, #ffac7f);
  --card-gradient: linear-gradient(135deg, #32190f, #5a2a15);
  --shadow: 7px 7px 0 var(--line);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  margin: 0;
  background:
    radial-gradient(circle at 7% 4%, rgba(255, 237, 242, 0.92) 0 120px, transparent 121px),
    radial-gradient(circle at 96% 28%, rgba(233, 247, 255, 0.78) 0 180px, transparent 181px),
    var(--surface);
  color: var(--ink);
  font-family: Pretendard, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.6;
}

body::before {
  position: fixed;
  z-index: 100;
  top: 0;
  right: 0;
  left: 0;
  height: 5px;
  background: linear-gradient(
    90deg,
    var(--coineasy-orange) 0 28%,
    var(--coineasy-blush) 28% 52%,
    var(--coineasy-sky) 52% 76%,
    #fff3d5 76%
  );
  content: "";
  pointer-events: none;
}

body[data-brand="squid"] {
  --primary: #e6fa36;
  --on-primary: #1a0e2e;
  --secondary: #bc8ee4;
  --surface: #f8f4ff;
  --surface-raised: #ffffff;
  --ink: #1a0e2e;
  --muted: #685d76;
  --line: #1a0e2e;
  --card: #1a0e2e;
  --on-card: #ffffff;
  --card-muted: #dfd5e9;
  --hero-ink: #ffffff;
  --hero-muted: #e5daee;
  --hero-accent: #e6fa36;
  --accent-text: #563178;
  --card-accent: #e6fa36;
  --hero-gradient: linear-gradient(135deg, #1a0e2e 0 56%, #3f225b 100%);
  --decor-gradient: linear-gradient(145deg, #e6fa36, #bc8ee4);
  --card-gradient: linear-gradient(135deg, #1a0e2e, #40235d);
}

body[data-brand="origintrail"] {
  --primary: #6344df;
  --on-primary: #ffffff;
  --secondary: #f0d9ff;
  --surface: #f8f6ff;
  --surface-raised: #ffffff;
  --ink: #0c2246;
  --muted: #54627a;
  --line: #0c2246;
  --card: #0c2246;
  --on-card: #ffffff;
  --card-muted: #d9e1ef;
  --hero-ink: #ffffff;
  --hero-muted: #dce6f6;
  --hero-accent: #ded5ff;
  --accent-text: #5234c0;
  --card-accent: #ded5ff;
  --hero-gradient: linear-gradient(132deg, #0c2246 0 57%, #6344df 100%);
  --decor-gradient: linear-gradient(145deg, #cfc3ff, #ffb7d5);
  --card-gradient: linear-gradient(135deg, #0c2246, #3d3183);
}

body[data-brand="babylon"] {
  --primary: #ce6533;
  --on-primary: #071820;
  --secondary: #f5dfd4;
  --surface: #fff8f3;
  --surface-raised: #ffffff;
  --ink: #12495e;
  --muted: #526d77;
  --line: #12495e;
  --card: #12495e;
  --on-card: #ffffff;
  --card-muted: #d9e5e8;
  --hero-ink: #ffffff;
  --hero-muted: #e9f0f2;
  --hero-accent: #ffd0b9;
  --accent-text: #943b18;
  --card-accent: #ffd0b9;
  --hero-gradient: linear-gradient(132deg, #12495e 0 54%, #ce6533 100%);
  --decor-gradient: linear-gradient(145deg, #ce6533, #f1c5aa);
  --card-gradient: linear-gradient(135deg, #12495e, #276a7e);
}

body[data-brand="yellow"] {
  --primary: #fdda16;
  --on-primary: #222525;
  --secondary: #ff866e;
  --surface: #fffaf0;
  --surface-raised: #ffffff;
  --ink: #222525;
  --muted: #5f6260;
  --line: #222525;
  --card: #222525;
  --on-card: #ffffff;
  --card-muted: #e0e5e1;
  --hero-ink: #222525;
  --hero-muted: #4e5450;
  --hero-accent: #222525;
  --accent-text: #665600;
  --card-accent: #fdda16;
  --hero-gradient: linear-gradient(132deg, #ff866e 0, #fff0d8 74%);
  --decor-gradient: linear-gradient(145deg, #fdda16, #fff0d8);
  --card-gradient: linear-gradient(135deg, #222525, #3b4540);
}

button,
a {
  font: inherit;
}

button {
  color: inherit;
}

img {
  max-width: 100%;
}

[hidden] {
  display: none !important;
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: 8px;
  left: 8px;
  transform: translateY(-160%);
  border: 3px solid var(--line);
  background: var(--surface-raised);
  color: var(--ink);
  padding: 9px 12px;
  font-weight: 800;
}

.skip-link:focus {
  transform: translateY(0);
}

:where(a, button, input, summary):focus-visible {
  outline: 4px solid #146cff;
  outline-offset: 3px;
}

.page {
  width: min(920px, 100%);
  margin: 0 auto;
  padding: 18px 22px 64px;
}

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

.identity {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
}

.identity img {
  width: 42px;
  height: 42px;
  border: 2px solid var(--line);
  border-radius: 50%;
  background: #ffffff;
  object-fit: contain;
}

.identity strong,
.identity small {
  display: block;
}

.identity strong {
  font-family: "Galmuri14", monospace;
  font-size: 0.92rem;
  line-height: 1.25;
}

.identity small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.25;
}

.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(230px, 0.65fr);
  min-height: 390px;
  margin-top: 22px;
  overflow: hidden;
  border: 4px solid var(--line);
  border-radius: 22px 22px 7px 22px;
  background: var(--hero-gradient);
  box-shadow: var(--shadow);
  color: var(--hero-ink);
}

.hero::after {
  position: absolute;
  z-index: 4;
  right: 0;
  bottom: 0;
  left: 0;
  height: 7px;
  background: repeating-linear-gradient(
    90deg,
    var(--coineasy-orange) 0 12px,
    #fff2e9 12px 24px,
    #e9f7ff 24px 36px,
    #fff3d5 36px 48px
  );
  content: "";
  opacity: 0.82;
  pointer-events: none;
}

.hero-copy {
  position: relative;
  z-index: 2;
  align-self: center;
  padding: 42px 38px;
}

.eyebrow,
.question-kicker,
.result-brand-label {
  font-family: "Galmuri11", monospace;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.eyebrow {
  color: var(--hero-accent);
}

.hero-kicker-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 9px 12px;
}

.hero h1 {
  max-width: 590px;
  margin: 15px 0 14px;
  font-family: "Galmuri14", monospace;
  font-size: clamp(2rem, 5vw, 3.3rem);
  line-height: 1.22;
  letter-spacing: -0.035em;
}

.hero h1 em {
  color: var(--hero-accent);
  font-style: normal;
}

.lead {
  max-width: 620px;
  margin: 0;
  color: var(--hero-muted);
  font-size: 1.02rem;
}

.partner-context {
  margin: 13px 0 0;
  color: var(--hero-muted);
  font-size: 0.9rem;
  font-weight: 750;
}

.trust-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 22px 0 0;
  padding: 0;
  list-style: none;
}

.trust-list li {
  border: 2px solid currentColor;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.88);
  color: var(--ink);
  padding: 5px 10px;
  font-size: 0.8rem;
  font-weight: 800;
}

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

.hero-visual {
  position: relative;
  display: grid;
  min-height: 310px;
  place-items: end center;
  overflow: hidden;
  isolation: isolate;
}

.hero-visual::before {
  position: absolute;
  z-index: -1;
  width: 310px;
  height: 310px;
  border: 4px solid var(--line);
  border-radius: 46% 54% 40% 60%;
  background: var(--decor-gradient);
  content: "";
  transform: rotate(-7deg) translate(26px, 24px);
}

.hero-character {
  width: min(310px, 100%);
  max-height: 340px;
  background: transparent;
  object-fit: contain;
  image-rendering: pixelated;
  filter: drop-shadow(8px 10px 0 rgb(0 0 0 / 18%));
}

.brand-chip {
  position: absolute;
  right: 16px;
  bottom: 17px;
  border: 3px solid var(--line);
  border-radius: 5px;
  background: var(--primary);
  color: var(--on-primary);
  padding: 7px 10px;
  font-family: "Galmuri11", monospace;
  font-size: 0.72rem;
  font-weight: 800;
  transform: rotate(-2deg);
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  border: 3px solid var(--line);
  border-radius: 8px 8px 3px 8px;
  padding: 10px 17px;
  font-family: "Galmuri11", monospace;
  font-size: 0.84rem;
  font-weight: 800;
  line-height: 1.35;
  text-decoration: none;
  box-shadow: 4px 4px 0 var(--line);
  cursor: pointer;
}

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

.button-secondary {
  background: var(--surface-raised);
  color: var(--ink);
}

.button-quiet {
  border-color: transparent;
  background: transparent;
  box-shadow: none;
  color: var(--muted);
}

.button:disabled {
  border-color: #898989;
  background: #dedbd8;
  box-shadow: none;
  color: #585858;
  cursor: not-allowed;
}

.button:not(:disabled):active {
  transform: translate(3px, 3px);
  box-shadow: 1px 1px 0 var(--line);
}

.quiz-region {
  scroll-margin-top: 14px;
}

.progress-card {
  position: sticky;
  z-index: 20;
  top: 8px;
  margin: 28px 0 18px;
  border: 3px solid var(--line);
  border-radius: 10px 10px 3px 10px;
  background: rgba(255, 255, 255, 0.94);
  padding: 12px 15px;
  box-shadow: 4px 4px 0 var(--line);
  backdrop-filter: blur(12px);
}

.progress-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.82rem;
  font-weight: 800;
}

.progress-shell {
  height: 11px;
  margin-top: 9px;
  overflow: hidden;
  border: 2px solid var(--line);
  border-radius: 2px;
  background: var(--secondary);
}

.progress-shell i {
  display: block;
  width: 0;
  height: 100%;
  background: repeating-linear-gradient(
    90deg,
    var(--primary) 0 22px,
    var(--secondary) 22px 44px
  );
  transition: width 220ms ease;
}

.quiz-shell {
  border: 4px solid var(--line);
  border-radius: 7px 20px 20px 20px;
  background: var(--surface-raised);
  padding: 28px;
  box-shadow: var(--shadow);
}

.quiz-intro {
  margin-bottom: 21px;
}

.quiz-intro h2 {
  margin: 0;
  font-family: "Galmuri14", monospace;
  font-size: 1.25rem;
}

.quiz-intro p {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.question {
  min-inline-size: 0;
  margin: 0;
  border: 0;
  padding: 0;
}

.question legend {
  width: 100%;
  padding: 0;
  font-size: 1.16rem;
  font-weight: 850;
  line-height: 1.55;
}

.question legend:focus,
.explanation:focus,
.review-question legend:focus,
.review-explanation:focus,
#resultType:focus,
#reviewCompleteTitle:focus,
#reviewTitle:focus {
  outline: 4px solid #146cff;
  outline-offset: 4px;
  border-radius: 4px;
}

.question-kicker {
  display: block;
  margin-bottom: 8px;
  color: var(--accent-text);
}

.option-list {
  display: grid;
  gap: 10px;
  margin-top: 20px;
}

.option {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 11px;
  min-height: 51px;
  border: 2px solid #a9a29e;
  border-radius: 9px 9px 2px 9px;
  background: #ffffff;
  padding: 11px 13px;
  color: var(--ink);
  font-size: 1rem;
  line-height: 1.5;
  cursor: pointer;
  transition: border-color 120ms ease, background 120ms ease, transform 120ms ease;
}

.option:hover:not(.is-locked) {
  border-color: var(--line);
  transform: translateY(-1px);
}

.option input {
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
  margin: 2px 0 0;
  accent-color: var(--primary);
}

.option.is-selected {
  border-color: var(--line);
  background: var(--secondary);
  box-shadow: 3px 3px 0 var(--line);
}

.option.is-answer {
  border-color: var(--success);
  background: #e9f9f0;
}

.option.is-chosen-wrong {
  border-color: var(--danger);
  background: #fff0ee;
}

.option.is-locked {
  cursor: default;
}

.explanation {
  margin: 18px 0 0;
  border-top: 2px dashed rgba(0, 0, 0, 0.28);
  padding: 14px 0 0;
  color: var(--muted);
  font-size: 0.93rem;
}

.answer-state {
  display: block;
  margin-bottom: 5px;
  color: var(--ink);
  font-weight: 850;
}

.answer-state.correct {
  color: var(--success);
}

.answer-state.wrong {
  color: var(--danger);
}

.quiz-nav {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 12px;
  margin-top: 24px;
  border-top: 2px solid rgba(0, 0, 0, 0.16);
  padding-top: 20px;
}

.quiz-status {
  min-height: 1.5em;
  margin: 0;
  color: var(--muted);
  font-size: 0.84rem;
  text-align: center;
}

.result-panel {
  scroll-margin-top: 108px;
}

.result-card {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px;
  gap: 18px;
  overflow: hidden;
  border: 4px solid var(--line);
  border-radius: 20px 7px 20px 20px;
  background: var(--card-gradient);
  box-shadow: var(--shadow);
  color: var(--on-card);
}

.result-copy {
  position: relative;
  z-index: 2;
  padding: 29px 29px 25px;
}

.result-brand-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.result-brand-label {
  color: var(--card-accent);
}

.result-score {
  display: inline-block;
  margin-top: 25px;
  color: var(--card-accent);
  font-family: "Galmuri14", monospace;
  font-size: 1.8rem;
}

.result-card h2 {
  margin: 9px 0 7px;
  font-family: "Galmuri14", monospace;
  font-size: clamp(1.5rem, 4vw, 2.15rem);
  line-height: 1.35;
}

.result-line,
.result-level {
  color: var(--card-muted);
}

.result-line {
  margin: 0;
  font-size: 0.95rem;
}

.result-level {
  margin: 6px 0 0;
  font-size: 0.86rem;
}

.result-visual {
  position: relative;
  align-self: end;
  min-height: 255px;
}

.result-visual::before {
  position: absolute;
  right: -44px;
  bottom: -54px;
  width: 270px;
  height: 270px;
  border-radius: 50%;
  background: var(--decor-gradient);
  content: "";
  opacity: 0.85;
}

.result-character {
  position: absolute;
  z-index: 1;
  right: -5px;
  bottom: -5px;
  width: 235px;
  height: 235px;
  background: transparent;
  object-fit: contain;
  image-rendering: pixelated;
  filter: drop-shadow(7px 9px 0 rgb(0 0 0 / 20%));
}

.area-bars {
  display: grid;
  grid-column: 1 / -1;
  gap: 10px;
  border-top: 2px solid rgba(255, 255, 255, 0.2);
  padding: 20px 29px 27px;
}

.area-row {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr) 42px;
  align-items: center;
  gap: 11px;
}

.area-row b {
  font-size: 0.82rem;
}

.area-meter {
  height: 15px;
  overflow: hidden;
  border: 2px solid rgba(255, 255, 255, 0.72);
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.18);
}

.area-meter i {
  display: block;
  height: 100%;
  background: var(--primary);
}

.area-meter i.best {
  background: #60dd9c;
}

.area-meter i.worst {
  background: #ff7c70;
}

.area-row small {
  color: var(--card-muted);
  font-family: "Galmuri11", monospace;
  font-size: 0.72rem;
  text-align: right;
}

.personal-review {
  position: relative;
  overflow: hidden;
  margin-top: 20px;
  border: 3px solid var(--line);
  border-radius: 6px 20px 20px 20px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.72), rgba(255, 255, 255, 0.14)),
    var(--decor-gradient);
  padding: 24px;
  box-shadow: 6px 6px 0 var(--line);
}

.personal-review::after {
  position: absolute;
  z-index: 0;
  top: -38px;
  right: -26px;
  width: 145px;
  height: 145px;
  border: 18px solid rgba(255, 255, 255, 0.34);
  border-radius: 50%;
  content: "";
  pointer-events: none;
}

.personal-review > div {
  position: relative;
  z-index: 1;
}

.skill-passport-head {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

.passport-kicker {
  display: block;
  margin-bottom: 7px;
  font-family: "Galmuri11", monospace;
  font-size: 0.72rem;
  font-weight: 850;
  letter-spacing: 0.06em;
}

.skill-passport-head h3 {
  margin-bottom: 5px;
}

.skill-passport-head p {
  margin: 0;
  color: var(--ink);
  font-size: 0.86rem;
}

.passport-progress {
  flex: 0 0 auto;
  border: 2px solid var(--line);
  border-radius: 999px;
  background: var(--surface-raised);
  padding: 6px 10px;
  font-family: "Galmuri11", monospace;
  font-size: 0.72rem;
  font-weight: 850;
  white-space: nowrap;
}

.passport-stages {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
  margin: 17px 0 0;
  padding: 0;
  list-style: none;
}

.passport-stages li {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 2px solid rgba(0, 0, 0, 0.32);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.58);
  padding: 10px 12px;
}

.passport-stages li > span {
  display: grid;
  flex: 0 0 auto;
  width: 29px;
  height: 29px;
  border: 2px solid var(--line);
  border-radius: 50%;
  background: var(--surface-raised);
  font-family: "Galmuri11", monospace;
  font-size: 0.72rem;
  place-items: center;
}

.passport-stages li.is-complete > span {
  background: var(--primary);
  color: var(--on-primary);
}

.passport-stages li.is-current {
  background: var(--surface-raised);
}

.passport-stages b,
.passport-stages small {
  display: block;
}

.passport-stages b {
  font-size: 0.86rem;
}

.passport-stages small {
  margin-top: 1px;
  color: var(--muted);
  font-size: 0.76rem;
}

.passport-mission,
.passport-note {
  position: relative;
  z-index: 1;
}

.passport-mission {
  margin: 13px 0 0;
  border-left: 5px solid var(--primary);
  background: var(--surface-raised);
  padding: 9px 11px;
  color: var(--ink);
  font-size: 0.86rem;
  font-weight: 800;
}

.passport-note {
  margin: 8px 0 0;
  color: var(--ink);
  font-size: 0.76rem;
}

.challenge-reminder {
  margin-top: 14px;
  border-top: 2px dashed rgba(0, 0, 0, 0.25);
  padding-top: 14px;
}

.challenge-reminder-kicker {
  margin: 0 0 7px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 2px solid var(--line);
  border-radius: 999px;
  background: var(--surface-raised);
  padding: 4px 10px;
  font-family: "Galmuri11", monospace;
  font-size: 0.72rem;
  line-height: 1.2;
}

.challenge-reminder-copy {
  margin: 0;
  color: var(--ink);
  font-size: 0.9rem;
  line-height: 1.58;
}

.challenge-reminder-actions {
  margin-top: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.challenge-reminder-actions .button {
  min-width: min(100%, 255px);
}

.challenge-invite-context {
  margin: 16px 0 4px;
  border: 2px solid var(--line);
  border-radius: 16px;
  background: var(--surface-raised);
  padding: 12px 14px;
  box-shadow: 4px 4px 0 var(--line);
}

.challenge-invite-kicker {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  background: var(--primary);
  color: var(--on-primary);
  padding: 4px 9px;
  font-family: "Galmuri11", monospace;
  font-size: 0.7rem;
  line-height: 1.2;
}

.challenge-invite-context p {
  margin: 8px 0 0;
  color: var(--ink);
  font-size: 0.88rem;
  line-height: 1.55;
}

.personal-review-intro,
.personal-review-quiz,
.personal-review-complete {
  margin-top: 18px;
  border-top: 2px dashed rgba(0, 0, 0, 0.25);
  padding-top: 18px;
}

.personal-review [hidden] {
  display: none !important;
}

.flow-label {
  display: inline-block;
  margin-bottom: 10px;
  border: 2px solid var(--line);
  border-radius: 999px;
  background: var(--surface-raised);
  padding: 5px 9px;
  font-family: "Galmuri11", monospace;
  font-size: 0.75rem;
  line-height: 1.2;
}

.personal-review h3 {
  max-width: 700px;
  margin: 0 0 9px;
  font-family: "Galmuri14", monospace;
  font-size: clamp(1.12rem, 2.7vw, 1.55rem);
  line-height: 1.45;
}

.personal-review-intro > p,
.personal-review-complete > p {
  max-width: 690px;
  margin: 0;
  color: var(--ink);
  font-size: 0.94rem;
  line-height: 1.65;
}

.review-meta {
  margin-top: 9px !important;
  color: var(--ink) !important;
  font-size: 0.82rem !important;
  font-weight: 750;
}

.personal-review-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 18px;
}

.personal-review-actions .button {
  min-width: min(100%, 255px);
}

.review-privacy {
  margin-top: 11px !important;
  color: var(--ink) !important;
  font-size: 0.8rem !important;
}

.review-progress-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  font-family: "Galmuri11", monospace;
  font-size: 0.75rem;
}

.review-progress {
  height: 16px;
  overflow: hidden;
  margin-top: 9px;
  border: 2px solid var(--line);
  background: var(--surface-raised);
}

.review-progress i {
  display: block;
  width: 0;
  height: 100%;
  background: repeating-linear-gradient(90deg, var(--primary) 0 22px, var(--secondary) 22px 44px);
  transition: width 180ms ease;
}

.review-instruction {
  margin: 14px 0 18px;
  color: var(--muted);
  font-size: 0.86rem;
}

.review-question {
  margin: 0;
  border: 3px solid var(--line);
  border-radius: 13px 5px 13px 13px;
  background: var(--surface-raised);
  padding: 19px;
}

.review-question legend {
  width: 100%;
  padding: 0;
  font-size: 1.05rem;
  font-weight: 850;
  line-height: 1.55;
}

.review-explanation {
  display: grid;
  gap: 7px;
  margin-top: 14px;
  border-top: 2px dashed rgba(0, 0, 0, 0.25);
  padding-top: 13px;
  color: var(--muted);
  font-size: 0.87rem;
  line-height: 1.6;
}

.review-explanation:focus {
  border-radius: 4px;
}

.review-explanation .answer-state {
  color: var(--ink);
  font-size: 0.95rem;
}

.review-original-answer {
  text-decoration: line-through;
  text-decoration-thickness: 1px;
}

.review-correct-answer {
  color: var(--ink);
  font-weight: 800;
}

.review-easy-copy {
  border-left: 5px solid var(--primary);
  background: var(--secondary);
  padding: 9px 11px;
  color: var(--ink);
}

.review-nav {
  display: grid;
  grid-template-columns: auto minmax(110px, 1fr) auto;
  align-items: center;
  gap: 11px;
  margin-top: 15px;
}

.review-nav p {
  margin: 0;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.45;
  text-align: center;
}

.result-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 20px;
}

.next-box,
.review-box,
.community-cta,
.share-box {
  border: 3px solid var(--line);
  background: var(--surface-raised);
  padding: 20px;
}

.next-box {
  border-radius: 6px 16px 16px 16px;
  background: var(--secondary);
}

.next-box h3,
.review-box h3,
.community-cta h3 {
  margin: 0 0 9px;
  font-family: "Galmuri14", monospace;
  font-size: 1rem;
  line-height: 1.5;
}

.next-box ol {
  margin: 0;
  padding-left: 21px;
  color: var(--muted);
  font-size: 0.9rem;
}

.share-box {
  border-radius: 16px 16px 5px 16px;
}

.result-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
}

.result-actions .button:first-child {
  grid-column: 1 / -1;
}

.review-box {
  margin-top: 16px;
  border-radius: 16px 5px 16px 16px;
}

.review-summary {
  margin: -2px 0 13px;
  color: var(--muted);
  font-size: 0.9rem;
}

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

.review-item {
  border: 2px solid rgba(0, 0, 0, 0.28);
  border-radius: 7px;
  background: var(--surface);
  padding: 0 13px;
}

.review-item summary {
  padding: 12px 0;
  font-weight: 800;
  line-height: 1.45;
  cursor: pointer;
}

.review-item p {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 0.88rem;
}

.review-item .review-answer {
  color: var(--ink);
  font-weight: 750;
}

.community-cta {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 18px;
  margin-top: 16px;
  border-radius: 5px 18px 18px 18px;
  background: var(--decor-gradient);
}

.community-cta p {
  max-width: 590px;
  margin: 0;
  color: var(--ink);
  font-size: 0.9rem;
}

.community-cta .button {
  background: var(--surface-raised);
  color: var(--ink);
  white-space: nowrap;
}

.secondary-actions {
  margin-top: 15px;
  text-align: center;
}

.privacy {
  margin: 24px auto 0;
  max-width: 720px;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.75;
  text-align: center;
}

.privacy strong {
  color: var(--ink);
}

.site-footer {
  margin-top: 35px;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.8;
  text-align: center;
}

.site-footer a {
  color: inherit;
}

.footer-signature {
  display: inline-flex;
  align-items: center;
  margin-top: 8px;
  vertical-align: middle;
}

.footer-signature img {
  width: 88px;
  height: 15px;
  object-fit: contain;
}

.toast {
  position: fixed;
  z-index: 80;
  bottom: max(22px, env(safe-area-inset-bottom));
  left: 50%;
  max-width: calc(100vw - 32px);
  transform: translate(-50%, 28px);
  opacity: 0;
  border: 2px solid #ffffff;
  border-radius: 999px;
  background: var(--ink);
  color: #ffffff;
  padding: 9px 14px;
  font-size: 0.9rem;
  font-weight: 750;
  text-align: center;
  transition: 180ms ease;
  pointer-events: none;
}

.toast.show {
  transform: translate(-50%, 0);
  opacity: 1;
}

.noscript {
  width: min(680px, calc(100% - 32px));
  margin: 40px auto;
  border: 3px solid #2d211b;
  background: #ffffff;
  padding: 18px;
  text-align: center;
}

.dialog-open {
  overflow: hidden;
}

.save-overlay {
  position: fixed;
  z-index: 90;
  inset: 0;
  display: grid;
  place-items: center;
  overflow-y: auto;
  background: rgba(18, 14, 24, 0.92);
  padding: max(18px, env(safe-area-inset-top)) 18px max(18px, env(safe-area-inset-bottom));
}

.save-overlay[hidden] {
  display: none !important;
}

.save-dialog {
  width: min(560px, 100%);
  max-height: calc(100vh - 36px);
  overflow-y: auto;
  border: 3px solid #ffffff;
  border-radius: 18px 6px 18px 18px;
  background: var(--surface-raised);
  color: var(--ink);
  padding: 20px;
  box-shadow: 8px 8px 0 var(--primary);
}

.save-dialog h2 {
  margin: 0 0 14px;
  font-family: "Galmuri14", monospace;
  font-size: 1.14rem;
}

.save-image {
  display: block;
  width: auto;
  max-width: 100%;
  max-height: min(64vh, 680px);
  margin: 0 auto;
  border: 2px solid var(--line);
  border-radius: 5px;
  background: var(--card);
  object-fit: contain;
  -webkit-touch-callout: default;
}

.save-dialog p {
  margin: 13px 0;
  color: var(--muted);
  font-size: 0.9rem;
  text-align: center;
}

.save-dialog-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
}

.save-dialog-actions .button {
  width: 100%;
}

@supports (color: color-mix(in srgb, #000000 50%, #ffffff)) {
  body {
    background:
      radial-gradient(circle at 7% 4%, color-mix(in srgb, var(--primary) 14%, transparent) 0 120px, transparent 121px),
      radial-gradient(circle at 96% 28%, color-mix(in srgb, var(--secondary) 78%, transparent) 0 180px, transparent 181px),
      var(--surface);
  }

  :where(a, button, input, summary):focus-visible,
  .question legend:focus,
  .explanation:focus,
  .review-question legend:focus,
  .review-explanation:focus,
  #resultType:focus,
  #reviewCompleteTitle:focus,
  #reviewTitle:focus {
    outline-color: color-mix(in srgb, var(--primary) 72%, #146cff);
  }

  .trust-list li {
    background: color-mix(in srgb, var(--surface-raised) 88%, transparent);
  }

  .progress-card {
    background: color-mix(in srgb, var(--surface-raised) 94%, transparent);
  }

  .progress-shell {
    background: color-mix(in srgb, var(--secondary) 48%, #eeeeee);
  }

  .progress-shell i {
    background: repeating-linear-gradient(
      90deg,
      var(--primary) 0 22px,
      color-mix(in srgb, var(--primary) 68%, var(--secondary)) 22px 44px
    );
  }

  .option {
    border-color: color-mix(in srgb, var(--line) 55%, #ffffff);
  }

  .option.is-selected {
    background: color-mix(in srgb, var(--primary) 22%, #ffffff);
  }

  .explanation {
    border-top-color: color-mix(in srgb, var(--line) 35%, transparent);
  }

  .quiz-nav {
    border-top-color: color-mix(in srgb, var(--line) 18%, transparent);
  }

  .area-bars {
    border-top-color: color-mix(in srgb, var(--on-card) 20%, transparent);
  }

  .area-meter {
    border-color: color-mix(in srgb, var(--on-card) 72%, transparent);
    background: color-mix(in srgb, var(--card) 72%, #ffffff);
  }

  .next-box {
    background: color-mix(in srgb, var(--primary) 14%, var(--surface-raised));
  }

  .review-item {
    border-color: color-mix(in srgb, var(--line) 35%, transparent);
  }

  .community-cta p {
    color: color-mix(in srgb, var(--ink) 86%, transparent);
  }
}

@media (max-width: 740px) {
  .page {
    padding: 14px 14px 52px;
  }

  .identity small {
    display: none;
  }

  .hero {
    grid-template-columns: 1fr;
    min-height: 0;
    box-shadow: 5px 5px 0 var(--line);
  }

  .hero-copy {
    padding: 29px 21px 24px;
  }

  .hero h1 {
    font-size: clamp(1.85rem, 9.8vw, 2.65rem);
  }

  .hero-visual {
    min-height: 190px;
  }

  .hero-visual::before {
    width: 230px;
    height: 230px;
    transform: rotate(-7deg) translate(25px, 58px);
  }

  .hero-character {
    width: 220px;
    max-height: 220px;
  }

  .brand-chip {
    right: 13px;
    bottom: 13px;
  }

  .progress-card {
    top: 5px;
    margin-top: 20px;
  }

  .quiz-shell {
    padding: 20px 16px;
    box-shadow: 5px 5px 0 var(--line);
  }

  .question legend {
    font-size: 1.06rem;
  }

  .quiz-nav {
    grid-template-columns: 1fr 1fr;
  }

  .quiz-status {
    grid-column: 1 / -1;
    grid-row: 1;
  }

  .quiz-nav .button {
    width: 100%;
  }

  .result-card {
    grid-template-columns: 1fr 125px;
    box-shadow: 5px 5px 0 var(--line);
  }

  .result-copy {
    padding: 22px 18px 18px;
  }

  .result-score {
    margin-top: 18px;
    font-size: 1.45rem;
  }

  .result-card h2 {
    font-size: 1.38rem;
  }

  .result-visual {
    min-height: 220px;
  }

  .result-visual::before {
    right: -90px;
    width: 220px;
    height: 220px;
  }

  .result-character {
    right: -22px;
    width: 170px;
    height: 185px;
  }

  .area-bars {
    padding: 17px 18px 21px;
  }

  .area-row {
    grid-template-columns: 76px minmax(0, 1fr) 37px;
    gap: 8px;
  }

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

  .personal-review {
    padding: 20px 17px;
    box-shadow: 5px 5px 0 var(--line);
  }

  .skill-passport-head {
    display: grid;
    gap: 11px;
  }

  .passport-progress {
    justify-self: start;
  }

  .personal-review-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .personal-review-actions .button {
    width: 100%;
    min-width: 0;
  }

  .challenge-reminder-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .challenge-reminder-actions .button {
    width: 100%;
    min-width: 0;
  }

  .review-question {
    padding: 17px 14px;
  }

  .review-nav {
    grid-template-columns: 1fr 1fr;
  }

  .review-nav p {
    grid-column: 1 / -1;
    grid-row: 1;
  }

  .review-nav .button {
    width: 100%;
  }

  .community-cta {
    grid-template-columns: 1fr;
  }

  .community-cta .button {
    width: 100%;
    white-space: normal;
  }
}

@media (max-width: 430px) {
  .site-header {
    gap: 8px;
  }

  .hero h1 {
    letter-spacing: -0.055em;
  }

  .lead {
    font-size: 0.95rem;
  }

  .trust-list {
    gap: 6px;
  }

  .trust-list li {
    font-size: 0.74rem;
  }

  .hero-actions .button {
    width: 100%;
  }

  .option {
    padding: 10px 11px;
    font-size: 0.95rem;
  }

  .result-card {
    grid-template-columns: 1fr 110px;
  }

  .result-brand-row {
    display: block;
  }

  .passport-stages {
    grid-template-columns: 1fr;
  }

  .result-character {
    right: -22px;
    width: 150px;
  }

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

  .result-actions .button:first-child {
    grid-column: auto;
  }

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

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}
