* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: #08111f; color: #eef6ff; font-family: Inter, system-ui, -apple-system, Segoe UI, sans-serif; }
button, input, select { font: inherit; }
.app { min-height: 100vh; max-width: 520px; margin: 0 auto; padding: 14px 12px 86px; }
.hero { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 12px 10px; }
.eyebrow { color: #facc15; font-size: 10px; font-weight: 900; letter-spacing: 1.4px; text-transform: uppercase; }
h1, h2 { margin: 2px 0 0; line-height: 1.05; }
h1 { font-size: 26px; }
h2 { font-size: 22px; }
.icon-btn, .quick, .market-actions button, .primary-btn { border: 0; border-radius: 10px; background: #203047; color: #fff; font-weight: 900; min-height: 38px; padding: 8px 11px; }
.icon-btn:active, .quick:active, .market-actions button:active, .primary-btn:active, .tab:active { transform: translateY(1px); filter: brightness(1.08); }
.toast { position: fixed; top: 12px; left: 50%; transform: translateX(-50%); z-index: 30; max-width: min(92vw, 480px); padding: 10px 13px; border-radius: 12px; background: rgba(15, 23, 42, .96); border: 1px solid rgba(255,255,255,.12); font-size: 12px; font-weight: 800; box-shadow: 0 16px 40px rgba(0,0,0,.35); }
.hidden { display: none !important; }
.view { display: none; animation: fade .12s ease; }
.view.active { display: block; }
@keyframes fade { from { opacity: .5; transform: translateY(3px); } to { opacity: 1; transform: none; } }
.stat-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.stat, .panel, .pass-card, .listing, .sell-row { border: 1px solid rgba(148,163,184,.14); border-radius: 12px; background: rgba(15, 23, 42, .76); box-shadow: inset 0 1px 0 rgba(255,255,255,.04); }
.stat { padding: 11px; }
.stat span, .muted { color: #94a3b8; font-size: 11px; font-weight: 800; }
.stat b { display: block; margin-top: 3px; font-size: 18px; }
.panel { margin-top: 10px; padding: 11px; }
.panel-title { font-size: 12px; color: #cbd5e1; font-weight: 900; margin-bottom: 8px; }
.team-list, .card-list, .sell-list { display: flex; flex-direction: column; gap: 8px; }
.team-mon { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 9px; border-radius: 9px; background: rgba(30,41,59,.78); }
.team-mon b, .listing-title, .sell-title { font-size: 13px; }
.team-mon span, .listing-meta, .sell-meta { color: #94a3b8; font-size: 10.5px; font-weight: 800; }
.quick-grid, .market-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.market-tools { display: grid; grid-template-columns: 1fr 112px; gap: 8px; margin: 4px 0 8px; }
input, select { width: 100%; border: 1px solid rgba(148,163,184,.16); border-radius: 10px; background: #101c2d; color: #fff; min-height: 40px; padding: 8px 10px; outline: none; font-weight: 800; }
.market-actions { margin-bottom: 10px; }
.listing { padding: 10px; }
.listing-top, .pass-top, .sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.listing-title { font-weight: 950; color: #fff; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.listing-price { color: #facc15; font-weight: 950; font-size: 13px; white-space: nowrap; }
.listing-meta { margin-top: 5px; line-height: 1.35; }
.listing-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; margin-top: 9px; }
.listing-actions button { border: 0; border-radius: 9px; min-height: 34px; background: #1d4ed8; color: #fff; font-weight: 950; }
.listing-actions button.secondary { background: #25364f; }
.pass-card { padding: 13px; margin-top: 4px; }
.badge { border-radius: 999px; padding: 5px 9px; background: #334155; color: #e2e8f0; font-size: 11px; font-weight: 950; }
.badge.premium { background: #7c3aed; color: #fff; }
.progress { height: 10px; border-radius: 999px; overflow: hidden; background: #1e293b; margin: 12px 0 7px; }
.progress div { height: 100%; width: 0%; background: linear-gradient(90deg, #38bdf8, #facc15); transition: width .2s ease; }
.reward-nav { display: grid; grid-template-columns: 72px 1fr 72px; align-items: center; gap: 8px; margin: 3px 0; }
.reward-nav b { text-align: center; font-size: 12px; color: #dbeafe; }
.reward-nav button { border: 0; border-radius: 9px; min-height: 34px; background: #24344d; color: #fff; font-size: 12px; font-weight: 950; }
.reward-card { padding: 10px; border: 1px solid rgba(148,163,184,.14); border-radius: 12px; background: rgba(15, 23, 42, .76); }
.reward-level { font-size: 12px; font-weight: 950; color: #facc15; margin-bottom: 7px; }
.reward-track { display: grid; grid-template-columns: 118px 1fr; gap: 8px; align-items: start; padding: 7px 0; border-top: 1px solid rgba(148,163,184,.1); color: #dbeafe; font-size: 11px; font-weight: 800; line-height: 1.35; }
.reward-track:first-of-type { border-top: 0; }
.track-name { color: #94a3b8; }
.track-name b { display: inline-block; margin-left: 3px; font-size: 9px; text-transform: uppercase; color: #cbd5e1; }
.track-name b.ready { color: #22c55e; }
.track-name b.claimed { color: #60a5fa; }
.track-name b.locked { color: #f87171; }
.premium-row { color: #f5d0fe; }
.tabbar { position: fixed; left: 50%; bottom: 12px; transform: translateX(-50%); z-index: 20; width: min(94vw, 500px); display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; padding: 5px; border-radius: 18px; background: linear-gradient(180deg, #5b341d, #2f1a10); border: 1px solid rgba(255,255,255,.16); box-shadow: 0 16px 40px rgba(0,0,0,.45); }
.tab { min-height: 44px; border: 0; color: #f8e7d0; background: transparent; border-radius: 14px; font-weight: 950; }
.tab.active { background: linear-gradient(180deg, #f4c27b, #b86b2e); color: #231107; }
.sheet { position: fixed; inset: 0; z-index: 25; background: rgba(2, 6, 23, .7); display: flex; align-items: flex-end; justify-content: center; padding: 12px; }
.sheet-card { width: min(100%, 520px); max-height: 82vh; overflow: hidden; display: flex; flex-direction: column; gap: 9px; padding: 13px; border-radius: 18px 18px 12px 12px; background: #0f172a; border: 1px solid rgba(255,255,255,.12); box-shadow: 0 -18px 50px rgba(0,0,0,.45); }
.sheet-card.compact { max-height: none; }
.sheet-head h2 { margin: 0; font-size: 18px; }
.sheet-head button { width: 34px; height: 34px; border: 0; border-radius: 9px; background: #25364f; color: #fff; font-weight: 950; }
.sell-list { overflow-y: auto; padding-right: 2px; }
.sell-row { padding: 10px; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.sell-row button { border: 0; border-radius: 9px; background: #16a34a; color: #fff; min-height: 32px; padding: 6px 10px; font-weight: 950; }
.primary-btn { background: #16a34a; width: 100%; margin-top: 2px; }
@media (max-width: 380px) {
  .market-tools { grid-template-columns: 1fr; }
  .reward-track { grid-template-columns: 1fr; gap: 3px; }
  h1 { font-size: 23px; }
  .icon-btn { font-size: 12px; }
}


/* Sidebar Navigation Menu */
.sidebar { position: fixed; top: 0; left: 0; bottom: 0; width: 260px; z-index: 50; background: #0f172a; border-right: 1px solid rgba(255,255,255,.12); transform: translateX(-100%); transition: transform .25s cubic-bezier(0.4, 0, 0.2, 1); display: flex; flex-direction: column; padding: 16px; }
.sidebar.open { transform: translateX(0); }
.sidebar-backdrop { position: fixed; inset: 0; z-index: 45; background: rgba(2, 6, 23, .6); }
.sidebar-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; border-bottom: 1px solid rgba(255,255,255,.1); padding-bottom: 10px; }
.sidebar-header h2 { font-size: 18px; margin: 0; font-weight: 950; color: #fff; }
.close-sidebar-btn { border: 0; width: 34px; height: 34px; border-radius: 9px; background: #25364f; color: #fff; font-size: 20px; font-weight: 950; display: flex; align-items: center; justify-content: center; }
.sidebar-links { display: flex; flex-direction: column; gap: 8px; }
.nav-link { border: 0; border-radius: 10px; background: transparent; color: #cbd5e1; font-weight: 800; min-height: 42px; text-align: left; padding: 8px 14px; font-size: 13.5px; width: 100%; transition: background .15s; }
.nav-link:active { background: rgba(255,255,255,.05); }
.nav-link.active { background: #1e293b; color: #facc15; font-weight: 900; }
.menu-btn { border: 0; background: transparent; color: #fff; font-size: 24px; cursor: pointer; padding: 0; line-height: 1; }

/* Inventory Tab / Lists */
.inventory-tabs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-bottom: 12px; }
.inv-tab { border: 0; border-radius: 8px; background: #1e293b; color: #cbd5e1; font-size: 11px; font-weight: 900; padding: 8px 5px; text-align: center; }
.inv-tab.active { background: #1d4ed8; color: #fff; }
.inventory-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.inv-item { padding: 10px; border-radius: 10px; background: rgba(30,41,59,.7); border: 1px solid rgba(255,255,255,.05); display: flex; flex-direction: column; justify-content: space-between; gap: 6px; }
.inv-item-name { font-size: 11.5px; font-weight: 900; color: #fff; line-height: 1.25; }
.inv-item-qty { font-size: 10px; color: #94a3b8; font-weight: 800; }
.inv-item button { border: 0; border-radius: 6px; background: #16a34a; color: #fff; font-size: 9.5px; font-weight: 900; padding: 5px; cursor: pointer; }
.lucky-egg-timer { margin-top: 8px; padding: 8px; border-radius: 8px; background: rgba(250, 204, 21, 0.12); border: 1px solid rgba(250, 204, 21, 0.25); color: #facc15; font-size: 11px; font-weight: 900; text-align: center; }

/* Shop / Stores */
.shop-list { display: flex; flex-direction: column; gap: 8px; }
.section-search { margin-bottom: 9px; }
.shop-item { padding: 10px; border-radius: 10px; background: rgba(30,41,59,.7); border: 1px solid rgba(255,255,255,.05); display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.shop-item-info { display: flex; flex-direction: column; gap: 2px; }
.shop-item-name { font-size: 12.5px; font-weight: 900; color: #fff; }
.shop-item-price { font-size: 11px; color: #facc15; font-weight: 900; }
.shop-item-summary { max-width: 330px; color: #94a3b8; font-size: 10px; font-weight: 800; line-height: 1.25; }
.shop-item button { border: 0; border-radius: 8px; background: #16a34a; color: #fff; font-size: 11px; font-weight: 950; min-height: 30px; padding: 5px 12px; }

/* Nursery Breeding */
.nursery-slots { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.nursery-slot { padding: 10px; border-radius: 10px; background: rgba(30,41,59,.6); border: 1px solid rgba(255,255,255,.05); display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; }
.slot-label { font-size: 9px; color: #94a3b8; font-weight: 900; text-transform: uppercase; }
.slot-content { font-size: 11.5px; font-weight: 900; color: #fff; height: 34px; display: flex; align-items: center; justify-content: center; line-height: 1.25; }
.nursery-slot button { border: 0; border-radius: 8px; background: #25364f; color: #fff; font-size: 11px; font-weight: 900; padding: 6px 10px; width: 100%; }

/* Berry Farm Fields */
.farm-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.farm-slot { padding: 10px; border-radius: 12px; background: rgba(30,41,59,.7); border: 1px solid rgba(255,255,255,.05); display: flex; flex-direction: column; gap: 6px; align-items: center; text-align: center; }
.farm-slot-num { font-size: 9px; color: #94a3b8; font-weight: 900; text-transform: uppercase; }
.farm-slot-status { font-size: 11.5px; font-weight: 900; min-height: 32px; display: flex; align-items: center; justify-content: center; line-height: 1.25; }
.farm-slot-time { font-size: 9.5px; color: #94a3b8; font-weight: 800; }
.farm-slot button { border: 0; border-radius: 8px; background: #16a34a; color: #fff; font-size: 10.5px; font-weight: 950; min-height: 28px; padding: 4px 8px; width: 100%; }
.farm-slot button.plant { background: #1d4ed8; }

/* Settings Form elements */
.settings-grid { display: grid; grid-template-columns: 1fr; gap: 8px; }
.setting-item { display: flex; flex-direction: column; }

/* Pokemon Cards */
.pokemon-card { display: grid; grid-template-columns: 76px 1fr; gap: 10px; align-items: start; }
.pokemon-sprite-box { width: 76px; height: 76px; border-radius: 14px; display: grid; place-items: center; background: radial-gradient(circle at 50% 70%, rgba(34,197,94,.28), rgba(15,23,42,.92) 66%); border: 1px solid rgba(148,163,184,.16); overflow: hidden; }
.pokemon-sprite-box img { width: 68px; height: 68px; object-fit: contain; image-rendering: auto; filter: drop-shadow(0 8px 10px rgba(0,0,0,.35)); }
.pokemon-card-main { min-width: 0; }
.pokemon-tags { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 5px; }
.pokemon-tag { border-radius: 999px; padding: 3px 7px; background: rgba(30,41,59,.9); color: #cbd5e1; font-size: 10px; font-weight: 900; }
.pokemon-bars { display: grid; grid-template-columns: repeat(3, 1fr); gap: 5px; margin-top: 8px; }
.mini-stat { padding: 5px; border-radius: 8px; background: rgba(2,6,23,.28); font-size: 10px; font-weight: 900; color: #dbeafe; text-align: center; }
.move-line { display: grid; grid-template-columns: 1fr auto; gap: 8px; padding: 7px 0; border-top: 1px solid rgba(148,163,184,.1); font-size: 11px; font-weight: 850; }
.move-line:first-child { border-top: 0; }
