:root {
  color-scheme: light;
  --ink: #172026;
  --muted: #62717d;
  --line: #d9e0e5;
  --paper: #f7f9fa;
  --panel: #ffffff;
  --accent: #0b6e69;
  --accent-strong: #084f4c;
  --warm: #c95935;
  --blue: #2467a7;
  --shadow: 0 18px 50px rgba(23, 32, 38, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family:
    Inter, "Pretendard", "Noto Sans KR", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background:
    linear-gradient(135deg, rgba(11, 110, 105, 0.12), transparent 34%),
    linear-gradient(315deg, rgba(201, 89, 53, 0.12), transparent 32%),
    var(--paper);
}

button {
  border: 0;
  font: inherit;
  cursor: pointer;
}

.side-ad {
  position: fixed;
  top: 132px;
  z-index: 1;
  width: 160px;
  min-height: 600px;
}

.side-ad--left {
  left: max(18px, calc((100vw - 1120px) / 2 - 190px));
}

.side-ad--right {
  right: max(18px, calc((100vw - 1120px) / 2 - 190px));
}

.kakao_ad_area {
  max-width: 100%;
}

.app {
  position: relative;
  z-index: 2;
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 36px 0;
}

.intro {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px;
  align-items: end;
  padding: 28px 0 24px;
}

.intro__copy {
  max-width: 720px;
}

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

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  max-width: 760px;
  margin-bottom: 14px;
  font-size: clamp(2rem, 4vw, 4.8rem);
  line-height: 1.02;
  letter-spacing: 0;
}

.intro p:not(.eyebrow) {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.7;
}

.mode-switch {
  display: flex;
  gap: 8px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
}

.mode-button {
  min-width: 112px;
  min-height: 44px;
  border-radius: 6px;
  color: var(--muted);
  background: transparent;
  font-weight: 800;
}

.mode-button.active {
  color: #fff;
  background: var(--accent);
}

.quiz,
.result {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow);
}

.quiz {
  padding: 24px;
}

.quiz__status,
.controls,
.result__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.quiz__status {
  color: var(--muted);
  font-size: 0.94rem;
  font-weight: 800;
}

.progress {
  height: 8px;
  margin: 16px 0 28px;
  overflow: hidden;
  border-radius: 999px;
  background: #e8edf0;
}

.progress span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), var(--blue));
  transition: width 180ms ease;
}

.question-panel {
  display: grid;
  gap: 18px;
}

.mode-notice {
  margin: 0;
  padding: 12px 14px;
  border: 1px solid rgba(36, 103, 167, 0.28);
  border-radius: 8px;
  color: #2f587d;
  background: rgba(36, 103, 167, 0.08);
  font-size: 0.94rem;
  font-weight: 800;
  line-height: 1.5;
}

h2 {
  margin-bottom: 2px;
  font-size: clamp(1.5rem, 3vw, 2.35rem);
  line-height: 1.18;
  letter-spacing: 0;
}

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

.option {
  min-height: 104px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: var(--panel);
  text-align: left;
  transition:
    transform 160ms ease,
    border-color 160ms ease,
    box-shadow 160ms ease;
}

.option:hover,
.option:focus-visible {
  transform: translateY(-2px);
  border-color: rgba(11, 110, 105, 0.45);
  box-shadow: 0 10px 24px rgba(23, 32, 38, 0.1);
  outline: none;
}

.option.selected {
  border-color: var(--accent);
  background: #eef9f7;
  box-shadow: 0 10px 24px rgba(11, 110, 105, 0.12);
}

.option strong {
  display: block;
  margin-bottom: 7px;
  font-size: 1.03rem;
}

.option span {
  display: block;
  color: var(--muted);
  font-size: 0.94rem;
  line-height: 1.5;
}

.option-note {
  display: inline-flex;
  margin-top: 12px;
  padding: 5px 8px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-style: normal;
  font-weight: 900;
}

.option-note.recommended {
  color: var(--accent-strong);
  background: rgba(11, 110, 105, 0.1);
}

