:root {
  --green: #1b5e20; --green-2: #2e7d32; --green-3: #43a047; --lime: #8bc34a;
  --pink: #f06292; --sky: #4fc3f7; --sand: #fff8e1; --ink: #1c2a1e;
  --card: #ffffff; --bg: #eef5e9; --muted: #6d7a6f;
  --tab-h: 64px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
  --font-head: 'Jua', 'Apple SD Gothic Neo', sans-serif;
  --font-body: 'Gowun Dodum', 'Apple SD Gothic Neo', 'Noto Sans KR', sans-serif;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; overflow: hidden; background: var(--bg); color: var(--ink); font-family: var(--font-body); touch-action: manipulation; }
button { font-family: inherit; cursor: pointer; }
#app { position: fixed; inset: 0; overflow: hidden; }

.screen { position: absolute; inset: 0; display: none; flex-direction: column; overflow: hidden; }
.screen.active { display: flex; }
.screen.sub { overflow-y: auto; padding-bottom: calc(var(--tab-h) + var(--safe-b) + 16px); }

h2 { font-family: var(--font-head); font-weight: 400; margin: 0; }
h3 { font-family: var(--font-head); font-weight: 400; margin: 12px 0 8px; color: var(--green); }

.btn-primary { background: linear-gradient(180deg, #57c15c, #2e7d32); color: #fff; border: none; border-radius: 16px; padding: 14px 28px; font-family: var(--font-head); font-size: 20px; box-shadow: 0 6px 0 #1b4d1f, 0 10px 20px rgba(0,0,0,.2); transition: transform .08s; }
.btn-primary:active { transform: translateY(4px); box-shadow: 0 2px 0 #1b4d1f; }
.btn-primary.big { font-size: 24px; padding: 16px 40px; }
.btn-secondary { background: #fff; color: var(--green); border: 2px solid var(--green-3); border-radius: 14px; padding: 12px 22px; font-family: var(--font-head); font-size: 18px; }
.btn-danger { margin: 18px auto 30px; display: block; background: #fff; color: #c62828; border: 2px solid #ef9a9a; border-radius: 12px; padding: 10px 18px; font-family: var(--font-head); }
.btn-mini { background: var(--green-3); color: #fff; border: none; border-radius: 10px; padding: 8px 12px; font-family: var(--font-head); font-size: 14px; }

/* ---------- 타이틀 ---------- */
#screen-title { background: linear-gradient(180deg, #7fd0ff 0%, #c6ecff 45%, #a5d883 46%, #6fb95a 100%); align-items: center; justify-content: flex-end; }
.title-bg { position: absolute; inset: 0; overflow: hidden; }
.cloud { position: absolute; background: #fff; border-radius: 50px; opacity: .9; animation: drift 40s linear infinite; }
.cloud::before, .cloud::after { content: ''; position: absolute; background: #fff; border-radius: 50%; }
.cloud.c1 { width: 120px; height: 40px; top: 10%; left: -140px; }
.cloud.c1::before { width: 60px; height: 60px; top: -30px; left: 20px; } .cloud.c1::after { width: 40px; height: 40px; top: -15px; left: 65px; }
.cloud.c2 { width: 90px; height: 30px; top: 22%; left: -120px; animation-delay: -18s; animation-duration: 55s; }
.cloud.c2::before { width: 45px; height: 45px; top: -22px; left: 15px; } .cloud.c2::after { width: 30px; height: 30px; top: -10px; left: 50px; }
.cloud.c3 { width: 150px; height: 45px; top: 5%; left: -170px; animation-delay: -30s; animation-duration: 70s; }
.cloud.c3::before { width: 70px; height: 70px; top: -35px; left: 30px; } .cloud.c3::after { width: 50px; height: 50px; top: -20px; left: 85px; }
@keyframes drift { from { transform: translateX(0); } to { transform: translateX(calc(100vw + 200px)); } }
.hill { position: absolute; border-radius: 50%; background: #7cc26a; }
.hill.h1 { width: 140vw; height: 60vh; left: -40vw; top: 40%; background: #8fd07a; }
.hill.h2 { width: 120vw; height: 50vh; left: 20vw; top: 44%; background: #78be66; }
.school-illust { position: absolute; left: 50%; top: 34%; transform: translateX(-50%); width: 220px; height: 120px; }
.school-roof { position: absolute; left: 10px; right: 10px; top: 20px; height: 22px; background: #d84a3a; border-radius: 6px 6px 0 0; }
.school-roof::after { content: ''; position: absolute; left: 50%; top: -22px; width: 0; height: 0; border-left: 30px solid transparent; border-right: 30px solid transparent; border-bottom: 24px solid #d84a3a; transform: translateX(-50%); }
.school-body { position: absolute; left: 10px; right: 10px; top: 42px; height: 70px; background: #fff3d6; border: 3px solid #d7b98a; border-radius: 0 0 8px 8px; display: flex; justify-content: space-around; align-items: center; padding: 0 12px; }
.school-body span { width: 30px; height: 34px; background: #8ad1ff; border: 3px solid #d7b98a; border-radius: 4px; }
.school-body span:nth-child(2) { height: 46px; margin-top: 24px; background: #8b5a2b; }
.school-tree { position: absolute; right: -60px; bottom: -10px; font-size: 64px; }
.school-flag { position: absolute; left: -30px; bottom: 0; font-size: 40px; }
.floating-butterflies i { position: absolute; font-style: normal; font-size: 28px; animation: flutter 8s ease-in-out infinite; }
.floating-butterflies i:nth-child(1) { left: 12%; top: 15%; animation-delay: 0s; }
.floating-butterflies i:nth-child(2) { left: 75%; top: 12%; animation-delay: -2s; font-size: 22px; filter: hue-rotate(60deg); }
.floating-butterflies i:nth-child(3) { left: 85%; top: 40%; animation-delay: -4s; filter: hue-rotate(200deg); }
.floating-butterflies i:nth-child(4) { left: 8%; top: 42%; animation-delay: -6s; font-size: 20px; filter: hue-rotate(300deg); }
.floating-butterflies i:nth-child(5) { left: 45%; top: 8%; animation-delay: -3s; font-size: 18px; }
@keyframes flutter { 0%,100% { transform: translate(0,0) rotate(-8deg); } 25% { transform: translate(18px,-22px) rotate(8deg); } 50% { transform: translate(-10px,-40px) rotate(-6deg); } 75% { transform: translate(22px,-14px) rotate(10deg); } }
.title-content { position: relative; z-index: 2; text-align: center; padding: 0 24px calc(48px + var(--safe-b)); width: 100%; }
.logo { font-family: var(--font-head); font-size: 64px; color: #fff; text-shadow: 0 4px 0 #1b5e20, 0 8px 18px rgba(0,0,0,.25); letter-spacing: 2px; user-select: none; }
.logo span { color: #ffe082; }
.tagline { font-family: var(--font-head); color: #1b5e20; font-size: 18px; margin: 4px 0 18px; }
.title-stats { display: flex; gap: 8px; justify-content: center; margin-bottom: 18px; flex-wrap: wrap; }
.title-stats span { background: rgba(255,255,255,.75); border-radius: 20px; padding: 5px 12px; font-size: 13px; font-weight: 700; color: var(--green); }
.title-note { margin-top: 18px; font-size: 13px; color: #1b4d1f; background: rgba(255,255,255,.6); display: inline-block; padding: 8px 14px; border-radius: 12px; }

/* ---------- 게이트 ---------- */
#screen-gate { background: linear-gradient(180deg, #d9efd2, #eef5e9); align-items: center; justify-content: center; padding: 24px; }
.gate-card { background: #fff; border-radius: 24px; padding: 32px 24px; text-align: center; box-shadow: 0 12px 40px rgba(27,94,32,.15); max-width: 360px; width: 100%; }
.gate-icon { font-size: 72px; }
.gate-card h2 { color: var(--green); font-size: 26px; margin: 8px 0; }
.gate-dist { font-family: var(--font-head); font-size: 42px; color: var(--pink); margin: 6px 0; }
.gate-sub { color: var(--muted); font-size: 14px; line-height: 1.6; margin-bottom: 18px; }

/* ---------- 상단 HUD ---------- */
.topbar { display: flex; align-items: center; justify-content: space-between; padding: calc(10px + var(--safe-t)) 14px 10px; background: linear-gradient(180deg, var(--green), var(--green-2)); color: #fff; z-index: 3; box-shadow: 0 4px 14px rgba(0,0,0,.15); }
.topbar.plain { position: sticky; top: 0; }
.topbar h2 { font-size: 24px; }
.player-chip { display: flex; align-items: center; gap: 10px; }
.avatar { width: 40px; height: 40px; border-radius: 50%; background: #fff; display: grid; place-items: center; font-size: 24px; box-shadow: inset 0 0 0 3px #a5d6a7; }
.avatar.xl { width: 92px; height: 92px; font-size: 54px; margin: 0 auto 12px; }
.pname { font-family: var(--font-head); font-size: 17px; line-height: 1.1; }
.plevel { font-size: 12px; opacity: .85; }
.hud-right { display: flex; gap: 8px; }
.chip { background: rgba(255,255,255,.18); border: 1px solid rgba(255,255,255,.35); border-radius: 20px; padding: 6px 12px; font-size: 14px; font-weight: 700; backdrop-filter: blur(4px); }
.dex-progress { font-family: var(--font-head); font-size: 16px; background: rgba(255,255,255,.2); padding: 4px 12px; border-radius: 20px; }

/* ---------- 지도 ---------- */
.map-wrap { position: relative; flex: 1; overflow: hidden; background: #cfe6c2; }
#map { width: 100%; height: 100%; display: block; touch-action: none; }
.map-hint { position: absolute; top: 12px; left: 50%; transform: translateX(-50%); background: rgba(255,255,255,.92); padding: 8px 14px; border-radius: 20px; font-size: 13px; font-weight: 700; color: var(--green); box-shadow: 0 4px 12px rgba(0,0,0,.12); white-space: nowrap; max-width: 92%; overflow: hidden; text-overflow: ellipsis; }
.gps-badge { position: absolute; right: 10px; bottom: 10px; background: rgba(0,0,0,.55); color: #fff; padding: 5px 10px; border-radius: 14px; font-size: 11px; }
.gps-badge.ok { background: rgba(46,125,50,.85); }
.gps-badge.sim { background: rgba(255,152,0,.9); }
.nearby { display: flex; gap: 8px; overflow-x: auto; padding: 10px 12px calc(var(--tab-h) + var(--safe-b) + 10px); background: #fff; scrollbar-width: none; min-height: 96px; }
.nearby::-webkit-scrollbar { display: none; }
.nearby .nb { flex: 0 0 auto; width: 74px; text-align: center; background: var(--bg); border-radius: 14px; padding: 8px 4px; border: 2px solid transparent; }
.nearby .nb.near { border-color: var(--lime); background: #f1f8e9; }
.nearby .nb .e { font-size: 30px; line-height: 1; }
.nearby .nb .n { font-size: 11px; font-weight: 700; margin-top: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nearby .nb .d { font-size: 10px; color: var(--muted); }
.nearby .empty { align-self: center; color: var(--muted); font-size: 13px; padding: 0 10px; }

/* ---------- 탭바 ---------- */
#tabbar { position: absolute; left: 0; right: 0; bottom: 0; height: calc(var(--tab-h) + var(--safe-b)); padding-bottom: var(--safe-b); background: #fff; display: none; box-shadow: 0 -4px 20px rgba(0,0,0,.08); z-index: 5; }
#tabbar.show { display: flex; }
#tabbar button { flex: 1; border: none; background: none; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; font-size: 11px; font-weight: 700; color: var(--muted); }
#tabbar button i { font-style: normal; font-size: 24px; transition: transform .15s; }
#tabbar button.active { color: var(--green); }
#tabbar button.active i { transform: translateY(-3px) scale(1.15); }

/* ---------- 도감 ---------- */
.dex-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 10px; padding: 14px; }
.dex-card { background: #fff; border-radius: 16px; padding: 12px 6px 10px; text-align: center; box-shadow: 0 3px 10px rgba(0,0,0,.06); border: 2px solid transparent; position: relative; }
.dex-card .e { font-size: 42px; line-height: 1; }
.dex-card.unknown .e { filter: brightness(0) opacity(.25); }
.dex-card .n { font-size: 13px; font-weight: 700; margin-top: 6px; }
.dex-card .r { font-size: 10px; color: #fff; border-radius: 10px; padding: 1px 7px; display: inline-block; margin-top: 4px; }
.dex-card .cnt { position: absolute; top: 6px; right: 8px; font-size: 10px; background: var(--bg); border-radius: 10px; padding: 1px 6px; color: var(--green); font-weight: 700; }
.dex-card.unknown .n { color: var(--muted); }
.dex-tags { display: flex; gap: 6px; justify-content: center; margin: 6px 0; flex-wrap: wrap; }
.dex-tags span { font-size: 12px; background: var(--bg); padding: 3px 10px; border-radius: 10px; color: var(--green); font-weight: 700; }
.dex-hint { font-size: 13px; color: var(--muted); background: var(--sand); padding: 8px 12px; border-radius: 10px; }

/* ---------- 퀘스트/배지 ---------- */
.quest-list { padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.quest { background: #fff; border-radius: 16px; padding: 12px 14px; box-shadow: 0 3px 10px rgba(0,0,0,.06); display: flex; align-items: center; gap: 12px; }
.quest .qi { font-size: 30px; }
.quest .qt { flex: 1; }
.quest .qt b { display: block; font-size: 15px; }
.quest .qt small { color: var(--muted); }
.quest .bar { height: 8px; background: var(--bg); border-radius: 4px; margin-top: 6px; overflow: hidden; }
.quest .bar div { height: 100%; background: linear-gradient(90deg, var(--lime), var(--green-3)); border-radius: 4px; transition: width .3s; }
.quest.done { background: #f1f8e9; border: 2px solid var(--lime); }
.quest .qr { font-size: 11px; color: var(--green); font-weight: 700; text-align: right; white-space: nowrap; }
.badge-section { padding: 0 14px; }
.badge-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(76px, 1fr)); gap: 10px; }
.badge { background: #fff; border-radius: 14px; padding: 10px 4px; text-align: center; box-shadow: 0 3px 10px rgba(0,0,0,.06); }
.badge .e { font-size: 32px; }
.badge .n { font-size: 11px; font-weight: 700; margin-top: 4px; }
.badge .d { font-size: 9px; color: var(--muted); }
.badge.locked .e { filter: grayscale(1) opacity(.3); }

/* ---------- 프로필 ---------- */
.profile-card { background: #fff; margin: 14px; border-radius: 20px; padding: 20px 16px; box-shadow: 0 3px 12px rgba(0,0,0,.06); text-align: center; }
.profile-name-row { display: flex; gap: 8px; justify-content: center; margin-bottom: 12px; }
#profile-name { font-family: var(--font-head); font-size: 20px; text-align: center; border: 2px solid #c8e6c9; border-radius: 12px; padding: 6px 10px; width: 160px; }
.level-row { display: flex; align-items: center; gap: 10px; font-family: var(--font-head); color: var(--green); }
.xpbar { flex: 1; height: 12px; background: var(--bg); border-radius: 6px; overflow: hidden; }
#xp-fill { height: 100%; width: 0; background: linear-gradient(90deg, #ffd54f, #ff8f00); transition: width .4s; }
.stat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 16px 0; }
.stat-grid div { background: var(--bg); border-radius: 12px; padding: 10px 4px; }
.stat-grid b { display: block; font-family: var(--font-head); font-size: 22px; color: var(--green); }
.stat-grid small { font-size: 11px; color: var(--muted); }
.avatar-pick { display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; }
.avatar-pick button { width: 42px; height: 42px; border-radius: 50%; border: 2px solid #c8e6c9; background: #fff; font-size: 22px; }
.avatar-pick button.sel { border-color: var(--green-3); background: #e8f5e9; }
.about { margin: 0 14px; background: var(--sand); border-radius: 16px; padding: 14px 16px; font-size: 14px; line-height: 1.6; }
.about h3 { margin-top: 0; }
.about .tiny { font-size: 12px; color: var(--muted); margin-bottom: 0; }

/* ---------- AR ---------- */
#screen-ar { background: #000; }
#cam { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
#cam-fallback { position: absolute; inset: 0; background: linear-gradient(180deg, #6fc3ff 0%, #bfe6ff 50%, #8fd07a 50.5%, #5aa84a 100%); display: none; }
#cam-fallback.show { display: block; }
#cam-fallback::after { content: '🏫'; position: absolute; left: 50%; top: 40%; transform: translate(-50%, -50%); font-size: 120px; opacity: .6; }
.ar-hud { position: absolute; top: calc(12px + var(--safe-t)); left: 12px; right: 12px; display: flex; align-items: flex-start; justify-content: space-between; z-index: 4; }
.ar-back { background: rgba(0,0,0,.5); color: #fff; border: 1px solid rgba(255,255,255,.4); border-radius: 20px; padding: 8px 14px; font-family: var(--font-head); font-size: 14px; }
.ar-target { text-align: center; }
.ar-name { font-family: var(--font-head); font-size: 24px; color: #fff; text-shadow: 0 2px 6px rgba(0,0,0,.6); }
.ar-rarity { display: inline-block; font-size: 11px; color: #fff; padding: 2px 10px; border-radius: 10px; font-weight: 700; }
#ar-balls { color: #fff; background: rgba(0,0,0,.5); }
.ar-arrow { position: absolute; top: 45%; color: #fff; font-family: var(--font-head); font-size: 18px; background: rgba(0,0,0,.5); padding: 8px 12px; border-radius: 12px; display: none; animation: blink 1s infinite; z-index: 3; }
.ar-arrow.left { left: 10px; } .ar-arrow.right { right: 10px; }
.ar-arrow.show { display: block; }
@keyframes blink { 50% { opacity: .4; } }
#creature-wrap { position: absolute; left: 50%; top: 40%; width: 0; height: 0; z-index: 2; will-change: transform; }
#creature { position: absolute; left: -70px; top: -70px; width: 140px; height: 140px; display: grid; place-items: center; font-size: 96px; line-height: 1; filter: drop-shadow(0 8px 12px rgba(0,0,0,.35)); animation: bob 2.2s ease-in-out infinite; transform-origin: 50% 90%; user-select: none; }
#creature.hit { animation: hitpop .35s ease-out; }
#creature.gone { animation: shrink .5s forwards; }
#creature.escape { animation: escape .7s ease-out forwards; }
#creature.dodge { animation: dodge .4s ease-out; }
@keyframes bob { 0%,100% { transform: translateY(0) scale(1); } 50% { transform: translateY(-14px) scale(1.04); } }
@keyframes hitpop { 0% { transform: scale(1); } 40% { transform: scale(1.25) rotate(-6deg); } 100% { transform: scale(1); } }
@keyframes shrink { to { transform: scale(0) rotate(180deg); opacity: 0; } }
@keyframes escape { 0% { transform: scale(1); } 100% { transform: translateY(-200px) scale(.4); opacity: 0; } }
@keyframes dodge { 0% { transform: translateX(0); } 30% { transform: translateX(-60px) rotate(-10deg); } 70% { transform: translateX(40px) rotate(6deg); } 100% { transform: translateX(0); } }
#creature-shadow { position: absolute; left: -40px; top: 52px; width: 80px; height: 20px; border-radius: 50%; background: rgba(0,0,0,.35); filter: blur(4px); }
#creature-ring { position: absolute; left: -70px; top: -70px; width: 140px; height: 140px; border-radius: 50%; border: 4px solid #fff; box-shadow: 0 0 0 3px rgba(0,0,0,.2), inset 0 0 0 3px rgba(0,0,0,.2); transform: scale(1); opacity: .9; animation: ringpulse 2.4s linear infinite; }
#creature-ring.hidden { display: none; }
@keyframes ringpulse { 0% { transform: scale(1.4); } 100% { transform: scale(.3); } }
#ball { position: absolute; left: 50%; bottom: calc(60px + var(--safe-b)); width: 84px; height: 84px; margin-left: -42px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #c5ff9a 0%, #67c05a 40%, #1b5e20 100%); box-shadow: inset -6px -8px 14px rgba(0,0,0,.35), 0 10px 20px rgba(0,0,0,.4); z-index: 6; touch-action: none; user-select: none; will-change: transform; display: grid; place-items: center; }
#ball::after { content: '🌳'; font-size: 30px; filter: drop-shadow(0 1px 2px rgba(0,0,0,.4)); }
#ball.flying { transition: none; }
#ball.hidden { display: none; }
#ball.ballshake { animation: ballshake .6s ease-in-out 3; }
@keyframes ballshake { 0%,100% { transform: translate(var(--bx), var(--by)) scale(.7) rotate(0); } 25% { transform: translate(calc(var(--bx) - 10px), var(--by)) scale(.7) rotate(-25deg); } 75% { transform: translate(calc(var(--bx) + 10px), var(--by)) scale(.7) rotate(25deg); } }
#swipe-hint { position: absolute; left: 50%; bottom: calc(150px + var(--safe-b)); width: 60px; margin-left: -30px; font-size: 44px; text-align: center; pointer-events: none; display: none; z-index: 7; filter: drop-shadow(0 2px 4px rgba(0,0,0,.5)); }
#swipe-hint.show { display: block; animation: swipeup 1.4s ease-in-out infinite; }
@keyframes swipeup { 0% { transform: translateY(0); opacity: 0; } 20% { opacity: 1; } 70% { transform: translateY(-150px); opacity: 1; } 100% { transform: translateY(-170px); opacity: 0; } }
.btn-mute { background: var(--bg); border: 2px solid #c8e6c9; border-radius: 12px; padding: 8px 14px; font-family: var(--font-head); color: var(--green); margin-top: 12px; }
#info-body { white-space: pre-line; }
#ar-msg { position: absolute; left: 0; right: 0; top: 22%; text-align: center; font-family: var(--font-head); font-size: 34px; color: #fff; text-shadow: 0 3px 0 #1b5e20, 0 6px 14px rgba(0,0,0,.5); pointer-events: none; opacity: 0; transition: opacity .2s; z-index: 5; }
#ar-msg.show { opacity: 1; animation: popmsg .5s; }
@keyframes popmsg { 0% { transform: scale(.4); } 60% { transform: scale(1.15); } 100% { transform: scale(1); } }
.ar-tip { position: absolute; left: 0; right: 0; bottom: calc(160px + var(--safe-b)); text-align: center; color: #fff; font-size: 14px; text-shadow: 0 1px 4px rgba(0,0,0,.6); pointer-events: none; }

/* ---------- 모달 ---------- */
.modal { position: absolute; inset: 0; background: rgba(0,0,0,.55); display: none; align-items: center; justify-content: center; padding: 24px; z-index: 20; backdrop-filter: blur(3px); }
.modal.show { display: flex; }
.modal-card { background: #fff; border-radius: 26px; padding: 26px 22px; width: 100%; max-width: 340px; text-align: center; animation: popin .3s cubic-bezier(.2,1.4,.4,1); box-shadow: 0 20px 60px rgba(0,0,0,.35); position: relative; overflow: hidden; }
@keyframes popin { from { transform: scale(.6); opacity: 0; } }
.catch-emoji { font-size: 84px; line-height: 1; margin-bottom: 6px; }
.modal-card h2 { color: var(--green); font-size: 28px; }
#catch-name { font-family: var(--font-head); font-size: 22px; margin: 4px 0; }
.catch-desc { color: var(--muted); font-size: 14px; line-height: 1.6; }
.reward { display: flex; gap: 8px; justify-content: center; margin: 12px 0 18px; flex-wrap: wrap; }
.reward span { background: var(--sand); border-radius: 12px; padding: 6px 12px; font-weight: 700; color: #b26a00; font-size: 14px; }
.confetti::before { content: '🎉'; position: absolute; left: 14px; top: 14px; font-size: 26px; animation: bob 1.5s infinite; }
.confetti::after { content: '✨'; position: absolute; right: 14px; top: 14px; font-size: 26px; animation: bob 1.5s infinite .4s; }

#toast { position: absolute; left: 50%; bottom: calc(var(--tab-h) + var(--safe-b) + 20px); transform: translateX(-50%) translateY(20px); background: rgba(28,42,30,.92); color: #fff; padding: 10px 18px; border-radius: 20px; font-size: 14px; font-weight: 700; opacity: 0; transition: .25s; z-index: 30; pointer-events: none; white-space: nowrap; max-width: 92%; overflow: hidden; text-overflow: ellipsis; }
#toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

#dev-panel { position: absolute; left: 10px; top: calc(70px + var(--safe-t)); background: #fff8e1; border: 2px dashed #ff9800; border-radius: 12px; padding: 10px; font-size: 12px; display: none; flex-direction: column; gap: 6px; z-index: 40; }
#dev-panel.show { display: flex; }
