:root {
  --match-paper: #DFF5FB;
  --match-panel: #FFFFFF;
  --match-ink: #152F36;
  --match-muted: #62747A;
  --match-orange: #FF7A1A;
  --match-orange-dark: #C64D00;
  --match-sky: #58C9E7;
  --match-yellow: #FFD447;
  --match-green: #58C875;
  --match-red: #E9574F;
  --match-soft: #FFF0C5;
  --match-ring: rgba(21,47,54,0.32);
  --match-radius-sm: 12px;
  --match-radius-md: 20px;
  --match-radius-lg: 28px;
  --match-space-1: 4px;
  --match-space-2: 8px;
  --match-space-3: 12px;
  --match-space-4: 16px;
  --match-space-5: 20px;
  --match-space-6: 24px;
  --match-space-8: 32px;
  --match-space-10: 40px;
  --match-space-12: 48px;
  --match-shell: 1120px;
  --match-motion: 180ms;
  --match-ease: cubic-bezier(0.2,0.8,0.2,1);
  --match-shadow: 0 7px 0 var(--match-ink);
}

* { box-sizing: border-box; }
html { min-width: 320px; background: var(--match-paper); }
body {
  margin: 0;
  color: var(--match-ink);
  background: var(--match-paper);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans KR", sans-serif;
  overflow-x: hidden;
}
button, input, select { font: inherit; }
button { color: inherit; }
button, input { -webkit-tap-highlight-color: transparent; }
button:focus-visible, input:focus-visible, select:focus-visible {
  outline: 3px solid var(--match-ring);
  outline-offset: 3px;
}
button:disabled { cursor: default; opacity: .52; }
[hidden] { display: none !important; }
a { color: inherit; }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

.match-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--match-space-4);
  min-height: 72px;
  padding: var(--match-space-3) max(var(--match-space-4), env(safe-area-inset-right)) var(--match-space-3) max(var(--match-space-4), env(safe-area-inset-left));
  border-bottom: 3px solid var(--match-ink);
  background: var(--match-panel);
}
.match-wordmark {
  display: inline-flex;
  align-items: center;
  gap: var(--match-space-3);
  min-width: 0;
  padding: var(--match-space-1);
  border: 0;
  background: transparent;
  cursor: pointer;
  text-align: left;
}
.match-wordmark-mark {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 48px;
  height: 42px;
  border: 3px solid var(--match-ink);
  border-radius: var(--match-radius-sm) var(--match-radius-md) var(--match-radius-sm) var(--match-radius-md);
  background: var(--match-orange);
  color: var(--match-panel);
  font-size: .8rem;
  font-weight: 950;
  letter-spacing: .04em;
  transform: rotate(-4deg);
}
.match-wordmark > span:last-child { display: grid; gap: var(--match-space-1); min-width: 0; }
.match-wordmark strong { font-size: 1.05rem; line-height: 1.1; white-space: nowrap; }
.match-wordmark small { color: var(--match-muted); font-size: .73rem; font-weight: 800; }
.match-top-status { display: flex; align-items: center; gap: var(--match-space-4); min-width: 0; color: var(--match-muted); font-size: .78rem; font-weight: 800; }
.match-top-status > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.match-top-back, .match-exit, .match-secondary-button {
  min-height: 44px;
  padding: 0 var(--match-space-4);
  border: 3px solid var(--match-ink);
  border-radius: var(--match-radius-sm);
  background: var(--match-panel);
  font-weight: 900;
  cursor: pointer;
}
.match-top-back:hover, .match-exit:hover, .match-secondary-button:hover { background: var(--match-yellow); }

.match-ad-layout {
  display: grid;
  grid-template-columns: minmax(0, var(--match-shell));
  justify-content: center;
  gap: var(--match-space-3);
  width: 100%;
  padding: var(--match-space-6) var(--match-space-3) var(--match-space-10);
}
main { min-width: 0; }
.match-side-ad { display: none; min-height: 600px; border: 1px solid var(--match-muted); color: var(--match-muted); font-size: .72rem; text-align: center; }
.match-side-ad > span { display: grid; min-height: 600px; place-items: center; }
.match-bottom-ad { display: block; max-width: var(--match-shell); min-height: 120px; margin: 0 auto var(--match-space-8); border: 1px solid var(--match-muted); color: var(--match-muted); font-size: .72rem; text-align: center; }
.match-bottom-ad > span { display: grid; min-height: 120px; place-items: center; }
body[data-screen="play"] .match-bottom-ad { display: none; }

