:root {
  --bone: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 52 32'%3E%3Ccircle cx='9' cy='9' r='8'/%3E%3Ccircle cx='9' cy='23' r='8'/%3E%3Ccircle cx='43' cy='9' r='8'/%3E%3Ccircle cx='43' cy='23' r='8'/%3E%3Crect x='8' y='9' width='36' height='14' rx='6'/%3E%3C/svg%3E");
  --ink: #07131d;
  --cream: #f7e6c2;
  --cyan: #2fd6ee;
  --gold: #ffc62e;
  --pink: #ff5c7a;
  --panel: rgba(255, 255, 255, 0.94);
  --shadow: 0 10px 30px rgba(7, 19, 29, 0.25);
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; overflow: hidden; background: #3f9cf0; color: var(--ink); font-family: 'Fredoka', 'Jua', system-ui, sans-serif; user-select: none; -webkit-user-select: none; touch-action: none; overscroll-behavior: none; }
html:lang(ko) body, html:lang(ja) body { font-family: 'Fredoka', 'Jua', system-ui, sans-serif; }
#c { position: fixed; inset: 0; width: 100%; height: 100%; display: block; }
button { font: inherit; color: inherit; border: 0; cursor: pointer; background: none; }
a { color: inherit; text-decoration: none; }
[hidden] { display: none !important; }

/* 아이콘 */
i { display: inline-block; flex: none; }
.coin-ic { width: 26px; height: 16px; background: linear-gradient(180deg, #fff1b0, #ffc62e 55%, #d98b00); -webkit-mask: var(--bone) center/contain no-repeat; mask: var(--bone) center/contain no-repeat; }
.card-ic { width: 18px; height: 23px; border-radius: 5px; background: linear-gradient(135deg, #ffe58a, #ffb800); box-shadow: inset 0 0 0 3px #fff7d6, 0 2px 0 rgba(0,0,0,.15); }
.i-play { width: 0; height: 0; border-left: 22px solid currentColor; border-top: 14px solid transparent; border-bottom: 14px solid transparent; margin-left: 4px; }
.i-pause { width: 16px; height: 18px; border-left: 5px solid currentColor; border-right: 5px solid currentColor; }
.i-sound { width: 24px; height: 22px; background: currentColor; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M3 9v6h4l5 5V4L7 9H3zm13.5 3A4.5 4.5 0 0 0 14 8v8a4.5 4.5 0 0 0 2.5-4zM14 3.2v2.1a7 7 0 0 1 0 13.4v2.1a9 9 0 0 0 0-17.6z'/%3E%3C/svg%3E") center/contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M3 9v6h4l5 5V4L7 9H3zm13.5 3A4.5 4.5 0 0 0 14 8v8a4.5 4.5 0 0 0 2.5-4zM14 3.2v2.1a7 7 0 0 1 0 13.4v2.1a9 9 0 0 0 0-17.6z'/%3E%3C/svg%3E") center/contain no-repeat; }
.btn-sound.off .i-sound { opacity: .35; }
.i-out { width: 12px; height: 12px; border-top: 2.5px solid currentColor; border-right: 2.5px solid currentColor; transform: rotate(0deg); margin-left: 4px; }
.i-again { width: 22px; height: 22px; border: 4px solid currentColor; border-top-color: transparent; border-radius: 50%; }
.i-share { width: 20px; height: 20px; background: currentColor; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M18 16a3 3 0 0 0-2.4 1.2l-6.7-3.4a3 3 0 0 0 0-1.6l6.7-3.4A3 3 0 1 0 15 7l-6.7 3.4a3 3 0 1 0 0 3.2L15 17a3 3 0 1 0 3-1z'/%3E%3C/svg%3E") center/contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M18 16a3 3 0 0 0-2.4 1.2l-6.7-3.4a3 3 0 0 0 0-1.6l6.7-3.4A3 3 0 1 0 15 7l-6.7 3.4a3 3 0 1 0 0 3.2L15 17a3 3 0 1 0 3-1z'/%3E%3C/svg%3E") center/contain no-repeat; }
.i-home { width: 22px; height: 20px; background: currentColor; clip-path: polygon(50% 0, 100% 45%, 86% 45%, 86% 100%, 14% 100%, 14% 45%, 0 45%); }
.i-x { width: 18px; height: 18px; background: linear-gradient(45deg, transparent 42%, currentColor 42% 58%, transparent 58%), linear-gradient(-45deg, transparent 42%, currentColor 42% 58%, transparent 58%); }
.i-crown { width: 20px; height: 16px; background: var(--gold); clip-path: polygon(0 100%, 0 20%, 25% 55%, 50% 0, 75% 55%, 100% 20%, 100% 100%); }

/* 버튼 */
.big-btn { display: flex; align-items: center; justify-content: center; gap: 12px; min-width: 220px; height: 70px; padding: 0 34px; border-radius: 999px; font-size: 30px; font-weight: 700; color: #fff; background: linear-gradient(180deg, #ffb13b, #ff7a1a); box-shadow: 0 7px 0 #c4520a, 0 14px 28px rgba(196, 82, 10, .35); text-shadow: 0 2px 0 rgba(0,0,0,.18); transition: transform .08s; animation: pulse 1.6s ease-in-out infinite; }
.big-btn:active { transform: translateY(5px); box-shadow: 0 2px 0 #c4520a; }
.mid-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 52px; min-width: 52px; padding: 0 18px; border-radius: 18px; font-size: 19px; font-weight: 700; background: #fff; box-shadow: 0 5px 0 rgba(7,19,29,.18), 0 8px 18px rgba(7,19,29,.12); }
.mid-btn:active { transform: translateY(3px); box-shadow: 0 2px 0 rgba(7,19,29,.18); }
.ic-btn { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 14px; background: rgba(255,255,255,.9); box-shadow: 0 4px 0 rgba(7,19,29,.15); }
@keyframes pulse { 50% { transform: scale(1.04); } }

/* 화면 */
.screen { position: fixed; inset: 0; display: flex; flex-direction: column; align-items: center; z-index: 10; }
.screen.dim { background: rgba(7, 19, 29, .45); justify-content: center; backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); }
.row { display: flex; gap: 12px; justify-content: center; align-items: center; flex-wrap: wrap; }
.row.col { flex-direction: column; gap: 18px; }

#menu { justify-content: space-between; padding: calc(28px + var(--safe-t)) 16px calc(26px + var(--safe-b)); pointer-events: none; }
#menu > * { pointer-events: auto; }
.logo-wrap { display: flex; flex-direction: column; align-items: center; animation: drop .7s cubic-bezier(.2,1.6,.4,1) both; }
.logo-img { width: min(78vw, 460px); height: auto; filter: drop-shadow(0 10px 20px rgba(7,19,29,.3)); }
.logo-img + .logo { display: none; }
.logo { margin: 0; display: flex; flex-direction: column; align-items: center; line-height: .82; font-weight: 700; font-style: italic; letter-spacing: -1px; }
.logo span { font-size: clamp(64px, 18vw, 120px); color: var(--cream); -webkit-text-stroke: 3px var(--ink); paint-order: stroke fill; text-shadow: 5px 6px 0 var(--cyan), 7px 9px 0 var(--ink); transform: skew(-8deg); }
.logo span + span { color: #fff; }
@keyframes drop { from { transform: translateY(-60px) scale(.8); opacity: 0; } }
.best-m { margin-top: 10px; padding: 6px 16px; border-radius: 999px; background: rgba(7,19,29,.55); color: #fff; font-size: 17px; display: flex; gap: 8px; align-items: center; }
.best-m b { color: var(--gold); font-size: 20px; }
.menu-bottom { display: flex; flex-direction: column; align-items: center; gap: 18px; width: 100%; }
.studio { display: inline-flex; align-items: center; padding: 8px 16px; border-radius: 999px; background: var(--ink); color: var(--cream); font-weight: 700; font-size: 14px; letter-spacing: 1px; box-shadow: 0 4px 12px rgba(7,19,29,.3); }

/* HUD */
#hud { position: fixed; inset: 0; pointer-events: none; z-index: 5; }
#hud > * { position: absolute; }
#btnPause { left: 14px; top: calc(14px + var(--safe-t)); pointer-events: auto; }
#score { left: 50%; top: calc(10px + var(--safe-t)); transform: translateX(-50%); font-size: 40px; font-weight: 700; color: #fff; -webkit-text-stroke: 2px var(--ink); paint-order: stroke fill; text-shadow: 0 4px 0 rgba(7,19,29,.35); font-variant-numeric: tabular-nums; }
#stats { right: 14px; top: calc(14px + var(--safe-t)); display: flex; flex-direction: column; gap: 6px; align-items: flex-end; }
.pill { display: flex; align-items: center; gap: 6px; padding: 5px 12px 5px 6px; border-radius: 999px; background: rgba(7,19,29,.55); color: #fff; font-size: 19px; font-weight: 700; font-variant-numeric: tabular-nums; }
#powers { left: 14px; top: calc(72px + var(--safe-t)); display: flex; flex-direction: column; gap: 8px; }
.pw { position: relative; width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; font-style: normal; font-weight: 700; color: #fff; overflow: hidden; background: rgba(7,19,29,.55); }
.pw::after { content: ''; position: absolute; left: 0; bottom: 0; height: 4px; width: calc(var(--p) * 100%); background: var(--gold); }
.pw.magnet::before { content: ''; width: 22px; height: 22px; border: 6px solid #ff3b5c; border-top: 0; border-radius: 0 0 14px 14px; }
.pw.double { background: rgba(124, 58, 237, .8); font-size: 18px; }

/* 결과 */
#over { justify-content: flex-end; padding: calc(12px + var(--safe-t)) 16px calc(12px + var(--safe-b)); overflow-y: auto; }
.panel { width: min(100%, 400px); background: var(--panel); border-radius: 28px; padding: 22px 20px 18px; display: flex; flex-direction: column; align-items: center; gap: 12px; box-shadow: var(--shadow); animation: pop .45s cubic-bezier(.2,1.5,.4,1) both; }
@keyframes pop { from { transform: scale(.7); opacity: 0; } }
.lbl { font-size: 16px; font-weight: 600; opacity: .55; letter-spacing: 2px; }
.big-num { font-size: 60px; font-weight: 700; line-height: 1; color: var(--ink); font-variant-numeric: tabular-nums; }
.badge { padding: 4px 14px; border-radius: 999px; background: linear-gradient(90deg, #ff5c7a, #ffb13b); color: #fff; font-weight: 700; letter-spacing: 2px; animation: pulse 1s infinite; }
.mini { display: flex; gap: 22px; font-size: 20px; }
.mini span { display: flex; align-items: center; gap: 6px; }
.run-cards { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.run-cards a { position: relative; width: 52px; height: 52px; border-radius: 14px; overflow: hidden; box-shadow: 0 0 0 3px #ffc62e, 0 4px 10px rgba(0,0,0,.2); }
.run-cards a img { width: 100%; height: 100%; object-fit: cover; }
.run-cards a.new::after { content: 'NEW'; position: absolute; right: -2px; top: -2px; font-size: 9px; font-weight: 700; background: var(--pink); color: #fff; padding: 1px 4px; border-radius: 6px; }
.feat-lbl { margin-top: 4px; font-size: 13px; font-weight: 700; letter-spacing: 2px; opacity: .5; }
.feature { width: 100%; border-radius: 18px; overflow: hidden; position: relative; display: block; aspect-ratio: 16/9; box-shadow: 0 6px 16px rgba(7,19,29,.2); }
.feature > img { width: 100%; height: 100%; object-fit: cover; display: block; }
.feature div { position: absolute; left: 0; right: 0; bottom: 0; display: flex; align-items: center; gap: 10px; padding: 10px 12px; background: linear-gradient(transparent, rgba(7,19,29,.85)); color: #fff; }
.feature .fi { width: 36px; height: 36px; border-radius: 10px; }
.feature b { flex: 1; font-size: 16px; text-align: left; }
.feature span { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: #ff7a1a; font-size: 14px; }

/* 카드 모음 */
.sheet { width: min(100% - 32px, 520px); max-height: min(86vh, 720px); background: var(--panel); border-radius: 26px; padding: 16px; display: flex; flex-direction: column; box-shadow: var(--shadow); animation: pop .35s cubic-bezier(.2,1.5,.4,1) both; }
.sheet-h { display: flex; justify-content: space-between; align-items: center; padding: 0 4px 12px; font-size: 22px; }
.sheet-h b { display: flex; align-items: center; gap: 8px; }
#grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 12px; overflow-y: auto; padding: 4px; }
.slot { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 8px 4px; border-radius: 16px; background: #f2f4f8; font-size: 12px; font-weight: 600; text-align: center; line-height: 1.2; }
.slot img { width: 64px; height: 64px; border-radius: 16px; object-fit: cover; }
.slot.got { background: linear-gradient(180deg, #fff5d1, #ffe08a); box-shadow: 0 0 0 2px #ffc62e; }
.slot.lock img { filter: brightness(0) opacity(.25); }
.slot.lock span { opacity: .4; font-size: 18px; }

/* 토스트 */
#toast { position: fixed; left: 50%; top: calc(84px + var(--safe-t)); transform: translate(-50%, -30px) scale(.8); opacity: 0; display: flex; align-items: center; gap: 12px; padding: 10px 18px 10px 10px; border-radius: 22px; background: rgba(255,255,255,.96); box-shadow: 0 0 0 3px #ffc62e, var(--shadow); z-index: 20; pointer-events: none; transition: .35s cubic-bezier(.2,1.6,.4,1); max-width: calc(100% - 32px); }
#toast.show { opacity: 1; transform: translate(-50%, 0) scale(1); }
#toast img { width: 56px; height: 56px; border-radius: 14px; }
#toast b { display: block; font-size: 17px; }
#toast em { font-style: normal; font-weight: 700; font-size: 13px; color: #fff; background: var(--pink); padding: 2px 8px; border-radius: 8px; }
#toast em.dup { background: #ffb13b; }

/* 조작 힌트 */
#hint { position: fixed; left: 50%; bottom: calc(18% + var(--safe-b)); transform: translateX(-50%); display: grid; grid-template-columns: repeat(3, 56px); grid-template-rows: repeat(2, 56px); gap: 6px; z-index: 6; pointer-events: none; animation: fade 3.2s both; }
.sw { width: 56px; height: 56px; border-radius: 16px; background: rgba(255,255,255,.85); position: relative; }
.sw::after { content: ''; position: absolute; left: 50%; top: 50%; border: 12px solid transparent; }
.sw.l { grid-area: 2/1; } .sw.r { grid-area: 2/3; } .sw.u { grid-area: 1/2; } .sw.d { grid-area: 2/2; }
.sw.l::after { border-right: 16px solid var(--ink); transform: translate(-75%, -50%); }
.sw.r::after { border-left: 16px solid var(--ink); transform: translate(-25%, -50%); }
.sw.u::after { border-bottom: 16px solid var(--ink); transform: translate(-50%, -75%); }
.sw.d::after { border-top: 16px solid var(--ink); transform: translate(-50%, -25%); }
@keyframes fade { 0%, 80% { opacity: 1; } 100% { opacity: 0; } }

#count { position: fixed; inset: 0; display: grid; place-items: center; font-size: 120px; font-weight: 700; color: #fff; -webkit-text-stroke: 4px var(--ink); paint-order: stroke fill; z-index: 30; pointer-events: none; }
#nogl { display: none; }
body.nogl #nogl { display: grid; position: fixed; inset: 0; place-items: center; font-size: 24px; }

@media (min-height: 900px) { .big-btn { height: 78px; } }
@media (max-height: 640px) { .logo span { font-size: 60px; } .big-btn { height: 60px; font-size: 26px; } .menu-bottom { gap: 12px; } .big-num { font-size: 48px; } .feature { aspect-ratio: 21/9; } }

/* 보너스·위험·부활·상점 */
#streak { left: 50%; top: calc(58px + var(--safe-t)); transform: translateX(-50%); font-size: 22px; font-weight: 700; color: #ffe14d; -webkit-text-stroke: 1.5px var(--ink); paint-order: stroke fill; }
#pops { left: 50%; top: 42%; width: 0; height: 0; }
.pop { position: absolute; left: 0; top: 0; transform: translate(-50%, 0); font-size: 30px; font-weight: 700; color: #fff; -webkit-text-stroke: 2px var(--ink); paint-order: stroke fill; white-space: nowrap; animation: popUp .9s ease-out forwards; }
.pop small { font-size: 20px; color: #ffe14d; margin-left: 6px; }
@keyframes popUp { 0% { transform: translate(-50%, 10px) scale(.6); opacity: 0; } 20% { transform: translate(-50%, -10px) scale(1.15); opacity: 1; } 100% { transform: translate(-50%, -70px) scale(1); opacity: 0; } }
#hud::before { content: ''; position: absolute; inset: 0; box-shadow: inset 0 0 90px 20px rgba(255, 40, 70, .55); opacity: 0; transition: opacity .2s; }
#hud.danger::before { opacity: 1; animation: blink .5s infinite alternate; }
@keyframes blink { to { opacity: .35; } }
.pw.rocket::before { content: ''; width: 14px; height: 26px; border-radius: 7px 7px 3px 3px; background: linear-gradient(#ff4d4d 0 35%, #fff 35%); box-shadow: 0 6px 0 -2px #ff9a3c; }
.pw.rocket { background: rgba(255, 122, 26, .8); }
.i-up { width: 0; height: 0; border-left: 7px solid transparent; border-right: 7px solid transparent; border-bottom: 10px solid #2bc46a; }
.i-heart { width: 44px; height: 40px; background: #ff4d6d; clip-path: path('M22 40 L4 21 A10 10 0 0 1 22 7 A10 10 0 0 1 40 21 Z'); }
.revive-btn { position: relative; width: 170px; height: 170px; border-radius: 50%; background: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; box-shadow: var(--shadow); animation: pulse 1s infinite; }
.revive-btn svg { position: absolute; inset: -8px; width: calc(100% + 16px); height: calc(100% + 16px); transform: rotate(-90deg); }
.revive-btn circle { fill: none; stroke: #ffc62e; stroke-width: 6; stroke-linecap: round; stroke-dasharray: 289; stroke-dashoffset: 0; }
#revive.run circle { animation: ring 4s linear forwards; }
@keyframes ring { to { stroke-dashoffset: 289; } }
.revive-btn span { display: flex; align-items: center; gap: 6px; font-size: 24px; font-weight: 700; }
.skip { margin-top: 26px; }
#shopList { display: flex; flex-direction: column; gap: 12px; }
.shop-row { display: flex; align-items: center; gap: 14px; padding: 12px; border-radius: 18px; background: #f2f4f8; }
.shop-row .pw { width: 52px; height: 52px; }
.shop-row .pw.magnet { background: rgba(255, 59, 92, .15); }
.shop-row .pw.double { background: rgba(124, 58, 237, .85); }
.pips { flex: 1; display: flex; gap: 5px; }
.pips b { flex: 1; height: 12px; border-radius: 6px; background: #d6dbe6; }
.pips b.on { background: linear-gradient(90deg, #2bc46a, #9be15d); }
.buy { display: flex; align-items: center; gap: 6px; height: 44px; padding: 0 14px; border-radius: 14px; background: linear-gradient(180deg, #ffb13b, #ff7a1a); color: #fff; font-weight: 700; font-size: 17px; box-shadow: 0 4px 0 #c4520a; }
.buy.no { filter: grayscale(1); opacity: .5; }
.max { font-weight: 700; color: #2bc46a; padding: 0 10px; }
.gift-ic { width: 20px; height: 20px; border-radius: 5px; background: linear-gradient(90deg, transparent 40%, #ffc62e 40% 60%, transparent 60%), linear-gradient(180deg, #ffc62e 0 26%, transparent 26%), #35c7ff; box-shadow: inset 0 -2px 0 rgba(0,0,0,.15); }
.pop .coin-ic { width: 26px; height: 16px; margin-left: 6px; vertical-align: middle; }

.hub-link { position: absolute; left: 14px; top: calc(14px + var(--safe-t)); }
.i-grid { width: 20px; height: 20px; background: radial-gradient(circle, currentColor 0 3.5px, transparent 4px) 0 0 / 10px 10px; }

/* 자랑·공유 */
.i-flag { width: 18px; height: 20px; background: linear-gradient(90deg, #07131d 0 3px, transparent 3px), conic-gradient(from 90deg at 50% 50%, #fff 0 25%, #07131d 0 50%, #fff 0 75%, #07131d 0) 3px 0 / 8px 8px no-repeat; background-size: auto, 15px 12px; }
.i-down { width: 18px; height: 20px; background: currentColor; clip-path: polygon(35% 0, 65% 0, 65% 45%, 90% 45%, 50% 85%, 10% 45%, 35% 45%, 35% 0, 0 100%, 0 88%, 100% 88%, 100% 100%, 0 100%); }
.i-link { width: 22px; height: 12px; border: 3.5px solid currentColor; border-radius: 8px; position: relative; }
.i-link::after { content: ''; position: absolute; left: 4px; right: 4px; top: 50%; height: 3px; margin-top: -1.5px; background: currentColor; }
.chal-m { margin-top: 8px; display: flex; gap: 8px; align-items: center; padding: 6px 14px; border-radius: 999px; background: #fff; font-size: 18px; box-shadow: 0 4px 0 rgba(7,19,29,.15); animation: pulse 1.4s infinite; }
#target { left: 50%; top: calc(88px + var(--safe-t)); transform: translateX(-50%); width: min(60vw, 260px); height: 14px; border-radius: 7px; background: rgba(7,19,29,.45); overflow: visible; }
#target span { position: absolute; left: 0; top: 0; bottom: 0; width: calc(var(--p, 0) * 100%); border-radius: 7px; background: linear-gradient(90deg, #ffb13b, #ff5c7a); }
#target .i-flag { position: absolute; right: -6px; top: -16px; }
#target.done span { background: linear-gradient(90deg, #2bc46a, #9be15d); }
.rank { padding: 6px 18px; border-radius: 999px; color: #fff; font-family: 'Jua', 'Fredoka', sans-serif; font-size: 20px; box-shadow: 0 3px 0 rgba(0,0,0,.15); }
.chal-o { display: flex; align-items: center; gap: 8px; font-size: 18px; }
.chal-o em { font-style: normal; font-weight: 700; padding: 2px 10px; border-radius: 8px; color: #fff; }
.chal-o em.win { background: #2bc46a; } .chal-o em.lose { background: #8d99a6; }
.share-sheet { align-items: center; gap: 14px; width: min(100% - 32px, 400px); }
.share-sheet .sheet-h { width: 100%; padding-bottom: 0; }
#shareImg { width: 100%; max-height: 52vh; object-fit: contain; border-radius: 18px; box-shadow: 0 6px 18px rgba(7,19,29,.2); }
#shareImg:not([src]) { display: none; }
.mid-btn.hot { background: linear-gradient(180deg, #ffb13b, #ff7a1a); color: #fff; box-shadow: 0 5px 0 #c4520a; min-width: 90px; }
#shareCopy.ok { background: #2bc46a; color: #fff; }

.over-card { width: 100%; max-width: 230px; border-radius: 16px; box-shadow: 0 6px 18px rgba(7,19,29,.25); cursor: pointer; }
.share-big { background: linear-gradient(180deg, #4fd2ff, #1f8cf0); box-shadow: 0 7px 0 #135ea8, 0 14px 28px rgba(19,94,168,.35); }
.share-big:active { box-shadow: 0 2px 0 #135ea8; }
#toast { position: fixed; left: 50%; bottom: calc(30px + var(--safe-b)); top: auto; transform: translate(-50%, 20px); opacity: 0; padding: 10px 18px; border-radius: 16px; background: #fff; font-weight: 700; z-index: 40; pointer-events: none; transition: .3s; box-shadow: 0 6px 20px rgba(7,19,29,.25); }
#toast.show { opacity: 1; transform: translate(-50%, 0); }
@media (max-height: 640px) { .over-card { max-width: 150px; } }

/* ---------- KEKE JUMP ---------- */
body.playing #c { cursor: none; }
body.loading #btnPlay { opacity: .6; animation: none; }
.best-m .sep { width: 1px; height: 16px; background: rgba(255,255,255,.4); }
.keys { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
kbd { font-family: inherit; font-size: 13px; font-weight: 700; padding: 4px 9px; border-radius: 8px; background: rgba(255,255,255,.9); box-shadow: 0 3px 0 rgba(7,19,29,.25); }
body.mobile .pc-only { display: none; }
.i-alt { width: 16px; height: 20px; background: currentColor; clip-path: polygon(50% 0, 100% 45%, 66% 45%, 66% 100%, 34% 100%, 34% 45%, 0 45%); }
.best-m .i-alt { color: #9be15d; }
.mini .i-alt { color: #1fa8f0; }
.mini small { font-size: 14px; opacity: .6; }
.i-star { width: 22px; height: 22px; background: linear-gradient(180deg, #fff1b0, #ffc62e); clip-path: polygon(50% 0, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%); vertical-align: -3px; margin-right: 2px; }
#hurt { position: fixed; inset: 0; pointer-events: none; z-index: 4; opacity: 0; box-shadow: inset 0 0 120px 40px rgba(255, 30, 60, .7); }

#height { left: 50%; top: calc(6px + var(--safe-t)); transform: translateX(-50%); display: flex; align-items: baseline; gap: 2px; color: #fff; font-weight: 700; -webkit-text-stroke: 2px var(--ink); paint-order: stroke fill; text-shadow: 0 4px 0 rgba(7,19,29,.35); font-variant-numeric: tabular-nums; }
#height b { font-size: 46px; }
#height small { font-size: 24px; }
#hud #score { top: calc(60px + var(--safe-t)); font-size: 22px; -webkit-text-stroke: 1.5px var(--ink); color: #ffe14d; }
#hud #streak { top: calc(90px + var(--safe-t)); font-size: 26px; }
#hud #target { top: calc(126px + var(--safe-t)); }

#pops { position: fixed; left: 50%; top: 40%; width: 0; height: 0; z-index: 6; pointer-events: none; }
.pop.perfect { color: #ffe14d; font-size: 34px; }
.pop.win { font-size: 56px; color: #9be15d; }

#zoneBanner { position: fixed; left: 50%; top: 30%; transform: translate(-50%, -50%); z-index: 7; pointer-events: none; opacity: 0; display: flex; flex-direction: column; align-items: center; font-family: 'Jua', 'Fredoka', sans-serif; font-size: 76px; color: #fff; -webkit-text-stroke: 4px var(--ink); paint-order: stroke fill; line-height: 1; white-space: nowrap; }
#zoneBanner small { font-family: 'Fredoka', sans-serif; font-weight: 700; font-size: 30px; color: #ffe14d; -webkit-text-stroke: 2px var(--ink); }
#zoneBanner.show { animation: banner 2.4s ease-out forwards; }
@keyframes banner { 0% { opacity: 0; transform: translate(-50%, -50%) scale(2); } 12% { opacity: 1; transform: translate(-50%, -50%) scale(1); } 80% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%, -60%) scale(.9); } }

/* 아이템 아이콘 */
.pw.prop { background: rgba(79, 179, 255, .85); }
.pw.prop::before { content: ''; width: 26px; height: 14px; margin-top: 10px; border-radius: 14px 14px 2px 2px; background: conic-gradient(from -90deg at 50% 100%, #ff5c5c 0 45deg, #ffc62e 0 90deg, #52d6a0 0 135deg, #4fb3ff 0); box-shadow: 0 -9px 0 -7px #fff, -9px -10px 0 -8px #fff, 9px -10px 0 -8px #fff; }
.pw.shield { background: rgba(47, 214, 238, .85); }
.pw.shield::before { content: ''; width: 26px; height: 26px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fff 0 18%, rgba(255,255,255,.35) 19% 60%, rgba(255,255,255,.7) 61%); }
.pw.jump { background: rgba(43, 196, 106, .85); }
.pw.jump::before { content: ''; width: 22px; height: 26px; background: #fff; clip-path: polygon(50% 0, 100% 45%, 68% 45%, 68% 70%, 32% 70%, 32% 45%, 0 45%, 0 100%, 100% 100%, 100% 85%, 0 85%); }
.shop-row .pw.prop, .shop-row .pw.shield, .shop-row .pw.jump, .shop-row .pw.rocket { width: 52px; height: 52px; }

/* 터치 조작 */
#stick { position: absolute; left: calc(96px + env(safe-area-inset-left, 0px)); top: calc(100% - 120px - var(--safe-b)); width: 130px; height: 130px; margin: -65px 0 0 -65px; border-radius: 50%; background: rgba(255,255,255,.18); box-shadow: inset 0 0 0 3px rgba(255,255,255,.5), 0 4px 16px rgba(7,19,29,.25); display: none; pointer-events: none; opacity: .75; }
body.mobile #stick { display: block; }
#stick.on { opacity: 1; }
#knob { position: absolute; left: 37px; top: 37px; width: 56px; height: 56px; border-radius: 50%; background: rgba(255,255,255,.9); box-shadow: 0 3px 8px rgba(7,19,29,.3); }
#stick::before { content: ''; position: absolute; inset: 8px; border-radius: 50%; border: 2px dashed rgba(255,255,255,.35); }
.tbtns { display: none; }
body.mobile .tbtns { display: block; inset: 0; pointer-events: none; }
.tbtn { position: absolute; pointer-events: auto; border-radius: 50%; touch-action: none; }
.tbtn.jump { width: 104px; height: 104px; right: calc(26px + env(safe-area-inset-right, 0px)); bottom: calc(40px + var(--safe-b)); background: rgba(255, 177, 59, .6); box-shadow: inset 0 0 0 4px rgba(255,255,255,.7), 0 6px 18px rgba(7,19,29,.25); }
.tbtn.jump::after { content: ''; position: absolute; left: 50%; top: 50%; border: 18px solid transparent; border-bottom: 24px solid #fff; transform: translate(-50%, -75%); }
.tbtn.jump.on { background: rgba(255, 177, 59, .9); transform: scale(.94); }
@media (max-height: 640px) { #height b { font-size: 36px; } #zoneBanner { font-size: 56px; } }
#over .row { gap: 8px; flex-wrap: nowrap; }
#over .row .mid-btn { height: 48px; min-width: 48px; padding: 0 13px; font-size: 17px; }
@media (max-height: 760px) { #over .panel { gap: 8px; padding: 16px 16px 14px; } #over .big-num { font-size: 48px; } #over .over-card { max-width: 170px; } }
@media (max-height: 640px) { #over .over-card { max-width: 120px; } }

/* 버튼이 화면 터치 영역에 가려지지 않게 */
#hud button, #hud .ic-btn, #hud .tbtn, #hud a { z-index: 6; }
#over .row .mid-btn { white-space: nowrap; }
@media (max-width: 400px) { #over .row { gap: 6px; } #over .row .mid-btn { padding: 0 10px; font-size: 16px; } }

/* 왼쪽 위 버튼(게임 목록·일시정지): 크게, 누르는 범위 넓게 */
.hub-link, #btnPause { width: 54px !important; height: 54px !important; border-radius: 16px !important; top: calc(16px + env(safe-area-inset-top, 0px)) !important; left: calc(14px + env(safe-area-inset-left, 0px)) !important; z-index: 20 !important; touch-action: manipulation; }
.hub-link::before, #btnPause::before { content: ''; position: absolute; inset: -14px; }
.hub-link .i-grid { transform: scale(1.15); }

/* ---------- KEKE FISH ---------- */
#touchzone { display: block !important; position: absolute; inset: 0; pointer-events: auto; z-index: 1; touch-action: none; }
#btnPause { z-index: 20; }
#btnMenuHud { position: absolute; left: calc(78px + env(safe-area-inset-left, 0px)); top: calc(16px + env(safe-area-inset-top, 0px)); width: 54px; height: 54px; border-radius: 16px; pointer-events: auto; z-index: 20; touch-action: manipulation; }
#btnMenuHud::before { content: ''; position: absolute; inset: -10px; }
.i-clock { width: 26px; height: 26px; border-radius: 50%; border: 4px solid currentColor; position: relative; }
.i-clock::after { content: ''; position: absolute; left: 50%; top: 3px; width: 3px; height: 8px; margin-left: -1.5px; background: currentColor; border-radius: 2px; box-shadow: 3px 6px 0 -0.5px currentColor; }
.i-fish { width: 30px; height: 18px; background: linear-gradient(180deg, #8ff3ff, #2fb8e8); clip-path: polygon(0 18%, 22% 50%, 0 82%, 8% 50%, 30% 50%, 30% 50%, 40% 12%, 70% 0, 92% 22%, 100% 50%, 92% 78%, 70% 100%, 40% 88%, 26% 66%, 18% 70%, 22% 50%, 18% 30%, 26% 34%); vertical-align: -3px; }
.i-fish.big { width: 64px; height: 38px; }
.i-book { width: 22px; height: 18px; background: linear-gradient(90deg, #ffb13b 0 46%, #c4520a 46% 54%, #ffb13b 54%); border-radius: 3px 3px 5px 5px; box-shadow: inset 0 -3px 0 #fff3d6; }
#timer { left: 50%; top: calc(10px + var(--safe-t)); transform: translateX(-50%); display: flex; align-items: center; gap: 8px; color: #fff; font-weight: 700; -webkit-text-stroke: 2px var(--ink); paint-order: stroke fill; text-shadow: 0 4px 0 rgba(7,19,29,.3); font-variant-numeric: tabular-nums; }
#timer b { font-size: 48px; line-height: 1; min-width: 56px; text-align: center; }
#timer .i-clock { color: #fff; filter: drop-shadow(0 2px 0 rgba(7,19,29,.5)); -webkit-text-stroke: 0; }
#timer.low b { color: #ff5c7a; animation: tpulse .5s ease-in-out infinite alternate; }
@keyframes tpulse { to { transform: scale(1.15); } }
#hud #score { left: 50%; top: calc(64px + var(--safe-t)); transform: translateX(-50%); font-size: 26px; color: #ffe14d; -webkit-text-stroke: 1.5px var(--ink); }
#combo { left: 50%; top: calc(98px + var(--safe-t)); transform: translateX(-50%); display: flex; gap: 5px; }
#combo i { width: 12px; height: 12px; border-radius: 50%; background: rgba(255,255,255,.3); box-shadow: inset 0 0 0 2px rgba(255,255,255,.7); transition: .2s; }
#combo i.on { background: #ffd23f; box-shadow: 0 0 10px #ffd23f, inset 0 0 0 2px #fff; transform: scale(1.15); }
#catchPill { right: calc(14px + env(safe-area-inset-right, 0px)); top: calc(20px + var(--safe-t)); padding: 6px 14px 6px 10px; font-size: 22px; gap: 8px; }
#meter { left: 50%; bottom: calc(34px + var(--safe-b)); transform: translateX(-50%); width: min(78vw, 380px); height: 26px; border-radius: 13px; background: rgba(7,19,29,.55); box-shadow: inset 0 0 0 3px rgba(255,255,255,.75), 0 6px 16px rgba(7,19,29,.3); overflow: visible; }
#meter .g, #meter .fill, #meter .needle { position: absolute; top: 0; bottom: 0; }
#meter.power { background: linear-gradient(90deg, rgba(155,255,122,.55) 0 38%, rgba(122,216,255,.55) 38% 72%, rgba(255,216,77,.6) 72%); }
#meter.power .g { display: none; }
#meter.power .fill { left: 0; border-radius: 13px; background: rgba(255,255,255,.35); }
#meter.fight .g { border-radius: 8px; background: linear-gradient(180deg, #7dff8a, #2bc46a); box-shadow: 0 0 12px rgba(80,255,120,.55); transition: left .08s linear; }
#meter.fight .fill { left: 8px; right: auto; top: auto; bottom: -12px; height: 6px; max-width: calc(100% - 16px); border-radius: 3px; background: linear-gradient(90deg, #ffe14d, #ffb13b); }
#meter .needle { width: 8px; margin-left: -4px; top: -7px; bottom: -7px; border-radius: 4px; background: #fff; box-shadow: 0 0 0 2px var(--ink), 0 3px 6px rgba(0,0,0,.35); }
#meter.hot { animation: shakeX .08s linear infinite; }
#meter.hot .needle { background: #ff3b5c; }
#meter.slack .needle { background: #ffd23f; animation: blink .3s infinite alternate; }
#meter.ok .needle { background: #fff; box-shadow: 0 0 0 2px var(--ink), 0 0 14px #7dff8a; }
@keyframes shakeX { 50% { transform: translateX(calc(-50% + 3px)); } }
#meter .reel { position: absolute; left: -44px; top: 50%; width: 34px; height: 34px; margin-top: -17px; border-radius: 50%; background: conic-gradient(#d8dde6 0 25%, #8d99a6 0 50%, #d8dde6 0 75%, #8d99a6 0); box-shadow: 0 0 0 3px #fff, 0 3px 8px rgba(0,0,0,.3); }
#meter.power .reel { display: none; }
#dist { left: 50%; bottom: calc(70px + var(--safe-b)); transform: translateX(-50%); font-size: 26px; font-weight: 700; color: #fff; -webkit-text-stroke: 1.5px var(--ink); paint-order: stroke fill; font-variant-numeric: tabular-nums; }
#mark { left: 0; top: 0; width: 64px; height: 64px; margin: -64px 0 0 -32px; border-radius: 50%; display: grid; place-items: center; font-size: 46px; font-weight: 700; color: #fff; background: radial-gradient(circle, #ff5c7a, #ff2e55); box-shadow: 0 0 0 4px #fff, 0 6px 18px rgba(255,46,85,.5); }
#mark.in { animation: markIn .25s cubic-bezier(.2,1.8,.4,1) both, markP .35s .25s ease-in-out infinite alternate; }
@keyframes markIn { from { scale: .2; } }
@keyframes markP { to { scale: 1.15; } }
#hint { left: 50%; bottom: calc(22% + var(--safe-b)); width: 84px; height: 84px; margin-left: -42px; border-radius: 50%; border: 5px solid #fff; opacity: .9; }
#hint i { position: absolute; left: 50%; top: 50%; width: 30px; height: 30px; margin: -15px; border-radius: 50%; background: #fff; }
#hint.tap { animation: tapPulse 0.9s ease-out infinite; }
#hint.hold i { animation: holdGrow 1.4s ease-in-out infinite; }
@keyframes tapPulse { 0% { box-shadow: 0 0 0 0 rgba(255,255,255,.7); transform: scale(1); } 70% { box-shadow: 0 0 0 26px rgba(255,255,255,0); transform: scale(.9); } 100% { transform: scale(1); } }
@keyframes holdGrow { 0%, 100% { transform: scale(.6); } 60% { transform: scale(2.3); opacity: .6; } }
/* 잡은 물고기 카드 */
#catch { position: fixed; left: 50%; bottom: calc(26px + var(--safe-b)); transform: translateX(-50%); z-index: 8; pointer-events: none; display: flex; flex-direction: column; align-items: center; gap: 2px; min-width: 220px; padding: 12px 26px 14px; border-radius: 26px; background: rgba(255,255,255,.95); box-shadow: 0 0 0 4px var(--rc, #8d99a6), 0 12px 30px rgba(7,19,29,.3); }
#catch.in { animation: cardIn .45s cubic-bezier(.2,1.6,.4,1) both; }
@keyframes cardIn { from { transform: translateX(-50%) translateY(40px) scale(.6); opacity: 0; } }
#catch .cs { display: flex; gap: 2px; }
#catch .cn { font-family: 'Jua', 'Fredoka', sans-serif; font-size: 32px; line-height: 1.1; color: var(--rc); -webkit-text-stroke: 1px rgba(7,19,29,.25); }
#catch .crow { display: flex; gap: 14px; align-items: baseline; font-weight: 700; }
#catch .cm { font-size: 22px; color: #6b7785; }
#catch .cp { font-size: 30px; color: #ff7a1a; }
#catch .cnew { position: absolute; right: -10px; top: -12px; padding: 3px 10px; border-radius: 10px; background: linear-gradient(90deg, #ff5c7a, #ffb13b); color: #fff; font-weight: 700; font-size: 15px; letter-spacing: 1px; transform: rotate(8deg); }
#catch.gold { background: linear-gradient(180deg, #fffbe8, #ffe9a8); }
.pop.miss { color: #ff5c7a; font-size: 34px; }
.pop .i-clock { color: #ff5c7a; width: 40px; height: 40px; }
/* 결과 */
.best-catch { display: flex; align-items: center; gap: 8px; padding: 6px 16px; border-radius: 999px; background: var(--rc); color: #fff; font-family: 'Jua', 'Fredoka', sans-serif; font-size: 20px; }
.best-catch span { font-family: 'Fredoka', sans-serif; font-weight: 700; opacity: .9; }
.best-catch .i-fish { background: #fff; }
.best-m .i-book { margin-left: 2px; }
.mid-btn .dexN { font-size: 16px; }
/* 도감 */
#dex .sheet { max-height: min(88vh, 760px); }
#grid { grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); }
.slot { position: relative; padding: 18px 4px 8px; box-shadow: inset 0 0 0 2px var(--rc); }
.slot img { width: 92px; height: 64px; object-fit: contain; border-radius: 0; }
.slot.lock img { filter: brightness(0) opacity(.22); }
.slot b { font-family: 'Jua', 'Fredoka', sans-serif; font-weight: 400; font-size: 14px; }
.slot span { font-size: 12px; opacity: .65; }
.slot.got { background: linear-gradient(180deg, #ffffff, #eef7ff); box-shadow: inset 0 0 0 3px var(--rc); }
.slot .rs { position: absolute; left: 6px; top: 4px; display: flex; gap: 1px; }
.slot .rs .i-star { width: 12px; height: 12px; }
.slot.lock .i-fish.big { filter: brightness(0) opacity(.2); }
#dex .sheet-h .ic-btn { width: 44px; height: 44px; }
/* 가로 낮은 화면 */
@media (max-height: 500px) {
  #timer b { font-size: 36px; }
  #hud #score { top: calc(50px + var(--safe-t)); font-size: 20px; }
  #combo { top: calc(78px + var(--safe-t)); }
  #meter { bottom: calc(22px + var(--safe-b)); width: min(52vw, 380px); }
  #dist { bottom: calc(54px + var(--safe-b)); font-size: 22px; }
  #catch { bottom: calc(14px + var(--safe-b)); padding: 8px 20px 10px; }
  #catch .cn { font-size: 26px; }
  .logo-img { width: min(46vw, 360px); }
  #menu { padding-top: calc(14px + var(--safe-t)); padding-bottom: calc(12px + var(--safe-b)); }
  .menu-bottom { gap: 10px; }
  .big-btn { height: 58px; font-size: 26px; }
}
/* 가로 낮은 화면 메뉴: 왼쪽 로고 · 가운데 케케 · 오른쪽 버튼 */
@media (orientation: landscape) and (max-height: 520px) {
  #menu { display: grid; grid-template-columns: 1fr minmax(160px, .7fr) 1fr; grid-template-rows: 1fr auto auto; align-items: center; justify-items: center; padding: calc(10px + var(--safe-t)) calc(16px + env(safe-area-inset-right, 0px)) calc(10px + var(--safe-b)) calc(16px + env(safe-area-inset-left, 0px)); }
  #menu .logo-wrap { grid-column: 1; grid-row: 1; padding-left: 56px; }
  #menu .logo-img { width: min(34vw, 320px); }
  #menu .best-m { grid-column: 1; grid-row: 2; margin: 0; }
  #menu #chalM { grid-column: 1; grid-row: 3; }
  #menu #hofMenu { grid-column: 3; grid-row: 1; align-self: end; width: min(100%, 320px); margin: 0; }
  #menu .menu-bottom { grid-column: 3; grid-row: 2 / span 2; gap: 10px; }
  #menu .big-btn { min-width: 200px; height: 52px; font-size: 24px; }
  #menu .mid-btn { height: 42px; min-width: 42px; }
  #menu .menu-bottom { gap: 8px; }
  #menu .hof-inline { max-height: 30vh; overflow: hidden; }
  #menu .studio { padding: 6px 14px; font-size: 13px; }
}
@media (orientation: landscape) and (max-height: 520px) {
  #catch { left: auto; right: calc(22px + env(safe-area-inset-right, 0px)); bottom: calc(22px + var(--safe-b)); transform: none; }
  #catch.in { animation: cardInR .45s cubic-bezier(.2,1.6,.4,1) both; }
}
@keyframes cardInR { from { transform: translateY(40px) scale(.6); opacity: 0; } }
.mini em { font-style: normal; }
/* ---------- 확장: 낚시터·날씨·이벤트·상점 ---------- */
.i-bone { width: 26px; height: 16px; background: linear-gradient(180deg, #fffaf0, #f0dcb4); -webkit-mask: var(--bone) center/contain no-repeat; mask: var(--bone) center/contain no-repeat; vertical-align: -2px; filter: drop-shadow(0 1px 0 rgba(0,0,0,.25)); }
.i-lock { width: 18px; height: 20px; position: relative; background: linear-gradient(#fff, #fff) bottom/100% 60% no-repeat; border-radius: 3px; }
.i-lock::before { content: ''; position: absolute; left: 3px; right: 3px; top: 0; height: 11px; border: 3px solid #fff; border-bottom: 0; border-radius: 8px 8px 0 0; box-sizing: border-box; }
.i-unlock { width: 22px; height: 22px; background: radial-gradient(circle, #fff 0 30%, transparent 32%), conic-gradient(#ffc62e 0 12.5%, transparent 0 25%, #ffc62e 0 37.5%, transparent 0 50%, #ffc62e 0 62.5%, transparent 0 75%, #ffc62e 0 87.5%, transparent 0); border-radius: 50%; }
.i-map { width: 24px; height: 20px; background: currentColor; clip-path: polygon(0 10%, 33% 0, 66% 12%, 100% 2%, 100% 90%, 66% 100%, 33% 88%, 0 98%); }
.i-rod { width: 22px; height: 22px; background: linear-gradient(45deg, transparent 46%, #2a2f3a 46% 54%, transparent 54%) no-repeat, radial-gradient(circle at 25% 75%, #c9955a 0 18%, transparent 20%); position: relative; }
.i-rod::after { content: ''; position: absolute; right: 0; top: 2px; width: 2px; height: 12px; background: #9ab; }
.i-rain { width: 18px; height: 16px; background: radial-gradient(ellipse at 50% 35%, #b8c8d8 0 45%, transparent 48%), linear-gradient(100deg, transparent 30%, #4fb3ff 30% 38%, transparent 38% 58%, #4fb3ff 58% 66%, transparent 66%) bottom/100% 45% no-repeat; }
.i-moon { width: 16px; height: 16px; border-radius: 50%; box-shadow: inset -5px -2px 0 0 #ffd84d; transform: rotate(-20deg); }
.i-crown.big { width: 36px; height: 28px; }
#pills { right: calc(12px + env(safe-area-inset-right, 0px)); top: calc(18px + var(--safe-t)); display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
#pills .pill { padding: 4px 12px 4px 8px; font-size: 19px; gap: 6px; }
.wx { width: 34px; height: 34px; border-radius: 50%; background: rgba(7,19,29,.45); position: relative; }
.wx::before { content: ''; position: absolute; left: 7px; top: 7px; width: 20px; height: 20px; border-radius: 50%; background: radial-gradient(circle, #fff3a0, #ffc62e); box-shadow: 0 0 10px #ffd84d; }
.wx.sunset::before { background: radial-gradient(circle, #ffd8a0, #ff7a3a); box-shadow: 0 0 10px #ff9a4a; top: 12px; }
.wx.night::before, .wx.cave::before { background: none; box-shadow: inset -6px -3px 0 0 #ffe9a0; transform: rotate(-20deg); }
.wx.cave::before { box-shadow: inset -6px -3px 0 0 #a88aff; }
.wx.rain::after { content: ''; position: absolute; left: 6px; right: 6px; bottom: 4px; height: 12px; background: linear-gradient(100deg, transparent 20%, #8fd0ff 20% 30%, transparent 30% 50%, #8fd0ff 50% 60%, transparent 60% 80%, #8fd0ff 80% 90%, transparent 90%); }
.wx.rain::before { background: radial-gradient(ellipse at 50% 40%, #e0e8f0 0 55%, transparent 58%); box-shadow: none; top: 3px; }
.wx.snow::after { content: '❄'; position: absolute; right: -4px; bottom: -4px; font-size: 16px; color: #fff; }
#evt { left: 50%; top: calc(122px + var(--safe-t)); transform: translateX(-50%); display: flex; align-items: center; gap: 4px; padding: 4px 14px; border-radius: 999px; background: rgba(7,19,29,.55); color: #ffe14d; font-weight: 700; font-size: 22px; overflow: hidden; }
#evt::after { content: ''; position: absolute; left: 0; bottom: 0; height: 3px; width: calc(var(--p, 1) * 100%); background: #ffe14d; }
#evt[data-k="gold"] { background: linear-gradient(90deg, rgba(255,180,0,.85), rgba(255,120,0,.85)); color: #fff; -webkit-text-stroke: 1px rgba(7,19,29,.3); animation: pulse .6s infinite; }
#evt .i-fish { width: 24px; height: 15px; }
#banner { position: fixed; left: 50%; top: 32%; transform: translate(-50%, -50%); z-index: 7; pointer-events: none; display: flex; align-items: center; gap: 10px; padding: 12px 26px; border-radius: 26px; background: rgba(7,19,29,.6); color: #fff; font-family: 'Jua', 'Fredoka', sans-serif; font-size: 34px; white-space: nowrap; }
#banner.show { animation: banner 2.2s ease-out forwards; }
#banner.gold { background: linear-gradient(90deg, #ffb300, #ff7a1a); }
#banner.gold .x2 { font-family: 'Fredoka', sans-serif; font-weight: 700; font-size: 54px; }
#banner.boss { background: linear-gradient(90deg, #6a2aff, #c03aff); }
#banner.school .i-fish { width: 40px; height: 24px; }
#banner.spot { background: rgba(255,255,255,.92); color: var(--ink); }
#meter .bm { display: none; position: absolute; right: -40px; top: 50%; margin-top: -14px; width: 32px; height: 26px; }
#meter.boss .bm { display: block; animation: pulse .5s infinite; }
#meter.boss { box-shadow: inset 0 0 0 3px #c03aff, 0 0 18px rgba(192,58,255,.6); }
#catTap { left: 0; top: 0; width: 76px; height: 76px; margin: -38px 0 0 -38px; border-radius: 50%; border: 4px dashed #fff; background: rgba(255,92,122,.35); z-index: 7 !important; pointer-events: auto; animation: tapPulse .8s ease-out infinite; }
#catch .crow { flex-wrap: wrap; justify-content: center; }
#catch .cb { font-size: 20px; font-weight: 700; color: #8a6a3a; display: flex; align-items: center; gap: 4px; }
#catch .cx { display: flex; gap: 6px; }
#catch .cx em { font-style: normal; font-weight: 700; padding: 1px 8px; border-radius: 8px; color: #fff; font-size: 16px; }
#catch .cx .x2 { background: #ff9a1a; } #catch .cx .xc { background: #2bc46a; }
#catch:has(.cx:empty) .cx { display: none; }
.pop.cheer { color: #ffe14d; font-size: 30px; }
.pop .i-bone { width: 34px; height: 20px; }
/* 메뉴 낚시터 */
#spots { display: flex; gap: 10px; overflow-x: auto; width: min(100%, 560px); padding: 6px 4px 8px; scroll-snap-type: x mandatory; scrollbar-width: none; touch-action: pan-x; }
#spots::-webkit-scrollbar { display: none; }
.spot { flex: none; width: 150px; height: 90px; border-radius: 16px; background-size: cover; background-position: center; position: relative; overflow: hidden; scroll-snap-align: center; box-shadow: 0 4px 10px rgba(7,19,29,.3); color: #fff; text-align: left; padding: 0; transition: transform .15s; }
.spot::before { content: ''; position: absolute; inset: 0; background: linear-gradient(transparent 30%, rgba(7,19,29,.75)); }
.spot > b { position: absolute; left: 8px; bottom: 22px; font-family: 'Jua', 'Fredoka', sans-serif; font-weight: 400; font-size: 16px; text-shadow: 0 1px 2px #000; }
.spot .sb, .spot .sl { position: absolute; left: 8px; right: 6px; bottom: 5px; display: flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 700; }
.spot .sb .i-crown { width: 13px; height: 10px; } .spot .sb .i-book { width: 14px; height: 11px; margin-left: 6px; }
.spot.on { box-shadow: 0 0 0 4px #ffc62e, 0 6px 14px rgba(7,19,29,.35); transform: scale(1.04); }
.spot.lock { filter: grayscale(.8) brightness(.7); }
.spot.lock::after { content: ''; position: absolute; inset: 0; background: rgba(7,19,29,.35); }
.spot .sl { z-index: 1; gap: 6px; } .spot .sl > span { display: flex; align-items: center; gap: 2px; opacity: .8; } .spot .sl .ok { color: #9bff7a; opacity: 1; }
.spot .sl .i-crown { width: 13px; height: 10px; } .spot .sl .i-book { width: 14px; height: 11px; }
.spot .i-lock { position: absolute; right: 8px; top: 8px; transform: scale(1.1); }
.spot.nope { animation: shakeX2 .3s; }
@keyframes shakeX2 { 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }
.best-m .i-bone { margin-left: 2px; }
.btn-shop { gap: 4px !important; } .btn-shop .i-bone { width: 22px; height: 14px; }
/* 결과: 새 낚시터 */
.unlock-o { display: flex; align-items: center; gap: 10px; width: 100%; height: 64px; border-radius: 18px; background-size: cover; background-position: center; position: relative; overflow: hidden; color: #fff; padding: 0 14px; box-shadow: 0 0 0 3px #ffc62e; animation: pulse 1s infinite; }
.unlock-o::before { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(7,19,29,.75), rgba(7,19,29,.15)); }
.unlock-o > * { position: relative; }
.unlock-o b { font-family: 'Jua', 'Fredoka', sans-serif; font-weight: 400; font-size: 22px; }
.unlock-o em { font-style: normal; font-weight: 700; font-size: 14px; padding: 2px 8px; border-radius: 8px; background: var(--pink); margin-left: auto; }
/* 도감 탭 */
#dexTabs { display: flex; gap: 8px; overflow-x: auto; padding: 2px 4px 10px; scrollbar-width: none; flex: none; }
#dexTabs::-webkit-scrollbar { display: none; }
.dt { flex: none; width: 74px; height: 46px; border-radius: 12px; background: #e8eef4 center/cover; position: relative; overflow: hidden; display: flex; align-items: flex-end; justify-content: center; box-shadow: inset 0 0 0 2px rgba(7,19,29,.1); }
.dt span { position: relative; width: 100%; font-size: 11px; font-weight: 700; color: #fff; background: rgba(7,19,29,.55); padding: 1px 0; }
.dt.on { box-shadow: 0 0 0 3px #ffc62e; }
.dt .i-bone { position: absolute; top: 8px; left: 50%; margin-left: -13px; }
.dex-name { font-family: 'Jua', 'Fredoka', sans-serif; font-weight: 400; font-size: 18px; opacity: .7; margin-left: auto; margin-right: 10px; }
.slot.boss { box-shadow: inset 0 0 0 3px var(--rc), 0 0 12px rgba(163,92,255,.35); }
.slot .cd { position: absolute; right: 6px; top: 4px; }
.slot .rs .i-crown { width: 16px; height: 12px; }
/* 상점 */
.shop-sheet { max-width: 420px; }
#shopList { display: flex; flex-direction: column; gap: 12px; }
.shop-row .ui { flex: 1; display: flex; flex-direction: column; gap: 6px; }
.shop-row .ui > b { font-family: 'Jua', 'Fredoka', sans-serif; font-weight: 400; font-size: 18px; }
.shop-row .pips { flex: none; }
.buy .i-bone { width: 22px; height: 14px; }
.buy.nope { animation: shakeX2 .3s; }
.up-ic { width: 52px; height: 52px; border-radius: 14px; flex: none; position: relative; background: #fff; box-shadow: inset 0 0 0 2px rgba(7,19,29,.08); }
.up-ic.rod::before { content: ''; position: absolute; left: 10px; top: 8px; width: 4px; height: 44px; border-radius: 2px; background: linear-gradient(#2a6ad0, #2a2f3a 70%, #c9955a 70%); transform: rotate(35deg); transform-origin: top; left: 34px; }
.up-ic.rod::after { content: ''; position: absolute; right: 8px; top: 10px; width: 2px; height: 26px; background: #9ab; }
.up-ic.reel::before { content: ''; position: absolute; inset: 9px; border-radius: 50%; background: conic-gradient(#d8dde6 0 25%, #8d99a6 0 50%, #d8dde6 0 75%, #8d99a6 0); box-shadow: 0 0 0 3px #5a6a7a; }
.up-ic.bait::before { content: ''; position: absolute; left: 14px; top: 10px; width: 24px; height: 30px; border-radius: 50% 50% 50% 50% / 40% 40% 60% 60%; background: radial-gradient(circle at 35% 30%, #fff 0 12%, transparent 14%), linear-gradient(#ff8fb1, #ff5c7a); }
.up-ic.bait::after { content: ''; position: absolute; left: 24px; top: 36px; width: 10px; height: 10px; border: 3px solid #8d99a6; border-top: 0; border-left: 0; border-radius: 0 0 8px 0; }
#over .row { flex-wrap: wrap; }
@media (max-height: 760px) { .spot { width: 132px; height: 78px; } #spots { padding-top: 2px; } }
@media (orientation: landscape) and (max-height: 520px) {
  #spots { width: 100%; }
  .spot { width: 118px; height: 66px; }
  .spot > b { font-size: 13px; bottom: 19px; }
  #evt { top: calc(100px + var(--safe-t)); font-size: 18px; }
  #banner { font-size: 26px; top: 28%; }
  #pills .pill { font-size: 16px; }
  .wx { width: 28px; height: 28px; } .wx::before { left: 5px; top: 5px; width: 18px; height: 18px; }
}
#catch .i-bone { background: linear-gradient(180deg, #f0d8a8, #b8905a); }
#menu .row { flex-wrap: nowrap; gap: 8px; }
#menu .row .mid-btn { padding: 0 12px; height: 48px; min-width: 48px; font-size: 17px; }
@media (orientation: landscape) and (max-height: 520px) {
  #menu #hofMenu { display: none !important; }
  #menu .menu-bottom { grid-row: 1 / span 3; align-self: center; }
  #menu .row .mid-btn { height: 42px; min-width: 42px; }
}
.i-bone { background: linear-gradient(180deg, #fff2c8, #e0b066); }
/* ---------- 엉뚱한 확장 ---------- */
.bait-i { font-size: 22px; line-height: 1; filter: drop-shadow(0 2px 2px rgba(0,0,0,.3)); }
#flash { position: fixed; inset: 0; background: #fff; opacity: 0; pointer-events: none; z-index: 30; }
#flash.on { animation: flash .5s ease-out; }
@keyframes flash { 0% { opacity: .95; } 100% { opacity: 0; } }
#catch .cimg { width: min(64vw, 260px); border-radius: 14px; box-shadow: 0 4px 12px rgba(7,19,29,.25); margin-top: 6px; }
#catch .cimg.map { box-shadow: 0 0 0 4px #ffc62e, 0 4px 12px rgba(7,19,29,.25); }
#catch .cmap { font-family: 'Jua', 'Fredoka', sans-serif; font-weight: 400; font-size: 20px; color: #ff7a1a; }
.spot.wacky.lock { filter: grayscale(1) brightness(.45) blur(1px); }
.spot .wk .mapic { font-size: 22px; }
.slot .at { position: absolute; left: 4px; bottom: 4px; display: flex; gap: 2px; }
.slot .at i { width: 14px; height: 14px; border-radius: 50%; background-size: cover; background-position: center; box-shadow: 0 0 0 1.5px #fff; }
.bait-row { display: flex; gap: 10px; justify-content: center; padding-top: 4px; }
.bait { position: relative; width: 64px; height: 64px; border-radius: 16px; background: #f2f4f8; display: grid; place-items: center; box-shadow: inset 0 0 0 2px rgba(7,19,29,.08); }
.bait .be { font-size: 32px; }
.bait.on { background: #fff5d1; box-shadow: 0 0 0 3px #ffc62e; }
.bait.buyb .be { filter: grayscale(.8); opacity: .6; }
.bait em { position: absolute; left: 0; right: 0; bottom: -8px; margin: 0 auto; width: max-content; padding: 1px 6px; border-radius: 8px; background: #ff7a1a; color: #fff; font-style: normal; font-weight: 700; font-size: 12px; display: flex; align-items: center; gap: 2px; }
.bait em .i-bone { width: 16px; height: 10px; }
.bait.no em { filter: grayscale(1); opacity: .6; }
.bait.nope { animation: shakeX2 .3s; }
.bait .ck { position: absolute; right: -4px; top: -4px; width: 20px; height: 20px; border-radius: 50%; background: #2bc46a; box-shadow: 0 0 0 2px #fff; }
.bait .ck::after { content: ''; position: absolute; left: 6px; top: 3px; width: 5px; height: 9px; border: solid #fff; border-width: 0 3px 3px 0; transform: rotate(45deg); }
#meter.tug { animation: shakeX .06s linear infinite; box-shadow: inset 0 0 0 3px #ff3b5c, 0 0 18px rgba(255,59,92,.7); }
#meter.heat .fill { background: linear-gradient(90deg, #ffb13b, #ff3b1a); }
#banner .sharkic { font-size: 40px; }
@media (orientation: landscape) and (max-height: 520px) { #catch .cimg { width: 200px; } }
