/* Portrait game shell: the scene fills the available WebView, with safe controls. */
:root{--safe-top:env(safe-area-inset-top,0px);--safe-right:env(safe-area-inset-right,0px);--safe-bottom:env(safe-area-inset-bottom,0px);--safe-left:env(safe-area-inset-left,0px);--round:'Jua',system-ui,-apple-system,'Apple SD Gothic Neo','Noto Sans KR','Malgun Gothic',sans-serif}
html,body{width:100%;height:100%;overflow:hidden;overscroll-behavior:none}
body{background-color:#f4efdf;background-image:linear-gradient(90deg,#e1e8d544 1px,transparent 1px),linear-gradient(#e1e8d544 1px,transparent 1px);background-size:24px 24px}
.site-shell{width:100%;max-width:480px;height:100vh;height:100dvh;margin:0 auto;padding:var(--safe-top) var(--safe-right) var(--safe-bottom) var(--safe-left);display:flex;flex-direction:column;overflow:hidden;background:#f7f3e3;box-shadow:0 0 80px #5a71451a}
.site-header{height:56px;min-height:56px;padding:5px 104px 5px 17px;gap:0;border:0;position:relative;z-index:7;background:#fff9ec;flex:none;justify-content:flex-start}
.brand{gap:7px;white-space:nowrap;min-width:0;letter-spacing:0}
.brand img{width:34px;height:34px;filter:drop-shadow(0 2px 0 #cbd8af);transform:rotate(-9deg)}
.wordmark{display:inline-flex;position:relative;align-items:baseline;font-family:var(--round);font-weight:400;letter-spacing:-1.5px;line-height:1.2;white-space:nowrap;color:#52754b;text-shadow:0 2px 0 #fff9e8,0 4px 0 #c6d4ad}
.wordmark>span:last-of-type{color:#d28b63;text-shadow:0 2px 0 #fff9e8,0 4px 0 #e4c3a1}
.wordmark i{position:absolute;left:29%;top:-6px;width:13px;height:8px;background:#89a366;border-radius:90% 0 90% 0;transform:rotate(-24deg);box-shadow:7px 1px 0 -2px #b2c389}
.brand .wordmark{font-size:23px}
.app-main,.play-layout{display:flex;flex:1;min-height:0;min-width:0;width:100%}
.play-layout{gap:0;align-items:stretch}
.game-card{display:flex;flex-direction:column;flex:1;min-height:0;width:100%;border:0;border-radius:0;box-shadow:none;background:#edf2d9;overflow:hidden}
.game-toolbar{height:48px;min-height:48px;flex:none;padding:0 12px 0 18px;background:#fff9ec;border-bottom:1px dashed #d9dfbf;gap:4px}
.game-label{font-size:13px;letter-spacing:0;gap:6px;min-width:0}.game-label #round-label{display:inline;font-size:13px;letter-spacing:0;color:#89936e}
.toolbar-actions{gap:2px}.icon-button{width:44px;height:44px;min-width:44px;border:0;background:transparent;border-radius:14px}.icon-button svg{width:19px;height:19px}.icon-button:hover{background:#eaf0da}
.game-stage{flex:1;min-height:0;max-height:none;aspect-ratio:auto;container-type:size;border:0}
.game-stage canvas{width:100%;height:100%}
.hud{left:14px;right:14px;top:14px}.hud-score{padding:8px 11px;border-radius:15px}.hud-score strong{font-size:28px}.hud-middle{top:6px;padding:7px 8px;gap:5px}.hud-lives{padding-top:8px}.hud-lives>span{font-size:12px}.hud-lives svg{width:15px;height:15px}.hud-lives div{gap:3px}.multiplier{top:78px;left:10px}
body[data-state=ready] .hud,body[data-state=over] .hud{visibility:hidden}
.screen-overlay{padding:10px 18px 12px;align-items:center;background:linear-gradient(#faf5e54d,#f7f2dc12 45%,#f8f4e2b3);backdrop-filter:blur(1px)}
.welcome-panel{height:100%;max-height:690px;width:100%;max-width:360px;display:flex;align-items:center;flex-direction:column;padding:9px 10px 5px;background:transparent;border:0;border-radius:0;box-shadow:none;position:relative}
.welcome-panel::before,.welcome-panel::after{display:none}
.welcome-badge{font-size:12px;letter-spacing:.2px;font-weight:600;padding:6px 13px;background:#fffaf0db;border:1px solid #e4dfc4;color:#8b946a;border-radius:30px;flex:none}
.welcome-panel h1{margin:13px 0 0;flex:none;line-height:1.1}.welcome-panel h1 .wordmark{font-size:44px;letter-spacing:-2.5px;filter:drop-shadow(0 3px 0 #fff9e6)}.welcome-panel h1 .wordmark i{width:20px;height:11px;top:-7px}
.mascot-scene{position:relative;flex:1;min-height:80px;max-height:300px;width:100%;margin:2px 0;display:flex;align-items:center;justify-content:center}
.harvest-mascot{position:relative;display:block;width:auto;height:100%;max-width:100%;object-fit:contain;filter:drop-shadow(0 6px 3px #6e794919);z-index:1}
.mascot-halo{position:absolute;width:70%;height:75%;max-height:235px;bottom:6%;border-radius:50%;background:radial-gradient(ellipse,#ffedbdba,#fff6d65c 60%,transparent 72%)}
.mascot-bubble{position:absolute;top:19%;right:0;padding:9px 10px;transform:rotate(7deg);background:#fffdf0;border:1px solid #e8dcb7;border-radius:15px 15px 15px 3px;color:#ac855a;font-family:var(--round);font-size:13px;box-shadow:0 3px 0 #d9cda32b;z-index:2;white-space:nowrap}.mascot-bubble span{color:#da9588}
.scene-flower,.scene-spark{position:absolute;font-size:26px;left:6%;bottom:22%;color:#d99b85;transform:rotate(-15deg)}.scene-spark{left:auto;right:11%;top:61%;bottom:auto;color:#d4b065;font-size:23px}
.welcome-panel h2{font-size:25px;margin:1px 0 5px;flex:none;color:#658454;letter-spacing:-.5px}
.welcome-panel p{font-size:13px;line-height:1.75;margin:0 0 11px;color:#7d8a64;flex:none}
.welcome-record{display:flex;align-items:center;justify-content:center;gap:6px;border-radius:13px;padding:7px 13px;background:#fff5d6d9;color:#9c885b;font-size:12px;margin-bottom:12px;flex:none;border:1px solid #ebddb5}.welcome-record svg{width:15px;height:15px}.welcome-record strong{font-size:16px;color:#877548;font-family:var(--round);font-weight:400}
.primary-button{min-height:52px;flex:none;font-size:15px;border-radius:18px;letter-spacing:-.3px;background:#7d9e6a;border-color:#678953;box-shadow:0 5px 0 #567746}.primary-button:hover{background:#72945f;box-shadow:0 6px 0 #567746}.primary-button svg{width:18px;height:18px}
.welcome-actions{width:100%;display:grid;grid-template-columns:1fr 1fr;gap:9px;margin-top:13px;flex:none}.welcome-actions button,.secondary-button{display:flex;align-items:center;justify-content:center;gap:7px;min-height:44px;border:1px solid #e0dfc2;background:#fffceeeb;border-radius:14px;color:#879366;font-size:12px;box-shadow:0 2px 0 #d7ddbd40}.welcome-actions button>span{font-size:19px}.welcome-actions svg,.secondary-button svg{width:16px;height:16px;color:#bca066}.welcome-actions button:hover,.secondary-button:hover{background:#fff2d6}
.welcome-hint{font-size:12px;letter-spacing:0;margin-top:11px;color:#879366;flex:none}.stage-caption{display:none}
.basket-control{min-height:66px;flex:none;padding:13px 25px 23px;background:#f8f3e1;border-top:1px solid #d7dfbd;gap:18px}.basket-control>div{height:26px}.control-track{top:10px;height:8px;background:#e0e7c9}.control-thumb{top:-4px;width:48px;height:36px;border-radius:14px;border:2px solid #d5bd88;background:#fff1ca;box-shadow:0 3px 0 #c6c29b66;font-size:22px}.control-label{bottom:5px;font-size:12px;color:#9a9f7a}.control-arrow{font-size:21px;color:#8c9c70}
body[data-state=ready] .basket-control,body[data-state=over] .basket-control{display:none}
.game-bottom{height:27px;min-height:27px;padding:0 18px;flex:none;font-size:12px;background:#f8f3e1}.game-bottom .keycap{height:15px;min-width:15px;font-size:11px}
.pause-panel{width:310px;max-width:100%;padding:24px;background:#fffdf0f5;border-radius:28px}.pause-panel h2{font-size:28px}.pause-panel p{font-size:12px}.text-button{min-height:44px;padding:10px;font-size:12px}
.result-panel{width:100%;max-width:350px;max-height:100%;overflow:auto;scrollbar-width:thin;padding:18px 18px 14px;border:2px solid #fff8e5;border-radius:28px;background:#fffdf0f5;box-shadow:0 6px 0 #c8d3ad5e;display:flex;flex-direction:column;align-items:center}
.result-mascot-scene{height:clamp(95px,25cqh,195px);min-height:90px;width:100%;position:relative;margin:2px 0 0;flex:none;display:flex;justify-content:center;overflow:hidden}.result-mascot-scene .harvest-mascot{height:210%;max-width:none;mask-image:linear-gradient(#000 40%,transparent 55%)}.result-mascot-scene .mascot-bubble{top:25%;right:0;font-size:12px;padding:7px}.result-mascot-scene .scene-spark{left:15%;top:48%;right:auto}
.result-panel h2{font-size:26px;margin:2px 0 5px}.result-panel>p{font-size:12px;line-height:1.6;color:#929a77;margin:0 0 7px}
.score-receipt{width:100%;padding:8px 0 5px;margin:3px 0;background:repeating-linear-gradient(90deg,#fff2d200,#fff2d200 9px,#f8eac32e 9px,#f8eac32e 18px),#fff5d9;border:1px dashed #e2cea1;border-radius:15px}.score-receipt>span{font-size:12px;color:#b09a6b}.result-score{font-size:44px;line-height:1.15;color:#78905a;letter-spacing:-1px;margin:1px 0 3px}.result-score span{font-size:13px}
.result-stats{display:grid;grid-template-columns:repeat(4,1fr);width:100%;margin:11px 0 10px;gap:3px}.result-stats div{gap:5px}.result-stats span{font-size:12px;color:#8e9877}.result-stats strong{font-size:16px;color:#6d8357}
.result-ranking-status{font-size:12px!important;margin:0!important}.result-panel #result-ranking-button{margin:3px 0 8px;padding:7px 14px;min-height:36px;background:#f7ead1;border:1px solid #ead7b4;border-radius:12px;color:#a88853;text-decoration:none}.result-panel .primary-button{margin-top:10px;font-size:13px}.result-panel .secondary-button{width:100%;margin-top:12px;min-height:40px}
dialog{max-width:calc(100% - 24px);max-height:calc(100dvh - var(--safe-top) - var(--safe-bottom) - 30px);padding:30px 22px 22px;border:2px solid #e5dec2;border-radius:27px;overscroll-behavior:contain;background:#fffcf2;color:#526d47}dialog::backdrop{background:#3f56394a;backdrop-filter:blur(4px)}.dialog-close{right:8px;top:7px;background:#f0eedc;font-size:25px;z-index:2}
.utility-dialog{width:420px;padding:48px 16px 20px}.utility-heading{padding:0 5px 12px}.utility-heading>span{font-size:12px;color:#b29b73}.utility-heading h2{font-size:26px;margin:4px 0 0}.side-panel{display:flex;flex-direction:column;gap:13px}.guide-card{display:block;padding:18px}.guide-card h2{margin-bottom:19px}.guide-step{flex-direction:row;gap:10px;margin-bottom:17px}.guide-step h3{font-size:12px}.guide-step p{font-size:11px}.step-art{font-size:24px;right:0}.guide-notice{font-size:12px}.fruit-card{padding:18px}.fruit-icon{width:43px;height:43px}.fruit-roster span{font-size:12px}.fruit-roster strong{font-size:12px}.card-heading h2{font-size:14px}.card-heading>span{display:inline;font-size:12px}.fruit-card>p{font-size:12px}.bomb-card{padding:14px}.bomb-card p,.tip-card p{font-size:11px}.tip-card{padding:16px}
.leaderboard{margin:0;padding:0;background:transparent;border:0;border-radius:0;box-shadow:none}.ranking-heading{display:block;padding:0 3px}.ranking-heading h2{font-size:25px}.ranking-heading p{font-size:11px}.ranking-tabs{margin-top:16px;display:flex;width:100%}.ranking-tabs button{flex:1;min-height:44px;font-size:13px}.ranking-meta{margin:15px 0 10px;font-size:12px;gap:6px}.ranking-columns,.ranking-row{grid-template-columns:26px minmax(0,1fr) 70px 38px;gap:7px;padding-left:7px;padding-right:7px}.ranking-row{font-size:12px}.ranking-columns{font-size:12px}.ranking-list{max-height:50dvh}.ranking-level{font-size:12px}
#name-title{font-size:25px;margin-right:15px}#name-form label{font-size:12px}#ranking-name{font-size:16px;min-height:48px}.name-hint{font-size:12px}#name-later{min-height:44px;padding-top:12px}
@media(min-width:600px) and (pointer:fine){.site-shell{max-width:430px;height:min(900px,calc(100dvh - 32px));margin:16px auto;border-radius:32px;border:1px solid #dddcc4;box-shadow:0 20px 80px #78835a29}.site-header{border-radius:32px 32px 0 0}}
@media(pointer:coarse){.game-bottom{display:none}}
@media(max-height:740px){.welcome-panel h1{margin-top:10px}.welcome-panel h1 .wordmark{font-size:38px}.welcome-panel h2{font-size:22px}.welcome-panel p{font-size:12px;margin-bottom:7px}.welcome-record{margin-bottom:9px;padding:5px 12px}.welcome-actions{margin-top:11px}.welcome-hint{margin-top:8px}.result-panel{padding:12px 15px}.result-mascot-scene{height:clamp(90px,22cqh,140px)}.result-panel h2{font-size:23px}.score-receipt{padding:5px 0 3px}.result-score{font-size:39px}.result-stats{margin:8px 0}.result-panel .secondary-button{margin-top:10px}}
@media(max-width:350px){.site-header{padding-left:13px}.brand{gap:5px}.brand img{width:29px;height:29px}.brand .wordmark{font-size:20px}.game-toolbar{padding-left:13px}.game-label #round-label{font-size:12px}.screen-overlay{padding-left:12px;padding-right:12px}.welcome-panel{padding-left:10px;padding-right:10px}.welcome-panel h1 .wordmark{font-size:36px}.mascot-bubble{right:-3px;font-size:13px;padding:7px}.hud{left:10px;right:10px}.hud-middle{gap:3px;padding:6px}.timer{font-size:14px}.hud-lives svg{width:12px}.welcome-badge{font-size:12px}.result-stats span{font-size:11px}}
@media(max-height:580px){.site-header{height:46px;min-height:46px}.game-toolbar{height:44px;min-height:44px}.welcome-panel h1 .wordmark{font-size:30px}.welcome-panel h1{margin-top:7px}.welcome-badge{padding:4px 10px}.welcome-panel h2{font-size:20px}.welcome-panel p{display:none}.welcome-hint{font-size:11px}.welcome-record{padding:4px 10px;margin-bottom:8px}.welcome-actions{margin-top:10px}.mascot-bubble{font-size:12px}.result-panel{display:block}.result-mascot-scene{height:85px}.result-panel h2{font-size:22px}.result-score{font-size:32px}.result-stats{margin:7px 0}.result-panel .primary-button{min-height:46px}.basket-control{min-height:60px}}
@media(prefers-reduced-motion:no-preference){.mascot-bubble{animation:hello-bob 4s ease-in-out infinite}.scene-spark{animation:soft-spark 3s ease-in-out infinite}.harvest-mascot{animation:mascot-arrive .55s ease-out both}}
@keyframes hello-bob{50%{transform:rotate(4deg) translateY(-3px)}}@keyframes soft-spark{50%{opacity:.5;transform:scale(.85)}}@keyframes mascot-arrive{from{opacity:0;transform:translateY(9px)}to{opacity:1;transform:translateY(0)}}
.difficulty-picker{width:100%;min-width:0;flex:none;border:0;margin:0 0 12px;padding:0;text-align:left}.difficulty-picker legend{padding:0;margin-bottom:6px;font-size:12px;font-weight:600;color:#83916b}.difficulty-options{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px}.difficulty-options label{position:relative;min-width:0;cursor:pointer}.difficulty-options input{position:absolute;width:1px;height:1px;margin:0;padding:0;overflow:hidden;clip-path:inset(50%)}.difficulty-choice{display:flex;align-items:center;justify-content:center;gap:5px;min-height:49px;padding:5px 4px;border:1px solid #e0dfc2;border-radius:13px;background:#fffbedbd;color:#8b9877;transition:background .15s,border-color .15s}.difficulty-choice>span{display:flex;flex-direction:column;gap:2px}.difficulty-choice strong{font-size:13px;line-height:1.1}.difficulty-choice small{font-size:13px;white-space:nowrap}.difficulty-options input:checked+.difficulty-choice{background:#e7efd8;border:2px solid #83a36e;color:#55774c;box-shadow:0 2px 0 #bdcfa666}.difficulty-options input:focus-visible+.difficulty-choice{outline:3px solid #eaa36b;outline-offset:2px}.basket-sample{position:relative;display:block;flex:none;width:var(--basket-size);height:19px;border:2px solid #bb965f;border-top:4px solid #c6a268;border-radius:3px 3px 8px 8px;background:repeating-linear-gradient(90deg,#d4b37a 0 5px,#c6a268 5px 7px);transform:perspective(50px) rotateX(-12deg)}.basket-sample::before{content:'';position:absolute;left:20%;right:20%;height:8px;top:-11px;border:2px solid #bb965f;border-bottom:0;border-radius:12px 12px 0 0}#change-difficulty{font-size:13px;margin-top:4px;flex:none;color:#939b78}.ranking-difficulty{display:block;font-size:12px;font-weight:400;color:#98a180;line-height:1.5}
@media(max-width:350px){.difficulty-choice{gap:4px}.basket-sample{width:calc(var(--basket-size)*.75);height:17px}.difficulty-choice small{font-size:11px}}
@media(max-height:740px){.difficulty-picker{margin-bottom:10px}.difficulty-picker legend{margin-bottom:4px}.difficulty-choice{min-height:46px}.welcome-panel .mascot-scene{min-height:45px}.welcome-panel>p{display:none}}
@media(max-height:580px){.welcome-panel>h2{display:none}.welcome-panel .welcome-record{margin-bottom:5px}.difficulty-picker{margin-bottom:9px}.welcome-panel .welcome-hint{margin-top:6px}}
.tutorial-hint{position:absolute;left:50%;top:40%;transform:translate(-50%,-50%);z-index:4;display:flex;flex-direction:column;align-items:center;gap:10px;pointer-events:none;text-align:center}
.tutorial-hand{font-size:46px;line-height:1;filter:drop-shadow(0 3px 0 #ffffffb3)}
.tutorial-hint[data-step="slice"] .tutorial-hand{animation:tutorial-swipe 1.4s ease-in-out infinite}
.tutorial-hint[data-step="catch"] .tutorial-hand{animation:tutorial-catch 1.4s ease-in-out infinite}
.tutorial-text{font-family:var(--round);font-size:16px;color:#4f6d47;background:#fffdf0e6;border:1px solid #e3dcb9;padding:8px 15px;border-radius:14px;box-shadow:0 3px 0 #d9cda33d}
@keyframes tutorial-swipe{0%{transform:translateX(-58px) rotate(-14deg)}50%{transform:translateX(58px) rotate(14deg)}100%{transform:translateX(-58px) rotate(-14deg)}}
@keyframes tutorial-catch{0%,100%{transform:translateY(0)}50%{transform:translateY(28px)}}
.legal-links{font-size:12px;color:#97a383;margin:8px 0 0}.legal-links a{color:inherit;text-decoration:underline;text-underline-offset:3px}
.name-consent{font-size:12px;line-height:1.6;color:#8e9877;margin:12px 0 0}.name-consent a{color:inherit;text-decoration:underline;text-underline-offset:3px}
html.in-toss #fullscreen-button{display:none}
.result-actions{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-top:8px}.result-actions .secondary-button{margin:0;width:100%}
.screen-overlay{overflow-y:auto;overscroll-behavior:contain}.screen-overlay>.result-panel,.screen-overlay>.welcome-panel{margin:auto}
.welcome-actions{display:grid;grid-template-columns:repeat(3,1fr);gap:8px}.welcome-actions button{width:100%;margin:0;padding-inline:6px;white-space:nowrap;font-size:12px}
.revive-button{background:#d98a4f;border-color:#d98a4f;margin-bottom:8px}.revive-button:hover{background:#c67a40}
.progress-card{background:#fffdf5;border:1px solid #e8e2cc;border-radius:16px;padding:16px;margin-top:14px}.progress-card .card-heading{margin-bottom:10px}
.mission-list{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:10px}
.mission{display:grid;grid-template-columns:1fr auto;gap:4px 10px;align-items:center;font-size:14px;color:#4f6d47}.mission.done{color:#8e9877}
.mission-count{font-size:12px;color:#8e9877;font-variant-numeric:tabular-nums}.mission.done .mission-count{color:#5f8a52;font-weight:600}
.mission-bar{grid-column:1/-1;height:7px;border-radius:7px;background:#eceadc;overflow:hidden}.mission-bar i{display:block;height:100%;background:#8fb57a;border-radius:7px;transition:width .3s}.mission.done .mission-bar i{background:#c9d8b3}
.badge-grid{list-style:none;margin:0;padding:0;display:grid;grid-template-columns:repeat(3,1fr);gap:8px}
.badge{display:flex;flex-direction:column;align-items:center;text-align:center;gap:3px;padding:10px 6px;border-radius:12px;background:#f5f8e9;border:1px solid #e1e7d0}
.badge-icon{font-size:26px;line-height:1.2}.badge strong{font-size:12px;color:#4f6d47}.badge small{font-size:11px;color:#8e9877;line-height:1.4}
.badge.locked{opacity:.45;filter:grayscale(1)}
.progress-note{font-size:12px;color:#97a383;margin:12px 0 0;text-align:center}