.match-screen { min-height: calc(100svh - 136px); }
.match-intro {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(280px, .85fr);
  gap: var(--match-space-8);
  align-items: end;
  padding: var(--match-space-8) 0 var(--match-space-10);
  border-bottom: 3px solid var(--match-ink);
}
.match-intro-copy { min-width: 0; }
.match-eyebrow { margin: 0 0 var(--match-space-3); color: var(--match-orange-dark); font-size: .82rem; font-weight: 950; }
.match-intro h1 { max-width: 700px; margin: 0; font-size: clamp(2.7rem, 7vw, 5.4rem); font-weight: 950; line-height: .96; letter-spacing: -.04em; }
.match-intro h1 em { color: var(--match-orange-dark); font-style: normal; }
.match-intro-copy > p:last-child { max-width: 560px; margin: var(--match-space-5) 0 0; color: var(--match-muted); font-size: 1rem; font-weight: 650; line-height: 1.65; }
.match-intro-tools { display: grid; gap: var(--match-space-4); min-width: 0; }
.match-global-search { display: grid; gap: var(--match-space-2); }
.match-global-search > label { font-size: .82rem; font-weight: 950; }
.match-search-control { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--match-space-2); }
.match-search-control input { min-width: 0; min-height: 56px; padding: 0 var(--match-space-4); border: 3px solid var(--match-ink); border-radius: var(--match-radius-sm); background: var(--match-panel); color: var(--match-ink); font-weight: 750; }
.match-search-control button, .match-primary-button { min-height: 56px; padding: 0 var(--match-space-5); border: 3px solid var(--match-ink); border-radius: var(--match-radius-sm); background: var(--match-orange); color: var(--match-panel); box-shadow: 0 5px 0 var(--match-ink); font-weight: 950; cursor: pointer; }
.match-search-control button:hover, .match-primary-button:hover { background: var(--match-orange-dark); }
.match-search-control button:active, .match-primary-button:active { transform: translateY(3px); box-shadow: 0 2px 0 var(--match-ink); }
.match-rule-strip { display: flex; flex-wrap: wrap; gap: var(--match-space-2); }
.match-rule-strip span, .match-mode-badge { padding: var(--match-space-2) var(--match-space-3); border: 2px solid var(--match-ink); border-radius: 999px; background: var(--match-soft); font-size: .72rem; font-weight: 900; }

