/* ============================================================
   趣玩·宠物岛 · 像素风样式
   规则：两套主题变量齐全；颜色只走变量；硬边框像素质感；≤760/≤480 两档收窄。
   ============================================================ */
:root {
  --bg: #eef3e2;
  --bg2: #e3ecd2;
  --card: #fdfef8;
  --card2: #f4f7e8;
  --line: #c8d2b0;
  --text: #33392b;
  --text2: #5a6350;
  --muted: #8a9280;
  --good: #4d9e4d;
  --bad: #cf5050;
  --warn: #d9932c;
  --info: #4a7fc9;
  --gold: #c9a227;
  --shadow: rgba(60, 70, 40, .22);
  --hp: #58c258;
  --hp-track: #dfe6cf;
  --ele-normal: #a8a284;
  --ele-fire: #ef8a4c;
  --ele-water: #58a6d6;
  --ele-grass: #6cbf6c;
  --ele-elec: #e6c93c;
  --ele-ice: #7cc4de;
  --ele-rock: #b09a6f;
  --ele-wind: #79c2ad;
}
[data-theme="dark"] {
  --bg: #20261c;
  --bg2: #1a2016;
  --card: #2b3324;
  --card2: #242b1e;
  --line: #46503a;
  --text: #e8ecda;
  --text2: #b6bfa4;
  --muted: #7d8670;
  --good: #6cc46c;
  --bad: #e07070;
  --warn: #e6ac4e;
  --info: #6fa3dc;
  --gold: #dfba45;
  --shadow: rgba(0, 0, 0, .5);
  --hp: #58c258;
  --hp-track: #3a4230;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  background-image: repeating-linear-gradient(45deg, rgba(0,0,0,.018) 0 6px, transparent 6px 12px);
  color: var(--text);
  font: 15px/1.65 "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
}
button { font: inherit; color: inherit; cursor: pointer; }
input, select, textarea { font: inherit; }
img, svg { image-rendering: pixelated; }
b { font-weight: 700; }

#app { min-height: 100vh; display: flex; flex-direction: column; }
#main { flex: 1; width: 100%; max-width: 1080px; margin: 0 auto; padding: 14px 14px 30px; }

