﻿:root {
  --paper: #fffdf6;
  --paper-card: rgba(255, 252, 245, 0.97);
  --paper-line: #d8d0c2;
  --ink: #222222;
  --muted: #6f6a60;
  --accent: #2f5f86;
  --accent-dark: #1f4260;
  --mark: #d64b3a;
  --soft: #f4efe4;
  --shadow: 0 18px 44px rgba(28, 24, 18, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  font-family: "Segoe UI", "Noto Sans KR", "Malgun Gothic", system-ui, sans-serif;
  background-color: #f7f1e6;
  background-image:
    linear-gradient(rgba(247, 241, 230, 0.18), rgba(247, 241, 230, 0.22)),
    url("./background-paper.png");
  background-size: cover;
  background-position: center top;
  background-repeat: no-repeat;
  background-attachment: fixed;
}

button {
  font: inherit;
}

.exam-shell {
  width: min(1120px, 100%);
  min-height: 100vh;
  margin: 0 auto;
  padding: 18px;
  display: grid;
  gap: 16px;
  align-items: start;
}

.exam-card,
.ad-placeholder {
  border: 1px solid var(--paper-line);
  border-radius: 8px;
  background: var(--paper-card);
  box-shadow: var(--shadow);
}

.exam-card {
  position: relative;
  overflow: hidden;
  min-height: 560px;
}

.exam-card::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 34px;
  width: 2px;
  background: rgba(214, 75, 58, 0.22);
}

.screen {
  display: none;
  position: relative;
  padding: 34px 24px 28px 54px;
}

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

.start-screen,
.result-screen,
.review-screen {
  min-height: 560px;
}

.start-screen {
  align-content: center;
}

.stamp {
  width: fit-content;
  margin: 0 0 18px;
  padding: 5px 9px;
  border: 2px solid var(--mark);
  color: var(--mark);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.04em;
  transform: rotate(-3deg);
}

h1,
h2,
p {
  word-break: keep-all;
}

h1 {
  margin: 0;
  font-size: 44px;
  line-height: 1.12;
}

.subtitle {
  margin: 16px 0 10px;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.7;
}

.review-info-card {
  margin: 18px 0 20px;
  padding: 15px 16px;
  border: 1px dashed #ddc889;
  border-radius: 8px;
  background: rgba(255, 247, 218, 0.94);
  color: var(--ink);
}

.review-info-card[hidden] {
  display: none;
}

.review-info-card strong {
  display: block;
  margin-bottom: 7px;
  color: var(--accent-dark);
  font-size: 14px;
}

.review-info-card p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.65;
}

.review-info-card .review-info-small {
  color: var(--accent-dark);
  font-size: 13px;
  font-weight: 800;
}

.review-result-note {
  margin-top: 18px;
  margin-bottom: 0;
}
.start-note {
  width: fit-content;
  margin: 0 0 28px;
  padding: 8px 11px;
  border: 1px dashed var(--paper-line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.86);
  color: var(--accent-dark);
  font-size: 14px;
  font-weight: 800;
}


.start-detail-note {
  max-width: 360px;
  margin: -14px 0 24px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
  font-weight: 700;
}
.primary-action,
.secondary-action,
.option-card {
  border: 1px solid var(--paper-line);
  border-radius: 8px;
  cursor: pointer;
}

.primary-action,
.secondary-action {
  min-height: 46px;
  padding: 0 18px;
  font-weight: 800;
}

.primary-action {
  border-color: var(--accent);
  background: var(--accent);
  color: #ffffff;
}

.primary-action:hover,
.primary-action:focus-visible {
  background: var(--accent-dark);
}

.secondary-action {
  background: rgba(255, 255, 255, 0.94);
  color: var(--accent-dark);
}

.exam-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
}

.sheet-label {
  padding: 4px 8px;
  border: 1px solid var(--paper-line);
  background: rgba(255, 255, 255, 0.94);
}

.progress-track {
  height: 8px;
  margin-bottom: 28px;
  overflow: hidden;
  border: 1px solid var(--paper-line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.94);
}

.progress-bar {
  width: 0;
  height: 100%;
  background: var(--accent);
  transition: width 160ms ease;
}