.match-explorer { display: grid; grid-template-columns: minmax(190px, .72fr) minmax(230px, .9fr) minmax(0, 1.38fr); gap: var(--match-space-4); padding: var(--match-space-8) 0 var(--match-space-6); }
.match-explorer-column { min-width: 0; border: 3px solid var(--match-ink); border-radius: var(--match-radius-md); background: var(--match-panel); box-shadow: var(--match-shadow); }
.match-explorer-column--genre { background: var(--match-yellow); }
.match-explorer-column--collection { background: var(--match-sky); }
.match-explorer-column--detail { background: var(--match-panel); }
.match-column-heading { display: flex; align-items: flex-start; gap: var(--match-space-3); min-height: 92px; padding: var(--match-space-4); border-bottom: 3px solid var(--match-ink); }
.match-step { display: grid; place-items: center; flex: 0 0 auto; width: 36px; height: 36px; border: 2px solid var(--match-ink); border-radius: 50%; background: var(--match-panel); font-size: .73rem; font-weight: 950; }
.match-column-heading h2 { margin: 0; font-size: 1.08rem; font-weight: 950; line-height: 1.2; }
.match-column-heading p { margin: var(--match-space-1) 0 0; color: var(--match-muted); font-size: .78rem; font-weight: 750; line-height: 1.4; }
.match-explorer-column--genre .match-column-heading p, .match-explorer-column--collection .match-column-heading p { color: var(--match-ink); opacity: .72; }
.match-genre-list, .match-collection-list, .match-detail-list { min-width: 0; padding: var(--match-space-2); }
.match-genre-button, .match-collection-button { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--match-space-3); align-items: center; width: 100%; padding: var(--match-space-3); border: 2px solid transparent; border-radius: var(--match-radius-sm); background: transparent; cursor: pointer; text-align: left; }
.match-genre-button:hover, .match-collection-button:hover { border-color: var(--match-ink); background: var(--match-panel); }
.match-genre-button.is-selected, .match-collection-button.is-selected { border-color: var(--match-ink); background: var(--match-panel); box-shadow: 0 3px 0 var(--match-ink); }
.match-genre-button strong, .match-collection-button strong { min-width: 0; overflow-wrap: anywhere; font-size: .92rem; font-weight: 950; line-height: 1.25; }
.match-genre-button small, .match-collection-button small { color: var(--match-muted); font-size: .7rem; font-weight: 900; white-space: nowrap; }
.match-collection-button { padding: var(--match-space-4) var(--match-space-3); border-bottom-color: var(--match-muted); border-radius: 0; }
.match-collection-button:last-child { border-bottom-color: transparent; }
.match-collection-button strong { font-size: 1rem; }
.match-collection-button small { align-self: start; padding-top: var(--match-space-1); }
.match-loading, .match-empty { padding: var(--match-space-8) var(--match-space-4); color: var(--match-muted); font-size: .86rem; font-weight: 800; line-height: 1.55; text-align: center; }
.match-detail-list { display: grid; gap: var(--match-space-3); }
.match-detail-card { min-width: 0; overflow: hidden; border: 3px solid var(--match-ink); border-radius: var(--match-radius-sm); background: var(--match-panel); }
.match-detail-card:hover { box-shadow: 0 4px 0 var(--match-ink); }
.match-detail-media { height: 128px; overflow: hidden; border-bottom: 2px solid var(--match-ink); background: var(--match-soft); }
.match-detail-media--collage { display: grid; grid-template-columns: repeat(2, 1fr); grid-template-rows: repeat(2, 1fr); }
.match-detail-media img { display: block; width: 100%; height: 100%; object-fit: cover; }
.match-detail-copy { display: grid; gap: var(--match-space-2); min-width: 0; padding: var(--match-space-4); }
.match-detail-copy > strong { overflow-wrap: anywhere; font-size: 1.05rem; font-weight: 950; line-height: 1.25; }
.match-detail-copy > p { margin: 0; color: var(--match-muted); font-size: .82rem; font-weight: 650; line-height: 1.45; }
.match-detail-meta { display: flex; flex-wrap: wrap; gap: var(--match-space-2); align-items: center; }
.match-detail-meta span { color: var(--match-orange-dark); font-size: .73rem; font-weight: 950; }
.match-detail-action { display: flex; align-items: center; justify-content: space-between; gap: var(--match-space-3); width: 100%; min-height: 48px; padding: 0 var(--match-space-3); border: 2px solid var(--match-ink); border-radius: var(--match-radius-sm); background: var(--match-orange); color: var(--match-panel); font-weight: 950; cursor: pointer; }
.match-detail-action:hover { background: var(--match-orange-dark); }
.match-detail-action::after { content: "→"; font-size: 1.2rem; }
.match-cover-credit { color: var(--match-muted); font-size: .68rem; line-height: 1.4; }
.match-cover-credit:hover { color: var(--match-orange-dark); }
.match-publish-note { display: flex; gap: var(--match-space-4); align-items: flex-start; padding: var(--match-space-5) 0; border-top: 3px solid var(--match-ink); border-bottom: 3px solid var(--match-ink); }
.match-note-mark { flex: 0 0 auto; padding: var(--match-space-2) var(--match-space-3); border: 2px solid var(--match-ink); border-radius: var(--match-radius-sm); background: var(--match-soft); font-size: .75rem; font-weight: 950; }
.match-publish-note strong { font-size: .9rem; font-weight: 950; }
.match-publish-note p { margin: var(--match-space-1) 0 0; color: var(--match-muted); font-size: .8rem; line-height: 1.55; }

