/* 문화유산 맞히기 · 교안(학생이 고르고, 근거를 말하는 수업)과 같은 구글 색 스타일 */
:root {
  --ink: #202124;
  --sub: #5f6368;
  --muted: #80868b;
  --line: #dadce0;
  --soft: #f1f3f4;
  --paper: #f8f9fa;
  --blue: #1a73e8;   --blue-bg: #e8f0fe;
  --green: #188038;  --green-bg: #e6f4ea;
  --orange: #e37400; --orange-bg: #fef7e0;
  --red: #d93025;    --red-bg: #fce8e6;
  --g-blue: #4285f4; --g-red: #ea4335; --g-yellow: #fbbc04; --g-green: #34a853;
  --radius: 20px;
  --font: "Noto Sans KR", "Apple SD Gothic Neo", "Malgun Gothic", system-ui, sans-serif;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: #fff;
  color: var(--ink);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.55;
  word-break: keep-all;
  overflow-wrap: anywhere;
}
button, a { font: inherit; }
[hidden] { display: none !important; }

/* 머리 */
.top {
  display: flex; align-items: center; gap: 12px;
  padding: 16px clamp(16px, 4vw, 40px);
}
.dots { display: inline-flex; gap: 5px; }
.dots i { width: 10px; height: 10px; border-radius: 50%; display: block; }
.dots i:nth-child(1) { background: var(--g-blue); }
.dots i:nth-child(2) { background: var(--g-red); }
.dots i:nth-child(3) { background: var(--g-yellow); }
.dots i:nth-child(4) { background: var(--g-green); }
.brand { font-weight: 700; font-size: 17px; }
.score-chip {
  margin-left: auto; background: var(--blue-bg); color: var(--blue);
  font-weight: 700; padding: 6px 14px; border-radius: 999px; font-variant-numeric: tabular-nums;
}