.question-kicker {
  margin: 0 0 10px;
  color: var(--mark);
  font-size: 14px;
  font-weight: 900;
}

.question-hint {
  margin: 0 0 14px;
  padding: 9px 11px;
  border: 1px dashed var(--paper-line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.82);
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.question-hint.is-late {
  color: var(--accent-dark);
  background: rgba(244, 239, 228, 0.82);
}

.question-hint-text {
  display: block;
}

.question-gauge {
  display: block;
  height: 4px;
  margin-top: 8px;
  overflow: hidden;
  border-radius: 99px;
  background: rgba(47, 95, 134, 0.12);
}

.question-gauge-bar {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: var(--accent);
  opacity: 0.62;
}

.question-hint.is-late .question-gauge-bar {
  opacity: 0.82;
}

.question-screen h2 {
  margin: 0 0 22px;
  font-size: 26px;
  line-height: 1.35;
}

.options-grid {
  display: grid;
  gap: 10px;
}

.option-card {
  width: 100%;
  min-height: 74px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.94);
  color: var(--ink);
  text-align: left;
  line-height: 1.55;
  box-shadow: 0 4px 0 rgba(47, 95, 134, 0.12);
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.option-card:focus {
  outline: none;
}

.option-card:focus-visible {
  border-color: var(--accent);
  outline: 2px solid rgba(214, 75, 58, 0.28);
  outline-offset: 2px;
}

.option-card:active {
  border-color: var(--accent);
  background: #f8fbfd;
  transform: translateY(0);
}

@media (hover: hover) and (pointer: fine) {
  .option-card:hover {
    border-color: var(--accent);
    background: #f8fbfd;
    transform: translateY(-1px);
  }
}

.result-label {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 900;
}

.result-scope-label {
  width: fit-content;
  margin: 0 0 8px;
  padding: 5px 9px;
  border: 1px solid var(--paper-line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.9);
  color: var(--accent-dark);
  font-size: 13px;
  font-weight: 900;
}

.result-scope-description {
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
  font-weight: 700;
}
.result-screen h2 {
  margin: 0 0 14px;
  font-size: 34px;
  line-height: 1.2;
}

.result-badges,
.result-grid {
  display: grid;
  gap: 10px;
  margin: 18px 0;
}

.result-chip,
.result-panel {
  padding: 15px;
  border: 1px dashed var(--paper-line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.86);
}

.result-chip span,
.result-panel span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.result-chip strong {
  display: block;
  margin-top: 5px;
  color: var(--accent-dark);
  font-size: 18px;
}

.result-chip p,
.result-panel p {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.65;
}

.result-panel p {
  font-size: 14px;
}

.type-description,
.sub-result p,
.combo-note,
.notice {
  color: var(--muted);
  line-height: 1.75;
}

.review-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 18px 0;
}

.review-summary span {
  padding: 7px 10px;
  border: 1px dashed var(--paper-line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.9);
  color: var(--accent-dark);
  font-size: 13px;
  font-weight: 800;
}

.review-actions {
  margin-bottom: 22px;
}

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

.review-question {
  padding: 16px;
  border: 1px dashed var(--paper-line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.9);
}

.review-question h3 {
  margin: 0;
  font-size: 17px;
  line-height: 1.45;
}

