* { box-sizing: border-box; }
:root { color-scheme: light; --orange: #FF8A3D; --ink: #473128; --muted: #9C7661; --cream: #FFF8ED; }
html, body { margin: 0; width: 100%; min-height: 100%; background: #FFF3E3; color: var(--ink); font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Helvetica Neue", sans-serif; overscroll-behavior: none; }
body { min-height: 100vh; min-height: 100dvh; }
button { font: inherit; -webkit-tap-highlight-color: transparent; }
.app-shell { width: 100%; max-width: 480px; min-height: 100vh; min-height: 100dvh; margin: 0 auto; overflow: hidden; background: radial-gradient(ellipse at 50% 20%, #FFFDF7 0, #FFF7E9 46%, #FFEBD6 100%); }
.screen { min-height: 100vh; min-height: 100dvh; position: relative; }
.is-hidden { display: none !important; }
.home-screen { display: flex; flex-direction: column; align-items: center; padding: max(34px, env(safe-area-inset-top)) 24px max(28px, env(safe-area-inset-bottom)); overflow: auto; }
.brand-lockup { position: relative; z-index: 1; margin-top: clamp(26px, 8vh, 72px); text-align: center; }
.eyebrow { margin: 0 0 7px; color: #C78D60; font-size: 11px; font-weight: 800; letter-spacing: 2px; }
.brand-lockup h1 { margin: 0; color: #653A27; font-size: clamp(34px, 10vw, 44px); line-height: 1.12; font-weight: 900; text-shadow: 0 3px #FFE1B8; }
.brand-lockup h1 span { display: inline-block; margin-left: 4px; color: var(--orange); font-size: .65em; vertical-align: top; }
.tagline { margin: 10px 0 0; color: #A5795D; font-size: 14px; }
.home-art { position: relative; width: min(78vw, 310px); height: clamp(180px, 31vh, 255px); flex: 0 0 auto; margin-top: 22px; }
.fruit { position: absolute; border: 5px solid rgba(255,255,255,.86); border-radius: 50%; box-shadow: 0 10px 18px rgba(171,93,42,.18), inset -8px -10px 0 rgba(132,74,37,.10), inset 6px 6px 0 rgba(255,255,255,.55); }
.fruit-watermelon { width: 142px; height: 142px; left: calc(50% - 71px); bottom: 0; background: radial-gradient(ellipse at 28% 28%, #B5E85F 0 8%, transparent 9%), repeating-linear-gradient(112deg, transparent 0 16px, #2C9C59 17px 23px, transparent 24px 36px), #56C66B; }
.fruit-orange { width: 93px; height: 93px; left: 18px; bottom: 18px; background: radial-gradient(circle at 30% 24%, #FFF3A2, transparent 18%), linear-gradient(145deg, #FFD365, #FF9147 70%); }
.fruit-apple { width: 78px; height: 78px; right: 22px; bottom: 36px; background: radial-gradient(circle at 30% 25%, #FFE2A2, transparent 22%), linear-gradient(145deg, #FF9A63, #EF5961); }
.spark { position: absolute; color: #F7B951; font-size: 25px; text-shadow: 0 2px #fff; }
.spark-one { top: 25px; left: 40px; }.spark-two { top: 56px; right: 34px; font-size: 18px; }
.home-stats { display: flex; align-items: center; gap: 12px; margin: 18px 0 16px; padding: 9px 18px; border: 1px solid #F5D7B9; border-radius: 999px; background: rgba(255,255,255,.73); color: #A5795D; font-size: 13px; }
.home-stats strong { color: var(--orange); font-size: 19px; }
.primary-btn { width: min(100%, 330px); min-height: 56px; border: 0; border-radius: 16px; background: var(--orange); color: white; font-size: 19px; font-weight: 800; box-shadow: 0 5px 0 #D96B2D, 0 10px 20px rgba(225,111,43,.2); cursor: pointer; }
.primary-btn:active { transform: translateY(3px); box-shadow: 0 2px 0 #D96B2D; }
.home-actions { display: flex; width: min(100%, 330px); gap: 12px; margin-top: 18px; }
.secondary-btn { display: flex; flex: 1; align-items: center; justify-content: center; gap: 8px; min-height: 48px; border: 1px solid #F1D9C2; border-radius: 13px; background: #FFFCF7; color: #78513D; font-size: 14px; font-weight: 700; cursor: pointer; }
.secondary-btn .mp-icon { font-size: 18px; color: var(--orange); }
.hint { margin: auto 0 0; padding-top: 22px; color: #B08A70; font-size: 12px; }
.game-screen { display: flex; flex-direction: column; padding: max(10px, env(safe-area-inset-top)) 14px max(12px, env(safe-area-inset-bottom)); }
.game-topbar { display: grid; grid-template-columns: 48px 1fr 72px; align-items: center; gap: 10px; min-height: 72px; }
.icon-btn { width: 44px; height: 44px; border: 1px solid #F0D9C1; border-radius: 14px; background: #FFFCF7; color: #885C43; font-size: 21px; }
.score-box { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 58px; border-radius: 14px; background: #FFFDF8; box-shadow: 0 2px 8px rgba(127,75,39,.07); }
.score-box span, .next-box span { color: #A58068; font-size: 11px; }
.score-box strong { color: var(--orange); font-size: 27px; line-height: 1.12; transition: transform .15s ease; }
.score-box strong.bump { transform: scale(1.2); }
.next-box { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 66px; }
.next-box canvas { width: 48px; height: 48px; }
.game-wrap { position: relative; flex: 1; min-height: 300px; margin-top: 8px; overflow: hidden; border: 2px solid #F4C99F; border-radius: 18px; background: linear-gradient(180deg, rgba(255,255,255,.8), rgba(255,247,230,.94)); box-shadow: inset 0 0 0 5px rgba(255,255,255,.45), 0 8px 20px rgba(153,86,42,.08); touch-action: none; }
#game-canvas { display: block; width: 100%; height: 100%; touch-action: none; }
.drop-line { position: absolute; top: 19%; left: 0; right: 0; border-top: 1px dashed rgba(242,134,66,.22); pointer-events: none; }
.game-tip { position: absolute; bottom: 10px; left: 0; right: 0; text-align: center; color: #B8947D; font-size: 11px; pointer-events: none; }
.modal { position: fixed; z-index: 10; inset: 0; display: flex; align-items: center; justify-content: center; padding: 20px; background: rgba(70,45,30,.38); }
.modal-panel { position: relative; width: min(100%, 340px); max-height: 85vh; overflow: auto; padding: 28px 22px 22px; border: 1px solid #F3D8BD; border-radius: 20px; background: #FFFCF6; text-align: center; box-shadow: 0 16px 50px rgba(80,45,24,.22); }
.modal-panel h2 { margin: 0 24px 20px; color: #663F2B; font-size: 22px; }
.modal-close { position: absolute; top: 11px; right: 12px; width: 38px; height: 38px; border: 0; border-radius: 12px; background: #FFF1E2; color: #95694D; font-size: 20px; }
.result-kicker { margin: 0 0 8px; color: var(--orange); font-size: 13px; font-weight: 800; }
.result-panel h2 { margin-bottom: 18px; }
.result-score { display: flex; flex-direction: column; gap: 4px; color: #A58068; font-size: 13px; }
.result-score strong { color: var(--orange); font-size: 42px; }
.result-best { margin: 4px 0 22px; color: #A58068; font-size: 13px; }
.result-best b { color: #744D36; }
.result-panel .primary-btn { min-height: 52px; font-size: 17px; }
.text-btn { margin-top: 10px; min-height: 44px; border: 0; background: transparent; color: #A5795D; font-weight: 700; }
.setting-row { display: flex; align-items: center; justify-content: space-between; padding: 14px 2px; border-top: 1px solid #F2E5D7; color: #78513D; font-size: 15px; }
.setting-row input { width: 22px; height: 22px; accent-color: var(--orange); }
.rank-empty { padding: 18px 8px 8px; color: #A58068; line-height: 1.7; font-size: 14px; }
@media (max-height: 650px) { .brand-lockup { margin-top: 10px; }.home-art { height: 170px; margin-top: 12px; }.fruit-watermelon { width: 120px; height: 120px; left: calc(50% - 60px); }.fruit-orange { width: 78px; height: 78px; }.fruit-apple { width: 68px; height: 68px; } }