main { flex: 1; width: 100%; max-width: 1180px; margin: 0 auto; padding: 8px clamp(16px, 4vw, 40px) 24px; }
.screen { animation: rise .35s ease both; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.eyebrow { margin: 0 0 6px; color: var(--blue); font-weight: 700; font-size: 15px; }
h1 { margin: 0; font-size: clamp(28px, 5vw, 44px); line-height: 1.25; font-weight: 900; letter-spacing: -0.01em; }
.lead { margin: 12px 0 0; color: var(--sub); font-size: clamp(16px, 2.2vw, 19px); }

/* 단추 */
.primary {
  border: 0; border-radius: 999px; cursor: pointer;
  background: var(--blue); color: #fff; font-weight: 700;
  padding: 12px 22px; min-height: 48px;
}
.primary:hover { background: #1765cc; }
.primary.big { font-size: 19px; padding: 14px 30px; min-height: 56px; }
.link {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 10px 20px; border-radius: 999px;
  border: 2px solid var(--line); background: #fff; color: var(--blue);
  font-weight: 700; text-decoration: none;
}
.link:hover { border-color: var(--blue); }
.link.big { min-height: 56px; font-size: 18px; }
:focus-visible { outline: 3px solid var(--g-yellow); outline-offset: 3px; }

/* 시작 */
.start { max-width: 760px; padding-top: clamp(8px, 5vh, 48px); }
.rules { list-style: none; margin: 28px 0; padding: 0; display: grid; gap: 12px; }
.rules li { display: flex; gap: 14px; align-items: center; padding: 16px 20px; border-radius: var(--radius); font-size: 17px; }
.rules b {
  flex: none; width: 34px; height: 34px; border-radius: 50%; color: #fff;
  display: grid; place-items: center; font-size: 16px;
}
.c-blue { background: var(--blue-bg); } .c-blue b { background: var(--blue); }
.c-green { background: var(--green-bg); } .c-green b { background: var(--green); }
.c-orange { background: var(--orange-bg); } .c-orange b { background: var(--orange); }
.keys { color: var(--muted); font-size: 14px; margin: 16px 0 0; }

/* 문제 */
.qhead { display: flex; align-items: center; gap: 16px; margin-bottom: 14px; }
.count { margin: 0; font-weight: 900; font-size: 20px; font-variant-numeric: tabular-nums; min-width: 64px; }
.progress { list-style: none; display: flex; gap: 6px; margin: 0; padding: 0; flex: 1; }
.progress li { height: 8px; flex: 1; border-radius: 99px; background: var(--soft); }
.progress li.done-ok { background: var(--green); }
.progress li.done-no { background: var(--red); }
.progress li.now { background: var(--blue); }

.stage { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: clamp(16px, 3vw, 36px); align-items: start; }
.frame {
  position: relative; overflow: hidden; border-radius: 24px;
  background: var(--soft); aspect-ratio: 1 / 1; width: 100%;
  touch-action: manipulation; user-select: none;
}
.pan { position: absolute; left: 0; top: 0; transform-origin: 0 0; will-change: transform; transition: transform .9s cubic-bezier(.2, .7, .2, 1); }
.pan img { width: 100%; height: 100%; display: block; }
.frame-msg {
  position: absolute; inset: 0; margin: 0; display: grid; place-items: center;
  color: var(--sub); font-size: 16px; padding: 24px; text-align: center;
}
.zoom-tag {
  position: absolute; right: 14px; top: 14px; background: rgba(32, 33, 36, .72); color: #fff;
  font-weight: 700; font-size: 14px; padding: 4px 10px; border-radius: 99px; font-variant-numeric: tabular-nums;
}

.side { min-width: 0; }
.ask { margin: 0; font-size: clamp(22px, 3vw, 30px); font-weight: 900; line-height: 1.3; }
.worth { margin: 6px 0 16px; color: var(--sub); }
.worth b { color: var(--blue); }
.choices { display: grid; gap: 10px; }
.choice {
  display: flex; align-items: center; gap: 14px; width: 100%; text-align: left;
  border: 2px solid transparent; border-radius: 999px; cursor: pointer;
  padding: 10px 18px 10px 10px; min-height: 58px; font-size: 18px; font-weight: 700; color: var(--ink);
}
.choice .num {
  flex: none; width: 38px; height: 38px; border-radius: 50%; color: #fff;
  display: grid; place-items: center; font-size: 17px; font-weight: 700;
}
.choice:nth-child(1) { background: var(--blue-bg); }   .choice:nth-child(1) .num { background: var(--blue); }
.choice:nth-child(2) { background: var(--green-bg); }  .choice:nth-child(2) .num { background: var(--green); }
.choice:nth-child(3) { background: var(--orange-bg); } .choice:nth-child(3) .num { background: var(--orange); }
.choice:nth-child(4) { background: var(--red-bg); }    .choice:nth-child(4) .num { background: var(--red); }
.choice:hover:not(:disabled) { border-color: rgba(32, 33, 36, .18); }
.choice:disabled { cursor: default; opacity: .45; }
.choice.is-right { opacity: 1; border-color: var(--green); background: #fff; }
.choice.is-wrong { opacity: 1; border-color: var(--red); background: #fff; }
.choice .mark { margin-left: auto; font-size: 15px; }

.wider {
  margin-top: 14px; border: 2px solid var(--line); background: #fff; color: var(--ink);
  border-radius: 999px; min-height: 48px; padding: 10px 18px; cursor: pointer; font-weight: 700;
}
.wider span { color: var(--red); margin-left: 6px; font-weight: 700; }
.wider:hover:not(:disabled) { border-color: var(--blue); }
.wider:disabled { opacity: .4; cursor: default; }

.reveal { margin-top: 16px; padding: 20px 22px; border-radius: var(--radius); background: var(--paper); }
.verdict { margin: 0 0 6px; font-weight: 900; font-size: 18px; }
.verdict.ok { color: var(--green); }
.verdict.no { color: var(--red); }
.r-title { margin: 0; font-size: clamp(24px, 3vw, 30px); line-height: 1.3; font-weight: 900; }
.r-meta { margin: 4px 0 0; color: var(--sub); }
.r-museum { margin: 2px 0 0; color: var(--sub); }
.r-clue { margin: 14px 0 0; display: grid; gap: 2px; }
.r-clue b { color: var(--orange); font-size: 14px; }
.r-talk { margin: 12px 0 0; padding: 10px 14px; border-radius: 14px; background: var(--blue-bg); color: var(--blue); font-weight: 700; font-size: 16px; }
.r-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.r-actions .primary { margin-left: auto; }

/* 결과 */
.end h1 { font-size: clamp(48px, 9vw, 88px); color: var(--blue); font-variant-numeric: tabular-nums; }
.end h1 small { font-size: .4em; color: var(--sub); font-weight: 700; }
.works { list-style: none; margin: 24px 0; padding: 0; display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.works a {
  display: flex; gap: 12px; align-items: center; padding: 10px; border-radius: 18px;
  background: var(--paper); color: var(--ink); text-decoration: none; min-height: 84px;
}
.works a:hover { background: var(--blue-bg); }
.works img { width: 64px; height: 64px; object-fit: cover; border-radius: 12px; flex: none; background: var(--soft); }
.works .t { font-weight: 700; display: block; line-height: 1.35; }
.works .m { color: var(--sub); font-size: 14px; display: block; }
.works .ok { color: var(--green); font-weight: 700; font-size: 14px; }
.works .no { color: var(--red); font-weight: 700; font-size: 14px; }
.end-actions { display: flex; flex-wrap: wrap; gap: 12px; }

.foot { padding: 18px clamp(16px, 4vw, 40px) 26px; color: var(--muted); font-size: 13px; border-top: 1px solid var(--soft); }
.foot p { margin: 2px 0; max-width: 1180px; margin-inline: auto; }

/* 좁은 화면 */
@media (max-width: 820px) {
  .stage { grid-template-columns: 1fr; }
  .frame { max-height: 58vh; aspect-ratio: auto; height: min(92vw, 58vh); }
  .choice { min-height: 54px; font-size: 17px; }
  .r-actions .primary { margin-left: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .pan { transition: none; }
  .screen { animation: none; }
}