.option-note.caution {
  color: #8a5a00;
  background: #fff4d6;
}

.option-note.warning {
  color: var(--warm);
  background: #fff0e8;
}

.number-answer {
  grid-column: 1 / -1;
  display: grid;
  gap: 14px;
  max-width: 560px;
}

.number-answer label {
  display: grid;
  gap: 10px;
  color: var(--muted);
  font-size: 0.96rem;
  line-height: 1.5;
}

.number-answer__field {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.number-answer input {
  width: 100%;
  min-height: 56px;
  padding: 0 16px;
  border: 0;
  color: var(--ink);
  font: inherit;
  font-size: 1.15rem;
  font-weight: 900;
  outline: none;
}

.number-answer__field em {
  padding-right: 16px;
  color: var(--muted);
  font-style: normal;
  font-weight: 900;
}

.multi-next {
  grid-column: 1 / -1;
  justify-self: end;
  min-height: 44px;
  padding: 0 18px;
  border: 0;
  border-radius: 6px;
  color: #fff;
  background: var(--accent);
  font-weight: 900;
}

.multi-next:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.controls {
  margin-top: 24px;
}

.secondary {
  min-height: 42px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--ink);
  background: #fff;
  font-weight: 800;
}

.secondary:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.result {
  margin-top: 24px;
  padding: 24px;
}

.hidden {
  display: none;
}

.result__meta {
  color: var(--muted);
  font-weight: 800;
}

.result-warning {
  margin-top: 16px;
  padding: 16px 18px;
  border: 1px solid rgba(204, 82, 38, 0.35);
  border-radius: 8px;
  background: #fff7f2;
}

.result-warning strong {
  display: block;
  margin-bottom: 6px;
  color: var(--warm);
}

.result-warning p {
  margin: 0;
  color: var(--ink);
  line-height: 1.55;
}

.result-warning--soft {
  border-color: rgba(36, 103, 167, 0.28);
  background: rgba(36, 103, 167, 0.08);
}

.result-warning--soft strong {
  color: var(--blue);
}

.result-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.9fr);
  gap: 20px;
  margin-top: 20px;
}

