/* 과학 타자 연습: 초등학생용 밝은 게임 화면 */
:root {
  --bg1: #dff0ff; --bg2: #fff7e6; --card: #ffffff; --ink: #1f2a44; --muted: #6a7690; --line: #dbe4f2;
  --pri: #3b7cff; --pri-d: #2458c9; --ok: #16a34a; --bad: #e5484d; --now: #3b7cff; --gold: #f5a50b;
  --f0: #ffd6dc; --f1: #ffeca8; --f2: #cff0c4; --f3: #cfe2ff; --f4: #e2d6ff; --f5: #cff0c4; --f6: #ffeca8; --f7: #ffd6dc; --f8: #e8edf4;
  --title: "Jua", "Pretendard", "Noto Sans KR", "Malgun Gothic", sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  min-height: 100vh; color: var(--ink); font-family: "Pretendard", "Noto Sans KR", "Malgun Gothic", system-ui, sans-serif; font-size: 17px; line-height: 1.55;
  background: radial-gradient(circle at 12% 18%, rgba(255, 255, 255, .7) 0 60px, transparent 61px), radial-gradient(circle at 88% 30%, rgba(255, 255, 255, .6) 0 80px, transparent 81px), linear-gradient(180deg, var(--bg1), var(--bg2) 85%);
  background-attachment: fixed;
}
button { font: inherit; cursor: pointer; border-radius: 14px; border: 2px solid var(--line); background: #fff; color: var(--ink); padding: 8px 16px; transition: transform .08s, box-shadow .08s, filter .15s; }
button:hover { filter: brightness(1.04); }
button:active { transform: translateY(2px); }
button:focus-visible, input:focus-visible, select:focus-visible, a:focus-visible { outline: 3px solid #ffb703; outline-offset: 3px; }
button.pri { font-family: var(--title); background: var(--pri); border-color: var(--pri-d); color: #fff; box-shadow: 0 4px 0 var(--pri-d); }
button.pri:active { box-shadow: 0 1px 0 var(--pri-d); }
button.soft { background: #fff; box-shadow: 0 3px 0 var(--line); }
button.big { font-family: var(--title); font-size: 20px; padding: 10px 28px; border-radius: 16px; }
button.huge { font-size: 28px; padding: 14px 56px; border-radius: 20px; box-shadow: 0 6px 0 var(--pri-d); }
a { color: var(--pri-d); font-weight: 700; }
.muted { color: var(--muted); }

/* 위 띠 */
.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 10px; padding: 8px 16px; background: rgba(255, 255, 255, .92); backdrop-filter: blur(6px); border-bottom: 2px solid #e6eef9; }
.topbar .sp { flex: 1; }
#backBtn { font-family: var(--title); font-size: 17px; }
.brand { font-family: var(--title); font-size: 22px; font-weight: 400; color: var(--pri-d); }
.starbar { display: flex; align-items: center; gap: 6px; background: linear-gradient(135deg, #fff4c9, #ffe08a); border: 2px solid #f3c64e; border-radius: 999px; padding: 4px 14px; font-size: 15px; }
.starbar .sb-star { font-size: 20px; }
.starbar b { font-family: var(--title); font-size: 24px; color: #b45f00; display: inline-block; line-height: 1; }
.starbar .sb-cap { color: #8a6400; }
.starbar b.bump { animation: bump .7s; }
.sb-login { margin-left: 4px; }
#soundBtn { font-size: 15px; padding: 6px 12px; }
@keyframes bump { 0% { transform: scale(1); } 35% { transform: scale(1.9) rotate(-8deg); } 100% { transform: scale(1); } }

main { max-width: 1040px; margin: 0 auto; padding: 18px 16px 60px; }
.card { background: var(--card); border: 2px solid #e3ecf8; border-radius: 26px; padding: 20px 22px; margin-bottom: 18px; box-shadow: 0 6px 0 #e3ecf8, 0 10px 24px rgba(40, 80, 140, .08); }
.sec { font-family: var(--title); font-weight: 400; font-size: 24px; margin: 26px 6px 12px; display: flex; align-items: center; gap: 8px; }
.sec small { font-family: inherit; font-size: 15px; color: var(--muted); }

/* 첫 화면 */
.hero { text-align: center; padding: 30px 22px 34px; }
.hero-keys { display: flex; justify-content: center; gap: 12px; margin-bottom: 6px; }
.hero-keys span { width: 70px; height: 70px; display: flex; align-items: center; justify-content: center; font-family: var(--title); font-size: 38px; color: #fff; border-radius: 18px; animation: hop 2.4s infinite ease-in-out; }
.hero-keys span:nth-child(1) { background: #ff7b8a; box-shadow: 0 6px 0 #d4566a; }
.hero-keys span:nth-child(2) { background: #ffb547; box-shadow: 0 6px 0 #d48a1d; animation-delay: .15s; }
.hero-keys span:nth-child(3) { background: #4cc38a; box-shadow: 0 6px 0 #2d9765; animation-delay: .3s; }
.hero-keys span:nth-child(4) { background: #5b8cff; box-shadow: 0 6px 0 #3a63d1; animation-delay: .45s; }
@keyframes hop { 0%, 60%, 100% { transform: translateY(0); } 30% { transform: translateY(-12px); } }
.hero h1 { font-family: var(--title); font-weight: 400; font-size: 46px; margin: 14px 0 4px; color: #1d3a7a; }
.lead { color: #47546e; font-size: 18px; margin: 0 0 18px; }
.hero-star { display: flex; align-items: center; gap: 14px; text-align: left; max-width: 560px; margin: 0 auto 24px; background: linear-gradient(135deg, #fff6d3, #ffe597); border: 2px solid #f2c54b; border-radius: 22px; padding: 14px 20px; }
.hs-ic { font-size: 52px; animation: spin 3s infinite ease-in-out; }
@keyframes spin { 0%, 100% { transform: rotate(-10deg) scale(1); } 50% { transform: rotate(10deg) scale(1.1); } }
.hero-star div { display: flex; flex-direction: column; }
.hero-star b { font-family: var(--title); font-weight: 400; font-size: 24px; color: #8a4d00; }
.hero-star small { color: #8a6400; font-size: 14px; }
.hero-btns { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.login-note { margin: 20px auto 0; max-width: 520px; font-size: 15px; background: #fff3f3; border-radius: 14px; padding: 10px 14px; color: #8a2b2b; }

/* 메뉴 */
.menu-scope { padding: 16px 20px; }
.ms-q { font-family: var(--title); font-size: 20px; margin: 0 0 10px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { font-family: var(--title); font-size: 18px; border-radius: 999px; padding: 8px 18px; box-shadow: 0 3px 0 var(--line); }
.chip.on { background: var(--pri); color: #fff; border-color: var(--pri-d); box-shadow: 0 3px 0 var(--pri-d); }
.ms-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; margin-top: 12px; }
.unit-pick { display: inline-flex; align-items: center; gap: 8px; font-family: var(--title); font-size: 18px; }
.unit-pick select { font: inherit; font-family: "Pretendard", "Noto Sans KR", sans-serif; font-size: 16px; padding: 7px 12px; border-radius: 12px; border: 2px solid var(--line); max-width: 66vw; background: #fff; }
.ms-count { color: var(--muted); font-size: 15px; }
.ms-count b { color: var(--ink); }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(188px, 1fr)); gap: 14px; align-items: stretch; }
.tile { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: 8px; text-align: center; padding: 18px 12px 16px; border-radius: 22px; min-height: 160px; border: 2px solid var(--tc2); background: var(--tc1); box-shadow: 0 5px 0 var(--tc2); }
.tile:hover { transform: translateY(-3px); box-shadow: 0 8px 0 var(--tc2); filter: none; }
.tile:active { transform: translateY(3px); box-shadow: 0 2px 0 var(--tc2); }
.tile-ic { flex: none; width: 66px; height: 66px; border-radius: 20px; background: #fff; display: flex; align-items: center; justify-content: center; font-size: 38px; box-shadow: inset 0 -4px 0 rgba(0, 0, 0, .06); }
.tile-ic.step { font-family: var(--title); font-size: 30px; color: var(--pri-d); }
.tile-tx { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.tile-tx b { font-family: var(--title); font-weight: 400; font-size: 22px; white-space: nowrap; }
.choice .tile { flex-direction: row; text-align: left; min-height: 104px; padding: 14px 16px; }
.choice .tile-tx { align-items: flex-start; }
.tile-tx small { color: #4f5b73; font-size: 14px; line-height: 1.35; }
.tile-tag { position: absolute; top: 8px; right: 10px; font-family: var(--title); font-size: 12px; background: #fff; border-radius: 999px; padding: 1px 8px; color: #c05600; }
.tile.done { --tc1: #e9f9ee; --tc2: #9fdcb3; }
.c-blue { --tc1: #e6f0ff; --tc2: #a9c6ff; } .c-green { --tc1: #e4f8e9; --tc2: #9fdcae; } .c-yellow { --tc1: #fff6d6; --tc2: #f3d175; }
.c-purple { --tc1: #f0e9ff; --tc2: #c6b2f5; } .c-pink { --tc1: #ffe9ef; --tc2: #f6b0c3; } .c-sky { --tc1: #e3f5ff; --tc2: #93d2f3; }
.c-night { --tc1: #e8e9fb; --tc2: #a9acdf; } .c-orange { --tc1: #fff0e0; --tc2: #f7bf86; } .c-red { --tc1: #ffe8e6; --tc2: #f4a7a0; } .c-teal { --tc1: #e1f7f3; --tc2: #8fd6c8; }
.choice { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }

/* 연습 화면 */
.play-head { display: flex; align-items: center; gap: 12px; margin: 2px 6px 14px; }
.ph-ic { width: 54px; height: 54px; border-radius: 16px; background: #fff; border: 2px solid #e3ecf8; display: flex; align-items: center; justify-content: center; font-size: 30px; box-shadow: 0 4px 0 #e3ecf8; }
.play-head h2 { margin: 0; font-family: var(--title); font-weight: 400; font-size: 28px; line-height: 1.2; }
.play-head .muted { font-size: 15px; }
.intro-p { font-size: 18px; margin: 0 0 14px; }
.prog { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.prog-n { font-family: var(--title); font-size: 18px; color: var(--muted); }
.prog-n b { font-size: 26px; color: var(--pri-d); }
.prog .bar { flex: 1; min-width: 140px; max-width: 360px; height: 14px; border-radius: 99px; background: #e8eef8; overflow: hidden; box-shadow: inset 0 2px 3px rgba(0, 0, 0, .06); }
.prog .bar i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, #5bd1a2, #3b7cff); transition: width .35s; }
.prog-unit { font-size: 14px; background: #eef4ff; color: var(--pri-d); border-radius: 999px; padding: 2px 10px; }
.tb-label { font-size: 16px; color: #4f5b73; margin-bottom: 8px; font-weight: 600; }
.term { color: var(--pri-d); font-weight: 800; }
.bad-note { color: var(--bad); font-weight: 800; }
.tb-target { font-size: 30px; font-weight: 700; letter-spacing: 1px; line-height: 1.7; padding: 16px 18px; border-radius: 18px; background: #f6f9ff; border: 2px dashed #c9d8f2; min-height: 72px; word-break: keep-all; }
.tb-target span { border-radius: 6px; }
.tb-target .c-todo { color: #99a3b6; }
.tb-target .c-ok { color: var(--ok); }
.tb-target .c-now { color: var(--now); }
.tb-target .cur { background: #fff1a8; box-shadow: 0 3px 0 #f5c400; }
.tb-target .c-bad { color: #fff; background: var(--bad); }
.tb-target .blank { color: transparent; background: #fff; box-shadow: inset 0 0 0 2px #f2b84b; }
.tb-target .blank.cur { box-shadow: inset 0 0 0 2px #f2b84b, 0 3px 0 #f5c400; background: #fff7d1; }
.tb-input { width: 100%; font: inherit; font-size: 26px; padding: 14px 16px; margin-top: 12px; border: 3px solid #b8c9e6; border-radius: 18px; background: #fff; }
.tb-input::placeholder { color: #b2bccd; font-size: 18px; }
.tb-input:focus { border-color: var(--pri); outline: none; box-shadow: 0 0 0 5px #d6e4ff; }
.tb-row { display: flex; align-items: center; gap: 10px; margin-top: 10px; flex-wrap: wrap; }
.tb-hint { flex: 1; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 16px; }
.key-chip { display: inline-flex; align-items: center; justify-content: center; min-width: 36px; height: 34px; padding: 0 8px; font-size: 20px; background: var(--pri); color: #fff; border-radius: 10px; box-shadow: 0 3px 0 var(--pri-d); }
.finger-chip { display: inline-block; padding: 3px 10px; border-radius: 999px; background: #eef2f8; font-size: 15px; font-weight: 600; }
.finger-chip.f0 { background: var(--f0); } .finger-chip.f1 { background: var(--f1); } .finger-chip.f2 { background: var(--f2); } .finger-chip.f3 { background: var(--f3); }
.finger-chip.f4 { background: var(--f4); } .finger-chip.f5 { background: var(--f5); } .finger-chip.f6 { background: var(--f6); } .finger-chip.f7 { background: var(--f7); } .finger-chip.f8 { background: var(--f8); }
.tb-act { display: flex; gap: 8px; }
.tb-act button { font-size: 15px; padding: 6px 12px; }
.tb-warn { margin-top: 10px; padding: 10px 14px; border-radius: 14px; background: #ffecec; color: #b42323; font-weight: 800; }
.tb-home { margin: 14px 0 8px; font-size: 15px; color: #4f5b73; }
.tb-kbwrap { text-align: center; }
.shake { animation: shake .35s; }
@keyframes shake { 20%, 60% { transform: translateX(-7px); } 40%, 80% { transform: translateX(7px); } }

/* 문제 */
.q { text-align: center; }
.q-label { display: inline-block; font-family: var(--title); font-size: 18px; color: #fff; background: #8b6cf0; border-radius: 999px; padding: 4px 16px; }
.q-main { font-size: 26px; font-weight: 700; margin: 14px 0 8px; line-height: 1.55; word-break: keep-all; }
.q-main.term { font-family: var(--title); font-weight: 400; font-size: 44px; }
.q-hint { display: flex; justify-content: center; align-items: center; gap: 6px; margin-bottom: 4px; }
.q-hint i { width: 30px; height: 34px; border-radius: 8px; background: #fff; box-shadow: inset 0 0 0 2px #f2b84b; }
.q-hint i.gap { width: 10px; box-shadow: none; background: none; }
.q-hint span { margin-left: 6px; color: var(--muted); font-size: 15px; }
.q-tip { color: #6a5300; background: #fff6d3; display: inline-block; border-radius: 12px; padding: 4px 12px; font-size: 15px; }
.q-help { color: var(--muted); font-size: 14px; margin: 8px 0 0; }
.blank-box { display: inline-block; min-width: 2.5em; border-radius: 8px; background: #fff7d1; box-shadow: inset 0 0 0 2px #f2b84b; }

/* 긴 글·검사 */
.passage { font-size: 18px; line-height: 1.9; padding: 14px 16px; background: #fbfdff; border: 2px dashed #dbe4f2; border-radius: 16px; margin-bottom: 14px; word-break: keep-all; }
.p-done { color: var(--ok); }
.p-now { font-weight: 800; background: #fff1a8; border-radius: 6px; padding: 1px 3px; }
.p-todo { color: #a3adbd; }
.long-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; }
.long-item { display: flex; align-items: center; gap: 12px; text-align: left; padding: 12px 14px; border-radius: 18px; box-shadow: 0 4px 0 var(--line); }
.long-item:hover { border-color: #c6b2f5; }
.li-ic { font-size: 28px; }
.long-item b { display: block; font-family: var(--title); font-weight: 400; font-size: 19px; }
.long-item small { color: var(--muted); }
.test-clock { display: flex; align-items: center; gap: 16px; margin-bottom: 12px; }
.clock-face { width: 96px; height: 96px; border-radius: 50%; background: #fff; border: 6px solid #f6b0c3; display: flex; flex-direction: column; align-items: center; justify-content: center; box-shadow: 0 5px 0 #f6b0c3; }
.clock-face b { font-family: var(--title); font-weight: 400; font-size: 36px; line-height: 1; color: #c2185b; }
.clock-face small { font-size: 13px; color: var(--muted); }
#liveCpm { font-family: var(--title); font-size: 20px; color: #4f5b73; }
.hist-h { font-family: var(--title); font-weight: 400; margin: 20px 0 8px; }
.hist { display: grid; gap: 6px; }
.hist-row { position: relative; display: grid; grid-template-columns: 70px 50px 80px 1fr; gap: 8px; padding: 8px 12px; border-radius: 12px; background: #f6f8fc; overflow: hidden; }
.hist-row b { color: var(--pri-d); }
.hist-row i { position: absolute; left: 0; bottom: 0; height: 4px; background: linear-gradient(90deg, #5bd1a2, #3b7cff); }

/* 결과 */
.result { text-align: center; padding: 30px 22px; }
.medal { font-size: 82px; line-height: 1; animation: pop .6s ease-out; }
@keyframes pop { 0% { transform: scale(.3) rotate(-30deg); opacity: 0; } 70% { transform: scale(1.15); } 100% { transform: scale(1); opacity: 1; } }
.result h2 { font-family: var(--title); font-weight: 400; font-size: 36px; margin: 10px 0 4px; color: #1d3a7a; }
.cheer { font-size: 19px; font-weight: 700; color: #7a4fd6; margin: 0 0 8px; }
.bubbles { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; margin: 16px 0; }
.bubble { width: 128px; padding: 12px 8px; border-radius: 22px; display: flex; flex-direction: column; align-items: center; box-shadow: 0 5px 0 rgba(0, 0, 0, .08); }
.bubble small { font-size: 14px; font-weight: 700; color: #4f5b73; }
.bubble b { font-family: var(--title); font-weight: 400; font-size: 42px; line-height: 1.1; }
.bubble span { font-size: 14px; color: #4f5b73; }
.bubble.b1 { background: #e6f0ff; } .bubble.b1 b { color: #2458c9; }
.bubble.b2 { background: #e4f8e9; } .bubble.b2 b { color: #15803d; }
.bubble.b3 { background: #fff2dc; } .bubble.b3 b { color: #c05600; }
.big-p { font-size: 19px; }
.big-p b { font-family: var(--title); font-size: 26px; color: var(--pri-d); }
.btns { display: flex; gap: 12px; justify-content: center; margin-top: 18px; flex-wrap: wrap; }

/* 자판 */
.kb { display: inline-flex; flex-direction: column; gap: 5px; padding: 12px; background: #e9eff8; border-radius: 18px; user-select: none; max-width: 100%; overflow-x: auto; box-shadow: inset 0 2px 4px rgba(0, 0, 0, .05); }
.kb-row { display: flex; gap: 5px; }
.kb-r1 { padding-left: 22px; } .kb-r2 { padding-left: 34px; }
.kb-key { position: relative; width: 46px; height: 46px; border-radius: 10px; border: 1px solid #c5cfdf; display: flex; align-items: center; justify-content: center; font-size: 19px; font-weight: 700; background: #fff; box-shadow: 0 3px 0 #b9c5d8; flex: none; }
.kb-key small { position: absolute; top: 2px; left: 5px; font-size: 11px; color: #5d6a80; font-weight: 400; }
.kb-key i { position: absolute; bottom: 1px; right: 5px; font-size: 10px; font-style: normal; color: #8a95a8; font-weight: 400; }
.kb-key.f0 { background: var(--f0); } .kb-key.f1 { background: var(--f1); } .kb-key.f2 { background: var(--f2); } .kb-key.f3 { background: var(--f3); }
.kb-key.f4 { background: var(--f4); } .kb-key.f5 { background: var(--f5); } .kb-key.f6 { background: var(--f6); } .kb-key.f7 { background: var(--f7); } .kb-key.f8 { background: var(--f8); }
.kb-key.bump::after { content: ""; position: absolute; bottom: 7px; left: 50%; width: 14px; height: 3px; margin-left: -7px; border-radius: 3px; background: #4a5568; }
.kb-key.home { border: 2px solid #8da2c4; }
.kb-wide { width: 80px; font-size: 13px; } .kb-enter { width: 76px; font-size: 13px; } .kb-space { width: 300px; font-size: 13px; } .kb-hanen { width: 64px; font-size: 13px; margin-left: 120px; }
.kb-key.next { background: var(--pri) !important; color: #fff; border-color: var(--pri-d); box-shadow: 0 0 0 4px #b9d0ff; animation: pulse 1s infinite; }
.kb-key.next small, .kb-key.next i { color: #e5edff; }
.kb-key.next.bump::after { background: #fff; }
.kb-key.next-shift { outline: 3px dashed var(--pri); outline-offset: 1px; }
@keyframes pulse { 50% { box-shadow: 0 0 0 8px #d6e4ff; } }

/* 기본 자리 안내 */
.home-guide h2 { margin: 0 0 12px; font-family: var(--title); font-weight: 400; font-size: 26px; }
.hg-grid { display: grid; grid-template-columns: minmax(250px, 1fr) auto; gap: 20px; align-items: start; }
.hg-list { margin: 0; padding-left: 22px; font-size: 17px; }
.hg-list li { margin-bottom: 8px; }
.hg-list b { font-size: 19px; color: var(--pri-d); }
.hg-pose { background: #eaf8ef; border-radius: 16px; padding: 12px 14px; font-size: 16px; }
.hg-legend { font-size: 14px; color: var(--muted); display: flex; flex-wrap: wrap; gap: 6px; align-items: center; justify-content: center; }
.hg-legend span { padding: 2px 10px; border-radius: 8px; color: var(--ink); font-weight: 700; }
.hg-legend .f0 { background: var(--f0); } .hg-legend .f1 { background: var(--f1); } .hg-legend .f2 { background: var(--f2); } .hg-legend .f3 { background: var(--f3); } .hg-legend .f8 { background: var(--f8); }
.hg-kb .kb-key, .guide-kb .kb-key { width: 38px; height: 38px; font-size: 16px; }
.hg-kb .kb-space, .guide-kb .kb-space { width: 220px; } .hg-kb .kb-hanen, .guide-kb .kb-hanen { margin-left: 80px; }

/* 별·알림 */
.star-pop { position: fixed; left: 50%; top: 40%; z-index: 99; transform: translate(-50%, -50%); display: flex; flex-direction: column; align-items: center; pointer-events: none; animation: starpop 1.8s ease-out forwards; }
.sp-burst { position: absolute; top: 10px; width: 160px; height: 160px; border-radius: 50%; background: radial-gradient(circle, rgba(255, 214, 80, .7), rgba(255, 214, 80, 0) 70%); animation: burst 1s ease-out; }
.sp-star { position: relative; font-size: 96px; filter: drop-shadow(0 6px 10px rgba(245, 165, 11, .6)); }
.star-pop b { position: relative; font-family: var(--title); font-weight: 400; font-size: 40px; color: #c46a00; }
.star-pop small { position: relative; font-family: var(--title); font-size: 20px; color: #7a4800; background: #fff6d3; padding: 3px 16px; border-radius: 99px; border: 2px solid #f3c64e; }
@keyframes starpop { 0% { opacity: 0; transform: translate(-50%, -20%) scale(.3); } 15% { opacity: 1; transform: translate(-50%, -50%) scale(1.2) rotate(8deg); } 30% { transform: translate(-50%, -50%) scale(1) rotate(0); } 75% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%, -130%) scale(.9); } }
@keyframes burst { from { transform: scale(.2); } to { transform: scale(1.6); opacity: 0; } }
.toast { position: fixed; left: 50%; bottom: 26px; transform: translateX(-50%); z-index: 90; max-width: min(660px, 92vw); background: #24345c; color: #fff; border-radius: 16px; padding: 12px 20px; font-size: 16px; font-weight: 600; box-shadow: 0 8px 24px rgba(0, 0, 0, .2); }

/* 게임 */
.game { padding: 14px; }
.g-hud { display: flex; align-items: center; gap: 18px; font-size: 17px; margin-bottom: 10px; }
.g-life { font-size: 22px; letter-spacing: 2px; }
.g-life .off { opacity: .45; }
.g-score b, .g-extra b { font-family: var(--title); font-size: 24px; color: var(--pri-d); }
.g-area { position: relative; height: 380px; border-radius: 20px; overflow: hidden; }
.g-area.hitflash { animation: hitflash .4s; }
@keyframes hitflash { 50% { filter: brightness(1.4) saturate(2) hue-rotate(-30deg); } }
.g-bottom { margin-top: 12px; text-align: center; }
.g-prompt { font-size: 22px; font-weight: 700; min-height: 36px; word-break: keep-all; line-height: 1.5; }
.tag { display: inline-block; font-family: var(--title); font-weight: 400; font-size: 16px; color: #fff; background: #8b6cf0; border-radius: 999px; padding: 2px 12px; margin-right: 4px; vertical-align: 2px; }
.rain { background: linear-gradient(#bfe4ff, #eaf7ff 70%); }
.clouds { position: absolute; top: -6px; left: 0; right: 0; text-align: center; font-size: 46px; letter-spacing: 30px; opacity: .9; }
.ground { position: absolute; left: 0; right: 0; bottom: 0; height: 34px; background: linear-gradient(#7ed46a, #5cb84a); }
.drop { position: absolute; top: 0; display: flex; align-items: center; gap: 6px; padding: 8px 16px; border-radius: 999px; background: #fff; border: 3px solid #6fb6f2; box-shadow: 0 4px 0 #6fb6f2; }
.drop b { font-family: var(--title); font-weight: 400; font-size: 24px; }
.drop-ic { font-size: 22px; }
.drop.pop { animation: popout .4s forwards; }
@keyframes popout { to { opacity: 0; transform: scale(1.8); } }
.space { background: radial-gradient(circle at 30% 20%, #34508f, #121c3a 70%); }
.stars-bg { position: absolute; inset: 0; background-image: radial-gradient(2px 2px at 20px 30px, #fff, transparent), radial-gradient(2px 2px at 90px 80px, #fff, transparent), radial-gradient(1.5px 1.5px at 160px 40px, #fff, transparent), radial-gradient(1.5px 1.5px at 230px 120px, #fff, transparent); background-size: 260px 160px; opacity: .7; }
.base { position: absolute; bottom: 6px; left: 50%; transform: translateX(-50%); font-size: 42px; }
.met { position: absolute; top: 0; width: 19%; display: flex; flex-direction: column; align-items: center; }
.met-ic { font-size: 40px; filter: drop-shadow(0 0 8px rgba(255, 150, 60, .8)); }
.met b { font-family: var(--title); font-weight: 400; font-size: 19px; background: #fff; color: var(--ink); border-radius: 999px; padding: 2px 12px; margin-top: -4px; box-shadow: 0 3px 0 #a9acdf; text-align: center; word-break: keep-all; }
.met.boom { animation: boom .45s forwards; }
@keyframes boom { to { opacity: 0; transform: scale(2.2); filter: brightness(2); } }
.stack { background: linear-gradient(#ffe7c9, #fff9f1); }
.blk { position: absolute; height: 30px; border-radius: 8px; background: #5b8def; border: 2px solid #3f6fd1; box-shadow: inset 0 -5px 0 rgba(0, 0, 0, .12); }
.blk.moving { background: #ffb547; border-color: #d48a1d; }
.blk.c1 { background: #4fbf8b; border-color: #2f9a69; } .blk.c2 { background: #ff7b8a; border-color: #d4566a; } .blk.c3 { background: #9b7be6; border-color: #7a58c8; } .blk.c4 { background: #46b5d1; border-color: #2c93ae; }
.tower { position: absolute; left: 0; right: 0; bottom: 0; height: 100%; }
.track { display: grid; gap: 10px; margin-bottom: 14px; }
.lane { display: grid; grid-template-columns: 90px 1fr; align-items: center; gap: 10px; }
.lane-n { font-family: var(--title); font-size: 19px; display: flex; flex-direction: column; line-height: 1.1; }
.lane-n small { font-family: "Pretendard", sans-serif; font-size: 12px; color: var(--muted); }
.road { position: relative; height: 46px; border-radius: 12px; background: linear-gradient(#6b7385, #5a6274); box-shadow: inset 0 0 0 3px #4a5162; }
.road::before { content: ""; position: absolute; left: 8px; right: 50px; top: 50%; border-top: 3px dashed rgba(255, 255, 255, .55); }
.car { position: absolute; top: 2px; left: 0; font-size: 34px; line-height: 1; transform: scaleX(-1); transition: left .2s linear; }
.flag { position: absolute; right: 8px; top: 6px; font-size: 28px; }
.river { height: 260px; background: linear-gradient(#a8dcff, #5fb4ee); }
.river::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 40%; background: repeating-linear-gradient(90deg, rgba(255, 255, 255, .25) 0 40px, transparent 40px 80px); }
.stones { position: absolute; left: 2%; right: 2%; top: 56%; display: flex; justify-content: space-between; align-items: center; z-index: 1; }
.stone { width: 7.5%; aspect-ratio: 1.6; border-radius: 50%; background: #8d929d; box-shadow: inset 0 -6px 0 rgba(0, 0, 0, .2); display: flex; align-items: center; justify-content: center; font-size: 22px; transition: transform .4s; }
.stone.goal { background: #6cd38f; width: 9%; }
.stone.passed { background: #c3c7cf; }
.stone.sinking { transform: translateY(10px) scale(.88); background: #6e7e98; }
.frog { position: absolute; z-index: 2; font-size: 38px; line-height: 1; margin-left: -19px; margin-top: -38px; transition: left .35s ease-out, top .35s; }
.frog.splash { animation: splash .6s; }
@keyframes splash { 50% { transform: translateY(20px); opacity: .3; } }
.sink { position: absolute; left: 5%; right: 5%; top: 14px; height: 14px; background: rgba(255, 255, 255, .6); border-radius: 99px; overflow: visible; }
.sink i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, #ff7b8a, #ffb547, #4fbf8b); }
.sink span { position: absolute; left: -26px; top: -6px; font-size: 20px; }

/* 사용설명서 */
dialog#guide { max-width: min(820px, 94vw); border: 0; border-radius: 26px; padding: 0; box-shadow: 0 20px 60px rgba(0, 0, 0, .3); }
dialog#guide::backdrop { background: rgba(20, 30, 50, .45); }
.guide-in { padding: 24px 26px; }
.guide-in h2 { margin-top: 0; font-family: var(--title); font-weight: 400; font-size: 30px; color: #1d3a7a; }
.guide-in h3 { margin: 20px 0 6px; font-family: var(--title); font-weight: 400; font-size: 22px; color: var(--pri-d); }
.guide-in li { margin-bottom: 4px; }
.guide-kb { text-align: center; }

@media (max-width: 760px) {
  body { font-size: 16px; }
  .hg-grid { grid-template-columns: 1fr; }
  .kb-key { width: 30px; height: 36px; font-size: 14px; }
  .kb-key i, .kb-key small { display: none; }
  .kb-space { width: 150px; } .kb-hanen { margin-left: 30px; } .kb-wide, .kb-enter { width: 48px; }
  .kb-r1 { padding-left: 10px; } .kb-r2 { padding-left: 16px; }
  .tb-target { font-size: 22px; } .tb-input { font-size: 21px; }
  .hero h1 { font-size: 36px; } .hero-keys span { width: 54px; height: 54px; font-size: 30px; }
  .g-area { height: 300px; }
  .lane { grid-template-columns: 64px 1fr; }
  .brand { display: none; } .sb-txt { display: none; }
  .tiles { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
}