.match-play-shell { max-width: 840px; margin: 0 auto; padding-top: var(--match-space-4); }
.match-play-topline { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: var(--match-space-4); align-items: center; }
.match-play-route { display: grid; gap: var(--match-space-1); min-width: 0; text-align: center; }
.match-play-route span { overflow: hidden; color: var(--match-muted); font-size: .75rem; font-weight: 800; text-overflow: ellipsis; white-space: nowrap; }
.match-play-route strong { overflow-wrap: anywhere; font-size: 1.1rem; font-weight: 950; line-height: 1.2; }
.match-score { color: var(--match-orange-dark); font-size: 1.1rem; white-space: nowrap; }
.match-progress { height: 12px; overflow: hidden; margin: var(--match-space-4) 0 var(--match-space-5); border: 2px solid var(--match-ink); border-radius: 999px; background: var(--match-panel); }
.match-progress span { display: block; width: 10%; height: 100%; background: var(--match-orange); transition: width var(--match-motion) var(--match-ease); }
.match-question-card { min-width: 0; padding: clamp(var(--match-space-5), 5vw, var(--match-space-10)); border: 3px solid var(--match-ink); border-radius: var(--match-radius-lg); background: var(--match-panel); box-shadow: var(--match-shadow); text-align: center; }
.match-question-meta { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--match-space-3); align-items: center; margin-bottom: var(--match-space-5); }
.match-question-meta > span:first-child { padding: var(--match-space-2) var(--match-space-3); border-radius: 999px; background: var(--match-yellow); font-size: .82rem; font-weight: 950; }
.match-mode-badge { background: var(--match-soft); }
.match-question-media { max-width: 640px; margin: 0 auto var(--match-space-5); }
.match-question-media img, .match-question-media iframe { display: block; width: 100%; max-height: 340px; border: 0; border-radius: var(--match-radius-md); object-fit: contain; background: var(--match-ink); }
.match-question-media iframe { aspect-ratio: 16 / 9; }
.match-question-media a { display: inline-block; margin-top: var(--match-space-2); color: var(--match-muted); font-size: .72rem; }
.match-question-card h1 { max-width: 700px; margin: 0 auto var(--match-space-5); font-size: clamp(1.45rem, 4vw, 2.35rem); font-weight: 950; line-height: 1.35; overflow-wrap: anywhere; }
.match-answer-hint { min-height: 24px; margin: 0 0 var(--match-space-4); color: var(--match-muted); font-size: .82rem; font-weight: 700; }
.match-answer-area { min-width: 0; }
.match-short-answer { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--match-space-3); }
.match-short-answer input { min-width: 0; min-height: 60px; padding: 0 var(--match-space-4); border: 3px solid var(--match-ink); border-radius: var(--match-radius-sm); background: var(--match-paper); color: var(--match-ink); font-size: 1.05rem; font-weight: 800; }
.match-short-answer button { min-height: 60px; padding: 0 var(--match-space-5); border: 3px solid var(--match-ink); border-radius: var(--match-radius-sm); background: var(--match-orange); color: var(--match-panel); font-weight: 950; cursor: pointer; }
.match-short-answer button:hover { background: var(--match-orange-dark); }
.match-choice-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--match-space-3); }
.match-choice { display: grid; grid-template-columns: 32px minmax(0, 1fr); gap: var(--match-space-2); align-items: center; min-width: 0; min-height: 68px; padding: var(--match-space-3) var(--match-space-4); border: 3px solid var(--match-ink); border-radius: var(--match-radius-sm); background: var(--match-paper); text-align: left; font-size: 1rem; font-weight: 850; cursor: pointer; }
.match-choice:hover { background: var(--match-yellow); }
.match-choice-index { display: grid; place-items: center; width: 30px; height: 30px; border: 2px solid var(--match-ink); border-radius: 50%; background: var(--match-panel); font-size: .83rem; }
.match-choice.is-correct { background: var(--match-green); opacity: 1; }
.match-choice.is-wrong { background: var(--match-red); opacity: 1; }
.match-reveal { margin-top: var(--match-space-5); padding-top: var(--match-space-5); border-top: 3px solid var(--match-ink); text-align: left; }
.match-reveal-heading { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--match-space-3); }
.match-reveal-heading strong { font-size: 1.35rem; font-weight: 950; }
.match-reveal-heading span { color: var(--match-orange-dark); font-size: .9rem; font-weight: 900; }
.match-reveal p { margin: var(--match-space-2) 0 var(--match-space-4); color: var(--match-muted); line-height: 1.6; }
.match-reveal-credit { margin-bottom: var(--match-space-4); font-size: .76rem; }
.match-reveal-credit a { color: var(--match-muted); }
.match-reveal .match-primary-button { min-width: 160px; }
.match-play-note { margin: var(--match-space-5) 0 0; color: var(--match-muted); font-size: .76rem; line-height: 1.55; text-align: center; }

