:root{--ink:#17263e;--muted:#687482;--paper:#f7f5ef;--red:#ef493f;--blue:#176f86;--yellow:#f6ce55;--line:#e2e2da;font-family:'Noto Sans KR',system-ui,sans-serif;color:var(--ink);background:var(--paper);font-synthesis:none}*{box-sizing:border-box}body{margin:0}button,a{-webkit-tap-highlight-color:transparent}button{font:inherit;cursor:pointer;color:inherit;touch-action:manipulation}button:focus-visible,a:focus-visible{outline:4px solid #078dab;outline-offset:5px}button:disabled{cursor:default}button{transition:transform .16s,box-shadow .16s,background .16s}button:active{transform:translateY(3px)}[hidden]{display:none!important}.topbar{height:86px;max-width:1320px;padding:0 48px;margin:auto;display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid var(--line)}.brand{font-size:19px;font-weight:900;letter-spacing:-.6px;display:flex;align-items:center;color:var(--ink);text-decoration:none;gap:5px}.brand-icon{display:grid;place-items:center;background:var(--red);color:white;border-radius:12px;width:37px;height:37px;font-size:31px;margin-right:5px;transform:rotate(-6deg)}.brand-light{font-weight:500}.top-actions{display:flex;align-items:center;gap:12px}.age-chip{font-size:12px;font-weight:700;color:#247960;background:#e5efe7;padding:7px 12px;border-radius:30px}.icon-button{border:1px solid #dddeda;border-radius:50px;background:transparent;min-width:42px;height:42px;font-size:18px;padding:0 13px}.icon-button span{font-size:12px;vertical-align:middle}main{max-width:1224px;padding:0 0 28px;margin:auto}.intro{position:relative;padding:49px 0 32px}.eyebrow{font-size:11px;text-transform:uppercase;letter-spacing:1.4px;font-weight:800;color:var(--blue);display:flex;align-items:center;gap:7px}.eyebrow>span{width:7px;height:7px;background:var(--red);border-radius:50%}h1{font-family:'Black Han Sans','Noto Sans KR',sans-serif;font-weight:900;font-size:46px;line-height:1.32;letter-spacing:-2px;margin:17px 0 13px}h1>span{color:var(--red)}.intro p{font-size:15px;line-height:1.8;color:var(--muted);margin:0}.mobile-break{display:none}.intro-sticker{position:absolute;right:65px;top:78px;transform:rotate(-12deg);font-family:Impact,'Arial Black',sans-serif;font-style:italic;font-size:68px;letter-spacing:-2px;color:var(--red);text-shadow:3px 3px 0 var(--yellow)}.intro-sticker:before,.intro-sticker:after{content:'';position:absolute;inset:-22px -38px;border:2px solid #17263e20;border-radius:50%;transform:rotate(-10deg)}.intro-sticker:after{inset:-40px -19px;transform:rotate(25deg)}.intro-sticker span{font-family:'Noto Sans KR',sans-serif;display:block;letter-spacing:1px;font-size:11px;text-align:center;color:var(--ink);font-style:normal;text-shadow:none}.section-label{display:flex;align-items:center;justify-content:space-between;margin:8px 0 19px}.section-label h2{display:flex;align-items:center;gap:10px;font-size:17px;margin:0;letter-spacing:-.6px}.step{background:var(--ink);color:white;width:24px;height:24px;display:grid;place-items:center;border-radius:50%;font-size:12px}.section-label>span{font-size:11px;color:var(--muted)}.hero-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:17px}.hero-card{padding:0;border:2px solid transparent;border-radius:20px;overflow:hidden;background:white;text-align:left;position:relative;box-shadow:0 3px 0 #17263e08}.hero-card:hover{transform:translateY(-5px);box-shadow:0 10px 24px #17263e0d}.hero-card.selected{border-color:var(--red);box-shadow:0 0 0 3px #ef493f15}.hero-art{height:192px;background:var(--card-bg);position:relative;overflow:hidden;display:grid;place-items:center}.hero-art:before{content:'';position:absolute;width:170px;height:170px;border-radius:50%;border:1px solid #ffffff90;box-shadow:0 0 0 23px #ffffff25,0 0 0 46px #ffffff14}.hero-art svg{height:188px;width:190px;position:relative;filter:drop-shadow(0 10px 0 #17263e0b)}.hero-num{position:absolute;left:16px;top:12px;font-size:11px;opacity:.4;font-weight:800}.selected-check{position:absolute;right:13px;top:13px;background:var(--red);color:white;border:3px solid white;box-sizing:content-box;border-radius:50%;width:20px;height:20px;display:grid;place-items:center;font-size:12px;opacity:0}.selected .selected-check{opacity:1}.hero-info{padding:16px 18px 18px}.hero-info .alias{font-size:9px;letter-spacing:1.5px;font-weight:800;color:var(--muted)}.hero-info h3{margin:6px 0 10px;font-size:18px;letter-spacing:-.8px}.hero-info p{font-size:11px;color:var(--muted);margin:0;line-height:1.7}.trait{font-size:10px;color:var(--blue);display:inline-block;background:#edf6f6;border-radius:5px;padding:3px 7px;margin-bottom:10px;font-weight:700}.launch-panel{display:flex;align-items:center;justify-content:space-between;margin-top:25px;padding:23px 28px;background:#eeece5;border:1px solid #e4e1d7;border-radius:16px}.small-label{font-size:10px;display:block;color:var(--muted);margin-bottom:5px}.launch-panel strong{font-size:19px}.launch-panel p{font-size:12px;color:var(--muted);margin:7px 0 0}.primary{border:0;background:var(--red);color:#fff;border-radius:13px;padding:18px 31px;font-size:19px;font-weight:800;box-shadow:0 5px 0 #bd342d}.primary:hover{background:#e83b32}.primary>span{margin-left:20px}.home-bottom{display:grid;grid-template-columns:repeat(3,1fr);margin-top:32px;padding:0 10px;gap:15px}.home-bottom>div{display:grid;grid-template-columns:38px 1fr;align-items:center}.home-bottom>div>span{grid-row:span 2;font-size:27px;color:var(--blue)}.home-bottom strong{font-size:12px}.home-bottom p{font-size:11px;color:var(--muted);margin:5px 0 0}.fan-note{font-size:9px;text-align:center;color:#949b9e;margin:32px 0 0}.game-heading{display:flex;justify-content:space-between;align-items:center;padding:25px 0 19px}.game-heading h2{margin:5px 0 0;font-size:23px;letter-spacing:-1px}.game-toolbar{display:flex;gap:8px}.pill{font-size:12px;padding:12px 16px;background:white;border:1px solid var(--line);border-radius:50px;font-weight:700;min-height:46px}.pill[aria-pressed=true]{background:#e7f1eb;color:#286d54;border-color:#bdd5c5}.arena-wrap{position:relative;border-radius:24px;overflow:hidden;border:2px solid var(--ink);box-shadow:0 6px 0 #17263e13;background:#dceff1;isolation:isolate}canvas{width:100%;display:block;touch-action:none;aspect-ratio:1200/640}.game-hud{position:absolute;pointer-events:none;inset:20px 22px auto;display:flex;justify-content:space-between;align-items:flex-start;gap:8px}.health-card,.mission-card,.score-card{background:#fffef1eb;border:1px solid #ffffffb3;box-shadow:0 3px 0 #17263e0b;border-radius:12px;padding:11px 15px}.health-card>span:first-child{display:block;font-size:11px;font-weight:800;margin-bottom:3px}#hearts{color:var(--red);font-size:21px;letter-spacing:3px;white-space:nowrap}.mission-card{width:210px;text-align:center}.mission-card>span{font-size:10px}.mission-card strong{font-size:14px;display:block;margin:4px 0 6px}.progress-track{height:5px;border-radius:5px;background:#dedfd6;overflow:hidden}.progress-track i{display:block;height:100%;background:#288f86;transition:width .3s;width:0}.score-card{color:#aa6a00;font-size:23px}.score-card strong{font-size:18px;color:var(--ink)}.arena-banner{position:absolute;top:23%;left:50%;transform:translateX(-50%);background:var(--ink);color:white;border-radius:50px;padding:12px 23px;text-align:center;font-size:15px;font-weight:800;pointer-events:none;opacity:0;transition:opacity .2s;white-space:nowrap}.arena-banner.show{opacity:1}.game-tip{position:absolute;bottom:16px;left:50%;transform:translateX(-50%);font-size:12px;background:#fffef1e0;padding:9px 17px;border-radius:50px;pointer-events:none;white-space:nowrap}.controls{display:grid;grid-template-columns:1fr 1.8fr 1fr;gap:17px;max-width:860px;margin:23px auto 0}.control-button{min-height:79px;padding:13px 10px;font-size:18px;border-radius:15px;user-select:none;-webkit-user-select:none;touch-action:none}.control-button>span{font-size:24px;margin:0 8px 0 0;vertical-align:middle}.control-button small{display:block;font-size:10px;margin:5px 0 0;opacity:.75;font-weight:500}.secondary{background:#fff;border:1px solid #dbdedc;box-shadow:0 4px 0 #d5d8d5;font-weight:800}.power{background:var(--yellow);border:1px solid #e4b635;box-shadow:0 4px 0 #cfaa37;font-weight:800}.power:disabled{opacity:.5;filter:saturate(.6)}.play-note{text-align:center;color:var(--muted);font-size:11px;margin:22px 0 0}.play-note span{margin:0 9px}dialog{border:2px solid var(--ink);border-radius:24px;padding:30px;max-width:520px;width:calc(100% - 30px);color:var(--ink);background:var(--paper);box-shadow:0 12px 0 #17263e20}dialog::backdrop{background:#101c3580;backdrop-filter:blur(5px)}.modal-icon{font-size:51px;margin-bottom:12px}.modal-body{text-align:center}.modal-body h2{font-size:27px;letter-spacing:-1px;margin:0 0 12px}.modal-body p{font-size:14px;color:var(--muted);line-height:1.8;margin:8px 0 22px}.modal-actions{display:flex;flex-direction:column;gap:13px}.modal-actions button{padding:16px;font-size:17px}.upgrade-list{display:grid;gap:10px;margin:20px 0}.upgrade{display:flex;gap:14px;align-items:center;padding:17px;border-radius:13px;border:1px solid #deded5;background:white;text-align:left}.upgrade:hover{border-color:var(--red);background:#fff7ef}.upgrade>span{font-size:30px}.upgrade strong{display:block;font-size:16px}.upgrade small{display:block;margin-top:5px;color:var(--muted);font-size:12px}.help-steps{padding:0;text-align:left;list-style:none}.help-steps li{background:white;margin:8px 0;padding:13px;border-radius:10px;font-size:13px;line-height:1.8}.result-stars{color:#eab637;font-size:40px;letter-spacing:9px;margin:15px}.record{font-size:11px;color:var(--blue);margin:10px}.shake{animation:wiggle .3s}@keyframes wiggle{25%{transform:translateX(-3px)}75%{transform:translateX(3px)}}
@media(min-width:1500px){main{padding-top:15px}.intro{padding-top:60px;padding-bottom:42px}.hero-art{height:223px}.hero-art svg{height:214px}}
@media(max-width:1320px){main{margin:0 48px}.topbar{margin:0 0}}
@media(max-width:900px){main{margin:0 25px}.topbar{padding:0 25px;height:72px}.hero-grid{gap:10px}.hero-info{padding:13px 12px}.hero-info h3{font-size:16px}.hero-art{height:168px}.hero-art svg{height:166px;width:165px}.intro-sticker{right:30px;font-size:52px}.intro h1{font-size:38px}.health-card,.mission-card,.score-card{padding:8px 10px}.game-hud{inset:12px 12px auto}.mission-card{width:170px}#hearts{font-size:16px;letter-spacing:1px}.game-heading h2{font-size:20px}}
@media(max-width:620px){main{margin:0 17px}.topbar{padding:0 17px;height:68px}.brand{font-size:15px}.brand-icon{width:29px;height:29px;font-size:24px}.age-chip{display:none}.icon-button span{display:none}.top-actions{gap:6px}.icon-button{height:38px;min-width:38px;padding:0 10px}.intro{padding:32px 0 27px}.intro h1{font-size:33px;letter-spacing:-1.6px}.intro p{font-size:12px}.intro-sticker{display:none}.eyebrow{font-size:9px}.section-label h2{font-size:15px}.section-label>span{font-size:9px}.hero-grid{grid-template-columns:repeat(2,1fr);gap:12px}.hero-art{height:153px}.hero-art svg{height:154px;width:154px}.hero-info h3{font-size:17px}.hero-info .alias{font-size:8px}.hero-info p{font-size:10px}.hero-info{padding:12px 13px}.trait{margin-bottom:7px}.launch-panel{padding:18px;gap:10px;flex-wrap:wrap;margin-top:20px}.launch-panel>div{width:100%}.launch-panel .primary{width:100%;margin:4px 0 5px}.home-bottom{grid-template-columns:1fr;gap:19px;margin:27px 7px}.home-bottom>div{grid-template-columns:38px 1fr}.home-bottom strong{font-size:13px}.home-bottom p{font-size:11px}.game-heading{gap:8px;align-items:center;padding:20px 0 14px}.game-heading h2{font-size:17px}.game-toolbar{gap:5px}.pill{font-size:10px;padding:9px 10px;min-height:43px}.arena-wrap{border-radius:16px}canvas{aspect-ratio:760/660;height: min(53vh,470px);width:100%}.game-hud{inset:9px 9px auto}.health-card>span:first-child{font-size:9px}.health-card{max-width:44%}#hearts{font-size:13px;letter-spacing:0}.mission-card{width:105px;padding:6px}.mission-card>span{font-size:8px}.mission-card strong{font-size:12px}.score-card{font-size:16px;padding:7px}.score-card strong{font-size:14px}.game-tip{font-size:9px;bottom:12px;padding:7px 10px}.controls{gap:9px;margin-top:17px;grid-template-columns:1fr 1.6fr 1fr}.control-button{font-size:13px;min-height:80px;padding:8px 4px;border-radius:12px}.control-button>span{font-size:22px;display:block;margin:0 0 4px}.control-button small{font-size:8px}.play-note{font-size:10px;line-height:1.9;margin-top:17px}.play-note span{display:block;font-size:0;height:0}.arena-banner{font-size:12px;max-width:94%;white-space:normal;width:max-content;padding:10px 14px}.mobile-break{display:block}.fan-note{font-size:8px}}
.install-panel{display:flex;justify-content:space-between;align-items:center;gap:16px;border-top:1px solid var(--line);padding:23px 8px 0;margin-top:30px}.install-panel strong{font-size:13px}.install-panel p{font-size:11px;color:var(--muted);margin:7px 0}.install-panel #offline-status{font-size:10px;color:var(--muted)}.install-panel #offline-status.ready{color:#27715b}.installed .install-panel{display:none}body{padding:env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left)}
@media(max-height:820px) and (min-width:621px){#play .game-heading{padding:15px 0 12px}#play .arena-wrap{max-width:1000px;margin:auto}#play canvas{max-height:calc(100dvh - 275px)}#play .controls{margin-top:16px}#play .play-note{margin-top:17px}}
@media(max-width:620px){.install-panel{align-items:flex-start}.install-panel .pill{white-space:nowrap}.install-panel p{font-size:10px}}
@media(prefers-reduced-motion:reduce){*{transition:none!important;animation:none!important}}
.installed .install-panel{display:flex}.installed .install-panel>button,.installed .install-panel p{display:none}.installed .install-panel strong{display:block;margin-bottom:8px}
.launch-actions{display:flex;flex-direction:column;gap:12px}.launch-actions .secondary{border-radius:12px;padding:12px 16px;font-size:14px;font-weight:800}.power.aiming{outline:4px solid #159cab;outline-offset:3px;background:#fff1a3}.arena-wrap{border-color:#283e58;background:#12213a}.game-hud>div{background:#102236e8;border:1px solid #557188;color:#f3f6f2}.score-card strong{color:#fff}.game-tip{background:#13283ee6;color:#d7e6ed}.arena-banner{background:#eef5ec;color:#14253e}.progress-track{background:#33475b}.progress-track i{background:#56cfb2}
.icon-button.music-on{background:#e8f0e8;border-color:#b8d0be;color:#286f51}
html.game-active,html.game-active body,html.game-active #play{touch-action:none;overscroll-behavior:none}html.game-active #play{-webkit-user-select:none;user-select:none;-webkit-touch-callout:none}
@media(max-width:620px){.launch-actions{width:100%}.launch-actions .primary{margin:0;font-size:17px}.launch-panel>div.launch-actions{width:100%}}
@media(max-height:820px) and (min-width:621px){#play .arena-wrap{max-width:min(100%,calc((100dvh - 290px)*1.875))}#play canvas{max-height:none}}

.new-adventure{display:flex;align-items:center;justify-content:space-between;gap:24px;margin-top:28px;padding:20px 24px;border:1px dashed #c4c8ce;border-radius:14px;background:#f0efe9}.new-adventure[hidden]{display:none}.new-adventure strong{font-size:13px;color:#596473}.new-adventure p{font-size:11px;color:#6a7581;line-height:1.7}.restart-button{padding:13px 20px;border-radius:10px;font-size:13px;white-space:nowrap}.launch-actions #continue{font-size:17px}.launch-actions #continue-note{font-size:12px;text-align:center;color:#396956}#first-start-slot:empty{display:none}@media(max-width:620px){.new-adventure{align-items:flex-start;flex-direction:column;gap:8px}.launch-actions #continue{width:100%;font-size:15px}}

/* Game taps must not select text, drag artwork, or trigger double-tap zoom. */
html, body { touch-action: manipulation; }
body, body * { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; -webkit-user-drag: none; }
input, textarea, [contenteditable="true"] { -webkit-user-select: text; user-select: text; }

.duel-entry{display:flex;justify-content:space-between;align-items:center;gap:20px;padding:24px;background:#172940;color:#f0f7ff;border-radius:20px;margin:20px 0}.duel-entry p{font-size:12px;color:#b8d1df}.duel-entry a{text-decoration:none;text-align:center}#danger-overlay{position:fixed;inset:0;z-index:9999;pointer-events:none;opacity:0;background:radial-gradient(ellipse at center,transparent 35%,rgba(225,24,47,.16) 80%,rgba(237,34,50,.36) 100%);box-shadow:inset 0 0 70px #e2223438}.danger-active #danger-overlay{animation:danger-heartbeat 1.8s ease-in-out infinite}@keyframes danger-heartbeat{0%,45%,100%{opacity:.2}15%,32%{opacity:.85}23%{opacity:.4}}@media(prefers-reduced-motion:reduce){.danger-active #danger-overlay{animation:none;opacity:.4}}@media(max-width:600px){.duel-entry{flex-direction:column;align-items:stretch}}

.cards-picture-button{display:inline-flex;align-items:center;justify-content:center;gap:5px;min-width:84px;padding:5px 13px!important}.cards-picture-button svg{width:52px;height:44px}.cards-picture-count{font-size:11px}.hero-change-button{min-width:75px;padding:5px 13px!important}.hero-change-button svg{width:49px;height:42px}.upgrade-list{display:grid;grid-template-columns:repeat(3,1fr);gap:12px}.picture-upgrade{position:relative;display:grid;place-items:center;min-height:140px;padding:18px;border:2px solid #cfdae1;background:#f0f7fc}.picture-upgrade svg{width:92px;max-width:100%;height:92px}.picture-upgrade .upgrade-plus{position:absolute;right:4px;bottom:4px;background:#173c59;color:white;font-size:22px;border-radius:50%;width:28px;height:28px}.top-actions{flex-wrap:wrap;justify-content:flex-end}.top-actions #assist{font-size:11px;min-height:40px;padding:9px 12px}@media(max-width:600px){.topbar{height:auto;min-height:80px;padding:12px 15px;gap:10px}.top-actions{gap:5px}.top-actions .age-chip{display:none}.picture-upgrade{min-height:108px;padding:10px}.picture-upgrade svg{height:75px}.upgrade-list{gap:7px}}

.stage-journey{display:flex;justify-content:space-between;gap:6px;padding:0 8px;margin:-6px 0 8px;max-width:800px}.journey-building{position:relative;width:60px;height:51px;opacity:.65}.journey-building.current{opacity:1;filter:drop-shadow(0 0 5px #f4c75188)}.journey-building svg{width:100%;height:100%}.journey-building i{position:absolute;top:-8px;left:40%;font-style:normal;color:#ef493f;font-size:13px}@media(max-height:850px){.journey-building{height:35px}.stage-journey{margin:0 0 5px}}

html,body{touch-action:pan-x pan-y}

.wave-ready{box-shadow:0 0 0 4px #fff5aa,0 0 26px #ffd66c!important}

.menu-picture{display:inline-flex;flex-direction:column;align-items:center;justify-content:center;gap:5px;width:190px;min-height:160px;padding:12px;border:2px solid #ffffff77;border-radius:22px;color:#fff!important;text-decoration:none;box-shadow:0 5px 0 #193e4e33;font-weight:900}.menu-picture svg{width:150px;height:113px;max-width:100%}.menu-picture span{font-size:16px}.menu-continue{background:linear-gradient(140deg,#247a78,#17576e)}.menu-new{background:linear-gradient(140deg,#369b7d,#1d6b70)}.menu-duel{background:linear-gradient(140deg,#6e427c,#283e6c)}.launch-actions #continue{width:190px}.new-adventure,.duel-entry{align-items:center}.restart-button{width:190px}@media(max-width:620px){.menu-picture,.launch-actions #continue{width:145px;min-height:139px}.menu-picture svg{height:90px}.new-adventure,.duel-entry{gap:12px}}

.arena-banner{top:auto;bottom:14%;transform:translateX(-50%)}

/* A short, non-interactive celebration bridges combat and card rewards. */
#stage-celebration{position:absolute;inset:0;z-index:25;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:10px;overflow:hidden;background:radial-gradient(ellipse at center,#164e74ed,#071a39ef);color:white;text-align:center;animation:clear-in .4s ease-out;pointer-events:auto;transition:opacity .5s,transform .5s}
#stage-celebration.leaving{opacity:0;transform:scale(1.06)}
#stage-celebration strong{font-size:clamp(28px,5vw,64px);font-weight:950;font-style:italic;color:#fff1b5;text-shadow:0 4px #715419,0 0 24px #ffce7388;z-index:1}
#stage-celebration b{font-size:clamp(17px,2.4vw,28px);z-index:1}.clear-medal{width:clamp(76px,15vw,150px);z-index:1;animation:clear-in .7s cubic-bezier(.2,1.4,.3,1)}.clear-medal svg{display:block;width:100%}
.clear-gift{display:flex;align-items:center;gap:10px;z-index:1;animation:clear-in .7s .9s both}.clear-gift svg{width:42px;height:49px}.clear-rays{position:absolute;width:180%;height:240%;background:repeating-conic-gradient(from 0deg,#d9eeff14 0deg 12deg,transparent 12deg 30deg);animation:clear-turn 24s linear infinite}
.clear-confetti{position:absolute;left:var(--x);top:-20px;width:9px;height:16px;background:var(--color);animation:clear-fall 2.7s var(--delay) ease-in both}
@keyframes clear-in{from{opacity:0;transform:scale(.75) translateY(20px)}to{opacity:1;transform:none}}@keyframes clear-turn{to{transform:rotate(360deg)}}@keyframes clear-fall{to{transform:translateY(700px) rotate(var(--turn));opacity:0}}
@media(prefers-reduced-motion:reduce){#stage-celebration,.clear-medal,.clear-gift,.clear-rays,.clear-confetti{animation:none}.clear-confetti{display:none}}