/* ---------------- 顶栏 ---------------- */
.topbar {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; gap: 10px;
  padding: 8px 14px;
  background: var(--card);
  border-bottom: 3px solid var(--line);
  box-shadow: 0 3px 0 var(--shadow);
}
.brand { display: flex; align-items: center; gap: 8px; background: none; border: none; padding: 2px 4px; }
.blogo {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; font-size: 19px;
  background: var(--card2); border: 2px solid var(--line); border-radius: 6px;
  box-shadow: 0 2px 0 var(--shadow);
}
.blogo.big { width: 52px; height: 52px; font-size: 30px; }
.bname { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.15; }
.bname b { font-size: 16.5px; letter-spacing: .5px; }
.bname em { font-style: normal; font-size: 10.5px; letter-spacing: .6px; color: var(--muted); }
.nav-tabs { display: flex; gap: 2px; flex: 1; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.nav-tabs::-webkit-scrollbar { display: none; }
.nav-tabs button {
  flex: 0 0 auto; padding: 7px 11px; white-space: nowrap;
  background: none; border: 2px solid transparent; border-radius: 6px;
  color: var(--text2); font-size: 14px;
}
.nav-tabs button.on { background: var(--card2); border-color: var(--line); color: var(--text); box-shadow: 0 2px 0 var(--shadow); font-weight: 700; }
.top-right { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.chip {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 5px 10px; border: 2px solid var(--line); border-radius: 20px;
  background: var(--card2); font-size: 13.5px; font-weight: 700;
}
.chip.coin { color: var(--gold); }
.icon-btn {
  width: 34px; height: 34px; font-size: 16px;
  background: var(--card2); border: 2px solid var(--line); border-radius: 6px;
  box-shadow: 0 2px 0 var(--shadow);
}
.icon-btn:active { transform: translateY(2px); box-shadow: none; }

/* ---------------- 视图与卡片 ---------------- */
.view { display: none; }
.view.on { display: block; }
.cards { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
.cards.wide { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }
.card {
  background: var(--card); border: 2px solid var(--line); border-radius: 8px;
  box-shadow: 0 3px 0 var(--shadow); padding: 12px;
}
.card h3 { margin: 0 0 8px; font-size: 15.5px; display: flex; align-items: center; gap: 6px; }
.card .sub { color: var(--muted); font-size: 12.5px; }
.stat-row { display: flex; gap: 8px; flex-wrap: wrap; margin: 10px 0; }
.stat {
  flex: 1 1 100px; background: var(--card2); border: 2px solid var(--line); border-radius: 8px;
  padding: 8px 10px; text-align: center;
}
.stat .n { font-size: 20px; font-weight: 800; }
.stat .t { font-size: 11.5px; color: var(--muted); }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 8px 14px; font-size: 14px; font-weight: 700;
  background: var(--card2); color: var(--text);
  border: 2px solid var(--line); border-radius: 6px;
  box-shadow: 0 3px 0 var(--shadow);
}
.btn:active { transform: translateY(3px); box-shadow: none; }
.btn.primary { background: var(--good); border-color: var(--good); color: #fff; }
.btn.danger { background: var(--bad); border-color: var(--bad); color: #fff; }
.btn.warn { background: var(--warn); border-color: var(--warn); color: #fff; }
.btn.small { padding: 4px 9px; font-size: 12.5px; box-shadow: 0 2px 0 var(--shadow); }
.btn.wide { width: 100%; }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; }
.empty { text-align: center; color: var(--muted); padding: 30px 10px; }
.empty .big { font-size: 40px; }
.sec-title { display: flex; align-items: center; gap: 8px; margin: 18px 0 10px; font-size: 16px; font-weight: 800; }
.sec-title .rule { flex: 1; height: 2px; background: var(--line); }

/* 元素 / 稀有度 chips */
.ele-chip {
  display: inline-flex; align-items: center; padding: 1px 8px;
  font-size: 11.5px; font-weight: 700; color: #fff; border-radius: 4px;
  background: var(--ele-normal); text-shadow: 0 1px 0 rgba(0,0,0,.25);
}
.ele-chip.fire { background: var(--ele-fire); } .ele-chip.water { background: var(--ele-water); }
.ele-chip.grass { background: var(--ele-grass); } .ele-chip.elec { background: var(--ele-elec); color: #5a4a00; text-shadow: none; }
.ele-chip.ice { background: var(--ele-ice); } .ele-chip.rock { background: var(--ele-rock); }
.ele-chip.wind { background: var(--ele-wind); }
.rar { color: var(--gold); font-size: 12px; letter-spacing: 1px; }
.lvl-chip {
  display: inline-flex; padding: 1px 7px; font-size: 11.5px; font-weight: 800;
  background: var(--info); color: #fff; border-radius: 4px;
}

/* 精灵显示 */
.spr { display: inline-flex; align-items: center; justify-content: center; }
.spr svg, .spr img { display: block; }
.spr.s64 svg, .spr.s64 img { width: 64px; height: 64px; }
.spr.s40 svg, .spr.s40 img { width: 40px; height: 40px; }
.spr.s96 svg, .spr.s96 img { width: 96px; height: 96px; }
.spr.s128 svg, .spr.s128 img { width: 128px; height: 128px; }
.spr.s192 svg, .spr.s192 img { width: 192px; height: 192px; }

/* ---------------- 弹窗 / 遮罩 / Toast ---------------- */
.overlay {
  position: fixed; inset: 0; z-index: 100;
  display: flex; align-items: center; justify-content: center;
  background: rgba(20, 26, 14, .62); padding: 16px;
}
#modalOv { z-index: 150; }   /* 通用弹窗必须盖过战斗层(120)与管理后台(120) */
.overlay.stage { z-index: 120; background: rgba(12, 17, 9, .88); }
.overlay[hidden] { display: none; }
.modal {
  width: 100%; max-width: 560px; max-height: 88vh; overflow-y: auto;
  background: var(--card); border: 3px solid var(--line); border-radius: 10px;
  box-shadow: 0 6px 0 var(--shadow); padding: 16px;
}
.modal h3 { margin: 0 0 10px; }
#toasts { position: fixed; left: 50%; bottom: 26px; transform: translateX(-50%); z-index: 200; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast {
  padding: 9px 16px; font-size: 13.5px; font-weight: 700;
  background: var(--card); color: var(--text);
  border: 2px solid var(--line); border-radius: 8px; box-shadow: 0 3px 0 var(--shadow);
  animation: toastIn .18s steps(3);
}
.toast.err { border-color: var(--bad); color: var(--bad); }
.toast.good { border-color: var(--good); color: var(--good); }
@keyframes toastIn { from { transform: translateY(14px); opacity: 0; } to { transform: none; opacity: 1; } }

/* ---------------- 登录 / 注册 ---------------- */
.auth-card {
  width: 100%; max-width: 430px; max-height: 92vh; overflow-y: auto;
  background: var(--card); border: 3px solid var(--line); border-radius: 12px;
  box-shadow: 0 6px 0 var(--shadow); padding: 20px;
}
.auth-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.auth-brand b { font-size: 19px; }
.auth-brand em { display: block; font-style: normal; font-size: 11px; color: var(--muted); }
.auth-tabs { display: flex; gap: 6px; margin-bottom: 14px; }
.auth-tabs button {
  flex: 1; padding: 8px; font-weight: 800;
  background: var(--card2); border: 2px solid var(--line); border-radius: 6px; color: var(--muted);
}
.auth-tabs button.on { background: var(--good); border-color: var(--good); color: #fff; }
.auth-card label { display: block; margin: 10px 0; font-size: 13px; color: var(--text2); font-weight: 700; }
.auth-card input, .modal input, .modal select, .modal textarea, .adm input, .adm select, .adm textarea {
  display: block; width: 100%; margin-top: 4px; padding: 9px 10px;
  background: var(--bg2); color: var(--text);
  border: 2px solid var(--line); border-radius: 6px; outline: none;
}
.auth-card input:focus, .modal input:focus { border-color: var(--info); }
.reg-tip { font-size: 13px; color: var(--text2); font-weight: 700; margin: 6px 0; }
.starter-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 8px 0; }
.starter-card {
  padding: 10px 6px; text-align: center;
  background: var(--card2); border: 2px solid var(--line); border-radius: 8px; cursor: pointer;
}
.starter-card.on { border-color: var(--good); box-shadow: 0 0 0 2px var(--good) inset; }
.starter-card .nm { font-weight: 800; font-size: 13.5px; margin-top: 4px; }
.auth-err { color: var(--bad); font-size: 13px; min-height: 20px; margin-top: 8px; font-weight: 700; }

/* ---------------- 图鉴 ---------------- */
.dex-grid { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(122px, 1fr)); }
.dex-cell {
  position: relative; padding: 10px 6px 8px; text-align: center; cursor: pointer;
  background: var(--card); border: 2px solid var(--line); border-radius: 8px;
  box-shadow: 0 3px 0 var(--shadow);
}
.dex-cell:active { transform: translateY(3px); box-shadow: none; }
.dex-cell .no { position: absolute; top: 4px; left: 6px; font-size: 10.5px; color: var(--muted); font-weight: 800; }
.dex-cell .own { position: absolute; top: 4px; right: 6px; font-size: 12px; }
.dex-cell .nm { font-weight: 800; font-size: 13.5px; margin-top: 4px; }
.dex-cell.unowned { opacity: .82; }
.dex-cell.unowned .nm { color: var(--muted); }
.dex-filters { display: flex; gap: 6px; flex-wrap: wrap; margin: 10px 0; }
.dex-filters button {
  padding: 4px 10px; font-size: 12.5px; font-weight: 700;
  background: var(--card2); border: 2px solid var(--line); border-radius: 16px; color: var(--text2);
}
.dex-filters button.on { background: var(--info); border-color: var(--info); color: #fff; }
.statbar { display: flex; align-items: center; gap: 8px; margin: 4px 0; font-size: 12.5px; }
.statbar .lb { width: 74px; color: var(--text2); }
.statbar .track { flex: 1; height: 10px; background: var(--hp-track); border: 1px solid var(--line); border-radius: 3px; overflow: hidden; }
.statbar .fill { height: 100%; background: var(--info); }
.statbar .v { width: 34px; text-align: right; font-weight: 800; }
.evo-chain { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.evo-chain .arr { color: var(--muted); font-weight: 800; }
.chart-table { width: 100%; border-collapse: collapse; font-size: 11.5px; }
.chart-table th, .chart-table td { border: 1px solid var(--line); padding: 3px 4px; text-align: center; }
.chart-table td.x2 { background: rgba(120, 200, 90, .3); font-weight: 800; }
.chart-table td.half { background: rgba(220, 120, 90, .22); color: var(--muted); }

/* ---------------- 宠物列表 ---------------- */
.pet-card { display: flex; gap: 10px; align-items: flex-start; }
.pet-info { flex: 1; min-width: 0; }
.pet-name { font-weight: 800; font-size: 15px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.exp-track { height: 8px; background: var(--hp-track); border: 1px solid var(--line); border-radius: 3px; overflow: hidden; margin: 6px 0 2px; }
.exp-fill { height: 100%; background: var(--info); }
.hp-track2 { height: 10px; background: var(--hp-track); border: 1px solid var(--line); border-radius: 3px; overflow: hidden; margin-top: 4px; }
.hp-fill { height: 100%; background: var(--hp); transition: width .3s steps(6); }
.hp-fill.low { background: var(--warn); }
.hp-fill.crit { background: var(--bad); }
.iv-note { font-size: 11.5px; color: var(--muted); }
.team-flag { font-size: 11px; font-weight: 800; color: #fff; background: var(--good); border-radius: 4px; padding: 1px 6px; }
.offer-flag { font-size: 11px; font-weight: 800; color: #fff; background: var(--warn); border-radius: 4px; padding: 1px 6px; }
.skill-list { display: grid; gap: 6px; margin-top: 8px; }
.skill-item { display: flex; align-items: center; gap: 8px; background: var(--card2); border: 1px solid var(--line); border-radius: 6px; padding: 6px 8px; font-size: 12.5px; }
.skill-item .pp { margin-left: auto; color: var(--muted); font-weight: 700; }

/* ---------------- 商店 / 探索 / 交换 / 排行 ---------------- */
.shop-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); }
.zone-card { cursor: pointer; }
.zone-card .lv { color: var(--info); font-weight: 800; font-size: 12.5px; }
.zone-card.locked { opacity: .6; }
.zone-pool { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 6px; }
.trade-item { display: flex; gap: 10px; align-items: center; }
.trade-info { flex: 1; min-width: 0; }
.rank-tabs { display: flex; gap: 6px; margin-bottom: 12px; }
.rank-tabs button { padding: 7px 14px; font-weight: 800; background: var(--card2); border: 2px solid var(--line); border-radius: 6px; color: var(--text2); }
.rank-tabs button.on { background: var(--info); border-color: var(--info); color: #fff; }
.rank-table { width: 100%; border-collapse: collapse; }
.rank-table td, .rank-table th { padding: 8px 6px; border-bottom: 2px solid var(--line); text-align: left; font-size: 13.5px; }
.rank-table tr.me td { background: var(--card2); font-weight: 800; }
.rank-table .pos { width: 44px; font-weight: 800; color: var(--muted); }
.rank-table .pos.top { color: var(--gold); }

/* ---------------- 战斗层 ---------------- */
#battleOv { flex-direction: column; align-items: stretch; justify-content: flex-start; padding: 0; }
.battle-wrap { max-width: 760px; width: 100%; margin: 0 auto; height: 100%; display: flex; flex-direction: column; padding: 10px 12px calc(10px + env(safe-area-inset-bottom)); gap: 8px; }
.arena {
  position: relative; flex: 1; min-height: 240px;
  background: linear-gradient(180deg, #29402c 0%, #3d5a35 62%, #567a3c 62%, #6a8f49 100%);
  border: 3px solid #22301f; border-radius: 10px; overflow: hidden;
}
[data-theme="dark"] .arena { background: linear-gradient(180deg, #1c2a20 0%, #2b3d28 62%, #3c5230 62%, #4a6339 100%); }
.arena .cloud { position: absolute; font-size: 26px; opacity: .5; top: 8px; }
.arena .cloud.c1 { left: 8%; animation: drift 26s linear infinite; }
.arena .cloud.c2 { right: 12%; animation: drift 34s linear infinite reverse; }
@keyframes drift { from { transform: translateX(-30px); } to { transform: translateX(30px); } }
.plate {
  position: absolute; min-width: 190px; max-width: 62%;
  background: rgba(250, 252, 240, .94); color: #33392b;
  border: 2px solid #22301f; border-radius: 8px; padding: 6px 9px;
  box-shadow: 0 3px 0 rgba(0,0,0,.35); font-size: 12.5px; z-index: 5;
}
.plate .pn { font-weight: 800; display: flex; gap: 6px; align-items: center; }
.plate .hp-track { height: 9px; margin-top: 4px; background: #dfe6cf; border: 1px solid #8a9280; border-radius: 3px; overflow: hidden; }
.plate .hp-fill { height: 100%; background: #58c258; transition: width .35s steps(6); }
.plate .hp-fill.low { background: #d9932c; }
.plate .hp-fill.crit { background: #cf5050; }
.plate .stage-chips { margin-top: 3px; font-size: 10.5px; font-weight: 800; color: #5a6350; }
.plate.foe { top: 12px; left: 12px; }
.plate.me { bottom: 12px; right: 12px; }
.bspr { position: absolute; z-index: 2; }
.bspr.foe { top: 16%; right: 10%; }
.bspr.me { bottom: 6%; left: 8%; }
.bspr svg, .bspr img { width: 150px; height: 150px; filter: drop-shadow(0 6px 0 rgba(0,0,0,.28)); }
@media (max-width: 560px) { .bspr svg, .bspr img { width: 108px; height: 108px; } .plate { min-width: 150px; font-size: 11.5px; } }
.bspr.hit { animation: hitShake .38s steps(4); }
.bspr.lunge-r { animation: lungeR .34s ease-in-out; }
.bspr.lunge-l { animation: lungeL .34s ease-in-out; }
.bspr.fainting { animation: faintFall .6s ease-in forwards; }
.bspr.enter { animation: slideIn .4s ease-out; }
@keyframes hitShake { 0%,100% { transform: none; filter: none; } 25% { transform: translateX(-7px); filter: brightness(2.4); } 50% { transform: translateX(6px); filter: brightness(2.4); } 75% { transform: translateX(-4px); filter: brightness(1.6); } }
@keyframes lungeR { 40% { transform: translate(34px, -16px); } }
@keyframes lungeL { 40% { transform: translate(-34px, 16px); } }
@keyframes faintFall { to { transform: translateY(46px) rotate(80deg); opacity: 0; } }
@keyframes slideIn { from { transform: scale(.4); opacity: 0; } to { transform: none; opacity: 1; } }
.dmg-float {
  position: absolute; z-index: 9; font-size: 24px; font-weight: 900; color: #fff;
  text-shadow: 0 0 0 #000, 2px 2px 0 #000, -2px 2px 0 #000, 2px -2px 0 #000, -2px -2px 0 #000;
  animation: floatUp .9s ease-out forwards; pointer-events: none;
}
.dmg-float.eff { color: #ffb84d; font-size: 28px; }
.dmg-float.half { color: #b8c0b0; font-size: 19px; }
.dmg-float.crit { color: #ff6a4d; font-size: 33px; }
.dmg-float.heal { color: #7ce07c; }
@keyframes floatUp { 20% { opacity: 1; } to { transform: translateY(-44px); opacity: 0; } }
.ball-fly {
  position: absolute; z-index: 9; font-size: 26px; left: 26%; bottom: 18%;
  animation: ballThrow .5s ease-in forwards;
}
@keyframes ballThrow { 40% { transform: translate(150px, -120px) rotate(340deg); } to { transform: translate(210px, -60px) rotate(520deg); opacity: 1; } }
.ball-shake { animation: ballShake .5s ease-in-out; }
@keyframes ballShake { 30% { transform: rotate(-24deg); } 70% { transform: rotate(24deg); } }
.evolve-flash { animation: evolveFlash 1.5s ease-in-out; }
@keyframes evolveFlash { 0%,100% { filter: none; } 20%,60% { filter: brightness(3) saturate(0); transform: scale(.92); } 40%,80% { filter: brightness(1); } 50% { filter: brightness(4) saturate(0); transform: scale(1.06); } }
.battle-log {
  height: 86px; overflow-y: auto; flex-shrink: 0;
  background: rgba(20, 26, 14, .8); color: #dfe6cf;
  border: 2px solid #22301f; border-radius: 8px; padding: 6px 10px; font-size: 12.5px;
}
.battle-log div { padding: 1px 0; }
.battle-log .good { color: #9ee49e; } .battle-log .bad { color: #f0a0a0; } .battle-log .info { color: #a9c8ee; }
.actions { display: grid; grid-template-columns: repeat(2, 1fr); gap: 7px; flex-shrink: 0; }
.act-skill {
  padding: 8px 10px; text-align: left;
  background: #f7f9ea; color: #33392b; border: 2px solid #22301f; border-radius: 8px;
  box-shadow: 0 3px 0 rgba(0,0,0,.4); font-size: 13px;
}
[data-theme="dark"] .act-skill { background: #3a4530; color: #e8ecda; border-color: #12180e; }
.act-skill:active { transform: translateY(3px); box-shadow: none; }
.act-skill:disabled { opacity: .45; }
.act-skill .sn { font-weight: 800; display: flex; align-items: center; gap: 6px; }
.act-skill .sd { font-size: 11px; color: #5a6350; margin-top: 1px; }
[data-theme="dark"] .act-skill .sd { color: #b6bfa4; }
.act-grid4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 7px; flex-shrink: 0; }
.act-grid4 .btn { padding: 9px 4px; font-size: 13px; }
.battle-top { display: flex; align-items: center; gap: 8px; flex-shrink: 0; color: #dfe6cf; font-weight: 800; font-size: 13px; }
.battle-top .sp { flex: 1; }
.result-panel {
  position: absolute; inset: 0; z-index: 20;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px;
  background: rgba(10, 14, 8, .78); color: #fff; text-align: center;
}
.result-panel .big { font-size: 34px; font-weight: 900; letter-spacing: 4px; text-shadow: 3px 3px 0 #000; animation: toastIn .3s steps(4); }
.result-panel .rw { font-size: 15px; font-weight: 800; color: #ffd968; }
.switch-list { display: grid; gap: 8px; }

/* ---------------- 管理后台 ---------------- */
#adminOv { flex-direction: column; align-items: stretch; justify-content: flex-start; padding: 0; overflow-y: auto; display: block; }
#adminOv[hidden] { display: none; }
.adm-wrap { max-width: 1000px; margin: 0 auto; padding: 14px; color: #e8ecda; }
.adm-wrap h2 { display: flex; align-items: center; gap: 10px; }
.adm-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin: 10px 0; }
.adm-tabs button { padding: 7px 13px; font-weight: 800; background: #3a4530; border: 2px solid #12180e; border-radius: 6px; color: #cfd8bd; }
.adm-tabs button.on { background: #6cc46c; color: #10230f; border-color: #2c5a2c; }
.adm-panel { background: #2b3324; border: 2px solid #12180e; border-radius: 10px; padding: 14px; margin-bottom: 14px; }
.adm table { width: 100%; border-collapse: collapse; font-size: 12.5px; color: #dfe6cf; }
.adm th, .adm td { border-bottom: 1px solid #46503a; padding: 6px 5px; text-align: left; }
.adm .form-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.adm label { font-size: 12px; color: #b6bfa4; font-weight: 700; }
.adm .btn { box-shadow: 0 2px 0 rgba(0,0,0,.5); }
.adm-sec { font-weight: 800; margin: 12px 0 6px; color: #ffd968; }

/* ---------------- 响应式 ---------------- */
@media (max-width: 760px) {
  .topbar { flex-wrap: wrap; padding: 6px 10px; gap: 6px; }
  .nav-tabs { order: 3; flex-basis: 100%; }
  #main { padding: 10px 10px 26px; }
  .dex-grid { grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); }
  .cards, .cards.wide { grid-template-columns: 1fr; }
  .shop-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
  .starter-row { grid-template-columns: repeat(3, 1fr); gap: 6px; }
}
@media (max-width: 480px) {
  body { font-size: 14px; }
  .bname em { display: none; }
  .bname b { font-size: 15px; }
  .nav-tabs button { padding: 6px 8px; font-size: 13px; }
  .stat .n { font-size: 17px; }
  .actions { grid-template-columns: repeat(2, 1fr); }
  .act-grid4 { grid-template-columns: repeat(4, 1fr); }
  .act-grid4 .btn { font-size: 12px; }
  .dex-grid { grid-template-columns: repeat(3, 1fr); }
}
