    :root {
      --bg: #0b0b0f; --card: #14141c; --border: #252532;
      --primary: #f97316; --primary-hover: #fb923c;
      --primary-glow: rgba(249, 115, 22, 0.35);
      --text: #f4f4f5; --text-muted: #a1a1aa;
      --error: #f87171; --success: #34d399; --warning: #fbbf24;
      --input-bg: #0e0e14; --radius: 12px;
      --shadow: 0 25px 50px -12px rgba(0,0,0,0.6);
      --hp-green: #22c55e; --hp-yellow: #eab308; --hp-red: #ef4444;
    }
    * { margin: 0; padding: 0; box-sizing: border-box; touch-action: manipulation; }
    html {
      scroll-behavior: smooth;
      touch-action: manipulation;
      scrollbar-color: var(--border) var(--card);
      scrollbar-width: thin;
    }
    *::-webkit-scrollbar { width: 10px; height: 10px; }
    *::-webkit-scrollbar-track { background: var(--card); border-radius: 10px; }
    *::-webkit-scrollbar-thumb {
      background: var(--border); border: 2px solid var(--card); border-radius: 10px;
      transition: background-color 0.2s ease;
    }
    *::-webkit-scrollbar-thumb:hover { background: #3b3b4b; }
    body {
      font-family: 'Inter', system-ui, sans-serif;
      background: var(--bg); color: var(--text); min-height: 100vh;
      background-image:
        radial-gradient(ellipse 90% 60% at 50% -30%, rgba(249,115,22,0.22), transparent),
        radial-gradient(ellipse 50% 40% at 100% 100%, rgba(251,146,60,0.1), transparent);
    }

    /* AUTH */
    .auth-wrapper { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px; background:linear-gradient(rgba(12,10,18,.42),rgba(12,10,18,.58)),url('../assets/login-charizard-bg.png') center/cover no-repeat; }
    .auth-wrapper > .container > .card {
      background:linear-gradient(145deg,rgba(249,115,22,.10),rgba(234,88,12,.10)),linear-gradient(145deg,rgba(68,31,36,.48),rgba(27,21,28,.48));
      border-color:rgba(242,133,83,.48);
      box-shadow:0 25px 65px rgba(34,12,16,.56),0 0 36px rgba(238,103,60,.12);
      backdrop-filter:blur(7px);
    }
    .auth-wrapper > .container > .card::before { background:linear-gradient(90deg,#e64b3c,#f28b4e,#ffc45b,#fb923c); }
    .auth-wrapper .logo-icon { position:relative; overflow:hidden; border-radius:50%; background:transparent; box-shadow:none; }
    .auth-wrapper .logo-icon .trainer-logo-image { position:absolute; left:50%; top:50%; width:335%; height:335%; max-width:none; object-fit:contain; pointer-events:none; transform:translate(-50%,-50%); }
    .auth-wrapper .tabs { background:rgba(35,22,29,.82); border-color:rgba(242,133,83,.24); }
    .auth-wrapper .tab.active { background:linear-gradient(135deg,#df493d,#f17b3d 65%,#f5a943); box-shadow:0 4px 16px rgba(238,103,60,.25); }
    .auth-wrapper .form-group label,.auth-wrapper .remember { color:#edc4ad; }
    .auth-wrapper .form-group input,.auth-wrapper .form-group select { background:rgba(26,20,26,.86); border-color:rgba(242,133,83,.25); }
    .auth-wrapper .form-group input:focus,.auth-wrapper .form-group select:focus { border-color:#f28b4e; box-shadow:0 0 0 3px rgba(242,139,78,.18); }
    .auth-wrapper .remember input { accent-color:#f28b4e; }
    .auth-wrapper .forgot { color:#ffb45e; }
    .auth-wrapper .forgot:hover { color:#ffd08a; }
    .auth-wrapper .btn:not(.btn-secondary) { background:linear-gradient(135deg,#df493d,#f17b3d 62%,#f5a943); box-shadow:0 4px 18px rgba(238,103,60,.26); }
    .auth-wrapper .btn:not(.btn-secondary):hover { box-shadow:0 8px 24px rgba(238,103,60,.34); }
    .auth-wrapper .btn-secondary { border-color:rgba(242,133,83,.28); color:#edc4ad; }
    .auth-wrapper .btn-secondary:hover,.auth-wrapper .social-btn:hover { background:rgba(242,133,83,.1); border-color:rgba(242,133,83,.55); color:#fff1e7; }
    .auth-wrapper .social-btn { background:rgba(26,20,26,.78); border-color:rgba(242,133,83,.25); }
    .container { width: 100%; max-width: 480px; }
    .card {
      background: var(--card); border: 1px solid var(--border); border-radius: 20px;
      padding: 40px 32px 32px; box-shadow: var(--shadow); position: relative; overflow: hidden;
    }
    .card::before {
      content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
      background: linear-gradient(90deg, #f97316, #fdba74, #fb923c);
    }
    .logo { text-align: center; margin-bottom: 28px; }
    .logo-icon {
      width: 58px; height: 58px; background: linear-gradient(135deg, #f97316, #fdba74);
      border-radius: 16px; display: inline-flex; align-items: center; justify-content: center;
      font-size: 26px; margin-bottom: 14px; box-shadow: 0 10px 28px var(--primary-glow);
    }
    .pokeball-mark { display: block; width: 44px; height: 44px; flex: 0 0 auto; }
    .logo h1 { font-size: 1.55rem; font-weight: 700; }
    .logo p { color: var(--text-muted); font-size: 0.875rem; margin-top: 6px; }
    .screen { display: none; animation: fadeUp 0.3s ease; }
    .screen.active { display: block; }
    @keyframes fadeUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
    .tabs {
      display: flex; background: var(--input-bg); border-radius: 12px; padding: 5px;
      margin-bottom: 28px; border: 1px solid var(--border);
    }
    .tab {
      flex: 1; padding: 11px; text-align: center; font-size: 0.9rem; font-weight: 600;
      color: var(--text-muted); background: transparent; border: none; border-radius: 9px;
      cursor: pointer; transition: all 0.25s; font-family: inherit;
    }
    .tab.active { background: var(--primary); color: white; box-shadow: 0 4px 14px var(--primary-glow); }
    .tab:hover:not(.active) { color: var(--text); }
    .form-group { margin-bottom: 18px; }
    .form-group label { display: block; font-size: 0.8rem; font-weight: 500; color: var(--text-muted); margin-bottom: 7px; }
    .input-wrapper { position: relative; }
    .form-group input, .form-group select {
      width: 100%; padding: 13px 14px; background: var(--input-bg); border: 1px solid var(--border);
      border-radius: var(--radius); color: var(--text); font-size: 0.95rem; font-family: inherit;
      transition: border-color 0.2s, box-shadow 0.2s; outline: none; appearance: none;
    }
    .form-group input { padding-right: 44px; }
    .form-group input::placeholder { color: #71717a; }
    .form-group input:focus, .form-group select:focus {
      border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-glow);
    }
    .form-group input.error, .form-group select.error {
      border-color: var(--error); box-shadow: 0 0 0 3px rgba(248,113,113,0.15);
    }
    .form-group select {
      cursor: pointer;
      background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23a1a1aa' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
      background-repeat: no-repeat; background-position: right 14px center; padding-right: 36px;
    }
    .form-group select option { background: var(--card); color: var(--text); }
    .error-msg { font-size: 0.75rem; color: var(--error); margin-top: 6px; display: none; }
    .error-msg.show { display: block; }
    .password-toggle {
      position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
      background: none; border: none; color: var(--text-muted); cursor: pointer;
      padding: 4px; font-size: 1.15rem;
    }
    .password-toggle:hover { color: var(--text); }
    .options { display: flex; justify-content: space-between; align-items: center; margin-bottom: 22px; font-size: 0.85rem; }
    .remember { display: flex; align-items: center; gap: 8px; color: var(--text-muted); cursor: pointer; }
    .remember input { width: 16px; height: 16px; accent-color: var(--primary); cursor: pointer; }
    .forgot { color: var(--primary-hover); text-decoration: none; font-weight: 500; }
    .forgot:hover { color: #fed7aa; text-decoration: underline; }
    .btn {
      width: 100%; padding: 14px; background: linear-gradient(135deg, #f97316, #ea580c);
      color: white; border: none; border-radius: var(--radius); font-size: 0.95rem;
      font-weight: 600; font-family: inherit; cursor: pointer;
      transition: transform 0.15s, box-shadow 0.15s; box-shadow: 0 4px 18px var(--primary-glow);
    }
    .btn:hover { transform: translateY(-2px); box-shadow: 0 8px 24px var(--primary-glow); }
    .btn:active { transform: translateY(0); }
    .btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }
    .btn-secondary {
      background: transparent; border: 1px solid var(--border); box-shadow: none;
      color: var(--text-muted); margin-top: 12px;
    }
    .btn-secondary:hover { background: var(--input-bg); border-color: #3f3f4e; color: var(--text); box-shadow: none; transform: none; }
    .divider { display: flex; align-items: center; gap: 14px; margin: 24px 0; color: var(--text-muted); font-size: 0.8rem; }
    .divider::before, .divider::after { content: ''; flex: 1; height: 1px; background: var(--border); }
    .social { display: flex; gap: 12px; }
    .social-btn {
      flex: 1; padding: 12px; background: var(--input-bg); border: 1px solid var(--border);
      border-radius: var(--radius); color: var(--text); font-size: 0.875rem; font-weight: 500;
      font-family: inherit; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 8px;
      transition: background 0.2s, border-color 0.2s;
    }
    .social-btn:hover { background: #1a1a24; border-color: #3f3f4e; }
    .social-btn svg { width: 18px; height: 18px; }
    .social-hub { max-width:1120px; margin:0 auto; overflow:hidden; padding:0 !important; }
    .social-hero { display:flex; align-items:center; justify-content:space-between; gap:18px; padding:22px 24px; background:linear-gradient(120deg,#302153,#172b48 70%,#123b46); border-bottom:1px solid var(--border); }
    .social-hero h3 { margin:0 0 5px; font-size:1.15rem; }
    .social-hero p { color:#d0d5e3; font-size:.86rem; margin:0; }
    .social-hero-icon { display:grid; place-items:center; flex:0 0 52px; width:52px; height:52px; border:1px solid #ffffff2a; border-radius:16px; background:#ffffff12; font-size:1.55rem; }
    .social-content { padding:18px; }
    .social-searchbar { display:flex; gap:9px; }
    .social-searchbar input { min-width:0; flex:1; }
    .social-grid { display:grid; grid-template-columns:minmax(250px,.85fr) minmax(0,1.4fr); gap:14px; margin-top:14px; }
    .social-subpanel { min-width:0; padding:15px; border:1px solid var(--border); border-radius:14px; background:color-mix(in srgb,var(--input-bg) 74%,transparent); }
    .social-subpanel h4 { display:flex; align-items:center; gap:8px; margin:0 0 12px; font-size:.96rem; }
    .social-subpanel h4 span { display:grid; place-items:center; min-width:25px; height:25px; padding:0 6px; border-radius:8px; background:#ffffff0c; color:var(--text-muted); font-size:.72rem; }
    .social-friend-row { display:grid; gap:11px; padding:12px; border:1px solid var(--border); border-radius:12px; background:linear-gradient(145deg,#171720,#111118); }
    .social-friend-main { display:grid; grid-template-columns:10px 48px minmax(0,1fr) minmax(100px,auto); align-items:center; gap:10px; min-width:0; }
    .social-friend-presence { width:9px; height:9px; border-radius:50%; background:#64748b; }
    .social-friend-presence.online { background:#22c55e; box-shadow:0 0 9px #22c55e88; }
    .social-friend-trainer { width:48px; height:48px; object-fit:contain; image-rendering:pixelated; }
    .social-friend-pokemon-placeholder { display:grid; place-items:center; width:44px; height:44px; border:1px solid var(--border); border-radius:12px; background:var(--input-bg); color:var(--text-muted); font-weight:800; }
    .social-friend-copy,.social-friend-active { display:grid; gap:3px; min-width:0; }
    .social-friend-copy strong,.social-friend-active strong { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
    .social-friend-copy small,.social-friend-active small { color:var(--text-muted); font-size:.7rem; }
    .social-friend-active { justify-items:end; text-align:right; }
    .social-friend-actions { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); align-items:center; gap:7px; }
    .social-friend-actions > button { width:auto !important; margin:0 !important; padding:8px 10px !important; white-space:nowrap; }
    .social-trade-dialog { width:min(760px,calc(100vw - 28px)); max-width:none; max-height:min(88vh,760px); margin:auto; padding:0; overflow:hidden; border:1px solid rgba(249,115,22,.55); border-radius:18px; background:var(--card); color:var(--text); box-shadow:0 24px 80px #000b,0 0 32px #ea580c24; }
    .social-trade-dialog::backdrop { background:rgba(5,4,10,.78); backdrop-filter:blur(5px); }
    .social-trade-dialog-inner { display:flex; flex-direction:column; max-height:min(88vh,760px); padding:20px; }
    .flamebox-dialog { width:min(610px,calc(100vw - 24px)); max-width:none; max-height:calc(100dvh - 24px); margin:auto; padding:0; overflow:hidden; border:1px solid rgba(249,115,22,.58); border-radius:20px; background:radial-gradient(ellipse at 50% 0%,rgba(249,115,22,.16),transparent 54%),var(--card); color:var(--text); box-shadow:0 24px 80px #000c,0 0 42px #f973161c; }
    .flamebox-dialog::backdrop { background:rgba(5,4,10,.82); backdrop-filter:blur(7px); }
    .flamebox-inner { display:flex; flex-direction:column; gap:16px; max-height:calc(100dvh - 24px); overflow:auto; padding:clamp(17px,4vw,26px); }
    .flamebox-heading { display:flex; align-items:flex-start; justify-content:space-between; gap:14px; }
    .flamebox-kicker { color:#fb923c; font-size:.7rem; font-weight:900; letter-spacing:.13em; }
    .flamebox-heading h2 { margin:4px 0; font-size:1.35rem; }
    .flamebox-heading p,.flamebox-status { margin:0; color:var(--text-muted); font-size:.88rem; line-height:1.5; }
    .flamebox-close { width:38px; height:38px; flex:0 0 38px; border:1px solid var(--border); border-radius:11px; background:transparent; color:var(--text-muted); font-size:1.2rem; cursor:pointer; }
    .flamebox-odds { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:7px; }
    .flamebox-odds span { padding:9px 6px; border:1px solid var(--border); border-radius:10px; background:#ffffff05; color:var(--text-muted); text-align:center; font-size:.7rem; }
    .flamebox-odds strong { display:block; margin-top:3px; color:var(--text); font-size:.85rem; }
    .flamebox-reel-window { position:relative; height:126px; overflow:hidden; border:1px solid rgba(249,115,22,.27); border-radius:15px; background:linear-gradient(90deg,#111018,#211611 50%,#111018); }
    .flamebox-reel-window::before { position:absolute; z-index:2; inset:0 auto 0 50%; width:86px; transform:translateX(-50%); border:1px solid #fb923c88; border-radius:12px; background:#fb923c10; content:""; pointer-events:none; }
    .flamebox-reel-track { display:flex; align-items:center; gap:8px; width:max-content; height:100%; padding:0 8px; transform:translateX(0); }
    .flamebox-reel-track.spinning { transition:transform 9s cubic-bezier(.08,.68,.08,1); }
    .flamebox-reel-tile { display:grid; flex:0 0 80px; place-items:center; width:80px; height:96px; border:1px solid #ffffff12; border-radius:12px; background:#14131a; }
    .flamebox-reel-tile img { width:68px; height:68px; object-fit:contain; image-rendering:pixelated; }
    .flamebox-reel-tile.winner { border-color:#fb923c; background:#fb923c20; box-shadow:0 0 22px #f9731640; }
    .flamebox-winner { display:flex; align-items:center; gap:14px; padding:12px 14px; border:1px solid #fb923c44; border-radius:14px; background:linear-gradient(110deg,#f9731618,#251b19); }
    .flamebox-winner[hidden] { display:none; }
    .flamebox-winner img { width:78px; height:78px; object-fit:contain; image-rendering:pixelated; }
    .flamebox-winner strong,.flamebox-winner small { display:block; }
    .flamebox-winner small { margin-top:5px; color:var(--text-muted); }
    .flamebox-prize-dialog { width:min(450px,calc(100vw - 24px)); text-align:center; }
    .flamebox-prize-dialog .flamebox-inner { align-items:center; gap:12px; text-align:center; }
    .flamebox-prize-scene { position:relative; display:grid; place-items:center; width:100%; min-height:190px; overflow:hidden; border:1px solid #fb923c35; border-radius:18px; background:radial-gradient(circle,rgba(251,146,60,.2),rgba(34,21,23,.65) 58%,transparent 76%); }
    .flamebox-prize-sprite { position:relative; z-index:1; width:164px; height:164px; object-fit:contain; image-rendering:pixelated; filter:drop-shadow(0 0 18px #fb923c88); animation:flameboxPrizeReveal .75s cubic-bezier(.18,.85,.28,1.35) both,flameboxPrizeGlow 1.8s ease-in-out .75s infinite alternate; }
    .flamebox-confetti { position:absolute; inset:0; overflow:hidden; pointer-events:none; }
    .flamebox-confetti i { position:absolute; top:-16px; left:var(--x); width:8px; height:13px; border-radius:2px; background:var(--color); opacity:0; }
    .flamebox-confetti.is-celebrating i { animation:flameboxConfetti 2.8s ease-in var(--delay) 1 both; }
    .flamebox-confetti i:nth-child(3n) { width:7px; height:7px; border-radius:50%; }
    .flamebox-prize-rarity { padding:5px 10px; border:1px solid #fb923c55; border-radius:999px; background:#fb923c16; color:#fdba74; font-size:.75rem; font-weight:800; }
    .flamebox-prize-name { margin:0; font-size:1.5rem; }
    .flamebox-prize-destination { margin:0; color:var(--text-muted); font-size:.9rem; }
    @keyframes flameboxPrizeReveal { from { transform:scale(.25) rotate(-18deg); opacity:0; } to { transform:scale(1) rotate(0); opacity:1; } }
    @keyframes flameboxPrizeGlow { from { filter:drop-shadow(0 0 12px #fb923c66); } to { filter:drop-shadow(0 0 30px #fb923cdd); } }
    @keyframes flameboxConfetti { 0% { transform:translate3d(0,-8px,0) rotate(0); opacity:0; } 12% { opacity:1; } 100% { transform:translate3d(18px,220px,0) rotate(520deg); opacity:0; } }
    @media(prefers-reduced-motion:reduce) { .flamebox-prize-sprite,.flamebox-confetti i { animation:none; } }
    @media(max-width:480px) { .flamebox-odds { grid-template-columns:repeat(2,minmax(0,1fr)); } .flamebox-reel-window { height:112px; } }
    .social-trade-dialog-header { display:flex; justify-content:space-between; align-items:flex-start; gap:12px; }
    .social-trade-dialog-header h2 { margin:0; font-size:1.15rem; }
    .social-trade-dialog-header p { margin:5px 0 0; color:var(--text-muted); font-size:.86rem; }
    .social-trade-dialog-close { width:34px; height:34px; flex:0 0 34px; border:1px solid var(--border); border-radius:9px; background:var(--input-bg); color:var(--text-muted); font-size:1.2rem; cursor:pointer; }
    .social-trade-pokemon-list { min-height:100px; margin:16px 0; padding:2px 4px 4px 0; overflow:auto; }
    .social-trade-group + .social-trade-group { margin-top:16px; }
    .social-trade-group h3 { margin:0 0 8px; color:var(--text-muted); font-size:.78rem; font-weight:700; }
    .social-trade-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(118px,1fr)); gap:8px; }
    .social-trade-option { display:grid; justify-items:center; gap:3px; min-width:0; min-height:112px; padding:9px 6px; border:1px solid var(--border); border-radius:12px; background:var(--input-bg); color:var(--text); cursor:pointer; }
    .social-trade-option:hover { border-color:#fb923c; }
    .social-trade-option.selected { border-color:#f97316; background:linear-gradient(145deg,#39265a,#1d293d); box-shadow:0 0 0 1px #f9731666; }
    .social-trade-option img { width:58px; height:56px; object-fit:contain; image-rendering:pixelated; }
    .social-trade-option strong { max-width:100%; overflow:hidden; font-size:.78rem; text-overflow:ellipsis; white-space:nowrap; }
    .social-trade-option small { color:var(--text-muted); font-size:.68rem; }
    .evcap-dialog-kicker { display:block; margin-bottom:5px; color:#67e8f9; font-size:.65rem; font-weight:800; letter-spacing:.12em; }
    .evcap-picker-banner { display:flex; align-items:center; gap:12px; margin:14px 0 4px; padding:12px 14px; border:1px solid rgba(34,211,238,.25); border-radius:14px; background:linear-gradient(110deg,rgba(34,211,238,.11),rgba(20,19,30,.92)); }
    .evcap-picker-banner img { width:50px; height:50px; object-fit:contain; image-rendering:pixelated; }
    .evcap-picker-banner strong { display:block; font-size:.9rem; }
    .evcap-picker-banner small { display:block; margin-top:3px; color:var(--text-muted); line-height:1.4; }
    .evcap-pokemon-option { min-height:142px; background:radial-gradient(ellipse at top,rgba(34,211,238,.09),transparent 72%),var(--input-bg); }
    .evcap-pokemon-option img { width:76px; height:72px; }
    .goldcap-picker-banner { display:flex; align-items:center; gap:12px; margin:14px 0 4px; padding:12px 14px; border:1px solid rgba(250,204,21,.25); border-radius:14px; background:linear-gradient(110deg,rgba(250,204,21,.11),rgba(20,19,30,.92)); }
    .goldcap-picker-banner img { width:50px; height:50px; object-fit:contain; image-rendering:pixelated; }
    .goldcap-picker-banner strong { display:block; font-size:.9rem; }
    .goldcap-picker-banner small { display:block; margin-top:3px; color:var(--text-muted); line-height:1.4; }
    .bag-target-picker-banner { display:flex; align-items:center; gap:12px; margin:14px 0 4px; padding:12px 14px; border:1px solid rgba(249,115,22,.28); border-radius:14px; background:linear-gradient(110deg,rgba(249,115,22,.14),rgba(20,19,30,.92)); }
    .bag-target-picker-banner img { width:50px; height:50px; object-fit:contain; image-rendering:pixelated; }
    .bag-target-picker-banner strong { display:block; font-size:.9rem; }
    .bag-target-picker-banner small { display:block; margin-top:3px; color:var(--text-muted); line-height:1.4; }
    .bag-target-pokemon-option { min-height:142px; background:radial-gradient(ellipse at top,rgba(249,115,22,.1),transparent 72%),var(--input-bg); }
    .bag-target-pokemon-option img { width:76px; height:72px; }
    .goldcap-pokemon-option { min-height:142px; background:radial-gradient(ellipse at top,rgba(250,204,21,.09),transparent 72%),var(--input-bg); }
    .goldcap-pokemon-option img { width:76px; height:72px; }
    .evcap-stat-dialog { width:min(700px,calc(100vw - 28px)); margin:auto; }
    .evcap-stat-hero { display:flex; align-items:center; gap:13px; margin:14px 0 8px; padding:12px 14px; border:1px solid rgba(249,115,22,.22); border-radius:14px; background:linear-gradient(110deg,rgba(249,115,22,.15),rgba(20,19,30,.92)); }
    .evcap-stat-hero img { width:64px; height:64px; object-fit:contain; image-rendering:pixelated; }
    .evcap-stat-hero strong { display:block; font-size:.96rem; }
    .evcap-stat-hero small { display:block; margin-top:3px; color:var(--text-muted); }
    .evcap-stat-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:9px; margin:12px 0 16px; }
    .evcap-stat-card { display:flex; flex-direction:column; gap:9px; min-width:0; padding:12px; border:1px solid var(--border); border-radius:13px; background:linear-gradient(145deg,#17151f,#111018); color:var(--text); text-align:left; cursor:pointer; transition:border-color .16s,background .16s,transform .16s; }
    .evcap-stat-card:hover { transform:translateY(-1px); border-color:#fb923c; }
    .evcap-stat-card.selected { border-color:#f97316; background:linear-gradient(145deg,#302044,#191627); box-shadow:0 0 0 1px #f9731666; }
    .evcap-stat-card-top { display:flex; align-items:center; justify-content:space-between; gap:6px; }
    .evcap-stat-card strong { overflow:hidden; font-size:.82rem; text-overflow:ellipsis; white-space:nowrap; }
    .evcap-stat-card small { color:#fed7aa; font-size:.7rem; white-space:nowrap; }
    .evcap-stat-track { height:6px; overflow:hidden; border-radius:99px; background:#ffffff12; }
    .evcap-stat-track i { display:block; height:100%; border-radius:inherit; background:linear-gradient(90deg,#f97316,#fb923c); }
    .evcap-stat-selection { margin-top:3px !important; color:#fed7aa !important; font-size:.78rem !important; }
    @media(max-width:540px) { .evcap-stat-grid { grid-template-columns:repeat(2,minmax(0,1fr)); gap:7px; } .evcap-stat-card { padding:10px; } .evcap-stat-card strong { font-size:.76rem; } }
    .social-trade-empty { padding:24px 8px; color:var(--text-muted); text-align:center; }
    .social-trade-dialog-actions { display:flex; justify-content:flex-end; gap:8px; padding-top:12px; border-top:1px solid var(--border); }
    .social-trade-dialog-actions .btn { width:auto; margin:0; }
    .social-chat { display:none; grid-column:1 / -1; padding:0; overflow:hidden; border-radius:14px; background:var(--card); }
    .social-chat.open { display:flex; flex-direction:column; min-height:360px; }
    .social-chat-head { display:flex; justify-content:space-between; align-items:center; gap:12px; padding:13px 16px; border-bottom:1px solid var(--border); background:linear-gradient(100deg,#201936,#172b3b); }
    .social-chat-head small { display:block; margin-top:2px; color:var(--text-muted); }
    .social-chat-messages { display:flex; flex:1; flex-direction:column; gap:9px; max-height:360px; min-height:210px; overflow:auto; padding:16px; }
    .social-chat-empty { display:grid; flex:1; place-items:center; color:var(--text-muted); text-align:center; font-size:.85rem; }
    .social-message { max-width:min(78%,560px); padding:9px 12px; border:1px solid var(--border); border-radius:13px 13px 13px 4px; background:var(--input-bg); overflow-wrap:anywhere; white-space:pre-wrap; }
    .social-message.mine { align-self:flex-end; border-color:#7655d766; border-radius:13px 13px 4px 13px; background:linear-gradient(135deg,#493278,#32254b); }
    .social-message time { display:block; margin-top:5px; color:#b9b3c9; font-size:.67rem; text-align:right; }
    .social-chat-form { display:flex; align-items:flex-end; gap:9px; padding:12px; border-top:1px solid var(--border); }
    .social-chat-form textarea { flex:1; min-height:44px; max-height:110px; resize:vertical; }
    @media(max-width:720px) { .social-grid { grid-template-columns:1fr; } .social-chat { grid-column:auto; } }
    @media(max-width:480px) {
      .social-content { padding:12px; }
      .social-hero { padding:17px; }
      .social-chat-form { align-items:stretch; flex-direction:column; }
      .social-chat-form .btn { width:100% !important; }
      .social-message { max-width:90%; }
      .social-friend-row { gap:10px; padding:10px; }
      .social-friend-main { grid-template-columns:9px 42px minmax(0,1fr); gap:8px; }
      .social-friend-trainer { width:42px; height:42px; }
      .social-friend-pokemon-placeholder { width:40px; height:40px; }
      .social-friend-active { grid-column:2/-1; grid-row:2; justify-items:start; text-align:left; }
      .social-friend-actions { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); width:100%; align-items:stretch; gap:7px; }
      .social-friend-actions > button { width:100% !important; min-width:0; padding:8px 5px !important; font-size:.8rem; white-space:nowrap; }
      .social-trade-dialog-inner { padding:16px; }
      .social-trade-grid { grid-template-columns:repeat(3,minmax(0,1fr)); gap:7px; }
      .social-trade-option { min-height:102px; }
      .social-trade-option.bag-target-pokemon-option { min-height:126px; }
      .social-trade-option.bag-target-pokemon-option img { width:68px; height:64px; }
    }
    .footer { text-align: center; margin-top: 26px; font-size: 0.875rem; color: var(--text-muted); }
    .footer a { color: var(--primary-hover); text-decoration: none; font-weight: 600; margin-left: 4px; }
    .footer a:hover { text-decoration: underline; }
    .site-footer { padding: 18px 16px 14px; text-align: left; color: var(--text-muted); font-size: 0.8rem; border-top: 1px solid var(--border); }
    .site-footer strong { color: var(--text); font-weight: 600; }
    .gender-group { display: flex; gap: 12px; }
    .gender-btn {
      flex: 1; padding: 14px; background: var(--input-bg); border: 2px solid var(--border);
      border-radius: var(--radius); color: var(--text-muted); font-size: 0.9rem; font-weight: 600;
      font-family: inherit; cursor: pointer; transition: all 0.2s;
      display: flex; align-items: center; justify-content: center; gap: 8px;
    }
    .gender-btn:hover { border-color: #3f3f4e; color: var(--text); }
    .gender-btn.selected { border-color: var(--primary); background: rgba(249,115,22,0.15); color: var(--text); box-shadow: 0 0 0 3px var(--primary-glow); }
    .gender-btn.male.selected { border-color: #3b82f6; background: rgba(59,130,246,0.15); box-shadow: 0 0 0 3px rgba(59,130,246,0.2); }
    .gender-btn.female.selected { border-color: #ec4899; background: rgba(236,72,153,0.15); box-shadow: 0 0 0 3px rgba(236,72,153,0.2); }
    .starters-section { margin-top: 8px; display: none; }
    .starters-section.show { display: block; }
    .starters-label { font-size: 0.8rem; font-weight: 500; color: var(--text-muted); margin-bottom: 12px; }
    .starters-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
    .starter-card {
      background: var(--input-bg); border: 2px solid var(--border); border-radius: 16px;
      padding: 12px 8px 14px; text-align: center; cursor: pointer; transition: all 0.25s; user-select: none;
    }
    .starter-card:hover { border-color: #4a4a5a; transform: translateY(-4px); box-shadow: 0 8px 20px rgba(0,0,0,0.3); }
    .starter-card.selected { border-color: var(--primary); background: rgba(249,115,22,0.12); box-shadow: 0 0 0 3px var(--primary-glow); transform: translateY(-4px); }
    .starter-img-wrap { width: 72px; height: 72px; margin: 0 auto 8px; display: flex; align-items: center; justify-content: center; }
    .starter-img { width: 72px; height: 72px; object-fit: contain; filter: drop-shadow(0 4px 8px rgba(0,0,0,0.4)); transition: transform 0.25s; }
    .starter-card:hover .starter-img, .starter-card.selected .starter-img { transform: scale(1.08); }
    .starter-name { font-size: 0.78rem; font-weight: 700; }
    .type-badge { display: inline-block; padding: 2px 6px; border-radius: 4px; font-size: 0.6rem; font-weight: 600; margin-top: 4px; text-transform: uppercase; }
    .type-planta { background: #22c55e33; color: #4ade80; }
    .type-fogo { background: #ef444433; color: #f87171; }
    .type-agua { background: #3b82f633; color: #60a5fa; }
    .type-planta-veneno { background: #a855f733; color: #c084fc; }
    .type-planta-voador { background: #84cc1633; color: #a3e635; }
    .toast {
      position: fixed; top: 24px; right: 24px; padding: 14px 20px; background: var(--card);
      border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow);
      font-size: 0.9rem; font-weight: 500; transform: translateX(130%);
      transition: transform 0.4s cubic-bezier(0.34,1.4,0.64,1); z-index: 300; max-width: 340px;
    }
    .toast.show { transform: translateX(0); }
    .toast.success { border-left: 4px solid var(--success); }
    .toast.error { border-left: 4px solid var(--error); }
    .welcome-popup-overlay { display:none; position:fixed; inset:0; z-index:400; padding:20px; background:rgba(5,7,16,.76); backdrop-filter:blur(7px); align-items:center; justify-content:center; }
    .welcome-popup-overlay.active { display:flex; animation:fadeUp .2s ease both; }
    .welcome-popup-card { width:min(440px,100%); padding:26px; text-align:center; background:radial-gradient(ellipse at top right,rgba(249,115,22,.16),transparent 60%),var(--card); border:1px solid rgba(249,115,22,.38); border-radius:20px; box-shadow:0 24px 80px rgba(0,0,0,.6); }
    .welcome-popup-icon { width:56px; height:56px; display:grid; place-items:center; margin:0 auto 14px; border-radius:18px; background:rgba(249,115,22,.14); border:1px solid rgba(249,115,22,.32); font-size:1.8rem; }
    .welcome-popup-card h2 { margin:0 0 8px; font-size:1.25rem; }
    .welcome-popup-card p { margin:0 0 20px; color:var(--text-muted); line-height:1.5; }
    .welcome-popup-card .btn { min-width:150px; }

    /* DASHBOARD */
    #dashboard { position:relative; isolation:isolate; display: none; min-height: 100vh; }
    #dashboard.active { display: flex; }
    #dashboard::before { content:''; position:fixed; inset:0; z-index:-1; pointer-events:none; background:linear-gradient(rgba(11,11,15,.68),rgba(11,11,15,.78)),url('login-charizard-bg.png') center center / cover no-repeat; }
    .main { margin-left: 0; flex: 1; min-height: 100vh; display: flex; flex-direction: column; }
    .topbar {
      padding: 16px 28px; border-bottom: 1px solid var(--border);
      background: rgba(20,20,28,0.85); backdrop-filter: blur(12px);
      display: flex; align-items: center; justify-content: space-between;
      position: sticky; top: 0; z-index: 40;
    }
    .topbar-left { display: flex; align-items: center; gap: 18px; min-width: 0; }
    .topbar-brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; white-space: nowrap; }
    .topbar-brand-mark { position:relative; width:36px; height:36px; padding:0; overflow:hidden; border-radius:50%; background:transparent; display:flex; align-items:center; justify-content:center; flex:0 0 auto; }
    .topbar-brand-mark .trainer-logo-image { position:absolute; left:50%; top:50%; width:325%; height:325%; max-width:none; object-fit:contain; pointer-events:none; transform:translate(-50%,-50%); }
    .topbar-brand-name { font-size: 1.05rem; font-weight: 750; letter-spacing: -.02em; }
    .topbar-actions { display: flex; align-items: center; gap: 12px; min-width: 0; }
    .message-notifications { position:relative; flex:0 0 auto; }
    .message-notification-button { position:relative; display:grid; place-items:center; width:42px; height:42px; padding:0; border:1px solid var(--border); border-radius:12px; background:var(--input-bg); color:var(--text); font-size:1.2rem; cursor:pointer; }
    .message-notification-button:hover,.message-notification-button[aria-expanded="true"] { border-color:var(--primary); background:rgba(249,115,22,.14); }
    .message-notification-count { position:absolute; top:-6px; right:-6px; min-width:18px; height:18px; padding:0 4px; display:grid; place-items:center; border:2px solid var(--bg); border-radius:999px; background:#ef4444; color:white; font-size:.64rem; font-weight:800; }
    .message-notification-count[hidden] { display:none; }
    .message-notification-menu { position:absolute; z-index:100; top:calc(100% + 10px); right:0; width:min(350px,calc(100vw - 24px)); max-height:390px; overflow:auto; border:1px solid var(--border); border-radius:14px; background:var(--card); box-shadow:0 18px 50px #0009; }
    .message-notification-menu[hidden] { display:none; }
    .message-notification-heading { padding:13px 15px; border-bottom:1px solid var(--border); font-size:.9rem; font-weight:750; }
    .message-notification-item { display:grid; gap:8px; width:100%; padding:12px 15px; border-bottom:1px solid var(--border); background:transparent; color:var(--text); }
    .message-notification-item:hover { background:rgba(249,115,22,.12); }
    .message-notification-open { display:block; width:100%; padding:0; border:0; background:transparent; color:inherit; text-align:left; font:inherit; cursor:pointer; }
    .message-notification-mark-read { justify-self:start; padding:4px 8px; border:1px solid var(--border); border-radius:7px; background:var(--input-bg); color:var(--text-muted); font:inherit; font-size:.68rem; cursor:pointer; }
    .message-notification-mark-read:hover { border-color:var(--primary); color:var(--text); }
    .message-notification-item.unread { background:rgba(249,115,22,.08); }
    .message-notification-item.read { opacity:.78; }
    .message-notification-item strong { display:flex; align-items:center; justify-content:space-between; gap:10px; font-size:.82rem; }
    .message-notification-item small { color:var(--text-muted); font-size:.68rem; font-weight:400; white-space:nowrap; }
    .message-notification-preview { display:block; margin-top:5px; color:var(--text-muted); font-size:.8rem; overflow-wrap:anywhere; }
    .message-notification-empty { padding:18px 15px; color:var(--text-muted); font-size:.82rem; }
    .topbar-profile { display: flex; align-items: center; flex: 0 1 auto; width: auto; min-width: 0; max-width: 190px; padding: 6px 10px; gap: 9px; border: 1px solid var(--border); border-radius: 12px; background: var(--input-bg); color: var(--text); text-align: left; font: inherit; cursor: pointer; transition: border-color .18s, background .18s; }
    .topbar-profile:hover, .topbar-profile.active { border-color: var(--primary); background: rgba(249,115,22,.12); }
    .topbar-profile:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
    .topbar-profile .player-info { flex: 1; min-width: 0; overflow: hidden; }
    .topbar-profile .player-avatar { width: 34px; height: 34px; overflow: hidden; border-radius: 10px; background: var(--card); border: 1px solid var(--border); display: flex; align-items: center; justify-content: center; font-size: 1.05rem; flex: 0 0 auto; }
    .topbar-profile .player-avatar img { display: block; width: 100%; height: 100%; object-fit: contain; image-rendering: pixelated; }
    .profile-trainer-avatar { width:72px; height:72px; flex:0 0 72px; display:grid; place-items:center; overflow:hidden; border:1px solid var(--border); border-radius:14px; background:var(--input-bg); }
    .profile-trainer-avatar img { width:100%; height:100%; object-fit:contain; image-rendering:pixelated; }
    .trainer-avatar-picker { padding-top:16px; margin-top:16px; border-top:1px solid var(--border); }
    .trainer-avatar-picker h3 { margin:0 0 5px; font-size:.95rem; }
    .trainer-avatar-picker p { margin:0 0 12px; color:var(--text-muted); font-size:.78rem; }
    .trainer-avatar-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(76px,1fr)); gap:8px; }
    .trainer-avatar-option { min-width:0; padding:7px 4px 6px; display:flex; flex-direction:column; align-items:center; gap:3px; border:1px solid var(--border); border-radius:10px; background:var(--input-bg); color:var(--text); font:inherit; cursor:pointer; }
    .trainer-avatar-option:hover { border-color:var(--primary-hover); }
    .trainer-avatar-option.selected { border-color:var(--primary); background:rgba(249,115,22,.14); box-shadow:0 0 0 1px var(--primary); }
    .trainer-avatar-option img { width:48px; height:48px; object-fit:contain; image-rendering:pixelated; }
    .trainer-avatar-option span { max-width:100%; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:.68rem; }
    .trainer-avatar-save { margin-top:12px; }
    .topbar-profile .player-name { max-width: 112px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .84rem; font-weight: 700; }
    .topbar-profile .player-meta { margin-top: 1px; color: var(--text-muted); font-size: .68rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .topbar-logout { flex: 0 0 auto; width: auto; margin: 0; padding: 9px 12px; white-space: nowrap; }
    .location-badge {
      display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 20px;
      background: rgba(34,197,94,0.12); border: 1px solid rgba(34,197,94,0.25);
      color: #4ade80; font-size: 0.8rem; font-weight: 600;
    }
    .topbar-stats { display: flex; gap: 16px; align-items: center; }
    .stat-pill { display: flex; align-items: center; gap: 6px; font-size: 0.85rem; font-weight: 600; color: var(--text-muted); }
    .stat-pill strong { color: var(--text); }
    .bp-red, .market-bp-label { color: #ef4444 !important; }
    .bp-amount { color: #fff !important; }
    .bp-chip { display:inline-block; width:16px; height:16px; vertical-align:-3px; margin-right:3px; color:#ef4444; }
    .market-controls { display:grid; grid-template-columns:minmax(220px,1.5fr) minmax(180px,1fr); gap:12px; margin:0 0 18px; }
    .market-controls input, .market-controls select { width:100%; min-width:0; min-height:44px; padding:10px 13px; border:1px solid var(--border); border-radius:10px; background:var(--input-bg); color:var(--text); font:inherit; }
    .market-currency-filters { display:flex; flex-wrap:wrap; gap:9px; margin:0 0 18px; }
    .market-currency-option { display:inline-flex; align-items:center; gap:8px; min-height:40px; padding:8px 12px; border:1px solid var(--border); border-radius:10px; background:var(--card); color:var(--text); font-size:.84rem; font-weight:600; cursor:pointer; }
    .market-currency-option input { width:16px; height:16px; margin:0; accent-color:var(--primary); }
    .market-results-count { color:var(--text-muted); font-size:.8rem; margin:-8px 0 14px; }
    @media (max-width:560px) { .market-controls { grid-template-columns:1fr; } }
    .content { padding: 28px; flex: 1; }
    .panel { display: none; animation: fadeUp 0.25s ease; }
    .panel.active { display: block; }
    .panel-title { font-size: 1.5rem; font-weight: 700; margin-bottom: 6px; }
    .panel-desc { color: var(--text-muted); font-size: 0.9rem; margin-bottom: 24px; }
    .panel-back-button { width: auto !important; margin: 0 0 14px !important; padding: 7px 11px !important; font-size: .8rem !important; }
    .nature-box-picker { padding:16px; border:1px solid var(--border); border-radius:16px; background:linear-gradient(145deg,#1a1622,#111018); }
    .nature-mint-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(145px,1fr)); gap:9px; margin-top:14px; }
    .nature-mint-choice { display:flex; align-items:center; gap:9px; min-width:0; padding:9px; text-align:left; border:1px solid var(--border); border-radius:11px; background:var(--card); color:var(--text); cursor:pointer; }
    .nature-mint-choice:hover,.nature-mint-choice:focus-visible { border-color:var(--primary); background:rgba(249,115,22,.13); outline:none; }
    .nature-mint-choice img { width:32px; height:32px; flex:0 0 32px; object-fit:contain; image-rendering:pixelated; }
    .nature-mint-choice strong,.nature-mint-choice small { display:block; }
    .nature-mint-choice strong { font-size:.78rem; }
    .nature-mint-choice small { margin-top:3px; color:var(--text-muted); font-size:.64rem; line-height:1.25; }
    @media(max-width:480px) { .nature-mint-grid { grid-template-columns:repeat(2,minmax(0,1fr)); } }
    .pvp-team-select { display:grid; grid-template-columns:repeat(auto-fit,minmax(170px,1fr)); gap:10px; margin:14px 0; }
    .pvp-select-card { display:flex; align-items:center; gap:10px; padding:10px; border:1px solid var(--border); border-radius:12px; background:var(--card); cursor:pointer; }
    .pvp-select-card:has(input:checked) { border-color:var(--primary); background:rgba(249,115,22,.1); }
    .pvp-select-card input { accent-color:var(--primary); }
    .pvp-select-card img { width:48px; height:48px; object-fit:contain; }
    .pvp-lobby-box, .pvp-room-box { max-width:900px; padding:18px; border:1px solid var(--border); border-radius:16px; background:var(--card); }
    .pvp-result-card { display:grid; grid-template-columns:58px minmax(0,1fr) auto; align-items:center; gap:16px; min-height:128px; margin:12px 0; padding:22px 24px; border-color:rgba(148,163,184,.22); background:radial-gradient(ellipse at 0% 50%,rgba(148,163,184,.09),transparent 46%),linear-gradient(145deg,#191720,#111018 72%); box-shadow:0 16px 38px #0005; }
    .pvp-result-card.won { border-color:rgba(74,222,128,.3); background:radial-gradient(ellipse at 0% 50%,rgba(34,197,94,.15),transparent 48%),linear-gradient(145deg,#171e1b,#111018 72%); }
    .pvp-result-card.lost { border-color:rgba(248,113,113,.3); background:radial-gradient(ellipse at 0% 50%,rgba(239,68,68,.14),transparent 48%),linear-gradient(145deg,#20171d,#111018 72%); }
    .pvp-result-card.cancelled { border-color:rgba(251,191,36,.28); background:radial-gradient(ellipse at 0% 50%,rgba(245,158,11,.12),transparent 48%),linear-gradient(145deg,#201d18,#111018 72%); }
    .pvp-result-icon { width:54px; height:54px; display:grid; place-items:center; border:1px solid #ffffff17; border-radius:16px; background:#ffffff08; font-size:1.65rem; }
    .pvp-result-copy { min-width:0; }
    .pvp-result-kicker { color:#fed7aa; font-size:.67rem; font-weight:800; letter-spacing:.13em; text-transform:uppercase; }
    .pvp-result-card.won .pvp-result-kicker { color:#86efac; }
    .pvp-result-card.lost .pvp-result-kicker { color:#fca5a5; }
    .pvp-result-card.cancelled .pvp-result-kicker { color:#fcd34d; }
    .pvp-result-copy h3 { margin:5px 0 4px; color:#f8fafc; font-size:clamp(1.05rem,2.3vw,1.35rem); letter-spacing:-.02em; }
    .pvp-result-copy p { margin:0; color:var(--text-muted); font-size:.86rem; line-height:1.45; }
    .pvp-result-card .pvp-result-return { width:auto; min-width:190px; margin:0; padding:11px 15px; border:1px solid rgba(249,115,22,.4); border-radius:12px; background:rgba(249,115,22,.12); color:#fff7ed; font-weight:800; transition:background .16s,border-color .16s,transform .16s; }
    .pvp-result-card .pvp-result-return:hover { transform:translateY(-1px); border-color:#f97316; background:rgba(249,115,22,.24); }
    @media(max-width:620px) { .pvp-result-card { grid-template-columns:48px minmax(0,1fr); gap:12px; padding:17px; } .pvp-result-icon { width:46px; height:46px; font-size:1.4rem; } .pvp-result-card .pvp-result-return { grid-column:1/-1; width:100%; min-width:0; } }
    .pvp-hub { max-width:1040px; display:grid; gap:16px; }
    .pvp-hero { position:relative; display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:center; gap:20px; overflow:hidden; padding:clamp(20px,4vw,32px); border:1px solid rgba(249,115,22,.34); border-radius:22px; background:radial-gradient(ellipse at 100% 0%,rgba(234,88,12,.24),transparent 44%),linear-gradient(140deg,#211735,#111018 68%); box-shadow:0 18px 48px #0005; }
    .pvp-hero-copy { min-width:0; }
    .pvp-eyebrow { display:inline-flex; align-items:center; gap:7px; margin-bottom:8px; color:#fed7aa; font-size:.7rem; font-weight:800; letter-spacing:.14em; text-transform:uppercase; }
    .pvp-hero h2 { margin:0; color:#faf8ff; font-size:clamp(1.4rem,3vw,2rem); letter-spacing:-.035em; }
    .pvp-hero p { max-width:620px; margin:8px 0 0; color:#b9b3c7; line-height:1.5; }
    .pvp-season-chip { display:inline-flex; align-items:center; gap:7px; margin-top:14px; padding:7px 10px; border:1px solid #ffffff1c; border-radius:999px; background:#09080d88; color:#fff7ed; font-size:.74rem; font-weight:700; }
    .pvp-rank-emblem { width:106px; height:106px; display:grid; place-items:center; border:1px solid rgba(251,146,60,.35); border-radius:50%; background:radial-gradient(circle,#f9731635,#120d1c 68%); box-shadow:0 0 40px #ea580c22,inset 0 0 25px #f9731618; font-size:2.7rem; }
    .pvp-rank-overview { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:9px; margin-top:16px; }
    .pvp-rank-stat { min-width:0; padding:11px 12px; border:1px solid #ffffff13; border-radius:12px; background:#09080d70; }
    .pvp-rank-stat span,.pvp-rank-stat strong { display:block; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
    .pvp-rank-stat span { color:#aaa2b7; font-size:.68rem; }
    .pvp-rank-stat strong { margin-top:4px; color:#f4efff; font-size:.96rem; font-variant-numeric:tabular-nums; }
    .pvp-rank-progress { height:6px; margin-top:9px; overflow:hidden; border-radius:9px; background:#ffffff12; }
    .pvp-rank-progress i { display:block; height:100%; border-radius:inherit; background:linear-gradient(90deg,#f97316,#fb923c); }
    .pvp-mode-card { padding:18px; border:1px solid var(--border); border-radius:17px; background:linear-gradient(145deg,#17151f,#111018); }
    .pvp-mode-head { display:flex; align-items:flex-start; justify-content:space-between; gap:14px; }
    .pvp-mode-head h3 { margin:0; font-size:1rem; }
    .pvp-mode-head p { margin:5px 0 0; color:var(--text-muted); font-size:.82rem; line-height:1.45; }
    .pvp-mode-badge { flex:0 0 auto; padding:5px 9px; border:1px solid #f9731644; border-radius:999px; background:#f9731618; color:#fdba74; font-size:.68rem; font-weight:800; }
    .pvp-mode-tabs { display:flex; flex-wrap:wrap; gap:8px; margin:0; }
    .pvp-mode-tab { min-width:130px; padding:9px 14px; border:1px solid var(--border); border-radius:11px; background:var(--input-bg); color:var(--text-muted); font:inherit; font-size:.82rem; font-weight:800; cursor:pointer; }
    .pvp-mode-tab.active { border-color:#f97316; background:linear-gradient(130deg,#f97316,#ea580c); color:#fff; box-shadow:0 5px 20px #f9731635; }
    .pvp-searching { display:flex; align-items:center; gap:10px; margin-top:14px; padding:12px; border:1px solid #f9731644; border-radius:12px; background:#f9731610; color:#fff7ed; font-size:.82rem; }
    .pvp-searching::before { content:''; width:9px; height:9px; flex:0 0 9px; border-radius:50%; background:#fb923c; box-shadow:0 0 12px #fb923c; animation:pvpTimerPulse 1s infinite; }
    .pvp-tier-label { color:#fdba74!important; }
    .pvp-select-title { display:flex; align-items:center; justify-content:space-between; gap:10px; margin-top:18px; }
    .pvp-select-title small { color:var(--text-muted); }
    .pvp-room-mode { padding:5px 9px; border:1px solid #f9731655; border-radius:999px; background:#f9731622; color:#fff7ed; font-size:.68rem; font-weight:800; }
    .pvp-select-card { transition:transform .15s,border-color .15s,background .15s; }
    .pvp-select-card:hover { transform:translateY(-1px); border-color:#f9731677; }
    #coopBossContent .coop-raid-result { position:relative; display:grid; grid-template-columns:minmax(0,1fr) 190px; align-items:center; gap:20px; width:min(100%,900px); min-height:250px; margin:24px auto; padding:clamp(20px,4vw,34px); overflow:hidden; border:1px solid rgba(148,163,184,.2); border-top:3px solid #f97316; border-radius:22px; background:radial-gradient(ellipse at 100% 0%,rgba(234,88,12,.16),transparent 42%),linear-gradient(145deg,#191722,#101016 70%); box-shadow:0 18px 48px #0006; }
    #coopBossContent .coop-raid-result.won { border-top-color:#22c55e; background:radial-gradient(ellipse at 100% 0%,rgba(34,197,94,.16),transparent 42%),linear-gradient(145deg,#171c1a,#101016 70%); }
    #coopBossContent .coop-raid-result.lost { border-top-color:#ef4444; background:radial-gradient(ellipse at 100% 0%,rgba(239,68,68,.15),transparent 42%),linear-gradient(145deg,#1d171c,#101016 70%); }
    #coopBossContent .coop-raid-result.cancelled { border-top-color:#f59e0b; }
    #coopBossContent .coop-raid-result-copy { min-width:0; }
    #coopBossContent .coop-raid-result-kicker { display:inline-block; margin-bottom:10px; color:#fed7aa; font-size:.7rem; font-weight:800; letter-spacing:.14em; text-transform:uppercase; }
    #coopBossContent .coop-raid-result.won .coop-raid-result-kicker { color:#86efac; }
    #coopBossContent .coop-raid-result.lost .coop-raid-result-kicker { color:#fca5a5; }
    #coopBossContent .coop-raid-result-heading { display:flex; align-items:center; gap:11px; }
    #coopBossContent .coop-raid-result-icon { width:42px; height:42px; flex:0 0 42px; display:grid; place-items:center; border:1px solid #ffffff18; border-radius:13px; background:#ffffff08; font-size:1.35rem; }
    #coopBossContent .coop-raid-result h3 { margin:0; color:#f8fafc; font-size:clamp(1.25rem,2.4vw,1.75rem); letter-spacing:-.025em; }
    #coopBossContent .coop-raid-result-copy > p { margin:9px 0 18px; color:var(--text-muted); line-height:1.5; }
    #coopBossContent .coop-raid-result-hp { max-width:540px; padding:12px 14px; border:1px solid rgba(148,163,184,.16); border-radius:13px; background:rgba(8,8,13,.55); }
    #coopBossContent .coop-raid-result-hp-head { display:flex; justify-content:space-between; gap:12px; margin-bottom:8px; color:var(--text-muted); font-size:.8rem; }
    #coopBossContent .coop-raid-result-hp-head strong { color:var(--text); font-variant-numeric:tabular-nums; }
    #coopBossContent .coop-raid-result-track { height:8px; overflow:hidden; border-radius:8px; background:#292631; }
    #coopBossContent .coop-raid-result-track i { display:block; height:100%; border-radius:inherit; background:linear-gradient(90deg,#f97316,#fb923c); }
    #coopBossContent .coop-raid-result.won .coop-raid-result-track i { background:linear-gradient(90deg,#16a34a,#4ade80); }
    #coopBossContent .coop-raid-result.lost .coop-raid-result-track i { background:linear-gradient(90deg,#dc2626,#fb7185); }
    #coopBossContent .coop-raid-result-copy .btn { width:auto; min-width:120px; margin:16px 0 0; }
    #coopBossContent .coop-raid-result-art { display:grid; justify-items:center; gap:5px; }
    #coopBossContent .coop-raid-result-orbit { width:168px; height:168px; display:grid; place-items:center; border:1px solid rgba(251,146,60,.2); border-radius:50%; background:radial-gradient(circle,rgba(234,88,12,.2),rgba(15,14,22,.2) 68%); box-shadow:0 0 42px rgba(234,88,12,.12); }
    #coopBossContent .coop-raid-result-art img { width:150px; height:150px; object-fit:contain; image-rendering:pixelated; filter:drop-shadow(0 10px 16px #000a); }
    #coopBossContent .coop-raid-result-art span { color:#a8a2b4; font-size:.62rem; font-weight:800; letter-spacing:.18em; }
    @media(max-width:560px) { #coopBossContent .coop-raid-result { grid-template-columns:1fr 92px; gap:10px; margin:14px auto; padding:18px 14px; } #coopBossContent .coop-raid-result-orbit { width:88px; height:88px; } #coopBossContent .coop-raid-result-art img { width:82px; height:82px; } #coopBossContent .coop-raid-result-art span { font-size:.5rem; } #coopBossContent .coop-raid-result-icon { width:36px; height:36px; flex-basis:36px; } #coopBossContent .coop-raid-result-hp { padding:10px; } #coopBossContent .coop-raid-result-hp-head { font-size:.72rem; } }
    .pvp-room-controls { display:flex; flex-wrap:wrap; gap:10px; align-items:center; margin-top:16px; }
    .pvp-room-controls input { flex:1 1 320px; width:min(100%,380px); min-width:240px; height:42px; padding:8px 14px; text-align:center; letter-spacing:.14em; text-transform:uppercase; }
    #coopBossContent .coop-lobby { width:min(100%,1180px); margin:18px auto 30px; overflow:hidden; border:1px solid rgba(253,186,116,.2); border-radius:24px; background:linear-gradient(145deg,#171521 0%,#111018 62%,#15111e 100%); box-shadow:0 24px 70px #0007,0 0 50px #f9731612; }
    #coopBossContent .coop-lobby-hero { position:relative; display:flex; align-items:center; justify-content:space-between; min-height:240px; gap:24px; overflow:hidden; padding:30px clamp(22px,5vw,58px); border-bottom:1px solid #ffffff12; background:radial-gradient(ellipse at 78% 55%,#fb923c33,transparent 34%),radial-gradient(ellipse at 25% 0%,#4c1d9535,transparent 48%),linear-gradient(105deg,#211532,#15121f 70%); }
    #coopBossContent .coop-lobby-hero::after { content:''; position:absolute; inset:0; pointer-events:none; opacity:.18; background-image:linear-gradient(#ffffff08 1px,transparent 1px),linear-gradient(90deg,#ffffff08 1px,transparent 1px); background-size:34px 34px; mask-image:linear-gradient(90deg,black,transparent 82%); }
    #coopBossContent .coop-lobby-copy { position:relative; z-index:1; max-width:680px; }
    #coopBossContent .coop-lobby-kicker { display:inline-flex; align-items:center; gap:8px; color:#fed7aa; font-size:.7rem; font-weight:800; letter-spacing:.16em; text-transform:uppercase; }
    #coopBossContent .coop-lobby-kicker::before { content:''; width:7px; height:7px; border-radius:50%; background:#f97316; box-shadow:0 0 12px #f97316; }
    #coopBossContent .coop-lobby-hero h2 { margin:10px 0 7px; color:#fff; font-size:clamp(1.65rem,3vw,2.35rem); letter-spacing:-.035em; }
    #coopBossContent .coop-lobby-hero p { max-width:610px; margin:0; color:#c4bfd0; font-size:.94rem; line-height:1.6; }
    #coopBossContent .coop-lobby-perks { display:flex; flex-wrap:wrap; gap:8px; margin-top:18px; }
    #coopBossContent .coop-lobby-perks span { padding:7px 10px; border:1px solid #ffffff18; border-radius:999px; background:#0c0b1490; color:#e9e3f4; font-size:.74rem; font-weight:650; }
    #coopBossContent .coop-lobby-boss { position:relative; z-index:1; display:grid; place-items:center; width:220px; min-width:170px; height:200px; }
    #coopBossContent .coop-lobby-boss::before { content:''; position:absolute; width:170px; height:170px; border:1px solid #fb923c30; border-radius:50%; background:radial-gradient(circle,#f9731627,transparent 68%); box-shadow:0 0 50px #ea580c2b,inset 0 0 30px #ea580c22; }
    #coopBossContent .coop-lobby-boss img { position:relative; width:210px; height:210px; object-fit:contain; image-rendering:pixelated; filter:drop-shadow(0 13px 18px #000b); animation:coopBossFloat 3.4s ease-in-out infinite; }
    #coopBossContent .coop-lobby-boss span { position:absolute; right:0; bottom:4px; padding:6px 9px; border:1px solid #fb923c40; border-radius:999px; background:#171121; color:#fff7ed; font-size:.68rem; font-weight:800; letter-spacing:.08em; }
    @keyframes coopBossFloat { 0%,100% { transform:translateY(3px); } 50% { transform:translateY(-7px); } }
    #coopBossContent .coop-lobby-body { display:grid; grid-template-columns:minmax(0,1.1fr) minmax(300px,.9fr); gap:18px; padding:22px; }
    #coopBossContent .coop-lobby-section { min-width:0; padding:20px; border:1px solid #ffffff12; border-radius:17px; background:linear-gradient(145deg,#1a1823,#13121a); }
    #coopBossContent .coop-lobby-section-head { display:flex; align-items:flex-start; justify-content:space-between; gap:12px; margin-bottom:14px; }
    #coopBossContent .coop-lobby-section h3 { margin:0; color:#f5f3ff; font-size:1rem; }
    #coopBossContent .coop-lobby-section-head p { margin:5px 0 0; color:#9e9aab; font-size:.8rem; line-height:1.45; }
    #coopBossContent .coop-team-count { flex:0 0 auto; padding:6px 9px; border:1px solid #f9731646; border-radius:999px; background:#f973161c; color:#fdba74; font-size:.72rem; font-weight:800; }
    #coopBossContent .pvp-team-select { grid-template-columns:repeat(auto-fill,minmax(148px,1fr)); gap:10px; margin:0; }
    #coopBossContent .pvp-select-card { position:relative; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:7px; aspect-ratio:1; min-width:0; min-height:148px; padding:22px 10px 10px; border-color:#ffffff15; border-radius:15px; background:#0e0d14; text-align:center; transition:transform .16s,border-color .16s,background .16s,box-shadow .16s; }
    #coopBossContent .pvp-select-card:hover { transform:translateY(-2px); border-color:#fdba7470; }
    #coopBossContent .pvp-select-card:has(input:checked) { border-color:#f97316; background:linear-gradient(110deg,#f9731628,#211a30); box-shadow:inset 0 0 0 1px #f9731633,0 6px 18px #f9731614; }
    #coopBossContent .pvp-select-card input { position:absolute; top:11px; left:11px; width:16px; height:16px; margin:0; accent-color:#f97316; }
    #coopBossContent .pvp-select-card img { width:68px; height:68px; image-rendering:pixelated; filter:drop-shadow(0 3px 5px #0009); }
    #coopBossContent .pvp-select-card > span { min-width:0; text-align:center; }
    #coopBossContent .pvp-select-card strong { color:#f5f3ff; font-size:.88rem; }
    #coopBossContent .pvp-select-card small { display:inline-block; margin-top:3px; color:#aaa5b6; font-size:.74rem; }
    #coopBossContent .coop-room-actions { display:grid; align-content:start; gap:12px; }
    #coopBossContent .coop-room-action { padding:16px; border:1px solid #ffffff12; border-radius:14px; background:#0e0d14; }
    #coopBossContent .coop-room-action h4 { margin:0 0 5px; color:#f5f3ff; font-size:.88rem; }
    #coopBossContent .coop-room-action p { margin:0 0 12px; color:#9692a2; font-size:.76rem; line-height:1.45; }
    #coopBossContent .coop-room-action .btn { width:100%!important; min-height:44px; margin:0!important; border-radius:11px; font-weight:750; }
    #coopBossContent .coop-room-action.join { border-color:#ffffff18; }
    #coopBossContent .coop-room-action input { width:100%; min-width:0; height:46px; margin:0 0 9px; border:1px solid #ffffff1c; border-radius:10px; outline:none; background:#17151f; color:#f5f3ff; text-align:center; font:800 .95rem ui-monospace,SFMono-Regular,Menlo,monospace; letter-spacing:.2em; text-transform:uppercase; transition:border-color .16s,box-shadow .16s; }
    #coopBossContent .coop-room-action input::placeholder { color:#777181; font-size:.7rem; font-family:inherit; font-weight:600; letter-spacing:.13em; }
    #coopBossContent .coop-room-action input:focus { border-color:#f97316; box-shadow:0 0 0 3px #f9731629; }
    #coopBossContent .coop-lobby-footnote { grid-column:1/-1; display:flex; align-items:center; gap:9px; margin:-4px 2px 0; color:#858191; font-size:.75rem; }
    #coopBossContent .coop-lobby-footnote::before { content:'ℹ'; display:grid; place-items:center; width:17px; height:17px; flex:0 0 17px; border:1px solid #fdba7450; border-radius:50%; color:#fed7aa; font-size:.68rem; }
    #coopBossContent .coop-waiting { width:min(100%,1180px); margin:18px auto 30px; overflow:hidden; border:1px solid rgba(253,186,116,.2); border-radius:24px; background:linear-gradient(145deg,#171521,#111018 65%,#15111e); box-shadow:0 24px 70px #0007,0 0 50px #f9731612; }
    #coopBossContent .coop-waiting-hero { position:relative; display:flex; align-items:center; justify-content:space-between; min-height:210px; gap:20px; overflow:hidden; padding:26px clamp(20px,4vw,48px); border-bottom:1px solid #ffffff12; background:radial-gradient(ellipse at 80% 55%,#fb923c33,transparent 35%),linear-gradient(105deg,#211532,#15121f 72%); }
    #coopBossContent .coop-waiting-hero::after { content:''; position:absolute; inset:0; pointer-events:none; opacity:.16; background-image:linear-gradient(#ffffff08 1px,transparent 1px),linear-gradient(90deg,#ffffff08 1px,transparent 1px); background-size:34px 34px; mask-image:linear-gradient(90deg,black,transparent 82%); }
    #coopBossContent .coop-waiting-copy { position:relative; z-index:1; max-width:680px; }
    #coopBossContent .coop-waiting-kicker { color:#fed7aa; font-size:.7rem; font-weight:800; letter-spacing:.15em; text-transform:uppercase; }
    #coopBossContent .coop-waiting-hero h2 { margin:9px 0 6px; color:#fff; font-size:clamp(1.4rem,2.6vw,2rem); letter-spacing:-.03em; }
    #coopBossContent .coop-waiting-hero p { margin:0; color:#c4bfd0; font-size:.9rem; line-height:1.5; }
    #coopBossContent .coop-waiting-state { display:inline-flex; align-items:center; gap:8px; margin-top:15px; padding:7px 10px; border:1px solid #f9731640; border-radius:999px; background:#f973161b; color:#fff7ed; font-size:.72rem; font-weight:750; }
    #coopBossContent .coop-waiting-state::before { content:''; width:7px; height:7px; border-radius:50%; background:#fb923c; box-shadow:0 0 10px #f97316; animation:coopLobbyPulse 1.7s ease-in-out infinite; }
    @keyframes coopLobbyPulse { 50% { opacity:.35; box-shadow:0 0 2px #f97316; } }
    #coopBossContent .coop-waiting-boss { position:relative; z-index:1; display:grid; place-items:center; width:185px; min-width:145px; height:175px; }
    #coopBossContent .coop-waiting-boss::before { content:''; position:absolute; width:145px; height:145px; border:1px solid #fb923c30; border-radius:50%; background:radial-gradient(circle,#f9731627,transparent 68%); box-shadow:0 0 45px #ea580c2b; }
    #coopBossContent .coop-waiting-boss img { position:relative; width:180px; height:180px; object-fit:contain; image-rendering:pixelated; filter:drop-shadow(0 12px 17px #000b); animation:coopBossFloat 3.4s ease-in-out infinite; }
    #coopBossContent .coop-waiting-body { display:grid; grid-template-columns:minmax(0,1.2fr) minmax(280px,.8fr); gap:16px; padding:20px; }
    #coopBossContent .coop-waiting-section { min-width:0; padding:18px; border:1px solid #ffffff12; border-radius:16px; background:linear-gradient(145deg,#1a1823,#13121a); }
    #coopBossContent .coop-waiting-section-head { display:flex; align-items:center; justify-content:space-between; gap:10px; margin-bottom:12px; }
    #coopBossContent .coop-waiting-section h3 { margin:0; color:#f5f3ff; font-size:.96rem; }
    #coopBossContent .coop-waiting-count { flex:0 0 auto; padding:6px 9px; border:1px solid #ffffff18; border-radius:999px; background:#0e0d14; color:#fed7aa; font-size:.72rem; font-weight:800; }
    #coopBossContent .coop-waiting-members { display:grid; grid-template-columns:repeat(auto-fill,minmax(148px,1fr)); gap:10px; }
    #coopBossContent .coop-waiting-member { position:relative; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:8px; aspect-ratio:1; min-width:0; min-height:148px; padding:18px 12px 12px; border:1px solid #ffffff12; border-radius:16px; background:#0e0d14; text-align:center; }
    #coopBossContent .coop-waiting-member.host { border-color:#f9731650; background:linear-gradient(100deg,#f973161c,#0e0d14 70%); }
    #coopBossContent .coop-waiting-member img { width:68px; height:68px; flex:0 0 68px; object-fit:contain; image-rendering:pixelated; filter:drop-shadow(0 3px 7px #0009); }
    #coopBossContent .coop-waiting-member img.coop-waiting-trainer-avatar { padding:4px; border:1px solid #ffffff12; border-radius:12px; background:#17151e; }
    #coopBossContent .coop-waiting-member-copy { width:100%; min-width:0; flex:0 0 auto; }
    #coopBossContent .coop-waiting-member-copy strong { display:block; overflow:hidden; color:#f5f3ff; font-size:.9rem; text-overflow:ellipsis; white-space:nowrap; }
    #coopBossContent .coop-waiting-member-copy span { display:block; margin-top:5px; color:#9e9aab; font-size:.72rem; line-height:1.35; }
    #coopBossContent .coop-waiting-role { position:absolute; top:9px; right:9px; padding:4px 6px; border:1px solid #f973163b; border-radius:999px; background:#171121; color:#fdba74; font-size:.57rem; font-weight:800; text-transform:uppercase; }
    #coopBossContent .coop-waiting-room-code { display:flex; align-items:center; justify-content:space-between; gap:10px; padding:13px; border:1px solid #f9731646; border-radius:14px; background:linear-gradient(120deg,#f9731620,#15121f); }
    #coopBossContent .coop-waiting-room-code small { display:block; margin-bottom:5px; color:#aaa5b6; font-size:.66rem; font-weight:700; letter-spacing:.1em; text-transform:uppercase; }
    #coopBossContent .coop-waiting-room-code strong { color:#fff7ed; font:800 clamp(1.1rem,3vw,1.55rem) ui-monospace,SFMono-Regular,Menlo,monospace; letter-spacing:.2em; }
    #coopBossContent .coop-waiting-room-code button { flex:0 0 auto; min-height:38px; padding:7px 10px; border:1px solid #ffffff18; border-radius:9px; background:#17151f; color:#fff7ed; cursor:pointer; font-size:.73rem; font-weight:750; }
    #coopBossContent .coop-waiting-actions { display:grid; gap:9px; margin-top:12px; }
    #coopBossContent .coop-waiting-actions .btn { width:100%!important; min-height:46px; margin:0!important; border-radius:11px; font-weight:750; }
    #coopBossContent .coop-waiting-host-note { margin:0; color:#aaa5b6; font-size:.76rem; line-height:1.5; }
    .pvp-code { font-size:1.6rem; font-weight:800; letter-spacing:.18em; color:#fed7aa; }
    .pvp-sides { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:14px; margin:16px 0; }
    .pvp-side-card { padding:14px; border:1px solid var(--border); border-radius:14px; background:var(--input-bg); min-width:0; }
    .pvp-side-card.active { border-color:var(--primary); }
    .pvp-pokemon-line { display:flex; align-items:center; gap:10px; margin-top:8px; }
    .pvp-pokemon-line img { width:64px; height:64px; object-fit:contain; }
    .pvp-hp-track { height:8px; border-radius:10px; overflow:hidden; background:#27272a; margin-top:5px; }
    .pvp-hp-track span { display:block; height:100%; background:#22c55e; }
    .pvp-battle-actions { display:grid; grid-template-columns:repeat(auto-fit,minmax(180px,1fr)); gap:8px; margin-top:14px; }
    .pvp-battle-actions .btn { margin:0; }
    .pvp-action-disabled { opacity:.45; cursor:not-allowed; }
    .pvp-log { display:grid; gap:5px; margin:14px 0; padding:12px; max-height:170px; overflow:auto; border-radius:10px; background:#0d0d12; color:var(--text-muted); font-size:.85rem; }
    .pvp-arena { position:relative; display:flex; flex-direction:column; align-items:center; justify-content:flex-end; width:100%; min-height:min(76vh,720px); overflow:hidden; border:1px solid var(--border); border-radius:18px; background:#0a1628; }
    .coop-boss-arena { position:relative; display:flex; flex-direction:column; align-items:center; justify-content:flex-end; width:100%; max-width:1500px; min-height:min(90vh,900px); overflow:hidden; border:1px solid rgba(249,115,22,.35); border-radius:20px; background:#160f25; box-shadow:0 18px 48px #0005; }
    .coop-boss-arena .battle-bg { background:linear-gradient(180deg,#191327 0%,#382151 48%,#26143f 100%); }
    .coop-boss-arena .battle-sky { background:radial-gradient(ellipse at 70% 22%,rgba(251,146,60,.24),transparent 52%),linear-gradient(180deg,rgba(255,255,255,.05),transparent); }
    .coop-boss-arena .battle-ground { bottom:30%; height:28%; background:radial-gradient(ellipse at 50% 65%,rgba(234,88,12,.28),transparent 70%),linear-gradient(180deg,transparent,rgba(9,5,18,.6)); }
    .coop-boss-arena .battle-field { width:100%; max-width:1440px; min-height:600px; padding:74px 30px 8px; }
    .coop-boss-arena .battle-enemy { align-items:flex-start; gap:16px; }
    .coop-boss-info-wrap { width:min(460px,58vw); min-width:0; }
    .coop-boss-arena .enemy-info.daily-boss-info { width:100%; min-width:0; border-color:rgba(251,146,60,.45); }
    .coop-boss-attack-banner { position:relative; width:max-content; max-width:100%; margin:4px 0 0 8px; padding:8px 12px; border:3px solid #17131d; background:#e8e5e4; color:#16121b; font-size:.82rem; font-weight:800; line-height:1.25; box-shadow:0 6px 16px #0006; animation:coopBossBannerIn .18s ease-out both; }
    .coop-boss-attack-banner::before { position:absolute; top:-9px; left:14px; width:12px; height:12px; content:''; transform:rotate(45deg); border-top:3px solid #17131d; border-left:3px solid #17131d; background:#e8e5e4; }
    @keyframes coopBossBannerIn { from { opacity:0; transform:translateY(-5px); } to { opacity:1; transform:translateY(0); } }
    .coop-boss-arena .coop-mewtwo-info .battle-level-type-row .poke-level,
    .coop-boss-arena .coop-mewtwo-info .hp-label span:nth-child(2) { display:none; }
    .coop-boss-arena .enemy-sprite { width:250px; height:250px; filter:drop-shadow(0 12px 24px rgba(0,0,0,.62)); }
    .coop-boss-arena .battle-player { align-items:flex-end; padding-right:22%; }
    .coop-boss-arena .player-info { width:min(306px,46%); min-width:190px; padding:9px 11px; border-color:rgba(249,115,22,.4); box-shadow:0 10px 28px rgba(0,0,0,.45),0 0 16px rgba(249,115,22,.08); }
    .coop-boss-arena .player-info .pvp-trainer-name { color:#fed7aa; font-size:.72rem; }
    .coop-boss-arena .player-info .hp-bar { height:13px; border-radius:8px; }
    .coop-boss-arena .player-info .hp-fill { border-radius:8px; }
    .coop-boss-arena .player-sprite { width:190px; height:190px; }
    .coop-boss-arena .enemy-sprite.attack-anim { animation-duration:.65s; }
    .coop-boss-arena .player-sprite.hit { animation:coopBossHit .72s ease-in-out; }
    .coop-boss-arena .enemy-sprite.hit { animation:coopBossHit .72s ease-in-out; }
    @keyframes coopBossHit {
      0%,100% { opacity:1; transform:translateX(0); filter:drop-shadow(0 6px 12px rgba(0,0,0,.45)) brightness(1); }
      16% { opacity:.3; transform:translateX(9px); filter:drop-shadow(0 0 12px #fff) brightness(2); }
      32% { opacity:1; transform:translateX(-8px); filter:drop-shadow(0 6px 12px rgba(0,0,0,.45)) brightness(1); }
      48% { opacity:.35; transform:translateX(7px); filter:drop-shadow(0 0 12px #f44) brightness(1.8); }
      64% { opacity:1; transform:translateX(-5px); filter:drop-shadow(0 6px 12px rgba(0,0,0,.45)) brightness(1); }
      80% { opacity:.45; transform:translateX(3px); filter:drop-shadow(0 0 10px #fff) brightness(1.7); }
    }
    .coop-boss-toolbar { position:absolute; z-index:3; top:12px; left:16px; right:16px; display:flex; align-items:center; justify-content:flex-start; gap:10px; color:#ede9fe; font-size:.84rem; font-weight:700; }
    .coop-boss-toolbar span { padding:7px 10px; border:1px solid #ffffff24; border-radius:999px; background:#100b1dbb; backdrop-filter:blur(6px); }
    .coop-boss-toolbar-meta { display:flex; align-items:center; gap:8px; margin-left:auto; }
    .coop-boss-sound-btn { display:grid; place-items:center; width:34px; height:34px; padding:0; border:1px solid #ffffff24; border-radius:999px; background:#100b1dbb; color:#ede9fe; font-size:1rem; cursor:pointer; }
    .coop-boss-sound-btn:hover { border-color:rgba(249,115,22,.7); background:#28172a; }
    .coop-boss-sound-btn:focus-visible { outline:2px solid #fdba74; outline-offset:2px; }
    .coop-boss-turn-timer { position:absolute; left:50%; top:50%; min-width:58px; transform:translate(-50%,-50%); border-color:rgba(249,115,22,.5)!important; color:#f5f3ff; text-align:center; font-variant-numeric:tabular-nums; box-shadow:0 0 18px rgba(234,88,12,.2); }
    .coop-boss-turn-timer.urgent { border-color:rgba(248,113,113,.65)!important; color:#fca5a5; }
    .coop-raid-roster { width:100%; display:grid; grid-template-columns:repeat(auto-fill,minmax(132px,150px)); justify-content:start; gap:8px; margin:0 0 12px; }
    .coop-raid-member { display:flex; flex-direction:column; align-items:center; justify-content:center; gap:3px; width:100%; min-width:0; min-height:112px; padding:8px; border:1px solid rgba(148,163,184,.18); border-radius:13px; background:linear-gradient(135deg,rgba(25,23,36,.96),rgba(12,14,22,.88)); text-align:center; transition:border-color .18s,background .18s; }
    .coop-raid-member.is-you { border-color:#f9731680; background:linear-gradient(135deg,rgba(88,28,135,.2),rgba(12,14,22,.92)); }
    .coop-raid-member img { width:38px; height:38px; flex:0 0 38px; object-fit:contain; image-rendering:pixelated; filter:drop-shadow(0 2px 5px #0008); }
    .coop-raid-member-copy { width:100%; min-width:0; }
    .coop-raid-member-copy strong,.coop-raid-member-copy span { display:block; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
    .coop-raid-member-copy strong { font-size:.8rem; }
    .coop-raid-member-copy span { margin-top:3px; color:var(--text-muted); font-size:.7rem; }
    .coop-raid-member-hp { height:5px; margin-top:5px; overflow:hidden; border-radius:6px; background:#292631; box-shadow:inset 0 1px 2px #0008; }
    .coop-raid-member-hp i { display:block; height:100%; border-radius:inherit; background:#22c55e; }
    .coop-effect-tags { display:flex; flex-wrap:wrap; gap:4px; margin-top:5px; }
    .coop-effect-tag { padding:2px 6px; border:1px solid rgba(251,146,60,.25); border-radius:999px; background:rgba(234,88,12,.16); color:#fff7ed; font-size:.62rem; font-weight:700; }
    .coop-effect-tag.status { border-color:rgba(251,191,36,.28); background:rgba(245,158,11,.13); color:#fde68a; }
    .coop-boss-arena .battle-ui { width:min(100%,1000px); padding:18px 20px 22px; border:1px solid rgba(249,115,22,.22); border-top:3px solid #ea580c; border-radius:22px 22px 0 0; background:linear-gradient(155deg,rgba(22,20,32,.98),rgba(15,14,22,.99)); box-shadow:0 -12px 36px rgba(5,2,12,.6); }
    .coop-boss-arena .battle-log { min-height:54px; margin-bottom:0; padding:13px 16px; border-color:rgba(148,163,184,.2); border-radius:13px; background:linear-gradient(110deg,rgba(24,23,33,.96),rgba(13,13,19,.96)); font-weight:600; }
    .coop-boss-arena .pvp-turn-prompt { display:flex; align-items:center; gap:8px; margin:12px 2px 8px; color:#fed7aa; font-size:.82rem; font-weight:600; }
    .coop-boss-arena .pvp-turn-prompt:empty { display:none; }
    .coop-boss-arena .pvp-turn-prompt::before { content:''; width:7px; height:7px; flex:0 0 7px; border-radius:50%; background:#f97316; box-shadow:0 0 10px #f97316aa; }
    .coop-boss-arena .battle-actions { gap:10px; }
    .coop-boss-arena .coop-switch-btn { min-height:68px; gap:10px; justify-content:flex-start; }
    .coop-boss-arena .coop-switch-sprite { width:48px; height:48px; flex:0 0 48px; display:grid; place-items:center; overflow:hidden; border:1px solid rgba(148,163,184,.2); border-radius:9px; background:rgba(15,14,22,.75); }
    .coop-boss-arena .coop-switch-sprite img { width:100%; height:100%; object-fit:contain; image-rendering:pixelated; }
    .coop-boss-arena .coop-switch-copy { display:flex; flex:1; min-width:0; align-items:center; justify-content:space-between; gap:8px; }
    .coop-faint-switch-overlay { position:fixed; z-index:10000; inset:0; display:grid; place-items:center; padding:16px; background:rgba(5,4,10,.76); backdrop-filter:blur(5px); }
    .coop-faint-switch-dialog { width:min(620px,100%); max-height:calc(100dvh - 32px); overflow:auto; padding:22px; border:1px solid rgba(249,115,22,.65); border-radius:20px; background:linear-gradient(150deg,#1c1729,#111018); box-shadow:0 24px 80px #000b,0 0 36px #ea580c30; }
    .coop-faint-switch-dialog h2 { margin:0; color:#f5f3ff; font-size:1.35rem; }
    .coop-faint-switch-dialog p { margin:7px 0 18px; color:var(--text-muted); }
    .coop-faint-switch-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(132px,1fr)); gap:10px; }
    .coop-faint-switch-card { min-width:0; min-height:116px; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:2px; padding:8px 9px; border:1px solid rgba(249,115,22,.48); border-radius:13px; background:linear-gradient(155deg,rgba(38,22,55,.92),rgba(17,16,24,.98)); color:var(--text); font-family:inherit; cursor:pointer; transition:border-color .15s,background .15s,transform .15s; }
    .coop-faint-switch-card:hover:not(:disabled) { border-color:#f97316; background:linear-gradient(155deg,rgba(65,36,91,.96),rgba(24,20,34,.98)); transform:translateY(-1px); }
    .coop-faint-switch-card:disabled { opacity:.55; cursor:not-allowed; }
    .coop-faint-switch-card img { width:38px; height:38px; object-fit:contain; image-rendering:pixelated; }
    .coop-faint-switch-card strong { max-width:100%; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:.8rem; }
    .coop-faint-switch-meta { max-width:100%; overflow:hidden; color:var(--text-muted); text-overflow:ellipsis; white-space:nowrap; font-size:.7rem; }
    .coop-faint-switch-hp { width:100%; height:5px; margin-top:3px; overflow:hidden; border-radius:8px; background:#292631; }
    .coop-faint-switch-hp i { display:block; height:100%; border-radius:inherit; background:#22c55e; }
    .coop-bag-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(132px,1fr)); gap:10px; }
    .coop-bag-card { min-width:0; min-height:116px; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:5px; padding:9px; border:1px solid rgba(249,115,22,.42); border-radius:13px; background:linear-gradient(155deg,rgba(38,22,55,.92),rgba(17,16,24,.98)); color:var(--text); font-family:inherit; cursor:pointer; }
    .coop-bag-card:hover { border-color:#f97316; background:linear-gradient(155deg,rgba(65,36,91,.96),rgba(24,20,34,.98)); }
    .coop-bag-icon { width:42px; height:42px; display:grid; place-items:center; }
    .coop-bag-icon img { width:100%; height:100%; object-fit:contain; image-rendering:pixelated; }
    .coop-bag-card strong { max-width:100%; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:.82rem; }
    .coop-bag-card .coop-faint-switch-meta { color:var(--text-muted); }
    .coop-boss-arena .battle-btn { min-height:54px; border-radius:14px; background:rgba(12,14,22,.78); font-size:.94rem; }
    .coop-boss-arena .coop-main-actions { grid-template-columns:repeat(2,minmax(0,1fr)); }
    .pvp-arena .battle-bg { background:linear-gradient(180deg,#1a2744 0%,#2a4a3a 45%,#1a3a2a 100%); }
    .pvp-arena .battle-field { min-height:360px; }
    .pvp-arena .battle-ui { width:min(100%,700px); }
    .pvp-arena .pvp-fainted-stage { width:140px; height:140px; flex:0 0 140px; }
    .pvp-room-toolbar { position:absolute; z-index:3; top:12px; left:14px; right:14px; display:flex; justify-content:space-between; align-items:center; gap:10px; }
    .pvp-room-toolbar .btn { width:auto; margin:0; padding:7px 11px; }
    .pvp-room-clock { color:#fef3c7; font-size:.82rem; font-weight:800; white-space:nowrap; }
    .pvp-room-clock.urgent { color:#fca5a5; animation:pvpTimerPulse 1s ease-in-out infinite; }
    @keyframes pvpTimerPulse { 50% { opacity:.55; } }
    .pvp-turn-prompt { margin:12px 0 0; color:var(--text-muted); font-size:.82rem; }
    .pvp-waiting-action { padding:14px; border:1px solid var(--border); border-radius:12px; text-align:center; color:var(--text-muted); background:var(--input-bg); }
    .pvp-ready-list { display:grid; gap:8px; margin:12px 0; }
    .pvp-ready-list > div { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:10px 12px; border:1px solid var(--border); border-radius:10px; background:var(--input-bg); }
    .pvp-ready-list span { color:var(--text-muted); font-size:.8rem; }
    .pvp-ready-list span.is-ready { color:#4ade80; font-weight:800; }
    .pvp-trainer-name { margin-bottom:4px; color:var(--text-muted); font-size:.68rem; font-weight:700; letter-spacing:.04em; text-transform:uppercase; }
    @media (max-width:560px) { .pvp-sides { grid-template-columns:1fr; } .pvp-lobby-box,.pvp-room-box { padding:13px; } }
    @media(max-width:620px) { .pvp-hero { grid-template-columns:1fr; } .pvp-rank-emblem { position:absolute; top:18px; right:18px; width:62px; height:62px; font-size:1.7rem; opacity:.82; } .pvp-hero-copy { padding-right:52px; } .pvp-rank-overview { grid-template-columns:repeat(2,minmax(0,1fr)); } .pvp-mode-head { display:block; } .pvp-mode-badge { display:inline-flex; margin-top:10px; } }
    @media (max-width:700px) {
      #coopBossContent .coop-lobby { margin:12px auto 20px; border-radius:18px; }
      #coopBossContent .coop-lobby-hero { min-height:0; padding:23px 18px 16px; }
      #coopBossContent .coop-lobby-hero p { max-width:100%; font-size:.84rem; }
      #coopBossContent .coop-lobby-perks { gap:6px; margin-top:13px; }
      #coopBossContent .coop-lobby-perks span { padding:6px 8px; font-size:.67rem; }
      #coopBossContent .coop-lobby-boss { width:105px; min-width:85px; height:130px; margin-right:-10px; }
      #coopBossContent .coop-lobby-boss::before { width:100px; height:100px; }
      #coopBossContent .coop-lobby-boss img { width:125px; height:125px; }
      #coopBossContent .coop-lobby-boss span { right:-5px; bottom:0; padding:4px 6px; font-size:.58rem; }
      #coopBossContent .coop-lobby-body { grid-template-columns:1fr; gap:12px; padding:13px; }
      #coopBossContent .coop-lobby-section { padding:14px; }
      #coopBossContent .pvp-team-select { grid-template-columns:repeat(auto-fill,minmax(122px,1fr)); gap:8px; }
      #coopBossContent .pvp-select-card { min-height:122px; gap:5px; padding:20px 7px 8px; border-radius:13px; }
      #coopBossContent .pvp-select-card input { top:8px; left:8px; width:14px; height:14px; }
      #coopBossContent .pvp-select-card img { width:54px; height:54px; }
      #coopBossContent .pvp-select-card strong { font-size:.78rem; }
      #coopBossContent .pvp-select-card small { font-size:.65rem; }
      #coopBossContent .coop-lobby-footnote { grid-column:auto; line-height:1.4; }
      #coopBossContent .coop-waiting { margin:12px auto 20px; border-radius:18px; }
      #coopBossContent .coop-waiting-hero { min-height:0; padding:21px 16px 15px; }
      #coopBossContent .coop-waiting-hero p { font-size:.82rem; }
      #coopBossContent .coop-waiting-boss { width:95px; min-width:72px; height:120px; margin-right:-8px; }
      #coopBossContent .coop-waiting-boss::before { width:90px; height:90px; }
      #coopBossContent .coop-waiting-boss img { width:120px; height:120px; }
      #coopBossContent .coop-waiting-body { grid-template-columns:1fr; gap:11px; padding:12px; }
      #coopBossContent .coop-waiting-section { padding:13px; }
      #coopBossContent .coop-waiting-members { grid-template-columns:repeat(auto-fill,minmax(122px,1fr)); gap:8px; }
      #coopBossContent .coop-waiting-member { min-height:122px; padding:18px 9px 9px; border-radius:13px; }
      #coopBossContent .coop-waiting-member img { width:56px; height:56px; flex-basis:56px; }
      #coopBossContent .coop-waiting-member-copy strong { font-size:.82rem; }
      #coopBossContent .coop-waiting-member-copy span { font-size:.67rem; }
      .coop-boss-arena { min-height:calc(100dvh - 180px); }
      .coop-boss-arena .battle-field { min-height:360px; padding:62px 12px 8px; }
      .coop-boss-arena .battle-enemy { display:grid; grid-template-columns:minmax(0,1fr) clamp(132px,37vw,190px); align-items:start; gap:6px; padding:0 2%; }
      .coop-boss-arena .enemy-info.daily-boss-info { justify-self:start; width:100%; max-width:none; padding:9px 10px; }
      .coop-boss-arena .enemy-stage { width:clamp(132px,37vw,190px); justify-self:center; }
      .coop-boss-arena .enemy-sprite { width:clamp(142px,40vw,208px); height:clamp(142px,40vw,208px); }
      .coop-boss-arena .player-sprite { width:clamp(104px,29vw,154px); height:clamp(104px,29vw,154px); }
      .coop-boss-arena .battle-player { gap:6px; padding:0 6% 0 4%; }
      .coop-boss-arena .player-info { width:min(58%,230px); min-width:0; padding:8px 9px; }
      .coop-boss-arena .battle-ui { padding:12px 12px calc(14px + env(safe-area-inset-bottom)); }
      .coop-boss-arena .coop-main-actions { grid-template-columns:1fr 1fr; }
      .coop-boss-arena .coop-main-actions .bag { grid-column:auto; }
      .coop-boss-toolbar { top:8px; left:9px; right:9px; font-size:.75rem; }
      .coop-boss-toolbar span { padding:6px 8px; }
      .coop-raid-roster { display:flex; justify-content:flex-start; overflow-x:auto; padding-bottom:4px; scrollbar-width:thin; }
      .coop-raid-member { flex:0 0 138px; }
      .pvp-arena { min-height:calc(100vh - 180px); min-height:calc(100dvh - 180px); }
      .pvp-arena .battle-field { min-height:300px; padding:56px 12px 8px; }
      .pvp-arena .battle-enemy, .pvp-arena .battle-player { gap:6px; }
      .pvp-arena .enemy-info, .pvp-arena .player-info { min-width:0; width:min(58%,240px); padding:8px 10px; }
      .pvp-arena .enemy-sprite, .pvp-arena .player-sprite { width:clamp(86px,24vw,140px); height:clamp(86px,24vw,140px); }
      .pvp-arena .pvp-fainted-stage { width:clamp(86px,24vw,140px); height:clamp(86px,24vw,140px); flex-basis:clamp(86px,24vw,140px); }
      .pvp-arena .battle-ui { padding:12px 12px 14px; }
    }
    @media (max-width:560px) {
      .pvp-room-controls input { flex:1 1 100%; width:100%; max-width:none; min-width:0; }
      .pvp-room-controls .btn { flex:1 1 auto; }
    }
    @media (max-width:480px) {
      .coop-boss-toolbar { flex-direction:row; align-items:center; gap:4px; }
      .coop-boss-toolbar-meta { max-width:100%; flex-wrap:wrap; justify-content:flex-end; gap:4px; }
      .coop-boss-toolbar-meta span { padding:5px 7px; }
      .coop-boss-turn-timer { top:42px; min-width:48px; padding:5px 6px!important; }
      .coop-boss-arena .battle-field { min-height:500px; padding:102px 12px 8px; gap:8px; justify-content:flex-start; }
      .coop-boss-arena .battle-enemy { display:flex; flex-direction:column; align-items:stretch; gap:0; padding:0; }
      .coop-boss-arena .enemy-info.daily-boss-info { width:100%; padding:10px 12px; }
      .coop-boss-info-wrap { width:100%; }
      .coop-boss-arena .enemy-stage { width:100%; height:clamp(118px,34vw,146px); flex:0 0 auto; }
      .coop-boss-arena .enemy-sprite { width:clamp(120px,34vw,145px); height:clamp(120px,34vw,145px); }
      .coop-boss-arena .battle-player { min-height:140px; align-items:flex-end; justify-content:space-between; gap:6px; margin:8px 0 6px; padding:0 2%; }
      .coop-boss-arena .player-stage { width:40%; flex:0 0 40%; justify-content:center; }
      .coop-boss-arena .player-sprite { width:clamp(104px,29vw,132px); height:clamp(104px,29vw,132px); }
      .coop-boss-arena .player-info { width:min(60%,240px); flex:1 1 auto; }
    }
    .cards-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
    .admin-panel-shell { max-width: 1120px; }
    .admin-panel-hero {
      display:flex; align-items:center; justify-content:space-between; gap:20px; padding:22px 24px;
      margin:4px 0 22px; border:1px solid rgba(251,191,36,.22); border-radius:18px;
      background:radial-gradient(ellipse at 90% 0%,rgba(245,158,11,.14),transparent 48%),linear-gradient(135deg,#19170f,#121219 70%);
    }
    .admin-panel-hero-copy { display:flex; align-items:center; gap:16px; }
    .admin-panel-emblem { width:52px;height:52px;display:grid;place-items:center;flex:0 0 auto;border-radius:15px;background:rgba(245,158,11,.13);font-size:27px; }
    .admin-panel-hero h2 { margin:0 0 5px;font-size:1.25rem; }
    .admin-panel-hero p { color:var(--text-muted);font-size:.85rem;line-height:1.5; }
    .admin-access-tag { padding:7px 11px;border:1px solid rgba(52,211,153,.28);border-radius:999px;background:rgba(52,211,153,.08);color:#6ee7b7;font-size:.75rem;font-weight:700;white-space:nowrap; }
    .admin-panel-grid { display:grid;grid-template-columns:minmax(0,.92fr) minmax(0,1.08fr);gap:18px;align-items:start; }
    .admin-panel-card { min-width:0;padding:22px;border:1px solid var(--border);border-radius:17px;background:linear-gradient(155deg,#171720,#111117);box-shadow:0 14px 35px rgba(0,0,0,.18); }
    .admin-step-heading { display:flex;align-items:flex-start;gap:12px;margin-bottom:18px; }
    .admin-step-number { width:30px;height:30px;display:grid;place-items:center;flex:0 0 auto;border:1px solid rgba(253,186,116,.28);border-radius:10px;background:rgba(249,115,22,.13);color:#fed7aa;font-size:.8rem;font-weight:800; }
    .admin-step-heading h3 { font-size:.98rem;margin:1px 0 5px; }
    .admin-step-heading p { color:var(--text-muted);font-size:.78rem;line-height:1.45; }
    .admin-search-field { position:relative; }
    .admin-search-field .form-group input { padding:12px 14px 12px 42px; }
    .admin-search-icon { position:absolute;left:14px;top:39px;color:#858594;pointer-events:none; }
    .admin-trainer-results { display:grid;gap:7px;margin:8px 0 14px;max-height:240px;overflow:auto; }
    .admin-trainer-option { width:100%;display:flex;align-items:center;justify-content:space-between;gap:12px;padding:11px 12px;border:1px solid var(--border);border-radius:11px;background:#111119;color:var(--text);font:inherit;text-align:left;cursor:pointer;transition:border-color .18s,background .18s; }
    .admin-trainer-option:hover,.admin-trainer-option.selected { border-color:#fb923c;background:rgba(249,115,22,.12); }
    .admin-trainer-option small { color:var(--text-muted);font-size:.72rem; }
    .admin-trainer-result-row { display:grid;grid-template-columns:minmax(0,1fr) 38px;align-items:stretch;gap:7px; }
    .admin-trainer-result-row .admin-trainer-option { min-width:0; }
    .admin-trainer-multi-check { display:grid;place-items:center;border:1px solid var(--border);border-radius:10px;background:#111119;cursor:pointer; }
    .admin-trainer-multi-check:has(input:checked) { border-color:#fb923c;background:rgba(249,115,22,.18); }
    .admin-trainer-multi-check input { width:17px;height:17px;margin:0;accent-color:#f97316;cursor:pointer; }
    .admin-selected-count { flex:1;min-width:0; }
    .admin-clear-multi { flex:0 0 auto;padding:6px 9px;border:1px solid var(--border);border-radius:8px;background:var(--input-bg);color:var(--text-muted);font:inherit;font-size:.72rem;cursor:pointer; }
    .admin-clear-multi:hover { border-color:var(--primary);color:var(--text); }
    .admin-asset-results { display:grid;gap:6px;max-height:220px;overflow:auto;margin:8px 0;padding:2px; }
    .admin-asset-checkbox-row { display:flex;align-items:center;gap:9px;min-width:0;padding:9px 10px;border:1px solid var(--border);border-radius:9px;background:#111119;color:var(--text);font-size:.82rem;cursor:pointer; }
    .admin-asset-checkbox-row:has(input:checked) { border-color:#fb923c;background:rgba(249,115,22,.12); }
    .admin-asset-checkbox-row input { flex:0 0 auto;width:16px;height:16px;margin:0;accent-color:#f97316; }
    .admin-asset-checkbox-row span { flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap; }
    .admin-asset-checkbox-row small { flex:0 0 auto;color:var(--text-muted);font-size:.7rem; }
    .admin-selected-count-note { display:flex;align-items:center;justify-content:space-between;gap:8px;margin:7px 0 12px;color:var(--text-muted);font-size:.77rem; }
    .admin-search-message { padding:11px 12px;color:var(--text-muted);font-size:.8rem; }
    .admin-selected-trainer { display:flex;align-items:center;gap:11px;padding:13px;margin-top:14px;border:1px dashed #383844;border-radius:12px;color:var(--text-muted);font-size:.83rem; }
    .admin-selected-trainer.has-trainer { border-style:solid;border-color:rgba(52,211,153,.3);background:rgba(16,185,129,.06);color:var(--text); }
    .admin-trainer-details { margin-top:14px;padding-top:14px;border-top:1px solid var(--border); }
    .admin-detail-heading { display:flex;align-items:center;justify-content:space-between;gap:10px;margin:0 0 9px;font-size:.84rem; }
    .admin-detail-section { margin-top:14px; }
    .admin-detail-pokemon-grid { display:grid;grid-template-columns:repeat(auto-fill,minmax(min(100%,205px),1fr));gap:10px; }
    .admin-detail-pokemon { display:grid;grid-template-columns:58px minmax(0,1fr);grid-template-areas:"sprite info" "remove remove";align-items:center;column-gap:10px;row-gap:7px;min-width:0;padding:10px;border:1px solid var(--border);border-radius:12px;background:linear-gradient(145deg,#15151e,#101016); }
    .admin-detail-pokemon img { grid-area:sprite;width:58px;height:58px;object-fit:contain;image-rendering:pixelated; }
    .admin-detail-pokemon-info { grid-area:info;min-width:0; }
    .admin-detail-pokemon-info strong { display:block;overflow:hidden;margin-bottom:4px;font-size:.82rem;text-overflow:ellipsis;white-space:nowrap; }
    .admin-detail-pokemon-info small { display:block;color:var(--text-muted);font-size:.72rem;line-height:1.4;overflow-wrap:anywhere; }
    .admin-detail-pokemon .admin-remove-button { grid-area:remove;justify-self:end; }
    .admin-detail-list { display:grid;gap:6px; }
    .admin-detail-row { display:flex;align-items:center;justify-content:space-between;gap:10px;padding:8px 10px;border:1px solid var(--border);border-radius:9px;background:#111119;font-size:.78rem; }
    .admin-detail-row span { min-width:0;overflow:hidden;text-overflow:ellipsis; }
    .admin-remove-button { width:auto;margin:0;padding:5px 8px;border:1px solid rgba(248,113,113,.3);border-radius:8px;background:rgba(127,29,29,.18);color:#fca5a5;font-size:.7rem; }
    .admin-remove-button:hover { border-color:#ef4444;background:rgba(127,29,29,.35); }
    .admin-detail-balance-button { width:auto;margin:0;padding:5px 8px;font-size:.7rem; }
    .admin-selected-avatar { width:36px;height:36px;display:grid;place-items:center;border-radius:11px;background:#252532;color:#fed7aa;font-weight:800; }
    .admin-selected-caption { display:block;color:var(--text-muted);font-size:.7rem;margin-bottom:3px; }
    .admin-resource-fields { margin-top:18px; }
    .admin-amount-wrap { display:flex;align-items:center;gap:10px; }
    .admin-amount-wrap .form-group { flex:1;margin-bottom:0; }
    .admin-amount-hint { color:var(--text-muted);font-size:.75rem; }
    .admin-grant-button { width:100%;margin-top:18px; }
    .admin-grant-button:disabled { opacity:.6;cursor:wait; }
    .admin-promote-form { display:grid;grid-template-columns:minmax(0,1fr) auto;gap:10px;align-items:end; }
    .admin-promote-form .form-group { margin:0; }
    .admin-promote-note { margin-top:10px;color:var(--text-muted);font-size:.78rem;line-height:1.5; }
    .admin-supporter-code-list { display:grid;gap:8px;margin-top:14px; }
    .admin-supporter-code-row { display:flex;align-items:center;justify-content:space-between;gap:12px;min-width:0;padding:10px 12px;border:1px solid var(--border);border-radius:10px;background:rgba(255,255,255,.025); }
    .admin-supporter-code-row > span { min-width:0; }
    .admin-supporter-code-row strong { overflow-wrap:anywhere;font:800 .88rem ui-monospace,SFMono-Regular,Menlo,monospace;letter-spacing:.08em; }
    .admin-supporter-code-row small { color:var(--text-muted);font-size:.72rem; }
    .admin-supporter-code-row .btn { width:auto;min-height:38px;margin:0;padding:7px 10px;font-size:.72rem; }
    .admin-supporter-code-row .admin-remove-button { width:auto;min-height:38px;margin:0;padding:7px 10px;font-size:.72rem; }
    .admin-account-actions { display:flex;align-items:center;gap:8px;flex-wrap:wrap; }
    .admin-account-actions .btn { width:auto;margin:0; }
    .admin-account-status { margin:0 0 9px;color:var(--text-muted);font-size:.78rem; }
    @media (max-width: 760px) { .admin-panel-grid { grid-template-columns:1fr; } }
    @media (max-width: 520px) { .admin-panel-hero { align-items:flex-start;padding:17px; } .admin-access-tag { display:none; } .admin-panel-card { padding:17px; } }
    .game-card {
      background: var(--card); border: 1px solid var(--border); border-radius: 16px;
      position: relative; overflow: visible;
      transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s; cursor: pointer;
    }
    .game-card:hover { transform: translateY(-3px); box-shadow: 0 12px 28px rgba(0,0,0,0.35); border-color: #3a3a4a; }
    .game-card.dungeon-locked { opacity:.68; cursor:not-allowed; }
    .game-card.dungeon-locked:hover { transform:none; box-shadow:none; border-color:var(--border); }
    .dungeon-lock-reason { margin-top:8px; color:var(--text-muted); font-size:.78rem; }
    .game-card-header { height: 100px; display: flex; align-items: center; justify-content: center; font-size: 2.8rem; border-radius: 15px 15px 0 0; }
    #gameCornerHomeCard .game-card-header, #ssAnneHomeCard .game-card-header, #silphCoHomeCard .game-card-header, #battleTowerHomeCard .game-card-header { height:auto; aspect-ratio:1.91; overflow:hidden; padding:0; background:#e7a32d; }
    #gameCornerHomeCard .game-card-header img { display:block; width:100%; height:100%; object-fit:contain; }
    #ssAnneHomeCard .game-card-header img { display:block; width:100%; height:100%; object-fit:cover; object-position:center 68%; }
    #silphCoHomeCard .game-card-header img { display:block; width:100%; height:100%; object-fit:cover; object-position:center 48%; }
    #battleTowerHomeCard .game-card-header img { display:block; width:100%; height:100%; object-fit:cover; object-position:center 42%; }
    #missionHomeCard .game-card-header { height:auto; aspect-ratio:1.91; overflow:hidden; padding:0; background:#27834c; }
    #missionHomeCard .game-card-header img { display:block; width:100%; height:100%; object-fit:cover; object-position:center; }
    #progressGuideHomeCard .game-card-header { height:auto; aspect-ratio:1.91; overflow:hidden; padding:0; background:#35a9e8; }
    #progressGuideHomeCard .game-card-header img { display:block; width:100%; height:100%; object-fit:cover; object-position:center; }
    #gymsHomeCard .game-card-header { height:auto; aspect-ratio:1.91; overflow:hidden; padding:0; background:#277e6a; }
    #gymsHomeCard .game-card-header img { display:block; width:100%; height:100%; object-fit:cover; object-position:center; }
    #explorationHomeCard .game-card-header { height:auto; aspect-ratio:1.91; overflow:hidden; padding:0; background:#bd6134; }
    #explorationHomeCard .game-card-header img { display:block; width:100%; height:100%; object-fit:cover; object-position:center bottom; }
    #pokemonCenterHomeCard .game-card-header { height:auto; aspect-ratio:1.78; overflow:hidden; padding:0; background:#c92736; }
    #pokemonCenterHomeCard .game-card-header img { display:block; width:100%; height:100%; object-fit:cover; object-position:center; }
    #pokeMarketHomeCard .game-card-header { height:auto; aspect-ratio:1.78; overflow:hidden; padding:0; background:#1885d1; }
    #pokeMarketHomeCard .game-card-header img { display:block; width:100%; height:100%; object-fit:cover; object-position:center; }
    .item-tooltip-card::after {
      content: attr(data-item-tooltip); position: absolute; z-index: 20;
      left: 50%; bottom: calc(100% + 8px); transform: translate(-50%, 4px);
      width: min(240px, calc(100vw - 40px)); padding: 10px 12px;
      border: 1px solid var(--border); border-radius: 9px;
      background: #111827; color: #f9fafb; box-shadow: 0 8px 24px rgba(0,0,0,0.4);
      font-size: 0.78rem; font-weight: 500; line-height: 1.4;
      text-align: center; white-space: normal; pointer-events: none;
      opacity: 0; visibility: hidden; transition: opacity 0.15s, transform 0.15s, visibility 0.15s;
    }
    .item-tooltip-card:hover::after, .item-tooltip-card:focus-within::after,
    .item-tooltip-card:focus-visible::after {
      opacity: 1; visibility: visible; transform: translate(-50%, 0);
    }
    .game-card.item-tooltip-card::after { bottom: calc(100% + 10px); }
    .game-card-body { padding: 16px 18px 18px; }
    .quick-mission-title-row { display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:4px; }
    .quick-mission-title-row .game-card-title { margin:0; }
    .quick-mission-progress { display:inline-flex;align-items:center;justify-content:center;gap:5px;margin-left:auto;padding:4px 8px;border:1px solid var(--border);border-radius:8px;background:rgba(255,255,255,.025); }
    .quick-mission-progress strong { color:var(--text);font-size:.86rem;line-height:1.2; }
    .quick-mission-progress span { color:var(--text-muted);font-size:.68rem; }
    .game-card-title { font-size: 1rem; font-weight: 700; margin-bottom: 4px; }
    .game-card-desc { font-size: 0.8rem; color: var(--text-muted); line-height: 1.4; margin-bottom: 12px; }
    .game-card-meta { display: flex; justify-content: space-between; align-items: center; font-size: 0.75rem; }
    .shop-buy-button {
      display: inline-flex; align-items: center; justify-content: center; gap: 6px;
      padding: 8px 14px; color: #fff; background: linear-gradient(135deg, #f97316, #c2410c);
      border: 1px solid rgba(254,215,170,0.4); border-radius: 9px;
      box-shadow: 0 3px 10px rgba(249,115,22,0.3);
      font: inherit; font-size: 0.8rem; font-weight: 700; cursor: pointer;
      transition: transform 0.15s, box-shadow 0.15s, background 0.15s;
    }
    .shop-buy-button:hover {
      background: linear-gradient(135deg, #fb923c, #f97316);
      box-shadow: 0 5px 14px rgba(249,115,22,0.45); transform: translateY(-1px);
    }
    .shop-buy-button:focus-visible { outline: 2px solid #fed7aa; outline-offset: 2px; }
    .difficulty { padding: 3px 8px; border-radius: 6px; font-weight: 600; font-size: 0.7rem; }
    .diff-easy { background: #22c55e22; color: #4ade80; }
    .diff-medium { background: #fbbf2422; color: #fbbf24; }
    .diff-hard { background: #ef444422; color: #f87171; }
    .diff-extreme { background: #f9731622; color: #fb923c; }
    .reward { color: var(--warning); font-weight: 600; }
    .status-tag { display: inline-flex; align-items: center; gap: 4px; padding: 3px 8px; border-radius: 6px; font-size: 0.7rem; font-weight: 600; }
    .status-available { background: #22c55e22; color: #4ade80; }
    .status-locked { background: #ef444422; color: #f87171; }
    .welcome-banner {
      background: linear-gradient(110deg, #c2410c, #f97316 48%, #ea580c);
      border: 1px solid #fb923c; border-radius: 16px; padding: 28px;
      margin-bottom: 28px; display: flex; align-items: center; gap: 24px;
    }
    .welcome-poke { width: 100px; height: 100px; object-fit: contain; filter: drop-shadow(0 8px 16px rgba(0,0,0,0.4)); flex-shrink: 0; }
    .welcome-text h2 { color:#fff; font-size:1.35rem; font-weight:700; margin-bottom:6px; }
    .welcome-text p { color:#fff; -webkit-text-stroke:.65px #000; paint-order:stroke fill; text-shadow:1px 1px 0 #000,-1px 1px 0 #000,1px -1px 0 #000,-1px -1px 0 #000; font-size: 0.9rem; line-height: 1.5; }
    .stats-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 14px; margin-bottom: 28px; }
    .stat-card { background: var(--card); border: 1px solid var(--border); border-radius: 14px; padding: 18px; text-align: center; }
    .stat-card .value { font-size: 1.6rem; font-weight: 700; margin-bottom: 4px; }
    .stat-card .label { font-size: 0.75rem; color: var(--text-muted); }
    .stat-card-currencies { display:flex;justify-content:center;flex-wrap:wrap;gap:10px;margin-top:8px;color:var(--text-muted);font-size:.72rem; }
    .stat-card-currencies strong { color:var(--text);font-weight:700; }
    .mission-list { display: flex; flex-direction: column; gap: 12px; }
    .daily-mission-section { margin: 18px 0 24px; padding: 18px; border: 1px solid rgba(249,115,22,.35); border-radius: 16px; background: linear-gradient(135deg, rgba(249,115,22,.14), rgba(22,19,36,.72)); }
    .progression-guide { max-width:1120px; margin:18px auto 30px; }
    .progression-guide-hero { display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:center; gap:20px; margin-bottom:18px; padding:clamp(20px,4vw,30px); border:1px solid rgba(253,186,116,.28); border-radius:20px; background:radial-gradient(ellipse at 90% 20%,rgba(249,115,22,.2),transparent 42%),linear-gradient(130deg,#211735,#15131d 70%); }
    .progression-guide-hero h3 { margin:5px 0 8px; font-size:clamp(1.25rem,2.5vw,1.7rem); }
    .progression-guide-hero p { max-width:680px; margin:0; color:var(--text-muted); font-size:.88rem; line-height:1.55; }
    .progression-guide-kicker { color:#fed7aa; font-size:.7rem; font-weight:800; letter-spacing:.13em; text-transform:uppercase; }
    .progression-guide-hero .btn { width:auto; margin:0; white-space:nowrap; }
    .progression-guide-section { margin:16px 0; padding:18px; border:1px solid var(--border); border-radius:16px; background:linear-gradient(145deg,var(--card),var(--input-bg)); }
    .progression-guide-section h3 { margin:0 0 12px; font-size:1rem; }
    .progression-guide-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
    .progression-guide-step { min-width:0; padding:13px; border:1px solid var(--border); border-radius:12px; background:rgba(8,8,13,.32); }
    .progression-guide-step-head { display:flex; align-items:flex-start; justify-content:space-between; gap:10px; }
    .progression-guide-step strong { font-size:.86rem; }
    .progression-guide-step p { margin:6px 0 0; color:var(--text-muted); font-size:.76rem; line-height:1.5; }
    .progression-guide-status { flex:0 0 auto; padding:4px 7px; border:1px solid rgba(253,186,116,.25); border-radius:999px; background:rgba(249,115,22,.11); color:#fdba74; font-size:.64rem; font-weight:750; }
    .progression-guide-status.done { border-color:rgba(74,222,128,.25); background:rgba(34,197,94,.08); color:#86efac; }
    .progression-guide-status.locked { border-color:rgba(251,191,36,.22); background:rgba(245,158,11,.08); color:#fcd34d; }
    .progression-guide-actions { display:flex; flex-wrap:wrap; gap:8px; margin-top:11px; }
    .progression-guide-actions .btn { width:auto; margin:0; padding:7px 10px; font-size:.74rem; }
    .progression-guide-daily { display:grid; gap:8px; }
    .progression-guide-daily-row { display:flex; justify-content:space-between; gap:12px; padding:9px 11px; border:1px solid var(--border); border-radius:10px; background:rgba(8,8,13,.28); font-size:.76rem; }
    .progression-guide-daily-row span:last-child { color:#fed7aa; font-weight:750; white-space:nowrap; }
    @media(max-width:640px) { .progression-guide-hero { grid-template-columns:1fr; } .progression-guide-hero .btn { width:100%; } .progression-guide-grid { grid-template-columns:1fr; } }
    .daily-mission-heading { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:14px; }
    .daily-mission-heading h3 { font-size:1.05rem; margin:0; }
    .daily-mission-timer { color:var(--text-muted); font-size:.78rem; white-space:nowrap; }
    .daily-mission-list { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; }
    .daily-mission-card { min-width:0; padding:14px; border:1px solid var(--border); border-radius:12px; background:rgba(12,12,20,.72); }
    .daily-mission-card h4 { margin:0 0 5px; font-size:.9rem; }
    .daily-mission-card p { min-height:2.4em; color:var(--text-muted); font-size:.77rem; line-height:1.45; }
    .daily-mission-progress { display:flex; justify-content:space-between; gap:8px; margin:10px 0 7px; font-size:.75rem; color:var(--text-muted); }
    .daily-mission-track { height:6px; overflow:hidden; border-radius:99px; background:rgba(255,255,255,.09); }
    .daily-mission-fill { height:100%; border-radius:inherit; background:linear-gradient(90deg,#fb923c,#fb923c); transition:width .2s ease; }
    .daily-mission-reward { margin:9px 0 10px; color:#fed7aa; font-size:.75rem; font-weight:700; }
    .daily-mission-card .mission-accept-button { width:100%; }
    .daily-mission-card .mission-accept-button:disabled { opacity:.65; cursor:default; transform:none; }
    .center-hero.missions-page-hero { border-color:rgba(249,115,22,.3); background:radial-gradient(ellipse at 80% 40%,rgba(249,115,22,.22),transparent 38%),linear-gradient(115deg,#49220f,#211712 65%,#3b1c0d); }
    .center-hero.missions-page-hero .center-kicker { color:#fdba74; }
    .center-hero.missions-page-hero .center-hero-art { border-color:rgba(251,146,60,.38); background:radial-gradient(circle,rgba(249,115,22,.16),transparent 70%); }
    @media (max-width:760px) { .daily-mission-list { grid-template-columns:1fr; } .daily-mission-card p { min-height:0; } }
    .mission-tabs { display: flex; gap: 8px; margin: 18px 0 14px; border-bottom: 1px solid var(--border); }
    .mission-tab { border: 0; border-bottom: 2px solid transparent; padding: 10px 14px; background: transparent; color: var(--text-muted); cursor: pointer; font: inherit; font-weight: 600; }
    .mission-tab.active { color: var(--text); border-bottom-color: #fb923c; }
    .mission-item {
      background: var(--card); border: 1px solid var(--border); border-radius: 14px;
      padding: 16px 18px; display: flex; align-items: center; gap: 16px;
      transition: border-color 0.2s;
    }
    .mission-item:hover { border-color: #3a3a4a; }
    .mission-details-dialog { width:min(480px,calc(100vw - 28px)); max-width:none; max-height:calc(100dvh - 32px); margin:auto; padding:0; overflow:auto; border:1px solid rgba(249,115,22,.55); border-radius:18px; background:var(--card); color:var(--text); box-shadow:0 24px 80px #000b,0 0 32px #ea580c24; }
    .mission-details-dialog::backdrop { background:rgba(5,4,10,.78); backdrop-filter:blur(5px); }
    .mission-details-inner { padding:20px; }
    .mission-details-header { display:flex; align-items:flex-start; justify-content:space-between; gap:12px; }
    .mission-details-heading { display:flex; align-items:center; gap:12px; min-width:0; }
    .mission-details-icon { display:grid; place-items:center; width:48px; height:48px; flex:0 0 48px; border-radius:13px; font-size:1.55rem; }
    .mission-details-kicker { display:block; margin-bottom:4px; color:#fed7aa; font-size:.65rem; font-weight:800; letter-spacing:.1em; }
    .mission-details-header h2 { margin:0; font-size:1.05rem; overflow-wrap:anywhere; }
    .mission-details-status { display:block; margin-top:4px; color:var(--text-muted); font-size:.75rem; }
    .mission-details-close { width:34px; height:34px; flex:0 0 34px; border:1px solid var(--border); border-radius:9px; background:var(--input-bg); color:var(--text-muted); font-size:1.2rem; cursor:pointer; }
    .mission-details-description { margin:18px 0; color:#e4e4e7; font-size:.92rem; line-height:1.55; overflow-wrap:anywhere; }
    .mission-details-meta { display:grid; gap:10px; }
    .mission-details-meta > div { display:grid; gap:4px; padding:12px; border:1px solid var(--border); border-radius:11px; background:var(--input-bg); }
    .mission-details-meta span { color:var(--text-muted); font-size:.72rem; }
    .mission-details-meta strong { font-size:.86rem; line-height:1.45; overflow-wrap:anywhere; }
    .gym-card-title { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 6px; }
    .gym-card-level-cap { color: var(--text-muted); font-size: .72rem; font-weight: 700; white-space: nowrap; }
    .mission-icon { width: 48px; height: 48px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 1.5rem; flex-shrink: 0; }
    .mission-info { flex: 1; min-width: 0; }
    .mission-info h4 { font-size: 0.95rem; font-weight: 600; margin-bottom: 3px; }
    .mission-info p { font-size: 0.8rem; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .mission-right { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; flex-shrink: 0; }
    .mission-accept-button {
      padding: 7px 12px; border: 1px solid rgba(254,215,170,0.4); border-radius: 8px;
      background: linear-gradient(135deg, #f97316, #c2410c); color: #fff;
      font: inherit; font-size: 0.75rem; font-weight: 700; cursor: pointer;
      transition: background 0.15s, transform 0.15s;
    }
    .mission-accept-button:hover { background: linear-gradient(135deg, #fb923c, #f97316); transform: translateY(-1px); }
    .mission-accept-button:focus-visible { outline: 2px solid #fed7aa; outline-offset: 2px; }

    /* ========== BATTLE UI ========== */
    #battleOverlay {
      display: none; position: fixed; inset: 0; z-index: 100;
      background: #0a1628;
      flex-direction: column; align-items: center; justify-content: flex-end;
      padding: 0; overflow: hidden;
    }
    #battleOverlay.active { display: flex; }

    .battle-bg {
      position: absolute; inset: 0; z-index: 0;
      background: linear-gradient(180deg, #1a2744 0%, #2a4a3a 45%, #1a3a2a 100%);
      transition: background 0.4s ease;
    }
    .battle-sky {
      position: absolute; top: 0; left: 0; right: 0; height: 42%;
      background: linear-gradient(180deg, rgba(255,255,255,0.06) 0%, transparent 100%);
      pointer-events: none; z-index: 0;
    }
    .battle-ground {
      position: absolute; left: 0; right: 0; bottom: 28%; height: 28%;
      background: linear-gradient(180deg, transparent 0%, rgba(0,0,0,0.25) 40%, rgba(0,0,0,0.35) 100%);
      z-index: 0; pointer-events: none;
    }

    .battle-field {
      position: relative; width: 100%; max-width: 780px; flex: 1;
      display: flex; flex-direction: column; justify-content: space-between;
      padding: 28px 24px 8px; z-index: 1;
    }

    /* Enemy side */
    .battle-enemy {
      display: flex; justify-content: space-between; align-items: flex-start;
      gap: 20px; padding: 0 6% 0 2%;
    }
    .battle-enemy .enemy-info, .battle-player .player-info {
      background: rgba(12,14,22,0.88); border: 2px solid rgba(255,255,255,0.12);
      border-radius: 14px; padding: 12px 16px; min-width: 200px;
      box-shadow: 0 8px 28px rgba(0,0,0,0.45);
      backdrop-filter: blur(8px);
    }
    .battle-player .player-info { position: relative; }
    .party-ball-row {
      position: absolute; top: -31px; left: 0;
      display: flex; align-items: center; justify-content: center; gap: 3px;
      width: max-content; max-width: calc(100vw - 28px); z-index: 3;
    }
    .party-ball {
      position: relative; display: block; flex: 0 0 auto; width: 30px; height: 30px;
      border: 2px solid #101116; border-radius: 50%;
      background: linear-gradient(to bottom, #ff2635 0 44%, #101116 44% 55%, #f8fafc 55% 100%);
      box-shadow: 0 2px 5px #0008, inset -3px -2px 0 #0002;
    }
    .party-ball::after {
      content: ''; position: absolute; width: 9px; height: 9px; left: 50%; top: 50%;
      transform: translate(-50%,-50%); border: 2px solid #101116; border-radius: 50%;
      background: #f8fafc; box-shadow: inset 0 0 0 2px #fff;
    }
    .party-ball.fainted { filter: grayscale(1); opacity: .42; }
    .enemy-name-row { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-bottom: 2px; }
    .enemy-info .poke-name { font-weight: 700; font-size: 0.95rem; }
    .enemy-info .poke-level { font-size: 0.75rem; color: var(--text-muted); margin-bottom: 6px; }
    .enemy-caught-badge { display: none; width: fit-content; padding: 3px 7px; border-radius: 6px; background: #22c55e22; color: #4ade80; font-size: 0.65rem; font-weight: 700; white-space: nowrap; }
    .hp-bar-wrap { width: 100%; }
    .hp-label { font-size: 0.65rem; color: var(--text-muted); margin-bottom: 3px; display: flex; justify-content: space-between; }
    .hp-bar {
      height: 10px; background: #1a1a22; border-radius: 5px; overflow: hidden;
      border: 1px solid #333;
    }
    .battle-enemy .enemy-info.daily-boss-info {
      width: min(440px, 62vw); min-width: min(440px, 62vw); padding: 15px 20px;
      border-color: rgba(251,191,36,.38); box-shadow: 0 8px 30px rgba(0,0,0,.5), 0 0 20px rgba(245,158,11,.1);
    }
    .daily-boss-info .hp-label span:nth-child(2) { display: none; }
    .daily-boss-info .hp-bar { height: 16px; border-radius: 9px; }
    .daily-boss-info .hp-fill { border-radius: 9px; }
    .daily-boss-shield-wrap { margin-top: 8px; }
    .daily-boss-shield-wrap[hidden] { display: none; }
    .daily-boss-shield-wrap .hp-label { color: #cbd5e1; }
    .daily-boss-shield-bar { height: 12px; overflow: hidden; border: 1px solid #64748b; border-radius: 8px; background: #111827; }
    .daily-boss-shield-fill { width: 100%; height: 100%; border-radius: inherit; background: linear-gradient(90deg,#64748b,#cbd5e1); box-shadow: inset 0 1px rgba(255,255,255,.35); transition: width .35s ease; }
    .xp-bar {
      height: 6px; margin-top: 4px; background: #1a1a22; border-radius: 4px;
      overflow: hidden; border: 1px solid rgba(255,255,255,0.1);
    }
    .xp-fill {
      width: 0; height: 100%; border-radius: inherit;
      background: linear-gradient(90deg, #f97316, #fb923c);
      transition: width 0.45s ease;
    }
    .hp-fill {
      height: 100%; border-radius: 5px; transition: width 0.4s ease, background 0.3s;
      background: var(--hp-green);
    }
    .hp-fill.yellow { background: var(--hp-yellow); }
    .hp-fill.red { background: var(--hp-red); }
    .enemy-sprite {
      width: 140px; height: 140px; object-fit: contain;
      opacity: 1;
      background: transparent !important;
      image-rendering: pixelated;
      image-rendering: crisp-edges;
      filter: drop-shadow(0 6px 12px rgba(0,0,0,0.45));
      transition: transform 0.15s;
    }
    .enemy-sprite.hit { animation: shake 0.3s ease; }
    .enemy-sprite.faint { animation: faintDown 0.6s ease forwards; }
    .enemy-sprite.capturing { opacity: 0; transition: opacity .22s ease; }
    .enemy-sprite.captured { opacity: 0 !important; visibility: hidden; }
    .enemy-sprite.rillaboom-battle-sprite, .enemy-sprite.annihilape-battle-sprite { width: 194px; height: 194px; }

    /* Player side — back sprites already face correct direction (no flip) */
    .battle-player {
      display: flex; justify-content: space-between; align-items: flex-end;
      gap: 16px; padding: 0 2% 0 8%; margin-bottom: 8px;
    }
    .player-sprite {
      width: 160px; height: 160px; object-fit: contain;
      opacity: 1;
      background: transparent !important;
      image-rendering: pixelated;
      image-rendering: crisp-edges;
      filter: drop-shadow(0 6px 12px rgba(0,0,0,0.45));
      transition: transform 0.15s;
    }
    .player-sprite.hit { animation: shakePlayer 0.3s ease; }
    .player-sprite.faint { animation: faintDownPlayer 0.6s ease forwards; }
    .player-sprite.rillaboom-battle-sprite, .player-sprite.annihilape-battle-sprite { width: 218px; height: 218px; }
    .pvp-arena .enemy-sprite.rillaboom-battle-sprite { width: clamp(121px,33.9vw,194px); height: clamp(121px,33.9vw,194px); }
    .pvp-arena .player-sprite.rillaboom-battle-sprite, .pvp-arena .player-sprite.annihilape-battle-sprite { width: clamp(121px,33.9vw,218px); height: clamp(121px,33.9vw,218px); }
    .pvp-arena .enemy-sprite.annihilape-battle-sprite { width: clamp(121px,33.9vw,194px); height: clamp(121px,33.9vw,194px); }
    .sprite-stage { position: relative; display: flex; align-items: flex-end; justify-content: center; }
    .sprite-shadow {
      position: absolute; bottom: 8px; width: 90px; height: 18px;
      background: radial-gradient(ellipse, rgba(0,0,0,0.45) 0%, transparent 70%);
      border-radius: 50%; z-index: 0;
    }
    .enemy-stage .sprite-shadow { width: 100px; bottom: 10px; }
    .player-stage .sprite-shadow { width: 110px; bottom: 12px; }
    .enemy-sprite, .player-sprite { position: relative; z-index: 1; }

    .player-info .poke-name { font-weight: 700; font-size: 0.95rem; margin-bottom: 2px; }
    .player-info .poke-level { font-size: 0.75rem; color: var(--text-muted); margin-bottom: 6px; }
    .battle-level-type-row { display: flex; align-items: center; justify-content: space-between; flex-wrap: nowrap; gap: 6px; width: 100%; margin-bottom: 6px; white-space: nowrap; }
    .battle-level-type-row .poke-level { margin: 0; flex-shrink: 0; }
    .battle-level-type-row .type-badge { margin: 0; }
    .battle-level-type-badges { display: flex; align-items: center; flex-wrap: nowrap; justify-content: flex-end; gap: 4px; min-width: 0; margin-left: auto; }
    .battle-stat-stages { display: none; flex-wrap: wrap; gap: 4px; margin: -2px 0 7px; }
    .battle-stat-stage { display: inline-flex; align-items: center; border-radius: 5px; padding: 2px 5px; font-size: 0.58rem; font-weight: 800; letter-spacing: .01em; line-height: 1.2; }
    .battle-stat-stage.positive { background: #16a34a33; color: #4ade80; }
    .battle-stat-stage.negative { background: #dc262633; color: #f87171; }
    .battle-stat-stage.utility { background: #f9731633; color: #fed7aa; }

    @keyframes shake {
      0%, 100% { transform: translateX(0); }
      20% { transform: translateX(-8px); }
      40% { transform: translateX(8px); }
      60% { transform: translateX(-6px); }
      80% { transform: translateX(6px); }
    }
    @keyframes shakePlayer {
      0%, 100% { transform: translateX(0); }
      20% { transform: translateX(8px); }
      40% { transform: translateX(-8px); }
      60% { transform: translateX(6px); }
      80% { transform: translateX(-6px); }
    }

    /* Battle UI bottom */
    .battle-ui {
      width: 100%; max-width: 700px; background: var(--card);
      border-top: 3px solid var(--primary); border-radius: 20px 20px 0 0;
      padding: 16px 20px 20px; z-index: 2;
      box-shadow: 0 -8px 32px rgba(0,0,0,0.4);
    }
    .battle-log {
      background: var(--input-bg); border: 1px solid var(--border);
      border-radius: 10px; padding: 12px 14px; min-height: 52px;
      font-size: 0.9rem; line-height: 1.4; margin-bottom: 14px;
      color: var(--text); display: flex; align-items: center;
    }
    .battle-volume-control { display:flex; align-items:center; gap:5px; flex:0 0 116px; color:var(--text-muted); font-size:.65rem; }
    .battle-volume-control input { width:66px; height:20px; margin:0; accent-color:var(--primary); cursor:pointer; }
    .battle-volume-control output { min-width:27px; color:var(--text); font-size:.65rem; text-align:right; }
    .battle-actions {
      display: grid; grid-template-columns: 1fr 1fr; gap: 10px;
    }
    .battle-actions.moves-view { grid-template-columns: 1fr 1fr; }
    .battle-btn {
      padding: 14px; border: 2px solid var(--border); border-radius: 12px;
      background: var(--input-bg); color: var(--text); font-size: 0.9rem;
      font-weight: 600; font-family: inherit; cursor: pointer;
      transition: all 0.15s; text-align: center;
    }
    .battle-btn:hover:not(:disabled) { border-color: var(--primary); background: rgba(249,115,22,0.15); transform: translateY(-1px); }
    .battle-btn:disabled { opacity: 0.4; cursor: not-allowed; }
    .battle-btn.fight, .battle-btn.bag, .battle-btn.pokemon, .battle-btn.run {
      border-color:#52525b; background:linear-gradient(180deg,#a1a1aa,#71717a); color:#fff;
      box-shadow:0 4px 0 #3f3f46,0 6px 10px rgba(0,0,0,.28),inset 0 1px rgba(255,255,255,.3);
      transform:translateY(0);
    }
    .battle-btn.fight:hover:not(:disabled), .battle-btn.bag:hover:not(:disabled),
    .battle-btn.pokemon:hover:not(:disabled), .battle-btn.run:hover:not(:disabled) {
      border-color:#71717a; background:linear-gradient(180deg,#b4b4bb,#85858e); color:#fff;
      box-shadow:0 5px 0 #3f3f46,0 8px 13px rgba(0,0,0,.32),inset 0 1px rgba(255,255,255,.36);
      transform:translateY(-1px);
    }
    .battle-btn.fight:active:not(:disabled), .battle-btn.bag:active:not(:disabled),
    .battle-btn.pokemon:active:not(:disabled), .battle-btn.run:active:not(:disabled) {
      box-shadow:0 0 0 #3f3f46,inset 0 3px 6px rgba(0,0,0,.32);
      transform:translateY(4px);
      filter:brightness(.92);
    }

    .move-btn {
      padding: 12px; border: 2px solid var(--border); border-radius: 12px;
      background: var(--input-bg); color: var(--text); font-size: 0.85rem;
      font-weight: 600; font-family: inherit; cursor: pointer;
      transition: all 0.15s; text-align: left; display: flex;
      justify-content: space-between; align-items: center;
    }
    .move-btn[data-move-type] {
      border-color: color-mix(in srgb, var(--move-color) 78%, var(--border));
      background: color-mix(in srgb, var(--move-color) 26%, var(--input-bg));
    }
    .move-btn[data-move-type]:hover:not(:disabled) {
      border-color: var(--move-color);
      background: color-mix(in srgb, var(--move-color) 38%, var(--input-bg));
      box-shadow: 0 0 14px color-mix(in srgb, var(--move-color) 20%, transparent);
    }
    .move-btn:disabled { opacity: 0.4; cursor: not-allowed; }
    .move-type {
      font-size: 0.65rem; padding: 2px 6px; border-radius: 4px;
      font-weight: 700; text-transform: uppercase;
    }
    .move-category {
      display: inline-block; margin-left: 4px; padding: 2px 6px;
      border-radius: 4px; font-size: 0.62rem; font-weight: 700;
      text-transform: uppercase; letter-spacing: 0.02em;
    }
    .move-category-physical { color: #fca5a5; background: rgba(239,68,68,0.16); }
    .move-category-special { color: #93c5fd; background: rgba(59,130,246,0.16); }
    .move-category-status { color: #fed7aa; background: rgba(251,146,60,0.16); }
    .move-category-physical, .move-category-special, .move-category-status {
      width:32px; height:14px; padding:0; border-radius:3px; overflow:hidden;
      color:transparent; font-size:0; vertical-align:middle;
      background-color:transparent; background-position:center; background-repeat:no-repeat; background-size:contain;
    }
    .move-category-physical { background-image:url('battle-category-physical.webp'); }
    .move-category-special { background-image:url('battle-category-special.webp'); }
    .move-category-status { background-image:url('battle-category-status.webp'); }
    .move-power { font-size: 0.7rem; color: var(--text-muted); }
    .move-effectiveness { display:block; margin-top:4px; font-size:.66rem; font-weight:800; }
    .move-effectiveness.super { color:#86efac; }
    .move-effectiveness.resisted { color:#fcd34d; }
    .move-effectiveness.immune { color:#fca5a5; }
    .move-effectiveness.normal { color:var(--text-muted); }
    .move-btn.battle-move-choice {
      position:relative; min-height:78px; flex-direction:column; align-items:stretch; justify-content:center;
      gap:7px; overflow:hidden; padding:10px 12px; text-align:left;
      border-color:color-mix(in srgb,var(--move-color,var(--border)) 62%,#74746a);
      background:linear-gradient(145deg,color-mix(in srgb,var(--move-color,#777) 15%,#292a27),#20211f 72%);
      box-shadow:inset 0 1px rgba(255,255,255,.12),0 2px 0 rgba(0,0,0,.35);
    }
    .battle-move-heading { display:flex; align-items:center; gap:7px; min-width:0; }
    .battle-move-heading strong { min-width:0; flex:1 1 auto; overflow:hidden; color:#f8fafc; font-size:.86rem; font-weight:800; text-overflow:ellipsis; white-space:nowrap; }
    .battle-move-heading .move-type { flex:0 0 auto; margin:0; padding:2px 7px; border-radius:999px; background:var(--move-color,#71717a); color:#111827; font-size:.58rem; letter-spacing:.04em; text-shadow:0 1px rgba(255,255,255,.25); }
    .battle-move-pp { grid-column:2; grid-row:1; color:#f4f4f5; font-size:.76rem; font-weight:800; font-variant-numeric:tabular-nums; white-space:nowrap; }
    .battle-move-details { display:grid; grid-template-columns:32px minmax(0,1fr); align-items:center; gap:3px 8px; min-width:0; }
    .battle-move-details .move-category { grid-column:1; grid-row:1; margin:0; }
    .battle-move-details .move-effectiveness { grid-column:2; grid-row:2; margin:0; }
    .move-btn.battle-move-choice:hover:not(:disabled) {
      border-color:var(--move-color,#a1a1aa);
      background:linear-gradient(145deg,color-mix(in srgb,var(--move-color,#777) 24%,#333430),#242522 72%);
    }

    .battle-result-overlay {
      display: none; position: fixed; inset: 0; z-index: 10;
      align-items: center; justify-content: center; padding: 16px;
    }
    .battle-result-overlay.show { display: flex; animation: battleResultFadeIn 0.2s ease-out both; }
    .battle-result-backdrop {
      position: absolute; inset: 0;
      background: rgba(5, 6, 12, 0.78); backdrop-filter: blur(4px);
    }
    .battle-result {
      position: relative; z-index: 1; width: min(680px, 100%);
      max-height: calc(100dvh - 32px); overflow-y: auto;
      text-align: center; padding: 26px 24px 22px; background: linear-gradient(155deg, color-mix(in srgb, var(--card) 94%, var(--primary)), var(--card) 42%);
      border: 1px solid color-mix(in srgb, var(--primary) 36%, var(--border)); border-radius: 20px;
      box-shadow: 0 24px 80px rgba(0, 0, 0, 0.58), 0 0 32px var(--primary-glow);
      animation: battleResultPopIn 0.28s cubic-bezier(.2,.8,.2,1) both;
    }
    .battle-result::before {
      content: ""; position: absolute; top: 0; left: 18%; right: 18%; height: 3px;
      border-radius: 0 0 999px 999px; background: linear-gradient(90deg, transparent, var(--primary-hover), transparent);
    }
    .battle-result-kicker { display: block; margin-bottom: 6px; color: var(--primary-hover); font-size: .68rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
    .battle-result h3 { font-size: clamp(1.35rem, 4vw, 1.65rem); line-height: 1.2; margin-bottom: 7px; }
    .battle-result p { color: var(--text-muted); margin-bottom: 18px; font-size: 0.92rem; }
    .battle-result .rewards {
      display: grid; gap: 8px; text-align: left;
      background: var(--input-bg); border: 1px solid var(--border);
      border-radius: 14px; padding: 12px 14px; margin-bottom: 18px; font-size: 0.9rem;
      box-shadow: inset 0 1px rgba(255,255,255,.025);
    }
    .reward-row {
      display: flex; align-items: center; justify-content: space-between; gap: 12px;
      min-height: 28px; padding: 5px 7px; border-bottom: 1px solid var(--border);
    }
    .reward-row:last-child { border-bottom: 0; }
    .reward-label { color: var(--text-muted); }
    .reward-value { color: var(--text); text-align: right; font-weight: 700; }
    .reward-money .reward-value { color: #fbbf24; }
    .reward-xp .reward-value { color: #fb923c; }
    .reward-ev { display: grid; grid-template-columns: 1fr; justify-items: end; gap: 2px; }
    .reward-ev .reward-label { font-size: .74rem; line-height: 1.15; }
    .reward-ev .reward-value { color: #4ade80; }
    .reward-highlight { color: var(--success); font-weight: 700; padding: 3px 7px; }
    .reward-level-up { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) 180px; padding: 7px; color: var(--success); }
    .reward-level-up-main { grid-column: 1 / -1; grid-row: 1; display: grid; justify-items: center; align-content: start; padding-bottom: 42px; text-align: center; }
    .reward-level-up-main strong { font-size: 1rem; }
    .reward-level-up img { width: 120px; height: 120px; object-fit: contain; image-rendering: pixelated; }
    .reward-level-up-copy { color: var(--text-muted); font-size: .9rem; }
    .reward-level-ev { grid-column: 2; grid-row: 1; z-index: 1; align-self: end; display: grid; justify-items: end; gap: 2px; padding-bottom: 2px; }
    .reward-level-ev .reward-label { font-size: .74rem; line-height: 1.15; }
    .reward-level-ev .reward-value { color: #4ade80; }
    @keyframes battleResultFadeIn { from { opacity: 0; } to { opacity: 1; } }
    @keyframes battleResultPopIn { from { opacity: 0; transform: translateY(12px) scale(.97); } to { opacity: 1; transform: translateY(0) scale(1); } }
    @media (prefers-reduced-motion: reduce) {
      .battle-result-overlay.show, .battle-result { animation: none; }
    }
    @media (max-width: 480px) {
      .battle-result .rewards { padding: 9px; }
      .reward-row { align-items: flex-start; flex-wrap: wrap; }
      .reward-value { overflow-wrap: anywhere; }
      .reward-level-up { grid-template-columns: minmax(0, 1fr); }
      .reward-level-up-main { grid-column: 1; grid-row: 1; padding-bottom: 8px; }
      .reward-level-ev { grid-column: 1; grid-row: 2; justify-self: end; }
    }

    @media (max-width: 768px) {
      .content { padding: 20px 16px; }
      .welcome-banner { flex-direction: column; text-align: center; }
      .topbar-stats { display: none; }
      .topbar { padding: 10px 14px; gap: 8px; }
      .topbar-actions { gap: 7px; }
      .topbar-profile { min-width: 0; max-width: min(142px, 34vw); padding: 5px 8px; gap: 7px; border-radius: 13px; }
      .topbar-brand { gap: 7px; }
      .topbar-brand-mark { width:32px; height:32px; }
      .topbar-brand-name { font-size: .9rem; }
      .topbar-profile .player-avatar { width: 30px; height: 30px; font-size: .95rem; }
      .topbar-profile .player-meta { display: block; margin-top: 2px; font-size: .61rem; line-height: 1.1; }
      .topbar-profile .player-name { max-width: 86px; font-size: .78rem; }
      .topbar-logout { padding: 7px 9px; font-size: .76rem; }
      .cards-grid { grid-template-columns: 1fr; }
      .battle-field { padding: 22px 12px 8px; }
      .enemy-sprite { width: clamp(82px, 23vw, 100px); height: clamp(82px, 23vw, 100px); }
      .enemy-sprite.rillaboom-battle-sprite, .enemy-sprite.annihilape-battle-sprite { width: clamp(100px, 29vw, 145px); height: clamp(100px, 29vw, 145px); }
      .player-sprite { width: clamp(90px, 26vw, 110px); height: clamp(90px, 26vw, 110px); }
      .player-sprite.rillaboom-battle-sprite, .player-sprite.annihilape-battle-sprite { width: clamp(110px, 32vw, 155px); height: clamp(110px, 32vw, 155px); }
      .battle-enemy { gap: 6px; padding: 0 2%; }
      .battle-player { padding-left: 4%; }
      .battle-enemy .enemy-info, .battle-player .player-info { min-width: 140px; padding: 8px 10px; }
      .battle-enemy.daily-boss-enemy { display: grid; grid-template-columns: minmax(0, 1fr) clamp(100px, 30vw, 160px); align-items: start; gap: 8px; padding: 0; }
      .battle-enemy.daily-boss-enemy .enemy-info.daily-boss-info { justify-self: start; width: min(100%, 200px); min-width: 0; max-width: 100%; padding: 8px 10px; }
      .battle-enemy.daily-boss-enemy .daily-boss-info .hp-label span:nth-child(2) { display: none; }
      .battle-enemy.daily-boss-enemy .daily-boss-info .hp-bar { height: 10px; border-radius: 5px; }
      .battle-enemy.daily-boss-enemy .daily-boss-shield-wrap { margin-top: 4px; }
      .battle-enemy.daily-boss-enemy .daily-boss-shield-bar { height: 10px; border-radius: 5px; }
      .battle-enemy.daily-boss-enemy .enemy-stage { width: clamp(100px, 30vw, 160px); max-width: 100%; justify-self: center; }
      .party-ball-row { gap: 2px; top: -24px; }
      .party-ball { width: 22px; height: 22px; border-width: 1.5px; }
      .party-ball::after { width: 7px; height: 7px; border-width: 1.5px; }
    }
    @media (min-width: 769px) and (max-width: 1024px) {
      .battle-enemy.daily-boss-enemy { display: grid; grid-template-columns: minmax(0, 1fr) clamp(100px, 30vw, 160px); align-items: start; gap: 8px; padding: 0; }
      .battle-enemy.daily-boss-enemy .enemy-info.daily-boss-info { justify-self: start; width: min(100%, 200px); min-width: 0; max-width: 100%; padding: 8px 10px; }
      .battle-enemy.daily-boss-enemy .enemy-stage { width: clamp(100px, 30vw, 160px); max-width: 100%; justify-self: center; }
    }
    @media (max-width: 360px) {
      .topbar { padding-left: 8px; padding-right: 8px; }
      .topbar-brand-name { font-size: .76rem; }
      .topbar-profile { max-width: 105px; padding: 4px 5px; gap: 5px; }
      .topbar-profile .player-name { max-width: 54px; font-size: .72rem; }
      .topbar-logout { padding: 6px 7px; font-size: .7rem; }
    }
    @media (max-width: 480px) {
      .location-badge { display: none; }
      .card { padding: 32px 20px 26px; }
      .social { flex-direction: column; }
      .starters-grid { gap: 8px; }
      .starter-img-wrap, .starter-img { width: 60px; height: 60px; }
      .toast { left: 16px; right: 16px; max-width: none; }
      .battle-actions { grid-template-columns: 1fr 1fr; gap: 8px; }
      .battle-btn, .move-btn { padding: 10px; font-size: 0.8rem; }
    }

    /* Type badges expanded */
    .type-normal { background: #a8a87833; color: #c6c6a8; }
    .type-fogo { background: #f0803033; color: #f5ac78; }
    .type-agua { background: #6890f033; color: #9db7f5; }
    .type-planta { background: #78c85033; color: #a7db8d; }
    .type-eletrico { background: #f8d03033; color: #fae078; }
    .type-gelo { background: #98d8d833; color: #bce6e6; }
    .type-lutador { background: #c0302833; color: #d67873; }
    .type-veneno { background: #a040a033; color: #c183c1; }
    .type-terra { background: #e0c06833; color: #ead69d; }
    .type-voador { background: #a890f033; color: #c6b7f5; }
    .type-psiquico { background: #f8588833; color: #fa92b2; }
    .type-inseto { background: #a8b82033; color: #c6d16e; }
    .type-pedra { background: #b8a03833; color: #d1c17d; }
    .type-fantasma { background: #70589833; color: #a292bc; }
    .type-dragao { background: #7038f833; color: #a27dfa; }
    .type-sombrio { background: #70584833; color: #b6a090; }
    .type-aco { background: #b8b8d033; color: #d1d1e0; }
    .type-fada { background: #ee99ac33; color: #f4b6c2; }
    .type-planta-veneno { background: #a855f733; color: #c084fc; }
    .type-planta-voador { background: #84cc1633; color: #a3e635; }

    /* Battle animations */
    .enemy-sprite.attack-anim {
      animation: enemyAttack 0.45s ease;
    }
    .player-sprite.attack-anim {
      animation: playerAttack 0.45s ease;
    }
    .player-sprite.protect-glow, .enemy-sprite.protect-glow { animation: protectGlow 1s ease-in-out; }
    .player-sprite.stat-boost-glow, .enemy-sprite.stat-boost-glow { animation: statBoostGlow 1.05s ease-in-out; }
    @keyframes protectGlow {
      0%, 100% { filter: drop-shadow(0 6px 12px rgba(0,0,0,.45)) brightness(1); }
      35%, 70% { filter: drop-shadow(0 0 18px #fdba74) drop-shadow(0 0 7px #fff) brightness(1.65); }
    }
    @keyframes statBoostGlow {
      0%, 100% { filter: drop-shadow(0 6px 12px rgba(0,0,0,.45)) brightness(1); }
      30%, 65% { filter: drop-shadow(0 0 22px #fdba74) drop-shadow(0 0 10px #fff) brightness(1.75); }
    }
    @keyframes enemyAttack {
      0% { transform: translate(0,0); }
      40% { transform: translate(-40px, 12px); }
      100% { transform: translate(0,0); }
    }
    @keyframes playerAttack {
      0% { transform: translate(0,0); }
      40% { transform: translate(40px, -12px); }
      100% { transform: translate(0,0); }
    }
    /* Hit flash without leaving opacity stuck */
    .enemy-sprite.hit, .player-sprite.hit {
      animation: flashHit 0.35s ease;
    }
    @keyframes flashHit {
      0%, 100% { filter: drop-shadow(0 6px 12px rgba(0,0,0,0.45)) brightness(1); }
      25% { filter: drop-shadow(0 0 8px #fff) brightness(1.8); }
      50% { filter: drop-shadow(0 6px 12px rgba(0,0,0,0.45)) brightness(1); }
      75% { filter: drop-shadow(0 0 8px #f44) brightness(1.4); }
    }
    @keyframes faintDown {
      from { opacity: 1; transform: translateY(0) scale(1); }
      to { opacity: 0; transform: translateY(40px) scale(0.8); }
    }
    @keyframes faintDownPlayer {
      from { opacity: 1; transform: translateY(0) scale(1); }
      to { opacity: 0; transform: translateY(40px) scale(0.8); }
    }

    /* Damage number */
    .dmg-float {
      position: absolute;
      font-weight: 800;
      font-size: 1.4rem;
      color: #fff;
      text-shadow: 0 2px 4px #000, 0 0 8px #f44;
      pointer-events: none;
      z-index: 20;
      animation: floatUp 0.9s ease forwards;
    }
    .dmg-float.heal {
      color: #4ade80;
      text-shadow: 0 2px 4px #000, 0 0 8px #22c55e;
    }
    .dmg-float.super {
      color: #fbbf24;
      font-size: 1.6rem;
      text-shadow: 0 2px 4px #000, 0 0 10px #f59e0b;
    }
    .dmg-float.resist {
      color: #94a3b8;
      font-size: 1.1rem;
    }
    @keyframes floatUp {
      0% { opacity: 1; transform: translateY(0) scale(1); }
      100% { opacity: 0; transform: translateY(-50px) scale(1.2); }
    }

    /* Capture ball */
    .capture-ball {
      position: absolute;
      width: 46px; height: 46px;
      border-radius: 50%;
      background: linear-gradient(to bottom, var(--ball-top, #ef4444) 0 43%, #15151b 43% 56%, var(--ball-bottom, #fff) 56% 100%);
      border: 2px solid #101116;
      box-shadow: inset -5px -5px 0 rgba(0,0,0,.16), inset 2px 2px 0 rgba(255,255,255,.28), 0 7px 16px rgba(0,0,0,.55), 0 0 0 0 var(--ball-glow, rgba(239,68,68,.4));
      z-index: 15;
      transform-origin: center;
      animation: ballThrow .68s cubic-bezier(.2,.78,.25,1) forwards;
    }
    .capture-ball::after {
      content: '';
      position: absolute;
      top: 50%; left: 50%;
      width: 13px; height: 13px;
      background: #fff;
      border: 3px solid #15151b;
      border-radius: 50%;
      transform: translate(-50%, -50%);
      box-shadow: 0 0 0 2px rgba(255,255,255,.42), inset 0 -2px 0 rgba(0,0,0,.14);
    }
    .capture-ball::before {
      content: ''; position: absolute; inset: -7px; border: 2px solid var(--ball-glow, rgba(239,68,68,.4));
      border-radius: 50%; opacity: 0; transform: scale(.6); pointer-events: none;
    }
    @keyframes ballThrow {
      0% { transform: translate(-130px, 155px) scale(.35) rotate(-240deg); opacity: 0; }
      18% { opacity: 1; }
      78% { transform: translate(-8px, 8px) scale(1.08) rotate(12deg); opacity: 1; }
      100% { transform: translate(0, 0) scale(1) rotate(0); opacity: 1; }
    }
    @keyframes ballShake {
      0%, 100% { transform: translateX(0) rotate(0) scale(1); }
      20% { transform: translateX(-7px) rotate(-18deg) scale(1.04); }
      40% { transform: translateX(7px) rotate(18deg) scale(1.04); }
      60% { transform: translateX(-5px) rotate(-12deg) scale(1.02); }
      80% { transform: translateX(5px) rotate(12deg) scale(1.02); }
    }
    .capture-ball.caught {
      animation: ballCatch .65s ease forwards;
    }
    .capture-ball.caught::before {
      animation: ballCapturePulse .65s ease-out forwards;
    }
    @keyframes ballCatch {
      0% { transform: scale(1); filter: brightness(1); }
      35% { transform: scale(1.18); filter: brightness(1.7); box-shadow: 0 0 26px 8px var(--ball-glow); }
      100% { transform: scale(.92); filter: brightness(1.1); box-shadow: 0 0 12px 2px var(--ball-glow); }
    }
    @keyframes ballCapturePulse {
      0% { opacity: 0; transform: scale(.55); }
      35% { opacity: .9; }
      100% { opacity: 0; transform: scale(1.55); }
    }

    /* Effectiveness text */
    .eff-text {
      font-weight: 700;
      font-size: 0.85rem;
    }
    .eff-super { color: #fbbf24; }
    .eff-resist { color: #94a3b8; }
    .eff-immune { color: #f87171; }

    .battle-enemy, .battle-player {
      position: relative;
    }


    /* Evolution */
    #evoOverlay {
      display: none; position: fixed; inset: 0; z-index: 150;
      background: radial-gradient(circle at 50% 40%, #2a1a4a 0%, #0b0b0f 70%);
      flex-direction: column; align-items: center; justify-content: center;
      padding: 24px;
    }
    #evoOverlay.active { display: flex; }
    .evo-stage {
      text-align: center; animation: fadeUp 0.4s ease;
    }
    .evo-sprite-wrap {
      width: 180px; height: 180px; margin: 0 auto 20px;
      display: flex; align-items: center; justify-content: center;
      position: relative;
    }
    .evo-sprite {
      width: 160px; height: 160px; object-fit: contain;
      filter: drop-shadow(0 0 24px rgba(167, 139, 250, 0.6));
      transition: transform 0.5s, filter 0.5s, opacity 0.5s;
    }
    .evo-sprite.glow {
      animation: evoGlow 0.8s ease infinite alternate;
    }
    @keyframes evoGlow {
      from { filter: drop-shadow(0 0 12px #fdba74) brightness(1); transform: scale(1); }
      to { filter: drop-shadow(0 0 40px #fed7aa) brightness(1.4); transform: scale(1.08); }
    }
    .evo-sprite.flash {
      animation: evoFlash 0.15s ease 6;
    }
    @keyframes evoFlash {
      0%, 100% { opacity: 1; filter: brightness(1); }
      50% { opacity: 0.3; filter: brightness(3); }
    }
    .evo-title {
      font-size: 1.5rem; font-weight: 700; margin-bottom: 8px;
      background: linear-gradient(90deg, #fdba74, #fb923c);
      -webkit-background-clip: text; -webkit-text-fill-color: transparent;
      background-clip: text;
    }
    .evo-sub { color: var(--text-muted); font-size: 0.95rem; margin-bottom: 20px; }
    .evo-stats {
      background: var(--card); border: 1px solid var(--border);
      border-radius: 14px; padding: 16px 24px; margin-bottom: 20px;
      font-size: 0.9rem; text-align: left; min-width: 260px;
    }
    .evo-stats div { padding: 4px 0; display: flex; justify-content: space-between; gap: 24px; }


    /* Pokémon Summary Modal */
    #summaryOverlay {
      display: none; position: fixed; inset: 0; z-index: 120;
      background: rgba(0,0,0,0.75); align-items: center; justify-content: center;
      padding: 20px;
    }
    #summaryOverlay.active { display: flex; }
    #heldItemPickerOverlay {
      display: none; position: fixed; inset: 0; z-index: 140; padding: 20px;
      background: rgba(0,0,0,0.82); align-items: center; justify-content: center;
    }
    #heldItemPickerOverlay.active { display: flex; }
    #gymLevelCapOverlay {
      display: none; position: fixed; inset: 0; z-index: 160; padding: 20px;
      background: rgba(5, 7, 16, .82); backdrop-filter: blur(8px);
      align-items: center; justify-content: center;
    }
    #gymLevelCapOverlay.active { display: flex; }
    #progressionNoticeOverlay { display:none; position:fixed; inset:0; z-index:220; padding:20px; background:rgba(5,7,16,.82); backdrop-filter:blur(8px); align-items:center; justify-content:center; }
    #progressionNoticeOverlay.active { display:flex; }
    .progression-notice-card { width:min(440px,100%); padding:24px; color:var(--text); background:radial-gradient(ellipse at top right,rgba(248,113,113,.14),transparent 58%),var(--card); border:1px solid rgba(248,113,113,.35); border-radius:20px; box-shadow:0 24px 80px rgba(0,0,0,.58); text-align:center; }
    .progression-notice-icon { width:54px; height:54px; display:grid; place-items:center; margin:0 auto 13px; border:1px solid rgba(248,113,113,.28); border-radius:16px; background:rgba(239,68,68,.14); font-size:1.7rem; }
    .progression-notice-card h2 { margin:0 0 8px; font-size:1.2rem; }
    .progression-notice-card p { margin:0; color:var(--text-muted); font-size:.95rem; line-height:1.55; }
    .progression-notice-card .btn { width:100%; margin:20px 0 0; }
    #dojoRewardOverlay { display:none; position:fixed; inset:0; z-index:170; padding:20px; background:rgba(5,7,16,.84); backdrop-filter:blur(8px); align-items:center; justify-content:center; }
    #dojoRewardOverlay.active { display:flex; }
    .dojo-reward-card { width:min(520px,100%); padding:24px; color:var(--text); background:radial-gradient(ellipse at top right,rgba(249,115,22,.18),transparent 58%),var(--card); border:1px solid rgba(253,186,116,.32); border-radius:20px; box-shadow:0 24px 80px rgba(0,0,0,.55); }
    .dojo-reward-card h2 { margin:0 0 8px; font-size:1.2rem; }
    .dojo-reward-card p { margin:0 0 18px; color:var(--text-muted); font-size:.88rem; line-height:1.5; }
    .dojo-reward-options { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; }
    .dojo-reward-option { min-width:0; display:flex; flex-direction:column; align-items:center; gap:8px; padding:16px 10px; color:var(--text); background:rgba(255,255,255,.035); border:1px solid var(--border); border-radius:15px; cursor:pointer; font:inherit; }
    .dojo-reward-option:hover { border-color:#fdba74; background:rgba(249,115,22,.12); }
    .dojo-reward-option img { width:96px; height:96px; object-fit:contain; image-rendering:pixelated; }
    .dojo-reward-option strong { font-size:.92rem; }
    .dojo-reward-option small { color:var(--text-muted); font-size:.73rem; }
    @media(max-width:420px) { .dojo-reward-card { padding:18px; } .dojo-reward-option img { width:76px;height:76px; } }
    #dailyLoginOverlay { display:none; position:fixed; inset:0; z-index:190; padding:20px; background:rgba(5,7,16,.86); backdrop-filter:blur(9px); align-items:center; justify-content:center; }
    #dailyLoginOverlay.active { display:flex; }
    .daily-login-card { width:min(540px,100%); max-height:90vh; overflow:auto; padding:24px; color:var(--text); background:radial-gradient(ellipse at top right,rgba(245,158,11,.18),transparent 58%),var(--card); border:1px solid rgba(251,191,36,.34); border-radius:20px; box-shadow:0 24px 80px rgba(0,0,0,.6); }
    .daily-login-heading { display:flex; align-items:center; gap:14px; margin-bottom:16px; }
    .daily-login-emblem { width:54px; height:54px; flex:0 0 54px; display:grid; place-items:center; border-radius:16px; background:rgba(245,158,11,.14); font-size:1.8rem; }
    .daily-login-heading h2 { margin:0 0 4px; font-size:1.2rem; }
    .daily-login-heading p,.daily-login-note { margin:0; color:var(--text-muted); font-size:.84rem; line-height:1.5; }
    .daily-login-streak { padding:11px 13px; margin:14px 0; border:1px solid var(--border); border-radius:12px; background:rgba(255,255,255,.035); font-weight:700; }
    .daily-login-reward { display:flex; align-items:center; gap:12px; padding:14px; margin-bottom:14px; border:1px solid rgba(251,191,36,.24); border-radius:14px; background:rgba(245,158,11,.08); }
    .daily-login-reward-icon { width:56px; height:56px; flex:0 0 56px; display:flex; align-items:center; justify-content:center; gap:2px; }
    .daily-login-reward-icon img { width:42px; height:42px; object-fit:contain; image-rendering:pixelated; }
    .daily-login-reward strong { display:block; }
    .daily-login-reward small { display:block; margin-top:3px; color:var(--text-muted); }
    .daily-login-week { display:grid; grid-template-columns:repeat(7,minmax(0,1fr)); gap:6px; margin:14px 0; }
    .daily-login-day { min-width:0; padding:7px 2px; text-align:center; border:1px solid var(--border); border-radius:10px; color:var(--text-muted); font-size:.62rem; }
    .daily-login-day.active { color:#fde68a; border-color:rgba(251,191,36,.55); background:rgba(245,158,11,.12); }
    .daily-login-day.claimed { color:#86efac; border-color:rgba(34,197,94,.3); background:rgba(34,197,94,.08); }
    .daily-login-day.upcoming { opacity:.72; }
    .daily-login-day-icons { display:flex; align-items:center; justify-content:center; height:25px; gap:1px; }
    .daily-login-day-icons img { width:22px; height:22px; object-fit:contain; image-rendering:pixelated; }
    .daily-login-day-icons > span { font-size:21px; line-height:1; }
    .daily-login-day strong { display:block; margin-top:4px; overflow-wrap:anywhere; font-size:.62rem; }
    .daily-login-actions { display:flex; gap:10px; margin-top:16px; }
    .daily-login-actions .btn { margin:0; }
    @media(max-width:420px) { .daily-login-card { padding:18px; } .daily-login-week { gap:4px; } .daily-login-day { font-size:.62rem; } }
    .profile-overview-grid { display:grid; grid-template-columns:minmax(0,1fr); align-items:stretch; gap:16px; width:100%; }
    #profileBox { display:contents !important; }
    .trainer-card { --tc-ink:var(--text); --tc-muted:var(--text-muted); width:100%; margin:18px 0 20px; padding:9px; border:1px solid rgba(249,115,22,.48); border-radius:18px; background:radial-gradient(ellipse at 50% 0,rgba(249,115,22,.13),transparent 55%),linear-gradient(145deg,#191622,#111018); color:var(--tc-ink); box-shadow:0 16px 42px rgba(0,0,0,.28),0 0 24px rgba(249,115,22,.08),inset 0 1px rgba(255,255,255,.05); }
    .trainer-card-header { min-height:44px; display:flex; align-items:center; justify-content:space-between; gap:12px; padding:9px 15px; border:1px solid rgba(253,186,116,.4); border-radius:11px; background:linear-gradient(100deg,#f97316,#fb923c 55%,#f97316); color:#faf5ff; }
    .trainer-card-header strong { font-size:1rem; letter-spacing:.015em; }
    .trainer-card-header span { font-size:.76rem; font-weight:700; }
    .trainer-card-grid { display:grid; grid-template-columns:minmax(200px,.8fr) minmax(350px,1.65fr) minmax(205px,.72fr); gap:10px; margin-top:9px; }
    .trainer-card-panel { min-width:0; padding:12px; border:1px solid rgba(249,115,22,.22); border-radius:12px; background:rgba(20,20,28,.82); }
    .trainer-card-section-title { margin:0 0 9px; padding:5px 9px; border-radius:7px; background:rgba(249,115,22,.16); color:#fdba74; text-align:center; font-size:.77rem; font-weight:800; letter-spacing:.06em; text-transform:uppercase; }
    .trainer-card-identity { display:flex; align-items:center; gap:11px; min-width:0; }
    .trainer-card-profile-trigger { width:100%; display:flex; align-items:center; gap:11px; padding:0; border:0; background:transparent; color:inherit; text-align:left; cursor:pointer; }
    .trainer-card-profile-trigger:focus-visible { outline:2px solid #f97316; outline-offset:4px; border-radius:10px; }
    .trainer-card-profile-hint { margin-top:4px; color:var(--tc-muted); font-size:.68rem; }
    .trainer-avatar-dialog { width:min(440px,calc(100vw - 28px)); max-width:none; max-height:min(90vh,680px); padding:0; overflow:auto; border:1px solid var(--border); border-radius:18px; background:var(--card); color:var(--text); box-shadow:0 24px 80px rgba(0,0,0,.65),0 0 32px rgba(249,115,22,.16); }
    .trainer-avatar-dialog::backdrop { background:rgba(5,4,10,.74); backdrop-filter:blur(4px); }
    .trainer-avatar-dialog-inner { padding:18px 24px 24px; }
    .trainer-avatar-dialog-header { display:flex; align-items:center; justify-content:space-between; gap:12px; }
    .trainer-avatar-dialog-header h2 { margin:0; font-size:1rem; }
    .trainer-avatar-dialog-close { width:34px; height:34px; border:1px solid var(--border); border-radius:9px; background:var(--input-bg); color:var(--text-muted); font-size:1.15rem; cursor:pointer; }
    @media(max-width:480px) { .trainer-avatar-dialog-inner { padding:16px; } }
    .trainer-card-avatar { width:72px; height:72px; flex:0 0 72px; display:grid; place-items:center; overflow:hidden; border:1px solid var(--border); border-radius:12px; background:#0e0e14; }
    .trainer-card-avatar img { width:100%; height:100%; object-fit:contain; image-rendering:pixelated; }
    .trainer-card-name { overflow:hidden; color:var(--text); font-size:1.05rem; font-weight:800; text-overflow:ellipsis; white-space:nowrap; }
    .trainer-card-id,.trainer-card-level { margin-top:3px; color:var(--tc-muted); font-size:.72rem; }
    .trainer-card-money { display:inline-flex; margin-top:6px; padding:4px 8px; border:1px solid rgba(249,115,22,.25); border-radius:7px; background:rgba(249,115,22,.15); color:#fdba74; font-size:.75rem; font-weight:800; }
    .trainer-card-active-pokemon { display:flex; align-items:center; gap:8px; margin-top:11px; padding:7px 9px; border-top:1px solid rgba(255,255,255,.08); color:var(--tc-muted); font-size:.7rem; }
    .trainer-card-active-pokemon img { width:32px; height:32px; object-fit:contain; image-rendering:pixelated; }
    .trainer-card-active-pokemon strong { overflow:hidden; color:var(--text); font-size:.75rem; text-overflow:ellipsis; white-space:nowrap; }
    .trainer-card-region-tabs { display:flex; gap:6px; margin:0 0 9px; }
    .trainer-card-region-tab { flex:1; min-width:0; padding:7px 8px; border:1px solid var(--border); border-radius:8px; background:#101017; color:var(--text-muted); text-align:center; font-size:.73rem; font-weight:700; }
    .trainer-card-region-tab.active { border-color:#f97316; background:var(--primary); box-shadow:0 0 0 2px rgba(249,115,22,.24); color:#fff; }
    .trainer-card-region-tab:disabled { cursor:not-allowed; opacity:.62; }
    .trainer-card-badges { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:5px; }
    .trainer-card-badge { min-width:0; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:2px; padding:4px 2px 5px; border-radius:8px; text-align:center; }
    .trainer-card-badge.locked { opacity:.42; filter:grayscale(1); }
    .trainer-card-badge-icon { width:45px; height:45px; background-image:url('../assets/gym-badges.png'); background-repeat:no-repeat; background-size:400% 200%; filter:drop-shadow(0 2px 2px rgba(72,55,27,.2)); }
    .trainer-card-badge strong { max-width:100%; overflow:hidden; color:#e4d4ff; font-size:.66rem; text-overflow:ellipsis; white-space:nowrap; }
    .trainer-card-badge small { color:#fed7aa; font-size:.58rem; font-weight:700; }
    .trainer-card-info-list { display:grid; gap:6px; }
    .trainer-card-info-row { display:flex; justify-content:space-between; align-items:center; gap:8px; color:var(--tc-muted); font-size:.69rem; }
    .trainer-card-info-row strong { color:var(--text); font-size:.72rem; text-align:right; }
    .trainer-card-dex { margin-top:9px; padding-top:8px; border-top:1px solid rgba(255,255,255,.08); }
    .trainer-card-dex-head { display:flex; justify-content:space-between; gap:8px; margin-bottom:6px; color:var(--tc-muted); font-size:.68rem; }
    .trainer-card-dex-head strong { color:var(--text); }
    .trainer-card-dex-track { height:7px; overflow:hidden; border-radius:99px; background:#292837; }
    .trainer-card-dex-fill { height:100%; border-radius:inherit; background:linear-gradient(90deg,#f97316,#f97316); transition:width .25s ease; }
    @media(max-width:900px) { .trainer-card-grid { grid-template-columns:minmax(0,1fr) minmax(0,1.55fr); } .trainer-card-info-panel { grid-column:1/-1; } .trainer-card-info-list { grid-template-columns:repeat(3,minmax(0,1fr)); } }
    @media(max-width:560px) { .trainer-card { padding:6px; border-radius:14px; } .trainer-card-header { display:grid; grid-template-columns:minmax(0,1fr) auto; padding:8px 10px; gap:4px 8px; } .trainer-card-header strong { font-size:.86rem; } .trainer-card-header span { font-size:.65rem; } .trainer-card-header span:last-child { grid-column:1/-1; } .trainer-card-grid { grid-template-columns:minmax(0,1fr); } .trainer-card-info-panel { grid-column:auto; } .trainer-card-info-list { grid-template-columns:repeat(2,minmax(0,1fr)); } .trainer-card-identity-panel { display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:center; } .trainer-card-identity-panel .trainer-card-section-title,.trainer-card-profile-trigger { grid-column:1/-1; } .trainer-card-active-pokemon { margin:0; padding:0 0 0 8px; border-top:0; border-left:1px solid rgba(255,255,255,.08); } .trainer-card-active-pokemon-label { display:none; } .trainer-card-badge-icon { width:42px; height:42px; } }
    .weekly-login-panel { position:relative; min-width:0; overflow:hidden; padding:22px; border:1px solid rgba(249,115,22,.28); border-radius:18px; background:radial-gradient(ellipse at 100% 0,rgba(249,115,22,.16),transparent 42%),linear-gradient(145deg,#181725,#12131c 68%); box-shadow:0 14px 38px rgba(0,0,0,.2); }
    .weekly-login-panel::after { content:'7'; position:absolute; top:-35px; right:12px; color:rgba(249,115,22,.035); font-size:12rem; line-height:1; font-weight:900; pointer-events:none; }
    .weekly-login-heading { position:relative; z-index:1; display:flex; align-items:center; gap:13px; margin-bottom:16px; }
    .weekly-login-emblem { width:48px; height:48px; flex:0 0 48px; display:grid; place-items:center; border:1px solid rgba(249,115,22,.38); border-radius:14px; background:linear-gradient(145deg,rgba(249,115,22,.2),rgba(249,115,22,.06)); box-shadow:inset 0 1px rgba(255,255,255,.08); font-size:1.45rem; }
    .weekly-login-heading h3 { margin:0 0 4px; font-size:1.08rem; letter-spacing:.01em; }
    .weekly-login-heading p { margin:0; color:var(--text-muted); font-size:.78rem; }
    .weekly-login-heading::after { content:'7 DIAS'; margin-left:auto; padding:6px 9px; border:1px solid rgba(249,115,22,.28); border-radius:999px; background:rgba(249,115,22,.1); color:#fdba74; font-size:.65rem; font-weight:800; letter-spacing:.08em; }
    .weekly-login-status { position:relative; z-index:1; display:flex; align-items:center; gap:10px; padding:11px 13px; margin:12px 0 13px; border:1px solid rgba(249,115,22,.22); border-radius:12px; background:rgba(249,115,22,.08); font-size:.82rem; font-weight:700; }
    .weekly-login-status::before { content:''; width:8px; height:8px; flex:0 0 8px; border-radius:50%; background:#f97316; box-shadow:0 0 12px rgba(249,115,22,.55); }
    .weekly-login-progress-copy { display:flex; justify-content:space-between; gap:8px; margin:0 1px 7px; color:var(--text-muted); font-size:.7rem; }
    .weekly-login-progress-copy strong { color:#fdba74; font-variant-numeric:tabular-nums; }
    .weekly-login-progress-track { height:7px; overflow:hidden; border-radius:99px; background:#292837; box-shadow:inset 0 1px 2px rgba(0,0,0,.4); }
    .weekly-login-progress-fill { width:0; height:100%; border-radius:inherit; background:linear-gradient(90deg,#ea580c,#fb923c); box-shadow:0 0 12px rgba(249,115,22,.4); transition:width .3s ease; }
    .weekly-login-featured { position:relative; z-index:1; display:flex; align-items:center; gap:13px; min-height:84px; padding:12px 14px; margin:15px 0; border:1px solid rgba(249,115,22,.32); border-radius:14px; background:linear-gradient(100deg,rgba(249,115,22,.13),rgba(249,115,22,.04)); }
    .weekly-login-featured-icon { width:54px; height:54px; flex:0 0 54px; display:grid; place-items:center; border-radius:13px; background:rgba(0,0,0,.17); }
    .weekly-login-featured-icon img { width:44px; height:44px; object-fit:contain; image-rendering:pixelated; }
    .weekly-login-featured-copy { min-width:0; }
    .weekly-login-featured-label { display:block; margin-bottom:3px; color:#fdba74; font-size:.65rem; font-weight:800; letter-spacing:.08em; text-transform:uppercase; }
    .weekly-login-featured-copy strong { display:block; font-size:.93rem; }
    .weekly-login-featured-copy small { display:block; margin-top:3px; color:var(--text-muted); font-size:.73rem; line-height:1.35; }
    .weekly-login-days { position:relative; z-index:1; display:grid; grid-template-columns:repeat(7,minmax(0,1fr)); gap:7px; }
    .weekly-login-days .daily-login-day { min-height:94px; display:flex; flex-direction:column; align-items:center; justify-content:center; padding:8px 3px 6px; border-radius:12px; font-size:.64rem; transition:transform .16s,border-color .16s,background .16s; }
    .weekly-login-days .daily-login-day.active { border-color:#f97316; background:linear-gradient(180deg,rgba(249,115,22,.18),rgba(249,115,22,.07)); box-shadow:0 0 0 1px rgba(249,115,22,.12),0 5px 15px rgba(249,115,22,.1); transform:translateY(-2px); }
    .weekly-login-days .daily-login-day.claimed { border-color:rgba(34,197,94,.3); background:linear-gradient(180deg,rgba(34,197,94,.1),rgba(34,197,94,.035)); }
    .weekly-login-days .daily-login-day.upcoming { background:rgba(255,255,255,.018); }
    .weekly-login-day-label { color:var(--text-muted); font-size:.62rem; }
    .weekly-login-days .daily-login-day-icons { height:34px; margin:3px 0 2px; }
    .weekly-login-days .daily-login-day-icons img { width:29px; height:29px; }
    .weekly-login-days .daily-login-day-icons > span { font-size:28px; }
    .weekly-login-days .daily-login-day strong { min-height:22px; margin:0; font-size:.64rem; }
    .weekly-login-day-state { margin-top:3px; color:var(--text-muted); font-size:.55rem; }
    .weekly-login-days .daily-login-day.active .weekly-login-day-state { color:#fdba74; font-weight:800; }
    .weekly-login-days .daily-login-day.claimed .weekly-login-day-state { color:#86efac; }
    .weekly-login-footer { position:relative; z-index:1; display:flex; justify-content:space-between; align-items:center; gap:10px; margin-top:15px; padding-top:13px; border-top:1px solid rgba(255,255,255,.07); }
    .weekly-login-footer small { max-width:225px; color:var(--text-muted); font-size:.7rem; line-height:1.45; }
    .weekly-login-footer .btn { width:auto; margin:0; padding:9px 13px; font-size:.78rem; white-space:nowrap; }
    @media(max-width:850px) { .profile-overview-grid { grid-template-columns:minmax(0,1fr); max-width:none; } }
    @media(max-width:480px) {
      .profile-overview-grid { grid-template-columns:minmax(0,1fr); }
      .weekly-login-panel { padding:17px 12px; }
      .weekly-login-heading { gap:9px; }
      .weekly-login-heading::after { padding:5px 7px; font-size:.62rem; }
      .weekly-login-days { display:flex; gap:7px; overflow-x:auto; padding:3px 2px 9px; scrollbar-width:thin; scroll-snap-type:x proximity; }
      .weekly-login-days .daily-login-day { flex:0 0 66px; min-height:92px; padding:7px 3px 6px; scroll-snap-align:start; }
      .weekly-login-days .daily-login-day-icons img { width:25px; height:25px; }
      .weekly-login-days .daily-login-day strong { min-height:22px; font-size:.64rem; }
      .weekly-login-day-label { font-size:.62rem; }
      .weekly-login-day-state { font-size:.58rem; }
      .weekly-login-footer { align-items:flex-start; flex-direction:column; }
      .weekly-login-footer .btn { width:100%; }
    }
    .gym-cap-card {
      width: min(460px, 100%); max-height: 88vh; overflow-y: auto; padding: 24px;
      color: var(--text); background: radial-gradient(ellipse at top right, rgba(239,68,68,.15), transparent 55%), var(--card);
      border: 1px solid rgba(248,113,113,.35); border-radius: 20px; box-shadow: 0 24px 80px rgba(0,0,0,.55);
    }
    .gym-cap-heading { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; }
    .gym-cap-emblem { width: 52px; height: 52px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 15px; background: rgba(239,68,68,.14); border: 1px solid rgba(248,113,113,.28); font-size: 1.7rem; }
    .gym-cap-heading h2 { margin: 0 0 4px; font-size: 1.2rem; }
    .gym-cap-heading p { margin: 0; color: var(--text-muted); font-size: .86rem; }
    .gym-cap-note { margin: 0 0 14px; line-height: 1.5; color: var(--text-muted); font-size: .9rem; }
    .gym-cap-pokemon-list { display: grid; gap: 8px; margin-bottom: 20px; }
    .gym-cap-pokemon { display: flex; align-items: center; gap: 11px; padding: 10px 12px; border: 1px solid rgba(248,113,113,.2); border-radius: 12px; background: rgba(127,29,29,.16); }
    .gym-cap-pokemon-icon { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 10px; background: rgba(239,68,68,.14); font-size: 1.15rem; }
    .gym-cap-pokemon-info { flex: 1; min-width: 0; }
    .gym-cap-pokemon-info strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .gym-cap-pokemon-info small { color: var(--text-muted); }
    .gym-cap-level { padding: 5px 8px; border-radius: 8px; background: rgba(239,68,68,.16); color: #fca5a5; font-size: .77rem; font-weight: 700; white-space: nowrap; }
    .gym-cap-actions { display: flex; justify-content: flex-end; gap: 10px; }
    .gym-cap-actions .btn { width: auto; margin: 0; }
    .held-item-picker-card {
      width: min(420px, 100%); max-height: 85vh; overflow-y: auto; padding: 22px;
      color: var(--text); background: var(--card); border: 1px solid var(--border);
      border-radius: 18px; box-shadow: var(--shadow);
    }
    .held-item-choice {
      width: 100%; display: flex; align-items: center; gap: 12px; padding: 10px 12px;
      color: var(--text); background: var(--input-bg); border: 1px solid var(--border);
      border-radius: 10px; text-align: left; cursor: pointer;
    }
    .held-item-choice:hover { border-color: var(--primary); }
    .held-item-choice img { width: 38px; height: 38px; object-fit: contain; }
    .summary-card {
      background: var(--card); border: 1px solid var(--border); border-radius: 20px;
      padding: 28px; max-width: 420px; width: 100%; box-shadow: var(--shadow);
      position: relative; max-height: 90vh; overflow-y: auto;
    }
    .summary-close {
      position: absolute; top: 14px; right: 16px; background: none; border: none;
      color: var(--text-muted); font-size: 1.4rem; cursor: pointer;
    }
    .summary-close:hover { color: var(--text); }
    .summary-header { display: flex; align-items: center; gap: 18px; margin-bottom: 18px; }
    .summary-sprite {
      width: 96px; height: 96px; object-fit: contain;
      filter: drop-shadow(0 6px 12px rgba(0,0,0,0.4));
      background: transparent;
    }
    .summary-name { font-size: 1.35rem; font-weight: 700; }
    .gender-symbol { display: inline-block; margin-left: 2px; font-weight: 800; line-height: 1; }
    .gender-symbol-male { color: #60a5fa; }
    .gender-symbol-female { color: #f472b6; }
    .gender-symbol-neutral { color: #a1a1aa; }
    .summary-meta { color: var(--text-muted); font-size: 0.85rem; margin-top: 4px; }
    .summary-section { margin-top: 16px; }
    .summary-section h4 {
      font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.04em;
      color: var(--text-muted); margin-bottom: 10px;
    }
    .summary-moves { display: flex; flex-direction: column; gap: 8px; }
    .summary-training-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 7px; }
    .summary-training-stat { min-width: 0; padding: 8px; border-radius: 8px; background: var(--input-bg); text-align: center; }
    .summary-training-stat strong { display: block; font-size: 0.76rem; }
    .summary-training-stat span { display: block; margin-top: 3px; color: var(--text-muted); font-size: 0.68rem; line-height: 1.35; }
    .summary-move {
      display: flex; justify-content: space-between; align-items: center;
      padding: 10px 12px; background: var(--input-bg); border-radius: 10px;
      border: 1px solid var(--border); font-size: 0.875rem;
    }
    .summary-move-main { min-width: 0; display: flex; align-items: center; gap: 8px; }
    .summary-move-controls { display: flex; gap: 4px; flex: 0 0 auto; margin-left: 10px; }
    .summary-move-controls button { width: 30px; height: 30px; padding: 0; border: 1px solid var(--border); border-radius: 8px; background: var(--card); color: var(--text); cursor: pointer; }
    .summary-move-controls button:hover:not(:disabled) { border-color: var(--primary); color: var(--primary); }
    .summary-move-controls button:disabled { opacity: .35; cursor: not-allowed; }
    .held-item-summary { display: flex; align-items: center; justify-content: flex-start; gap: 10px; min-width: 0; }
    .held-item-summary-icon { width: 32px; height: 32px; flex: 0 0 32px; object-fit: contain; }
    .held-item-summary-copy { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
    .held-item-summary-copy strong { line-height: 1.2; }
    .held-item-summary-copy span { color: var(--text-muted); font-size: 0.78rem; line-height: 1.35; }
    .summary-stats-grid {
      display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; font-size: 0.875rem;
    }

    #oakIntroOverlay {
      display: none; position: fixed; inset: 0; z-index: 160;
      align-items: center; justify-content: center; padding: 20px;
      background: rgba(0, 0, 0, 0.82);
    }
    #oakIntroOverlay.active { display: flex; }
    #parcelDeliveryOverlay {
      display: none; position: fixed; inset: 0; z-index: 170;
      align-items: center; justify-content: center; padding: 20px;
      background: rgba(0, 0, 0, 0.84);
    }
    #parcelDeliveryOverlay.active { display: flex; }
    #parcelDeliveryOverlay .oak-intro-card { border-color: rgba(34, 197, 94, 0.35); }
    #parcelDeliveryOverlay .oak-intro-copy h2 { color: #86efac; }
    #parcelDeliveryOverlay .oak-intro-text { min-height: 0; }
    #parcelDeliveryOverlay .oak-intro-actions .btn { width: auto; margin: 0; }
    #parcelAccessOverlay {
      display: none; position: fixed; inset: 0; z-index: 180;
      align-items: center; justify-content: center; padding: 20px;
      background: rgba(0, 0, 0, 0.78); backdrop-filter: blur(4px);
    }
    #parcelAccessOverlay.active { display: flex; }
    .parcel-access-card {
      width: min(460px, 100%); padding: 26px; text-align: center;
      color: var(--text); background: var(--card); border: 1px solid var(--border);
      border-radius: 20px; box-shadow: var(--shadow);
    }
    .parcel-access-icon { font-size: 2.4rem; margin-bottom: 8px; }
    .parcel-access-card h2 { margin: 0 0 10px; font-size: 1.25rem; }
    .parcel-access-card p { margin: 0 0 20px; color: var(--text-muted); line-height: 1.5; }
    .parcel-access-card .btn { width: 100%; }
    .oak-intro-card {
      width: min(760px, 100%); display: grid; grid-template-columns: 210px 1fr;
      gap: 24px; align-items: center; padding: 28px;
      color: var(--text); background: var(--card); border: 1px solid var(--border);
      border-radius: 20px; box-shadow: var(--shadow);
    }
    .oak-intro-portrait {
      width: 100%; height: 270px; object-fit: contain; border-radius: 16px;
      background: #f8fafc;
    }
    .oak-intro-copy h2 { margin: 0 0 14px; color: #86efac; }
    .oak-intro-text { min-height: 110px; line-height: 1.7; white-space: pre-line; }
    .oak-intro-input-wrap { display: none; margin-top: 18px; }
    .oak-intro-input-wrap.active { display: block; }
    .oak-intro-input-wrap label { display: block; margin-bottom: 7px; font-size: 0.85rem; }
    .oak-intro-input-wrap input {
      width: 100%; padding: 12px; border: 1px solid var(--border);
      border-radius: 10px; color: var(--text); background: var(--input-bg);
    }
    .oak-intro-error { min-height: 20px; margin-top: 5px; color: #fca5a5; font-size: 0.8rem; }
    .oak-intro-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 22px; }
    @media (max-width: 600px) {
      .oak-intro-card { grid-template-columns: 1fr; gap: 14px; padding: 20px; }
      .oak-intro-portrait { width: 120px; height: 140px; margin: 0 auto; }
      .oak-intro-text { min-height: 0; }
      #parcelDeliveryOverlay .oak-intro-actions { flex-direction: column-reverse; }
      #parcelDeliveryOverlay .oak-intro-actions .btn { width: 100%; }
    }
    #billIntroOverlay {
      display: none; position: fixed; inset: 0; z-index: 160;
      align-items: center; justify-content: center; padding: 20px;
      background: rgba(0, 0, 0, 0.84);
    }
    #billIntroOverlay.active { display: flex; }
    .bill-intro-card {
      width: min(760px, 100%); display: grid; grid-template-columns: 210px 1fr;
      gap: 24px; align-items: center; padding: 28px; color: var(--text);
      background: var(--card); border: 1px solid var(--border);
      border-radius: 20px; box-shadow: var(--shadow);
    }
    .bill-intro-portrait {
      width: 100%; height: 270px; object-fit: contain; border-radius: 16px;
      background: #f8fafc;
    }
    .bill-intro-copy h2 { margin: 0 0 14px; color: #93c5fd; }
    .bill-intro-text { min-height: 110px; line-height: 1.7; white-space: pre-line; }
    .bill-intro-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 22px; }
    .bill-pc-screen {
      display: none; margin-top: 18px; padding: 16px; border: 1px solid #38bdf855;
      border-radius: 12px; background: #07131c; color: #a5f3fc; font-family: monospace;
    }
    .bill-pc-screen.active { display: block; }
    .bill-pc-options { display: flex; gap: 10px; margin-top: 16px; }
    .bill-pc-options .btn { width: auto; min-width: 90px; margin: 0; }
    .bill-pc-no-response { min-height: 22px; margin-top: 12px; color: #fca5a5; }
    .bill-teleporting { animation: billTeleport 0.6s ease-in-out infinite alternate; }
    @keyframes billTeleport {
      from { opacity: 0.55; filter: brightness(0.8); }
      to { opacity: 1; filter: brightness(1.8); }
    }
    @media (max-width: 600px) {
      .bill-intro-card { grid-template-columns: 1fr; gap: 14px; padding: 20px; }
      .bill-intro-portrait { width: 120px; height: 140px; margin: 0 auto; }
      .bill-intro-text { min-height: 0; }
    }
    #brockIntroOverlay {
      display: none; position: fixed; inset: 0; z-index: 160;
      align-items: center; justify-content: center; padding: 20px;
      background: rgba(0, 0, 0, 0.84);
    }
    #brockIntroOverlay.active { display: flex; }
    .brock-intro-card {
      width: min(760px, 100%); display: grid; grid-template-columns: 210px 1fr;
      gap: 24px; align-items: center; padding: 28px; color: var(--text);
      background: var(--card); border: 1px solid var(--border);
      border-radius: 20px; box-shadow: var(--shadow);
    }
    .brock-intro-portrait {
      width: 100%; height: 270px; object-fit: contain; border-radius: 16px;
      background: #f8fafc;
    }
    .brock-intro-copy h2 { margin: 0 0 14px; color: #d6d3d1; }
    .brock-intro-text { min-height: 110px; line-height: 1.7; white-space: pre-line; }
    .brock-intro-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 22px; }
    @media (max-width: 600px) {
      .brock-intro-card { grid-template-columns: 1fr; gap: 14px; padding: 20px; }
      .brock-intro-portrait { width: 120px; height: 140px; margin: 0 auto; }
      .brock-intro-text { min-height: 0; }
    }
    .summary-stat {
      background: var(--input-bg); border-radius: 8px; padding: 10px 12px;
      display: flex; align-items: center; justify-content: space-between; gap: 10px; min-width: 0;
    }
    .summary-stat > span { flex: 0 0 auto; color: var(--text-muted); }
    .summary-stat > strong { min-width: 0; text-align: right; overflow-wrap: anywhere; }
    .summary-stat--wide { grid-column: 1 / -1; }
    #summaryStats > .summary-stat:last-child { grid-column: 1 / -1; }
    .summary-stat--wide > strong { flex: 1; }
    .summary-trait { cursor: help; text-decoration: underline dotted var(--text-muted); text-underline-offset: 3px; }
    .summary-trait:focus-visible { outline: 2px solid var(--primary); outline-offset: 3px; border-radius: 3px; }
    @media (max-width: 420px) {
      .summary-card { padding: 20px; }
      .summary-stats-grid { gap: 7px; font-size: 0.82rem; }
      .summary-stat { padding: 10px; gap: 7px; }
      .summary-stat--wide { align-items: flex-start; }
    }
    .pokedex-grid {
      display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px;
    }
    .pokedex-card {
      position: relative;
      background: var(--card); border: 1px solid var(--border); border-radius: 14px;
      padding: 12px; text-align: center; cursor: default; transition: border-color 0.2s;
    }
    .pokedex-ev-tooltip { position:absolute; z-index:20; left:50%; bottom:calc(100% + 9px); width:max-content; max-width:min(260px,calc(100vw - 32px)); padding:9px 12px; border:1px solid #7655d7; border-radius:10px; background:#211936; color:var(--text); box-shadow:0 10px 28px #0009; font-size:.75rem; line-height:1.45; text-align:left; white-space:normal; opacity:0; visibility:hidden; transform:translate(-50%,5px); transition:opacity .15s ease,transform .15s ease,visibility .15s ease; pointer-events:none; }
    .pokedex-card:hover .pokedex-ev-tooltip,.pokedex-card:focus-visible .pokedex-ev-tooltip { opacity:1; visibility:visible; transform:translate(-50%,0); }
    .pokedex-ev-tooltip strong { display:block; margin-bottom:3px; color:#fed7aa; }
    .pokedex-card.caught { border-color: rgba(249,115,22,0.5); }
    .pokedex-card.seen:not(.caught) { opacity: 0.85; }
    .pokedex-card.unknown { opacity: 0.45; filter: grayscale(1); }
    .pokedex-sprite {
      width: 72px; height: 72px; object-fit: contain; margin: 0 auto 8px;
      background: transparent; image-rendering: auto;
    }
    .pokedex-num { font-size: 0.7rem; color: var(--text-muted); }
    .pokedex-name { font-size: 0.85rem; font-weight: 600; margin: 4px 0; }
    .pokedex-status { font-size: 0.65rem; font-weight: 600; margin-top: 4px; }
    .pokedex-status.caught { color: #4ade80; }
    .pokedex-status.seen { color: #fbbf24; }
    .pokedex-status.unknown { color: var(--text-muted); }
    #switchMenu .move-btn { text-align: left; }
    #switchMenu .switch-hp { font-size: 0.7rem; color: var(--text-muted); }
    .enemy-sprite, .player-sprite, .starter-img, .welcome-poke,
    .summary-sprite, .pokedex-sprite, .evo-sprite {
      background: transparent !important;
      -webkit-backface-visibility: hidden;
      backface-visibility: hidden;
    }
    /* Item icons (PokéSprite / PokeAPI) */
    .item-icon {
      width: 32px; height: 32px; object-fit: contain;
      image-rendering: pixelated;
      image-rendering: crisp-edges;
      vertical-align: middle;
      background: transparent !important;
    }
    .item-icon-sm {
      width: 24px; height: 24px; object-fit: contain;
      image-rendering: pixelated;
      image-rendering: crisp-edges;
      vertical-align: middle;
      background: transparent !important;
    }
    .shop-item-icon {
      width: 48px; height: 48px; object-fit: contain;
      image-rendering: pixelated;
      image-rendering: crisp-edges;
      background: transparent !important;
    }
    .bottle-cap-sprite { transform: scale(2.25); }
    .item-icon-fallback { display: inline-flex; align-items: center; justify-content: center; font-size: 1.75rem; }
    .center-dashboard { max-width:1120px; margin:18px auto 30px; }
    .daily-boss-dashboard { max-width:1120px; margin:18px auto 20px; }
.ss-anne-dashboard { max-width:1120px; margin:18px auto 20px; }
.kanto-gyms-dashboard { max-width:1120px; margin:18px auto 20px; }


    .exploration-folder-list[hidden] { display:none; }
    .exploration-folder-list { display:grid; grid-template-columns:repeat(auto-fill,minmax(min(100%,260px),296px)); gap:14px; margin:18px 0 24px; }
    .exploration-folder-card { display:flex; flex-direction:column; min-width:0; min-height:280px; padding:0; overflow:hidden; border:1px solid var(--border); border-radius:16px; background:var(--card); color:var(--text); text-align:left; font:inherit; cursor:pointer; box-shadow:0 12px 30px rgba(0,0,0,.18); transition:transform .16s ease,border-color .16s ease,box-shadow .16s ease; }
    .exploration-folder-card:hover { transform:translateY(-2px); border-color:var(--primary); box-shadow:0 14px 32px rgba(0,0,0,.25); }
    .exploration-folder-cover { display:block; flex:0 0 120px; height:120px; overflow:hidden; background:var(--input-bg); }
    .exploration-folder-cover img { display:block; width:100%; height:100%; object-fit:cover; image-rendering:pixelated; }
    .exploration-folder-cover-johto { display:grid; place-items:center; background:radial-gradient(ellipse at 75% 25%,rgba(251,146,60,.32),transparent 35%),linear-gradient(135deg,#21160f,#101114 68%,#25180f); }
    .exploration-folder-cover-johto span { font-size:3.2rem; filter:drop-shadow(0 8px 12px rgba(0,0,0,.45)); }
    .exploration-folder-copy { display:grid; align-content:start; gap:5px; min-width:0; padding:14px 18px 18px; }
    .exploration-folder-copy strong { font-size:1rem; }
    .exploration-folder-copy small { color:var(--text-muted); line-height:1.4; }
    .exploration-folder-view[hidden] { display:none; }
    .exploration-folder-view { margin:18px 0 24px; }
    .exploration-folder-toolbar { display:flex; align-items:center; gap:12px; margin-bottom:14px; }
    .exploration-folder-toolbar h3 { margin:0; font-size:1.15rem; }
    .exploration-folder-toolbar .btn { width:auto; margin:0; padding:9px 12px; }
    .kanto-exploration-dashboard { max-width:1120px; margin:18px auto 20px; }
    .kanto-exploration-hero { border-color:rgba(251,146,60,.24); background:radial-gradient(ellipse at 80% 40%,rgba(249,115,22,.2),transparent 38%),linear-gradient(115deg,#27190f,#111113 65%,#21150e); }
    .kanto-exploration-hero .center-kicker { color:#fcd34d; }
    .kanto-exploration-hero .center-hero-art { border-color:#fb923c45; background:radial-gradient(circle,#f973161f,transparent 70%); }
    .kanto-exploration-hero .center-hero-art img { width:145px; height:145px; }
    .center-hero.kanto-exploration-hero { border-color:rgba(249,115,22,.3); background:radial-gradient(ellipse at 80% 40%,rgba(249,115,22,.22),transparent 38%),linear-gradient(115deg,#49220f,#211712 65%,#3b1c0d); }
    .center-hero.kanto-exploration-hero .center-kicker { color:#fdba74; }
    @media (max-width:560px) { .kanto-exploration-hero .center-hero-art img { width:78px; height:78px; } }
    .kanto-elite-dashboard { max-width:1120px; margin:18px auto 20px; }
    .kanto-elite-hero { border-color:rgba(251,191,36,.2); background:radial-gradient(ellipse at 80% 40%,rgba(14,165,233,.22),transparent 38%),linear-gradient(115deg,#123247,#111a22 65%,#132b38); }
    .kanto-elite-hero .center-kicker { color:#fcd34d; }
    .kanto-elite-hero .center-hero-art { border-color:#fb923c45; background:radial-gradient(circle,#f973161f,transparent 70%); }
    .kanto-elite-hero .center-hero-art img { width:145px; height:145px; }
    @media (max-width:560px) { .kanto-elite-hero .center-hero-art img { width:78px; height:78px; } }
    .kanto-feature-dashboard { max-width:1120px; margin:18px auto 20px; }
    .kanto-feature-hero { border-color:rgba(251,191,36,.2); background:radial-gradient(ellipse at 80% 40%,rgba(14,165,233,.22),transparent 38%),linear-gradient(115deg,#123247,#111a22 65%,#132b38); }
    .kanto-feature-hero .center-kicker { color:#fcd34d; }
    .kanto-feature-hero .center-hero-art { border-color:#fb923c45; background:radial-gradient(circle,#f973161f,transparent 70%); }
    .kanto-feature-hero .center-hero-art img { width:145px; height:145px; }
    @media (max-width:560px) { .kanto-feature-hero .center-hero-art img { width:78px; height:78px; } }
    .social-friendship-icon { width:82px; height:82px; object-fit:contain; filter:drop-shadow(0 8px 12px #0008); }
    @media (max-width:560px) { .social-friendship-icon { width:54px; height:54px; } }
    .progression-guide-banner .center-hero-art img { image-rendering:auto; }
    .bag-journey-hero .center-kicker { color:#fcd34d; }
    .bag-journey-hero .center-hero-art { border-color:#fcd34d35; background:radial-gradient(circle,#f59e0b1c,transparent 70%); }
    .bag-journey-hero .center-hero-art img { width:132px; height:132px; image-rendering:auto; }
    .trainer-profile-hero .center-kicker { color:#fed7aa; }
    .center-hero.trainer-profile-hero { border-color:rgba(249,115,22,.3); background:radial-gradient(ellipse at 80% 40%,rgba(249,115,22,.22),transparent 38%),linear-gradient(115deg,#49220f,#211712 65%,#3b1c0d); }
    .trainer-profile-hero .center-hero-art { border-color:#fdba7445; background:radial-gradient(circle,#fb923c1f,transparent 70%); }
    .trainer-profile-hero .center-hero-art img { width:112px; height:138px; image-rendering:pixelated; }
    .center-hero.bag-journey-hero,.center-hero.collection-pokemon-hero,.center-hero.collection-pc-hero,.center-hero.collection-pokedex-hero { border-color:rgba(249,115,22,.3); background:radial-gradient(ellipse at 80% 40%,rgba(249,115,22,.22),transparent 38%),linear-gradient(115deg,#49220f,#211712 65%,#3b1c0d); }
    .center-hero.bag-journey-hero .center-kicker,.center-hero.collection-pokemon-hero .center-kicker,.center-hero.collection-pc-hero .center-kicker,.center-hero.collection-pokedex-hero .center-kicker { color:#fdba74; }
    .center-hero.bag-journey-hero .center-hero-art,.center-hero.collection-pokemon-hero .center-hero-art,.center-hero.collection-pc-hero .center-hero-art,.center-hero.collection-pokedex-hero .center-hero-art { border-color:rgba(251,146,60,.38); background:radial-gradient(circle,rgba(249,115,22,.16),transparent 70%); }
    .center-hero.social-friendship-hero { border-color:rgba(249,115,22,.3); background:radial-gradient(ellipse at 80% 40%,rgba(249,115,22,.22),transparent 38%),linear-gradient(115deg,#49220f,#211712 65%,#3b1c0d); }
    .center-hero.social-friendship-hero .center-kicker { color:#fdba74; }
    .center-hero.social-friendship-hero .center-hero-art { border-color:rgba(251,146,60,.38); background:radial-gradient(circle,rgba(249,115,22,.16),transparent 70%); }
    .center-hero.healing-center-hero { border-color:rgba(249,115,22,.3); background:radial-gradient(ellipse at 80% 40%,rgba(249,115,22,.22),transparent 38%),linear-gradient(115deg,#49220f,#211712 65%,#3b1c0d); }
    .center-hero.healing-center-hero .center-kicker { color:#fdba74; }
    .center-hero.healing-center-hero .center-hero-art { border-color:rgba(251,146,60,.38); background:radial-gradient(circle,rgba(249,115,22,.16),transparent 70%); }
    @media (max-width:560px) { .bag-journey-hero .center-hero-art img { width:72px; height:72px; } .trainer-profile-hero .center-hero-art img { width:62px; height:72px; } }
    .kanto-gyms-hero { border-color:rgba(251,191,36,.2); background:radial-gradient(ellipse at 80% 40%,rgba(245,158,11,.2),transparent 38%),linear-gradient(115deg,#382b17,#17171b 65%,#292316); }
    .kanto-gyms-hero .center-kicker { color:#fcd34d; }
    .kanto-gyms-hero .center-hero-art { border-color:#fcd34d35; background:radial-gradient(circle,#fbbf241f,transparent 70%); }
    .kanto-gyms-hero .center-hero-art img { width:150px; height:145px; object-fit:contain; }
    .kanto-gyms-hero h3 { color:#fffbeb; }
    .kanto-gyms-hero p { color:#e2d9c7; }
    .center-hero.kanto-gyms-hero { border-color:rgba(249,115,22,.3); background:radial-gradient(ellipse at 80% 40%,rgba(249,115,22,.22),transparent 38%),linear-gradient(115deg,#49220f,#211712 65%,#3b1c0d); }
    .center-hero.kanto-gyms-hero .center-kicker { color:#fdba74; }
    .center-hero.kanto-gyms-hero .center-hero-art { border-color:rgba(251,146,60,.38); background:radial-gradient(circle,rgba(249,115,22,.16),transparent 70%); }
    @media (max-width:560px) { .kanto-gyms-hero .center-hero-art img { width:82px; height:78px; } }
    .ss-anne-hero { border-color:rgba(125,211,252,.2); background:radial-gradient(ellipse at 80% 40%,rgba(14,165,233,.22),transparent 38%),linear-gradient(115deg,#123247,#111a22 65%,#132b38); }
    .ss-anne-hero .center-kicker { color:#fb923c; }
    .ss-anne-hero .center-hero-art { border-color:#fb923c45; background:radial-gradient(circle,#f973161f,transparent 70%); }
    .ss-anne-hero .center-hero-art img { width:155px; height:155px; object-fit:contain; }
    .ss-anne-hero h3 { color:#f0f9ff; }
    .ss-anne-hero p { color:#c6d8e2; }
    @media (max-width:560px) { .ss-anne-hero .center-hero-art img { width:82px; height:82px; } }
    .daily-boss-hero { border-color:rgba(251,146,60,.2); background:radial-gradient(ellipse at 80% 40%,rgba(234,88,12,.22),transparent 38%),linear-gradient(115deg,#261638,#15121d 65%,#21152d); }
    .daily-boss-hero .center-kicker { color:#fdba74; }
    .daily-boss-hero .center-hero-art { border-color:#fb923c35; background:radial-gradient(circle,#f973161f,transparent 70%); }
    .daily-boss-hero .center-hero-art img { width:155px; height:155px; }
    .daily-boss-hero h3 { color:#faf5ff; }
    .daily-boss-hero p { color:#d2c6dc; }
    @media (max-width:560px) { .daily-boss-hero .center-hero-art img { width:82px; height:82px; } }
    .center-hero { position:relative; display:grid; grid-template-columns:minmax(0,1fr) 170px; align-items:center; gap:20px; min-height:190px; padding:clamp(20px,4vw,34px); overflow:hidden; border:1px solid rgba(125,211,252,.18); border-radius:22px; background:radial-gradient(ellipse at 80% 40%,rgba(14,165,233,.2),transparent 36%),linear-gradient(115deg,#123247,#121a1c 65%,#132b38); box-shadow:0 18px 46px #0004; }
    .center-hero::after { content:''; position:absolute; inset:0; pointer-events:none; opacity:.14; background-image:linear-gradient(#ffffff08 1px,transparent 1px),linear-gradient(90deg,#ffffff08 1px,transparent 1px); background-size:30px 30px; mask-image:linear-gradient(90deg,black,transparent 80%); }
    .center-hero-copy { position:relative; z-index:1; }
    .center-kicker { color:#fb923c; font-size:.7rem; font-weight:800; letter-spacing:.14em; text-transform:uppercase; }
    .center-hero h3 { margin:8px 0 7px; color:#f0f9ff; font-size:clamp(1.3rem,2.7vw,1.9rem); letter-spacing:-.03em; }
    .center-hero p { max-width:620px; margin:0; color:#c6d8e2; font-size:.9rem; line-height:1.55; }
    .center-hero-art { position:relative; z-index:1; display:grid; place-items:center; width:160px; height:150px; justify-self:center; border:1px solid #fb923c40; border-radius:50%; background:radial-gradient(circle,#f973161c,transparent 70%); }
    .center-hero-art img { width:145px; height:145px; object-fit:contain; image-rendering:pixelated; filter:drop-shadow(0 10px 16px #0009); }
    .center-overview { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:10px; margin:14px 0; }
    .center-overview-item { display:flex; align-items:center; justify-content:space-between; gap:10px; min-width:0; padding:13px 15px; border:1px solid var(--border); border-radius:13px; background:linear-gradient(145deg,var(--card),var(--input-bg)); }
    .market-overview { grid-template-columns:repeat(3,minmax(0,1fr)); }
    .center-overview-item span { color:var(--text-muted); font-size:.76rem; }
    .center-overview-item strong { color:var(--text); font-size:.96rem; font-variant-numeric:tabular-nums; }
    .center-workspace { display:grid; grid-template-columns:minmax(0,1.55fr) minmax(260px,.75fr); align-items:start; gap:14px; }
    .center-team-panel,.center-treatment-panel { min-width:0; padding:18px; border:1px solid var(--border); border-radius:17px; background:linear-gradient(145deg,var(--card),var(--input-bg)); }
    .center-section-head { display:flex; align-items:flex-start; justify-content:space-between; gap:12px; margin-bottom:13px; }
    .center-section-head h3 { margin:0; font-size:1rem; }
    .center-section-head p { margin:5px 0 0; color:var(--text-muted); font-size:.77rem; line-height:1.45; }
    .center-team-badge { flex:0 0 auto; padding:6px 9px; border:1px solid #ffffff14; border-radius:999px; background:#ffffff08; color:var(--text-muted); font-size:.68rem; }
    .center-selection-actions { display:flex; flex-wrap:wrap; gap:8px; margin-bottom:12px; }
    .center-selection-actions .btn { width:auto; min-height:36px; margin:0; padding:7px 11px; border:1px solid #fb923c; background:linear-gradient(135deg,#f97316,#ea580c); color:#fff; font-size:.76rem; }
    .center-selection-actions .btn:hover { border-color:#fdba74; background:linear-gradient(135deg,#fb923c,#f97316); color:#fff; box-shadow:0 5px 14px rgba(249,115,22,.24); }
    .center-party-list { display:grid; grid-template-columns:repeat(auto-fit,minmax(235px,1fr)); gap:9px; padding:2px; }
    .center-pokemon-card { position:relative; display:grid; grid-template-columns:60px minmax(0,1fr); align-items:center; gap:10px; min-width:0; padding:10px; border:1px solid var(--border); border-radius:13px; background:rgba(8,8,13,.38); cursor:pointer; transition:border-color .16s,background .16s,transform .16s; }
    .center-pokemon-card:hover { transform:translateY(-1px); border-color:#86efac65; }
    .center-pokemon-card:has(input:checked),.center-pokemon-card.selected { border-color:#4ade80; background:linear-gradient(110deg,rgba(34,197,94,.12),rgba(34,197,94,.025)); box-shadow:inset 0 0 0 1px rgba(74,222,128,.12); }
    .center-pokemon-card:has(input:disabled) { cursor:default; }
    .center-pokemon-select { position:absolute; top:9px; right:9px; width:17px; height:17px; margin:0; accent-color:#22c55e; cursor:pointer; }
    .center-pokemon-sprite-wrap { display:grid; place-items:center; width:58px; height:58px; border:1px solid #ffffff0e; border-radius:11px; background:radial-gradient(circle,#ffffff0d,transparent 72%); }
    .center-pokemon-sprite { width:54px; height:54px; object-fit:contain; image-rendering:pixelated; }
    .center-pokemon-details { display:grid; gap:3px; min-width:0; padding-right:21px; }
    .center-pokemon-title { display:flex; align-items:center; flex-wrap:wrap; gap:5px; color:var(--text); font-size:.83rem; font-weight:750; }
    .center-pokemon-meta { margin-top:3px; color:var(--text-muted); font-size:.7rem; }
    .center-pokemon-hp-row { display:flex; justify-content:space-between; gap:8px; margin-top:9px; color:var(--text-muted); font-size:.68rem; font-variant-numeric:tabular-nums; }
    .center-pokemon-hp-track { height:6px; margin-top:5px; overflow:hidden; border-radius:99px; background:#ffffff12; }
    .center-pokemon-hp-track i { display:block; height:100%; border-radius:inherit; transition:width .24s ease; }
    .center-pokemon-status { display:inline-flex; margin-top:7px; padding:3px 7px; border:1px solid #ffffff12; border-radius:999px; background:#ffffff08; color:var(--text-muted); font-size:.64rem; font-weight:700; }
    .center-pokemon-status.fainted { border-color:#f8717138; background:#ef444416; color:#fca5a5; }
    .center-pokemon-status.needs-care { border-color:#fbbf2438; background:#f59e0b12; color:#fcd34d; }
    .center-healing-dialog { width:min(460px,calc(100vw - 28px)); max-width:none; margin:auto; padding:0; overflow:hidden; border:1px solid rgba(74,222,128,.42); border-radius:20px; background:linear-gradient(155deg,#17251e,#111119 62%); color:var(--text); box-shadow:0 28px 90px #000c,0 0 40px #22c55e20; }
    .center-healing-dialog::backdrop { background:rgba(5,4,10,.78); backdrop-filter:blur(5px); }
    .center-healing-inner { padding:24px; text-align:center; }
    .center-healing-kicker { color:#86efac; font-size:.68rem; font-weight:850; letter-spacing:.14em; text-transform:uppercase; }
    .center-healing-nurse { position:relative; width:88px; height:88px; margin:12px auto; overflow:hidden; border:1px solid #4ade8055; border-radius:50%; background:#fff; box-shadow:0 0 24px #4ade8025; }
    .center-healing-nurse img { position:absolute; top:0; left:0; width:100%; height:100%; max-width:none; object-fit:contain; transform:scale(3.1); image-rendering:auto; }
    .center-healing-inner h2 { margin:8px 0 5px; font-size:1.2rem; }
    .center-healing-message { min-height:42px; margin:0 auto; max-width:350px; color:var(--text-muted); font-size:.88rem; line-height:1.5; }
    .center-healing-balls { display:flex; justify-content:center; flex-wrap:wrap; gap:12px; min-height:38px; margin:20px 0; }
    .center-healing-ball { position:relative; width:30px; height:30px; overflow:hidden; border:2px solid #16151b; border-radius:50%; background:linear-gradient(to bottom,#fb4a55 0 46%,#211e26 46% 55%,#f5f4f2 55%); box-shadow:0 0 0 1px #ffffff30,0 4px 9px #0007; }
    .center-healing-ball::after { position:absolute; top:50%; left:50%; width:8px; height:8px; border:2px solid #211e26; border-radius:50%; background:#fff; content:''; transform:translate(-50%,-50%); }
    .center-healing-dialog.is-healing .center-healing-ball { transition:filter 35ms linear,box-shadow 35ms linear,transform 35ms linear; will-change:filter,transform; }
    .center-healing-dialog.center-healing-css-fallback .center-healing-ball { animation:center-healing-pulse .52s ease-in-out infinite alternate; }
    @keyframes center-healing-pulse { from { filter:brightness(1.12); box-shadow:0 0 5px #4ade8055,0 4px 9px #0007; transform:scale(1); } to { filter:brightness(1.9); box-shadow:0 0 18px #4ade80c9,0 0 36px #22c55e66; transform:scale(1.09); } }
    .center-healing-actions { display:flex; justify-content:center; margin-top:18px; }
    .center-healing-actions .btn { width:auto; min-width:150px; margin:0; }
    @media (prefers-reduced-motion:reduce) { .center-healing-dialog.is-healing .center-healing-ball { transition:none; filter:brightness(1.25); box-shadow:0 0 10px #4ade8070; } }
    .center-pokemon-status.healthy { border-color:#4ade8030; background:#22c55e10; color:#86efac; }
    .center-pokemon-moves { min-width:0; margin-top:3px; }
    .center-pokemon-moves summary { color:var(--text-muted); font-size:.66rem; cursor:pointer; }
    .center-pokemon-moves-list { display:grid; gap:4px; margin-top:6px; }
    .center-pokemon-move { display:flex; justify-content:space-between; gap:8px; padding:5px 7px; border:1px solid var(--border); border-radius:7px; background:var(--input-bg); font-size:.66rem; }
    .center-pokemon-move span:last-child { color:var(--text-muted); white-space:nowrap; }
    .center-treatment-panel { position:sticky; top:18px; }
    .center-treatment-heading { display:flex; align-items:center; gap:11px; margin-bottom:15px; }
    .center-treatment-icon { display:grid; place-items:center; width:42px; height:42px; flex:0 0 42px; border:1px solid #86efac30; border-radius:12px; background:#22c55e14; font-size:1.25rem; }
    .center-treatment-heading h3 { margin:0; font-size:.98rem; }
    .center-treatment-heading p { margin:3px 0 0; color:var(--text-muted); font-size:.72rem; }
    .center-treatment-cost { display:flex; align-items:center; justify-content:space-between; gap:10px; padding:13px; border:1px solid #ffffff12; border-radius:12px; background:rgba(8,8,13,.42); }
    .center-treatment-cost span { color:var(--text-muted); font-size:.77rem; }
    .center-treatment-cost strong { color:#fbbf24; font-size:.93rem; font-variant-numeric:tabular-nums; }
    .center-free-card-row { display:flex; align-items:center; justify-content:space-between; gap:10px; margin:13px 0; color:var(--text-muted); font-size:.74rem; }
    .center-free-cards { display:flex; align-items:center; gap:4px; }
    .center-free-token { display:grid; place-items:center; width:19px; height:19px; border:1px solid var(--border); border-radius:6px; background:var(--input-bg); color:var(--text-muted); font-size:.65rem; font-weight:800; }
    .center-free-token.available { border-color:#4ade8050; background:#22c55e16; color:#86efac; }
    .center-treatment-panel > .btn { min-height:44px; margin:0; border-radius:11px; font-weight:750; }
    .center-treatment-note { margin:11px 1px 0; color:var(--text-muted); font-size:.7rem; line-height:1.5; }
    .center-empty-state { grid-column:1/-1; display:grid; justify-items:center; gap:5px; padding:28px 14px; border:1px dashed var(--border); border-radius:13px; color:var(--text-muted); text-align:center; }
    .center-empty-state strong { color:var(--text); font-size:.9rem; }
    @media (max-width:760px) { .center-workspace { grid-template-columns:1fr; } .center-treatment-panel { position:static; } }
    @media (max-width:560px) { .center-hero { grid-template-columns:minmax(0,1fr) 78px; min-height:150px; gap:7px; padding:18px 14px; } .center-hero-art { width:76px; height:76px; } .center-hero-art img { width:78px; height:78px; } .center-hero p { font-size:.8rem; } .center-overview { grid-template-columns:repeat(2,minmax(0,1fr)); gap:6px; } .market-overview .center-overview-item:last-child { grid-column:1/-1; } .center-overview-item { align-items:flex-start; flex-direction:column; gap:4px; padding:10px; } .center-overview-item span { font-size:.66rem; } .center-overview-item strong { font-size:.85rem; } .center-team-panel,.center-treatment-panel { padding:13px; } .center-party-list { grid-template-columns:1fr; } }
    #shopQuantityDialog {
      width: min(420px, calc(100% - 32px)); margin: auto; padding: 0;
      color: var(--text); background: var(--card); border: 1px solid var(--border);
      border-radius: 18px; box-shadow: var(--shadow);
    }
    #shopQuantityDialog::backdrop { background: rgba(0,0,0,0.72); }
    #pokeCoinsStoreDialog { width:min(820px,calc(100% - 24px)); max-width:none; max-height:min(90vh,900px); margin:auto; padding:0; overflow:auto; color:var(--text); background:#101827; border:3px solid #526b91; border-radius:16px; box-shadow:0 18px 70px rgba(0,0,0,.65); }
    #pokeCoinsStoreDialog::backdrop { background:rgba(0,0,0,.78); }
    .poke-coins-store { padding:clamp(14px,3vw,24px); }
    .poke-coins-store-head { position:relative; display:flex; flex-wrap:nowrap; align-items:center; justify-content:space-between; gap:18px; padding:15px 17px; border:2px solid #829dc8; border-radius:12px; background:radial-gradient(ellipse at 8% 0%,rgba(81,147,235,.28),transparent 55%),linear-gradient(115deg,#203653,#111a2a 70%); box-shadow:inset 0 0 0 1px rgba(255,255,255,.08),0 8px 22px rgba(0,0,0,.24); }
    .poke-coins-store-heading { flex:1 1 auto; min-width:0; }
    .poke-coins-store-kicker { display:block; margin-bottom:3px; color:#8ebfff; font-size:.65rem; font-weight:900; letter-spacing:.16em; }
    .poke-coins-store-title { display:flex; align-items:center; gap:10px; margin:0; font-size:clamp(1.1rem,3vw,1.55rem); white-space:nowrap; text-shadow:0 2px 0 #0a1220; }
    .poke-coins-store-title > span { font-size:1.8rem; line-height:1; }
    .poke-coins-store-head > .btn { width:auto; flex:0 0 auto; margin:0; padding:9px 16px; }
    .poke-coins-pack-grid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:12px; margin:18px 0; }
    .poke-coins-pack { position:relative; min-width:0; min-height:142px; padding:12px 10px 10px; display:flex; flex-direction:column; justify-content:space-between; gap:9px; color:#edf5ff; cursor:pointer; text-align:center; border:2px solid #344b69; border-radius:8px; background:linear-gradient(145deg,#1e2d43,#101827 78%); box-shadow:inset 0 0 0 1px rgba(164,198,239,.12), 4px 5px 0 #080b11; transition:transform .14s,border-color .14s,filter .14s; }
    .poke-coins-pack:hover { transform:translateY(-2px); filter:brightness(1.08); }
    .poke-coins-pack.selected { border-color:#80e4ff; box-shadow:inset 0 0 0 1px rgba(164,198,239,.12),0 0 0 3px #22d3ee,4px 5px 0 #080b11; }
    .poke-coins-pack-amount { position:absolute; top:5px; right:8px; color:#d8eaff; font-size:.9rem; font-weight:1000; text-shadow:0 1px #0a1220; }
    .poke-coins-pack-bonus { position:absolute; top:5px; left:8px; color:#7df3bd; font-size:.68rem; font-weight:900; text-shadow:0 1px 3px #07120f; }
    .poke-coins-pack-diamonds { min-height:62px; display:flex; align-items:center; justify-content:center; flex-wrap:wrap; gap:3px; }
    .poke-coins-pack-gem { display:inline-block; font-size:1.75rem; line-height:1; filter:drop-shadow(1px 2px 0 rgba(0,0,0,.3)); }
    .poke-coins-pack-price { display:block; padding:7px 4px; color:#f3f7ff; background:#0b1220; border:1px solid #526b91; border-radius:5px; font-size:1rem; font-weight:900; }
    .poke-coins-supporter { display:flex; align-items:end; flex-wrap:wrap; gap:8px; margin:14px 0 0; padding:12px; border:1px solid #405879; border-radius:10px; background:#151f30; }
    .poke-coins-supporter-field { flex:1 1 220px; min-width:0; }
    .poke-coins-supporter-field label { display:block; margin-bottom:6px; color:#c6d4e8; font-size:.78rem; font-weight:800; }
    .poke-coins-supporter-field input { width:100%; min-height:40px; padding:9px 11px; border:1px solid #526b91; border-radius:7px; color:var(--text); background:#0d1522; font:inherit; }
    .poke-coins-supporter-field input:focus-visible { outline:2px solid #72c8ff; outline-offset:1px; }
    .poke-coins-supporter-status { flex-basis:100%; min-height:1em; color:#9fb0c9; font-size:.75rem; }
    .poke-coins-quick-header { position:relative; display:flex; align-items:center; justify-content:center; gap:12px; overflow:hidden; background:radial-gradient(ellipse at 50% 0%,rgba(20,115,224,.24),transparent 63%),linear-gradient(145deg,#082b59,#061329)!important; }
    .poke-coins-quick-header > img { display:block; width:100%; height:100%; object-fit:contain; }
    #pokeCoinsHomeCard .poke-coins-quick-header { height:155px; }
    .poke-coins-gem { position:relative; z-index:1; font-size:4.5rem; line-height:1; filter:drop-shadow(0 4px 12px rgba(55,177,255,.36)); }
    .poke-coins-quick-header-copy { position:relative; z-index:1; color:#dcecff; }
    .poke-coins-quick-header-copy strong,.poke-coins-quick-header-copy small { display:block; }
    .poke-coins-quick-header-copy strong { font-size:.83rem; letter-spacing:.08em; }
    .poke-coins-quick-header-copy small { margin-top:4px; color:#9fb8d7; font-size:.68rem; }
    .poke-coins-store-note { margin:10px 0 0; color:#aebbd0; font-size:.8rem; line-height:1.45; }
    @media(max-width:620px) { .poke-coins-pack-grid { grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; } .poke-coins-pack { min-height:128px; } }
    @media(max-width:560px) { .poke-coins-store-head { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:10px 12px; } .poke-coins-store-heading { grid-column:1 / -1; } .poke-coins-store-title { font-size:1.08rem; } .poke-coins-store-head > .btn { justify-self:end; } }
    .shop-quantity-content { padding: 24px; }
    .shop-quantity-content h3 { font-size: 1.2rem; margin-bottom: 6px; }
    .shop-quantity-content p { color: var(--text-muted); font-size: 0.9rem; margin-bottom: 18px; }
    .shop-quantity-content label { display: block; font-size: 0.85rem; margin-bottom: 7px; }
    .shop-quantity-content input {
      width: 100%; padding: 12px; color: var(--text); background: var(--input-bg);
      border: 1px solid var(--border); border-radius: 10px; font: inherit;
    }
    .shop-quantity-total { display: flex; justify-content: space-between; margin-top: 14px; font-size: 0.95rem; }
    .shop-quantity-actions { display: flex; gap: 10px; margin-top: 20px; }
    .shop-quantity-actions button { flex: 1; }
    .market-tabs { display:flex; gap:10px; margin:18px 0 20px; padding:5px; width:max-content; max-width:100%; background:var(--card); border:1px solid var(--border); border-radius:13px; }
    .market-tab { min-width:130px; padding:11px 22px; color:var(--text-muted); background:transparent; border:0; border-radius:9px; font:inherit; font-weight:800; cursor:pointer; transition:background .18s,color .18s,box-shadow .18s; }
    .market-tab:hover { color:var(--text); }
    .market-tab.active { color:#fff; background:linear-gradient(135deg,#f97316,#ea580c); box-shadow:0 4px 14px #f9731644; }
    .market-tab-panel[hidden] { display:none !important; }
    @media (max-width:480px) { .market-tabs { width:100%; } .market-tab { flex:1; min-width:0; } }
    .shop-quantity-cancel {
      border: 1px solid var(--border); border-radius: 10px; padding: 12px;
      color: var(--text); background: var(--input-bg); font: inherit; cursor: pointer;
    }
    #nicknameDialog {
      width: min(440px, calc(100% - 32px)); margin: auto; padding: 0;
      color: var(--text); background: var(--card); border: 1px solid var(--border);
      border-radius: 18px; box-shadow: var(--shadow);
    }
    #nicknameDialog::backdrop { background: rgba(0,0,0,0.76); }
    #moveLearnDialog {
      width: min(460px, calc(100% - 32px)); max-height: min(85vh, 700px); margin: auto; padding: 0;
      color: var(--text); background: var(--card); border: 1px solid var(--border);
      border-radius: 18px; box-shadow: var(--shadow); overflow: auto;
    }
    #moveLearnDialog::backdrop { background: rgba(0,0,0,0.76); }
    #moveLearnContent { padding: 22px; }
    #moveLearnTitle { font-size: 1.15rem; margin-bottom: 8px; }
    #moveLearnPrompt { color: var(--text-muted); font-size: .9rem; margin-bottom: 18px; }
    #moveLearnChoices { display: grid; gap: 8px; max-height: 45vh; overflow-y: auto; }
    #moveLearnActions { display: flex; gap: 10px; }
    #moveLearnActions button { flex: 1; }
    .nickname-content { padding: 24px; }
    .nickname-content h3 { font-size: 1.2rem; margin-bottom: 8px; }
    .nickname-content p { color: var(--text-muted); font-size: 0.9rem; margin-bottom: 18px; }
    .nickname-content label { display: block; font-size: 0.85rem; margin-bottom: 7px; }
    .nickname-content input {
      width: 100%; padding: 12px; color: var(--text); background: var(--input-bg);
      border: 1px solid var(--border); border-radius: 10px; font: inherit;
    }
    .nickname-actions { display: flex; gap: 10px; margin-top: 18px; }
    .nickname-actions button { flex: 1; }
    .nickname-entry { display: none; }
    .nickname-entry.active { display: block; }
    .pc-grid {
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
      gap: 10px;
    }
    .pc-slot {
      background: var(--card);
      border: 1px solid var(--border);
      border-radius: 12px;
      padding: 10px 6px;
      text-align: center;
      cursor: pointer;
      transition: border-color 0.2s, transform 0.15s;
      min-height: 110px;
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
    }
    .pc-slot:hover:not(.empty) { border-color: var(--primary); transform: translateY(-2px); }
    .pc-slot.empty { opacity: 0.4; cursor: default; }
    .pc-slot img { width: 56px; height: 56px; object-fit: contain; background: transparent; }
    .pc-slot .pc-name { font-size: 0.7rem; font-weight: 600; margin-top: 4px; line-height: 1.2; }
    .pc-slot .pc-lv { font-size: 0.65rem; color: var(--text-muted); }
    .pc-party-row {
      display: flex; flex-wrap: wrap; gap: 10px;
    }
    .pc-party-card {
      background: var(--card); border: 1px solid var(--border); border-radius: 12px;
      padding: 10px; text-align: center; cursor: pointer; width: 100px;
      transition: border-color 0.2s;
    }
    .pc-party-card:hover { border-color: var(--primary); }
    .pc-party-card.is-last-member { opacity:.6; cursor:not-allowed; }
    .pc-party-card.is-last-member:hover { border-color:var(--border); }
    .pc-party-card img { width: 48px; height: 48px; object-fit: contain; }
    .pc-party-card .pc-name { font-size: 0.75rem; font-weight: 600; }
    .pc-item-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
    .pc-item-card { display: grid; grid-template-columns: 42px 1fr; align-items: center; gap: 8px 10px; padding: 12px; background: var(--card); border: 1px solid var(--border); border-radius: 12px; }
    .pc-item-icon { width: 38px; height: 38px; object-fit: contain; }
    .pc-item-name { font-size: .85rem; font-weight: 700; }
    .pc-item-qty { color: var(--text-muted); font-size: .75rem; margin-top: 3px; }
    .pc-item-actions { grid-column: 1 / -1; display: flex; gap: 8px; align-items: center; }
    .pc-item-amount { width: 72px; min-width: 72px; padding: 7px 8px; margin: 0; }
    .pc-item-actions .btn { width: auto; margin: 0; padding: 7px 10px; font-size: .75rem; flex: 1; }
    .bag-item:hover { border-color: var(--primary); transform: translateY(-2px); }
    .bag-item.empty { opacity: 0.4; }
    .bag-toolbar { display:flex; justify-content:space-between; align-items:stretch; gap:12px; margin:0 0 14px; }
    .bag-inventory-summary { display:flex; align-items:center; gap:12px; min-width:190px; padding:11px 14px; border:1px solid rgba(249,115,22,.28); border-radius:13px; background:linear-gradient(135deg,rgba(249,115,22,.13),var(--card)); }
    .bag-summary-icon { width:38px; height:38px; display:grid; place-items:center; flex:0 0 38px; border-radius:11px; background:rgba(249,115,22,.18); font-size:1.2rem; }
    .bag-inventory-summary strong { color:var(--text); font-size:1rem; }
    .bag-inventory-summary span { color:var(--text-muted); font-size:.78rem; }
    .bag-inventory-summary small { display:block; margin-top:2px; color:var(--text-muted); font-size:.68rem; }
    .bag-inventory-summary small b { color:#fed7aa; }
    .bag-search { display:flex; align-items:center; gap:9px; flex:1; max-width:360px; min-width:180px; padding:0 12px; border:1px solid var(--border); border-radius:12px; background:var(--input-bg); color:var(--text-muted); }
    .bag-search input { width:100%; min-width:0; padding:11px 0; margin:0; border:0; outline:0; background:transparent; color:var(--text); font:inherit; font-size:.85rem; box-shadow:none; }
    .bag-search input:focus { box-shadow:none; }
    .bag-category-filters { display:flex; gap:8px; overflow-x:auto; padding:2px 1px 10px; margin-bottom:10px; scrollbar-width:thin; }
    .bag-filter-button { display:inline-flex; align-items:center; gap:7px; flex:0 0 auto; padding:8px 11px; border:1px solid var(--border); border-radius:999px; background:var(--card); color:var(--text-muted); font:inherit; font-size:.75rem; font-weight:600; cursor:pointer; transition:all .16s ease; }
    .bag-filter-button:hover { border-color:rgba(249,115,22,.55); color:var(--text); }
    .bag-filter-button.active { border-color:#fb923c; background:rgba(249,115,22,.2); color:#fff7ed; box-shadow:0 0 0 1px rgba(249,115,22,.12); }
    .bag-filter-count { min-width:19px; padding:2px 5px; border-radius:999px; background:rgba(255,255,255,.08); color:inherit; text-align:center; font-size:.64rem; }
    .bag-category { margin-bottom: 22px; }
    .bag-cat-title { display:flex; align-items:center; gap:9px; font-size:.9rem; font-weight:750; margin-bottom:11px; color:var(--text); }
    .bag-cat-count { padding:3px 7px; border-radius:999px; background:rgba(255,255,255,.06); color:var(--text-muted); font-size:.65rem; font-weight:700; }
    .bag-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(128px,1fr)); gap:11px; }
    .bag-item { position:relative; min-height:146px; display:flex; flex-direction:column; align-items:center; justify-content:flex-start; padding:13px 10px 11px; border:1px solid rgba(255,255,255,.09); border-radius:12px; background:linear-gradient(155deg,var(--card),rgba(18,16,25,.92)); text-align:center; transition:border-color .15s,transform .15s; }
    .bag-item .item-icon { width:52px; height:52px; object-fit:contain; image-rendering:pixelated; }
    .bag-item-name { max-width:100%; font-size:.76rem; font-weight:650; margin-top:6px; line-height:1.25; }
    .bag-item-qty { margin-top:5px; padding:3px 8px; border-radius:999px; background:rgba(249,115,22,.14); color:#fed7aa; font-size:.7rem; font-weight:750; }
    .bag-use-button { width:100% !important; margin:9px 0 0 !important; padding:7px 8px !important; font-size:.72rem !important; }
    .bag-empty-state { padding:22px 16px; border:1px dashed var(--border); border-radius:13px; color:var(--text-muted); text-align:center; font-size:.86rem; }
    @media(max-width:560px) { .bag-toolbar { align-items:stretch; flex-direction:column; } .bag-inventory-summary { min-width:0; } .bag-search { max-width:none; min-width:0; } .bag-search input { font-size:16px; } .bag-grid { grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; } .bag-item { min-height:140px; padding:11px 8px; } .bag-item .item-icon { width:48px; height:48px; } .bag-filter-button { padding:7px 10px; } }
    .item-catalog-controls { display: flex; flex-wrap: wrap; gap: 10px; margin: 16px 0; }
    .item-catalog-controls input, .item-catalog-controls select {
      flex: 1 1 220px; min-width: 0; padding: 11px 12px; color: var(--text);
      background: var(--input-bg); border: 1px solid var(--border); border-radius: 10px; font: inherit;
    }
    .item-catalog-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(220px,1fr)); gap: 10px; }
    .item-catalog-card { display: flex; gap: 12px; align-items: flex-start; min-width: 0; padding: 12px; background: var(--card); border: 1px solid var(--border); border-radius: 12px; }
    .item-catalog-icon { width: 42px; height: 42px; flex: 0 0 42px; object-fit: contain; image-rendering: pixelated; }
    .item-catalog-copy { min-width: 0; }
    .item-catalog-copy strong { display: block; font-size: .88rem; }
    .item-catalog-copy small { display: block; margin-top: 3px; color: var(--primary-hover); font-size: .7rem; }
    .item-catalog-copy p { margin-top: 6px; color: var(--text-muted); font-size: .76rem; line-height: 1.4; }
    .item-catalog-availability { display: inline-block; margin-top: 7px; padding: 3px 6px; border-radius: 6px; color: #a1a1aa; background: var(--input-bg); font-size: .66rem; }
    .item-catalog-availability.active { color: var(--success); }
    .item-catalog-action { width: auto; margin: 8px 0 0; padding: 6px 9px; font-size: .72rem; }
    .item-catalog-pages { display: flex; justify-content: center; align-items: center; gap: 12px; margin: 16px 0; }


    /* Battle intro transition */
    #battleIntro {
      display: none; position: fixed; inset: 0; z-index: 110;
      background: #000; align-items: center; justify-content: center;
      flex-direction: column;
    }
    #battleIntro.active { display: flex; }
    .battle-intro-flash {
      position: absolute; inset: 0;
      background: linear-gradient(110deg, transparent 30%, rgba(255,255,255,0.85) 50%, transparent 70%);
      transform: translateX(-120%);
      animation: introSlash 0.7s ease-out forwards;
    }
    @keyframes introSlash {
      0% { transform: translateX(-120%); opacity: 0; }
      30% { opacity: 1; }
      100% { transform: translateX(120%); opacity: 0; }
    }
    .battle-intro-content { text-align: center; z-index: 1; animation: introPop 0.5s ease 0.15s both; }
    @keyframes introPop {
      from { opacity: 0; transform: scale(0.7); }
      to { opacity: 1; transform: scale(1); }
    }
    .battle-intro-vs {
      font-size: 3.2rem; font-weight: 900; letter-spacing: 0.15em;
      background: linear-gradient(135deg, #fbbf24, #ef4444, #fdba74);
      -webkit-background-clip: text; background-clip: text; color: transparent;
      filter: drop-shadow(0 0 24px rgba(253,186,116,0.45));
    }
    .battle-intro-names {
      display: flex; align-items: center; justify-content: center; gap: 16px;
      margin-top: 12px; font-size: 1.15rem; font-weight: 700;
    }
    .battle-intro-sep { color: var(--text-muted); font-weight: 500; }
    .battle-intro-sub { margin-top: 14px; color: var(--text-muted); font-size: 0.9rem; }

    @media (max-width: 600px) {
      .main { min-width: 0; }
      .content { padding: 18px 12px; }
      .panel-title { font-size: clamp(1.2rem, 5vw, 1.45rem); }
      .panel-desc { margin-bottom: 18px; }
      .stats-row { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-bottom: 22px; }
      .stat-card { min-width: 0; padding: 14px 9px; }
      .stat-card .value { font-size: clamp(1.08rem, 5vw, 1.4rem); overflow-wrap: anywhere; }
      .stat-card-currencies { gap: 7px; font-size: .66rem; }
      .cards-grid { grid-template-columns: minmax(0, 1fr); gap: 12px; }
      .game-card, .admin-panel-card, .social-subpanel { min-width: 0; }
      .admin-detail-pokemon-grid, .pc-item-grid, .item-catalog-grid { grid-template-columns: minmax(0, 1fr); }
      .market-controls { grid-template-columns: minmax(0, 1fr); }
      .market-tabs { width: 100%; }
      .market-tab { min-width: 0; flex: 1 1 0; padding: 10px 8px; }
      .pvp-sides { grid-template-columns: minmax(0, 1fr); }
      .profile-overview-grid { grid-template-columns: minmax(0, 1fr); }
      .topbar-left { gap: 8px; }
      .topbar-actions { flex: 0 0 auto; }
    }
    @media (max-width: 380px) {
      .content { padding: 15px 9px; }
      .topbar { padding-left: 8px; padding-right: 8px; }
      .stats-row { gap: 8px; }
      .stat-card { padding: 12px 7px; }
      .stat-card-currencies { gap: 5px; font-size: .62rem; }
      .quick-mission-title-row { gap: 5px; }
      .quick-mission-progress { gap: 3px; padding: 4px 6px; }
    }

    /* Mobile layout refinements */
    @media (max-width: 600px) {
      html, body { width: 100%; overflow-x: clip; }
      #dashboard::before { background-position:center 34%; background-size:cover; }
      #authFlow { min-height:100vh; min-height:100dvh; padding:max(16px,env(safe-area-inset-top)) 14px max(16px,env(safe-area-inset-bottom)); }
      #dashboard.active, .main { width: 100%; min-width: 0; min-height:100vh; min-height:100dvh; }
      .content, .panel, .container, .card { min-width:0; }
      .content { padding-bottom: calc(20px + env(safe-area-inset-bottom)); }
      #authFlow input, #authFlow select, #authFlow textarea,
      #dashboard input, #dashboard select, #dashboard textarea, dialog input, dialog select, dialog textarea { font-size:16px; }
      .panel-title, .panel-desc, .game-card-title, .game-card-desc, .daily-mission-card p,
      .admin-promote-note, .center-treatment-note { overflow-wrap:anywhere; }
      .topbar {
        padding-top: max(8px, env(safe-area-inset-top));
        padding-left: max(10px, env(safe-area-inset-left));
        padding-right: max(10px, env(safe-area-inset-right));
        backdrop-filter: none;
      }
      .message-notification-menu { position: fixed; top: calc(max(8px, env(safe-area-inset-top)) + 52px); right: max(10px, env(safe-area-inset-right)); left: auto; width: min(350px, calc(100vw - 20px)); max-width: calc(100vw - 20px); }
      .toast { top:max(16px,env(safe-area-inset-top)); }
      .welcome-popup-overlay { padding:max(16px,env(safe-area-inset-top)) 16px max(16px,env(safe-area-inset-bottom)); }
      .topbar-brand { min-width: 0; }
      .topbar-brand-name { overflow: hidden; text-overflow: ellipsis; }
      .topbar-profile .player-name { overflow: hidden; text-overflow: ellipsis; }
      .cards-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
      .game-card { min-width: 0; }
      .game-card-title, .game-card-desc { overflow-wrap: anywhere; }
      .admin-promote-form { grid-template-columns: minmax(0, 1fr); }
      .admin-promote-form .btn { width: 100% !important; min-height: 44px; }
      .admin-panel-hero { gap: 12px; }
      .summary-card, .held-item-picker-card { width: calc(100vw - 24px); max-height: calc(100dvh - 24px); overflow-y: auto; }
      .shop-quantity-content { max-height: calc(100dvh - 24px); overflow-y: auto; }
      .summary-header { gap: 12px; }
      .summary-move { gap: 6px; padding: 8px; font-size: .78rem; }
      .summary-move-controls { margin-left: 4px; }
      .summary-move-controls button { width: 36px; height: 36px; }
      #battleOverlay { padding-bottom: env(safe-area-inset-bottom); }
      .battle-ui { padding: 12px 12px calc(14px + env(safe-area-inset-bottom)); border-radius: 16px 16px 0 0; }
      .battle-log { min-height: 44px; margin-bottom: 10px; padding: 9px 10px; font-size: .82rem; }
      .battle-volume-control { flex-basis:88px; gap:3px; font-size:.58rem; }
      .battle-volume-control input { width:48px; }
      .battle-volume-control output { min-width:24px; font-size:.58rem; }
      .battle-btn, .move-btn, .btn { min-height: 44px; }
      .move-btn { gap: 6px; flex-wrap: wrap; overflow-wrap: anywhere; }
      .battle-result-overlay { padding: 12px; }
      .battle-result { max-height: calc(100dvh - 24px); padding: 22px 12px 14px; border-radius: 16px; }
      .pvp-arena { min-height: calc(100dvh - 150px); }
      .pvp-side-card, .pvp-lobby-box, .pvp-room-box { min-width: 0; }
      .pvp-code { font-size: clamp(1.1rem, 6vw, 1.5rem); overflow-wrap: anywhere; }
      #shopQuantityDialog, #nicknameDialog, #moveLearnDialog, #pokeCoinsStoreDialog, .trainer-avatar-dialog, .social-trade-dialog {
        max-height:calc(100dvh - max(24px, env(safe-area-inset-top) + env(safe-area-inset-bottom)));
        overscroll-behavior:contain;
      }
      #shopQuantityDialog, #nicknameDialog { overflow-y:auto; }
      #pokeCoinsStoreDialog { max-height:calc(100dvh - 24px); }
      .social-trade-dialog, .social-trade-dialog-inner { max-height:calc(100dvh - 24px); }
      .trainer-avatar-dialog { max-height:calc(100dvh - 24px); }
    }
    @media (max-width: 380px) {
      .cards-grid { grid-template-columns: minmax(0, 1fr); }
      .topbar { gap: 6px; }
      .topbar-brand-name { font-size: .72rem; }
      .topbar-actions { gap: 5px; }
      .topbar-profile { max-width: 92px; }
      .topbar-profile .player-meta { display: none; }
      .topbar-logout { padding: 6px; font-size: .66rem; }
      .content { padding-bottom: calc(16px + env(safe-area-inset-bottom)); }
      .daily-login-week, .weekly-login-days { gap: 3px; }
    }
    @media (max-width: 480px) {
      #gymsGrid .game-card-meta, #eliteFourGrid .game-card-meta,
      #ssAnneGrid .game-card-meta, #silphCoGrid .game-card-meta,
      #dojoGrid .game-card-meta {
        flex-direction: column; align-items: flex-start; justify-content: flex-start; gap: 7px;
      }
      #gymsGrid .game-card-meta .reward, #eliteFourGrid .game-card-meta .reward,
      #ssAnneGrid .game-card-meta .reward, #silphCoGrid .game-card-meta .reward,
      #dojoGrid .game-card-meta .reward {
        max-width: 100%; overflow-wrap: anywhere; line-height: 1.25;
      }
      #panel-home > .cards-grid { grid-template-columns: minmax(0, 1fr); gap: 10px; }
      #panel-home > .cards-grid > .game-card { display: grid; grid-template-columns: 100px minmax(0, 1fr); align-items: stretch; }
      #panel-home > .cards-grid > .game-card > .game-card-header { width: 100px; height: auto !important; min-height: 104px; padding: 8px !important; border-radius: 15px 0 0 15px; overflow: hidden; }
      #panel-home > .cards-grid > #gameCornerHomeCard > .game-card-header,
      #panel-home > .cards-grid > #ssAnneHomeCard > .game-card-header { aspect-ratio:auto; }
      #panel-home > .cards-grid > #silphCoHomeCard > .game-card-header { aspect-ratio:auto; }
      #panel-home > .cards-grid > #battleTowerHomeCard > .game-card-header { aspect-ratio:auto; }
      #panel-home > .cards-grid > #missionHomeCard > .game-card-header { aspect-ratio:auto; }
      #panel-home > .cards-grid > #progressGuideHomeCard > .game-card-header { aspect-ratio:auto; }
      #panel-home > .cards-grid > #gymsHomeCard > .game-card-header { aspect-ratio:auto; }
      #panel-home > .cards-grid > #explorationHomeCard > .game-card-header { aspect-ratio:auto; }
      #panel-home > .cards-grid > #pokemonCenterHomeCard > .game-card-header { aspect-ratio:auto; }
      #panel-home > .cards-grid > #pokeMarketHomeCard > .game-card-header { aspect-ratio:auto; }
      #panel-home > .cards-grid > #seasonPassHomeCard > .game-card-header { aspect-ratio:auto; }
      #panel-home > .cards-grid > #pvpHomeCard > .game-card-header { aspect-ratio:auto; }
      #panel-home > .cards-grid > #dailyBossHomeCard > .game-card-header { aspect-ratio:auto; }
      #panel-home > .cards-grid > #eliteFourHomeCard > .game-card-header { aspect-ratio:auto; }
      #panel-home > .cards-grid > #gameCornerHomeCard > .game-card-header img,
      #panel-home > .cards-grid > #ssAnneHomeCard > .game-card-header img { width:100% !important; height:auto !important; max-width:100% !important; max-height:100% !important; object-fit:contain; }
      #panel-home > .cards-grid > #silphCoHomeCard > .game-card-header img { width:100% !important; height:auto !important; max-width:100% !important; max-height:100% !important; object-fit:contain; }
      #panel-home > .cards-grid > #battleTowerHomeCard > .game-card-header img { width:100% !important; height:auto !important; max-width:100% !important; max-height:100% !important; object-fit:contain; }
      #panel-home > .cards-grid > #missionHomeCard > .game-card-header img { width:100% !important; height:auto !important; max-width:100% !important; max-height:100% !important; object-fit:contain; }
      #panel-home > .cards-grid > #progressGuideHomeCard > .game-card-header img { width:100% !important; height:auto !important; max-width:100% !important; max-height:100% !important; object-fit:contain; }
      #panel-home > .cards-grid > #gymsHomeCard > .game-card-header img { width:100% !important; height:auto !important; max-width:100% !important; max-height:100% !important; object-fit:contain; }
      #panel-home > .cards-grid > #explorationHomeCard > .game-card-header img { width:100% !important; height:auto !important; max-width:100% !important; max-height:100% !important; object-fit:contain; }
      #panel-home > .cards-grid > #pokemonCenterHomeCard > .game-card-header img { width:100% !important; height:auto !important; max-width:100% !important; max-height:100% !important; object-fit:contain; }
      #panel-home > .cards-grid > #seasonPassHomeCard > .game-card-header img { width:100% !important; height:auto !important; max-width:100% !important; max-height:100% !important; object-fit:contain; }
      #panel-home > .cards-grid > #pvpHomeCard > .game-card-header img { width:100% !important; height:auto !important; max-width:100% !important; max-height:100% !important; object-fit:contain; }
      #panel-home > .cards-grid > #dailyBossHomeCard > .game-card-header img { width:100% !important; height:auto !important; max-width:100% !important; max-height:100% !important; object-fit:contain; }
      #panel-home > .cards-grid > #eliteFourHomeCard > .game-card-header img { width:100% !important; height:auto !important; max-width:100% !important; max-height:100% !important; object-fit:contain; }
      #panel-home > .cards-grid > .game-card > .game-card-header img { width: auto !important; height: auto !important; max-width: 100% !important; max-height: 100% !important; }
      #panel-home > .cards-grid > .game-card > .poke-coins-quick-header { flex-direction: column; gap: 0; }
      #panel-home > .cards-grid > .game-card > .poke-coins-quick-header .poke-coins-gem { font-size: 4rem; flex: 0 0 auto; }
      #panel-home > .cards-grid > .game-card > .poke-coins-quick-header .poke-coins-quick-header-copy { display: none; }
      #panel-home > .cards-grid > .game-card > .game-card-body { min-width: 0; padding: 12px 14px; display: flex; flex-direction: column; justify-content: center; }
      #panel-home > .cards-grid .game-card-title, #panel-home > .cards-grid .game-card-desc { overflow-wrap: anywhere; }
      #panel-home > .cards-grid .game-card-desc { margin-bottom: 0; }
      #marketGrid > .game-card { display:flex; flex-direction:column; min-width:0; overflow:hidden; }
      #marketGrid > .game-card > .game-card-header { flex:0 0 88px; height:88px; }
      #marketGrid > .game-card > .game-card-body { display:flex; flex:1; flex-direction:column; min-width:0; padding:12px; }
      #marketGrid > .game-card .game-card-title { line-height:1.25; overflow-wrap:anywhere; }
      #marketGrid > .game-card .game-card-desc { flex:1; margin-bottom:12px; line-height:1.4; }
      #marketGrid > .game-card .game-card-meta { display:flex; flex-direction:column; align-items:stretch; gap:8px; margin-top:auto; }
      #marketGrid > .game-card .game-card-meta .reward { display:flex; align-items:center; justify-content:space-between; gap:5px; min-width:0; white-space:nowrap; }
      #marketGrid > .game-card .game-card-meta .reward > span:first-child { white-space:nowrap; }
      #marketGrid > .game-card .shop-buy-button { width:100%; min-height:42px; }
      #panel-home > .cards-grid .quick-mission-title-row { align-items: flex-start; gap: 6px; }
      #panel-home > .cards-grid .quick-mission-title-row .game-card-title { flex: 1 1 auto; min-width: 0; }
      #panel-home > .cards-grid .quick-mission-progress { flex: 0 0 auto; gap: 4px; margin-left: 0; padding: 4px 6px; }
      #panel-dungeons #dungeonsGrid { grid-template-columns: minmax(0, 1fr); gap: 12px; }
      #panel-dungeons #dungeonsGrid .game-card-header { height: clamp(140px, 38vw, 170px) !important; }
    }
    @media (max-width: 900px) and (max-height: 520px) and (orientation: landscape) {
      #battleOverlay { justify-content:flex-start; overflow-y:auto; }
      #battleOverlay .battle-field { flex:0 0 auto; min-height:220px; padding:10px 12px 4px; }
      #battleOverlay .enemy-sprite { width:clamp(72px,18vh,96px); height:clamp(72px,18vh,96px); }
      #battleOverlay .player-sprite { width:clamp(76px,19vh,104px); height:clamp(76px,19vh,104px); }
      #battleOverlay .battle-enemy .enemy-info, #battleOverlay .battle-player .player-info { min-width:0; padding:6px 8px; }
      #battleOverlay .battle-ui { flex:0 0 auto; padding:8px 10px calc(10px + env(safe-area-inset-bottom)); border-radius:14px 14px 0 0; }
      #battleOverlay .battle-log { min-height:38px; margin-bottom:7px; padding:7px 9px; font-size:.78rem; }
      #battleOverlay .battle-btn, #battleOverlay .move-btn { min-height:40px; padding:8px; }
      .coop-boss-arena { min-height:560px; }
      .coop-boss-arena .battle-field { min-height:340px; padding:58px 12px 6px; }
      .coop-boss-arena .battle-ui { flex:0 0 auto; }
      .pvp-arena { min-height:460px; }
      .pvp-arena .battle-field { min-height:280px; padding:42px 10px 5px; }
    }

    .trainer-card-vip-status { display:block; margin-top:4px; color:#fbbf24; font-size:.68rem; font-weight:800; }
    .trainer-card-vip-benefits { display:grid; gap:5px; margin:10px 0 0; padding:10px 11px; border:1px solid rgba(251,191,36,.27); border-radius:9px; background:rgba(251,191,36,.07); color:#f2dfb0; font-size:.72rem; line-height:1.4; list-style:none; }
    .trainer-card-vip-benefits[hidden] { display:none; }
    .trainer-card-vip-benefits li { position:relative; padding-left:14px; }
    .trainer-card-vip-benefits li::before { position:absolute; left:0; color:#fbbf24; content:"✦"; }
    .trainer-card-identity-panel .trainer-card-vip-benefits { grid-column:1/-1; }
    .vip-profile-name { color:#fbbf24 !important; text-shadow:0 0 12px rgba(251,191,36,.35); }

    #seasonPassHomeCard .season-pass-home-art { height:auto; aspect-ratio:1.78; overflow:hidden; padding:0; background:#d9950d; }
    #seasonPassHomeCard .season-pass-home-art img { display:block; width:100%; height:100%; object-fit:contain; }
    #pvpHomeCard .game-card-header { height:auto; aspect-ratio:1.78; overflow:hidden; padding:0; background:#1d1225; }
    #pvpHomeCard .game-card-header img { display:block; width:100%; height:100%; object-fit:contain; }
    #dailyBossHomeCard .game-card-header { height:auto; aspect-ratio:1.78; overflow:hidden; padding:0; background:#d99317; }
    #dailyBossHomeCard .game-card-header img { display:block; width:100%; height:100%; object-fit:contain; }
    #eliteFourHomeCard .game-card-header { height:auto; aspect-ratio:1.78; overflow:hidden; padding:0; background:#291525; }
    #eliteFourHomeCard .game-card-header img { display:block; width:100%; height:100%; object-fit:contain; }
    .season-pass-shell { display:grid; gap:18px; }
    .season-pass-hero { display:grid; grid-template-columns:minmax(0,1.35fr) minmax(230px,.65fr); gap:24px; align-items:center; padding:26px; border:1px solid #9a4d1e88; border-radius:20px; background:radial-gradient(ellipse at 80% 35%,#f9731626,transparent 44%),linear-gradient(115deg,#382013,#171318 70%); }
    .season-pass-kicker { color:#fb923c; font-size:.76rem; font-weight:900; letter-spacing:.12em; text-transform:uppercase; }
    .season-pass-hero h2 { margin:6px 0; font-size:clamp(1.45rem,3vw,2.1rem); }
    .season-pass-hero p { margin:0; color:var(--text-muted); }
    .season-pass-progress { display:grid; gap:8px; padding:16px; border:1px solid var(--border); border-radius:14px; background:#0b0b0f99; }
    .season-pass-progress strong { color:#fdba74; font-size:1.2rem; }
    .season-pass-progress span { color:var(--text-muted); font-size:.82rem; }
    .season-pass-progress-track { height:9px; overflow:hidden; border-radius:99px; background:#292630; }
    .season-pass-progress-track i { display:block; height:100%; width:0; border-radius:inherit; background:linear-gradient(90deg,#f97316,#fdba74); transition:width .25s; }
    .season-pass-track-grid { display:grid; gap:14px; }
    .season-pass-track { min-width:0; overflow:hidden; padding:16px; border:1px solid var(--border); border-radius:16px; background:var(--card); }
    .season-pass-track header { display:flex; align-items:center; gap:12px; margin-bottom:14px; }
    .season-pass-track header h3 { margin:0 0 3px; }
    .season-pass-track header p { margin:0; color:var(--text-muted); font-size:.8rem; }
    .season-pass-medal { position:relative; display:block; flex:0 0 90px; width:90px; height:42px; overflow:hidden; }
    .season-pass-medal img { position:absolute; top:-53px; left:-30px; width:150px; height:150px; max-width:none; object-fit:fill; image-rendering:pixelated; }
    .season-pass-rewards { display:grid; grid-template-columns:repeat(30,minmax(105px,1fr)); grid-template-rows:repeat(2,minmax(104px,auto)); gap:9px; overflow-x:auto; padding:3px 1px 8px; }
    .season-pass-reward { position:relative; display:grid; min-height:104px; align-content:center; justify-items:center; gap:8px; padding:14px 8px 9px; border:1px solid #38343f; border-radius:10px; background:#0d0d12; text-align:center; }
    .season-pass-reward.unlocked { border-color:#f9731688; background:linear-gradient(145deg,#462515,#171318); }
    .season-pass-reward.claimed { border-color:#256c48; background:linear-gradient(145deg,#153323,#111519); }
    .season-pass-level { position:absolute; top:-7px; left:calc(50% - 14px); display:grid; width:28px; height:28px; place-items:center; border-radius:50%; color:#171318; background:#fdba74; font-weight:900; }
    .season-pass-reward strong { margin-top:8px; font-size:.84rem; }
    .season-pass-reward button { width:100%; min-height:31px; border:1px solid #f97316; border-radius:7px; color:#fff; background:#c64b0b; font:inherit; font-size:.7rem; font-weight:800; cursor:pointer; }
    .season-pass-reward button:disabled { border-color:#34323a; color:#85828d; background:#24232a; cursor:default; }
    @media(max-width:720px) { .season-pass-hero { grid-template-columns:1fr; gap:16px; padding:19px; } .season-pass-track { padding:13px; } }

    .game-corner-page { display:grid; gap:14px; }
    .game-corner-page-head { display:flex; align-items:center; justify-content:space-between; gap:20px; padding:20px 22px; border:1px solid #a855f755; border-radius:16px; background:radial-gradient(ellipse at 84% 20%,#a855f722,transparent 40%),linear-gradient(120deg,#271738,#15121c); }
    .game-corner-page-head h2 { margin:3px 0 6px; font-size:1.55rem; }
    .game-corner-page-head p { max-width:690px; margin:0; color:var(--text-muted); font-size:.9rem; }
    .game-corner-eyebrow { color:#fbbf24; font-size:.72rem; font-weight:900; letter-spacing:.13em; text-transform:uppercase; }
    .game-corner-wallet { display:grid; grid-template-columns:auto auto; gap:5px 12px; align-items:center; padding:12px 15px; border:1px solid #f59e0b55; border-radius:12px; background:#0d0b12cc; white-space:nowrap; }
    .game-corner-wallet span { color:var(--text-muted); font-size:.74rem; }
    .game-corner-wallet strong { color:#fbbf24; font-size:.9rem; text-align:right; }
    .game-corner-tabs { display:flex; gap:8px; width:max-content; max-width:100%; padding:5px; border:1px solid var(--border); border-radius:12px; background:var(--card); }
    .game-corner-tab { min-height:40px; padding:9px 16px; border:0; border-radius:8px; color:var(--text-muted); background:transparent; font:inherit; font-weight:800; cursor:pointer; }
    .game-corner-tab.active { color:#fff; background:linear-gradient(135deg,#9333ea,#6b21a8); box-shadow:0 4px 14px #9333ea44; }
    .game-corner-game { overflow:hidden; border:1px solid #7e22ce66; border-radius:16px; background:#0b0712; }
    .game-corner-game iframe { display:block; width:100%; height:930px; border:0; background:#0b0712; }
    .game-corner-game iframe[hidden] { display:none; }
    .game-corner-prize-shop { display:grid; gap:16px; padding:22px; }
    .game-corner-confirm-dialog { width:min(420px,calc(100vw - 28px)); max-width:none; margin:auto; padding:0; overflow:hidden; border:1px solid rgba(192,132,252,.62); border-radius:18px; background:radial-gradient(ellipse at 50% 0%,rgba(147,51,234,.2),transparent 62%),#17121f; color:var(--text); box-shadow:0 24px 80px #000b,0 0 34px #9333ea26; }
    .game-corner-confirm-dialog::backdrop { background:rgba(5,4,10,.78); backdrop-filter:blur(5px); }
    .game-corner-confirm-inner { padding:22px; }
    .game-corner-confirm-kicker { color:#c084fc; font-size:.68rem; font-weight:850; letter-spacing:.12em; text-transform:uppercase; }
    .game-corner-confirm-inner h2 { margin:7px 0 8px; font-size:1.25rem; }
    .game-corner-confirm-prize { display:flex; align-items:center; gap:14px; margin-top:14px; }
    .game-corner-confirm-prize img { display:block; flex:0 0 68px; width:68px; height:68px; object-fit:contain; image-rendering:pixelated; border-radius:12px; background:#0d0b12; }
    .game-corner-confirm-inner p { margin:0; color:var(--text-muted); line-height:1.5; }
    .game-corner-confirm-actions { display:flex; justify-content:flex-end; gap:9px; margin-top:22px; }
    .game-corner-confirm-actions button { min-height:42px; padding:9px 14px; border:1px solid #fbbf24; border-radius:10px; color:#fff; background:linear-gradient(135deg,#ea580c,#c2410c); font:inherit; font-weight:800; cursor:pointer; }
    .game-corner-confirm-actions .game-corner-confirm-cancel { border-color:var(--border); color:var(--text-muted); background:#211e29; }
    @media(max-width:420px) { .game-corner-confirm-inner { padding:19px; } .game-corner-confirm-actions button { flex:1; padding-inline:8px; font-size:.88rem; } }
    .game-corner-acquired-dialog { width:min(390px,calc(100vw - 28px)); max-width:none; margin:auto; padding:0; overflow:hidden; border:1px solid rgba(192,132,252,.7); border-radius:22px; background:radial-gradient(ellipse at 50% 20%,rgba(147,51,234,.28),transparent 62%),linear-gradient(155deg,#1d1727,#111018 72%); color:var(--text); box-shadow:0 26px 90px #000c,0 0 48px #9333ea35; }
    .game-corner-acquired-dialog::backdrop { background:rgba(5,4,10,.78); backdrop-filter:blur(6px); animation:gameCornerAcquiredFade .22s ease both; }
    .game-corner-acquired-inner { position:relative; display:grid; justify-items:center; padding:26px 24px 22px; text-align:center; }
    .game-corner-acquired-dialog[open] .game-corner-acquired-inner { animation:gameCornerAcquiredPop .42s cubic-bezier(.18,.85,.28,1.25) both; }
    .game-corner-acquired-kicker { color:#d8b4fe; font-size:.7rem; font-weight:900; letter-spacing:.14em; text-transform:uppercase; }
    .game-corner-acquired-sprite { width:116px; height:116px; margin:6px 0 2px; object-fit:contain; image-rendering:pixelated; filter:drop-shadow(0 0 18px #c084fc80); animation:gameCornerAcquiredFloat 1.8s ease-in-out infinite; }
    .game-corner-acquired-inner h2 { margin:5px 0 7px; font-size:1.35rem; }
    .game-corner-acquired-message { margin:0; color:var(--text-muted); line-height:1.5; }
    .game-corner-acquired-close { width:100%; min-height:44px; margin-top:21px; padding:10px 16px; border:1px solid #fbbf24; border-radius:10px; color:#fff; background:linear-gradient(135deg,#ea580c,#c2410c); font:inherit; font-weight:850; cursor:pointer; }
    @keyframes gameCornerAcquiredPop { from { opacity:0; transform:translateY(18px) scale(.82); } to { opacity:1; transform:translateY(0) scale(1); } }
    @keyframes gameCornerAcquiredFade { from { opacity:0; } to { opacity:1; } }
    @keyframes gameCornerAcquiredFloat { 0%,100% { transform:translateY(0) scale(1); } 50% { transform:translateY(-5px) scale(1.045); } }
    @media(prefers-reduced-motion:reduce) { .game-corner-acquired-dialog::backdrop,.game-corner-acquired-dialog[open] .game-corner-acquired-inner,.game-corner-acquired-sprite { animation:none; } }
    .game-corner-prize-shop[hidden] { display:none; }
    .game-corner-prize-heading { display:flex; align-items:center; justify-content:space-between; gap:18px; }
    .game-corner-prize-heading h3 { margin:4px 0; font-size:1.35rem; }
    .game-corner-prize-heading p,.game-corner-prize-note { margin:0; color:var(--text-muted); font-size:.84rem; }
    .game-corner-prize-filters { display:flex; flex-wrap:wrap; gap:8px; }
    .game-corner-prize-filters button { padding:8px 14px; border:1px solid var(--border); border-radius:9px; color:var(--text-muted); background:var(--card); font:inherit; font-weight:800; cursor:pointer; }
    .game-corner-prize-filters button.active { color:#fff; border-color:#c084fc; background:linear-gradient(135deg,#9333ea,#6b21a8); }
    .game-corner-prize-totals { color:var(--text-muted); font-size:.8rem; font-weight:700; }
    .game-corner-prize-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(220px,1fr)); gap:12px; }
    .game-corner-prize-card { display:grid; grid-template-columns:58px minmax(0,1fr); align-items:center; gap:12px; min-width:0; padding:13px; border:1px solid var(--border); border-radius:12px; background:linear-gradient(145deg,#191521,#111018); }
    .game-corner-prize-pokemon-card { min-height:148px; align-content:space-between; }
    .game-corner-prize-card img,.game-corner-prize-icon { display:grid; place-items:center; width:58px; height:58px; object-fit:contain; image-rendering:pixelated; border-radius:10px; background:#0d0b12; }
    .game-corner-prize-icon { color:#fbbf24; font-size:1.5rem; font-weight:900; }
    .game-corner-prize-copy { min-width:0; }
    .game-corner-prize-copy strong { display:block; overflow-wrap:anywhere; font-size:.9rem; }
    .game-corner-prize-copy small { display:block; margin-top:3px; color:var(--text-muted); font-size:.72rem; line-height:1.35; }
    .game-corner-prize-meta { grid-column:1/-1; display:flex; align-items:center; justify-content:space-between; gap:8px; color:#fbbf24; font-size:.76rem; font-weight:800; }
    .game-corner-prize-meta .game-corner-prize-chip-cost { color:#fbbf24; font-weight:800; }
    .game-corner-cost-tooltip { position:relative; margin-left:auto; }
    .game-corner-cost-tooltip summary { display:grid; place-items:center; width:22px; height:22px; list-style:none; border:1px solid #a78bfa88; border-radius:50%; background:#302044; color:#ddd6fe; font-size:.72rem; font-weight:900; cursor:help; }
    .game-corner-cost-tooltip summary::-webkit-details-marker { display:none; }
    .game-corner-cost-tooltip summary:focus-visible { outline:2px solid #c4b5fd; outline-offset:2px; }
    .game-corner-cost-tooltip-bubble { position:absolute; z-index:30; right:0; bottom:calc(100% + 9px); width:max-content; max-width:min(230px,calc(100vw - 36px)); padding:9px 11px; border:1px solid #7c5bb8; border-radius:9px; background:#211936; color:#f4f0ff; box-shadow:0 10px 24px #000a; font-size:.75rem; font-weight:700; line-height:1.5; text-align:left; white-space:normal; opacity:0; visibility:hidden; transform:translateY(4px); transition:opacity .14s ease,transform .14s ease,visibility .14s ease; pointer-events:none; }
    .game-corner-cost-tooltip-bubble small { display:block; margin-top:4px; color:#c4b5fd; font-size:.67rem; font-weight:500; }
    .game-corner-cost-tooltip:hover .game-corner-cost-tooltip-bubble,
    .game-corner-cost-tooltip:focus-within .game-corner-cost-tooltip-bubble,
    .game-corner-cost-tooltip[open] .game-corner-cost-tooltip-bubble { opacity:1; visibility:visible; transform:translateY(0); }
    @media(max-width:600px) {
      .game-corner-cost-tooltip-bubble { position:fixed; z-index:1000; top:50%; right:auto; bottom:auto; left:50%; width:min(260px,calc(100vw - 32px)); max-width:calc(100vw - 32px); transform:translate(-50%,-50%); }
      .game-corner-cost-tooltip:hover .game-corner-cost-tooltip-bubble,
      .game-corner-cost-tooltip:focus-within .game-corner-cost-tooltip-bubble,
      .game-corner-cost-tooltip[open] .game-corner-cost-tooltip-bubble { transform:translate(-50%,-50%); }
    }
    .game-corner-prize-buy { grid-column:1/-1; width:100%; min-height:38px; padding:8px 10px; border:1px solid #fbbf24; border-radius:9px; color:#fff; background:linear-gradient(135deg,#ea580c,#c2410c); font:inherit; font-size:.8rem; font-weight:800; cursor:pointer; }
    .game-corner-prize-pokemon-card .game-corner-prize-buy { min-height:42px; font-size:.76rem; line-height:1.2; }
    .game-corner-prize-buy:disabled { border-color:var(--border); color:var(--text-muted); background:#25232b; cursor:not-allowed; }
    @media(max-width:600px) { .game-corner-page-head { align-items:stretch; flex-direction:column; padding:16px; } .game-corner-wallet { width:100%; } .game-corner-tabs { width:100%; } .game-corner-tab { flex:1; min-width:0; padding:8px 6px; font-size:.78rem; } .game-corner-game iframe { height:970px; } .game-corner-prize-shop { padding:14px; } .game-corner-prize-heading { align-items:stretch; flex-direction:column; } .game-corner-prize-grid { grid-template-columns:repeat(auto-fill,minmax(170px,1fr)); } }

    /* Keep every battle mode on the same field, status-card and command-panel layout. */
    .pvp-arena, .coop-boss-arena {
      width:100%; max-width:1000px; min-height:min(82vh,760px); margin:0 auto;
      align-items:center; justify-content:flex-end;
    }
    .pvp-arena .battle-field, .coop-boss-arena .battle-field {
      width:100%; max-width:780px; min-height:0; flex:1 1 auto;
      justify-content:space-between; gap:12px; padding:28px 24px 8px;
    }
    .pvp-arena .battle-enemy, .coop-boss-arena .battle-enemy {
      display:flex; align-items:flex-start; justify-content:space-between; gap:20px;
      padding:0 6% 0 2%;
    }
    .pvp-arena .battle-player, .coop-boss-arena .battle-player {
      display:flex; align-items:flex-end; justify-content:space-between; gap:16px;
      margin-bottom:8px; padding:0 2% 0 8%;
    }
    .pvp-arena .enemy-info, .pvp-arena .player-info,
    .coop-boss-arena .enemy-info, .coop-boss-arena .player-info {
      width:auto; min-width:200px; max-width:min(440px,62vw); padding:12px 16px;
      border:2px solid rgba(255,255,255,.12); border-radius:14px;
      background:rgba(12,14,22,.88); box-shadow:0 8px 28px rgba(0,0,0,.45);
      backdrop-filter:blur(8px);
    }
    .pvp-arena .battle-ui, .coop-boss-arena .battle-ui {
      width:100%; max-width:700px; flex:0 0 auto; padding:16px 20px 20px;
      border:0; border-top:3px solid var(--primary); border-radius:20px 20px 0 0;
      background:var(--card); box-shadow:0 -8px 32px rgba(0,0,0,.4);
    }
    .pvp-arena .battle-log, .coop-boss-arena .battle-log {
      min-height:52px; margin-bottom:14px; padding:12px 14px;
      border:1px solid var(--border); border-radius:10px;
      background:var(--input-bg); color:var(--text); font-weight:400;
    }
    .pvp-arena .pvp-turn-prompt, .coop-boss-arena .pvp-turn-prompt {
      display:block; margin:12px 0 0; color:var(--text-muted); font-size:.82rem; font-weight:400;
    }
    .coop-boss-arena .coop-raid-roster { justify-content:center; margin:0 0 12px; }
    .pvp-arena .battle-actions, .coop-boss-arena .battle-actions { gap:10px; }

    @media(max-width:700px) {
      .pvp-arena, .coop-boss-arena { min-height:min(82vh,680px); }
      .pvp-arena .battle-field, .coop-boss-arena .battle-field { padding:22px 12px 6px; gap:8px; }
      .pvp-arena .battle-enemy, .coop-boss-arena .battle-enemy { gap:6px; padding:0 2%; }
      .pvp-arena .battle-player, .coop-boss-arena .battle-player { gap:6px; margin-bottom:6px; padding:0 2% 0 4%; }
      .pvp-arena .enemy-info, .pvp-arena .player-info,
      .coop-boss-arena .enemy-info, .coop-boss-arena .player-info {
        width:min(58%,240px); min-width:0; padding:8px 10px;
      }
      .coop-boss-arena .enemy-info.daily-boss-info { width:min(58%,240px); min-width:0; padding:8px 10px; }
      .pvp-arena .battle-ui, .coop-boss-arena .battle-ui { padding:12px 12px calc(14px + env(safe-area-inset-bottom)); }
      .pvp-arena .battle-log, .coop-boss-arena .battle-log { min-height:42px; margin-bottom:10px; padding:9px 10px; font-size:.82rem; }
    }

    .coop-boss-arena .battle-enemy { padding-left:0; }
    .coop-boss-arena .battle-field { max-width:100%; }
    .coop-boss-arena .battle-player { width:100%; max-width:780px; margin-left:auto; margin-right:auto; }
    .coop-boss-arena .enemy-info.daily-boss-info.coop-mewtwo-info {
      width:min(380px,52vw); min-width:0; max-width:100%; margin-left:0; margin-right:auto;
    }
    @media(max-width:700px) {
      .coop-boss-arena .battle-enemy { padding:0; }
      .coop-boss-arena .enemy-info.daily-boss-info.coop-mewtwo-info { width:min(100%,250px); }
      .coop-boss-arena .enemy-stage { width:clamp(112px,34vw,160px); flex:0 0 auto; }
      .coop-boss-arena .enemy-sprite { width:clamp(112px,34vw,160px); height:clamp(112px,34vw,160px); }
    }

    /* Compact pixel-style Pokémon status panels in the main battle screen. */
    #battleOverlay .battle-enemy .enemy-info:not(.daily-boss-info),
    #battleOverlay .battle-player .player-info {
      min-width:210px; padding:9px 12px; border:3px solid #11131a; border-radius:4px;
      background-color:rgba(0,0,0,.30);
      background-image:linear-gradient(160deg,rgba(255,255,255,.08),rgba(0,0,0,.18));
      color:#f4f4f5; box-shadow:3px 3px 0 #08090d, inset 0 0 0 2px rgba(255,255,255,.24);
      -webkit-backdrop-filter:blur(7px); backdrop-filter:blur(7px);
    }
    #battleOverlay .battle-pokemon-name-row { display:flex; align-items:center; justify-content:space-between; gap:10px; min-width:0; margin-bottom:4px; }
    #battleOverlay .battle-pokemon-name-row .poke-name { min-width:0; overflow:hidden; color:#fff; font-family:"Courier New",monospace; font-size:.88rem; font-weight:900; text-overflow:ellipsis; white-space:nowrap; }
    #battleOverlay .battle-pokemon-name-row .poke-level { flex:0 0 auto; margin:0; color:#f4f4f5; font-family:"Courier New",monospace; font-size:.7rem; font-weight:900; }
    #battleOverlay .battle-level-type-row { display:none; }
    #battleOverlay .enemy-caught-badge { display:none !important; }
    #battleOverlay .hp-label { margin-bottom:2px; color:#f4f4f5; font-family:"Courier New",monospace; font-size:.62rem; font-weight:900; }
    #battleOverlay .hp-bar { height:10px; border:2px solid #11131a; border-radius:2px; background:#20212a; box-shadow:inset 0 0 0 1px #08090d; }
    #battleOverlay .hp-fill { border-radius:0; background:linear-gradient(180deg,#7dff59,#27d83c); box-shadow:inset 0 1px rgba(255,255,255,.48); }
    #battleOverlay .hp-fill.yellow { background:linear-gradient(180deg,#ffe85c,#edbc22); }
    #battleOverlay .hp-fill.red { background:linear-gradient(180deg,#ff6d61,#e52732); }
    #battleOverlay .xp-bar { height:6px; margin-top:3px; border:1px solid #11131a; border-radius:2px; background:#20212a; }
    #battleOverlay .xp-fill { border-radius:0; background:linear-gradient(180deg,#ffd166,#f97316); }
    @media(max-width:600px) {
      #battleOverlay .battle-enemy .enemy-info:not(.daily-boss-info),
      #battleOverlay .battle-player .player-info { min-width:0; width:min(56vw,230px); padding:7px 9px; }
      #battleOverlay .battle-pokemon-name-row .poke-name { font-size:.78rem; }
    }

    /* Final mobile overrides for the PvP room and compact header. */
    @media (max-width: 520px) {
      .topbar { padding:8px 10px; gap:6px; }
      .topbar-left { flex:0 0 auto; gap:0; }
      .topbar-actions { flex:1 1 auto; justify-content:flex-end; gap:6px; }
      .topbar-brand { gap:5px; }
      .topbar-brand-mark { width:30px; height:30px; }
      .topbar-brand-name { font-size:.82rem; }
      .message-notification-button { width:36px; height:36px; }
      .topbar-profile { max-width:102px; padding:4px 6px; gap:5px; }
      .topbar-profile .player-avatar { width:27px; height:27px; }
      .topbar-profile .player-meta { display:none; }
      .topbar-profile .player-name { max-width:54px; font-size:.72rem; }
      .topbar-logout { padding:7px 8px; font-size:.7rem; }
      .pvp-arena { min-height:0; min-height:calc(100dvh - 112px); justify-content:flex-start; }
      .pvp-room-toolbar { position:relative; inset:auto; z-index:3; width:100%; flex:0 0 auto; display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:center; gap:7px 10px; padding:10px 12px; border-bottom:1px solid #ffffff18; background:rgba(9,13,24,.72); backdrop-filter:blur(8px); }
      .pvp-room-toolbar > span:first-of-type { min-width:0; font-size:.84rem; line-height:1.25; }
      .pvp-room-toolbar .pvp-code { letter-spacing:.08em; }
      .pvp-room-clock { justify-self:end; }
      .pvp-room-toolbar .btn { grid-column:2; grid-row:2; min-height:34px; padding:6px 9px; font-size:.72rem; }
      .pvp-arena .battle-field { width:100%; min-height:0; flex:1 1 auto; padding:14px 8px 6px; gap:12px; }
      .pvp-arena .battle-enemy, .pvp-arena .battle-player { width:100%; min-width:0; gap:5px; padding:0 2%; }
      .pvp-arena .enemy-info, .pvp-arena .player-info { width:min(58%,220px); min-width:0; max-width:220px; padding:7px 8px; }
      .pvp-arena .enemy-sprite, .pvp-arena .player-sprite { width:clamp(76px,23vw,108px); height:clamp(76px,23vw,108px); }
      .pvp-arena .enemy-sprite.rillaboom-battle-sprite, .pvp-arena .enemy-sprite.annihilape-battle-sprite, .pvp-arena .player-sprite.rillaboom-battle-sprite, .pvp-arena .player-sprite.annihilape-battle-sprite { width:clamp(90px,26vw,126px); height:clamp(90px,26vw,126px); }
      .pvp-arena .pvp-trainer-name { font-size:.6rem; }
    }
