@import url('https://fonts.googleapis.com/css2?family=Gowun+Dodum&family=Noto+Sans+KR:wght@400;500;600;700;800;900&display=swap');
:root{color-scheme:light;--ink:#372845;--muted:#776782;--pink:#ec5679;--purple:#775aad;--paper:#fffaf2;--background:#eee8f9;--border:#d6cce7;font-family:'Noto Sans KR',sans-serif;color:var(--ink);background:var(--background);font-synthesis:none}
*{box-sizing:border-box}body{margin:0}button,a,canvas{-webkit-tap-highlight-color:transparent}button{font:inherit;cursor:pointer}button:focus-visible,a:focus-visible,canvas:focus-visible{outline:3px solid #7654c4;outline-offset:4px}button:disabled{cursor:default;opacity:.5}button{transition:background .15s,transform .15s}button:active:not(:disabled){transform:translateY(2px)}[hidden]{display:none!important}.app{max-width:930px;margin:auto;padding:28px 32px 16px}.header{display:flex;align-items:center;justify-content:space-between;padding-bottom:26px;gap:16px}.brand{display:flex;gap:12px;align-items:center;text-decoration:none;color:var(--ink);font-size:1.45rem;font-weight:900;letter-spacing:-1px;line-height:1.25}.brand small{display:block;font-size:.75rem;letter-spacing:.05em;font-weight:500;margin-top:6px;color:var(--muted)}.brand-mark{font-size:2rem;background:#fff9f8;width:53px;height:53px;display:grid;place-items:center;border-radius:18px;transform:rotate(-8deg)}.header-actions{display:flex;gap:8px}.quiet{border:1px solid #d1c5e3;border-radius:12px;background:transparent;padding:10px 13px;color:#5c486f;font-size:.875rem;min-height:44px}.quiet:hover{background:#e4daef}.game-layout{display:grid;grid-template-columns:minmax(0,440px) minmax(210px,260px);gap:34px;justify-content:center;align-items:start}.play-column{min-width:0}.scoreboard{display:flex;align-items:center;padding:0 4px 14px;gap:26px}.scoreboard>div>span:first-child{display:block;font-size:.8rem;font-weight:600;color:var(--muted);margin-bottom:2px}.score strong{font-size:2rem;line-height:1.3;font-weight:900;letter-spacing:-1px;display:block;font-variant-numeric:tabular-nums}.best strong{font-size:1.4rem;font-weight:800;font-variant-numeric:tabular-nums}.best small{font-size:.65rem;font-weight:400}.next{margin-left:auto;text-align:center;border-left:1px solid var(--border);padding-left:22px;min-width:75px}.next>span:last-child{display:block;font-size:1.7rem;height:36px;line-height:36px}.next img{width:42px;height:42px;object-fit:contain}.board-wrap{position:relative;aspect-ratio:440/570;background:var(--paper);border:4px solid #bbaeCD;border-top:0;border-radius:15px 15px 38px 38px;box-shadow:0 7px 0 #d5c7e7,0 16px 30px #68517c0a;isolation:isolate;overflow:hidden}canvas{width:100%;height:100%;display:block;touch-action:none;cursor:crosshair}.empty-hint{position:absolute;left:0;right:0;top:47%;text-align:center;pointer-events:none;color:#a49aa9;font-family:'Gowun Dodum',sans-serif;font-size:1.1rem}.empty-hint small{display:block;margin-top:8px;font-size:.875rem;color:#a397a8}.play-controls{display:flex;gap:10px;margin-top:22px}.primary{border:0;background:var(--pink);color:#fff;padding:12px 22px;border-radius:14px;min-height:46px;font-size:.95rem;font-weight:700;box-shadow:0 4px 0 #c23d5d}.primary:hover{background:#df4268}.drop{flex:1;display:flex;justify-content:center;gap:18px}.drop span{font-size:1.1rem;line-height:1}.restart{border:1px solid #ccbfdf;background:#e4d9f3;color:#6a507f;font-size:1.7rem;line-height:1;width:52px;border-radius:14px}.control-hint{text-align:center;font-size:.75rem;color:var(--muted);line-height:1.8;margin:15px -8px 0}.control-hint>span{margin:0 6px;color:#afa0be}kbd{font-family:inherit;font-size:.7rem;padding:2px 5px;border:1px solid #d4c8e2;border-radius:4px;background:#f8f4fd}.sidebar{padding-top:7px}.goal-card{position:relative;background:#f9dce5;border-radius:24px;padding:23px 25px 21px;overflow:hidden}.eyebrow{font-size:.75rem;font-weight:700;letter-spacing:.04em;color:#a34c67}.goal-card h1{font-family:'Gowun Dodum',sans-serif;font-size:2rem;letter-spacing:-1px;line-height:1.35;margin:13px 0 14px;font-weight:600}.goal-fruit{position:absolute;right:10px;top:77px;font-size:4rem;transform:rotate(-18deg)}.goal-card p{font-size:.875rem;color:#965c70;line-height:1.85;margin:0}.section-heading{display:flex;justify-content:space-between;align-items:center;margin:29px 0 16px}.section-heading h2{font-size:.95rem;letter-spacing:-.5px;margin:0}.section-heading span{font-size:.75rem;color:var(--muted);font-variant-numeric:tabular-nums}.fruit-list{display:grid;grid-template-columns:repeat(4,1fr);gap:12px 6px}.fruit-item{text-align:center;position:relative;color:#82718f;font-size:.75rem}.fruit-icon{display:grid;place-items:center;width:46px;height:46px;background:#ffffff5e;border-radius:50%;margin:0 auto 4px;font-size:1.7rem;border:2px solid transparent}.fruit-item.reached .fruit-icon{background:#fffaf3;border-color:#d9cbaa}.fruit-item.current .fruit-icon{border-color:#ec7191;background:#fff5f5}.fruit-item img{width:44px;height:44px;object-fit:contain}.fruit-item:last-child{grid-column:span 2}.fruit-item:last-child .fruit-icon{width:64px;border-radius:26px;background:#d9eacb}.tip{display:flex;gap:10px;margin-top:24px;font-size:.8rem;color:var(--muted);line-height:1.9;border-top:1px solid var(--border);padding-top:18px}.tip>span{font-size:1.3rem;color:var(--purple)}footer{text-align:center;color:#897b93;font-family:'Gowun Dodum',sans-serif;font-size:.75rem;letter-spacing:.04em;padding:24px 0 0}footer span{color:#b39dcb;margin-left:8px}.overlay{position:absolute;inset:0;display:grid;place-items:center;background:#fff9f1d9;backdrop-filter:blur(7px);z-index:3;padding:20px}.result{text-align:center}.result-emoji{font-size:4rem}.result h1{font-family:'Gowun Dodum',sans-serif;font-size:1.8rem;margin:12px 0}.result p{font-size:.9rem;line-height:1.7;margin-bottom:24px;color:var(--muted)}.toast{position:absolute;z-index:2;top:28%;left:50%;transform:translateX(-50%);background:#443251ed;border-radius:14px;color:#fff;padding:12px 16px;max-width:95%;width:max-content;font-size:.9rem;pointer-events:none}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}dialog{border:0;border-radius:24px;padding:28px;max-width:min(420px,90vw);color:var(--ink);background:var(--paper);box-shadow:0 20px 80px #38254833}dialog::backdrop{background:#392d4a66;backdrop-filter:blur(4px)}dialog h2{font-size:1.3rem;margin-top:0}dialog p{font-size:.9rem;line-height:1.7;color:var(--muted)}.dialog-actions{display:flex;justify-content:flex-end;gap:10px;margin-top:24px}
@media(min-width:721px) and (max-height:850px){.app{max-width:830px;padding-top:18px}.header{padding-bottom:17px}.game-layout{grid-template-columns:minmax(0,360px) minmax(210px,240px);gap:28px}.goal-card{padding:20px}.goal-card h1{font-size:1.75rem}.goal-fruit{font-size:3.5rem;right:8px}.section-heading{margin-top:22px}.fruit-list{gap:8px 6px}.fruit-icon{width:40px;height:40px;font-size:1.5rem}.fruit-item img{width:38px;height:38px}.tip{margin-top:18px}footer{padding-top:17px}}
@media(max-width:720px){.app{max-width:520px;padding:18px 18px 16px}.header{padding-bottom:23px}.brand{font-size:1.2rem;gap:8px}.brand-mark{width:43px;height:43px;font-size:1.7rem;border-radius:14px}.brand small{font-size:.65rem}.header-actions{gap:6px}.quiet{padding:8px 10px;font-size:.75rem}.game-layout{display:block}.scoreboard{gap:21px}.sidebar{padding-top:4px}.goal-card{display:none}.section-heading{margin:24px 0 12px}.fruit-list{grid-template-columns:repeat(6,1fr);gap:12px 4px}.fruit-item:last-child{grid-column:span 2}.fruit-icon{width:40px;height:40px;font-size:1.5rem}.fruit-item img{width:38px;height:38px}.tip{margin:18px 0 0;padding-top:14px}.control-hint{font-size:.7rem}footer{padding-top:18px}.board-wrap{border-radius:13px 13px 30px 30px}.best small{display:none}}
@media(prefers-reduced-motion:reduce){button{transition:none}}
.atlas-icon{display:inline-block;width:44px;height:44px;background-image:url('assets/fruit-atlas.png');background-size:400% 300%;background-repeat:no-repeat;vertical-align:middle}.next .atlas-icon{width:38px;height:38px}.fruit-item img{display:block}.goal-fruit .atlas-icon{width:86px;height:86px}
@media(max-width:360px){.header{flex-wrap:wrap;gap:12px}.brand{flex-shrink:0}.header-actions{margin-left:auto}.quiet{white-space:nowrap}}
.brand-mark{flex-shrink:0}.brand-mark img{width:100%;height:100%;object-fit:contain}.goal-fruit img{width:86px;height:86px;object-fit:contain}
@media(max-width:480px){.header{flex-wrap:wrap}.header-actions{margin-left:auto}}
.result-emoji img{width:70px;height:70px;object-fit:contain}
.result #record-score{display:block;margin:12px auto}.result #record-score[hidden]{display:none}
#score-dialog,#ranking-dialog{box-sizing:border-box;width:min(420px,calc(100vw - 32px));max-height:85dvh;overflow:auto}
.record-points{font-size:1.6rem;color:#795594}.record-points strong{font-size:2.2rem}
#player-name{box-sizing:border-box;display:block;width:100%;font:inherit;font-size:16px;border:2px solid #dbcce5;border-radius:12px;padding:12px;margin-top:8px;color:#513951;background:#fff}
#player-name:focus{outline:2px solid #9c79bf;outline-offset:2px}
.record-note,#record-status,#ranking-status{font-size:.85rem;line-height:1.6;color:#806780}
#record-status{color:#9a395c;min-height:1.5em}.ranking-heading{display:flex;align-items:center;justify-content:space-between;gap:12px}
.ranking-list{list-style:none;margin:16px 0;padding:0}.ranking-row{display:flex;align-items:center;gap:12px;padding:12px 10px;border-bottom:1px solid #eee4ed;border-radius:10px;font-size:.9rem}
.ranking-rank{flex:0 0 38px;color:#8a708c}.ranking-name{flex:1;min-width:0;overflow-wrap:anywhere}.ranking-row strong{white-space:nowrap}
.ranking-row.mine{background:#eee0ff;color:#5d2989;border:1px solid #c4a0e2;margin:5px 0;font-weight:700}.ranking-row.mine .ranking-rank{color:#5d2989}.ranking-name small{display:block;font-size:.7rem;margin-top:3px;color:#743b9f}
.board-wrap.danger{animation:overflow-warning 1s ease-in-out infinite;outline:3px solid #e74154;outline-offset:0}
.board-wrap.danger-paused{animation-play-state:paused}
@keyframes overflow-warning{0%,100%{border-color:#e74154;outline-color:#e74154;box-shadow:0 0 0 2px #e7415426,0 0 12px #e7415440}50%{border-color:#ff8790;outline-color:#ff8790;box-shadow:0 0 0 6px #e7415440,0 0 26px #e7415480}}
@media(prefers-reduced-motion:reduce){.board-wrap.danger{animation:none;border-color:#e74154;box-shadow:0 0 0 3px #e7415440}}
