:root { font-family: Pretendard, "Apple SD Gothic Neo", "Noto Sans KR", sans-serif; color: #25324b; background: #fff8e8; }
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-height: 100vh; display: grid; place-items: center; padding: 86px 28px 42px; background-color: #eaf8ff; background-image: radial-gradient(circle at 8% 12%, #fff4a8 0 5%, transparent 5.2%), radial-gradient(circle at 92% 84%, #c5f2d9 0 8%, transparent 8.2%), linear-gradient(180deg, #dff5ff 0%, #fff8e8 68%); overflow-x: hidden; }
.game-card { position: relative; z-index: 1; width: min(1060px, 100%); background: rgba(255,255,255,.97); border: 7px solid #ffc94d; border-radius: 42px; box-shadow: 0 20px 0 #f2b936, 0 30px 60px rgba(62,103,138,.2); overflow: hidden; }
.sky-decoration { position: fixed; opacity: .75; user-select: none; }
.decoration-one { top: 8%; left: 4%; font-size: 70px; }
.decoration-two { right: 5%; top: 12%; font-size: 52px; transform: rotate(12deg); }
.game-header { display: flex; align-items: center; justify-content: center; gap: 22px; padding: 30px 38px 22px; text-align: left; }
.mascot { font-size: 76px; filter: drop-shadow(0 6px 0 #ffe0a6); }
.eyebrow { margin: 0 0 5px; color: #e7653f; font-size: 18px; font-weight: 900; }
h1 { margin: 0; font-size: clamp(32px,5vw,50px); color: #284d80; letter-spacing: -1px; }
h2, h3 { margin-top: 0; }
.setup-screen { margin: 12px 34px 38px; padding: 30px; text-align: center; border: 4px dashed #bca9ed; border-radius: 30px; background: #f8f4ff; }
.section-heading, .report-heading { display: flex; justify-content: center; align-items: center; gap: 13px; }
.section-heading > span, .report-heading > span { font-size: 42px; }
.section-heading h2, .report-heading h2 { margin: 0; color: #51427e; font-size: 28px; }
.section-heading p { margin: 3px 0 0; color: #766a96; font-weight: 700; }
.setup-options { display: flex; justify-content: center; gap: 24px; margin-top: 26px; }
.setup-options label { display: grid; gap: 7px; color: #4c416b; font-weight: 900; text-align: left; }
select { min-width: 210px; min-height: 58px; padding: 8px 42px 8px 18px; border: 3px solid #9c83db; border-radius: 16px; color: #3f3263; background: white; font: inherit; font-size: 19px; font-weight: 900; cursor: pointer; outline: none; }
select:focus { border-color: #3385d6; box-shadow: 0 0 0 5px #d9efff; }
.grade-description, .grade-badge { margin: 20px auto 0; padding: 11px 18px; border-radius: 14px; color: #625486; background: #eee7ff; font-weight: 800; }
.grade-badge { width: fit-content; margin-top: 20px; text-align: center; }
.score-board { display: grid; grid-template-columns: repeat(3,1fr); gap: 14px; padding: 0 34px; }
.score-board div { text-align: center; padding: 15px 10px; border: 3px solid #cde7ff; border-radius: 22px; background: #eef8ff; }
.score-board div:nth-child(2) { border-color: #d6efd9; background: #f0fbf1; }
.score-board div:nth-child(3) { border-color: #ffe29a; background: #fff8dc; }
.score-board span { display: block; font-size: 16px; font-weight: 900; }
.score-board strong { display: block; margin-top: 4px; font-size: 31px; color: #2864a5; }
.problem-area { margin: 20px 34px 36px; padding: 28px 32px 36px; text-align: center; background: #fffdf5; border: 4px dashed #ffcf67; border-radius: 32px; }
.guide { display: inline-block; margin: 0 0 24px; padding: 9px 20px; border-radius: 30px; font-size: 21px; font-weight: 900; color: #4b6382; background: #fff0b9; }
.problem-text { width: fit-content; max-width: 100%; min-height: 108px; margin: 0 auto 32px; padding: 24px 30px; display: grid; place-items: center; border-radius: 24px; color: #203a60; background: white; box-shadow: 0 8px 0 #dbeeff; font-size: clamp(28px,5vw,52px); line-height: 1.35; font-weight: 950; overflow-wrap: anywhere; }
.answer-box { position: relative; width: fit-content; margin: 0 auto; display: flex; align-items: center; }
.answer-label { position: absolute; top: -15px; left: 50%; z-index: 1; transform: translateX(-50%); padding: 5px 15px; border-radius: 18px; color: white; background: #38a76c; font-size: 17px; font-weight: 900; white-space: nowrap; }
.answer-box input { width: 240px; height: 120px; border: 7px solid #64c98e; border-radius: 28px; background: #f1fff6; font: inherit; font-size: 62px; font-weight: 950; color: #203a60; text-align: center; outline: none; caret-color: #3385d6; }
.answer-box input::placeholder { color: #9ddbb7; }
.answer-box input:focus { border-color: #3385d6; background: white; box-shadow: 0 0 0 9px #d9efff; }
.answer-box input::-webkit-inner-spin-button, .answer-box input::-webkit-outer-spin-button { appearance: none; margin: 0; }
.answer-box input[type="number"] { -moz-appearance: textfield; }
.answer-help { min-height: 22px; margin: 15px 0 0; color: #607890; font-size: 14px; font-weight: 800; }
.button-row { display: flex; justify-content: center; align-items: center; gap: 14px; flex-wrap: wrap; }
button { min-width: 220px; min-height: 64px; border: 0; border-radius: 20px; margin-top: 30px; padding: 15px 34px; font: inherit; font-size: 21px; font-weight: 950; color: white; background: #ff7b52; box-shadow: 0 8px 0 #d95635; cursor: pointer; transition: transform .15s,filter .15s; }
button:hover { filter: brightness(1.06); transform: translateY(-2px); }
button:active { transform: translateY(4px); box-shadow: 0 3px 0 #dc6340; }
button:focus-visible { outline: 6px solid #a9ddff; outline-offset: 5px; }
button.secondary { background: #438fd1; box-shadow-color: #2867a0; }
button.give-up { color: #5e6877; background: #e6e9ee; box-shadow: 0 8px 0 #c2c8d0; }
.message { min-height: 34px; margin: 26px 0 0; font-size: 22px; font-weight: 950; color: #d95434; }
.message.success { color: #26965b; }
.time { min-height: 26px; margin: 7px 0 0; color: #52647f; font-size: 18px; font-weight: 800; }
.report-screen { padding: 10px 34px 40px; }
.report-heading { margin: 8px 0 24px; }
.report-summary { display: grid; grid-template-columns: repeat(3,1fr); gap: 14px; }
.report-summary div { padding: 18px; border: 3px solid #cde7ff; border-radius: 19px; text-align: center; background: #f3faff; }
.report-summary div:nth-child(2) { border-color: #ccebd7; background: #f0fbf4; }
.report-summary div:nth-child(3) { border-color: #ffe09a; background: #fff9e9; }
.report-summary span, .report-summary strong { display: block; }
.report-summary span { font-size: 14px; font-weight: 900; }
.report-summary strong { margin-top: 5px; color: #2864a5; font-size: 27px; }
.table-wrap { margin-top: 24px; overflow-x: auto; border: 2px solid #d7e5ee; border-radius: 18px; }
table { width: 100%; border-collapse: collapse; background: white; }
th, td { padding: 14px 12px; border-bottom: 1px solid #dfebf2; text-align: center; white-space: nowrap; }
th { color: #385471; background: #eaf7ff; font-size: 14px; }
tbody tr:last-child td { border-bottom: 0; }
.result-correct { color: #26965b; font-weight: 950; }
.result-give-up { color: #d95434; font-weight: 950; }
.unsolved-section { margin-top: 22px; padding: 20px 24px; border-radius: 18px; background: #fff3e9; }
.unsolved-section h3 { color: #b94e2f; }
.unsolved-section ul { margin-bottom: 0; columns: 2; }
.report-actions { margin-top: 4px; }
.back-to-blog { position: fixed; top: 18px; left: 18px; z-index: 3; padding: 10px 16px; border: 2px solid #c7e8fb; border-radius: 999px; color: #284d80; background: rgba(255,255,255,.94); font-weight: 900; text-decoration: none; box-shadow: 0 5px 14px rgba(62,103,138,.15); }
.back-to-blog:hover { border-color: #3385d6; }
@media (max-width: 700px) {
  body { display: block; padding: 10px; }
  .back-to-blog { position: static; display: inline-block; margin-bottom: 10px; }
  .game-card { border-width: 5px; border-radius: 28px; box-shadow: 0 10px 0 #f2b936; }
  .game-header { gap: 10px; padding: 20px 14px 16px; }
  .mascot { font-size: 48px; }
  .eyebrow { font-size: 13px; }
  h1 { font-size: clamp(25px,8vw,36px); }
  .setup-screen, .problem-area { margin: 14px 10px 24px; padding: 22px 10px 28px; }
  .setup-options { flex-direction: column; gap: 12px; }
  .setup-options label { text-align: center; }
  select { width: 100%; }
  .score-board { gap: 6px; padding: 0 10px; }
  .score-board div { padding: 10px 4px; border-width: 2px; border-radius: 15px; }
  .score-board span { font-size: 11px; }
  .score-board strong { font-size: 24px; }
  .grade-badge { margin-inline: 10px; width: auto; font-size: 13px; }
  .guide { margin-bottom: 22px; font-size: 17px; }
  .problem-text { min-height: 92px; margin-bottom: 30px; padding: 18px 12px; border-radius: 18px; font-size: clamp(24px,8vw,38px); }
  .answer-box { justify-content: center; }
  .answer-box input { width: min(260px,84vw); height: 108px; font-size: 55px; }
  button { width: min(290px,90%); min-height: 62px; margin-top: 24px; }
  .message { font-size: 19px; }
  .report-screen { padding: 8px 10px 28px; }
  .report-summary { grid-template-columns: 1fr; gap: 8px; }
  .report-summary div { padding: 11px; }
  .unsolved-section ul { columns: 1; }
  .sky-decoration { display: none; }
}
@media print {
  body { display: block; padding: 0; background: white; }
  .back-to-blog, .game-header, .report-actions, .sky-decoration { display: none !important; }
  .game-card { width: 100%; border: 0; box-shadow: none; }
  .report-screen { padding: 0; }
  .table-wrap { overflow: visible; }
}
