@charset "UTF-8";
:root{color-scheme:dark;--bg:#1b152c;--card:#271f3d;--muted:#b8accb;--pink:#efa8cf;--gold:#ffcf78;--line:#4a3b61}
*{box-sizing:border-box;-webkit-tap-highlight-color:transparent}
[hidden]{display:none!important}
html,body{margin:0;width:100%;height:100%;background:var(--bg);color:#f8f2ff;font-family:"Pretendard","Apple SD Gothic Neo","Malgun Gothic","Nanum Gothic",system-ui,sans-serif}
body{background:radial-gradient(ellipse at 20% 0%,#3b2852 0,transparent 56%),radial-gradient(ellipse at 90% 100%,#302045 0,transparent 50%),var(--bg);overflow:hidden}
button,input{font:inherit}button{cursor:pointer;border:0;touch-action:manipulation}button:disabled{cursor:wait;opacity:.55}button:focus-visible,input:focus-visible,canvas:focus-visible{outline:3px solid var(--pink);outline-offset:4px}button:hover:not(:disabled){filter:brightness(1.1)}
#app{height:100%;height:100dvh;padding:max(12px,env(safe-area-inset-top)) max(14px,env(safe-area-inset-right)) max(8px,env(safe-area-inset-bottom)) max(14px,env(safe-area-inset-left))}
.start-screen{height:100%;overflow:auto;display:grid;place-items:center;padding:12px 0;scrollbar-width:thin}
.start-card{width:min(100%,440px);padding:28px 32px;border:1px solid #5e476f;border-radius:24px;background:linear-gradient(145deg,#332540e8,#231c35ed);box-shadow:0 22px 80px #07041070}
.eyebrow{font-size:10px;font-weight:800;letter-spacing:.18em;color:var(--pink);display:flex;justify-content:space-between;align-items:center}.eyebrow span{border:1px solid #785575;padding:5px 6px;letter-spacing:.06em}
.title-art{height:98px;display:flex;align-items:flex-end;gap:8px;position:relative;margin:10px 0 18px}.title-art span{border:2px solid #ffffff38;box-shadow:inset -7px -7px 0 #00000015,0 9px 18px #0002;display:grid;place-items:center;color:#271c36;font-weight:900}.title-art span:nth-child(1){width:32px;height:32px;border-radius:50%;background:#ffcad3;transform:rotate(-15deg)}.title-art span:nth-child(2){width:56px;height:56px;border-radius:50%;background:#bca4ec;transform:rotate(13deg)}.title-art span:nth-child(3){width:84px;height:84px;border-radius:50%;background:var(--gold);font-size:30px}.title-art i{font-style:normal;color:var(--pink);font-size:38px;margin:0 0 35px 20px}
h1{font-size:36px;line-height:1.28;letter-spacing:-.05em;margin:0 0 14px}h1 em{font-style:normal;color:var(--pink)}.intro{color:#d6c8df;font-size:13px;line-height:1.8;margin:0 0 24px}label{display:flex;justify-content:space-between;font-weight:700;font-size:13px;margin-bottom:9px}label small{font-weight:400;color:var(--muted);font-size:11px}input{width:100%;padding:13px 15px;border:1px solid #756082;border-radius:10px;background:#1d172b;color:white;font-size:16px;user-select:text}input::placeholder{color:#9d8bac;font-size:13px}
.primary,.secondary{display:block;width:100%;padding:13px 15px;border-radius:10px;font-size:14px;font-weight:800;margin-top:12px}.primary{background:var(--gold);color:#302036;box-shadow:0 3px 0 #a77742}.secondary{background:#433153;color:#f4dcec;border:1px solid #71567e}.text-button{background:none;color:var(--muted);padding:9px 0;font-size:12px}.start-best{margin-top:23px;display:grid;grid-template-columns:1fr auto;gap:4px 12px;padding-top:17px;border-top:1px solid var(--line)}.start-best>span{color:var(--muted);font-size:11px}.start-best strong{grid-column:2;grid-row:1/3;font-size:25px;font-variant-numeric:tabular-nums}.start-best b{font-size:12px;color:#efdeef;overflow-wrap:anywhere}.start-links{display:flex;justify-content:space-between;margin-top:10px}.quiet{color:var(--muted);font-size:11px;line-height:1.7;margin:10px 0 0;overflow-wrap:anywhere}.quiet:empty{display:none}
.name-label{margin-top:15px;font-size:12px}.name-label small{font-size:10px}.consent-label{display:flex;align-items:flex-start;justify-content:flex-start;gap:8px;margin-top:10px;font-size:10px;font-weight:400;line-height:1.65;color:var(--muted)}.consent-label input{width:15px;height:15px;flex-shrink:0;margin:2px 0 0;padding:0;accent-color:var(--pink)}#nameError{color:#ffc0cd}
.game-screen{height:100%;max-width:760px;margin:auto;display:flex;flex-direction:column}.game-header{display:flex;align-items:center;justify-content:space-between;margin-bottom:10px;flex-shrink:0}.brand{display:flex;align-items:center;gap:9px;font-size:14px;letter-spacing:-.04em}.brand-mark{background:var(--pink);color:#2d2039;width:26px;height:26px;display:grid;place-items:center;border-radius:7px}.icon-button{background:#352740;color:#f6ddea;width:34px;height:34px;border-radius:9px;font-size:20px;border:1px solid #675072;flex-shrink:0}.sound-button{display:inline-flex;align-items:center;justify-content:center;padding:0}.sound-button .sound-off{display:none}.sound-button.muted .sound-wave{display:none}.sound-button.muted .sound-off{display:inline}.sound-button.muted{opacity:.7}
.game-layout{display:flex;gap:22px;flex:1;min-height:0}.play-column{display:flex;flex-direction:column;min-width:0;flex:1;min-height:0}.hud{display:flex;align-items:center;gap:15px;padding:4px 4px 12px;flex-shrink:0}.stat{display:flex;flex:1;flex-direction:column;min-width:0;gap:3px}.stat>span{font-size:9px;letter-spacing:.06em;color:var(--muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.stat .player-name{font-size:12px;font-weight:700;color:#f8d8ef;letter-spacing:0}.stat strong{font-size:32px;line-height:1.05;font-weight:800;font-variant-numeric:tabular-nums}.best-stat strong{font-size:23px;color:var(--gold)}.stat small{font-size:10px;color:var(--muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.next-stat{display:flex;align-items:center;gap:7px;background:#342641;border:1px solid #564164;padding:3px 8px;border-radius:12px;flex-shrink:0}.next-stat span{font-size:9px;letter-spacing:.08em;color:var(--muted)}#nextCanvas{width:44px;height:44px}
.board-space{display:flex;justify-content:center;align-items:center;min-height:0;flex:1}#stage{position:relative;flex-shrink:0;border-radius:14px;box-shadow:0 15px 45px #09061380;overflow:hidden}#cv{display:block;touch-action:none;user-select:none;-webkit-user-select:none;overscroll-behavior:contain;border-radius:14px}.control-hint{font-size:10px;color:var(--muted);text-align:center;margin:9px 0 0;flex-shrink:0;line-height:1.4}.control-hint span{display:block;font-size:9px;opacity:.7;margin-top:3px}.danger-hint{position:absolute;top:4px;left:50%;transform:translateX(-50%);white-space:nowrap;background:#a02d44;color:#fff5f2;padding:5px 10px;border-radius:7px;pointer-events:none;font-size:11px;box-shadow:0 2px 10px #8e153530}
.side-panel{width:190px;padding:19px 0;flex-shrink:0}.side-panel h2{font-size:16px;letter-spacing:-.04em;margin:9px 0 20px}.chain{display:grid;grid-template-columns:repeat(3,1fr);gap:9px}.chain-item{background:#352941;border:1px solid #574261;border-radius:12px;display:flex;align-items:center;flex-direction:column;gap:2px;padding:6px;opacity:.5}.chain-item.on{border-color:#eaa0c8;opacity:1}.chain-item canvas{width:40px;height:40px}.chain-item small{font-size:9px;color:#d2bfdc}
dialog{background:var(--card);color:#f8f2ff;border:1px solid #765784;border-radius:21px;padding:0;width:min(440px,calc(100% - 28px));max-height:calc(100dvh - 30px);box-shadow:0 25px 100px #0008;scrollbar-width:thin}dialog::backdrop{background:#0b0719c9;backdrop-filter:blur(4px)}.modal{padding:28px}.modal h2{font-size:25px;letter-spacing:-.045em;margin:12px 0 8px}.modal>p:not(.quiet){color:#d2bddc;font-size:13px}.modal-heading{display:flex;align-items:center;justify-content:space-between;gap:12px}.result{text-align:center}.result>.eyebrow{justify-content:center}.result-name{font-weight:700;overflow-wrap:anywhere}.result-score{display:block;font-size:68px;letter-spacing:-.07em;color:var(--gold);line-height:1.1;font-variant-numeric:tabular-nums}.point-label{font-size:10px;letter-spacing:.2em;color:var(--muted)}.record-badge{font-size:11px;color:var(--pink);margin-top:14px}.result-best{display:flex;justify-content:center;align-items:center;gap:8px;flex-wrap:wrap;border-top:1px solid var(--line);border-bottom:1px solid var(--line);padding:13px;margin-top:20px}.result-best span{font-size:10px;color:var(--muted)}.result-best b{font-variant-numeric:tabular-nums}.result-best small{font-size:11px;overflow-wrap:anywhere}.result .text-button{margin-top:10px}.result>.quiet{display:block}
.ranking-list{padding:0;margin:18px 0;list-style:none;counter-reset:rank}.ranking-list li{display:flex;align-items:center;gap:12px;padding:13px 0;border-bottom:1px solid var(--line);font-size:13px;counter-increment:rank}.ranking-list li::before{content:counter(rank,decimal-leading-zero);font-size:11px;color:var(--pink);min-width:20px}.ranking-list li span{flex:1;overflow-wrap:anywhere}.ranking-list li b{font-variant-numeric:tabular-nums;color:var(--gold)}.skin-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;margin-top:15px}.skin-tile{background:#1f192e;border-radius:10px;padding:8px;min-width:0;text-align:center}.skin-tile canvas{width:70px;height:70px;max-width:100%}.skin-tile b,.skin-tile small{display:block;font-size:10px;line-height:1.5;overflow-wrap:anywhere}.skin-tile small{font-size:9px;color:var(--muted)}
@media(max-width:650px){.side-panel{display:none}.game-screen{max-width:480px}.game-header{margin-bottom:5px}.hud{gap:12px;padding-bottom:8px}.control-hint span{display:none}.stat strong{font-size:29px}.best-stat strong{font-size:22px}.start-card{padding:23px 25px}h1{font-size:34px}}
@media(max-height:620px){.start-card{padding:19px 25px}.title-art{height:63px;margin:4px 0 12px}.title-art span:nth-child(3){width:62px;height:62px}.title-art span:nth-child(2){width:43px;height:43px}.title-art i{font-size:25px;margin-bottom:20px}h1{font-size:29px}.intro{font-size:12px;margin-bottom:15px}.start-best{margin-top:16px;padding-top:12px}.modal{padding:21px}.result-score{font-size:48px}.game-header{margin-bottom:2px}.hud{padding-bottom:5px}.control-hint{margin-top:4px}}
@media(max-height:460px) and (min-width:570px){.game-screen{max-width:900px}.game-header{position:absolute;top:12px;right:18px;left:18px;pointer-events:none}.game-header button{pointer-events:auto}.game-layout{justify-content:center}.play-column{flex:none;display:grid;grid-template-columns:160px minmax(100px,1fr);grid-template-rows:1fr;gap:14px}.hud{flex-direction:column;align-items:stretch;justify-content:center;width:160px;padding:45px 10px 20px}.stat{flex:0;margin-bottom:10px}.board-space{height:calc(100dvh - 20px)}.control-hint,.side-panel{display:none}.next-stat{justify-content:space-between}.modal{padding:20px}.result-score{font-size:44px}.result h2{margin:8px 0}.result-best{margin-top:12px;padding:8px}}
@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto}}

.header-actions{display:flex;gap:8px;align-items:center}.ranking-button{border:1px solid #71567e;background:#433153;color:#f4dcec;border-radius:9px;padding:8px 12px;font-weight:700;pointer-events:auto}#rankStatus{flex-shrink:0;margin:0 0 8px}#rankStatus:empty{display:none}

.result>.text-button{display:block;width:100%;text-align:center;margin-top:3px}.result>#resultRankingOpen{margin-top:12px}

/* 시작 화면: 동그라미 대신 실제 게임 공 그림(1·8·12단계), 크기는 예전 동그라미 그대로 */
.title-art span.ball-art{background:none;border:0;box-shadow:none}
.title-art span.ball-art img{width:100%;height:100%;object-fit:contain;filter:drop-shadow(0 6px 8px #0003)}
/* 일시정지 버튼: 막대 두 개(❚❚) 모양 */
.pause-bars{display:inline-block;width:12px;height:14px;border-left:4px solid currentColor;border-right:4px solid currentColor;box-sizing:border-box;vertical-align:middle}
