:root { --bs: var(--kit-btn-scale, 1); --ink: #2f3550; --muted: #7a809c; --accent: #ff7a3d; --hud: #3d2a1a; }
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; overscroll-behavior: none; }
body { font-family: "Pretendard Variable", "Pretendard", -apple-system, "Apple SD Gothic Neo", "Malgun Gothic", sans-serif; background: #f7d3a1; color: var(--ink); word-break: keep-all; -webkit-tap-highlight-color: transparent; user-select: none; -webkit-user-select: none; touch-action: manipulation; }
body.dark { --hud: #f1efff; }
.hidden { display: none !important; }

#stage { position: fixed; inset: 0; }
#cv { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; }

.top { position: fixed; top: 0; left: 0; right: 0; z-index: 20; display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: calc(env(safe-area-inset-top) + 10px) 14px 8px; pointer-events: none; }
.top > * { pointer-events: auto; }
#accountSlot { margin-left: auto; }
body.playing .top { display: none; }
.top h1 { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.screen { position: fixed; inset: 0; z-index: 10; }
#home { display: flex; flex-direction: column; padding: calc(env(safe-area-inset-top) + 64px) 16px calc(env(safe-area-inset-bottom) + 14px); pointer-events: none; }
#home > * { pointer-events: auto; }
.hero { text-align: center; pointer-events: none !important; }
.title-word { margin: 6px auto 4px; font-size: 44px; font-weight: 900; line-height: 1.1; letter-spacing: -1.5px; color: #ff6a2b; text-shadow: 3px 0 0 #fff, -3px 0 0 #fff, 0 3px 0 #fff, 0 -3px 0 #fff, 2px 2px 0 #fff, -2px 2px 0 #fff, 2px -2px 0 #fff, -2px -2px 0 #fff, 0 8px 22px rgba(160, 70, 20, .3); animation: bob 2.4s ease-in-out infinite; }
.title-sub { margin: 0 auto 10px; font-size: 15px; font-weight: 800; color: #7a4a22; text-shadow: 0 1px 0 rgba(255, 255, 255, .7); }
body.dark .title-word { color: #ffb36b; text-shadow: 0 6px 22px rgba(0, 0, 0, .45); }
body.dark .title-sub { color: #e2dcff; text-shadow: none; }
@keyframes bob { 50% { transform: translateY(-5px); } }
.best { margin: 0 auto; display: inline-block; padding: 6px 14px; border-radius: 99px; background: rgba(255, 255, 255, .88); font-weight: 800; font-size: 14px; color: #c2541a; box-shadow: 0 4px 14px rgba(90, 60, 30, .12); }
.best:empty { display: none; }
.spacer { flex: 1; min-height: 20px; pointer-events: none !important; }
.panel { width: 100%; max-width: 440px; margin: 0 auto; padding: 14px; border-radius: 24px; background: rgba(255, 255, 255, .93); border: 1px solid #f1e4d6; box-shadow: 0 14px 40px rgba(110, 60, 20, .18); display: grid; gap: 8px; max-height: 62vh; overflow-y: auto; }
.big { padding: calc(13px * var(--bs)) 12px; border-radius: calc(16px * var(--bs)); border: 0; font: inherit; font-weight: 900; font-size: calc(16px * var(--bs)); cursor: pointer; transition: transform .1s; line-height: 1.3; }
.big:active { transform: scale(.97); }
.big small { display: block; font-size: 12.5px; font-weight: 700; opacity: .92; }
.big.primary { color: #fff; background: linear-gradient(135deg, #ffa24d, #ff5a3c); box-shadow: 0 8px 20px rgba(255, 100, 50, .32); font-size: calc(20px * var(--bs)); padding: calc(15px * var(--bs)) 12px; }
.big.daily { color: #fff; background: linear-gradient(135deg, #8b7cf6, #4dabf7); box-shadow: 0 8px 20px rgba(100, 120, 240, .28); }
.howto { border-radius: 16px; background: #fff8f1; border: 1px solid #f3e4d4; padding: 8px 12px; }
.howto summary { cursor: pointer; font-weight: 900; font-size: 14px; color: #7a4a22; padding: 2px 0; }
.howto ul { margin: 6px 0 2px; padding-left: 18px; font-size: 13.5px; line-height: 1.6; color: #5c4a3c; }
.howto li { margin: 2px 0; }
.gear { margin: 0; font-size: 12.5px; color: var(--muted); text-align: center; }
.gear b { color: #7a4a22; }

/* 게임 화면 */
#play { pointer-events: none; }
#play button { pointer-events: auto; }
.hud { position: absolute; top: 0; left: 0; right: 0; display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; padding: calc(env(safe-area-inset-top) + 8px) 12px 4px; }
.round { width: calc(42px * var(--bs)); height: calc(42px * var(--bs)); flex: none; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .9); color: #7a4a22; font-size: calc(17px * var(--bs)); font-weight: 900; box-shadow: 0 4px 12px rgba(80, 40, 10, .18); cursor: pointer; display: grid; place-items: center; padding: 0; font-family: inherit; }
.round:active { transform: scale(.94); }
@media (pointer: coarse) { .round { min-width: 44px; min-height: 44px; } }
/* 🎵 은 🔊 바로 아래에 떠 있음 (HUD 높이를 안 바꿔서 코트 크기 그대로) */
.hud-r { position: relative; flex: none; }
.hud-r .mus { position: absolute; top: calc(100% + 6px); right: 0; }
.round.mus { font-size: calc(16px * var(--bs)); }
.round.mus.off { opacity: .6; }
.mus-top { margin-left: auto; width: 44px; height: 44px; } /* 누르기 쉽게 44px (2026-11-07) */
.hud-mid { display: flex; align-items: center; gap: 10px; padding: 6px 14px 6px 8px; border-radius: 22px; background: rgba(255, 255, 255, .88); box-shadow: 0 6px 18px rgba(80, 40, 10, .16); }
body.dark .hud-mid { background: rgba(20, 24, 60, .72); }
.time { display: grid; place-items: center; width: 54px; height: 54px; border-radius: 50%; background: conic-gradient(#ff7a3d calc(var(--t, 1) * 360deg), #f1e4d6 0); position: relative; flex: none; }
.time::before { content: ""; position: absolute; inset: 5px; border-radius: 50%; background: #fff; }
body.dark .time::before { background: #1d2250; }
.time b, .time small { position: relative; line-height: 1; }
.time b { font-size: 22px; font-weight: 900; color: var(--hud); font-variant-numeric: tabular-nums; margin-top: 6px; }
.time small { font-size: 10px; font-weight: 800; color: var(--muted); margin-top: -10px; }
.time.low { background: conic-gradient(#ff3d5a calc(var(--t, 1) * 360deg), #ffd9de 0); animation: tick 1s ease-in-out infinite; }
.time.low b { color: #e8243f; }
.time.plus { animation: plus .5s ease-out; }
@keyframes tick { 50% { transform: scale(1.08); } }
@keyframes plus { 40% { transform: scale(1.25); filter: drop-shadow(0 0 8px #ffd43b); } }
.score { text-align: left; color: var(--hud); min-width: 76px; }
.score b { display: block; font-size: 32px; font-weight: 900; line-height: 1; letter-spacing: -1px; font-variant-numeric: tabular-nums; }
.score b.bump { animation: bump .25s ease-out; }
.score small { display: block; margin-top: 3px; font-size: 12px; font-weight: 800; opacity: .75; white-space: nowrap; }
@keyframes bump { 40% { transform: scale(1.16); } }

/* 연속 골 표시 */
.streak { position: absolute; left: 0; right: 0; bottom: calc(env(safe-area-inset-bottom) + 14px); text-align: center; height: 30px; pointer-events: none; }
.streak span { display: inline-block; padding: 4px 14px; border-radius: 99px; font-weight: 900; font-size: 15px; color: #fff; background: linear-gradient(90deg, #ffa24d, #ff5a3c); box-shadow: 0 4px 14px rgba(255, 90, 60, .35); }
.streak span.fire { background: linear-gradient(90deg, #ff3d5a, #ff8a00, #ffd43b); animation: fire .6s ease-in-out infinite alternate; }
@keyframes fire { to { transform: scale(1.06); box-shadow: 0 4px 22px rgba(255, 120, 0, .7); } }

.pops { position: absolute; left: 0; right: 0; top: 0; height: 0; text-align: center; }
.pop { position: absolute; left: 50%; transform: translateX(-50%); white-space: nowrap; font-weight: 900; font-size: 32px; color: #ff5a1f; text-shadow: 3px 0 0 #fff, 2.6px 1.5px 0 #fff, 1.5px 2.6px 0 #fff, 0 3px 0 #fff, -1.5px 2.6px 0 #fff, -2.6px 1.5px 0 #fff, -3px 0 0 #fff, -2.6px -1.5px 0 #fff, -1.5px -2.6px 0 #fff, 0 -3px 0 #fff, 1.5px -2.6px 0 #fff, 2.6px -1.5px 0 #fff, 0 5px 14px rgba(120, 60, 20, .3); animation: pop 1.1s ease-out forwards; pointer-events: none; }
.pop.small { font-size: 20px; color: #8b5cf6; }
.pop.gold { color: #f08c00; }
.pop.big2 { font-size: 40px; color: #ff6b00; }
.pop.fire { font-size: 38px; color: #ff3d2e; }
.pop.miss { font-size: 19px; color: #6b6f88; }
.pop.lv { font-size: 22px; color: #2b8cff; }
@keyframes pop { 0% { opacity: 0; transform: translate(-50%, 12px) scale(.6); } 15% { opacity: 1; transform: translate(-50%, 0) scale(1.1); } 70% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%, -46px) scale(1); } }

/* 첫 던지기 안내 */
.hint { position: absolute; left: 50%; bottom: calc(env(safe-area-inset-bottom) + 18px); transform: translateX(-50%); display: grid; justify-items: center; gap: 2px; padding: 10px 18px; border-radius: 18px; background: rgba(255, 255, 255, .9); box-shadow: 0 8px 22px rgba(80, 40, 10, .18); pointer-events: none; white-space: nowrap; }
.hint b { font-size: 16px; color: #7a3a12; }
.hint small { font-size: 12px; font-weight: 700; color: var(--muted); }
.hint .hand { font-size: 28px; line-height: 1; animation: flick 1.3s ease-in-out infinite; }
@keyframes flick { 0% { transform: translateY(16px); opacity: 0; } 25% { opacity: 1; } 70% { transform: translateY(-22px); opacity: 1; } 100% { transform: translateY(-26px); opacity: 0; } }

/* 결과 창 */
.res-big { text-align: center; margin: 4px 0 6px; }
.res-big b { display: block; font-size: 48px; font-weight: 900; letter-spacing: -1px; color: #ff5a1f; line-height: 1.1; }
.res-big small { display: block; color: var(--muted); font-weight: 700; font-size: 13.5px; margin-top: 4px; }
.res-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin: 8px 0 4px; }
.res-grid div { background: #fff6ee; border-radius: 12px; padding: 7px 4px; text-align: center; }
.res-grid b { display: block; font-size: 18px; font-weight: 900; color: #7a3a12; }
.res-grid small { font-size: 11.5px; font-weight: 700; color: var(--muted); }
.res-new { display: inline-block; margin-top: 8px; padding: 4px 12px; border-radius: 99px; background: linear-gradient(90deg, #ffd43b, #ff8a3d); color: #fff; font-weight: 900; font-size: 14px; }
.res-actions .kit-btn { min-height: 48px; }
.ad-slot { margin: 10px 0 0; min-height: 0; }

@media (prefers-reduced-motion: reduce) { .title-word, .pop, .score b.bump, .time.low, .streak span.fire, .hint .hand { animation: none; } }
@media (max-height: 640px) { .title-word { font-size: 34px; margin-top: 2px; } .title-sub { display: none; } #home { padding-top: calc(env(safe-area-inset-top) + 54px); } .score b { font-size: 26px; } .time { width: 46px; height: 46px; } }

/* 모드 고르기 (2026-10-28) */
.modes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.mode { border: 0; border-radius: calc(16px * var(--bs)); padding: calc(10px * var(--bs)) 4px; font: inherit; color: #fff; cursor: pointer; display: grid; justify-items: center; gap: 1px; line-height: 1.2; transition: transform .1s; min-height: 76px; }
.mode:active { transform: scale(.96); }
.mode .mi { font-size: 22px; line-height: 1; }
.mode b { font-size: calc(14.5px * var(--bs)); font-weight: 900; white-space: nowrap; }
.mode small { font-size: 11.5px; font-weight: 800; opacity: .95; white-space: nowrap; }
.m-stage { background: linear-gradient(135deg, #ffcf3f, #ff9a1f); box-shadow: 0 6px 16px rgba(255, 160, 30, .3); }
.m-three { background: linear-gradient(135deg, #3ccf91, #1fa2a8); box-shadow: 0 6px 16px rgba(30, 160, 140, .28); }
.m-daily { background: linear-gradient(135deg, #8b7cf6, #4dabf7); box-shadow: 0 6px 16px rgba(100, 120, 240, .28); }

/* HUD 아래 줄: 피버·목표·자리·바람 */
.hgoal { position: absolute; left: 50%; transform: translateX(-50%); bottom: calc(env(safe-area-inset-bottom) + 52px); display: grid; justify-items: center; gap: 4px; pointer-events: none; }
#play:has(#hint:not(.hidden)) .hgoal { visibility: hidden; }
.gs i { font-style: normal; color: #d9cfc2; text-shadow: none; }
.fever { display: grid; justify-items: center; gap: 3px; padding: 4px 12px 6px; border-radius: 14px; background: rgba(255, 255, 255, .85); box-shadow: 0 4px 12px rgba(80, 40, 10, .14); min-width: 170px; }
.fever span { font-size: 12px; font-weight: 900; color: #c2541a; white-space: nowrap; }
.fever i { display: block; width: 150px; height: 7px; border-radius: 9px; background: linear-gradient(90deg, #ff8a00 calc(var(--k) * 100%), #f1e4d6 0); }
.fever.on { background: linear-gradient(90deg, #ff3d5a, #ff8a00, #ffd43b); animation: fire .5s ease-in-out infinite alternate; }
.fever.on span { color: #fff; }
.fever.on i { background: linear-gradient(90deg, #fff calc(var(--k) * 100%), rgba(255, 255, 255, .35) 0); }
body.dark .fever:not(.on), body.dark .goal, body.dark .wind { background: rgba(20, 24, 60, .78); }
body.dark .fever:not(.on) span, body.dark .goal b { color: #ffd59a; }
.goal { display: flex; align-items: center; gap: 8px; padding: 5px 12px; border-radius: 14px; background: rgba(255, 255, 255, .88); box-shadow: 0 4px 12px rgba(80, 40, 10, .14); white-space: nowrap; }
.goal b { font-size: 15px; font-weight: 900; color: #7a3a12; }
.goal small { font-size: 12px; font-weight: 800; color: var(--muted); }
.gs { color: #ffb400; font-weight: 900; letter-spacing: 1px; font-size: 15px; text-shadow: 0 1px 0 #fff; }
.goal.rk .dots { display: flex; gap: 5px; }
.goal.rk .dots i { width: 13px; height: 13px; border-radius: 50%; background: #f1e4d6; border: 2px solid #e2c9ad; }
.goal.rk .dots i.m { border-color: #ffb400; background: #fff3c4; }
.goal.rk .dots i.in { background: #3ccf91; border-color: #1fa27a; }
.goal.rk .dots i.m.in { background: #ffc23a; border-color: #d48a00; }
.goal.rk .dots i.out { background: #c9ccda; border-color: #a3a7bb; }
.wind { padding: 3px 10px; border-radius: 12px; background: rgba(255, 255, 255, .85); font-size: 12.5px; font-weight: 900; color: #2b6cb0; white-space: nowrap; }
body.dark .wind { color: #9fd3ff; }
.pop.fever { font-size: 40px; color: #ff8a00; }
.pop.star { font-size: 40px; color: #ffb400; letter-spacing: 2px; }

/* 스테이지 고르기 */
.wtabs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin: 4px 0 10px; }
.wtab { border: 2px solid #f1e4d6; background: #fff8f1; border-radius: 12px; padding: 7px 2px; font: inherit; font-weight: 900; font-size: 12.5px; color: #7a4a22; cursor: pointer; white-space: nowrap; }
.wtab.on { background: linear-gradient(135deg, #ffcf3f, #ff9a1f); color: #fff; border-color: transparent; }
.wtab:disabled { opacity: .5; cursor: default; }
.sgrid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.sgb { border: 2px solid #f1e4d6; background: #fff; border-radius: 12px; padding: 6px 2px 5px; font: inherit; cursor: pointer; display: grid; justify-items: center; gap: 1px; min-width: 0; }
.sgb b { font-size: 18px; font-weight: 900; color: #7a3a12; line-height: 1.1; }
.sgb small { font-size: 10px; font-weight: 700; color: var(--muted); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sgb span { font-size: 11px; color: #ffb400; letter-spacing: .5px; min-height: 13px; }
.sgb.full { border-color: #ffd36b; background: #fffbea; }
.sgb.lock { background: #f4f1ee; cursor: default; }
.sgb:not(.lock):active { transform: scale(.95); }
.sg-goal { text-align: center; padding: 10px; border-radius: 14px; background: #fff6ee; margin: 6px 0; }
.sg-goal > b { font-size: 17px; color: #7a3a12; }
.sg-stars { display: flex; justify-content: center; gap: 10px; margin-top: 8px; flex-wrap: wrap; }
.sg-stars span { color: #ffb400; font-weight: 900; font-size: 14px; }
.sg-stars span b { color: #5c4a3c; margin-left: 4px; }
.sg-tips { margin: 6px 0 4px; padding-left: 18px; font-size: 13.5px; line-height: 1.6; color: #5c4a3c; }
.sg-tips:empty { display: none; }
.res-stars { display: flex; justify-content: center; gap: 6px; margin: 2px 0 6px; }
.res-stars span { font-size: 54px; line-height: 1; color: #e6dccf; }
.res-stars span.on { color: #ffb400; text-shadow: 0 4px 14px rgba(255, 170, 0, .45); animation: starIn .5s cubic-bezier(.3, 1.6, .5, 1) both; animation-delay: var(--d); }
@keyframes starIn { from { transform: scale(0) rotate(-40deg); opacity: 0; } }
.center { text-align: center; }
@media (prefers-reduced-motion: reduce) { .fever.on, .res-stars span.on { animation: none; } }
@media (max-height: 500px) { .hgoal { left: 64px; top: calc(env(safe-area-inset-top) + 8px); bottom: auto; transform: none; justify-items: start; } }
@media (max-height: 640px) { .mode { min-height: 64px; padding: 7px 4px; } .mode .mi { font-size: 18px; } }
.sgb span i { font-style: normal; color: #e6dccf; }

/* 2편: H-O-R-S-E · 친구 대결 (2026-10-28) */
.modes { grid-template-columns: repeat(6, 1fr); }
.modes .mode { grid-column: span 2; }
.modes .mode.wide { grid-column: span 3; min-height: 0; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 8px; text-align: left; justify-items: start; align-items: center; padding: calc(9px * var(--bs)) 12px; }
.modes .mode.wide .mi { grid-row: span 2; font-size: 24px; }
.m-horse { background: linear-gradient(135deg, #ff7ab6, #c45cf0); box-shadow: 0 6px 16px rgba(200, 90, 220, .28); }
.m-friend { background: linear-gradient(135deg, #ff6b6b, #ff9a3d); box-shadow: 0 6px 16px rgba(255, 110, 80, .28); }
.m-quick { background: linear-gradient(135deg, #8b7cf6, #5fb8ff); box-shadow: 0 6px 16px rgba(110, 120, 240, .3); }
body[data-mode="horse"] .time { display: none; }
body[data-mode="horse"] #hScore { font-size: 20px; letter-spacing: 1px; }
.horse { display: grid; gap: 4px; padding: 7px 12px; border-radius: 16px; background: rgba(255, 255, 255, .9); box-shadow: 0 4px 12px rgba(80, 40, 10, .14); min-width: 230px; }
.horse .hr { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.horse .hr b { font-size: 13.5px; font-weight: 900; color: #7a3a12; white-space: nowrap; }
.horse .hr.cpu b { color: #6b4fd8; }
.horse .hr span { display: flex; gap: 4px; }
.horse .hr i { font-style: normal; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 7px; background: #f1e9df; color: #cbbba8; font-weight: 900; font-size: 14px; }
.horse .hr i.on { background: linear-gradient(135deg, #ff5a5a, #ff9a3d); color: #fff; }
.horse .hr.cpu i.on { background: linear-gradient(135deg, #8b7cf6, #c45cf0); }
.horse p { margin: 2px 0 0; font-size: 12.5px; font-weight: 800; color: #5c4a3c; text-align: center; white-space: nowrap; }
.horse.res { margin: 6px auto 8px; max-width: 280px; box-shadow: none; background: #fff6ee; }
body.dark .horse:not(.res) { background: rgba(20, 24, 60, .8); }
body.dark .horse p, body.dark .horse .hr b { color: #ffe1b8; }
.spots { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.spb { border: 2px solid #f1e4d6; background: #fff; border-radius: 12px; padding: 9px 4px; font: inherit; font-weight: 800; font-size: 13.5px; color: #7a4a22; cursor: pointer; }
.spb.on { background: linear-gradient(135deg, #ffcf3f, #ff9a1f); color: #fff; border-color: transparent; }
.calls { margin-top: 2px; }
.diffs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 8px 0 2px; }
.dfb { border: 2px solid #f1e4d6; background: #fff; border-radius: 14px; padding: 10px 4px; font: inherit; cursor: pointer; display: grid; justify-items: center; gap: 2px; }
.dfb span { font-size: 24px; line-height: 1; }
.dfb b { font-size: 15px; font-weight: 900; color: #7a3a12; }
.dfb small { font-size: 11.5px; font-weight: 700; color: var(--muted); }
.dfb:active { transform: scale(.96); }
.kit-actions.col { flex-direction: column; }
/* 친구 대결 점수판 (오른쪽 위) */
.duel { position: absolute; right: 10px; top: calc(env(safe-area-inset-top) + 64px + 50px * var(--bs, 1)); /* 🎵 단추 아래 (4명이면 🎵 를 덮었음) */ display: grid; gap: 3px; pointer-events: none; }
.dv { display: grid; grid-template-columns: 16px 1fr auto; align-items: center; gap: 6px; padding: 3px 9px; border-radius: 10px; background: rgba(255, 255, 255, .86); box-shadow: 0 3px 10px rgba(80, 40, 10, .12); min-width: 118px; font-size: 12.5px; }
.dv span { font-weight: 900; color: var(--muted); }
.dv b { font-weight: 800; color: #5c4a3c; max-width: 76px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dv em { font-style: normal; font-weight: 900; color: #c2541a; font-variant-numeric: tabular-nums; }
.dv small { grid-column: 1 / -1; font-size: 10px; color: var(--muted); text-align: right; margin-top: -3px; }
.dv.me { background: #fff3c4; }
body.dark .dv { background: rgba(20, 24, 60, .8); } body.dark .dv b { color: #ece8ff; } body.dark .dv.me { background: rgba(120, 90, 20, .8); }
.duel-res { display: grid; gap: 6px; margin: 6px 0; }
.dr { display: grid; grid-template-columns: 30px 1fr auto; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 12px; background: #fff6ee; }
.dr span { font-weight: 900; font-size: 18px; text-align: center; }
.dr b { font-weight: 800; color: #5c4a3c; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dr em { font-style: normal; font-weight: 900; color: #c2541a; }
.dr.me { background: #fff3c4; }
@media (max-height: 640px) { .duel { top: calc(env(safe-area-inset-top) + 56px + 48px * var(--bs, 1)); } .modes .mode.wide .mi { font-size: 18px; } }
@media (max-height: 500px) { .duel { top: calc(env(safe-area-inset-top) + 8px); right: 60px; } }
@media (max-height: 500px) and (min-width: 640px) {
  .panel { max-width: 780px; }
  .modes { grid-template-columns: repeat(6, 1fr); }
  .modes .mode, .modes .mode.wide { grid-column: span 1; grid-template-columns: none; grid-template-rows: none; justify-items: center; text-align: center; min-height: 64px; padding: 7px 4px; }
  .modes .mode.wide .mi { grid-row: auto; font-size: 18px; }
  .big.primary { padding: 9px 12px; font-size: 17px; }
}

/* 3편: 🎁 행운 상자 · 📋 오늘의 미션 (2026-10-28) */
.hub-btns { display: flex; justify-content: center; gap: 8px; margin-top: 10px; flex-wrap: wrap; pointer-events: auto; }
.hero .hub-btns, .hero .hub-btns * { pointer-events: auto; }
.pill { position: relative; border: 0; border-radius: 99px; padding: calc(8px * var(--bs)) 14px; font: inherit; font-weight: 900; font-size: calc(13.5px * var(--bs)); min-height: 44px; cursor: pointer; color: #fff; box-shadow: 0 6px 16px rgba(90, 40, 10, .2); white-space: nowrap; }
.pill b { margin-left: 4px; }
.pill:active { transform: scale(.96); }
.pill.box { background: linear-gradient(135deg, #ff7ab6, #8b5cf6); }
.pill.mission { background: linear-gradient(135deg, #3ccf91, #1f8fe0); }
.pill .dot { position: absolute; top: -2px; right: -2px; width: 12px; height: 12px; border-radius: 50%; background: #ff3d5a; border: 2px solid #fff; animation: tick 1s ease-in-out infinite; }
.missions { display: grid; gap: 8px; margin: 6px 0; }
.ms { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 14px; background: #fff6ee; }
.ms b { display: block; font-size: 14px; color: #5c4a3c; }
.ms i { display: block; height: 7px; border-radius: 9px; margin: 6px 0 2px; background: linear-gradient(90deg, #3ccf91 calc(var(--k) * 100%), #eadfd2 0); }
.ms small { font-size: 11.5px; font-weight: 800; color: var(--muted); }
.ms.done { background: #eafbf3; }
.ms.got { opacity: .65; }
.bx-tabs { margin: 2px 0 8px; }
.bx-stage { min-height: 168px; display: grid; place-items: center; text-align: center; border-radius: 16px; background: radial-gradient(circle at 50% 40%, #fff3c4, #ffe1ef 60%, #efe6ff); padding: 10px; }
.bx-stage p { margin: 4px 0 0; font-size: 13px; font-weight: 800; color: #6b4a6a; }
.bx-box { font-size: 72px; line-height: 1; filter: drop-shadow(0 8px 12px rgba(120, 60, 120, .3)); }
.bx-box.shake { animation: bxShake .14s linear infinite; }
@keyframes bxShake { 25% { transform: rotate(-8deg) scale(1.05); } 75% { transform: rotate(8deg) scale(1.05); } }
.bx-res { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.bx-card { width: 92px; padding: 8px 4px; border-radius: 14px; background: #fff; border: 3px solid var(--gc); display: grid; justify-items: center; gap: 2px; animation: bxIn .45s cubic-bezier(.3, 1.6, .5, 1) both; animation-delay: var(--d); }
.bx-card b { font-size: 12px; color: #3d2a1a; text-align: center; line-height: 1.2; }
.bx-card small { font-size: 10.5px; font-weight: 800; color: var(--gc); text-align: center; }
.bx-card.g2, .bx-card.g3 { box-shadow: 0 0 18px var(--gc); }
@keyframes bxIn { from { transform: scale(0) rotateY(90deg); opacity: 0; } }
.bx-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 6px; }
.bx-it { display: grid; justify-items: center; gap: 2px; padding: 7px 4px; border-radius: 12px; background: #fff; border: 2px solid color-mix(in srgb, var(--gc) 45%, #fff); text-align: center; }
.bx-it b { font-size: 12px; color: #3d2a1a; }
.bx-it small { font-size: 10.5px; font-weight: 800; color: var(--gc); }
.bx-it.no { opacity: .55; background: #f4f1ee; }
.bx-it.on { background: #fffbea; border-color: var(--gc); }
.bx-art { min-height: 48px; display: grid; place-items: center; font-size: 30px; }
.bx-odds { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.bx-odds th, .bx-odds td { padding: 6px 4px; border-bottom: 1px solid #f1e4d6; text-align: left; }
@media (prefers-reduced-motion: reduce) { .bx-box.shake, .bx-card, .pill .dot { animation: none; } }
@media (max-height: 640px) { .hub-btns { margin-top: 4px; } .pill { padding: 6px 12px; } }

/* ⚡ 빠른 대전 (2026-11-03): 💬 채팅 단추는 왼쪽 아래 (공·골대·점수판과 안 겹침). 채팅 창이 열리면 처음 안내 손가락은 숨김 */
body:has(.qm-panel) #hint { display: none; }

/* ---------- 🎬 첫 화면 배경 (kit/title.css 위에 농구 한 판 슛 색·무늬·떠다니는 그림, 2026-11-10) ---------- */
#title { --lt-a: #ff7a1f; --lt-b: #e8304a; --lt-ink: #3d2a1a; --lt-muted: #7a5a40; --lt-brand: #e0601a; --lt-sh: #c0451a; --lt-glow: rgba(255,122,61,.45); --lt-bgc: #e3a86e;
  background-image: repeating-linear-gradient(90deg,rgba(120,60,20,.0) 0 58px,rgba(120,60,20,.22) 58px 60px),repeating-linear-gradient(90deg,#e9b47c 0 60px,#dfa267 60px 120px,#e6ad74 120px 180px);
  --lt-fade: radial-gradient(ellipse at 50% 46%,rgba(255,255,255,0.95) 0,rgba(255,255,255,0.74) 38%,rgba(255,255,255,0) 75%); }
#title .lt-o { filter: drop-shadow(0 6px 10px rgba(90,45,10,.3)); }
#title .key { position: absolute;left:50%;top:0;width:220px;height:34vh;margin-left:-110px;background:rgba(200,70,30,.35);border:6px solid rgba(255,255,255,.85);border-top:0; }
#title .key::after { content:"";position:absolute;left:50%;bottom:-66px;width:132px;height:132px;margin-left:-66px;border:6px solid rgba(255,255,255,.85);border-radius:50%;clip-path:inset(50% 0 0 0); }
#title .arc { position: absolute;left:50%;top:-44vh;width:150vmin;height:150vmin;max-width:900px;max-height:900px;transform:translateX(-50%);border:6px solid rgba(255,255,255,.75);border-radius:50%; }
#title .cc { position: absolute;left:50%;bottom:-120px;width:260px;height:260px;margin-left:-130px;border:6px solid rgba(255,255,255,.85);border-radius:50%;background:radial-gradient(circle,rgba(200,70,30,.35) 50px,transparent 51px); }
#title .mid { position: absolute;left:0;right:0;bottom:0;height:6px;background:rgba(255,255,255,.85); }
#title .bsh { position: absolute;border-radius:50%;background:radial-gradient(ellipse,rgba(80,40,10,.4),transparent 70%); }
#title .bk-o1 { top:1%; left:50%; }
#title .bk-t1 { display: block; transform: translateX(-50%); }
#title .bk-o2 { top:16%; left:6%; --r: -20deg; }
#title .bk-o3 { top:24%; right:7%; --r: 30deg; }
#title .bk-o4 { bottom:9%; left:8%; }
#title .bk-d1 { width:80px;height:18px;bottom:5%;left:calc(8% + 1px); }
#title .bk-o5 { bottom:17%; right:6%; }
#title .bk-o6 { top:40%; left:3%; --r: 15deg; }
#title .bk-o7 { bottom:5%; right:30%; }
#title .bk-d2 { width:64px;height:14px;bottom:3%;right:calc(30% + 1px); }
#title .bk-o8 { font-size:40px; top:7%; right:26%; }
#title .bk-o9 { font-size:34px; top:8%; left:28%; }
#title .bk-o10 { font-size:36px; bottom:21%; left:6%; }
/* 견본에서 고친 자리: 세로 휴대폰은 골대를 계정 칩 아래로, 큰 화면·가로 휴대폰은 공을 작은 단추에서 떨어뜨림 */
@media (orientation: portrait) { #title .bk-o1 { top: 7.5%; } #title .bk-o9 { top: 13%; } #title .bk-o8 { top: 12%; } }
@media (min-width: 900px) and (min-height: 680px) { #title .bk-o7 { right: 26%; } #title .bk-d2 { right: calc(26% + 1px); } }
@media (orientation: landscape) and (max-height: 500px) { #title .bk-o8 { right: 31%; } #title .bk-o10 { display: none; } #title .bk-o7 { right: 21%; } #title .bk-d2 { right: calc(21% + 1px); } }