.match-result, .match-error { display: flex; align-items: center; justify-content: center; text-align: center; }
.match-result-card, .match-error-card { width: min(100%, 620px); padding: var(--match-space-10) var(--match-space-6); border: 3px solid var(--match-ink); border-radius: var(--match-radius-lg); background: var(--match-panel); box-shadow: var(--match-shadow); }
.match-result h1, .match-error h1 { margin: 0; font-size: clamp(2.4rem, 8vw, 5rem); font-weight: 950; line-height: 1; }
.match-result-score { display: block; margin: var(--match-space-5) 0 var(--match-space-2); color: var(--match-orange-dark); font-size: clamp(3rem, 11vw, 6rem); font-weight: 950; line-height: 1; }
.match-result-card > span { font-size: 1.1rem; font-weight: 900; }
.match-result-card > p:last-of-type { margin: var(--match-space-4) 0 0; color: var(--match-muted); font-weight: 750; }
.match-result-actions { display: flex; justify-content: center; gap: var(--match-space-3); margin-top: var(--match-space-8); }
.match-result-actions .match-secondary-button { min-height: 56px; }
.match-error-card > p:not(.match-eyebrow) { color: var(--match-muted); line-height: 1.6; }
.match-error-card .match-primary-button { margin-top: var(--match-space-4); }

@media (min-width: 768px) {
  .match-ad-layout { grid-template-columns: minmax(56px, 104px) minmax(0, var(--match-shell)) minmax(56px, 104px); }
  .match-side-ad { display: block; }
  .match-bottom-ad { display: none; }
}
@media (max-width: 1000px) {
  .match-explorer { grid-template-columns: minmax(180px, .8fr) minmax(0, 1fr); }
  .match-explorer-column--detail { grid-column: 1 / -1; }
}
@media (max-width: 900px) {
  .match-intro { grid-template-columns: 1fr; gap: var(--match-space-6); }
  .match-intro-tools { max-width: 640px; }
}
@media (max-width: 767px) {
  .match-topbar { align-items: flex-start; }
  .match-top-status { padding-top: var(--match-space-2); }
  .match-ad-layout { padding: var(--match-space-5) var(--match-space-3) var(--match-space-8); }
  .match-screen { min-height: calc(100svh - 104px); }
  .match-intro { padding: var(--match-space-5) 0 var(--match-space-8); }
  .match-intro h1 { font-size: clamp(2.6rem, 13vw, 4.4rem); }
  .match-explorer { grid-template-columns: 1fr; gap: var(--match-space-4); padding-top: var(--match-space-6); }
  .match-explorer-column--detail { grid-column: auto; }
  .match-genre-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--match-space-1); }
  .match-genre-button { min-height: 56px; padding: var(--match-space-2); }
  .match-genre-button strong { font-size: .83rem; }
  .match-genre-button small { font-size: .64rem; }
  .match-column-heading { min-height: 78px; }
  .match-publish-note { gap: var(--match-space-3); }
  .match-play-shell { padding-top: 0; }
  .match-play-topline { grid-template-columns: auto minmax(0, 1fr) auto; gap: var(--match-space-2); }
  .match-exit { padding: 0 var(--match-space-3); font-size: .8rem; }
  .match-score { font-size: .95rem; }
  .match-question-card { border-radius: var(--match-radius-md); padding: var(--match-space-5) var(--match-space-4); }
  .match-choice-list { grid-template-columns: 1fr; }
  .match-short-answer { grid-template-columns: 1fr; }
  .match-short-answer button { width: 100%; }
  .match-result-card, .match-error-card { padding: var(--match-space-8) var(--match-space-4); }
  .match-result-actions { flex-direction: column; }
  .match-result-actions button { width: 100%; }
}
@media (max-width: 420px) {
  .match-topbar { flex-wrap: wrap; }
  .match-top-status { width: 100%; justify-content: space-between; padding-top: 0; }
  .match-wordmark-mark { width: 42px; height: 38px; }
  .match-wordmark strong { font-size: .98rem; }
  .match-global-search { width: 100%; }
  .match-search-control { grid-template-columns: minmax(0, 1fr) auto; }
  .match-search-control button { padding: 0 var(--match-space-4); }
  .match-question-meta { align-items: flex-start; }
  .match-mode-badge { font-size: .66rem; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
  .match-wordmark-mark, .match-search-control button:active, .match-primary-button:active { transform: none; }
}