.car-card {
  min-height: 280px;
  padding: 24px;
  border-radius: 8px;
  color: #fff;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.14), transparent 45%),
    linear-gradient(150deg, #132026, #0b6e69);
  overflow: hidden;
  position: relative;
}

.car-card::after {
  content: "";
  position: absolute;
  right: -56px;
  bottom: -34px;
  width: 270px;
  height: 118px;
  border: 4px solid rgba(255, 255, 255, 0.22);
  border-radius: 70px 92px 28px 28px;
}

.car-card__media {
  position: relative;
  z-index: 1;
  margin: 0 0 20px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  aspect-ratio: 16 / 10;
}

.car-card__media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.car-card__media figcaption {
  position: absolute;
  left: 12px;
  bottom: 10px;
  max-width: calc(100% - 24px);
  padding: 5px 8px;
  border-radius: 6px;
  color: #fff;
  background: rgba(10, 22, 26, 0.72);
  font-size: 0.78rem;
  font-weight: 800;
}

.car-card h3 {
  position: relative;
  z-index: 1;
  margin: 0 0 12px;
  font-size: clamp(1.8rem, 4vw, 3.2rem);
  line-height: 1.02;
  letter-spacing: 0;
}

.car-card p {
  position: relative;
  z-index: 1;
  max-width: 560px;
  margin-bottom: 0;
  color: rgba(255, 255, 255, 0.84);
  font-size: 1rem;
  line-height: 1.7;
}

.details {
  display: grid;
  gap: 12px;
}

.detail {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.detail.warning {
  border-color: rgba(204, 82, 38, 0.35);
  background: #fff7f2;
}

.detail.warning b {
  color: var(--warm);
}

.detail b {
  display: block;
  margin-bottom: 6px;
}

.detail p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.alternatives {
  margin-top: 22px;
}

.alternatives h4 {
  margin: 0 0 12px;
  font-size: 1.08rem;
}

.market-note {
  margin: -4px 0 12px;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.5;
}

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

.alternative {
  min-height: 148px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.alternative span {
  display: inline-flex;
  margin-bottom: 10px;
  padding: 5px 8px;
  border-radius: 999px;
  color: var(--accent-strong);
  background: rgba(11, 110, 105, 0.1);
  font-size: 0.78rem;
  font-weight: 900;
}

.alternative b {
  display: block;
  margin-bottom: 5px;
}

.alternative small {
  display: block;
  margin-bottom: 8px;
  color: var(--warm);
  font-size: 0.86rem;
  font-weight: 900;
}

.alternative em {
  display: block;
  margin-bottom: 8px;
  color: var(--accent);
  font-size: 0.84rem;
  font-style: normal;
  font-weight: 800;
}

.alternative p {
  margin: 0;
  color: var(--muted);
  font-size: 0.93rem;
  line-height: 1.5;
}

.alternative .inspection-note {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
  color: #3d5561;
  font-size: 0.86rem;
}

.alternative .fuel-note {
  margin-top: 8px;
  color: #5a6e77;
  font-size: 0.86rem;
}

.answer-summary {
  margin-top: 22px;
}

.answer-summary h4 {
  margin: 0 0 12px;
  font-size: 1.08rem;
}

.answer-summary ul {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.answer-summary li {
  min-height: 74px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.answer-summary span {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.answer-summary b {
  display: block;
  color: var(--ink);
  font-size: 0.96rem;
  line-height: 1.35;
}

.feedback-panel {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.4fr);
  gap: 18px;
  margin-top: 22px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.feedback-panel h4 {
  margin: 0 0 8px;
  font-size: 1.08rem;
}

.feedback-panel p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.feedback-form fieldset {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  border: 0;
}

.feedback-form fieldset:disabled {
  opacity: 0.62;
}

.feedback-form legend,
.feedback-field span {
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 900;
}

.rating-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.rating-options label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 36px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--paper);
  font-weight: 900;
}

.feedback-field {
  display: grid;
  gap: 6px;
}

.feedback-field textarea,
.feedback-field input,
.feedback-field select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 12px;
  color: var(--ink);
  background: #fff;
  font: inherit;
  line-height: 1.5;
}

.feedback-field textarea:focus,
.feedback-field input:focus,
.feedback-field select:focus {
  border-color: var(--accent);
  outline: none;
  box-shadow: 0 0 0 3px rgba(11, 110, 105, 0.12);
}

.feedback-status {
  margin-top: 10px;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.45;
}

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

.result-actions button,
.primary,
.secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 6px;
  font-weight: 900;
  transition:
    transform 160ms ease,
    border-color 160ms ease,
    background 160ms ease,
    box-shadow 160ms ease;
}

.result-actions button:hover,
.primary:hover,
.secondary:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(23, 32, 38, 0.08);
}

.primary {
  min-height: 44px;
  padding: 0 18px;
  border-radius: 6px;
  color: #fff;
  background: var(--warm);
  font-weight: 900;
}

.result-actions .secondary,
.result-actions button:not(.primary) {
  border: 1px solid rgba(11, 110, 105, 0.26);
  color: var(--accent-strong);
  background: #f5fbfa;
}

.result-actions .secondary:hover,
.result-actions button:not(.primary):hover {
  border-color: rgba(11, 110, 105, 0.48);
  background: #eef8f6;
}

@media (max-width: 760px) {
  .app {
    width: min(100% - 24px, 640px);
    padding: 18px 0;
  }

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

  .mode-switch,
  .options,
  .alternative-list,
  .answer-summary ul,
  .feedback-panel {
    grid-template-columns: 1fr;
    width: 100%;
  }

  .mode-switch {
    display: grid;
  }

  .quiz,
  .result {
    padding: 18px;
  }

  .options {
    gap: 10px;
  }
}

@media (max-width: 1500px) {
  .side-ad {
    display: none;
  }
}