.review-question-meta {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.review-answer-list {
  display: grid;
  gap: 8px;
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
}

.review-answer {
  padding: 10px;
  border: 1px solid rgba(216, 208, 194, 0.9);
  border-radius: 8px;
  background: rgba(255, 252, 245, 0.9);
}

.review-answer.is-patched {
  border-color: rgba(214, 75, 58, 0.46);
  background: rgba(255, 247, 240, 0.96);
}

.review-answer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.review-answer-header strong {
  color: var(--accent-dark);
  font-size: 13px;
}

.review-badge {
  flex: 0 0 auto;
  padding: 3px 7px;
  border-radius: 999px;
  background: rgba(214, 75, 58, 0.12);
  color: var(--mark);
  font-size: 11px;
  font-weight: 900;
}

.review-answer-text {
  margin: 7px 0 0;
  line-height: 1.55;
}

.review-score {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.sub-result {
  margin: 24px 0;
  padding: 18px;
  border: 1px dashed var(--paper-line);
  border-radius: 8px;
  background: rgba(244, 239, 228, 0.94);
}

.sub-result span {
  display: block;
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

.sub-result strong {
  display: block;
  margin-top: 5px;
  font-size: 22px;
}

.secondary-note {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(216, 208, 194, 0.9);
  color: var(--accent-dark);
  font-weight: 800;
}

.fixed-guide {
  margin: 18px 0 0;
  padding: 14px 15px;
  border-left: 4px solid var(--mark);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.94);
  color: var(--ink);
  line-height: 1.7;
  font-weight: 800;
}

.combo-note {
  margin: 0 0 16px;
  font-weight: 700;
}

.shared-heading {
  margin: 0 0 18px;
  font-size: 30px;
  line-height: 1.25;
}

.shared-main-result {
  margin: 18px 0;
  padding: 18px;
  border: 1px dashed var(--paper-line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.9);
}

.shared-main-result span {
  display: block;
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

.shared-scope-label {
  display: inline-block;
  margin-top: 9px;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(47, 95, 134, 0.1);
  color: var(--accent-dark);
  font-size: 12px;
  font-style: normal;
  font-weight: 900;
}
.shared-main-result strong {
  display: block;
  margin-top: 6px;
  color: var(--accent-dark);
  font-size: 24px;
  line-height: 1.3;
}

.shared-main-result p {
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.7;
}

.shared-invite {
  margin: 16px 0 0;
  padding: 12px 14px;
  border-left: 4px solid var(--accent);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--accent-dark);
  font-weight: 800;
}

.notice {
  margin: 18px 0 0;
  padding-top: 14px;
  border-top: 1px solid var(--paper-line);
  font-size: 13px;
}

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

.result-actions .primary-action,
.result-actions .secondary-action {
  flex: 1 1 150px;
}

.review-consent {
  margin: 24px 0 0;
  padding: 18px;
  border: 1px dashed var(--paper-line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.94);
}

.review-consent-title {
  margin: 0 0 8px;
  color: var(--accent-dark);
  font-weight: 900;
  line-height: 1.55;
}

.review-consent-copy,
.review-privacy-note {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
}

.review-check,
.review-field {
  display: grid;
  gap: 8px;
  margin-top: 14px;
  color: var(--ink);
  font-weight: 800;
}

.review-check {
  grid-template-columns: auto 1fr;
  align-items: start;
}

.review-check input {
  margin-top: 4px;
}

.review-field span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

.review-field select,
.review-field textarea {
  width: 100%;
  border: 1px solid var(--paper-line);
  border-radius: 8px;
  background: rgba(255, 252, 245, 0.96);
  color: var(--ink);
  font: inherit;
}

.review-field select {
  min-height: 42px;
  padding: 0 10px;
}

.review-field textarea {
  min-height: 96px;
  padding: 10px;
  resize: vertical;
}

.review-consent .secondary-action {
  width: 100%;
  margin-top: 14px;
}

.review-consent .secondary-action:disabled {
  cursor: not-allowed;
  opacity: 0.52;
}
.precision-note {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
  font-weight: 700;
}

.precision-note[hidden],
.precision-action[hidden] {
  display: none;
}
.copy-feedback {
  min-height: 24px;
  margin: 10px 0 0;
  color: var(--accent-dark);
  font-size: 14px;
  font-weight: 800;
}

.ad-placeholder {
  display: none;
}



@media (min-width: 880px) {
  .exam-shell {
    grid-template-columns: minmax(0, 680px);
    justify-content: center;
    padding: 42px 22px;
  }

  .exam-card {
    min-height: 640px;
  }

  .screen {
    padding: 46px 42px 38px 72px;
  }

  .start-screen,
.result-screen,
.review-screen {
    min-height: 640px;
  }

  h1 {
    font-size: 58px;
  }

  .question-screen h2 {
    font-size: 30px;
  }

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

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

@media (max-width: 768px) {
  body {
    background-attachment: scroll;
    background-size: cover;
    background-position: center top;
  }
}