/* Modern field console: clean dark surfaces, cool light, and compact navigation. */
:root {
  color-scheme: dark;
  --ink: #f1f5fc;
  --muted: #9eacc2;
  --faint: #71819a;
  --panel: rgba(17, 25, 42, .96);
  --panel-2: #17233a;
  --panel-3: #202f49;
  --line: rgba(169, 190, 224, .13);
  --line-strong: rgba(169, 190, 224, .25);
  --moss: #65d8d0;
  --lime: #a9e6b5;
  --mint: #67dfc1;
  --gold: #f2bf78;
  --blue: #8eacff;
  --rose: #f08d9d;
  --shadow: 0 18px 50px rgba(0, 0, 0, .26);
  --radius: 17px;
  font-family: Inter, "Segoe UI", system-ui, sans-serif;
}

html { background: #090e1b; }
body {
  color: var(--ink);
  background:
    radial-gradient(ellipse at 84% -12%, rgba(81, 103, 191, .16), transparent 38%),
    radial-gradient(ellipse at 0% 75%, rgba(38, 151, 148, .10), transparent 34%),
    #090e1b;
}
button, input, select { font-family: inherit; }
button:focus-visible, input:focus-visible, select:focus-visible { outline-color: #83e8dc; }
::selection { color: #08111d; background: #8be5d4; }

.app-shell { grid-template-columns: 238px minmax(0, 1fr); min-height: 100vh; }
.sidebar {
  min-height: 100vh;
  padding: 22px 14px 15px;
  border-right: 1px solid rgba(173, 196, 233, .12);
  background: linear-gradient(180deg, rgba(15, 22, 39, .98), rgba(10, 16, 30, .98));
  box-shadow: 10px 0 36px rgba(0, 0, 0, .16);
  backdrop-filter: blur(18px);
}
.brand { gap: 12px; padding: 0 10px 20px; }
.brand-ball {
  width: 36px; height: 36px;
  border-color: rgba(228, 241, 255, .92);
  background: linear-gradient(#eaf1f9 0 45%, #243348 45% 55%, #71d8d0 55%);
  box-shadow: 0 0 24px rgba(101, 216, 208, .17);
}
.brand-ball:before { background: #243348; }
.brand-ball i { background: #eff8ff; border-color: #243348; }
.brand-copy strong { letter-spacing: .16em; }
.brand-copy small { color: #8898b2; }
.trainer-card {
  margin: 0 3px 22px; padding: 11px 10px 10px;
  border-color: var(--line); border-radius: 14px;
  background: linear-gradient(145deg, rgba(33, 47, 72, .82), rgba(19, 28, 47, .9));
}
.trainer-avatar {
  border-radius: 12px; color: #10202c;
  background: linear-gradient(145deg, #9be7d6, #6592c9);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.24), 0 7px 18px rgba(43,107,153,.18);
}
.online-dot { border-color: #17243a; background: #65dfb6; }
.trainer-copy strong { font-size: 12px; }
.trainer-copy small { color: #9aa9c1; }
.trainer-xp { color: #95a5bd; }
.xp-track, .quest-progress i { background: rgba(5, 10, 22, .78); }
.xp-track i { background: linear-gradient(90deg, #6bd8d0, #a4e99a); }
.nav-label { color: #72829e; font-size: 9px; letter-spacing: .15em; }
.main-nav { gap: 5px; }
.nav-button, .settings-link {
  min-height: 43px; height: 43px; gap: 11px; padding: 0 11px;
  border-color: transparent; border-radius: 12px; color: #9caac2;
}
.nav-button:hover, .settings-link:hover { color: #eaf2ff; background: rgba(145, 174, 222, .08); }
.nav-button.is-active {
  color: #effbff; border-color: rgba(102, 218, 211, .17);
  background: linear-gradient(100deg, rgba(72, 171, 173, .19), rgba(93, 117, 177, .09));
  box-shadow: inset 3px 0 #72e0d7, 0 7px 18px rgba(22, 106, 115, .08);
}
.nav-icon { width: 20px; display: grid; place-items: center; color: #8da1c0; }
.nav-icon svg, .settings-icon svg, .icon-button svg, .resource-chip svg, .utility-icon svg {
  width: 18px; height: 18px; display: block; fill: none; stroke: currentColor;
  stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;
}
.nav-button.is-active .nav-icon { color: #76e0d5; }
.nav-button > span:nth-child(2) { font-size: 12px; }
.nav-pill { padding: 3px 6px; border: 1px solid rgba(104, 224, 191, .2); border-radius: 999px; color: #8ce5c8; background: rgba(82, 198, 165, .09); font-size: 8px; }
.nav-count { color: #8190aa; }
.sidebar-spacer { min-height: 18px; }
.sidebar-quest {
  margin: 0 3px 14px; padding: 12px;
  border: 1px solid rgba(242, 191, 120, .19); border-radius: 14px;
  background: linear-gradient(145deg, rgba(92, 70, 53, .22), rgba(35, 36, 52, .55));
}
.quest-eyebrow { color: #edc582; font-size: 8px; }
.sidebar-quest strong { font-size: 11px; }
.sidebar-quest p { color: #a8b2c1; }
.quest-progress { color: #a9b6ca; }
.quest-progress b { background: linear-gradient(90deg, #e5a962, #ffd18a); }
.quest-reward { color: #f0c37b; }
.sidebar-footer { border-color: var(--line); }
.save-status { color: #8796ae; }
.save-status i { background: #69dfbd; box-shadow: 0 0 9px rgba(105, 223, 189, .4); }
.settings-link { color: #aab6ca; }
.settings-link .settings-icon { display: grid; place-items: center; color: #8498b8; }

.main-content { min-width: 0; padding: 0 clamp(18px, 2.3vw, 34px) 28px; }
.topbar {
  position: sticky; top: 0; z-index: 10; min-height: 84px;
  margin: 0 calc(clamp(18px, 2.3vw, 34px) * -1); padding: 0 clamp(18px, 2.3vw, 34px);
  border-bottom: 1px solid rgba(169, 190, 224, .1);
  background: rgba(10, 16, 30, .84); backdrop-filter: blur(18px);
}
.breadcrumbs { color: #8392ad; }
.breadcrumbs b { color: #52617b; }
.breadcrumbs span:last-child { color: #7bdfd4; }
.topbar h1 { color: #f0f4fc; font-size: clamp(19px, 2vw, 24px); letter-spacing: -.045em; }
.topbar-resources { gap: 9px; }
.resource-chip {
  min-width: 126px; height: 46px; padding: 0 10px;
  border-color: var(--line); border-radius: 13px;
  background: linear-gradient(145deg, rgba(25, 36, 58, .93), rgba(16, 25, 43, .94));
  box-shadow: inset 0 1px rgba(255,255,255,.025);
}
.resource-chip small { color: #8d9bb3; }
.resource-chip strong { color: #eff4fc; }
.coin-icon, .research-icon {
  width: 29px; height: 29px; border-color: rgba(242, 191, 120, .25);
  border-radius: 10px; color: #f4c780; background: rgba(201, 144, 74, .11);
}
.coin-icon svg, .research-icon svg { width: 18px; height: 18px; }
.research-icon { border-color: rgba(103, 221, 191, .23); color: #7be0c6; background: rgba(57, 170, 153, .1); }
.research-chip { cursor:pointer; transition:border-color .16s ease, box-shadow .16s ease, transform .16s ease; }
.research-chip:hover { border-color:rgba(103,221,191,.5); box-shadow:0 0 0 1px rgba(103,221,191,.12), 0 8px 20px rgba(27,125,122,.14); transform:translateY(-1px); }
.research-chip:focus-visible { outline:2px solid #83e8dc; outline-offset:3px; }
.icon-button { border-color: var(--line); color: #aab8ce; background: rgba(24, 35, 56, .8); }
.icon-button:hover { border-color: rgba(104, 224, 211, .4); color: #79e0d6; }
.icon-button svg { width: 14px; height: 14px; }
.content-area { padding-top: 22px; }

.eyebrow { color: #72dbd1; }
.page-intro h2 { color: #f1f5fc; }
.page-intro p { color: var(--muted); }
.button {
  min-height: 37px; padding: 0 14px; border-color: var(--line-strong);
  border-radius: 11px; color: #d5deed; background: rgba(27, 39, 62, .86);
  font-size: 10px;
}
.button:hover { border-color: rgba(133, 181, 230, .45); background: rgba(40, 55, 82, .94); }
.button.primary {
  border-color: rgba(112, 223, 210, .52); color: #10232d;
  background: linear-gradient(135deg, #9ce8d8, #65cbd0);
  box-shadow: 0 7px 18px rgba(58, 181, 180, .15);
}
.button.primary:hover { background: linear-gradient(135deg, #b3f0df, #7ad9db); }
.button.ghost { color: #aab7cc; background: transparent; }
.button.danger { color: #ffafb8; border-color: rgba(240, 141, 157, .25); }
.chip { border-color: var(--line); color: #b5c1d4; background: rgba(9, 15, 29, .42); }
.chip.shiny { color: #ffdb9e; border-color: rgba(242, 191, 120, .3); background: rgba(174, 128, 65, .12); }
.type-badge { border-radius: 999px; font-family: inherit; font-size: 8px; font-weight: 700; }

/* Keep the live hunt in the main stage and put its team/commands in a side console. */
body.adventure-mode { min-width: 320px; color: var(--ink); background-color: #090e1b; }
body.adventure-mode .app-shell {
  display: grid !important; grid-template-columns: 238px minmax(0, 1fr);
  width: 100%; min-height: 100vh; height: 100vh;
}
body.adventure-mode .sidebar { display: flex !important; width: auto; }
body.adventure-mode .main-content {
  display: block !important; width: auto; min-width: 0; height: 100vh;
  overflow: auto; padding: 0 clamp(16px, 2.1vw, 30px) 26px;
}
body.adventure-mode .topbar {
  display: flex !important; margin: 0 calc(clamp(16px, 2.1vw, 30px) * -1);
  padding: 0 clamp(16px, 2.1vw, 30px);
}
body.adventure-mode .topbar { min-height: 60px; justify-content: flex-end; }
body.adventure-mode .topbar-heading { display: none; }
body.adventure-mode .content-area {
  min-height: 0; padding: 18px 0 24px; overflow: visible !important;
  background: transparent !important;
}
body.adventure-mode .expedition-heading {
  display: grid; grid-template-columns:minmax(0,1fr) auto;
  align-items: center; gap: 16px; min-height: 72px; margin: 0 0 14px;
}
body.adventure-mode .expedition-heading .eyebrow { color: #7c8eaa; font-size: 9px; }
body.adventure-mode .expedition-heading h2 { margin: 5px 0 0; color: #f1f5fc; font-size: clamp(20px, 2vw, 25px); letter-spacing: -.045em; }
body.adventure-mode .trainer-summary {
  display: none !important;
  width: 100%; min-width: 0; height: 52px; gap: 9px; padding: 6px 10px;
  border: 1px solid var(--line); border-radius: 14px; color: var(--ink);
  background: linear-gradient(145deg, rgba(25, 37, 59, .96), rgba(16, 25, 43, .96));
  box-shadow: inset 0 1px rgba(255,255,255,.03);
}
body.adventure-mode .trainer-summary:before { top: 9px; bottom: 9px; background: linear-gradient(#77e1d5, #6ca6df); box-shadow: 0 0 12px rgba(101,216,208,.3); }
body.adventure-mode .trainer-summary-medal { border-color: rgba(112, 221, 211, .27); background: rgba(69, 149, 156, .15); box-shadow: none; }
body.adventure-mode .trainer-summary-medal svg { width: 22px !important; height: 22px !important; }
body.adventure-mode .trainer-summary-top > strong { color: #f0f5fd; text-shadow: none; }
body.adventure-mode .trainer-summary-level { border-color: rgba(142, 172, 255, .19); color: #b6c8ff; background: rgba(103, 129, 206, .1); }
body.adventure-mode .trainer-summary-level small { color: #aab9dc; }
body.adventure-mode .trainer-summary-level b { color: #d1dcff; }
body.adventure-mode .trainer-summary-track { height: 6px; border: 0; background: rgba(5, 11, 23, .82); box-shadow: none; }
body.adventure-mode .trainer-summary-track b { background: linear-gradient(90deg, #62d7d1, #8edcf0); box-shadow: none; }
body.adventure-mode .trainer-summary-xp-row > strong { color: #9de8db; }
body.adventure-mode .expedition-heading-actions { grid-column: 2; justify-self: end; display: flex; gap: 7px; }
body.adventure-mode .expedition-heading-actions > button:not(.center-shortcut):not(.mission-menu-button):not(.expedition-tool-button):not(.sidebar-toggle-button) { display: none !important; }
body.adventure-mode .expedition-heading-actions button {
  width: auto; min-width: 0; height: 37px; display: inline-flex !important; align-items: center;
  justify-content: center; gap: 7px; padding: 0 11px; border: 1px solid var(--line);
  border-radius: 11px; color: #c4d0e4; background: rgba(23, 34, 54, .86); font: 700 10px/1.2 Inter, "Segoe UI", system-ui, sans-serif;
}
body.adventure-mode .expedition-heading-actions button:hover { border-color: rgba(103, 218, 210, .35); color: #8ee7dc; background: #1b2b43; }
body.adventure-mode .expedition-heading-actions button span { display: inline; }
body.adventure-mode .expedition-heading-actions .menu-icon { width: 17px; height: 17px; filter: none; }
body.adventure-mode .expedition-heading-actions .center-shortcut { color: #a9eee3; border-color: rgba(103, 218, 210, .23); background: rgba(47, 117, 122, .15); }
body.adventure-mode .expedition-heading-actions .center-shortcut.is-current { color: #f3d299; border-color: rgba(242, 191, 120, .28); background: rgba(143, 102, 56, .13); }
body.adventure-mode .expedition-heading-actions .mission-menu-button i { top: -4px; right: -4px; }
body.adventure-mode .nav-button[data-view="aventura"] .nav-pill { display: none; }

body.adventure-mode .adventure-client {
  display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(335px, .92fr);
  align-items: start; gap: 16px; min-width: 0;
}
body.adventure-mode .game-world-panel { min-width: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 18px; background: #11192a; box-shadow: var(--shadow); }
body.adventure-mode .game-world-panel .map-wrap {
  height: clamp(520px, calc(100vh - 218px), 820px); min-height: 520px;
  border: 0; border-radius: 17px; background: #152034; box-shadow: inset 0 0 0 1px rgba(255,255,255,.025);
}
body.adventure-mode .game-world-panel #huntCanvas { image-rendering: auto; }
body.adventure-mode .game-world-panel .map-vignette {
  background: linear-gradient(180deg, rgba(4, 8, 17, .18), transparent 20%, transparent 72%, rgba(4, 8, 17, .4)), linear-gradient(90deg, rgba(4,8,17,.08), transparent 22%, transparent 78%, rgba(4,8,17,.12));
}
body.adventure-mode .world-topline { top: 12px; left: auto; right: 12px; justify-content: flex-end; }
body.adventure-mode .world-hud-side { gap: 8px; }
body.adventure-mode .world-online, body.adventure-mode .world-minimap {
  border: 1px solid rgba(226, 236, 255, .15); border-radius: 12px;
  color: #dce9fb; background: rgba(12, 19, 34, .82); box-shadow: 0 10px 28px rgba(0,0,0,.18);
  backdrop-filter: blur(12px);
}
body.adventure-mode .world-online { padding: 8px 10px; font: 700 9px/1.2 Inter, "Segoe UI", system-ui, sans-serif; }
body.adventure-mode .world-online i { background: #73e2bd; box-shadow: 0 0 8px rgba(115,226,189,.65); }
body.adventure-mode .world-online kbd { border-color: rgba(164, 187, 225, .2); border-radius: 5px; color: #adbbd1; background: rgba(255,255,255,.05); }
body.adventure-mode .world-player-count {
  min-height: 29px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 7px 10px;
  border: 1px solid rgba(226, 236, 255, .15); border-radius: 999px; color: #b9c8dc;
  background: rgba(12, 19, 34, .86); box-shadow: 0 8px 20px rgba(0,0,0,.2); backdrop-filter: blur(10px);
  font: 700 8px/1.1 Inter, "Segoe UI", system-ui, sans-serif; white-space: nowrap; pointer-events: none;
}
body.adventure-mode .world-player-count i { width: 7px; height: 7px; flex: 0 0 7px; border-radius: 50%; background: #8290a3; }
body.adventure-mode .world-player-count strong { color: #e8f3ff; font: 800 10px/1 "DM Mono", monospace; }
body.adventure-mode .world-player-count.is-online { border-color: rgba(115, 226, 189, .28); color: #b9e5d7; }
body.adventure-mode .world-player-count.is-online i { background: #73e2bd; box-shadow: 0 0 8px rgba(115,226,189,.65); }
body.adventure-mode .world-player-count.is-online strong { color: #89ead1; }
body.adventure-mode .world-player-count.is-connecting i { background: #f0c66e; box-shadow: 0 0 7px rgba(240,198,110,.45); }
body.adventure-mode .world-minimap { width: 164px; padding: 7px; }
body.adventure-mode .minimap-heading { margin-bottom: 6px; color: #a9b8d0; font: 700 8px/1.2 Inter, "Segoe UI", system-ui, sans-serif; }
body.adventure-mode .minimap-heading b { color: #dce7f9; }
body.adventure-mode #miniMapCanvas { height: 82px; border: 1px solid rgba(181, 204, 238, .15); border-radius: 7px; }
body.adventure-mode .world-bottom {
  min-height: 52px; gap: 10px; padding: 8px 12px;
  border-top: 1px solid rgba(217, 231, 255, .13);
  background: linear-gradient(90deg, rgba(12, 18, 32, .9), rgba(16, 26, 45, .88));
  backdrop-filter: blur(12px);
}
body.adventure-mode .movement-hint { padding: 7px 10px; border: 1px solid rgba(173, 192, 225, .16); border-radius: 9px; color: #d3deef; background: rgba(15, 23, 40, .78); font: 700 8px/1.2 Inter, "Segoe UI", system-ui, sans-serif; }
body.adventure-mode .scene-controls { display: flex; gap: 5px; }
body.adventure-mode .scene-controls button { width: 31px; height: 31px; border-color: rgba(179, 199, 233, .2); border-radius: 9px; color: #dce8f8; background: rgba(25, 37, 59, .9); }
body.adventure-mode .adventure-chat-compact {
  right: 12px; bottom: 70px; width: min(300px, calc(100% - 236px)); height: 52px;
  padding: 7px 9px; border: 1px solid rgba(187, 205, 237, .16); border-radius: 12px;
  color: #dce7f5; background: rgba(12, 19, 34, .84); box-shadow: 0 10px 28px rgba(0,0,0,.22); backdrop-filter: blur(12px);
}
body.adventure-mode .adventure-chat-compact-head strong { color: #8fe4d8; font: 800 8px/1.2 Inter, "Segoe UI", system-ui, sans-serif; }
body.adventure-mode .adventure-chat-compact-head span { color: #99a8bd; font: 8px/1.2 Inter, "Segoe UI", system-ui, sans-serif; }
body.adventure-mode .adventure-chat-compact-head button { border-color: rgba(169, 190, 224, .18); border-radius: 7px; color: #c4d0e4; background: rgba(41, 57, 83, .75); }
body.adventure-mode .adventure-chat-preview { color: #dce6f4; font: 8px/1.2 Inter, "Segoe UI", system-ui, sans-serif; }
body.adventure-mode .adventure-chat-preview time { color: #8798b2; }
body.adventure-mode .map-pokemon-overlay {
  display:grid; grid-template-rows:auto minmax(0,1fr); align-items:stretch;
  top: 12px; bottom: 72px; left: 12px; width: clamp(165px, 17vw, 202px); gap: clamp(4px,.7vh,8px);
  padding: 7px; border-color: rgba(199, 218, 248, .14); border-radius: 15px;
  background: rgba(10, 17, 31, .63); backdrop-filter: blur(10px);
}
body.adventure-mode .map-party-list { min-height:0; display:grid; grid-template-rows:repeat(6,minmax(0,1fr)); gap:clamp(4px,.7vh,8px); overflow:hidden; }
body.adventure-mode .map-party-list[hidden] { display:none !important; }
body.adventure-mode .map-party-toggle { width:100%; min-height:46px; display:flex; align-items:center; justify-content:space-between; gap:8px; padding:7px 9px; border:1px solid rgba(181,202,232,.16); border-radius:11px; color:#dce8f8; background:linear-gradient(120deg,rgba(25,37,58,.97),rgba(17,26,44,.96)); text-align:left; cursor:pointer; }
body.adventure-mode .map-party-toggle:hover { border-color:rgba(103,221,210,.42); background:#1b2a43; }
body.adventure-mode .map-party-toggle-copy { min-width:0; display:grid; gap:3px; }
body.adventure-mode .map-party-toggle-copy strong { overflow:hidden; color:#e8f1fb; font:800 8px/1.2 Inter,"Segoe UI",system-ui,sans-serif; letter-spacing:.05em; text-overflow:ellipsis; white-space:nowrap; }
body.adventure-mode .map-party-toggle-copy small { color:#94a3b9; font:600 7px/1.2 Inter,"Segoe UI",system-ui,sans-serif; }
body.adventure-mode .map-party-toggle-count { flex:none; color:#80ded4; font:800 8px/1 "DM Mono",monospace; }
body.adventure-mode .map-party-toggle-icon { width:16px; height:16px; flex:none; fill:none; stroke:#9fc1db; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; transition:transform .16s ease; transform:rotate(180deg); }
body.adventure-mode .map-pokemon-overlay.is-collapsed { bottom:auto; width:145px; display:block; padding:0; border:0; border-radius:11px; background:transparent; box-shadow:none; backdrop-filter:none; }
body.adventure-mode .map-pokemon-overlay.is-collapsed .map-party-toggle { box-shadow:0 8px 22px rgba(0,0,0,.34); }
body.adventure-mode .map-pokemon-overlay.is-collapsed .map-party-toggle-icon { transform:rotate(0deg); }
body.adventure-mode .map-party-member {
  flex:none; height:100%; grid-template-columns: 46px minmax(0,1fr); gap: 9px; padding: 8px 9px;
  border-color: rgba(181, 202, 232, .15); border-radius: 11px; color: #e9f1fc;
  background: linear-gradient(120deg, rgba(25, 37, 58, .94), rgba(17, 26, 44, .93));
}
body.adventure-mode .map-party-member:hover { border-color: rgba(106, 219, 211, .4); background: #1b2a43; }
body.adventure-mode .map-party-member.is-active { border-color: rgba(103, 221, 210, .48); background: linear-gradient(115deg, rgba(42, 111, 116, .48), rgba(24, 45, 64, .96)); box-shadow: inset 3px 0 #74e3d7; }
body.adventure-mode .map-party-art { width: 44px; height: 44px; border-color: rgba(174, 200, 237, .14); border-radius: 12px; background: rgba(255,255,255,.04); }
body.adventure-mode .map-party-art img { width: 42px; height: 42px; }
body.adventure-mode .map-party-copy { gap:4px; }
body.adventure-mode .map-party-meta { font-size:8px; }
body.adventure-mode .map-party-member strong { font-size:11px; }
body.adventure-mode .map-party-stats { gap:4px; }
body.adventure-mode .map-party-stat-label,
body.adventure-mode .map-party-stat-label b { font-size:7px; }
body.adventure-mode .map-party-stat-track { height:4px; }
body.adventure-mode .map-party-empty-slot { min-width:0; min-height:0; height:100%; display:grid; grid-template-columns:46px minmax(0,1fr); align-items:center; gap:9px; padding:8px 9px; border:1px dashed rgba(181,202,232,.19); border-radius:11px; color:#8f9bb0; background:linear-gradient(115deg,rgba(14,22,38,.5),rgba(19,27,43,.44)); }
body.adventure-mode .map-party-empty-art { width:38px; height:38px; display:grid; place-items:center; border:1px dashed rgba(159,182,213,.22); border-radius:11px; color:#73829b; background:rgba(255,255,255,.025); font:300 25px/1 Inter,"Segoe UI",system-ui,sans-serif; }
body.adventure-mode .map-party-empty-copy { min-width:0; display:grid; gap:4px; }
body.adventure-mode .map-party-empty-copy small { color:#71819a; font:700 7px/1.2 "DM Mono",monospace; letter-spacing:.07em; }
body.adventure-mode .map-party-empty-copy strong { color:#9ba8bc; font:600 10px/1.2 Inter,"Segoe UI",system-ui,sans-serif; }
body.adventure-mode .map-party-meta { color: #93a4bd; font: 700 7px/1.2 Inter, "Segoe UI", system-ui, sans-serif; }
body.adventure-mode .map-party-meta b { color: #84ded3; }
body.adventure-mode .map-party-member strong { color: #edf3fb; font-size: 9px; }
body.adventure-mode .map-party-stat-label { color: #8e9fb7; font: 700 6px/1.2 Inter, "Segoe UI", system-ui, sans-serif; }
body.adventure-mode .map-party-stat-label b { color: #92a9c6; }
body.adventure-mode .map-party-stat-label i { color: #d7e2f3; }
body.adventure-mode .map-party-stat-track { height: 3px; border: 0; border-radius: 99px; background: rgba(6, 11, 23, .86); }
body.adventure-mode .map-party-hp .map-party-stat-track b { background: linear-gradient(90deg,#e58077,#e7bd76,#74dcad); box-shadow: none; }
body.adventure-mode .map-party-xp .map-party-stat-track b { background: linear-gradient(90deg,#5cadd8,#6fd9cf); box-shadow: none; }

body.adventure-mode .adventure-combat-console { min-width: 0; display: grid; align-content: start; gap: 10px; }
body.adventure-mode .adventure-combat-console > .adventure-quickbar { display: block; min-height: 0; justify-content: initial; align-items: stretch; }
body.adventure-mode .adventure-quickbar {
  display: block; min-width: 0; padding: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none;
}
body.adventure-mode .quickbar-actions { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 7px; }
body.adventure-mode .quickbar-actions .button {
  min-width: 0; min-height: 40px; justify-content: flex-start; gap: 8px; padding: 0 11px;
  border: 1px solid var(--line); border-radius: 11px; color: #cbd7e9;
  background: linear-gradient(145deg, rgba(24, 36, 58, .94), rgba(17, 27, 46, .94));
  font: 700 9px/1.2 Inter, "Segoe UI", system-ui, sans-serif; white-space: nowrap;
}
body.adventure-mode .quickbar-actions .button:hover { border-color: rgba(107, 220, 211, .35); color: #95e9dd; background: #1c2d48; }
body.adventure-mode .quickbar-actions .button.primary { color: #10232e; border-color: rgba(109, 221, 211, .48); background: linear-gradient(135deg, #a6eadc, #6ccdd0); }
body.adventure-mode .quickbar-actions .ball-throw-button { color: #182733; border-color: rgba(243, 198, 125, .58); background: linear-gradient(135deg, #f4d292, #e8ae6e); }
body.adventure-mode .quickbar-actions .ball-throw-button:hover { color: #182733; background: linear-gradient(135deg, #ffe0a1, #efbf7c); }
body.adventure-mode .quickbar-actions .ball-throw-button:disabled { opacity: .54; }
body.adventure-mode .quickbar-actions .ball-throw-button b { min-width: 21px; padding: 3px 6px; border-radius: 7px; color: #f5f7fb; background: rgba(27, 34, 46, .55); font: 800 8px/1.2 Inter, "Segoe UI", system-ui, sans-serif; }
body.adventure-mode .quickbar-actions .ball-throw-icon { width: 21px; height: 21px; }
body.adventure-mode .quickbar-actions .pokeball-icon { width: 100%; height: 100%; }
body.adventure-mode .quickbar-actions .utility-icon { width: 18px; height: 18px; display: grid; flex: 0 0 18px; place-items: center; color: #8edfd7; }
body.adventure-mode .quickbar-actions .utility-icon svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
body.adventure-mode .adventure-dock {
  grid-template-columns: minmax(0,1fr); gap: 8px; padding: 8px;
  border: 1px solid var(--line); border-radius: 15px;
  background: linear-gradient(145deg, rgba(18, 27, 46, .97), rgba(14, 22, 39, .97));
  box-shadow: var(--shadow);
}
body.adventure-mode .hud-unit {
  min-height: 94px; gap: 10px; padding: 9px;
  border: 1px solid rgba(174, 195, 229, .12); border-radius: 12px;
  color: var(--ink); background: rgba(7, 13, 26, .45);
}
body.adventure-mode .hud-unit-art { width: 64px; height: 64px; flex-basis: 64px; border: 1px solid rgba(170, 202, 235, .15); border-radius: 13px; background: radial-gradient(circle, rgba(90, 156, 176, .15), rgba(16, 25, 43, .28) 70%); }
body.adventure-mode .hud-unit-art img { width: 59px; height: 59px; filter: drop-shadow(0 5px 5px rgba(0,0,0,.3)); }
body.adventure-mode .target-art { border-color: rgba(240, 141, 157, .18); }
body.adventure-mode .hud-unit-caption { color: #8f9fb8; font: 700 8px/1.2 Inter, "Segoe UI", system-ui, sans-serif; }
body.adventure-mode .hud-unit-caption b { color: #c0d0e9; font-size: 9px; }
body.adventure-mode .hud-unit-copy > strong { margin: 4px 0 8px; color: #f0f5fc; font-size: 13px; }
body.adventure-mode .hud-bar-label { color: #8e9db5; font: 700 7px/1.2 Inter, "Segoe UI", system-ui, sans-serif; }
body.adventure-mode .hud-bar-label i { color: #cbd7e8; }
body.adventure-mode .xp-hud-track, body.adventure-mode .enemy-hp {
  height: 6px; margin-top: 4px; border: 0; border-radius: 99px; background: rgba(5, 9, 19, .9);
}
body.adventure-mode .xp-hud-track b { background: linear-gradient(90deg, #62c9d4, #8fe2bd); box-shadow: none; }
body.adventure-mode .enemy-hp b { background: linear-gradient(90deg, #e47583, #f0ad79); box-shadow: none; }
body.adventure-mode .adventure-statbar {
  display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 6px;
  padding: 8px; border: 1px solid var(--line); border-radius: 14px;
  color: #a0aec3; background: rgba(17, 26, 44, .88); font: 700 7px/1.2 Inter, "Segoe UI", system-ui, sans-serif;
}
body.adventure-mode .adventure-statbar .stat-chip {
  min-width: 0; padding: 6px 7px; border: 1px solid rgba(169, 190, 224, .09);
  border-radius: 9px; background: rgba(7, 13, 25, .42);
}
body.adventure-mode .stat-chip small { color: #8595ae; font: 700 6px/1.2 Inter, "Segoe UI", system-ui, sans-serif; letter-spacing: .05em; }
body.adventure-mode .stat-chip strong { margin-top: 3px; color: #e3ecf8; font-size: 10px; }
body.adventure-mode .adventure-client .moves-panel {
  min-height: 0; margin: 0; border: 1px solid var(--line); border-radius: 15px;
  background: linear-gradient(145deg, rgba(19, 29, 49, .98), rgba(14, 22, 40, .98));
  box-shadow: var(--shadow);
}
body.adventure-mode .adventure-client .moves-panel .panel-heading { min-height: 44px; padding: 10px 12px 8px; }
body.adventure-mode .adventure-client .moves-panel .panel-heading strong { color: #edf3fc; font-size: 11px; }
body.adventure-mode .adventure-client .moves-panel .chip { padding: 4px 7px; border-color: rgba(102, 218, 208, .15); border-radius: 999px; color: #a6d9d3; background: rgba(57, 146, 144, .08); font: 700 7px/1.2 Inter, "Segoe UI", system-ui, sans-serif; }
body.adventure-mode .adventure-client .move-list { grid-template-columns: minmax(0,1fr); gap: 6px; padding: 0 9px 10px; }
body.adventure-mode .adventure-client .move-card {
  min-height: 54px; grid-template-columns: 35px minmax(0,1fr) auto; gap: 9px; padding: 7px 9px;
  border-color: color-mix(in srgb, var(--move-accent,#9caecb) 24%, transparent); border-radius: 11px;
  color: #e6edf8; background: linear-gradient(100deg, color-mix(in srgb,var(--move-accent,#9caecb) 8%,rgba(10,17,31,.78)), rgba(11,18,32,.8));
}
body.adventure-mode .adventure-client .move-card:hover { border-color: color-mix(in srgb, var(--move-accent,#9caecb) 52%, transparent); background: color-mix(in srgb,var(--move-accent,#9caecb) 14%,#111c30); }
body.adventure-mode .adventure-client .move-card:disabled { filter: saturate(.55); }
body.adventure-mode .adventure-client .move-symbol { width: 32px; height: 32px; border-color: color-mix(in srgb,var(--move-accent,#9caecb) 32%,transparent); border-radius: 10px; color: var(--move-accent,#a9bbd5); background: color-mix(in srgb,var(--move-accent,#9caecb) 11%,transparent); }
body.adventure-mode .adventure-client .move-card strong { color: #ecf2fb; font-size: 9px; }
body.adventure-mode .adventure-client .move-card small { color: #91a1b8; font-size: 7px; }
body.adventure-mode .adventure-client .move-cast-hint { color: #c3d5ec; font-size: 8px; }

/* Common windows and all collection screens use the same glassy card system. */
.panel, .storage-panel, .screen-modal, .modal, .adventure-panel-modal, .ball-shop-modal, .adventure-chat-modal {
  border-color: var(--line) !important; border-radius: 17px !important; color: var(--ink);
  background: linear-gradient(145deg, rgba(20, 30, 49, .98), rgba(13, 21, 38, .99)) !important;
  box-shadow: 0 26px 80px rgba(0,0,0,.48), inset 0 1px rgba(255,255,255,.035) !important;
}
.panel { box-shadow: var(--shadow) !important; }
.panel-heading { padding: 14px 15px 11px; }
.panel-heading strong { color: #edf3fc; }
.panel-heading small { color: #95a4bb; }
.panel-body { color: #dbe4f1; }
.screen-modal-backdrop, .modal-backdrop, body.adventure-mode .adventure-panel-backdrop, body.adventure-mode .adventure-chat-backdrop, body.adventure-mode .ball-shop-backdrop {
  background: rgba(4, 8, 17, .76) !important; backdrop-filter: blur(11px) !important;
}
.screen-modal-head, .adventure-panel-head, .ball-shop-head, .adventure-chat-modal-head {
  border-bottom-color: rgba(169, 190, 224, .12) !important;
  background: linear-gradient(100deg, rgba(31, 45, 70, .85), rgba(20, 30, 50, .78)) !important;
}
.screen-modal-head h2, .adventure-panel-head h2, .ball-shop-head h2, .adventure-chat-modal-head h2, .modal h2, .modal h3 { color: #f0f4fb !important; font-family: inherit !important; }
.screen-modal-head p, .hunt-picker-head p, .ball-shop-head p, .adventure-chat-modal-head p { color: #a2b0c4 !important; }
.screen-modal-content { scrollbar-color: rgba(124, 159, 205, .35) rgba(5, 10, 21, .5); }
.screen-modal-content > .page-intro > div:first-child { display: none; }
.screen-modal-content-configuracoes > .page-intro { display: none; }
.hunt-picker-head, .hunt-picker-toolbar { border-color: var(--line); }
.hunt-picker-close, .adventure-panel-close, .adventure-chat-close {
  width: 35px; height: 35px; border: 1px solid var(--line-strong); border-radius: 11px;
  color: #d6e1f0; background: rgba(27, 40, 63, .8);
}
.hunt-picker-close:hover, .adventure-panel-close:hover, .adventure-chat-close:hover { border-color: rgba(112, 221, 211, .45); color: #8be6dc; background: #243650; }
.modal-fields input, .modal-fields select, .auth-field input, .search-field input, .select-field select, .field-control, input, select {
  border-color: rgba(169, 190, 224, .18); border-radius: 10px; color: #e9f0fb; background-color: #101a2c;
}
input::placeholder { color: #75849d; }
.search-field, .select-field { color: #b7c3d5; }
.search-field input:focus, .select-field select:focus, .modal-fields input:focus { border-color: rgba(104, 220, 210, .54); box-shadow: 0 0 0 3px rgba(91, 198, 192, .11); }
.hunt-tile, .dex-tile, .team-slot, .storage-card, .setting-card, .evolution-option, .ball-shop-card, .mission-card, .upgrade-card, .research-upgrade-card, .hunt-picker-tier-group, .hunt-picker-level-group {
  border-color: rgba(169, 190, 224, .12); border-radius: 14px;
  color: #e8effa; background: linear-gradient(145deg, rgba(25, 37, 59, .94), rgba(15, 24, 42, .97));
}
.hunt-tile:hover, .dex-tile:hover, .team-slot:hover, .storage-card:hover { border-color: rgba(107, 219, 210, .35); background: linear-gradient(145deg, rgba(34, 53, 79, .96), rgba(18, 31, 52, .98)); }
.hunt-tile.selected, .dex-tile.selected, .team-slot.selected, .evolution-option.selected { border-color: rgba(105, 223, 211, .52); box-shadow: inset 0 0 0 1px rgba(105,223,211,.14), 0 10px 25px rgba(32,123,126,.1); }
.hunt-tile-body strong, .hunt-picker-tier-head strong, .hunt-picker-level-head strong, .dex-tile strong, .team-slot strong, .storage-card strong { color: #eff4fc; }
.hunt-tile-body small, .hunt-tile-foot, .hunt-picker-level-head small, .storage-card small { color: #94a3b9; }
.hunt-tile-foot, .storage-card { border-top-color: rgba(169,190,224,.1); }
.biome-atlas-panel, .town-atlas-panel { border-color: var(--line); border-radius: 16px; background: linear-gradient(135deg, rgba(20,39,52,.96), rgba(17,26,44,.98)); }
.town-atlas-art { border-color: rgba(132, 175, 207, .18); border-radius: 12px; background: repeating-conic-gradient(#18263a 0 25%,#1d2d40 0 50%) 50%/16px 16px; }
.town-atlas-copy h3 { color: #eaf1fb; }
.town-atlas-copy p, .setting-card p, .evolution-option-copy small { color: #a0aec2; }
.settings-grid { gap: 12px; }
.setting-card { padding: 16px; }
.setting-card h3 { color: #edf3fc; }
.setting-row { border-color: rgba(169,190,224,.1); color: #a5b3c8; }
.setting-row strong { color: #e6eef9; }
.storage-panel { padding: 18px; }
.storage-heading h3 { color: #edf3fc; }
.storage-heading p { color: #9eacc1; }
.storage-card { border: 1px solid var(--line); }
.team-slot, .dex-tile, .hunt-tile { box-shadow: 0 8px 22px rgba(0,0,0,.12); }
.rarity-common { color: #c2ccdc; }
.toast-region .toast { border-color: var(--line); border-radius: 13px; background: rgba(17,25,42,.97); box-shadow: var(--shadow); }
.auth-screen { border-color: var(--line); border-radius: 22px; background: linear-gradient(135deg,#141e32,#101828); }
.auth-card { background: rgba(13, 21, 37, .42); }
.auth-brand strong { color: #eff5fc; }
.auth-eyebrow { color: #80ded5; }
.auth-field { color: #bcc8d9; }
.auth-field input { border-color: var(--line-strong); border-radius: 11px; background: #111b2e; }
.auth-field input:focus { border-color: #69d9d0; box-shadow: 0 0 0 3px rgba(105,217,208,.12); }
.auth-submit { border-color: rgba(107,220,209,.45); border-radius: 11px; color: #11232c; background: linear-gradient(135deg,#a2eadb,#62cbd0); }
.auth-secondary { border-color: var(--line); border-radius: 11px; color: #c9d5e6; background: rgba(255,255,255,.04); }
.auth-text-button { color: #8de0d5; }
.auth-art { background: radial-gradient(ellipse at 56% 32%,rgba(110,216,204,.28),transparent 29%),linear-gradient(153deg,#364a71 0%,#343d65 42%,#1c5361 78%,#17343f 100%); }

body.nap-active-mode {
  min-height: 100vh;
  min-height: 100dvh;
  overflow: hidden;
  background: #080d18 !important;
}
body.nap-active-mode .app-shell,
body.nap-active-mode #toastRegion { display: none !important; }
body.nap-active-mode #modalLayer { position: fixed; z-index: 1000; inset: 0; }
body.nap-active-mode .nap-backdrop {
  position: fixed;
  inset: 0;
  padding: clamp(12px, 3vw, 32px);
  background: #080d18 !important;
  backdrop-filter: none !important;
  animation: none !important;
}
body.nap-active-mode .nap-modal {
  width: min(620px, 100%);
  max-height: calc(100vh - 24px);
  max-height: calc(100dvh - 24px);
  overflow-y: auto;
}

body.adventure-mode .modal,
body.adventure-mode .adventure-panel-modal,
body.adventure-mode .ball-shop-modal,
body.adventure-mode .adventure-chat-modal {
  color: #eaf1fb !important; border-color: var(--line) !important;
  border-radius: 17px !important; background: linear-gradient(145deg, rgba(20,30,49,.99), rgba(13,21,38,.99)) !important;
  box-shadow: 0 26px 80px rgba(0,0,0,.5), inset 0 1px rgba(255,255,255,.035) !important;
}
body.adventure-mode .modal h2, body.adventure-mode .modal h3,
body.adventure-mode .adventure-panel-head h2, body.adventure-mode .ball-shop-head h2,
body.adventure-mode .adventure-chat-modal-head h2 { color: #f0f4fb !important; font-family: inherit !important; }
body.adventure-mode .adventure-panel-head .eyebrow, body.adventure-mode .ball-shop-head .eyebrow,
body.adventure-mode .adventure-chat-modal-head .eyebrow { color: #83dfd5 !important; font-family: inherit !important; }
body.adventure-mode .adventure-panel-head, body.adventure-mode .ball-shop-head,
body.adventure-mode .adventure-chat-modal-head { border-bottom-color: var(--line) !important; background: linear-gradient(100deg,rgba(31,45,70,.88),rgba(20,30,50,.82)) !important; }
body.adventure-mode .modal .button, body.adventure-mode .modal-fields input,
body.adventure-mode .adventure-panel-modal .button, body.adventure-mode .ball-shop-modal .button,
body.adventure-mode .adventure-chat-modal .button { border-radius: 11px; font-family: inherit; }
body.adventure-mode .modal-fields input { border: 1px solid var(--line-strong); color: #eaf1fb; background: #101a2c; }
body.adventure-mode .modal-backdrop { background: rgba(4,8,17,.76) !important; backdrop-filter: blur(11px) !important; }
body.adventure-mode .ball-shop-wallet { border-color: rgba(242,191,120,.24); border-radius: 9px; color: #f3c982; background: rgba(181,128,64,.12); font-family: inherit; }
body.adventure-mode .ball-shop-card { border-color: var(--line); border-radius: 13px; background: rgba(8,14,27,.48); }
body.adventure-mode .ball-shop-card.is-selected { border-color: rgba(106,219,211,.48); background: rgba(44,113,120,.15); }
body.adventure-mode .ball-shop-card-title h3 { color: #edf3fb; font-family: inherit; }
body.adventure-mode .ball-shop-card-title span { color: #83ded5; font-family: inherit; }
body.adventure-mode .ball-shop-price-note { display:block; margin:-5px 0 10px; color:#7fd9cc; font-size:8px; line-height:1.35; }
body.adventure-mode .ball-shop-stock { color: #f2c780; font-family: inherit; }
body.adventure-mode .ball-shop-card-actions .button { border-color: var(--line); border-radius: 9px; color: #dce5f2; background: rgba(28,40,62,.9); font-family: inherit; }
body.adventure-mode .ball-shop-card-actions .button.primary { color: #13242f; border-color: rgba(105,220,209,.45); background: linear-gradient(135deg,#a6eadc,#6ccdd0); }
body.adventure-mode .ball-buy-quantity, body.adventure-mode .ball-buy-quantity input { border-color: var(--line); border-radius: 8px; background: #101a2c; font-family: inherit; }
body.adventure-mode .ball-shop-foot { border-top-color: var(--line); color: #9eacc1; font-family: inherit; }
body.adventure-mode .adventure-modal-dock { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 9px; padding: 0; border: 0; background: transparent; box-shadow: none; }
body.adventure-mode .adventure-modal-dock .hud-unit,
body.adventure-mode .adventure-modal-dock .hud-combat-controls,
body.adventure-mode .adventure-modal-dock .hud-log { border: 1px solid var(--line); border-radius: 13px; color: #e8effa; background: rgba(8,15,28,.48); }
body.adventure-mode .hud-combat-controls, body.adventure-mode .hud-log { border-color: var(--line); border-radius: 13px; color: #e8effa; background: rgba(8,15,28,.48); }
body.adventure-mode .combat-control-heading, body.adventure-mode .hud-log-heading { color: #8ce0d6; font: 800 9px/1.2 Inter, "Segoe UI", system-ui, sans-serif; }
body.adventure-mode .combat-control-heading small { color: #98a8bf; font: 8px/1.2 Inter, "Segoe UI", system-ui, sans-serif; }
body.adventure-mode .hud-combat-controls .hunt-toggle { border: 1px solid rgba(105,220,209,.42); border-radius: 10px; color: #12252e; background: linear-gradient(135deg,#a6eadc,#6ccdd0); font: 800 9px/1.2 Inter, "Segoe UI", system-ui, sans-serif; }
body.adventure-mode .hud-combat-controls .hunt-toggle.is-paused { border-color: rgba(242,191,120,.3); color: #f2ca8b; background: rgba(145,102,54,.14); }
body.adventure-mode .hud-combat-controls .speed-select { border: 1px solid var(--line); border-radius: 9px; color: #e1eafa; background: #17233a; font: 700 9px/1.2 Inter, "Segoe UI", system-ui, sans-serif; }
body.adventure-mode .hud-toggle-row { color: #a8b5c9; font: 8px/1.2 Inter, "Segoe UI", system-ui, sans-serif; }
body.adventure-mode .hud-toggle-row .toggle-switch { border-color: var(--line-strong); border-radius: 99px; background: #26334a; }
body.adventure-mode .hud-toggle-row .toggle-switch:after { border-radius: 50%; background: #a7b5c9; }
body.adventure-mode .hud-toggle-row .toggle-switch.on { background: rgba(83,191,177,.45); }
body.adventure-mode .hud-toggle-row .toggle-switch.on:after { background: #8de4d7; }
body.adventure-mode .hud-log .log-list { max-height: 150px; }
body.adventure-mode .hud-log .log-entry { color: #cbd7e8; font-family: inherit; }
body.adventure-mode .hud-log .log-entry time { color: #8798b0; font-family: inherit; }
body.adventure-mode .evolution-sequence { border-color: rgba(103,220,210,.28); border-radius: 20px; background: radial-gradient(ellipse at 50% 42%,rgba(82,181,179,.2),transparent 48%),linear-gradient(145deg,#1b2e47,#0e182a); }
body.adventure-mode .evolution-sequence .eyebrow { color: #92e5dc; }
body.adventure-mode .evolution-orbit { border-color: rgba(115,225,214,.6); box-shadow: 0 0 18px rgba(103,220,210,.4),inset 0 0 16px rgba(103,220,210,.2); }

@media (min-width: 1540px) {
  body.adventure-mode .adventure-client { grid-template-columns: minmax(0,1.65fr) minmax(430px,1fr); }
  body.adventure-mode .adventure-client .move-list { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 1240px) and (min-width: 821px) {
  body.adventure-mode .app-shell { grid-template-columns: 218px minmax(0,1fr); }
  body.adventure-mode .sidebar { width: auto; padding-left: 11px; padding-right: 11px; }
  body.adventure-mode .adventure-client { grid-template-columns: minmax(0,1fr); }
  body.adventure-mode .game-world-panel .map-wrap { height: clamp(430px, 60vh, 690px); min-height: 430px; }
  body.adventure-mode .adventure-combat-console { grid-template-columns: repeat(2,minmax(0,1fr)); align-items: start; }
  body.adventure-mode .adventure-quickbar, body.adventure-mode .adventure-statbar { grid-column: 1 / -1; }
  body.adventure-mode .adventure-dock { grid-template-columns: repeat(2,minmax(0,1fr)); }
  body.adventure-mode .adventure-client .moves-panel { grid-column: 1 / -1; }
  body.adventure-mode .adventure-client .move-list { grid-template-columns: repeat(2,minmax(0,1fr)); }
  body.adventure-mode .expedition-heading { grid-template-columns: minmax(0,1fr) auto; gap: 10px; }
}
@media (max-width: 820px) {
  .app-shell, body.adventure-mode .app-shell { display: block !important; height: auto; min-height: 100vh; padding-bottom: calc(68px + env(safe-area-inset-bottom)); }
  .sidebar, body.adventure-mode .sidebar {
    position: fixed; z-index: 30; top: auto; right: 0; bottom: 0; left: 0;
    width: 100%; height: calc(62px + env(safe-area-inset-bottom)); min-height: 0;
    display: block !important; padding: 0 7px env(safe-area-inset-bottom);
    border-top: 1px solid rgba(169,190,224,.16); border-right: 0;
    background: rgba(10, 16, 30, .94); box-shadow: 0 -10px 35px rgba(0,0,0,.28); backdrop-filter: blur(20px);
  }
  .brand, .trainer-card, .nav-label, .sidebar-spacer, .sidebar-quest, .sidebar-footer { display: none !important; }
  .main-nav { height: 61px; display: grid; grid-template-columns: repeat(7,minmax(0,1fr)); gap: 3px; align-items: center; }
  .nav-button, .nav-button.mobile-settings-nav { height: 49px; min-height: 49px; display: flex; flex-direction: column; justify-content: center; gap: 2px; padding: 2px 1px; border-radius: 10px; box-shadow: none !important; }
  .nav-button.is-active { border-color: rgba(104,220,211,.16); box-shadow: inset 0 2px #70ded4 !important; }
  .nav-icon { width: 22px; height: 21px; font-size: 16px; }
  .nav-icon svg { width: 17px; height: 17px; }
  .nav-button > span:nth-child(2) { flex: 0; font-size: 8px; }
  .nav-pill, .nav-count { display: inline-flex; }
  .nav-count { font-size:7px; line-height:1; white-space:nowrap; }
  .main-content, body.adventure-mode .main-content { width: 100%; height: auto; min-height: 100vh; overflow: visible; padding: 0 12px 20px; }
  .topbar, body.adventure-mode .topbar { position: sticky; top: 0; margin: 0 -12px; padding: 0 12px; min-height: 72px; gap: 8px; }
  .topbar h1 { max-width: 180px; font-size: 17px; line-height: 1.15; }
  .breadcrumbs { font-size: 7px; }
  .topbar-resources { gap: 5px; }
  .resource-chip { min-width: 62px; height: 38px; gap: 5px; padding: 0 6px; border-radius: 10px; }
  .resource-chip small { font-size: 6px; }
  .resource-chip strong { font-size: 9px; }
  .coin-icon, .research-icon { width: 21px; height: 21px; border-radius: 7px; }
  .coin-icon svg, .research-icon svg { width: 15px; height: 15px; }
  .notice-button { display: none; }
  .research-chip { min-width: 54px; }
  .content-area, body.adventure-mode .content-area { padding-top: 14px; }
  body.adventure-mode .expedition-heading { grid-template-columns:minmax(0,1fr) auto; grid-template-rows:auto; grid-template-areas:"place actions"; gap: 7px 8px; min-height: 0; margin-bottom: 11px; }
  body.adventure-mode .expedition-location { grid-area: place; }
  body.adventure-mode .expedition-heading h2 { font-size: 17px; }
  body.adventure-mode .trainer-summary { display: none !important; }
  body.adventure-mode .trainer-summary-top > strong { font-size: 10px; }
  body.adventure-mode .expedition-heading-actions { grid-area: actions; gap: 5px; }
  body.adventure-mode .expedition-heading-actions button { width: 34px; min-width: 34px; height: 34px; padding: 0; }
  body.adventure-mode .expedition-heading-actions button span { display: none; }
  body.adventure-mode .expedition-heading-actions .menu-icon { width: 18px; height: 18px; }
  body.adventure-mode .adventure-client { grid-template-columns: minmax(0,1fr); gap: 11px; }
  body.adventure-mode .game-world-panel .map-wrap { height: clamp(390px, 58vh, 620px); min-height: 390px; border-radius: 16px; }
  body.adventure-mode .map-pokemon-overlay { top: 8px; bottom: 62px; left: 8px; width: min(160px, 42vw); gap: 3px; padding: 5px; }
  body.adventure-mode .map-pokemon-overlay { gap:3px; }
  body.adventure-mode .map-party-list { gap:3px; }
  body.adventure-mode .map-party-toggle { min-height:38px; gap:5px; padding:5px 6px; border-radius:8px; }
  body.adventure-mode .map-party-toggle-copy { gap:2px; }
  body.adventure-mode .map-party-toggle-copy strong { font-size:6px; }
  body.adventure-mode .map-party-toggle-copy small { font-size:5px; }
  body.adventure-mode .map-party-toggle-count { font-size:6px; }
  body.adventure-mode .map-party-toggle-icon { width:13px; height:13px; }
  body.adventure-mode .map-pokemon-overlay.is-collapsed { width:130px; }
  body.adventure-mode .map-party-member { flex:none; height:100%; grid-template-columns: 34px minmax(0,1fr); gap: 5px; padding: 4px 5px; }
  body.adventure-mode .map-party-art { width: 31px; height: 31px; }
  body.adventure-mode .map-party-art img { width: 29px; height: 29px; }
  body.adventure-mode .map-party-copy { gap:2px; }
  body.adventure-mode .map-party-meta { font-size:6px; }
  body.adventure-mode .map-party-member strong { font-size: 8px; }
  body.adventure-mode .map-party-stats { gap:2px; }
  body.adventure-mode .map-party-stat-label,
  body.adventure-mode .map-party-stat-label b { font-size:5.5px; }
  body.adventure-mode .map-party-empty-slot { grid-template-columns:34px minmax(0,1fr); gap:5px; padding:4px 5px; border-radius:7px; }
  body.adventure-mode .map-party-empty-art { width:28px; height:28px; border-radius:8px; font-size:20px; }
  body.adventure-mode .map-party-empty-copy { gap:2px; }
  body.adventure-mode .map-party-empty-copy small { font-size:5.5px; }
  body.adventure-mode .map-party-empty-copy strong { font-size:8px; }
  body.adventure-mode .world-topline { top: 8px; right: 8px; }
  body.adventure-mode .world-online { padding: 6px 8px; font-size: 7px; }
  body.adventure-mode .world-minimap { width: 122px; padding: 6px; }
  body.adventure-mode .minimap-heading { font-size: 6px; }
  body.adventure-mode #miniMapCanvas { height: 57px; }
  body.adventure-mode .world-bottom { min-height: 42px; padding: 6px 8px; }
  body.adventure-mode .movement-hint { max-width: calc(100% - 74px); overflow: hidden; font-size: 6px; text-overflow: ellipsis; white-space: nowrap; }
  body.adventure-mode .scene-controls button { width: 27px; height: 27px; }
  body.adventure-mode .adventure-combat-console { grid-template-columns: minmax(0,1fr); gap: 9px; }
  body.adventure-mode .adventure-quickbar, body.adventure-mode .adventure-statbar, body.adventure-mode .adventure-client .moves-panel { grid-column: auto; }
  body.adventure-mode .quickbar-actions .button { min-height: 38px; padding: 0 8px; font-size: 8px; }
  body.adventure-mode .adventure-dock { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 5px; padding: 6px; }
  body.adventure-mode .hud-unit { min-height: 78px; gap: 6px; padding: 6px; }
  body.adventure-mode .hud-unit-art { width: 43px; height: 43px; flex-basis: 43px; border-radius: 11px; }
  body.adventure-mode .hud-unit-art img { width: 40px; height: 40px; }
  body.adventure-mode .hud-unit-caption { font-size: 6px; }
  body.adventure-mode .hud-unit-caption b { font-size: 7px; }
  body.adventure-mode .hud-unit-copy > strong { margin: 3px 0 5px; font-size: 9px; }
  body.adventure-mode .hud-bar-label { font-size: 6px; }
  body.adventure-mode .adventure-statbar { gap: 4px; padding: 6px; }
  body.adventure-mode .adventure-statbar .stat-chip { padding: 5px; }
  body.adventure-mode .stat-chip strong { font-size: 9px; }
  body.adventure-mode .adventure-client .move-list { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 5px; padding: 0 7px 8px; }
  body.adventure-mode .adventure-client .move-card { min-height: 48px; grid-template-columns: 27px minmax(0,1fr); gap: 5px; padding: 5px; }
  body.adventure-mode .adventure-client .move-symbol { width: 25px; height: 25px; border-radius: 8px; font-size: 12px; }
  body.adventure-mode .adventure-client .move-card strong { font-size: 8px; }
  body.adventure-mode .adventure-client .move-card small { font-size: 6px; }
  body.adventure-mode .adventure-client .move-cast-hint { display: none; }
  .screen-modal-backdrop, .modal-backdrop { padding: 8px; }
  .screen-modal, .modal { max-height: calc(100vh - 16px); border-radius: 15px !important; }
  .screen-modal-head { padding: 12px; gap: 9px; }
  .screen-modal-head h2 { font-size: 17px; }
  .screen-modal-content { padding: 11px; }
  .screen-modal-content .pokedex-grid { grid-template-columns: repeat(4,minmax(0,1fr)); gap: 6px; }
  .screen-modal-content .team-grid { grid-template-columns: 1fr; }
  .screen-modal-content .storage-grid, .screen-modal-content .settings-grid { grid-template-columns: 1fr; }
}

@media (max-width: 520px) {
  .main-content, body.adventure-mode .main-content { padding-right: 8px; padding-left: 8px; }
  .topbar, body.adventure-mode .topbar { margin-right: -8px; margin-left: -8px; padding-right: 8px; padding-left: 8px; }
  .topbar h1 { max-width: 132px; font-size: 15px; }
  .resource-chip { min-width: 53px; }
  .research-chip { min-width: 48px; }
  body.adventure-mode .game-world-panel .map-wrap { height: clamp(360px, 56vh, 540px); min-height: 360px; }
  body.adventure-mode .adventure-chat-compact { right: 8px; bottom: 56px; width: min(230px, calc(100% - 156px)); height: 47px; padding: 5px 7px; }
  body.adventure-mode .adventure-chat-compact-head span { display: none; }
  body.adventure-mode .movement-hint { left: 36px; font-size: 5px; letter-spacing: 0; }
  body.adventure-mode .map-pokemon-overlay { width: min(145px, 43vw); }
  body.adventure-mode .adventure-dock { grid-template-columns: minmax(0,1fr); }
  body.adventure-mode .hud-unit { min-height: 70px; }
  body.adventure-mode .adventure-client .move-list { grid-template-columns: minmax(0,1fr); }
  .screen-modal-content .pokedex-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .page-actions { flex-wrap: wrap; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* Keep combat tools in the expedition header and give the live hunt the full stage. */
body.adventure-mode .adventure-client { grid-template-columns: minmax(0, 1fr) !important; gap: 12px; }
body.adventure-mode .adventure-combat-console { display: none !important; }
body.adventure-mode .game-world-panel .map-wrap { height: clamp(520px, calc(100vh - 170px), 960px); min-height: 520px; }
body.adventure-mode .expedition-heading-actions > button:not(.center-shortcut):not(.mission-menu-button):not(.expedition-tool-button) { display: none !important; }
body.adventure-mode .expedition-heading-actions .expedition-tool-button { min-width: 76px; }
body.adventure-mode .expedition-heading-actions .expedition-tool-button .menu-icon { color: #8ee2d8; }
body.adventure-mode .expedition-heading-actions .expedition-balls-button { border-color: rgba(105,220,209,.25); color: #a9eee3; background: rgba(47,117,122,.15); }
body.adventure-mode .expedition-heading-actions .expedition-catch-button { border-color: rgba(243,198,125,.35); color: #f3d292; background: rgba(143,102,56,.16); }
body.adventure-mode .expedition-heading-actions .expedition-catch-button:hover { border-color: rgba(243,198,125,.62); color: #ffe5ad; background: rgba(143,102,56,.28); }
body.adventure-mode .expedition-heading-actions .expedition-catch-button .ball-throw-icon { width: 18px; height: 18px; display: inline-flex; }
body.adventure-mode .expedition-heading-actions .expedition-catch-button .pokeball-icon { width: 100%; height: 100%; }
body.adventure-mode .expedition-heading-actions .expedition-catch-button b { min-width: 19px; padding: 2px 5px; border-radius: 7px; color: #f5f7fb; background: rgba(27,34,46,.55); font: 800 8px/1.2 Inter, "Segoe UI", system-ui, sans-serif; }
body.adventure-mode .expedition-heading-actions .expedition-catch-button:disabled { opacity: .5; }
body.adventure-mode .expedition-heading-actions .expedition-moves-button .menu-icon { color: #d6b7ff; }
body.adventure-mode .expedition-heading-actions .expedition-battle-button .menu-icon { color: #a9c2ff; }

@media (max-width: 1120px) and (min-width: 821px) {
  body.adventure-mode .expedition-heading-actions { gap: 4px; }
  body.adventure-mode .expedition-heading-actions button { width: 36px; min-width: 36px; padding: 0; }
  body.adventure-mode .expedition-heading-actions button span { display: none; }
  body.adventure-mode .expedition-heading-actions .expedition-catch-button .ball-throw-icon { display: inline-flex; }
  body.adventure-mode .expedition-heading-actions .expedition-catch-button b { display: none; }
  body.adventure-mode .game-world-panel .map-wrap { height: clamp(430px, calc(100vh - 150px), 820px); min-height: 430px; }
}

@media (max-width: 820px) {
  body.adventure-mode .game-world-panel .map-wrap { height: clamp(390px, 62vh, 720px); min-height: 390px; }
  body.adventure-mode .expedition-heading-actions .expedition-catch-button .ball-throw-icon { display: inline-flex; }
  body.adventure-mode .expedition-heading-actions .expedition-catch-button b { display: none; }
}

@media (max-width: 520px) {
  body.adventure-mode .game-world-panel .map-wrap { height: clamp(360px, 58vh, 600px); min-height: 360px; }
}

/* Keep navigation available in a slim icon rail and give the hunt map the freed width. */
.save-status { display: none !important; }
@media (min-width: 821px) {
  body.adventure-mode .app-shell {
    grid-template-columns: 72px minmax(0, 1fr) !important;
    transition: grid-template-columns .22s ease;
  }
  body.adventure-mode .sidebar {
    width: 72px !important; min-width: 72px; padding: 18px 8px 12px !important;
    overflow: hidden; transition: width .22s ease, padding .22s ease;
  }
  body.adventure-mode .brand { justify-content: center; gap: 0; padding: 0 0 18px; }
  body.adventure-mode .brand-ball-toggle { flex: 0 0 36px; padding: 0; appearance: none; cursor: pointer; }
  body.adventure-mode .brand-ball-toggle:hover { filter: brightness(1.12); box-shadow: 0 0 26px rgba(101, 216, 208, .35); }
  body.adventure-mode .brand-ball-toggle:focus-visible { outline: 2px solid #83e8dc; outline-offset: 3px; }
  body.adventure-mode .brand-copy { color: inherit; text-decoration: none; }

  body.adventure-mode .brand-copy,
  body.adventure-mode .trainer-copy,
  body.adventure-mode .sidebar .trainer-card > .icon-button,
  body.adventure-mode .trainer-xp,
  body.adventure-mode .nav-label,
  body.adventure-mode .nav-button > span:not(.nav-icon),
  body.adventure-mode .sidebar-quest { display: none !important; }
  body.adventure-mode .trainer-card {
    display: flex; justify-content: center; margin: 0 0 14px; padding: 0;
    border: 0; background: transparent; box-shadow: none;
  }
  body.adventure-mode .trainer-avatar { flex: 0 0 auto; }
  body.adventure-mode .main-nav { gap: 7px; }
  body.adventure-mode .nav-button {
    width: 52px; min-width: 52px; justify-content: center; gap: 0; margin: 0 auto; padding: 0;
  }
  body.adventure-mode .nav-icon { width: 22px; }
  body.adventure-mode .sidebar-spacer { display: block; flex: 1; min-height: 12px; }
  body.adventure-mode .sidebar-footer { padding: 8px 0 0; }
  body.adventure-mode .settings-link {
    width: 52px; justify-content: center; gap: 0; margin: 0 auto; padding: 0; font-size: 0;
  }
  body.adventure-mode .settings-link .settings-icon { font-size: 15px; }
  body.adventure-mode .sidebar-expanded.app-shell { grid-template-columns: 238px minmax(0, 1fr) !important; }
  body.adventure-mode .sidebar-expanded .sidebar {
    width: auto !important; min-width: 0; padding: 22px 14px 15px !important;
  }
  body.adventure-mode .sidebar-expanded .brand { justify-content: flex-start; gap: 12px; padding: 0 10px 20px; }
  body.adventure-mode .sidebar-expanded .brand-copy,
  body.adventure-mode .sidebar-expanded .trainer-copy,
  body.adventure-mode .sidebar-expanded .sidebar .trainer-card > .icon-button,
  body.adventure-mode .sidebar-expanded .trainer-xp,
  body.adventure-mode .sidebar-expanded .nav-label,
  body.adventure-mode .sidebar-expanded .nav-button > span:not(.nav-icon),
  body.adventure-mode .sidebar-expanded .sidebar-quest { display: initial !important; }
  body.adventure-mode .sidebar-expanded .brand-copy,
  body.adventure-mode .sidebar-expanded .trainer-copy,
  body.adventure-mode .sidebar-expanded .trainer-xp { display: grid !important; }
  body.adventure-mode .sidebar-expanded .sidebar .trainer-card > .icon-button { display: grid !important; }
  body.adventure-mode .sidebar-expanded .nav-label { display: block !important; }
  body.adventure-mode .sidebar-expanded .nav-button > span:not(.nav-icon) { display: inline !important; }
  body.adventure-mode .sidebar-expanded .sidebar-quest { display: block !important; }
  body.adventure-mode .sidebar-expanded .trainer-card {
    display: grid; grid-template-columns: 39px 1fr 25px; justify-content: initial;
    margin: 0 3px 22px; padding: 11px 10px 10px; border: 1px solid var(--line);
    background: linear-gradient(145deg, rgba(33, 47, 72, .82), rgba(19, 28, 47, .9));
    box-shadow: none;
  }
  body.adventure-mode .sidebar-expanded .trainer-xp { grid-column: 1 / -1; }
  body.adventure-mode .sidebar-expanded .main-nav { gap: 5px; }
  body.adventure-mode .sidebar-expanded .nav-button {
    width: 100%; min-width: 0; justify-content: flex-start; gap: 11px; margin: 0; padding: 0 11px;
  }
  body.adventure-mode .sidebar-expanded .nav-icon { width: 20px; }
  body.adventure-mode .sidebar-expanded .settings-link {
    width: 100%; justify-content: flex-start; gap: 7px; margin: 0; padding: 0 11px; font-size: 10px;
  }
  body.adventure-mode .sidebar-toggle-button svg { width: 16px; height: 16px; transition: transform .2s ease; }
  body.adventure-mode .app-shell.sidebar-expanded .sidebar-toggle-button svg { transform: rotate(180deg); }
}
@media (max-width: 820px) {
  body.adventure-mode .sidebar-toggle-button { display: none !important; }
}


/* Full-height battle stage with currencies beside the game tools. */
body.adventure-mode { height:100dvh; overflow:hidden; }
body.adventure-mode .app-shell { height:100dvh; min-height:0; }
body.adventure-mode .sidebar { height:100dvh; min-height:0; }
body.adventure-mode .main-content {
  display:flex!important; flex-direction:column; height:100dvh; min-height:0;
  overflow:hidden; padding:0 clamp(8px,1.4vw,20px);
}
body.adventure-mode .topbar { display:none!important; }
body.adventure-mode .content-area {
  display:flex; flex:1 1 auto; flex-direction:column; min-height:0; height:auto;
  padding:0!important; overflow:hidden!important;
}
body.adventure-mode .expedition-heading {
  display:grid; flex:0 0 auto; grid-template-columns:minmax(0,1fr) auto; grid-template-rows:auto;
  grid-template-areas:none; align-items:center; gap:8px; min-height:54px; margin:0; padding:0;
}
body.adventure-mode .expedition-location { grid-area:auto; grid-column:1; grid-row:1; min-width:0; }
body.adventure-mode .expedition-heading h2 { max-width:100%; overflow:hidden; font-size:clamp(16px,1.55vw,21px); text-overflow:ellipsis; white-space:nowrap; }
body.adventure-mode .trainer-summary { display:none!important; }
body.adventure-mode .expedition-heading-actions {
  grid-area:auto; grid-column:2; grid-row:1; justify-self:end; display:flex; align-items:center;
  flex-wrap:nowrap; gap:5px; min-width:0;
}
body.adventure-mode .expedition-heading-actions .topbar-resources { display:flex; flex:0 0 auto; align-items:center; gap:5px; margin-left:3px; }
body.adventure-mode .expedition-heading-actions .resource-chip { min-width:112px; height:36px; gap:6px; padding:0 7px; border-radius:9px; }
body.adventure-mode .expedition-heading-actions .resource-chip small { font-size:6px; }
body.adventure-mode .expedition-heading-actions .resource-chip strong { font-size:9px; }
body.adventure-mode .expedition-heading-actions .coin-icon,
body.adventure-mode .expedition-heading-actions .research-icon { width:23px; height:23px; border-radius:7px; }
body.adventure-mode .adventure-client {
  display:flex!important; flex:1 1 auto; flex-direction:column; min-width:0; min-height:0;
  height:auto!important; gap:0; overflow:hidden;
}
body.adventure-mode .game-world-panel { display:flex; flex:1 1 auto; flex-direction:column; width:100%; height:100%; min-width:0; min-height:0; }
body.adventure-mode .game-world-panel .map-wrap {
  flex:1 1 0; width:100%; height:auto!important; min-height:0!important; max-height:none!important;
  border-radius:12px;
}
/* Battle, bag and move controls stay available from the header buttons and open in modals. */
body.adventure-mode .adventure-combat-console { display:none!important; }
body.adventure-mode .world-bottom { flex:0 0 auto; }

@media (max-width: 1120px) and (min-width: 821px) {
  body.adventure-mode .expedition-heading { grid-template-columns:minmax(100px,.7fr) auto; gap:5px; }
  body.adventure-mode .expedition-heading-actions { gap:3px; }
  body.adventure-mode .expedition-heading-actions .resource-chip { min-width:83px; height:32px; gap:4px; padding:0 5px; }
  body.adventure-mode .expedition-heading-actions .coin-icon,
  body.adventure-mode .expedition-heading-actions .research-icon { width:21px; height:21px; }
}
@media (max-width: 820px) {
  body.adventure-mode .app-shell { height:100dvh; min-height:0; padding-bottom:0; }
  body.adventure-mode .sidebar { height:calc(62px + env(safe-area-inset-bottom)); min-height:0; }
  body.adventure-mode .main-content {
    width:100%; height:calc(100dvh - 62px - env(safe-area-inset-bottom)); min-height:0;
    overflow:hidden; padding:0 8px;
  }
  body.adventure-mode .expedition-heading { display:flex; justify-content:center; min-height:35px; gap:0; }
  body.adventure-mode .expedition-location { display:none; }
  body.adventure-mode .expedition-heading-actions { width:100%; justify-content:center; gap:2px; }
  body.adventure-mode .expedition-heading-actions > button { width:22px!important; min-width:22px!important; height:26px!important; padding:0!important; }
  body.adventure-mode .expedition-heading-actions button span { display:none!important; }
  body.adventure-mode .expedition-heading-actions .menu-icon { width:16px; height:16px; }
  body.adventure-mode .expedition-heading-actions .expedition-catch-button .ball-throw-icon { display:inline-flex!important; width:16px; height:16px; }
  body.adventure-mode .expedition-heading-actions .topbar-resources { gap:3px; margin-left:2px; }
  body.adventure-mode .expedition-heading-actions .resource-chip { min-width:69px; height:28px; gap:3px; padding:0 4px; }
  body.adventure-mode .expedition-heading-actions .resource-chip small { font-size:5px; }
  body.adventure-mode .expedition-heading-actions .resource-chip strong { font-size:8px; }
  body.adventure-mode .expedition-heading-actions .coin-icon,
  body.adventure-mode .expedition-heading-actions .research-icon { width:18px; height:18px; }
  body.adventure-mode .expedition-heading-actions .coin-icon svg,
  body.adventure-mode .expedition-heading-actions .research-icon svg { width:13px; height:13px; }
  body.adventure-mode .game-world-panel .map-wrap { border-radius:10px; }
  body.adventure-mode .world-bottom { min-height:38px; padding:4px 7px; }
}
@media (max-height: 560px) and (min-width: 821px) {
  body.adventure-mode .expedition-heading { min-height:42px; }
  body.adventure-mode .game-world-panel .world-bottom { min-height:38px; padding-top:3px; padding-bottom:3px; }
}


/* Explanatory hover and keyboard focus tooltips. */
.game-tooltip {
  position: fixed; z-index: 2147483000; width: max-content; max-width: min(310px, calc(100vw - 24px));
  padding: 9px 11px; border: 1px solid rgba(116, 221, 211, .34); border-radius: 10px;
  color: #eaf4fc; background: rgba(15, 24, 41, .98);
  box-shadow: 0 12px 34px rgba(0, 0, 0, .42), inset 0 1px rgba(255, 255, 255, .035);
  font: 500 11px/1.5 Inter, "Segoe UI", system-ui, sans-serif; white-space: normal;
  pointer-events: none; opacity: 0; visibility: hidden;
  transition: opacity .12s ease, visibility .12s ease;
}
.game-tooltip[data-visible="true"] { opacity: 1; visibility: visible; }
.game-tooltip[data-side="top"] { transform: translate(-50%, -100%); }
.game-tooltip[data-side="bottom"] { transform: translate(-50%, 0); }
@media (prefers-reduced-motion: reduce) { .game-tooltip { transition: none; } }


/* Individual capture research progress in the hunt catalog and Pokedex. */
.capture-study-progress { display:grid; gap:4px; margin-top:5px; padding-top:5px; border-top:1px solid rgba(116,221,211,.11); }
.capture-study-progress small { overflow:hidden; color:#7fd9cc; font:600 6px/1.35 "DM Mono",monospace; letter-spacing:.035em; text-overflow:ellipsis; white-space:nowrap; }
.capture-study-progress > i,
.capture-study-detail > i { display:block; height:3px; overflow:hidden; border-radius:99px; background:rgba(6,12,22,.72); }
.capture-study-progress > i > b,
.capture-study-detail > i > b { display:block; height:100%; border-radius:inherit; background:linear-gradient(90deg,#4ac8b9,#b3e58e); transition:width .25s ease; }
.capture-study-detail { display:grid; gap:6px; margin:12px 0; padding:10px 11px; border:1px solid rgba(116,221,211,.2); border-radius:10px; background:rgba(17,31,43,.66); }
.capture-study-detail small { color:#7fd9cc; font:600 9px/1.4 "DM Mono",monospace; letter-spacing:.07em; }
.capture-study-detail strong { color:#eef6ff; font:700 12px/1.4 Inter,"Segoe UI",sans-serif; }
.capture-study-detail span { color:#9eafc1; font:400 10px/1.5 Inter,"Segoe UI",sans-serif; }


/* Safe Pokemon sales from the PC. */
.storage-auto-sale { display:grid; grid-template-columns:minmax(0,1fr) minmax(210px,270px) auto; align-items:center; gap:12px; margin:14px 0; padding:14px; border:1px solid rgba(112,221,211,.2); border-radius:13px; background:linear-gradient(125deg,rgba(24,47,62,.64),rgba(15,24,42,.85)); }
.storage-auto-copy { display:grid; gap:5px; min-width:0; }
.storage-auto-copy .eyebrow { color:#7fd9cc; font:700 8px/1.2 "DM Mono",monospace; letter-spacing:.1em; }
.storage-auto-copy > strong { color:#edf4fc; font-size:12px; }
.storage-auto-copy > small { color:#99a9bd; font-size:9px; line-height:1.45; }
.storage-auto-select { display:grid; gap:5px; color:#9eafc1; font:600 9px/1.3 Inter,"Segoe UI",sans-serif; }
.storage-auto-select select { width:100%; min-height:36px; padding:7px 9px; }
.storage-auto-actions { display:flex; justify-content:flex-end; }
.storage-card-actions { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:6px; margin-top:8px; }
.storage-card-actions .button { min-width:0; padding-inline:8px; white-space:nowrap; }
.storage-card[data-action="pokemon-status"] { cursor:pointer; }
.storage-card[data-action="pokemon-status"]:focus-visible,
.team-slot[data-action="pokemon-status"]:focus-visible { outline:2px solid rgba(117,225,214,.82); outline-offset:2px; }
.storage-add-team-button { border-color:rgba(111,220,207,.32); color:#baf2e7; background:rgba(38,128,120,.22); }
.storage-add-team-button:disabled { color:#8493a8; background:rgba(29,41,58,.65); }
.storage-manager-backdrop, .storage-sale-backdrop { z-index:2147482500; }
.storage-manager-modal { display:grid; grid-template-rows:auto minmax(0,1fr) auto; gap:10px; width:min(720px,calc(100vw - 28px)); max-height:min(88vh,760px); overflow:hidden; padding:16px; }
.storage-manager-head { display:flex; align-items:flex-start; justify-content:space-between; gap:12px; padding-bottom:10px; border-bottom:1px solid rgba(169,190,224,.12); }
.storage-manager-head h2 { margin:4px 0; color:#f0f5fc; font-size:19px; }
.storage-manager-head p { display:flex; align-items:center; flex-wrap:wrap; gap:7px; margin:0; color:#98a9bd; font-size:9px; }
.storage-copy-list { display:grid; align-content:start; gap:7px; min-height:0; overflow:auto; padding:2px 3px 2px 0; }
.storage-copy-row { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:10px 11px; border:1px solid rgba(169,190,224,.15); border-left:3px solid #aebdd1; border-radius:10px; background:rgba(7,13,25,.46); }
.storage-copy-row.is-locked { background:rgba(49,52,42,.32); }
.storage-copy-row.is-shiny { border-left-color:#ffe18d; }
.storage-copy-row[data-rarity="uncommon"] { border-left-color:#7fe2a2; }
.storage-copy-row[data-rarity="rare"] { border-left-color:#80c8ff; }
.storage-copy-row[data-rarity="epic"] { border-left-color:#ca91ff; }
.storage-copy-row[data-rarity="legendary"] { border-left-color:#ffd166; }
.storage-copy-meta { display:grid; gap:5px; min-width:0; }
.storage-copy-meta > span { color:#9fb1c7; font:700 8px/1.2 "DM Mono",monospace; letter-spacing:.06em; }
.storage-copy-row.is-shiny .storage-copy-meta > span { color:#ffe18d; }
.storage-copy-meta > strong { color:#edf4fc; font:700 11px/1.25 "DM Mono",monospace; }
.storage-copy-actions { display:flex; flex:0 0 auto; flex-wrap:wrap; justify-content:flex-end; gap:6px; }
.storage-copy-actions .button { white-space:nowrap; }
.storage-manager-foot { padding-top:9px; border-top:1px solid rgba(169,190,224,.12); color:#92a4ba; font-size:9px; line-height:1.5; }
.storage-sale-confirm { width:min(440px,calc(100vw - 28px)); padding:17px; }
.storage-sale-value { margin:12px 0; padding:12px; border:1px solid rgba(112,221,173,.24); border-radius:11px; color:#aebcd0; background:rgba(20,63,49,.22); font-size:11px; }
.storage-sale-value strong { color:#9be6b9; font:700 14px/1.3 "DM Mono",monospace; }
@media (max-width:760px) {
  .storage-auto-sale { grid-template-columns:1fr; align-items:stretch; gap:9px; padding:11px; }
  .storage-auto-actions { justify-content:flex-start; }
}
@media (max-width:520px) {
  .storage-manager-modal { gap:8px; padding:11px; }
  .storage-copy-row { align-items:flex-start; flex-direction:column; gap:8px; padding:9px; }
  .storage-copy-actions { width:100%; justify-content:stretch; }
  .storage-copy-actions .button { flex:1 1 auto; }
  .storage-card-actions { grid-template-columns:1fr; }
}


/* Hunt session summary shown in the battle modal. */
.hunt-session-summary { display:grid; gap:12px; margin:0 0 12px; padding:14px; border:1px solid rgba(112,221,211,.22); border-radius:14px; background:linear-gradient(125deg,rgba(24,47,62,.84),rgba(15,24,42,.92)); }
.hunt-session-head { display:flex; align-items:center; justify-content:space-between; gap:12px; }
.hunt-session-head-tools { display:flex; align-items:stretch; gap:8px; }
.hunt-session-head-metrics { display:flex; align-items:stretch; gap:8px; }
.hunt-session-reset { flex:0 0 auto; align-self:center; min-height:34px; white-space:nowrap; }
.hunt-session-title { min-width:0; display:grid; gap:4px; }
.hunt-session-title .eyebrow { color:#7fd9cc; font:700 8px/1.2 "DM Mono",monospace; letter-spacing:.1em; }
.hunt-session-title h3 { margin:0; color:#f0f5fc; font-size:15px; }
.hunt-session-title small { overflow:hidden; color:#98abc1; font-size:10px; text-overflow:ellipsis; white-space:nowrap; }
.hunt-session-clock { display:grid; flex:0 0 auto; gap:4px; min-width:110px; padding:8px 10px; border:1px solid rgba(124,159,205,.18); border-radius:10px; background:rgba(7,13,25,.44); text-align:right; }
.hunt-session-pace { display:grid; flex:0 0 auto; align-content:center; gap:4px; min-width:88px; padding:8px 10px; border:1px solid rgba(112,221,211,.2); border-radius:10px; background:rgba(7,13,25,.44); text-align:right; }
.hunt-session-pace span { color:#91a3bc; font:600 7px/1.2 "DM Mono",monospace; letter-spacing:.08em; }
.hunt-session-pace strong { color:#a6eadc; font:700 15px/1.1 "DM Mono",monospace; font-variant-numeric:tabular-nums; white-space:nowrap; }
.hunt-session-clock span { color:#91a3bc; font:600 7px/1.2 "DM Mono",monospace; letter-spacing:.08em; }
.hunt-session-clock strong { color:#a6eadc; font:700 16px/1.1 "DM Mono",monospace; font-variant-numeric:tabular-nums; }
.hunt-session-stats { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:8px; }
.hunt-session-stats article { display:grid; gap:6px; min-width:0; padding:10px; border:1px solid rgba(169,190,224,.12); border-radius:10px; background:rgba(7,13,25,.42); }
.hunt-session-stats article span { overflow:hidden; color:#99a9bd; font:500 9px/1.35 Inter,"Segoe UI",sans-serif; text-overflow:ellipsis; white-space:nowrap; }
.hunt-session-stats article strong { color:#eff5fc; font:700 17px/1 "DM Mono",monospace; font-variant-numeric:tabular-nums; }
.hunt-session-stats article.is-shiny strong { color:#ffe59a; }
.hunt-session-economy { display:grid; grid-template-columns:minmax(0,1fr) 18px minmax(0,1fr) 18px minmax(0,1fr); align-items:stretch; gap:6px; }
.hunt-session-economy article { display:grid; align-content:center; gap:5px; min-width:0; padding:9px 10px; border:1px solid rgba(169,190,224,.12); border-radius:10px; background:rgba(7,13,25,.42); }
.hunt-session-economy article > span { overflow:hidden; color:#99a9bd; font:600 7px/1.35 "DM Mono",monospace; letter-spacing:.035em; text-overflow:ellipsis; white-space:nowrap; }
.hunt-session-economy article > span b { color:#c8d6e8; font:inherit; }
.hunt-session-economy article > strong { color:#eff5fc; font:700 13px/1.15 "DM Mono",monospace; font-variant-numeric:tabular-nums; }
.hunt-session-economy article:first-child > strong { color:#a6eadc; }
.hunt-session-economy .hunt-session-net-card { border-color:rgba(169,190,224,.18); }
.hunt-session-economy .hunt-session-net-card.is-positive { border-color:rgba(112,221,173,.32); background:rgba(28,76,58,.24); }
.hunt-session-economy .hunt-session-net-card.is-positive > strong { color:#9be6b9; }
.hunt-session-economy .hunt-session-net-card.is-negative { border-color:rgba(240,125,125,.34); background:rgba(81,34,42,.28); }
.hunt-session-economy .hunt-session-net-card.is-negative > strong { color:#ff9b9b; }
.hunt-session-operator { display:grid; place-items:center; color:#7fd9cc; font:700 17px/1 "DM Mono",monospace; }
@media (max-width:620px) {
  .hunt-session-summary { gap:9px; padding:10px; }
  .hunt-session-head { align-items:flex-start; flex-wrap:wrap; }
  .hunt-session-head-tools { max-width:100%; margin-left:auto; flex-wrap:wrap; justify-content:flex-end; gap:5px; }
  .hunt-session-head-metrics { gap:5px; }
  .hunt-session-reset { min-height:30px; padding:0 8px; font-size:8px; }
  .hunt-session-stats { grid-template-columns:repeat(2,minmax(0,1fr)); gap:6px; }
  .hunt-session-stats article { padding:8px; }
  .hunt-session-stats article span { font-size:8px; }
  .hunt-session-clock { min-width:0; padding:7px 8px; }
  .hunt-session-clock strong { font-size:12px; }
  .hunt-session-pace { min-width:0; padding:7px 8px; }
  .hunt-session-pace strong { font-size:12px; }
  .hunt-session-economy { grid-template-columns:1fr; gap:3px; }
  .hunt-session-economy article { padding:7px 8px; }
  .hunt-session-economy .hunt-session-operator { min-height:8px; font-size:12px; }
}


/* Individual owned Pokemon status sheet. */
.storage-status-actions { display:flex; flex-wrap:wrap; gap:6px; margin:8px 0; }
.pokemon-status-modal { width:min(620px,100%); max-height:min(88vh,780px); overflow:auto; padding:16px; }
.pokemon-status-head { display:flex; align-items:center; gap:12px; padding-bottom:13px; border-bottom:1px solid rgba(169,190,224,.12); }
.pokemon-status-art { display:grid; place-items:center; flex:0 0 58px; width:58px; height:58px; border:1px solid rgba(169,190,224,.18); border-radius:14px; background:rgba(8,15,28,.48); }
.pokemon-status-art img { width:48px; height:48px; object-fit:contain; image-rendering:pixelated; }
.pokemon-status-heading { min-width:0; flex:1; }
.pokemon-status-heading .eyebrow { color:#83dfd5; font:700 8px/1.2 "DM Mono",monospace; letter-spacing:.08em; }
.pokemon-status-heading h2 { margin:4px 0; color:#f0f5fc; font-size:18px; }
.pokemon-status-heading p { margin:0; color:#9eacc1; font-size:10px; }
.pokemon-status-xp { display:grid; gap:8px; margin:13px 0; padding:11px 12px; border:1px solid rgba(169,190,224,.12); border-radius:12px; background:rgba(8,15,28,.42); }
.pokemon-status-xp > div { display:flex; align-items:center; justify-content:space-between; gap:10px; }
.pokemon-status-xp span, .pokemon-status-moves > span { color:#93a4bb; font:700 8px/1.2 "DM Mono",monospace; letter-spacing:.08em; }
.pokemon-status-xp strong { color:#eaf1fb; font:600 10px/1.3 "DM Mono",monospace; }
.pokemon-status-xp > i { display:block; height:5px; overflow:hidden; border-radius:99px; background:rgba(4,9,18,.8); }
.pokemon-status-xp > i > b { display:block; height:100%; border-radius:inherit; background:linear-gradient(90deg,#50c9bc,#b4e58e); }
.pokemon-status-stats { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:8px; }
.pokemon-status-stats article { display:grid; gap:5px; padding:10px; border:1px solid rgba(169,190,224,.12); border-radius:10px; background:rgba(8,15,28,.42); }
.pokemon-status-stats article span { color:#98a9be; font:500 9px/1.3 Inter,"Segoe UI",sans-serif; }
.pokemon-status-stats article strong { color:#eff5fc; font:700 15px/1 "DM Mono",monospace; font-variant-numeric:tabular-nums; }
.pokemon-status-moves { margin-top:10px; padding:10px 12px; border:1px solid rgba(169,190,224,.12); border-radius:10px; background:rgba(8,15,28,.42); }
.pokemon-status-moves p { margin:7px 0 0; color:#dce6f4; font-size:11px; line-height:1.6; }
.pokemon-status-copy-nav { display:flex; align-items:center; justify-content:space-between; gap:10px; margin-top:12px; }
.pokemon-status-copy-nav span { color:#8fe0d6; font:700 8px/1.2 "DM Mono",monospace; letter-spacing:.07em; }
.pokemon-status-foot { display:flex; align-items:center; justify-content:space-between; gap:10px; margin-top:14px; padding-top:12px; border-top:1px solid rgba(169,190,224,.12); }
.pokemon-status-foot > span { color:#95a5ba; font:600 8px/1.4 "DM Mono",monospace; }
@media (max-width:540px) {
  .pokemon-status-modal { padding:11px; }
  .pokemon-status-stats { grid-template-columns:repeat(2,minmax(0,1fr)); gap:6px; }
  .pokemon-status-head { gap:8px; }
  .pokemon-status-art { flex-basis:48px; width:48px; height:48px; }
  .pokemon-status-art img { width:40px; height:40px; }
  .pokemon-status-heading h2 { font-size:15px; }
}


/* Keep the six party positions visible and proportioned to the map viewport. */
@media (max-height:480px) {
  body.adventure-mode .map-pokemon-overlay { gap:2px; padding:3px; }
  body.adventure-mode .map-party-member { grid-template-columns:25px minmax(0,1fr); gap:3px; padding:2px 3px; }
  body.adventure-mode .map-party-art { width:22px; height:22px; }
  body.adventure-mode .map-party-art img { width:21px; height:21px; }
  body.adventure-mode .map-party-meta { font-size:6px; line-height:1; }
  body.adventure-mode .map-party-copy { gap:1px; }
  body.adventure-mode .map-party-member strong { font-size:8px; line-height:1; }
  body.adventure-mode .map-party-stats { gap:1px; }
  body.adventure-mode .map-party-stat-label,
  body.adventure-mode .map-party-stat-label b { font-size:5px; line-height:1; }
  body.adventure-mode .map-party-stat-track { height:2px; }
  body.adventure-mode .map-party-empty-slot { grid-template-columns:25px minmax(0,1fr); gap:3px; padding:2px 3px; border-radius:7px; }
  body.adventure-mode .map-party-empty-art { width:21px; height:21px; border-radius:6px; font-size:15px; }
  body.adventure-mode .map-party-empty-copy { gap:1px; }
  body.adventure-mode .map-party-empty-copy small { font-size:5px; }
  body.adventure-mode .map-party-empty-copy strong { font-size:7px; }
}

@media (max-height:480px) {
  body.adventure-mode .map-party-toggle { min-height:32px; padding:4px 6px; }
  body.adventure-mode .map-party-toggle-copy strong { font-size:6px; }
  body.adventure-mode .map-party-toggle-copy small { display:none; }
  body.adventure-mode .map-party-list { gap:2px; }
}


/* Incoming private messages appear without opening the chat or blocking play. */
.private-message-notification-region { position:fixed; z-index:90; top:calc(env(safe-area-inset-top,0px) + 92px); right:18px; width:min(360px,calc(100vw - 36px)); display:grid; gap:8px; pointer-events:none; }
.private-message-notification { min-width:0; display:grid; grid-template-columns:34px minmax(0,1fr); align-items:start; gap:10px; padding:12px 13px; border:1px solid rgba(103,221,210,.3); border-radius:13px; color:#edf4fc; background:linear-gradient(145deg,rgba(24,37,59,.98),rgba(14,23,39,.98)); box-shadow:0 14px 34px rgba(0,0,0,.38); animation:private-message-notice-in .22s ease-out both; }
.private-message-notification-icon { width:32px; height:32px; display:grid; place-items:center; border:1px solid rgba(103,221,210,.24); border-radius:10px; color:#8ae4d9; background:rgba(73,180,168,.12); font-size:16px; }
.private-message-notification-copy { min-width:0; display:grid; gap:6px; }
.private-message-notification-heading { min-width:0; display:grid; gap:3px; }
.private-message-notification-heading small { color:#7fd9d0; font:800 7px/1.2 Inter,"Segoe UI",system-ui,sans-serif; letter-spacing:.1em; }
.private-message-notification-heading strong { overflow:hidden; color:#f1f5fc; font:800 11px/1.25 Inter,"Segoe UI",system-ui,sans-serif; text-overflow:ellipsis; white-space:nowrap; }
.private-message-notification-copy p { margin:0; color:#c3cede; font:500 10px/1.45 Inter,"Segoe UI",system-ui,sans-serif; overflow-wrap:anywhere; white-space:pre-wrap; }
@keyframes private-message-notice-in { from { opacity:0; transform:translateY(-6px); } to { opacity:1; transform:translateY(0); } }
@media (max-width:540px) {
  .private-message-notification-region { top:calc(env(safe-area-inset-top,0px) + 78px); right:8px; width:calc(100vw - 16px); }
  .private-message-notification { grid-template-columns:29px minmax(0,1fr); gap:8px; padding:9px 10px; }
  .private-message-notification-icon { width:28px; height:28px; }
}
@media (prefers-reduced-motion:reduce) {
  .private-message-notification { animation:none; }
}

/* Hunt loot bag and protected automatic item sales. */
.expedition-loot-button { position:relative; }
.expedition-loot-button [data-loot-count] { min-width:18px; height:18px; display:grid; place-items:center; padding:0 5px; border:1px solid rgba(118,220,211,.24); border-radius:99px; color:#9de7dc; background:rgba(53,125,125,.18); font:700 8px/1 "DM Mono",monospace; }
.loot-bag-backdrop, .loot-sale-backdrop { z-index:2147482500; }
.loot-bag-modal { display:grid; grid-template-rows:auto auto auto minmax(0,1fr) auto; gap:9px; width:min(940px,calc(100vw - 28px)); max-height:min(90vh,820px); overflow:hidden; padding:16px; }
.loot-bag-head { display:flex; align-items:flex-start; justify-content:space-between; gap:12px; padding-bottom:10px; border-bottom:1px solid rgba(169,190,224,.12); }
.loot-bag-head h2 { margin:4px 0; color:#f0f5fc; font-size:19px; }
.loot-bag-head p { margin:0; color:#98a9bd; font-size:10px; line-height:1.45; }
.loot-bag-summary { display:flex; align-items:center; justify-content:space-between; gap:10px; color:#a7b8cc; font:600 9px/1.3 "DM Mono",monospace; }
.loot-bag-summary strong { color:#e9f4fb; }
.loot-auto-sale { display:grid; grid-template-columns:minmax(0,1fr) minmax(190px,235px) auto; align-items:center; gap:10px; padding:11px; border:1px solid rgba(112,221,211,.19); border-radius:12px; background:linear-gradient(125deg,rgba(24,47,62,.64),rgba(15,24,42,.85)); }
.loot-auto-sale > div:first-child { display:grid; gap:4px; min-width:0; }
.loot-auto-sale .eyebrow { color:#7fd9cc; font:700 8px/1.2 "DM Mono",monospace; letter-spacing:.1em; }
.loot-auto-sale > div > strong { color:#edf4fc; font-size:11px; }
.loot-auto-sale > div > small { color:#99a9bd; font-size:9px; line-height:1.4; }
.loot-auto-sale > label { display:grid; gap:5px; color:#9eafc1; font:600 9px/1.3 Inter,"Segoe UI",sans-serif; }
.loot-auto-sale > label select { width:100%; min-height:35px; padding:6px 8px; }
.loot-auto-actions { display:flex; justify-content:flex-end; }
.loot-item-list { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); align-content:start; gap:8px; min-height:0; overflow:auto; padding:2px 3px 2px 0; }
.loot-item-card { display:grid; grid-template-columns:42px minmax(0,1fr); align-items:center; gap:8px; min-width:0; padding:9px; border:1px solid rgba(169,190,224,.14); border-left:3px solid #b8c7d9; border-radius:11px; background:rgba(7,13,25,.46); }
.loot-item-card.is-locked { background:rgba(55,51,41,.3); }
.loot-item-card.is-shiny { border-left-color:#ffe18d; }
.loot-item-art { width:40px; height:40px; display:grid; place-items:center; border:1px solid rgba(169,190,224,.12); border-radius:10px; background:rgba(255,255,255,.035); }
.loot-item-art img { width:30px; height:30px; object-fit:contain; image-rendering:pixelated; }
.loot-item-copy { display:grid; gap:4px; min-width:0; }
.loot-item-title { display:flex; align-items:center; flex-wrap:wrap; gap:5px; min-width:0; }
.loot-item-title > strong { color:#eef5fc; font-size:10px; line-height:1.3; }
.loot-item-copy > small { color:#96a8bd; font-size:8px; line-height:1.3; }
.loot-item-price { color:#a5e5bf; font:700 8px/1.35 "DM Mono",monospace; }
.loot-shiny-tag { display:inline-flex; align-items:center; padding:3px 5px; border:1px solid rgba(255,225,141,.34); border-radius:99px; color:#ffe18d; font:700 7px/1 "DM Mono",monospace; }
.loot-item-actions { display:flex; flex-wrap:wrap; justify-content:flex-end; grid-column:1/-1; gap:5px; }
.loot-item-actions .button { min-width:0; padding:6px 8px; font-size:8px; white-space:nowrap; }
.loot-item-actions .capture-study-upgrade { white-space:normal; }
.capture-research-actions { display:flex; min-width:0; margin-top:1px; }
.capture-research-actions .capture-study-upgrade { width:100%; min-width:0; min-height:29px; padding:5px 7px; font-size:8px; white-space:normal; }
.capture-study-upgrade:disabled { opacity:.58; }
.loot-bag-empty { grid-column:1/-1; display:grid; justify-items:center; gap:7px; padding:28px 12px; border:1px dashed rgba(169,190,224,.2); border-radius:12px; color:#9aabc0; text-align:center; }
.loot-bag-empty > span { color:#8fe0d6; font-size:23px; }
.loot-bag-empty > strong { color:#eaf3fc; font-size:12px; }
.loot-bag-empty > small { font-size:9px; }
.loot-bag-foot { padding-top:8px; border-top:1px solid rgba(169,190,224,.12); color:#899bb1; font-size:8px; line-height:1.45; }
.loot-sale-confirm { width:min(460px,calc(100vw - 28px)); padding:17px; }
.loot-sale-value { margin:12px 0; padding:12px; border:1px solid rgba(112,221,173,.24); border-radius:11px; color:#aebcd0; background:rgba(20,63,49,.22); font-size:11px; }
.loot-sale-value strong { color:#9be6b9; font:700 14px/1.3 "DM Mono",monospace; }

.capture-study-use-modal { width:min(500px,calc(100vw - 28px)); }
.capture-study-use-body { display:grid; gap:11px; padding:0 17px 16px; }
.capture-study-use-stock { display:flex; justify-content:space-between; align-items:center; gap:12px; padding:10px 12px; border:1px solid rgba(169,190,224,.14); border-radius:10px; color:#aebcd0; background:rgba(7,13,25,.38); font-size:10px; }
.capture-study-use-stock strong { color:#9de7c0; font:700 13px/1.2 "DM Mono",monospace; }
.capture-study-use-quantity { display:grid; gap:6px; color:#dce7f3; font-size:10px; font-weight:700; }
.capture-study-use-quantity > div { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:8px; }
.capture-study-use-quantity input { width:100%; min-width:0; min-height:42px; padding:8px 11px; border:1px solid rgba(142,173,206,.24); border-radius:9px; color:#f0f6fc; background:#101a2c; font:700 15px/1 "DM Mono",monospace; }
.capture-study-use-quantity input:focus { outline:2px solid rgba(104,220,210,.38); border-color:#68dcd2; }
.capture-study-use-preview { padding:11px 12px; border:1px solid rgba(112,221,173,.22); border-radius:10px; color:#9be6b9; background:rgba(20,63,49,.22); font:700 11px/1.45 "DM Mono",monospace; }
.capture-study-use-preview.is-invalid { border-color:rgba(255,129,129,.3); color:#ffaaaa; background:rgba(82,28,36,.2); }
.capture-study-use-note { color:#94a6bb; font-size:9px; line-height:1.45; }
.capture-study-use-modal .confirm-actions { padding:0 17px 17px; }
@media (max-width:520px) {
  .capture-study-use-modal .modal-head { padding:17px 15px 11px; }
  .capture-study-use-body { padding:0 13px 13px; }
  .capture-study-use-modal .confirm-actions { display:grid; grid-template-columns:1fr 1fr; padding:0 13px 13px; }
}

@media (max-width:760px) {
  .loot-auto-sale { grid-template-columns:1fr; align-items:stretch; }
  .loot-auto-actions { justify-content:flex-start; }
  .loot-item-list { grid-template-columns:1fr; }
}
@media (max-width:520px) {
  .loot-bag-modal { gap:8px; padding:10px; }
  .loot-item-card { padding:8px; }
  .loot-item-actions { justify-content:stretch; }
  .loot-item-actions .button { flex:1 1 auto; }
}


/* Capture marker and shiny registry indicator on Pokedex cards. */
.dex-tile .dex-markers { display:flex; align-items:center; justify-content:flex-end; gap:4px; min-width:18px; min-height:15px; }
.dex-tile .dex-caught-mark { width:15px; height:15px; display:grid; place-items:center; color:#d6e5f5; }
.dex-tile .dex-caught-mark .pokeball-icon { width:15px; height:15px; display:block; }
.dex-tile:not(.owned) .dex-markers { min-width:15px; }
@media (max-width:520px) {
  .dex-tile .dex-markers { gap:2px; min-height:13px; }
  .dex-tile .dex-caught-mark, .dex-tile .dex-caught-mark .pokeball-icon { width:12px; height:12px; }
}

/* Team and PC cards use their species rarity as a clear color cue. */
.team-slot[data-rarity], .storage-card[data-rarity] {
  --rarity-accent:#c2cedf;
  border-color:color-mix(in srgb,var(--rarity-accent) 52%,transparent);
  background:linear-gradient(135deg,color-mix(in srgb,var(--rarity-accent) 17%,#111a2c),#111a2c 76%);
  box-shadow:inset 4px 0 var(--rarity-accent),0 8px 22px rgba(0,0,0,.18);
}
.team-slot[data-rarity="common"], .storage-card[data-rarity="common"] { --rarity-accent:#c2cedf; }
.team-slot[data-rarity="uncommon"], .storage-card[data-rarity="uncommon"] { --rarity-accent:#7fe2a2; }
.team-slot[data-rarity="rare"], .storage-card[data-rarity="rare"] { --rarity-accent:#80c8ff; }
.team-slot[data-rarity="epic"], .storage-card[data-rarity="epic"] { --rarity-accent:#ca91ff; }
.team-slot[data-rarity="legendary"], .storage-card[data-rarity="legendary"] { --rarity-accent:#ffd166; }
.team-slot.is-fainted[data-rarity] {
  background:linear-gradient(135deg,color-mix(in srgb,var(--rarity-accent) 10%,#30252c),rgba(27,23,29,.96));
}
.team-slot[data-rarity]:hover, .storage-card[data-rarity]:hover { filter:brightness(1.12); }
.team-slot .pokemon-rarity.compact, .storage-card .pokemon-rarity.compact {
  min-height:24px; margin-top:7px; padding:5px 10px; border-width:1px; border-radius:999px;
  font:900 10px/1.1 Inter,"Segoe UI",system-ui,sans-serif; letter-spacing:.07em; text-transform:uppercase;
  box-shadow:0 0 13px color-mix(in srgb,var(--rarity-accent,#9fb4cc) 19%,transparent);
}
.storage-card .pokemon-rarity.compact { margin-top:1px; }

/* Drag cards to set the team's saved order in the map list and team screen. */
.map-party-member[draggable="true"], .team-slot[draggable="true"] { cursor:grab; user-select:none; -webkit-user-drag:element; }
.map-party-member[draggable="true"]:active, .team-slot[draggable="true"]:active { cursor:grabbing; }
.team-order-dragging { opacity:.42 !important; transform:scale(.98); }
.team-order-drop-target { outline:2px dashed rgba(112,225,215,.9); outline-offset:2px; }
.map-party-empty-slot.team-order-drop-target, .team-slot.empty-slot.team-order-drop-target { border-color:rgba(112,225,215,.78); color:#c9f5ec; background:linear-gradient(135deg,rgba(49,128,126,.28),rgba(19,32,49,.9)); }

/* Capture research cards: fixed portrait at left, all species information at right. */
.capture-research-summary { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:8px; margin:12px 0; }
.capture-research-summary > div { min-width:0; padding:10px 12px; border:1px solid rgba(169,190,224,.14); border-radius:10px; background:rgba(15,25,42,.72); }
.capture-research-summary strong { display:block; color:#eaf4ff; font:800 16px/1.2 Inter,"Segoe UI",sans-serif; }
.capture-research-summary span { display:block; margin-top:4px; color:#95a8bd; font-size:9px; }
.capture-research-list { display:grid; gap:10px; }
.capture-research-toolbar { margin-bottom:0; flex-wrap:wrap; }
.capture-research-toolbar .toolbar { flex:1 1 580px; min-width:0; flex-wrap:wrap; }
.capture-research-toolbar-end { display:flex; align-items:center; justify-content:flex-end; gap:10px; flex:0 0 auto; }
.capture-research-use-all { display:inline-flex; align-items:center; justify-content:center; gap:8px; min-height:38px; padding:7px 11px; white-space:nowrap; }
.capture-research-use-all > span { font-size:11px; }
.capture-research-use-all > small { padding-left:8px; border-left:1px solid rgba(221,241,255,.2); color:#c6e8e5; font:700 9px/1.2 "DM Mono",monospace; }
.capture-research-use-all:disabled { opacity:.48; cursor:not-allowed; }
.capture-research-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); align-items:stretch; gap:9px; }
.capture-research-card { display:grid; align-content:start; gap:8px; min-width:0; padding:10px; border:1px solid rgba(151,177,207,.19); border-radius:12px; background:linear-gradient(145deg,rgba(23,35,55,.95),rgba(12,20,35,.96)); }
.capture-research-card-top { display:flex; align-items:center; justify-content:space-between; gap:6px; min-width:0; }
.capture-research-card-top .species-id { flex:0 0 auto; color:#99adc2; font:700 8px/1.2 "DM Mono",monospace; }
.capture-research-badges { display:flex; justify-content:flex-end; flex-wrap:wrap; gap:4px; min-width:0; }
.capture-research-card-main { display:grid; grid-template-columns:62px minmax(0,1fr); align-items:start; gap:9px; min-width:0; }
.capture-research-art { width:62px; height:62px; display:grid; place-items:center; overflow:hidden; border:1px solid rgba(157,190,214,.19); border-radius:11px; background:radial-gradient(circle,rgba(95,154,163,.18),rgba(8,16,29,.72) 72%); }
.capture-research-art img { display:block; width:54px!important; height:54px!important; max-width:100%; max-height:100%; object-fit:contain; image-rendering:pixelated; filter:drop-shadow(0 3px 4px rgba(0,0,0,.38)); }
.capture-research-info { display:grid; align-content:start; gap:6px; min-width:0; }
.capture-research-species { display:grid; gap:3px; min-width:0; }
.capture-research-species h3 { overflow:hidden; margin:0; color:#f0f5fc; font:800 13px/1.2 Inter,"Segoe UI",sans-serif; text-overflow:ellipsis; white-space:nowrap; }
.capture-research-species > span { overflow:hidden; color:#94a9bf; font-size:8px; text-overflow:ellipsis; white-space:nowrap; }
.capture-research-species .type-badges { display:flex; flex-wrap:wrap; gap:3px; margin-top:2px; }
.capture-research-species .type-badge { padding:2px 5px; font-size:7px; }
.capture-research-level-row, .capture-research-count-row { display:flex; align-items:center; justify-content:space-between; gap:6px; min-width:0; }
.capture-research-level-row span { color:#9aafc3; font:700 7px/1.3 "DM Mono",monospace; letter-spacing:.04em; }
.capture-research-level-row strong { color:#7ce0d0; font:800 9px/1.2 Inter,"Segoe UI",sans-serif; text-align:right; }
.capture-research-progress { height:5px; overflow:hidden; border-radius:999px; background:rgba(3,9,18,.82); }
.capture-research-progress > i { display:block; width:100%; height:100%; }
.capture-research-progress > i > b { display:block; height:100%; border-radius:inherit; background:linear-gradient(90deg,#4ac8b9,#b3e58e); transition:width .25s ease; }
.capture-research-count-row { color:#a9b9ca; font:600 7px/1.35 "DM Mono",monospace; }
.capture-research-count-row span:last-child { overflow:hidden; color:#8edfd2; text-align:right; text-overflow:ellipsis; white-space:nowrap; }
.capture-research-detail { color:#8fa2b7; font:400 8px/1.4 Inter,"Segoe UI",sans-serif; }
.capture-research-empty { padding:18px; border:1px dashed rgba(151,177,207,.24); border-radius:11px; color:#9aadc2; text-align:center; }
@media (max-width:1120px) { .capture-research-grid { grid-template-columns:repeat(2,minmax(0,1fr)); } }
@media (max-width:720px) {
  .capture-research-grid { grid-template-columns:1fr; }
  .capture-research-summary { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .capture-research-toolbar-end { width:100%; justify-content:stretch; }
  .capture-research-use-all { flex:1; }
}

/* Compact, image-first party and individual PC copies */
.team-grid,
.screen-modal-content .team-grid { grid-template-columns: repeat(auto-fill, minmax(76px, 1fr)); gap: 9px; }
.team-slot { min-height: 78px; aspect-ratio: 1; display: grid; place-items: center; padding: 5px; border-color: var(--party-rarity-border, rgba(137, 163, 188, .3)); border-radius: 14px; background: var(--party-rarity-background, linear-gradient(145deg, rgba(24, 39, 60, .92), rgba(13, 23, 39, .96))); transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease; }
.team-slot[data-status-source] { position:relative; cursor:pointer; }
.team-slot:not(.empty-slot):hover { transform: translateY(-2px); }
.team-slot[data-rarity] { border-color: var(--party-rarity-border, rgba(137, 163, 188, .3)); background: var(--party-rarity-background, linear-gradient(145deg, rgba(24, 39, 60, .92), rgba(13, 23, 39, .96))); box-shadow: inset 3px 0 var(--party-rarity-border, #9db2cc), 0 8px 22px rgba(0,0,0,.15); }
.team-slot.is-active { border-color: var(--party-active-border, #79ddd5); box-shadow: 0 0 0 2px rgba(104, 211, 206, .17), 0 0 22px var(--party-active-glow, rgba(104, 211, 206, .2)); }
.team-pokemon-button { width: 100%; height: 100%; display: grid; place-items: center; padding: 0; border: 0; border-radius: 10px; background: transparent; cursor: pointer; }
.team-slot-actions { position:absolute; z-index:4; top:5px; right:5px; }
.team-storage-button { display:flex; align-items:center; justify-content:center; gap:2px; min-width:32px; min-height:25px; padding:3px 5px; border:1px solid rgba(132,218,207,.38); border-radius:8px; color:#c6f4e8; background:rgba(8,18,30,.88); box-shadow:0 2px 8px rgba(0,0,0,.25); cursor:pointer; }
.team-storage-button span { font-size:13px; line-height:1; }
.team-storage-button small { font:800 7px/1 "DM Mono",monospace; letter-spacing:.04em; }
.team-storage-button:hover:not(:disabled) { border-color:rgba(132,235,220,.8); background:rgba(25,83,79,.96); }
.team-storage-button:disabled { opacity:.45; cursor:not-allowed; }
.team-pokemon-button img { width: min(68px, 100%); height: min(68px, 100%); object-fit: contain; image-rendering: pixelated; }
.team-slot.is-fainted .team-pokemon-button img { filter: grayscale(.8); opacity: .62; }
.team-slot.empty-slot { min-height: 78px; gap: 4px; }
.team-slot.empty-slot .empty-ball { font-size: 22px; }
.team-slot.empty-slot .button { padding: 4px 8px; font-size: 9px; }

.storage-grid,
.screen-modal-content .storage-grid { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.storage-card { min-height: 90px; border-color: var(--copy-rarity-border, rgba(163, 185, 211, .25)); background: var(--copy-rarity-background, linear-gradient(145deg, rgba(23, 36, 56, .92), rgba(13, 22, 37, .95))); box-shadow: inset 3px 0 0 var(--copy-rarity-accent, #9db2cc); }
.storage-card[data-rarity] { border-color: var(--copy-rarity-border, rgba(163, 185, 211, .25)); background: var(--copy-rarity-background, linear-gradient(145deg, rgba(23, 36, 56, .92), rgba(13, 22, 37, .95))); box-shadow: inset 3px 0 var(--copy-rarity-accent, #9db2cc); }
.storage-card[data-rarity="common"],
.team-slot[data-rarity="common"] { --copy-rarity-border: rgba(186, 198, 207, .44); --copy-rarity-background: linear-gradient(145deg, rgba(51, 65, 80, .92), rgba(20, 31, 47, .96)); --copy-rarity-accent: #bdc9d3; --party-rarity-border: rgba(186, 198, 207, .44); --party-rarity-background: linear-gradient(145deg, rgba(51, 65, 80, .92), rgba(20, 31, 47, .96)); }
.storage-card[data-rarity="uncommon"],
.team-slot[data-rarity="uncommon"] { --copy-rarity-border: rgba(119, 211, 146, .55); --copy-rarity-background: linear-gradient(145deg, rgba(29, 76, 54, .95), rgba(16, 38, 39, .96)); --copy-rarity-accent: #77d392; --party-rarity-border: rgba(119, 211, 146, .55); --party-rarity-background: linear-gradient(145deg, rgba(29, 76, 54, .95), rgba(16, 38, 39, .96)); }
.storage-card[data-rarity="rare"],
.team-slot[data-rarity="rare"] { --copy-rarity-border: rgba(106, 184, 244, .6); --copy-rarity-background: linear-gradient(145deg, rgba(31, 70, 108, .96), rgba(18, 35, 59, .96)); --copy-rarity-accent: #6ab8f4; --party-rarity-border: rgba(106, 184, 244, .6); --party-rarity-background: linear-gradient(145deg, rgba(31, 70, 108, .96), rgba(18, 35, 59, .96)); }
.storage-card[data-rarity="epic"],
.team-slot[data-rarity="epic"] { --copy-rarity-border: rgba(194, 133, 255, .64); --copy-rarity-background: linear-gradient(145deg, rgba(76, 46, 105, .96), rgba(36, 28, 55, .96)); --copy-rarity-accent: #c285ff; --party-rarity-border: rgba(194, 133, 255, .64); --party-rarity-background: linear-gradient(145deg, rgba(76, 46, 105, .96), rgba(36, 28, 55, .96)); }
.storage-card[data-rarity="legendary"],
.team-slot[data-rarity="legendary"] { --copy-rarity-border: rgba(249, 196, 91, .72); --copy-rarity-background: linear-gradient(145deg, rgba(103, 73, 26, .97), rgba(48, 39, 27, .96)); --copy-rarity-accent: #f9c45b; --party-rarity-border: rgba(249, 196, 91, .72); --party-rarity-background: linear-gradient(145deg, rgba(103, 73, 26, .97), rgba(48, 39, 27, .96)); }
.storage-card.is-shiny { box-shadow: inset 3px 0 0 var(--copy-rarity-accent, #f2d778), 0 0 14px rgba(241, 210, 105, .14); }
.storage-card.is-locked { outline: 1px solid rgba(249, 196, 91, .35); }
.storage-card-art { border-radius: 10px; background: rgba(5, 13, 25, .42); }
.storage-card-copy { flex: 1; }
.storage-card-copy .pokemon-rarity { font-size: 11px; font-weight: 800; letter-spacing: .06em; }
.storage-view-button { align-self: stretch; }

.pokemon-status-backdrop { z-index: 20; }
.pokemon-status-modal { width: min(650px, 100%); max-height: min(90vh, 850px); overflow-y: auto; color: var(--ink, #edf3ff); border-color: rgba(125, 164, 199, .34); background: linear-gradient(145deg, #17243a, #0d1627); }
.pokemon-status-head { display: flex; align-items: center; gap: 15px; padding: 18px 20px; border-bottom: 1px solid rgba(154, 177, 205, .16); }
.pokemon-status-art { width: 76px; height: 76px; flex: 0 0 76px; display: grid; place-items: center; border: 1px solid rgba(154, 177, 205, .2); border-radius: 16px; background: rgba(5, 13, 25, .4); }
.pokemon-status-art img { width: 70px; height: 70px; object-fit: contain; image-rendering: pixelated; }
.pokemon-status-heading { min-width: 0; flex: 1; }
.pokemon-status-heading h2 { margin: 4px 0; font-size: 21px; }
.pokemon-status-heading p { margin: 5px 0 0; color: var(--muted, #aab8ca); font-size: 11px; }
.pokemon-status-xp { display: grid; gap: 8px; margin: 15px 20px; padding: 11px 13px; border: 1px solid rgba(154, 177, 205, .14); border-radius: 12px; background: rgba(4, 12, 23, .3); }
.pokemon-status-xp div { display: flex; justify-content: space-between; gap: 10px; font-size: 10px; }
.pokemon-status-xp i { height: 7px; overflow: hidden; border-radius: 99px; background: rgba(4, 9, 17, .72); }
.pokemon-status-xp i b { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #6ac9c2, #93e4ce); }
.pokemon-status-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 0 20px 13px; }
.pokemon-status-stats article { display: grid; gap: 5px; padding: 10px; border: 1px solid rgba(154, 177, 205, .13); border-radius: 10px; background: rgba(4, 12, 23, .3); }
.pokemon-status-stats article span, .pokemon-status-moves > span { color: var(--muted, #aab8ca); font-size: 9px; }
.pokemon-status-stats article strong { font-size: 14px; }
.pokemon-status-moves { margin: 0 20px 14px; padding: 11px 13px; border: 1px solid rgba(154, 177, 205, .13); border-radius: 10px; }
.pokemon-status-moves p { margin: 6px 0 0; font-size: 11px; }
.pokemon-status-actions { display: grid; gap: 10px; margin: 0 20px 15px; padding: 12px; border: 1px solid rgba(154, 177, 205, .17); border-radius: 12px; background: rgba(4, 12, 23, .25); }
.pokemon-status-action-buttons { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.pokemon-status-sale-value, .pokemon-status-protected { width: 100%; margin: 0; color: var(--muted, #aab8ca); font-size: 11px; }
.pokemon-status-sale-value strong { color: #9ae1d3; }
.pokemon-status-protected { color: #f1d77e; }
.pokemon-status-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 20px 18px; border-top: 1px solid rgba(154, 177, 205, .13); color: var(--muted, #aab8ca); font-size: 10px; }
@media (max-width: 560px) {
  .team-grid, .screen-modal-content .team-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .storage-grid, .screen-modal-content .storage-grid { grid-template-columns: 1fr; }
  .pokemon-status-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pokemon-status-head { padding: 14px; }
  .pokemon-status-xp, .pokemon-status-stats, .pokemon-status-moves, .pokemon-status-actions { margin-left: 14px; margin-right: 14px; }
}


.pokemon-status-genetics { display:grid; gap:10px; margin:0 20px 14px; padding:12px; border:1px solid rgba(169,190,224,.16); border-radius:12px; background:linear-gradient(145deg,rgba(18,38,54,.72),rgba(7,14,27,.48)); }
.pokemon-genetics-quality { display:grid; gap:5px; }
.pokemon-genetics-quality > span { color:#83dfd5; font:700 8px/1.2 "DM Mono",monospace; letter-spacing:.08em; }
.pokemon-genetics-quality > strong { color:#f1f5fc; font-size:13px; }
.pokemon-genetics-quality > small, .pokemon-genetics-note { color:#95a6bc; font-size:9px; line-height:1.45; }
.pokemon-iv-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:6px; }
.pokemon-iv-grid > div { display:flex; justify-content:space-between; gap:5px; padding:7px 8px; border:1px solid rgba(169,190,224,.12); border-radius:8px; background:rgba(4,10,19,.44); }
.pokemon-iv-grid span { color:#93a4bb; font:700 8px/1.2 "DM Mono",monospace; }
.pokemon-iv-grid strong { color:#eaf1fb; font:700 9px/1.2 "DM Mono",monospace; }
.pokemon-genetics-note { margin:0; }
@media (max-width:560px) {
  .pokemon-status-genetics { margin-left:14px; margin-right:14px; }
  .pokemon-iv-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
}


/* Keep team and PC cards still inside the team modal; map and Pokédex motion stays unchanged. */
.screen-modal-content-equipe .team-slot,
.screen-modal-content-equipe .storage-card,
.screen-modal-content-equipe .team-slot img,
.screen-modal-content-equipe .storage-card img {
  animation: none !important;
  transition: none !important;
}
.screen-modal-content-equipe .team-slot:not(.empty-slot):hover,
.screen-modal-content-equipe .storage-card:hover {
  transform: none !important;
  filter: none !important;
}
.screen-modal-content-equipe .team-slot[data-rarity]:hover,
.screen-modal-content-equipe .storage-card[data-rarity]:hover {
  filter: none !important;
}
.screen-modal-content-equipe .storage-card-copy { width: 100%; }
.storage-manual-sale { display:flex; align-items:center; justify-content:space-between; gap:12px; margin:12px 0; padding:12px 14px; border:1px solid rgba(249,196,91,.24); border-radius:12px; background:linear-gradient(120deg,rgba(84,61,28,.18),rgba(15,25,42,.72)); }
.storage-manual-sale > div:first-child { display:grid; gap:4px; }
.storage-manual-sale .eyebrow { color:#f2c976; font:700 8px/1.2 "DM Mono",monospace; letter-spacing:.1em; }
.storage-sale-selected-count { color:#edf3fc; font-size:12px; }
.storage-sale-selected-total { color:#c6d2e3; font:600 10px/1.3 "DM Mono",monospace; }
.storage-manual-sale-actions { display:flex; flex-wrap:wrap; justify-content:flex-end; gap:7px; }
.storage-sale-select { display:flex; align-items:center; gap:6px; width:max-content; max-width:100%; color:#adbed3; font-size:9px; cursor:pointer; }
.storage-sale-select input { width:14px; height:14px; margin:0; accent-color:#e8bb61; }
.storage-sale-select input:disabled { cursor:not-allowed; }
.storage-sale-protected, .storage-sale-protected-note { color:#e7cc82; font-size:9px; font-weight:800; }
.storage-card-actions { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:6px; width:100%; margin-top:3px; }
.storage-card-actions .button { min-width:0; width:100%; padding:6px 8px; font-size:9px; white-space:nowrap; }
.storage-card.is-sale-selected { outline:1px solid rgba(249,196,91,.55); box-shadow:inset 3px 0 var(--copy-rarity-accent,#e8bb61),0 0 15px rgba(249,196,91,.12); }
.storage-sale-review { display:grid; gap:6px; max-height:190px; overflow:auto; margin:0; padding:10px 12px 10px 28px; border:1px solid rgba(169,190,224,.13); border-radius:10px; background:rgba(5,12,23,.45); color:#aebdd0; font-size:11px; }
.storage-sale-review li { padding:2px 0; }
.storage-sale-review strong { float:right; color:#eed08d; }
@media (max-width:560px) {
  .storage-manual-sale { align-items:stretch; flex-direction:column; }
  .storage-manual-sale-actions { justify-content:stretch; }
  .storage-manual-sale-actions .button { flex:1; }
}

/* Mission and collection hub: compact cards with readable text and visible permanent bonuses. */
body.adventure-mode .screen-modal[data-modal-view="missions"] {
  width:min(980px,100%);
  height:min(790px,calc(100vh - 32px));
  max-height:calc(100vh - 32px);
}
body.adventure-mode .screen-modal-content.mission-hub-content-host { padding:10px 12px 12px; }
body.adventure-mode .mission-hub-content { gap:8px; }
body.adventure-mode .mission-hub-missions { grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; }
body.adventure-mode .mission-hub-missions > .mission-hub-intro,
body.adventure-mode .mission-hub-missions > .mission-section-heading,
body.adventure-mode .mission-hub-missions > .mission-trades-grid { grid-column:1/-1; }
body.adventure-mode .mission-hub-tabs { padding:6px 12px 0; }
body.adventure-mode .mission-hub-tabs button { min-height:34px; font-size:11px; }
body.adventure-mode .mission-hub-tabs button span { font-size:10px; }
body.adventure-mode .mission-tag { font-size:8px; }
body.adventure-mode .mission-hub-intro h3,
body.adventure-mode .collection-overview h3 { font-size:17px; }
body.adventure-mode .mission-hub-intro p,
body.adventure-mode .mission-section-heading p,
body.adventure-mode .collection-overview p { font-size:11px; line-height:1.4; }
body.adventure-mode .mission-feature-card,
body.adventure-mode .collection-milestone-card,
body.adventure-mode .mission-trade-card { padding:9px 10px; }
body.adventure-mode .mission-state { font-size:9px; }
body.adventure-mode .mission-feature-card h3,
body.adventure-mode .collection-milestone-card h3,
body.adventure-mode .mission-trade-card h3 { font-size:14px; }
body.adventure-mode .mission-feature-card > p,
body.adventure-mode .collection-milestone-card > p,
body.adventure-mode .mission-trade-card > p { margin-bottom:6px; font-size:11px; line-height:1.4; }
body.adventure-mode .mission-progress-copy { margin:7px 0 4px; font-size:10px; }
body.adventure-mode .mission-progress-track,
body.adventure-mode .collection-overview-track { height:7px; }
body.adventure-mode .mission-reward-row { gap:6px; margin-top:7px; padding-top:6px; font-size:10px; }
body.adventure-mode .mission-reward-row > b { font-size:10px; }
body.adventure-mode .mission-reward-row .button { min-height:29px; padding:0 8px; font-size:10px; }
body.adventure-mode .legendary-mission-list { gap:4px; margin:6px 0 2px; }
body.adventure-mode .legendary-mission-member { padding:4px 6px; font-size:10px; }
body.adventure-mode .mission-section-heading h3 { font-size:15px; }
body.adventure-mode .mission-section-note { font-size:8px; }
body.adventure-mode .mission-trades-grid { gap:7px; }
body.adventure-mode .mission-trade-members { gap:4px; }
body.adventure-mode .mission-trade-member { padding:5px; }
body.adventure-mode .mission-trade-member b { font-size:10px; }
body.adventure-mode .mission-trade-member small { font-size:9px; }
body.adventure-mode .collection-overview { gap:7px 12px; padding:10px 12px; }
body.adventure-mode .collection-overview-count { font-size:9px; }
body.adventure-mode .collection-overview-count strong { font-size:22px; }
body.adventure-mode .collection-overview-foot { font-size:10px; }
body.adventure-mode .collection-active-bonuses { padding:9px 10px; border:1px solid rgba(115,210,180,.2); border-radius:7px; background:linear-gradient(110deg,rgba(27,65,60,.22),rgba(21,30,37,.55)); }
body.adventure-mode .collection-active-bonuses > header { display:flex; align-items:end; justify-content:space-between; gap:10px; margin-bottom:7px; }
body.adventure-mode .collection-active-bonuses h3 { margin:3px 0 0; color:#e5f1dc; font-size:14px; }
body.adventure-mode .collection-active-bonuses > header p { margin:0; color:#a9b9a9; font-size:10px; text-align:right; }
body.adventure-mode .collection-active-bonus-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:6px; }
body.adventure-mode .collection-active-bonus { min-width:0; display:grid; grid-template-columns:1fr auto; align-items:center; gap:3px 8px; padding:7px 8px; border:1px solid rgba(171,205,176,.14); border-radius:5px; background:rgba(8,16,22,.34); }
body.adventure-mode .collection-active-bonus > span { color:#cbd8c8; font-size:11px; font-weight:700; }
body.adventure-mode .collection-active-bonus > strong { color:#8de0bd; font:800 16px 'DM Mono',monospace; }
body.adventure-mode .collection-active-bonus > small { grid-column:1/-1; color:#9eafa7; font-size:10px; line-height:1.3; }
body.adventure-mode .collection-milestones-grid { gap:7px; }
body.adventure-mode .collection-relic-summary { padding:7px 9px; }
body.adventure-mode .collection-relic-summary strong { font-size:11px; }
body.adventure-mode .collection-relic-summary small { font-size:10px; }
body.adventure-mode .collection-relic-summary > b { font-size:14px; }
@media(max-width:760px) {
  body.adventure-mode .mission-hub-missions { grid-template-columns:1fr; }
  body.adventure-mode .mission-trades-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@media(max-width:560px) {
  body.adventure-mode .screen-modal[data-modal-view="missions"] { height:calc(100vh - 16px); max-height:calc(100vh - 16px); }
  body.adventure-mode .screen-modal-content.mission-hub-content-host { padding:8px; }
  body.adventure-mode .mission-trades-grid,
  body.adventure-mode .collection-active-bonus-grid { grid-template-columns:1fr; }
  body.adventure-mode .collection-active-bonuses > header { align-items:start; flex-direction:column; }
  body.adventure-mode .collection-active-bonuses > header p { text-align:left; }
}

/* One visual language: modern pixel-art scene with crisp DS-style sprites. */
body.adventure-mode .game-world-panel {
  border:2px solid rgba(151,174,205,.38);
  border-radius:10px;
  background:#101a2a;
  box-shadow:0 0 0 3px rgba(7,12,23,.72),0 18px 42px rgba(0,0,0,.24);
}
body.adventure-mode .game-world-panel .map-wrap { border-radius:8px; }
body.adventure-mode .game-world-panel #huntCanvas { image-rendering:pixelated !important; }
body.adventure-mode .game-world-panel .map-vignette {
  background:linear-gradient(180deg,rgba(6,12,23,.08),transparent 18%,transparent 80%,rgba(6,12,23,.22));
}
body.adventure-mode .expedition-heading-actions .expedition-tools-button { border-color:rgba(126,194,209,.3); color:#b9e4ec; background:linear-gradient(145deg,rgba(37,66,83,.92),rgba(22,39,59,.96)); }
body.adventure-mode .expedition-heading-actions .expedition-tools-button .menu-icon { color:#9be1d9; }
body.adventure-mode .expedition-heading-actions .expedition-tools-button:hover { border-color:#9bded7; color:#effffc; background:#254657; }

.adventure-tools-backdrop { z-index:2147482100; }
.adventure-tools-modal { width:min(620px,calc(100vw - 28px)); max-height:min(82vh,620px); overflow:auto; }
.adventure-tools-modal .adventure-panel-head { border-bottom:1px solid rgba(161,190,220,.15); }
.adventure-tools-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
.adventure-tool-card { min-width:0; min-height:76px; display:grid; grid-template-columns:42px minmax(0,1fr) auto; align-items:center; gap:10px; padding:10px; border:1px solid rgba(154,184,214,.17); border-radius:12px; color:#edf4fc; background:linear-gradient(140deg,rgba(30,47,70,.94),rgba(14,25,43,.96)); text-align:left; cursor:pointer; }
.adventure-tool-card:hover { border-color:rgba(122,218,209,.55); background:linear-gradient(140deg,rgba(37,71,87,.97),rgba(17,34,52,.98)); }
.adventure-tool-icon { width:40px; height:40px; display:grid; place-items:center; border:1px solid rgba(128,208,201,.23); border-radius:10px; color:#8fe0d4; background:rgba(72,158,156,.13); }
.adventure-tool-icon .menu-icon { width:21px; height:21px; }
.pokeball-queue-tool-icon { color:#f3b4a4; border-color:rgba(239,153,131,.34); background:rgba(160,75,71,.16); }
.pokeball-queue-tool-icon .menu-icon { width:22px; height:22px; }
.adventure-tool-card > span:nth-child(2) { min-width:0; display:grid; gap:4px; }
.adventure-tool-card strong { color:#f1f5fc; font-size:12px; }
.adventure-tool-card small { color:#9cacc1; font-size:9px; line-height:1.4; }
.adventure-tool-card > b { min-width:20px; padding:4px 6px; border-radius:99px; color:#b9f0e5; background:rgba(71,155,150,.18); font:800 9px/1 "DM Mono",monospace; text-align:center; }

.screen-modal-content-equipe .team-grid { grid-template-columns:repeat(6,minmax(0,1fr)); gap:8px; margin:8px 0 15px; }
.screen-modal-content-equipe .team-slot { min-width:0; min-height:76px; aspect-ratio:1.3; padding:4px; border-radius:11px; }
.screen-modal-content-equipe .team-pokemon-button img { width:min(60px,100%); height:min(60px,100%); }
.screen-modal-content-equipe .storage-panel { margin-top:12px; padding:13px; border-radius:13px; background:linear-gradient(145deg,rgba(20,32,51,.97),rgba(12,21,37,.98)); }
.screen-modal-content-equipe .storage-heading { margin-bottom:10px; }
.screen-modal-content-equipe .storage-heading h3 { margin:2px 0 3px; font-size:15px; }
.screen-modal-content-equipe .storage-heading p { font-size:9px; }
.storage-heading-actions { display:flex; flex-wrap:wrap; align-items:center; justify-content:flex-end; gap:7px; }
.storage-heading-actions .chip { white-space:nowrap; }
.storage-auto-sale-open { min-height:29px; padding:5px 9px; border-color:rgba(119,210,197,.25); color:#a5e5d9; background:rgba(36,101,99,.16); font-size:9px; white-space:nowrap; }
.screen-modal-content-equipe .storage-grid { grid-template-columns:repeat(auto-fill,minmax(196px,1fr)); gap:7px; }
.screen-modal-content-equipe .storage-card { min-height:0; display:grid; grid-template-columns:46px minmax(0,1fr); align-items:center; gap:3px 8px; padding:7px; border-radius:10px; }
.screen-modal-content-equipe .storage-card-art { grid-column:1; grid-row:1; width:46px; height:46px; border-radius:8px; }
.screen-modal-content-equipe .storage-card-art img { width:42px; height:42px; }
.screen-modal-content-equipe .storage-card-copy { min-width:0; width:auto; display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:center; gap:3px 5px; }
.screen-modal-content-equipe .storage-card-copy .species-id { grid-column:1/-1; overflow:hidden; font-size:7px; text-overflow:ellipsis; white-space:nowrap; }
.screen-modal-content-equipe .storage-card-copy > strong { min-width:0; overflow:hidden; font-size:11px; text-overflow:ellipsis; white-space:nowrap; }
.screen-modal-content-equipe .storage-card-copy .pokemon-rarity.compact { min-height:19px; margin:0; padding:3px 6px; font-size:8px; }
.screen-modal-content-equipe .storage-sale-select,
.screen-modal-content-equipe .storage-sale-protected { grid-column:1/-1; gap:5px; font-size:8px; }
.screen-modal-content-equipe .storage-sale-select input { width:12px; height:12px; }
.screen-modal-content-equipe .storage-card-actions { grid-column:1/-1; display:flex; gap:5px; margin:0; }
.screen-modal-content-equipe .storage-card-actions .button { min-height:24px; padding:4px 7px; font-size:8px; }
.storage-manual-sale { margin:8px 0; padding:8px 10px; border-radius:10px; }
.storage-manual-sale .eyebrow { font-size:7px; }
.storage-sale-selected-count { font-size:10px; }
.storage-sale-selected-total { font-size:9px; }
.storage-manual-sale-actions .button { min-height:27px; padding:5px 8px; font-size:8px; }

.storage-auto-sale-backdrop { z-index:2147482490; }
.storage-auto-sale-modal { width:min(520px,calc(100vw - 28px)); overflow:hidden; }
.storage-auto-sale-modal .adventure-panel-head { border-bottom:1px solid rgba(161,190,220,.15); }
.storage-auto-sale-settings { display:grid; gap:13px; padding:15px 17px 17px; }
.storage-auto-sale-settings > p { margin:0; color:#a4b5ca; font-size:11px; line-height:1.55; }
.storage-auto-sale-settings .storage-auto-select { display:grid; gap:7px; width:100%; color:#9db0c8; font-size:10px; }
.storage-auto-sale-settings .storage-auto-select strong { color:#d9e8f4; }
.storage-auto-sale-settings .select-field { width:100%; min-height:38px; }
.storage-auto-sale-settings > .button { min-height:38px; }

@media(max-width:820px) {
  .screen-modal-content-equipe .team-grid { grid-template-columns:repeat(3,minmax(0,1fr)); }
  .screen-modal-content-equipe .storage-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@media(max-width:560px) {
  .adventure-tools-grid { grid-template-columns:1fr; gap:7px; }
  .adventure-tool-card { min-height:66px; }
  .screen-modal-content-equipe .team-grid { grid-template-columns:repeat(3,minmax(0,1fr)); }
  .screen-modal-content-equipe .storage-grid { grid-template-columns:1fr; }
  .screen-modal-content-equipe .storage-heading { align-items:flex-start; flex-direction:column; }
  .storage-heading-actions { width:100%; justify-content:space-between; }
  .storage-manual-sale { align-items:stretch; flex-direction:column; }
  .storage-manual-sale-actions { justify-content:stretch; }
}

/* Team cards show each party member's identity and move editor at a glance. */
.screen-modal-content-equipe .team-slot:not(.empty-slot) {
  display:grid;
  grid-template-columns:54px minmax(0,1fr);
  grid-template-rows:minmax(0,1fr);
  place-items:stretch;
  gap:7px;
  min-height:98px;
  aspect-ratio:auto;
  padding:7px;
}
.screen-modal-content-equipe .team-pokemon-button {
  grid-column:1;
  grid-row:1;
  align-self:center;
  justify-self:center;
  width:50px;
  height:54px;
}
.screen-modal-content-equipe .team-pokemon-button img { width:50px; height:54px; }
.screen-modal-content-equipe .team-slot-info {
  grid-column:2;
  grid-row:1;
  align-self:center;
  display:grid;
  justify-items:start;
  gap:4px;
  min-width:0;
  padding-right:34px;
}
.screen-modal-content-equipe .team-slot-heading { display:grid; gap:2px; min-width:0; max-width:100%; }
.screen-modal-content-equipe .team-slot-heading strong { overflow:hidden; max-width:100%; color:#f0f5fc; font-size:11px; line-height:1.2; text-overflow:ellipsis; white-space:nowrap; }
.screen-modal-content-equipe .team-slot-heading .pokemon-rarity.compact { min-height:17px; margin:0; padding:2px 6px; font-size:8px; }
.screen-modal-content-equipe .team-slot-level { color:#aab9ca; font:700 9px/1.2 "DM Mono",monospace; }
.screen-modal-content-equipe .team-slot-level b { color:#f0f5fc; font-size:12px; }
.screen-modal-content-equipe .team-slot-iv { color:#83d9cb; font:700 9px/1.2 "DM Mono",monospace; }
.screen-modal-content-equipe .team-slot-iv b { color:#d4fff2; font-size:10px; }
.screen-modal-content-equipe .team-edit-moves { min-height:23px; padding:4px 7px; border-radius:7px; font-size:8px; line-height:1; white-space:nowrap; }

@media (min-width:821px) and (max-width:1280px) {
  .screen-modal-content-equipe .team-grid { grid-template-columns:repeat(3,minmax(0,1fr)); }
}
@media (max-width:560px) {
  .screen-modal-content-equipe .team-slot:not(.empty-slot) {
    grid-template-columns:minmax(0,1fr);
    grid-template-rows:42px auto;
    min-height:126px;
    padding:6px;
  }
  .screen-modal-content-equipe .team-pokemon-button { grid-column:1; grid-row:1; width:42px; height:42px; }
  .screen-modal-content-equipe .team-pokemon-button img { width:42px; height:42px; }
  .screen-modal-content-equipe .team-slot-info { grid-column:1; grid-row:2; justify-items:center; gap:3px; padding-right:0; text-align:center; }
  .screen-modal-content-equipe .team-slot-heading { justify-items:center; }
  .screen-modal-content-equipe .team-edit-moves { width:100%; min-height:22px; padding:4px 3px; font-size:7px; }
}

/* Hunt cards: clearer identity, rewards and progress at a readable size. */
.hunt-gallery,
.hunt-picker-level-grid { grid-template-columns:repeat(4,minmax(0,1fr)); gap:12px; }
.hunt-tile {
  min-height:204px;
  gap:6px;
  padding:12px;
  border-radius:14px;
  text-align:left;
}
.hunt-tile-top { align-items:center; font:600 10px/1.25 "DM Mono",monospace; }
.hunt-tier-meta { gap:6px; }
.hunt-tile .power-tier.compact,
.hunt-tile .pokemon-rarity.compact { min-height:20px; padding:4px 7px; font-size:9px; }
.hunt-tile-body { gap:11px; margin:5px 0 2px; }
.hunt-tile-body img { width:60px; height:60px; }
.hunt-tile-body > span { min-width:0; }
.hunt-tile-body strong { font-size:15px; line-height:1.25; }
.hunt-tile-meta-row { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:6px; min-width:0; }
.hunt-tile .type-badges { gap:5px; margin:0; }
.hunt-tile .type-badge { padding:4px 8px; font-size:10px; }
.hunt-xp-reward { margin:0 0 0 auto; font-size:11px; line-height:1.35; white-space:normal; }
.hunt-xp-reward::before { font-size:12px; }
.hunt-tile-foot {
  align-items:center;
  gap:8px;
  margin-top:auto;
  padding-top:8px;
  font:600 9px/1.35 "DM Mono",monospace;
}
.hunt-tile-foot span:first-child { line-height:1.35; }
.hunt-tile-foot span:last-child { flex:none; }
.hunt-tile-foot strong { font-size:10px; }
.bestiary-progress,
.capture-study-progress { gap:5px; margin-top:2px; }
.bestiary-progress small,
.capture-study-progress small {
  display:block;
  overflow:visible;
  color:#b8cda9;
  font:600 9px/1.35 "DM Mono",monospace;
  letter-spacing:0;
  text-overflow:clip;
  white-space:normal;
}
.capture-study-progress small { color:#8fe2d5; }
.bestiary-progress > i,
.capture-study-progress > i { height:4px; border-radius:99px; }

@media (max-width:1100px) {
  .hunt-gallery,
  .hunt-picker-level-grid { grid-template-columns:repeat(3,minmax(0,1fr)); }
}
@media (max-width:720px) {
  .hunt-gallery,
  .hunt-picker-level-grid { grid-template-columns:repeat(2,minmax(0,1fr)); gap:9px; }
  .hunt-tile { min-height:210px; padding:10px; }
  .hunt-tile-body img { width:54px; height:54px; }
  .hunt-tile-body strong { font-size:14px; }
  .hunt-tile-foot { align-items:flex-start; flex-direction:column; gap:3px; }
}
@media (max-width:420px) {
  .hunt-gallery,
  .hunt-picker-level-grid { grid-template-columns:1fr; }
  .hunt-tile { min-height:0; }
  .hunt-tile-foot { align-items:center; flex-direction:row; }
}

/* Compact, icon-only action for adding an individual PC copy to the team. */
.screen-modal-content-equipe .storage-card-actions .storage-add-team-button {
  display:grid;
  place-items:center;
  flex:0 0 29px;
  width:29px;
  min-width:29px;
  min-height:25px;
  padding:0;
}
.screen-modal-content-equipe .storage-card-actions > .button:not(.storage-add-team-button) {
  flex:1 1 auto;
  width:auto;
  min-width:0;
}
.storage-add-team-icon { display:block; width:15px; height:15px; fill:none; stroke:currentColor; stroke-width:2; stroke-linecap:round; stroke-linejoin:round; }
.screen-modal-content-equipe .storage-sale-protected-note { flex:1 1 auto; text-align:right; }

/* Use the complete 96 x 96 sprites in the team bag, including shiny forms. */
.screen-modal-content-equipe .team-slot:not(.empty-slot) {
  grid-template-columns:minmax(0,1fr);
  grid-template-rows:96px auto;
  justify-items:center;
  align-items:center;
  gap:5px;
  min-height:174px;
  aspect-ratio:auto;
  padding:8px;
}
.screen-modal-content-equipe .team-pokemon-button {
  grid-column:1;
  grid-row:1;
  width:min(96px,100%);
  height:96px;
}
.screen-modal-content-equipe .team-pokemon-button img {
  display:block;
  width:96px;
  height:96px;
  max-width:100%;
  max-height:100%;
  object-fit:contain;
  image-rendering:pixelated;
}
.screen-modal-content-equipe .team-pokemon-button img.shiny-pokemon { filter:drop-shadow(0 0 5px rgba(255,224,125,.35)); }
.screen-modal-content-equipe .team-slot-info {
  grid-column:1;
  grid-row:2;
  justify-items:center;
  gap:4px;
  width:100%;
  padding:0;
  text-align:center;
}
.screen-modal-content-equipe .team-slot-heading { justify-items:center; }
.screen-modal-content-equipe .team-slot-heading strong { font-size:12px; }
.screen-modal-content-equipe .team-slot-level { font-size:10px; }
.screen-modal-content-equipe .team-edit-moves { min-height:24px; padding:4px 8px; font-size:9px; }
@media (max-width:560px) {
  .screen-modal-content-equipe .team-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .screen-modal-content-equipe .team-slot:not(.empty-slot) { grid-template-rows:96px auto; min-height:174px; }
}


/* Larger, readable typography for the Pokédex and PC storage cards. */
body.adventure-mode .screen-modal[data-modal-view="pokedex"] { width: min(1480px, 100%); }
.screen-modal[data-modal-view="pokedex"] .screen-modal-head h2 { font-size: 25px; }
.screen-modal[data-modal-view="pokedex"] .screen-modal-head p { color: #bdc9db; font-size: 13px; }
.screen-modal[data-modal-view="pokedex"] .screen-modal-head .eyebrow { font-size: 10px; }
.screen-modal-content-pokedex { padding: 18px 22px 22px; }
.screen-modal-content-pokedex .dex-summary .stat-chip { min-width: 112px; padding: 10px 13px; }
.screen-modal-content-pokedex .dex-summary .stat-chip small { color: #a8b8ce; font-size: 10px; }
.screen-modal-content-pokedex .dex-summary .stat-chip strong { color: #f0f5fc; font-size: 17px; }
.screen-modal-content-pokedex .hunt-toolbar { gap: 14px; margin-bottom: 15px; }
.screen-modal-content-pokedex .hunt-toolbar .toolbar { gap: 10px; }
.screen-modal-content-pokedex .hunt-toolbar .search-field,
.screen-modal-content-pokedex .hunt-toolbar .select-field { height: 44px; font-size: 13px; }
.screen-modal-content-pokedex .hunt-toolbar .search-field { min-width: 250px; }
.screen-modal-content-pokedex .hunt-toolbar .search-field input { font-size: 13px; }
.screen-modal-content-pokedex .hunt-toolbar .select-field { min-width: 145px; }
.screen-modal-content-pokedex .filter-count { color: #b7c5d8; font-size: 12px; }
.screen-modal-content-pokedex .pokedex-grid { grid-template-columns: repeat(6, minmax(0, 1fr)) !important; gap: 14px; }
.screen-modal-content-pokedex .dex-tile { padding: 12px 10px; border-radius: 14px; }
.screen-modal-content-pokedex .dex-tile .dex-no { color: #a6b4c8; font-size: 11px !important; }
.screen-modal-content-pokedex .dex-tile .dex-markers { min-height: 18px; }
.screen-modal-content-pokedex .dex-tile .dex-caught-mark,
.screen-modal-content-pokedex .dex-tile .dex-caught-mark .pokeball-icon { width: 18px; height: 18px; }
.screen-modal-content-pokedex .dex-tile .dex-star { font-size: 13px; }
.screen-modal-content-pokedex .dex-tile strong { color: #fff; font-size: 15px !important; font-weight: 800; line-height: 1.25; }
.screen-modal-content-pokedex .dex-tile .power-tier,
.screen-modal-content-pokedex .dex-tile .pokemon-rarity { margin-top: 5px; padding: 4px 9px; font-size: 10px !important; }
.screen-modal-content-pokedex .dex-tile small { margin-top: 6px; color: #bdc9db; font: 11px/1.3 "DM Mono", monospace !important; }
.screen-modal-content-pokedex .dex-shiny-toggle { min-height: 38px; margin-top: 8px; padding: 6px 8px; font-size: 12px !important; }

.screen-modal-content-equipe .storage-panel { padding: 18px; }
.screen-modal-content-equipe .storage-heading h3 { font-size: 20px; }
.screen-modal-content-equipe .storage-heading p { color: #bdc9db; font-size: 13px; }
.screen-modal-content-equipe .storage-heading .eyebrow { font-size: 10px; }
.screen-modal-content-equipe .storage-heading-actions .chip,
.screen-modal-content-equipe .storage-auto-sale-open { min-height: 36px; padding: 8px 11px; font-size: 12px; }
.screen-modal-content-equipe .storage-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.screen-modal-content-equipe .storage-card {
  min-height: 104px;
  grid-template-columns: 62px minmax(0, 1fr);
  grid-template-rows: auto auto;
  gap: 7px 10px;
  padding: 10px;
  border-radius: 13px;
}
.screen-modal-content-equipe .storage-card-main { grid-row: 1; grid-template-columns: 62px minmax(0, 1fr); gap: 10px; }
.screen-modal-content-equipe .storage-card-main .storage-card-art { width: 62px; height: 62px; }
.screen-modal-content-equipe .storage-card-main .storage-card-art img { width: 58px; height: 58px; }
.screen-modal-content-equipe .storage-card-copy { gap: 8px; }
.screen-modal-content-equipe .storage-card-title { gap: 6px; }
.screen-modal-content-equipe .storage-card-title strong { color: #fff; font-size: 16px !important; line-height: 1.2; }
.screen-modal-content-equipe .storage-card-title .pokemon-rarity.compact { min-height: 24px; padding: 4px 9px; font-size: 12px !important; }
.screen-modal-content-equipe .storage-card-level { min-height: 30px; gap: 7px; padding: 5px 10px; font-size: 13px; }
.screen-modal-content-equipe .storage-card-level b { font-size: 18px; }
.screen-modal-content-equipe .storage-card-actions { grid-row: 2; grid-column: 2; min-height: 34px; gap: 7px; }
.screen-modal-content-equipe .storage-card-actions .button { min-width: 82px; min-height: 34px; padding: 6px 12px; font-size: 12px !important; }
.screen-modal-content-equipe .storage-sale-protected-note { display: inline-flex; align-items: center; min-height: 34px; font-size: 12px !important; }
@media (max-width: 1120px) {
  .screen-modal-content-pokedex .pokedex-grid { grid-template-columns: repeat(5, minmax(0, 1fr)) !important; }
  .screen-modal-content-equipe .storage-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 820px) {
  .screen-modal-content-pokedex .pokedex-grid { grid-template-columns: repeat(4, minmax(0, 1fr)) !important; }
  .screen-modal-content-equipe .storage-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 620px) {
  .screen-modal[data-modal-view="pokedex"] .screen-modal-head h2 { font-size: 21px; }
  .screen-modal[data-modal-view="pokedex"] .screen-modal-head p { font-size: 12px; }
  .screen-modal-content-pokedex { padding: 12px; }
  .screen-modal-content-pokedex .dex-summary .stat-chip { flex: 1; min-width: 0; }
  .screen-modal-content-pokedex .hunt-toolbar .toolbar { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .screen-modal-content-pokedex .hunt-toolbar .search-field { grid-column: 1 / -1; min-width: 0; }
  .screen-modal-content-pokedex .hunt-toolbar .select-field { min-width: 0; }
  .screen-modal-content-pokedex .pokedex-grid { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; gap: 8px; }
  .screen-modal-content-pokedex .dex-tile strong { font-size: 12px !important; }
  .screen-modal-content-pokedex .dex-tile small { font-size: 10px !important; }
  .screen-modal-content-equipe .storage-panel { padding: 12px; }
  .screen-modal-content-equipe .storage-grid { grid-template-columns: 1fr; }
  .screen-modal-content-equipe .storage-card-title strong { font-size: 15px !important; }
}
@media (max-width: 380px) {
  .screen-modal-content-pokedex .pokedex-grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
}

/* Readable Pokemon team/PC cards and status panel; scoped to the actual modal markup. */
.screen-modal[data-modal-view="equipe"] .storage-heading h3 { font-size:24px !important; line-height:1.2; }
.screen-modal[data-modal-view="equipe"] .storage-heading p { color:#c2cede !important; font-size:14px !important; }
.screen-modal[data-modal-view="equipe"] .storage-heading .eyebrow { font-size:11px !important; }
.screen-modal[data-modal-view="equipe"] .storage-heading-actions .chip,
.screen-modal[data-modal-view="equipe"] .storage-auto-sale-open { min-height:40px; padding:9px 13px; font-size:13px !important; }
.screen-modal[data-modal-view="equipe"] .storage-grid { grid-template-columns:repeat(3,minmax(0,1fr)) !important; gap:14px; }
.screen-modal[data-modal-view="equipe"] .storage-card {
  min-height:132px !important;
  grid-template-columns:76px minmax(0,1fr) !important;
  grid-template-rows:1fr !important;
  align-items:center;
  gap:10px 14px !important;
  padding:14px !important;
  border-radius:15px;
}
.screen-modal[data-modal-view="equipe"] .storage-card-art { grid-column:1 !important; grid-row:1 !important; width:72px !important; height:72px !important; }
.screen-modal[data-modal-view="equipe"] .storage-card-art img { width:66px !important; height:66px !important; }
.screen-modal[data-modal-view="equipe"] .storage-card-copy {
  display:grid !important;
  grid-template-columns:minmax(0,1fr) auto !important;
  align-items:center;
  gap:9px 8px !important;
  min-width:0;
}
.screen-modal[data-modal-view="equipe"] .storage-card-title { grid-column:1/-1; gap:7px; }
.screen-modal[data-modal-view="equipe"] .storage-card-title strong { color:#fff; font-size:18px !important; line-height:1.25; }
.screen-modal[data-modal-view="equipe"] .storage-card-title .pokemon-rarity.compact { min-height:27px; padding:5px 10px; font-size:13px !important; }
.screen-modal[data-modal-view="equipe"] .storage-card-level { min-height:32px; gap:7px; padding:5px 10px; font-size:14px !important; }
.screen-modal[data-modal-view="equipe"] .storage-card-level b { font-size:19px !important; }
.screen-modal[data-modal-view="equipe"] .storage-card-actions { grid-column:1/-1 !important; display:flex; align-items:center; justify-content:flex-start; gap:8px; min-height:38px; }
.screen-modal[data-modal-view="equipe"] .storage-card-actions .button { min-width:42px; min-height:38px; padding:7px 12px; font-size:13px !important; }
.screen-modal[data-modal-view="equipe"] .storage-sale-protected-note { min-height:36px; font-size:13px !important; }
.screen-modal[data-modal-view="equipe"] .team-slot-heading strong { font-size:14px !important; }
.screen-modal[data-modal-view="equipe"] .team-slot-heading .pokemon-rarity.compact { min-height:21px; padding:3px 8px; font-size:10px !important; }
.screen-modal[data-modal-view="equipe"] .team-slot-level { font-size:12px !important; }
.screen-modal[data-modal-view="equipe"] .team-slot-level b { font-size:15px !important; }
.screen-modal[data-modal-view="equipe"] .team-edit-moves { min-height:29px; padding:6px 9px; font-size:10px !important; }

.pokemon-status-backdrop { z-index:2147482600; }
.pokemon-status-modal {
  display:grid !important;
  grid-template-columns:repeat(2,minmax(0,1fr));
  grid-template-rows:auto auto auto auto auto auto;
  column-gap:14px;
  row-gap:0;
  width:min(820px,calc(100vw - 28px)) !important;
  max-height:min(94vh,900px) !important;
  overflow-y:auto;
  padding:0 !important;
}
.pokemon-status-modal .pokemon-status-head,
.pokemon-status-modal .pokemon-status-xp,
.pokemon-status-modal .pokemon-status-stats,
.pokemon-status-modal .pokemon-status-actions,
.pokemon-status-modal .pokemon-status-foot { grid-column:1/-1; }
.pokemon-status-modal .pokemon-status-head { gap:18px; padding:20px 24px 17px; }
.pokemon-status-modal .pokemon-status-art { width:88px; height:88px; flex-basis:88px; }
.pokemon-status-modal .pokemon-status-art img { width:80px; height:80px; }
.pokemon-status-modal .pokemon-status-heading .eyebrow { font-size:10px !important; }
.pokemon-status-modal .pokemon-status-heading h2 { margin:5px 0; font-size:28px !important; line-height:1.15; }
.pokemon-status-modal .pokemon-status-heading p { margin-top:8px; font-size:14px !important; }
.pokemon-status-tier { display:inline-flex; align-items:center; min-height:30px; margin-top:4px; padding:5px 11px; border:1px solid rgba(255,208,114,.35); border-radius:9px; color:#ffe09a; background:linear-gradient(110deg,rgba(122,86,32,.34),rgba(44,39,33,.4)); font:800 13px/1.2 Inter,"Segoe UI",sans-serif; }
.pokemon-status-modal .pokemon-status-xp { gap:9px; margin:12px 20px 10px; padding:11px 14px; }
.pokemon-status-modal .pokemon-status-xp > div { font-size:13px !important; }
.pokemon-status-modal .pokemon-status-xp > div span { font-size:11px !important; }
.pokemon-status-modal .pokemon-status-xp > div strong { font-size:13px !important; }
.pokemon-status-modal .pokemon-status-xp > i { height:8px; }
.pokemon-status-modal .pokemon-status-stats { gap:9px; margin:0 20px 10px; }
.pokemon-status-modal .pokemon-status-stats article { min-height:68px; gap:7px; padding:11px 13px; }
.pokemon-status-modal .pokemon-status-stats article span { color:#bdc9db; font-size:12px !important; }
.pokemon-status-modal .pokemon-status-stats article strong { font-size:18px !important; line-height:1.15; }
.pokemon-status-modal .pokemon-status-moves { grid-column:1; align-self:stretch; margin:0 0 12px 20px; padding:13px 14px; }
.pokemon-status-modal .pokemon-status-moves > span { font-size:10px !important; }
.pokemon-status-modal .pokemon-status-moves p { margin-top:8px; color:#f0f4fa; font-size:14px !important; line-height:1.45; }
.pokemon-status-modal .pokemon-status-genetics { grid-column:2; align-self:stretch; gap:8px; margin:0 20px 12px 0; padding:12px; }
.pokemon-status-modal .pokemon-genetics-quality > span { font-size:10px !important; }
.pokemon-status-modal .pokemon-genetics-quality > strong { font-size:16px !important; }
.pokemon-status-modal .pokemon-iv-grid { gap:6px; }
.pokemon-status-modal .pokemon-iv-grid > div { padding:8px 9px; }
.pokemon-status-modal .pokemon-iv-grid span { font-size:10px !important; }
.pokemon-status-modal .pokemon-iv-grid strong { font-size:12px !important; }
.pokemon-status-modal .pokemon-status-actions { gap:9px; margin:0 20px 14px; padding:13px; }
.pokemon-status-modal .pokemon-status-actions > .eyebrow { font-size:10px !important; }
.pokemon-status-modal .pokemon-status-action-buttons { gap:8px; }
.pokemon-status-modal .pokemon-status-action-buttons .button { min-height:40px; padding:8px 13px; font-size:12px !important; }
.pokemon-status-modal .pokemon-status-sale-value,
.pokemon-status-modal .pokemon-status-protected { font-size:13px !important; }
.pokemon-status-modal .pokemon-status-foot { display:none !important; }
@media (max-width:900px) {
  .screen-modal[data-modal-view="equipe"] .storage-grid { grid-template-columns:repeat(2,minmax(0,1fr)) !important; }
}
@media (max-width:620px) {
  .screen-modal[data-modal-view="equipe"] .storage-grid { grid-template-columns:1fr !important; }
  .screen-modal[data-modal-view="equipe"] .storage-card { min-height:120px !important; grid-template-columns:66px minmax(0,1fr) !important; padding:11px !important; }
  .screen-modal[data-modal-view="equipe"] .storage-card-art { width:62px !important; height:62px !important; }
  .screen-modal[data-modal-view="equipe"] .storage-card-art img { width:56px !important; height:56px !important; }
  .screen-modal[data-modal-view="equipe"] .storage-card-title strong { font-size:16px !important; }
  .screen-modal[data-modal-view="equipe"] .storage-card-title .pokemon-rarity.compact { min-height:24px; font-size:11px !important; }
  .screen-modal[data-modal-view="equipe"] .storage-card-level { font-size:13px !important; }
  .screen-modal[data-modal-view="equipe"] .storage-card-level b { font-size:17px !important; }
  .pokemon-status-modal { grid-template-columns:minmax(0,1fr); }
  .pokemon-status-modal .pokemon-status-moves,
  .pokemon-status-modal .pokemon-status-genetics { grid-column:1; margin:0 14px 10px; }
  .pokemon-status-modal .pokemon-status-head { padding:15px 14px 13px; }
  .pokemon-status-modal .pokemon-status-art { width:70px; height:70px; flex-basis:70px; }
  .pokemon-status-modal .pokemon-status-art img { width:64px; height:64px; }
  .pokemon-status-modal .pokemon-status-heading h2 { font-size:22px !important; }
  .pokemon-status-modal .pokemon-status-heading p { font-size:12px !important; }
  .pokemon-status-modal .pokemon-status-tier { min-height:27px; font-size:11px; }
  .pokemon-status-modal .pokemon-status-xp,
  .pokemon-status-modal .pokemon-status-stats,
  .pokemon-status-modal .pokemon-status-actions { margin-left:14px; margin-right:14px; }
  .pokemon-status-modal .pokemon-status-stats { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
/* Slightly more compact Pokédex tiles while keeping the readable type sizes. */
.screen-modal-content-pokedex .pokedex-grid { gap:12px !important; }
.screen-modal-content-pokedex .dex-tile { padding:10px 9px !important; }
.screen-modal-content-pokedex .dex-tile-open img { width:84px !important; height:84px !important; margin:3px 0 2px !important; }
.screen-modal-content-pokedex .dex-tile .power-tier,
.screen-modal-content-pokedex .dex-tile .pokemon-rarity { margin-top:4px !important; padding:3px 9px !important; font-size:10px !important; }
.screen-modal-content-pokedex .dex-tile small { margin-top:4px !important; }
.screen-modal-content-pokedex .dex-shiny-toggle { min-height:34px !important; margin-top:6px !important; padding:5px 8px !important; }
/* Pokédex communicates the species power tier; capture rarity stays in the collection. */
.screen-modal-content-pokedex .dex-tile[data-tier="5"] { --dex-tier-line:#a8baaa; --dex-tier-surface:linear-gradient(145deg,rgba(49,66,57,.98),rgba(20,31,29,.98)); --dex-tier-glow:rgba(174,198,177,.14); }
.screen-modal-content-pokedex .dex-tile[data-tier="4"] { --dex-tier-line:#83d28f; --dex-tier-surface:linear-gradient(145deg,rgba(27,78,54,.98),rgba(14,38,33,.98)); --dex-tier-glow:rgba(113,221,143,.16); }
.screen-modal-content-pokedex .dex-tile[data-tier="3"] { --dex-tier-line:#62ced0; --dex-tier-surface:linear-gradient(145deg,rgba(24,72,83,.98),rgba(15,34,48,.98)); --dex-tier-glow:rgba(98,206,208,.16); }
.screen-modal-content-pokedex .dex-tile[data-tier="2"] { --dex-tier-line:#95a5ff; --dex-tier-surface:linear-gradient(145deg,rgba(51,57,104,.98),rgba(26,31,62,.98)); --dex-tier-glow:rgba(150,161,255,.18); }
.screen-modal-content-pokedex .dex-tile[data-tier="1"] { --dex-tier-line:#f3c968; --dex-tier-surface:linear-gradient(145deg,rgba(94,69,28,.98),rgba(43,36,27,.98)); --dex-tier-glow:rgba(255,207,103,.22); }
.screen-modal-content-pokedex .dex-tile[data-tier] { border:1px solid color-mix(in srgb,var(--dex-tier-line) 58%,transparent) !important; border-left:4px solid var(--dex-tier-line) !important; background:var(--dex-tier-surface) !important; box-shadow:inset 0 0 0 1px color-mix(in srgb,var(--dex-tier-line) 12%,transparent),0 7px 20px rgba(0,0,0,.16); }
.screen-modal-content-pokedex .dex-tile[data-tier]:hover { filter:brightness(1.08); box-shadow:inset 0 0 0 1px color-mix(in srgb,var(--dex-tier-line) 23%,transparent),0 0 20px var(--dex-tier-glow); }
.dex-card-tags, .dex-detail-badges { display:flex; flex-wrap:wrap; align-items:center; justify-content:center; gap:7px; margin-top:4px; }
.dex-tier-badge, .dex-legendary-badge { display:inline-flex; align-items:center; justify-content:center; min-height:26px; padding:5px 10px; border:1px solid rgba(192,209,228,.24); border-radius:999px; font:800 11px/1.1 Inter,"Segoe UI",sans-serif; letter-spacing:.02em; white-space:nowrap; }
.dex-tier-badge.power-tier-1 { border-color:rgba(243,201,104,.62); color:#ffe5a1; background:rgba(129,88,23,.3); }
.dex-tier-badge.power-tier-2 { border-color:rgba(157,168,255,.55); color:#d6dcff; background:rgba(75,79,151,.28); }
.dex-tier-badge.power-tier-3 { border-color:rgba(100,211,215,.48); color:#b5f1ec; background:rgba(38,115,122,.25); }
.dex-tier-badge.power-tier-4 { border-color:rgba(120,222,145,.45); color:#c5f5cf; background:rgba(36,113,68,.25); }
.dex-tier-badge.power-tier-5 { border-color:rgba(174,198,177,.4); color:#d8e4d9; background:rgba(83,103,88,.24); }
.dex-legendary-badge { border-color:rgba(255,139,120,.55); color:#ffd0c5; background:linear-gradient(120deg,rgba(143,58,61,.34),rgba(74,44,69,.32)); letter-spacing:.07em; }
.dex-legendary-badge.is-mythical { border-color:rgba(206,147,255,.58); color:#e9ccff; background:rgba(105,58,142,.32); }
.dex-detail-backdrop { z-index:2147482600; }
.dex-detail-modal { position:relative; width:min(900px,calc(100vw - 30px)) !important; max-height:min(92vh,900px); overflow:auto; border-color:rgba(124,211,211,.3); background:linear-gradient(145deg,#16243a,#0c1526); }
.dex-detail-head { position:relative; padding:23px 64px 15px !important; border-bottom:1px solid rgba(169,190,224,.14); }
.dex-detail-head .eyebrow { color:#84dfd5; font-size:10px; letter-spacing:.13em; }
.dex-detail-head h2 { margin:5px 0 4px; color:#f4f7fd; font-size:28px !important; }
.dex-detail-head p { margin:0; color:#b8c6d8 !important; font-size:13px !important; }
.dex-detail-close { position:absolute; top:17px; right:18px; width:42px; height:42px; display:grid; place-items:center; border:1px solid rgba(169,190,224,.28); border-radius:12px; color:#f4e2ba; background:rgba(15,25,42,.9); font-size:27px; line-height:1; cursor:pointer; }
.dex-detail-close:hover { border-color:#79ddd5; color:#9cebe1; }
.dex-detail-content { grid-template-columns:170px minmax(0,1fr) !important; align-items:start !important; gap:20px !important; padding:18px 24px 22px !important; }
.dex-detail-content .pokemon-detail-art { width:170px; height:170px; border-color:rgba(114,215,199,.24); background:radial-gradient(circle,rgba(86,183,170,.2),rgba(8,20,33,.55)); }
.dex-detail-content .pokemon-detail-art img { width:150px; height:150px; }
.dex-detail-copy { min-width:0; }
.dex-detail-copy .type-badges { justify-content:flex-start; gap:7px; margin-bottom:9px; }
.dex-detail-copy .type-badge { min-height:28px; padding:5px 10px; font-size:12px; }
.dex-detail-badges { justify-content:flex-start; margin:0 0 9px; }
.dex-detail-badges .dex-tier-badge, .dex-detail-badges .dex-legendary-badge { min-height:31px; padding:6px 12px; font-size:13px; }
.dex-detail-copy .dex-shiny-note { margin:0 0 9px; color:#ffe49b; font-size:13px; font-weight:700; }
.dex-detail-copy .detail-stats { gap:9px; margin:9px 0 11px; }
.dex-detail-copy .detail-stats .mini-stat { min-height:58px; padding:9px 7px; border:1px solid rgba(169,190,224,.15); border-radius:11px; background:rgba(8,15,28,.5); text-align:center; }
.dex-detail-copy .detail-stats .mini-stat small { color:#aebdd0; font-size:10px; }
.dex-detail-copy .detail-stats .mini-stat strong { color:#f1f5fb; font-size:17px; }
.dex-detail-copy .capture-study-detail { gap:7px; margin:10px 0; padding:12px 13px; border-color:rgba(116,221,211,.24); }
.dex-detail-copy .capture-study-detail small { font-size:10px; }
.dex-detail-copy .capture-study-detail strong { font-size:14px; }
.dex-detail-copy .capture-study-detail span { color:#b7c6d8; font-size:12px; line-height:1.5; }
.dex-detail-copy .capture-study-detail > i { height:5px; }
.dex-detail-notes { display:grid; gap:5px; margin-top:9px; }
.dex-detail-notes p { margin:0; color:#c0ccdc !important; font-size:12px !important; line-height:1.5 !important; overflow-wrap:anywhere; }
.dex-detail-notes strong { color:#eef5fc; }
@media (max-width:620px) {
  .dex-detail-modal { width:min(540px,calc(100vw - 18px)) !important; }
  .dex-detail-head { padding:20px 56px 13px !important; }
  .dex-detail-head h2 { font-size:23px !important; }
  .dex-detail-head p { font-size:12px !important; }
  .dex-detail-close { top:12px; right:12px; width:36px; height:36px; }
  .dex-detail-content { grid-template-columns:1fr !important; gap:11px !important; padding:13px 14px 16px !important; }
  .dex-detail-content .pokemon-detail-art { width:108px; height:108px; justify-self:center; }
  .dex-detail-content .pokemon-detail-art img { width:94px; height:94px; }
  .dex-detail-copy .detail-stats .mini-stat { min-height:52px; }
  .dex-detail-copy .capture-study-detail span { font-size:11px; }
}
/* Keep rarity as readable as the tier across the team bag, PC and status sheet. */
.pokemon-status-modal .pokemon-status-heading .pokemon-rarity.compact,
.pokemon-status-modal .pokemon-status-heading .pokemon-status-tier {
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:38px;
  margin:4px 7px 5px 0;
  padding:7px 13px;
  border-radius:11px;
  font-size:15px !important;
  font-weight:900 !important;
  line-height:1.1;
  vertical-align:middle;
}
.pokemon-status-modal .pokemon-status-heading .pokemon-status-tier { margin-top:4px; }
.screen-modal[data-modal-view="equipe"] .team-slot-heading .pokemon-rarity.compact,
.screen-modal[data-modal-view="equipe"] .storage-card-title .pokemon-rarity.compact {
  min-height:29px !important;
  margin:0;
  padding:5px 10px !important;
  border-radius:999px;
  font-size:13px !important;
  font-weight:900 !important;
  line-height:1.1;
  letter-spacing:.04em;
}
@media (max-width:620px) {
  .pokemon-status-modal .pokemon-status-heading .pokemon-rarity.compact,
  .pokemon-status-modal .pokemon-status-heading .pokemon-status-tier { min-height:34px; padding:6px 10px; font-size:14px !important; }
  .screen-modal[data-modal-view="equipe"] .team-slot-heading .pokemon-rarity.compact,
  .screen-modal[data-modal-view="equipe"] .storage-card-title .pokemon-rarity.compact { font-size:13px !important; }
}
.evolution-requirements-backdrop { z-index:2147482601 !important; }

/* Smaller individual copies in the PC while keeping rarity and actions readable. */
.screen-modal[data-modal-view="equipe"] .storage-grid {
  grid-template-columns:repeat(4,minmax(0,1fr)) !important;
  gap:9px !important;
}
.screen-modal[data-modal-view="equipe"] .storage-card {
  min-height:76px !important;
  grid-template-columns:50px minmax(0,1fr) !important;
  grid-template-rows:1fr !important;
  gap:5px 8px !important;
  padding:7px !important;
  border-radius:11px !important;
}
.screen-modal[data-modal-view="equipe"] .storage-card-art {
  grid-column:1 !important;
  grid-row:1 !important;
  width:46px !important;
  height:46px !important;
}
.screen-modal[data-modal-view="equipe"] .storage-card-art img { width:42px !important; height:42px !important; }
.screen-modal[data-modal-view="equipe"] .storage-card-copy {
  display:grid !important;
  grid-template-columns:auto minmax(0,1fr) !important;
  grid-template-rows:auto auto !important;
  align-items:center !important;
  gap:4px 6px !important;
  min-width:0 !important;
}
.screen-modal[data-modal-view="equipe"] .storage-card-title {
  grid-column:1/-1 !important;
  grid-row:1 !important;
  display:flex !important;
  align-items:center !important;
  gap:5px !important;
  min-width:0 !important;
}
.screen-modal[data-modal-view="equipe"] .storage-card-title strong {
  min-width:0 !important;
  overflow:hidden !important;
  font-size:14px !important;
  line-height:1.15 !important;
  text-overflow:ellipsis !important;
  white-space:nowrap !important;
}
.screen-modal[data-modal-view="equipe"] .storage-card-title .pokemon-rarity.compact {
  flex:0 0 auto !important;
  min-height:22px !important;
  padding:3px 7px !important;
  font-size:13px !important;
}
.screen-modal[data-modal-view="equipe"] .storage-card-level {
  grid-column:1 !important;
  grid-row:2 !important;
  min-height:23px !important;
  gap:4px !important;
  padding:3px 6px !important;
  font-size:11px !important;
}
.screen-modal[data-modal-view="equipe"] .storage-card-level b { font-size:15px !important; }
.screen-modal[data-modal-view="equipe"] .storage-card-actions {
  grid-column:2 !important;
  grid-row:2 !important;
  justify-content:flex-end !important;
  min-height:27px !important;
  gap:6px !important;
  margin:0 !important;
}
.screen-modal[data-modal-view="equipe"] .storage-card-actions .button {
  min-width:0 !important;
  min-height:27px !important;
  padding:4px 8px !important;
  font-size:11px !important;
}
.screen-modal[data-modal-view="equipe"] .storage-card-actions .storage-add-team-button {
  flex:0 0 29px !important;
  width:29px !important;
  min-width:29px !important;
  min-height:27px !important;
  padding:0 !important;
}
.screen-modal[data-modal-view="equipe"] .storage-sale-protected-note { min-height:27px !important; font-size:11px !important; }
@media (max-width:1120px) {
  .screen-modal[data-modal-view="equipe"] .storage-grid { grid-template-columns:repeat(3,minmax(0,1fr)) !important; }
}
@media (max-width:820px) {
  .screen-modal[data-modal-view="equipe"] .storage-grid { grid-template-columns:repeat(2,minmax(0,1fr)) !important; }
}
@media (max-width:620px) {
  .screen-modal[data-modal-view="equipe"] .storage-grid { grid-template-columns:1fr !important; gap:6px !important; }
  .screen-modal[data-modal-view="equipe"] .storage-card {
    min-height:66px !important;
    grid-template-columns:44px minmax(0,1fr) !important;
    gap:4px 7px !important;
    padding:6px !important;
  }
  .screen-modal[data-modal-view="equipe"] .storage-card-art { width:42px !important; height:42px !important; }
  .screen-modal[data-modal-view="equipe"] .storage-card-art img { width:38px !important; height:38px !important; }
  .screen-modal[data-modal-view="equipe"] .storage-card-copy { gap:3px 5px !important; }
  .screen-modal[data-modal-view="equipe"] .storage-card-title strong { font-size:13px !important; }
  .screen-modal[data-modal-view="equipe"] .storage-card-title .pokemon-rarity.compact { min-height:21px !important; padding:2px 6px !important; font-size:13px !important; }
  .screen-modal[data-modal-view="equipe"] .storage-card-level { min-height:21px !important; padding:2px 5px !important; font-size:10px !important; }
  .screen-modal[data-modal-view="equipe"] .storage-card-level b { font-size:14px !important; }
  .screen-modal[data-modal-view="equipe"] .storage-card-actions { min-height:24px !important; }
  .screen-modal[data-modal-view="equipe"] .storage-card-actions .button { min-height:24px !important; padding:3px 7px !important; font-size:10px !important; }
  .screen-modal[data-modal-view="equipe"] .storage-card-actions .storage-add-team-button { min-height:24px !important; }
  .screen-modal[data-modal-view="equipe"] .storage-sale-protected-note { min-height:24px !important; font-size:10px !important; }
}

/* Mobile team and PC navigation: keep both destinations visible without a long combined list. */
.screen-modal-content-equipe {
  min-height:0;
  overflow-y:auto;
  overscroll-behavior-y:contain;
  -webkit-overflow-scrolling:touch;
  touch-action:pan-y;
  scrollbar-width:thin;
}
.equipe-inventory-tabs {
  position:sticky;
  z-index:20;
  top:-1px;
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:8px;
  margin:-2px 0 12px;
  padding:7px;
  border:1px solid rgba(157,184,215,.19);
  border-radius:13px;
  background:rgba(11,20,35,.96);
  box-shadow:0 5px 16px rgba(0,0,0,.2);
  backdrop-filter:blur(10px);
}
.equipe-inventory-tab {
  display:flex;
  align-items:center;
  justify-content:center;
  gap:9px;
  min-height:44px;
  padding:8px 12px;
  border:1px solid rgba(157,184,215,.2);
  border-radius:10px;
  color:#c4d0df;
  background:#111d30;
  font:800 14px/1.2 Inter,"Segoe UI",sans-serif;
  cursor:pointer;
  touch-action:manipulation;
}
.equipe-inventory-tab span { color:#91e3d7; font:700 12px/1 "DM Mono",monospace; }
.equipe-inventory-tab.is-active { border-color:rgba(115,224,211,.7); color:#f4fbff; background:linear-gradient(120deg,rgba(32,79,87,.96),rgba(24,48,70,.98)); box-shadow:inset 0 0 0 1px rgba(115,224,211,.15); }
.equipe-tab-panel[hidden] { display:none !important; }
.equipe-tab-panel { min-width:0; scroll-margin-top:66px; }
.storage-card { scroll-margin-block:82px; }
@media (max-width:620px) {
  .screen-modal[data-modal-view="equipe"] { height:calc(100vh - 16px); max-height:calc(100vh - 16px); }
  @supports (height:100dvh) {
    .screen-modal[data-modal-view="equipe"] { height:calc(100dvh - 16px); max-height:calc(100dvh - 16px); }
  }
  .screen-modal-content-equipe { padding:9px !important; overflow-y:auto !important; touch-action:pan-y; }
  .screen-modal-content-equipe .team-grid { grid-template-columns:repeat(2,minmax(0,1fr)) !important; gap:8px !important; }
  .screen-modal-content-equipe .team-slot:not(.empty-slot) { min-height:140px !important; grid-template-rows:58px auto !important; padding:8px !important; }
  .screen-modal-content-equipe .team-pokemon-button,
  .screen-modal-content-equipe .team-pokemon-button img { width:50px !important; height:50px !important; }
  .screen-modal-content-equipe .team-slot-heading strong { font-size:13px !important; }
  .screen-modal-content-equipe .team-slot-heading .pokemon-rarity.compact { min-height:22px !important; padding:4px 7px !important; font-size:13px !important; }
  .screen-modal-content-equipe .team-slot-level { font-size:12px !important; }
  .screen-modal-content-equipe .team-edit-moves { min-height:30px !important; padding:5px 7px !important; font-size:10px !important; }
  .screen-modal-content-equipe .storage-panel { margin-top:0; padding:11px !important; }
  .screen-modal-content-equipe .storage-heading { gap:9px; }
  .screen-modal-content-equipe .storage-heading h3 { font-size:20px !important; }
  .screen-modal-content-equipe .storage-heading p { font-size:12px !important; }
  .screen-modal-content-equipe .storage-heading-actions { display:flex; flex-wrap:wrap; gap:6px; }
  .screen-modal-content-equipe .storage-heading-actions .chip,
  .screen-modal-content-equipe .storage-auto-sale-open { min-height:34px; padding:6px 9px; font-size:11px !important; }
  .screen-modal-content-equipe .storage-pagination { position:sticky; z-index:5; top:0; padding:5px 0; background:rgba(16,26,43,.97); }
  .screen-modal-content-equipe .storage-grid { grid-template-columns:1fr !important; gap:8px !important; }
  .screen-modal-content-equipe .storage-card { min-height:94px !important; grid-template-columns:58px minmax(0,1fr) !important; gap:6px 9px !important; padding:9px !important; }
  .screen-modal-content-equipe .storage-card-art { width:54px !important; height:54px !important; }
  .screen-modal-content-equipe .storage-card-art img { width:50px !important; height:50px !important; }
  .screen-modal-content-equipe .storage-card-copy { display:grid !important; grid-template-columns:minmax(0,1fr) auto !important; align-items:center; gap:5px 7px !important; }
  .screen-modal-content-equipe .storage-card-title { grid-column:1/-1; gap:6px; }
  .screen-modal-content-equipe .storage-card-title strong { font-size:15px !important; }
  .screen-modal-content-equipe .storage-card-title .pokemon-rarity.compact { min-height:25px !important; padding:4px 8px !important; font-size:13px !important; }
  .screen-modal-content-equipe .storage-card-level { min-height:28px; gap:5px; padding:3px 7px; font-size:12px !important; }
  .screen-modal-content-equipe .storage-card-level b { font-size:16px !important; }
  .screen-modal-content-equipe .storage-card-actions { grid-column:1/-1 !important; gap:7px; min-height:32px; }
  .screen-modal-content-equipe .storage-card-actions .button { min-width:42px; min-height:32px; padding:5px 10px; font-size:12px !important; }
}

/* PC cards use the same centered, full-sprite layout as the team cards. */
.screen-modal[data-modal-view="equipe"] .storage-grid {
  grid-template-columns:repeat(4,minmax(0,1fr)) !important;
  align-items:stretch;
  gap:10px !important;
}
.screen-modal[data-modal-view="equipe"] .storage-card {
  min-width:0 !important;
  min-height:174px !important;
  display:grid !important;
  grid-template-columns:minmax(0,1fr) !important;
  grid-template-rows:96px auto !important;
  justify-items:center !important;
  align-content:start !important;
  align-items:center !important;
  gap:5px !important;
  padding:8px !important;
  border-radius:14px !important;
  aspect-ratio:auto !important;
}
.screen-modal[data-modal-view="equipe"] .storage-card-art {
  grid-column:1 !important;
  grid-row:1 !important;
  width:96px !important;
  height:96px !important;
  display:grid !important;
  place-items:center !important;
  border:0 !important;
  border-radius:10px !important;
  background:transparent !important;
}
.screen-modal[data-modal-view="equipe"] .storage-card-art img {
  width:96px !important;
  height:96px !important;
  max-width:100% !important;
  max-height:100% !important;
  object-fit:contain !important;
  image-rendering:pixelated !important;
}
.screen-modal[data-modal-view="equipe"] .storage-card-copy {
  grid-column:1 !important;
  grid-row:2 !important;
  display:grid !important;
  grid-template-columns:minmax(0,1fr) !important;
  grid-template-rows:auto auto auto !important;
  justify-items:center !important;
  align-content:start !important;
  gap:5px !important;
  width:100% !important;
  min-width:0 !important;
  padding:0 !important;
  text-align:center !important;
}
.screen-modal[data-modal-view="equipe"] .storage-card-title {
  grid-column:1 !important;
  grid-row:1 !important;
  display:grid !important;
  justify-items:center !important;
  gap:3px !important;
  width:100% !important;
  min-width:0 !important;
}
.screen-modal[data-modal-view="equipe"] .storage-card-title strong {
  max-width:100% !important;
  color:#f0f5fc !important;
  font-size:12px !important;
  line-height:1.2 !important;
  text-overflow:ellipsis !important;
  white-space:nowrap !important;
}
.screen-modal[data-modal-view="equipe"] .storage-card-title .pokemon-rarity.compact {
  min-height:29px !important;
  margin:0 !important;
  padding:5px 10px !important;
  font-size:13px !important;
  font-weight:900 !important;
  line-height:1.1 !important;
}
.screen-modal[data-modal-view="equipe"] .storage-card-level {
  grid-column:1 !important;
  grid-row:2 !important;
  min-height:0 !important;
  display:flex !important;
  align-items:center !important;
  justify-content:center !important;
  gap:5px !important;
  margin:0 !important;
  padding:0 !important;
  border:0 !important;
  border-radius:0 !important;
  color:#aab9ca !important;
  background:transparent !important;
  font:700 10px/1.2 "DM Mono",monospace !important;
}
.screen-modal[data-modal-view="equipe"] .storage-card-level b { color:#f0f5fc !important; font-size:14px !important; }
.screen-modal[data-modal-view="equipe"] .storage-card-actions {
  grid-column:1 !important;
  grid-row:3 !important;
  display:flex !important;
  align-items:center !important;
  justify-content:center !important;
  gap:6px !important;
  width:100% !important;
  min-height:27px !important;
  margin:0 !important;
}
.screen-modal[data-modal-view="equipe"] .storage-card-actions .button {
  min-width:0 !important;
  min-height:27px !important;
  padding:4px 9px !important;
  font-size:10px !important;
  white-space:nowrap !important;
}
.screen-modal[data-modal-view="equipe"] .storage-card-actions .storage-add-team-button {
  flex:0 0 29px !important;
  width:29px !important;
  min-width:29px !important;
  min-height:27px !important;
  padding:0 !important;
}
.screen-modal[data-modal-view="equipe"] .storage-sale-protected-note {
  min-height:27px !important;
  font-size:10px !important;
  text-align:center !important;
}
@media (max-width:1120px) {
  .screen-modal[data-modal-view="equipe"] .storage-grid { grid-template-columns:repeat(3,minmax(0,1fr)) !important; }
}
@media (max-width:820px) {
  .screen-modal[data-modal-view="equipe"] .storage-grid { grid-template-columns:repeat(2,minmax(0,1fr)) !important; }
}
@media (max-width:620px) {
  .screen-modal[data-modal-view="equipe"] .storage-grid { grid-template-columns:repeat(2,minmax(0,1fr)) !important; gap:8px !important; }
  .screen-modal[data-modal-view="equipe"] .storage-card { min-height:174px !important; padding:7px !important; }
  .screen-modal[data-modal-view="equipe"] .storage-card-art,
  .screen-modal[data-modal-view="equipe"] .storage-card-art img { width:88px !important; height:88px !important; }
  .screen-modal[data-modal-view="equipe"] .storage-card-title strong { font-size:12px !important; }
  .screen-modal[data-modal-view="equipe"] .storage-card-title .pokemon-rarity.compact { min-height:26px !important; padding:4px 8px !important; font-size:12px !important; }
  .screen-modal[data-modal-view="equipe"] .storage-card-actions { gap:5px !important; }
  .screen-modal[data-modal-view="equipe"] .storage-card-actions .button { min-height:27px !important; padding:4px 7px !important; font-size:10px !important; }
}

/* Slightly smaller PC cards; keep their centered layout consistent with the team. */
.screen-modal[data-modal-view="equipe"] .storage-card {
  min-height:158px !important;
  grid-template-rows:80px auto !important;
  gap:4px !important;
  padding:6px !important;
}
.screen-modal[data-modal-view="equipe"] .storage-card-art,
.screen-modal[data-modal-view="equipe"] .storage-card-art img {
  width:80px !important;
  height:80px !important;
}
.screen-modal[data-modal-view="equipe"] .storage-card-copy { gap:3px !important; }
.screen-modal[data-modal-view="equipe"] .storage-card-title { gap:2px !important; }
.screen-modal[data-modal-view="equipe"] .storage-card-title .pokemon-rarity.compact {
  min-height:25px !important;
  padding:4px 9px !important;
  font-size:12px !important;
}
.screen-modal[data-modal-view="equipe"] .storage-card-actions,
.screen-modal[data-modal-view="equipe"] .storage-card-actions .button,
.screen-modal[data-modal-view="equipe"] .storage-sale-protected-note {
  min-height:24px !important;
}
.screen-modal[data-modal-view="equipe"] .storage-card-actions .button { padding:3px 8px !important; }
.screen-modal[data-modal-view="equipe"] .storage-card-actions .storage-add-team-button {
  min-height:24px !important;
}
@media (max-width:620px) {
  .screen-modal[data-modal-view="equipe"] .storage-card { min-height:150px !important; }
  .screen-modal[data-modal-view="equipe"] .storage-card-art,
  .screen-modal[data-modal-view="equipe"] .storage-card-art img { width:74px !important; height:74px !important; }
}

/* The PC status sheet keeps the same layout as the team status sheet. */
.pokemon-status-modal.is-storage-copy .pokemon-status-action-buttons {
  display:flex;
  align-items:center;
  justify-content:flex-start;
  flex-wrap:wrap;
  gap:8px;
}
.pokemon-status-modal.is-storage-copy .pokemon-status-sale-value,
.pokemon-status-modal.is-storage-copy .pokemon-status-protected {
  display:inline-flex;
  align-items:center;
  width:auto;
  min-height:38px;
  margin:0;
  padding:7px 11px;
  border:1px solid rgba(126,194,209,.22);
  border-radius:9px;
  color:#bdc9db;
  background:rgba(13,25,41,.76);
  font-size:12px !important;
  line-height:1.35;
}
.pokemon-status-modal.is-storage-copy .pokemon-status-sale-value strong { margin-left:4px; color:#9ae1d3; }
.pokemon-status-modal.is-storage-copy .pokemon-status-action-buttons .button { min-height:40px; }
@media (max-width:620px) {
  .pokemon-status-modal.is-storage-copy .pokemon-status-action-buttons { gap:7px; }
  .pokemon-status-modal.is-storage-copy .pokemon-status-sale-value,
  .pokemon-status-modal.is-storage-copy .pokemon-status-protected { min-height:34px; font-size:11px !important; }
}
/* Trainer Arena: concise lineup cards and a focused team setup dialog. */
body.adventure-mode .pvp-team-config-panel { gap:9px; padding:12px; }
body.adventure-mode .pvp-team-config-panel > header { margin:0; }
body.adventure-mode .pvp-team-config-panel > header p { max-width:560px; }
body.adventure-mode .pvp-lineup-summaries { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; }
body.adventure-mode .pvp-lineup-summary { min-width:0; display:grid; gap:7px; padding:9px; border:1px solid rgba(116,210,227,.17); border-radius:11px; background:rgba(3,14,24,.35); }
body.adventure-mode .pvp-lineup-summary > header { display:flex; align-items:center; justify-content:space-between; gap:8px; margin:0; }
body.adventure-mode .pvp-lineup-summary h3 { margin:3px 0 0; color:#e2edf0; font-size:12px; }
body.adventure-mode .pvp-lineup-summary header p { margin:3px 0 0; color:#91a8b5; font-size:9px; line-height:1.3; }
body.adventure-mode .pvp-config-open { flex:0 0 auto; min-height:31px; padding:0 9px; font-size:9px; }
body.adventure-mode .pvp-lineup-preview-grid { min-width:0; display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:4px; }
body.adventure-mode .pvp-lineup-preview-slot { position:relative; min-width:0; display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:center; gap:0 4px; }
body.adventure-mode .pvp-lineup-position { position:absolute; z-index:2; top:2px; left:4px; width:14px; height:14px; display:grid; place-items:center; border-radius:50%; color:#d9f1ef; background:#193746; font:700 8px 'DM Mono',monospace; }
body.adventure-mode .pvp-lineup-preview-slot .pvp-pokemon-mini { grid-column:1 / -1; grid-template-columns:34px minmax(0,1fr) auto; gap:5px; min-height:48px; padding:4px 5px; border-radius:8px; }
body.adventure-mode .pvp-lineup-preview-slot .pvp-pokemon-art { width:32px; height:32px; }
body.adventure-mode .pvp-lineup-preview-slot .pvp-pokemon-art img { width:30px; height:30px; }
body.adventure-mode .pvp-lineup-preview-slot .pvp-pokemon-copy { gap:1px; }
body.adventure-mode .pvp-lineup-preview-slot .pvp-pokemon-copy strong { font-size:9px; }
body.adventure-mode .pvp-lineup-preview-slot .pvp-pokemon-copy small { font-size:7px; }
body.adventure-mode .pvp-lineup-preview-slot .pvp-pokemon-moves { display:none; }
body.adventure-mode .pvp-lineup-preview-slot .pvp-pokemon-power { font-size:7px; }
body.adventure-mode .pvp-lineup-ref { grid-column:2; justify-self:end; color:#8199a7; font:7px 'DM Mono',monospace; }
body.adventure-mode .pvp-lineup-empty { grid-column:1 / -1; margin:0; padding:12px; border:1px dashed rgba(151,193,212,.18); border-radius:8px; color:#91a8b5; font-size:10px; text-align:center; }
body.adventure-mode .pvp-config-backdrop { z-index:80; padding:12px; background:rgba(2,8,15,.84); }
body.adventure-mode .pvp-team-config-modal { width:min(1120px,100%); max-width:none; max-height:calc(100dvh - 24px); display:grid; grid-template-rows:auto auto minmax(0,1fr) auto; border:1px solid rgba(116,210,227,.28); border-radius:18px; color:var(--ink); background:linear-gradient(145deg,#17233a,#0d1726); box-shadow:0 24px 80px rgba(0,0,0,.58); }
body.adventure-mode .pvp-config-head { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:13px 16px; border-bottom:1px solid var(--line); background:rgba(45,64,92,.34); }
body.adventure-mode .pvp-config-head h2 { margin:3px 0; color:#f0f4fb; font-size:18px; }
body.adventure-mode .pvp-config-head p { margin:0; color:#9eacc2; font-size:10px; }
body.adventure-mode .pvp-config-tabs { display:flex; gap:6px; padding:8px 12px 0; }
body.adventure-mode .pvp-config-tabs button { min-height:32px; padding:0 14px; border:1px solid var(--line); border-radius:9px; color:#9eacc2; background:#111c2d; font-weight:750; cursor:pointer; }
body.adventure-mode .pvp-config-tabs button.is-active { border-color:rgba(116,210,227,.55); color:#d9fbf6; background:rgba(58,145,157,.28); }
body.adventure-mode .pvp-config-content { min-height:0; overflow:auto; padding:9px 12px; scrollbar-width:thin; scrollbar-color:rgba(116,210,227,.35) transparent; }
body.adventure-mode .pvp-config-notice { display:flex; align-items:center; gap:8px; margin-bottom:8px; padding:7px 9px; border:1px solid rgba(116,210,227,.16); border-radius:8px; color:#b4c6d1; background:rgba(8,23,35,.58); }
body.adventure-mode .pvp-config-notice > span { color:#8ce1d9; font-size:15px; }
body.adventure-mode .pvp-config-notice p { margin:0; font-size:9px; line-height:1.35; }
body.adventure-mode .pvp-config-slots { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:7px; }
body.adventure-mode .pvp-config-slot { min-width:0; display:grid; gap:6px; padding:8px; border:1px solid rgba(151,193,212,.15); border-radius:10px; background:rgba(5,15,26,.62); }
body.adventure-mode .pvp-config-slot.is-shiny { border-color:rgba(242,204,117,.38); background:linear-gradient(135deg,rgba(109,82,38,.17),rgba(5,15,26,.62)); }
body.adventure-mode .pvp-config-slot > header { min-width:0; display:grid; grid-template-columns:32px minmax(0,1fr); align-items:center; gap:2px 7px; }
body.adventure-mode .pvp-config-slot-number { display:none; }
body.adventure-mode .pvp-config-slot-art { grid-row:1 / span 2; width:32px; height:32px; display:grid; place-items:center; overflow:hidden; border-radius:8px; background:rgba(115,157,180,.1); }
body.adventure-mode .pvp-config-slot-art img { width:30px; height:30px; object-fit:contain; image-rendering:pixelated; }
body.adventure-mode .pvp-config-slot-art.is-empty { color:#8297a6; font-size:20px; }
body.adventure-mode .pvp-config-slot > header strong { overflow:hidden; color:#e5eef2; font-size:10px; text-overflow:ellipsis; white-space:nowrap; }
body.adventure-mode .pvp-config-slot > header small { overflow:hidden; color:#8ea5b2; font:8px 'DM Mono',monospace; text-overflow:ellipsis; white-space:nowrap; }
body.adventure-mode .pvp-config-pokemon-field { min-width:0; display:grid; gap:3px; }
body.adventure-mode .pvp-config-pokemon-field > span,.pvp-config-moves > span { color:#94aabc; font:700 8px 'DM Mono',monospace; letter-spacing:.04em; }
body.adventure-mode .pvp-config-pokemon-field input,.pvp-config-move { width:100%; min-width:0; height:29px; padding:0 7px; border:1px solid rgba(151,193,212,.17); border-radius:7px; outline:none; color:#dce9ed; background:#101b2b; font-size:9px; }
body.adventure-mode .pvp-config-pokemon-field input:focus,.pvp-config-move:focus { border-color:rgba(116,210,227,.6); box-shadow:0 0 0 2px rgba(116,210,227,.09); }
body.adventure-mode .pvp-config-moves { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:4px; }
body.adventure-mode .pvp-config-moves > span { grid-column:1 / -1; }
body.adventure-mode .pvp-config-move { height:27px; padding:0 5px; }
body.adventure-mode .pvp-config-move:disabled { opacity:.45; }
body.adventure-mode .pvp-config-foot { display:flex; align-items:center; justify-content:space-between; gap:10px; padding:9px 13px; border-top:1px solid var(--line); background:rgba(8,16,28,.72); }
body.adventure-mode .pvp-config-foot > span { color:#9eacc2; font-size:9px; }
body.adventure-mode .pvp-config-foot .button { flex:0 0 auto; min-height:34px; }
body.adventure-mode .pvp-reserved-badge { display:inline-flex; align-items:center; gap:3px; padding:3px 6px; border:1px solid rgba(242,204,117,.4); border-radius:999px; color:#ffdc8e; background:rgba(113,78,24,.3); font:800 8px 'DM Mono',monospace; }
body.adventure-mode .team-slot.is-pvp-protected,.storage-card.is-pvp-protected { border-color:rgba(242,204,117,.56); }
body.adventure-mode .team-pvp-badge { position:absolute; top:5px; right:5px; z-index:3; }
body.adventure-mode .pokemon-status-pvp-protected { flex-basis:100%; margin:6px 0; padding:8px 10px; border:1px solid rgba(242,204,117,.28); border-radius:8px; color:#f3d68c; background:rgba(113,78,24,.13); font-size:10px; }
@media(max-width:900px) {
  body.adventure-mode .pvp-lineup-summaries { grid-template-columns:1fr; }
  body.adventure-mode .pvp-config-slots { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@media(max-width:560px) {
  body.adventure-mode .pvp-config-backdrop { padding:6px; }
  body.adventure-mode .pvp-team-config-modal { max-height:calc(100dvh - 12px); border-radius:12px; }
  body.adventure-mode .pvp-config-head { padding:9px 10px; }
  body.adventure-mode .pvp-config-head h2 { font-size:15px; }
  body.adventure-mode .pvp-config-tabs { padding:6px 8px 0; }
  body.adventure-mode .pvp-config-content { padding:7px 8px; }
  body.adventure-mode .pvp-config-slots { grid-template-columns:1fr; }
  body.adventure-mode .pvp-config-slot { grid-template-columns:minmax(0,.9fr) minmax(0,1.1fr); align-items:start; }
  body.adventure-mode .pvp-config-slot > header { grid-column:1; }
  body.adventure-mode .pvp-config-pokemon-field,.pvp-config-moves { grid-column:2; }
  body.adventure-mode .pvp-config-moves { grid-row:2 / span 2; }
  body.adventure-mode .pvp-config-foot { align-items:stretch; flex-direction:column; }
  body.adventure-mode .pvp-config-foot .button { width:100%; justify-content:center; }
}


/* Arena: use the full dialog width for both lineups and keep setup content tight. */
body.adventure-mode .pvp-intro { margin-bottom:8px; }
body.adventure-mode .pvp-rating-strip { gap:6px; margin-bottom:8px; }
body.adventure-mode .pvp-rating-strip article { gap:3px; padding:7px 10px; }
body.adventure-mode .pvp-arena-overview { grid-template-columns:minmax(0,1fr); gap:8px; }
body.adventure-mode .pvp-team-config-panel,
body.adventure-mode .pvp-opponents-panel { padding:10px; }
body.adventure-mode .pvp-team-config-panel { gap:8px; }
body.adventure-mode .pvp-team-config-panel > header { margin-bottom:0; }
body.adventure-mode .pvp-team-config-panel > header p { max-width:none; margin-top:3px; font-size:10px; }
body.adventure-mode .pvp-lineup-summaries { grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; }
body.adventure-mode .pvp-lineup-summary { gap:6px; padding:9px; }
body.adventure-mode .pvp-lineup-summary h3 { font-size:13px; }
body.adventure-mode .pvp-lineup-summary header p { font-size:10px; }
body.adventure-mode .pvp-config-open { min-height:34px; padding:0 10px; font-size:10px; }
body.adventure-mode .pvp-lineup-preview-grid { grid-template-columns:repeat(3,minmax(0,1fr)); gap:5px; }
body.adventure-mode .pvp-lineup-preview-slot .pvp-pokemon-mini { grid-template-columns:36px minmax(0,1fr) auto; min-height:48px; padding:4px 6px; }
body.adventure-mode .pvp-lineup-preview-slot .pvp-pokemon-art { width:34px; height:34px; }
body.adventure-mode .pvp-lineup-preview-slot .pvp-pokemon-art img { width:32px; height:32px; }
body.adventure-mode .pvp-lineup-preview-slot .pvp-pokemon-copy strong { font-size:10px; }
body.adventure-mode .pvp-lineup-preview-slot .pvp-pokemon-copy small { font-size:8px; }
body.adventure-mode .pvp-lineup-preview-slot .pvp-pokemon-power { font-size:8px; }
body.adventure-mode .pvp-lineup-ref { font-size:8px; }
body.adventure-mode .pvp-opponents-panel > header { margin-bottom:7px; }
body.adventure-mode .pvp-opponents-grid { grid-template-columns:repeat(3,minmax(0,1fr)); gap:7px; }
body.adventure-mode .pvp-config-backdrop { overflow:auto; }
body.adventure-mode .pvp-team-config-modal { height:auto; min-height:0; grid-template-rows:auto auto minmax(0,auto) auto; overflow:hidden; }
body.adventure-mode .pvp-config-head { padding:10px 13px; }
body.adventure-mode .pvp-config-head h2 { font-size:19px; }
body.adventure-mode .pvp-config-head p { font-size:11px; }
body.adventure-mode .pvp-config-tabs { padding-top:6px; }
body.adventure-mode .pvp-config-content { max-height:calc(100dvh - 178px); padding:8px 12px; }
body.adventure-mode .pvp-config-notice { margin-bottom:7px; padding:7px 9px; }
body.adventure-mode .pvp-config-notice p { font-size:10px; }
body.adventure-mode .pvp-config-slots { gap:7px; }
body.adventure-mode .pvp-config-slot { gap:6px; padding:8px; }
body.adventure-mode .pvp-config-slot > header strong { font-size:11px; }
body.adventure-mode .pvp-config-slot > header small { font-size:9px; }
body.adventure-mode .pvp-config-pokemon-field > span,
body.adventure-mode .pvp-config-moves > span { font-size:9px; }
body.adventure-mode .pvp-config-pokemon-field input,
body.adventure-mode .pvp-config-move { height:31px; font-size:10px; }
body.adventure-mode .pvp-config-move { height:29px; }
body.adventure-mode .pvp-config-foot { padding:8px 12px; }
body.adventure-mode .pvp-config-foot > span { font-size:10px; }
body.adventure-mode .pvp-reserved-badge.is-pvp-order-lock { border-color:rgba(145,174,194,.32); color:#b8c6d6; background:rgba(63,83,106,.3); }
@media(max-width:900px) {
  body.adventure-mode .pvp-lineup-summaries { grid-template-columns:1fr; }
  body.adventure-mode .pvp-lineup-preview-grid { grid-template-columns:repeat(3,minmax(0,1fr)); }
  body.adventure-mode .pvp-opponents-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@media(max-width:560px) {
  body.adventure-mode .pvp-lineup-preview-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  body.adventure-mode .pvp-opponents-grid { grid-template-columns:1fr; }
  body.adventure-mode .pvp-config-backdrop { padding:6px; }
  body.adventure-mode .pvp-team-config-modal { max-height:calc(100dvh - 12px); }
  body.adventure-mode .pvp-config-head { padding:9px 10px; }
  body.adventure-mode .pvp-config-content { max-height:calc(100dvh - 164px); padding:7px 8px; }
  body.adventure-mode .pvp-config-slots { grid-template-columns:1fr; }
  body.adventure-mode .pvp-config-slot { grid-template-columns:minmax(0,.9fr) minmax(0,1.1fr); align-items:start; }
  body.adventure-mode .pvp-config-slot > header { grid-column:1; }
  body.adventure-mode .pvp-config-pokemon-field,
  body.adventure-mode .pvp-config-moves { grid-column:2; }
  body.adventure-mode .pvp-config-moves { grid-row:2 / span 2; }
  body.adventure-mode .pvp-config-foot { align-items:stretch; flex-direction:column; }
  body.adventure-mode .pvp-config-foot .button { width:100%; justify-content:center; }
}

body.adventure-mode .pvp-lineup-total { display:block; margin-top:3px; color:#91ddd5; font:700 9px/1.3 "DM Mono",monospace; }


/* Friendly Arena: visible, compact challenges beside the ranked mode. */
body.adventure-mode .pvp-tabs { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); }
body.adventure-mode .pvp-tabs button[data-tab="friendly"] { border-color:rgba(116,210,227,.2); color:#baf0ec; background:rgba(66,154,166,.1); }
body.adventure-mode .pvp-tabs button[data-tab="friendly"].is-active { border-color:rgba(116,210,227,.42); background:linear-gradient(135deg,rgba(66,154,166,.28),rgba(66,154,166,.12)); box-shadow:inset 0 0 0 1px rgba(116,210,227,.08); }
body.adventure-mode .pvp-config-roster-open { width:100%; min-height:34px; display:flex; align-items:center; justify-content:space-between; gap:8px; padding:0 9px; border:1px solid rgba(116,210,227,.24); border-radius:8px; color:#c8e9e5; background:rgba(27,52,67,.78); font-size:10px; font-weight:750; cursor:pointer; }
body.adventure-mode .pvp-config-roster-open:hover { border-color:rgba(116,210,227,.55); background:rgba(37,75,88,.78); }
body.adventure-mode .pvp-config-roster-open > span { color:#8ce1d9; font-size:18px; line-height:1; }
body.adventure-mode .pvp-config-pokemon-actions { min-width:0; display:grid; grid-template-columns:minmax(0,1fr) 34px; gap:5px; }
body.adventure-mode .pvp-config-roster-clear { width:34px; min-height:34px; display:grid; place-items:center; padding:0; border:1px solid rgba(232,133,128,.32); border-radius:8px; color:#f2a7a0; background:rgba(102,43,49,.24); font-size:19px; line-height:1; cursor:pointer; }
body.adventure-mode .pvp-config-roster-clear:hover:not(:disabled) { border-color:rgba(255,148,137,.68); color:#ffe0dc; background:rgba(131,48,54,.5); }
body.adventure-mode .pvp-config-roster-clear:disabled { opacity:.28; cursor:not-allowed; }
body.adventure-mode .pvp-lineup-preview-slot.is-empty { min-height:48px; }
body.adventure-mode .pvp-lineup-empty-slot { grid-column:1/-1; min-height:48px; display:grid; place-items:center; border:1px dashed rgba(151,193,212,.17); border-radius:8px; color:#718998; background:rgba(5,15,26,.22); font:700 8px 'DM Mono',monospace; }
body.adventure-mode .pvp-roster-picker-backdrop { z-index:90; padding:12px; background:rgba(2,8,15,.88); }
body.adventure-mode .pvp-roster-picker-modal { width:min(690px,100%); max-height:min(86dvh,760px); display:grid; grid-template-rows:auto auto auto minmax(0,1fr) auto; overflow:hidden; border:1px solid rgba(116,210,227,.33); border-radius:15px; background:linear-gradient(145deg,#17233a,#0b1422); box-shadow:0 24px 80px rgba(0,0,0,.58); }
body.adventure-mode .pvp-roster-picker-head { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:13px 16px; border-bottom:1px solid var(--line); }
body.adventure-mode .pvp-roster-picker-head h2 { margin:4px 0 2px; color:#edf4f7; font-size:18px; }
body.adventure-mode .pvp-roster-picker-head p { margin:0; color:#98adba; font-size:11px; }
body.adventure-mode .pvp-roster-picker-search { min-width:0; display:flex; align-items:center; gap:9px; margin:10px 12px; padding:0 11px; border:1px solid rgba(116,210,227,.28); border-radius:9px; color:#8ce1d9; background:#0c1726; }
body.adventure-mode .pvp-roster-picker-search > span { font-size:19px; }
body.adventure-mode .pvp-roster-picker-search input { width:100%; height:40px; border:0; outline:0; color:#e5eef2; background:transparent; font-size:13px; }
body.adventure-mode .pvp-roster-picker-filters { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:6px; margin:0 12px 8px; }
body.adventure-mode .pvp-roster-picker-filter { min-width:0; display:grid; gap:3px; color:#9db3bf; font-size:9px; font-weight:700; }
body.adventure-mode .pvp-roster-picker-filter select { width:100%; min-width:0; min-height:34px; padding:5px 7px; border:1px solid rgba(151,193,212,.2); border-radius:7px; color:#e5eef2; background:#101b2b; font-size:10px; }
body.adventure-mode .pvp-roster-picker-list { min-height:0; display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); align-content:start; gap:6px; overflow:auto; padding:0 12px 10px; scrollbar-width:thin; scrollbar-color:rgba(116,210,227,.35) transparent; }
body.adventure-mode .pvp-roster-picker-row { min-width:0; min-height:58px; display:grid; grid-template-columns:42px minmax(0,1fr) auto; align-items:center; gap:8px; padding:6px 8px; border:1px solid rgba(151,193,212,.16); border-radius:9px; color:inherit; text-align:left; background:rgba(6,17,29,.78); cursor:pointer; }
body.adventure-mode .pvp-roster-picker-row:hover,.pvp-roster-picker-row.is-selected { border-color:rgba(116,210,227,.55); background:rgba(38,87,96,.38); }
body.adventure-mode .pvp-roster-picker-row.is-shiny { border-color:rgba(242,204,117,.38); }
body.adventure-mode .pvp-roster-picker-row:disabled { opacity:.42; cursor:not-allowed; }
body.adventure-mode .pvp-roster-picker-art { width:42px; height:42px; display:grid; place-items:center; overflow:hidden; border-radius:8px; background:rgba(115,157,180,.1); }
body.adventure-mode .pvp-roster-picker-art img { width:40px; height:40px; object-fit:contain; image-rendering:pixelated; }
body.adventure-mode .pvp-roster-picker-copy { min-width:0; display:grid; gap:4px; }
body.adventure-mode .pvp-roster-picker-copy strong { overflow:hidden; color:#e8f1f4; font-size:12px; text-overflow:ellipsis; white-space:nowrap; }
body.adventure-mode .pvp-roster-picker-copy small { color:#afbfcb; font-size:10px; }
body.adventure-mode .pvp-roster-picker-copy .pvp-roster-picker-stats { color:#8fe2d4; font:700 9px 'DM Mono',monospace; }
body.adventure-mode .pvp-roster-picker-used { color:#9ae1d3; font-size:9px; text-align:right; }
body.adventure-mode .pvp-roster-picker-empty { grid-column:1/-1; margin:0; padding:18px; border:1px dashed rgba(151,193,212,.2); border-radius:9px; color:#9aafbd; font-size:12px; text-align:center; }
body.adventure-mode .pvp-roster-picker-modal > footer { display:flex; align-items:center; justify-content:space-between; gap:8px; padding:8px 13px; border-top:1px solid var(--line); color:#91a8b5; font:10px 'DM Mono',monospace; }
body.adventure-mode .pvp-roster-picker-modal > footer .button { min-height:30px; padding:5px 9px; font-size:10px; white-space:nowrap; }
body.adventure-mode .pvp-friendly-feedback { margin:2px 0 0; padding:8px 10px; border:1px solid rgba(255,122,122,.28); border-radius:8px; color:#ffb4ac; background:rgba(95,34,39,.23); font-size:11px; line-height:1.45; }
@media(max-width:560px) {
  body.adventure-mode .pvp-roster-picker-backdrop { padding:6px; }
  body.adventure-mode .pvp-roster-picker-modal { max-height:90vh; max-height:90dvh; }
  body.adventure-mode .pvp-roster-picker-head { padding:10px; }
  body.adventure-mode .pvp-roster-picker-head h2 { font-size:16px; }
  body.adventure-mode .pvp-roster-picker-head p { font-size:10px; }
  body.adventure-mode .pvp-roster-picker-list { grid-template-columns:1fr; padding-right:8px; padding-left:8px; }
  body.adventure-mode .pvp-roster-picker-search { margin:8px; }
  body.adventure-mode .pvp-roster-picker-filters { grid-template-columns:repeat(2,minmax(0,1fr)); gap:5px; margin:0 8px 7px; }
  body.adventure-mode .pvp-roster-picker-filter select { min-height:36px; font-size:11px; }
  body.adventure-mode .pvp-roster-picker-modal > footer { padding:7px 9px; font-size:9px; }
  body.adventure-mode .pvp-roster-picker-modal > footer .button { min-height:32px; padding:5px 7px; font-size:9px; }
}
body.adventure-mode .pvp-friendly-layout { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); align-items:start; gap:9px; }
body.adventure-mode .pvp-friendly-panel { min-width:0; padding:11px; border:1px solid var(--line); border-radius:13px; background:linear-gradient(145deg,rgba(18,34,50,.92),rgba(10,23,36,.94)); }
body.adventure-mode .pvp-friendly-panel > header { display:flex; align-items:center; justify-content:space-between; gap:8px; margin-bottom:8px; }
body.adventure-mode .pvp-friendly-panel h3 { margin:4px 0 0; color:#e5eef2; font-size:13px; }
body.adventure-mode .pvp-friendly-panel header p { margin:4px 0 0; color:#9aafbd; font-size:10px; line-height:1.45; }
body.adventure-mode .pvp-friendly-search { display:grid; gap:6px; }
body.adventure-mode .pvp-friendly-search label { color:#b7c7d5; font-size:11px; font-weight:700; }
body.adventure-mode .pvp-friendly-search > div { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:7px; }
body.adventure-mode .pvp-friendly-search input { min-width:0; height:39px; padding:0 11px; border:1px solid rgba(151,193,212,.22); border-radius:9px; color:#e5eef2; background:#101b2b; font-size:12px; }
body.adventure-mode .pvp-friendly-search .button { min-height:39px; white-space:nowrap; }
body.adventure-mode .pvp-friendly-online-count { flex:none; padding:5px 8px; border:1px solid rgba(116,210,227,.18); border-radius:99px; color:#9ae1d3; font:700 9px 'DM Mono',monospace; }
body.adventure-mode .pvp-friendly-players,
body.adventure-mode .pvp-friendly-requests { display:grid; gap:6px; }
body.adventure-mode .pvp-friendly-player,
body.adventure-mode .pvp-friendly-request { min-width:0; display:grid; grid-template-columns:10px minmax(0,1fr) auto; align-items:center; gap:8px; padding:8px 9px; border:1px solid rgba(151,193,212,.14); border-radius:9px; background:rgba(5,16,26,.48); }
body.adventure-mode .pvp-friendly-request { grid-template-columns:24px minmax(0,1fr) auto; }
body.adventure-mode .pvp-friendly-online-dot { width:8px; height:8px; border-radius:50%; background:#6ee1b7; box-shadow:0 0 8px rgba(110,225,183,.48); }
body.adventure-mode .pvp-friendly-request-icon { width:24px; height:24px; display:grid; place-items:center; border-radius:7px; color:#a4e9df; background:rgba(69,151,167,.17); }
body.adventure-mode .pvp-friendly-player > div,
body.adventure-mode .pvp-friendly-request > div { min-width:0; display:grid; gap:3px; }
body.adventure-mode .pvp-friendly-player strong,
body.adventure-mode .pvp-friendly-request strong { overflow:hidden; color:#e2edf0; font-size:11px; text-overflow:ellipsis; white-space:nowrap; }
body.adventure-mode .pvp-friendly-player small,
body.adventure-mode .pvp-friendly-request small { color:#93a9b6; font-size:9px; line-height:1.35; }
body.adventure-mode .pvp-friendly-request-actions { display:flex; flex-wrap:wrap; gap:5px; }
body.adventure-mode .pvp-friendly-request-actions .button,
body.adventure-mode .pvp-friendly-player .button,
body.adventure-mode .pvp-friendly-request > .button { min-height:30px; padding:0 9px; font-size:9px; }
body.adventure-mode .pvp-friendly-empty { margin:0; padding:11px; border:1px dashed rgba(151,193,212,.18); border-radius:9px; color:#92a7b3; font-size:10px; line-height:1.45; }
body.adventure-mode .pvp-friendly-invite-backdrop { z-index:60; padding:12px; background:rgba(2,8,15,.82); }
body.adventure-mode .pvp-friendly-invite-modal { width:min(480px,100%); padding:16px; border:1px solid rgba(116,210,227,.3); border-radius:16px; color:var(--ink); background:linear-gradient(145deg,#17233a,#0d1726); box-shadow:0 24px 80px rgba(0,0,0,.58); }
body.adventure-mode .pvp-friendly-invite-modal > header { display:flex; align-items:center; justify-content:space-between; }
body.adventure-mode .pvp-friendly-invite-body { display:grid; justify-items:center; gap:8px; padding:10px 8px 14px; text-align:center; }
body.adventure-mode .pvp-friendly-invite-icon { width:44px; height:44px; display:grid; place-items:center; border:1px solid rgba(116,210,227,.24); border-radius:13px; color:#a4e9df; background:rgba(69,151,167,.17); font-size:21px; }
body.adventure-mode .pvp-friendly-invite-body h2 { margin:0; color:#edf4f7; font-size:19px; }
body.adventure-mode .pvp-friendly-invite-body p { max-width:400px; margin:0; color:#adbdc9; font-size:12px; line-height:1.5; }
body.adventure-mode .pvp-friendly-invite-body small { color:#91a8b5; font-size:10px; }
body.adventure-mode .pvp-friendly-invite-modal > footer { display:flex; justify-content:flex-end; gap:7px; padding-top:10px; border-top:1px solid var(--line); }
@media(max-width:900px) {
  body.adventure-mode .pvp-friendly-layout { grid-template-columns:1fr; }
}
@media(max-width:560px) {
  body.adventure-mode .pvp-tabs { gap:3px; padding:3px; }
  body.adventure-mode .pvp-tabs button { min-width:0; gap:3px; padding:7px 3px; font-size:8px; }
  body.adventure-mode .pvp-friendly-panel { padding:9px; }
  body.adventure-mode .pvp-friendly-search > div { grid-template-columns:1fr; }
  body.adventure-mode .pvp-friendly-search .button { width:100%; justify-content:center; }
  body.adventure-mode .pvp-friendly-request { grid-template-columns:22px minmax(0,1fr); }
  body.adventure-mode .pvp-friendly-request-actions,
  body.adventure-mode .pvp-friendly-request > .button { grid-column:2; justify-self:start; }
  body.adventure-mode .pvp-friendly-invite-modal { padding:12px; }
  body.adventure-mode .pvp-friendly-invite-modal > footer { display:grid; grid-template-columns:1fr 1fr; }
}
/* Arena: estádio 2D com campo e seis unidades simultâneas por lado. */
body.adventure-mode .pvp-replay-panel > header { align-items:center; }
body.adventure-mode .pvp-battle-stage.pvp-stadium {
  position:relative;
  display:block;
  padding:0;
  grid-template-columns:none;
  align-items:stretch;
  min-height:510px;
  margin:14px 0 12px;
  overflow:hidden;
  isolation:isolate;
  border:1px solid rgba(171,209,232,.3);
  border-radius:18px;
  background-color:#10273a;
  background-image:linear-gradient(180deg,rgba(5,13,23,.12),rgba(5,13,23,0) 34%,rgba(5,13,23,.08)),url("assets/maps/arenas/pvp-stadium.png");
  background-position:center;
  background-size:cover;
  background-repeat:no-repeat;
  box-shadow:inset 0 0 45px rgba(1,8,19,.42),0 12px 28px rgba(0,0,0,.22);
}
body.adventure-mode .pvp-stadium-crowd {
  display:none;
  position:absolute;inset:0 0 auto;height:28%;z-index:-1;
  background:
    radial-gradient(circle,rgba(255,215,140,.55) 0 1px,transparent 2px) 0 0/15px 13px,
    radial-gradient(circle,rgba(98,207,215,.43) 0 1px,transparent 2px) 7px 6px/17px 15px,
    linear-gradient(180deg,#27344d 0%,#17243a 66%,#101b2d 100%);
  mask-image:linear-gradient(#000 0%,#000 70%,transparent 100%);
}
body.adventure-mode .pvp-stadium-roof { display:none; }
body.adventure-mode .pvp-stadium-board {
  position:absolute;z-index:5;top:17px;left:50%;width:min(82%,700px);min-height:62px;
  display:grid;grid-template-columns:minmax(0,1fr) minmax(170px,.85fr) minmax(0,1fr);align-items:center;gap:12px;
  padding:8px 14px;border:1px solid rgba(238,207,133,.5);border-radius:12px;
  background:linear-gradient(145deg,rgba(12,22,37,.97),rgba(21,35,49,.95));
  box-shadow:0 6px 20px rgba(0,0,0,.35);transform:translateX(-50%);
}
body.adventure-mode .pvp-stadium-team { min-width:0;display:grid;gap:2px; }
body.adventure-mode .pvp-stadium-team.is-away { text-align:right; }
body.adventure-mode .pvp-stadium-team small,body.adventure-mode .pvp-stadium-team > span { color:#91a7b4;font:700 8px 'DM Mono',monospace;letter-spacing:.08em; }
body.adventure-mode .pvp-stadium-team strong { overflow:hidden;color:#edf5f7;font-size:clamp(10px,1.3vw,15px);text-overflow:ellipsis;white-space:nowrap; }
body.adventure-mode .pvp-stadium-team.is-home small { color:#f2a68c; }
body.adventure-mode .pvp-stadium-team.is-away small { color:#8ed7ec; }
body.adventure-mode .pvp-stadium-team > span { font-size:7px; }
body.adventure-mode .pvp-battle-stage.pvp-stadium .pvp-battle-center { min-width:0;display:grid;justify-items:center;gap:3px;padding:0 6px;text-align:center; }
body.adventure-mode .pvp-battle-stage.pvp-stadium .pvp-battle-center > span { color:#f1cc79;font-size:16px;text-shadow:0 0 12px rgba(241,204,121,.55); }
body.adventure-mode .pvp-battle-stage.pvp-stadium .pvp-battle-status { color:#bce9e7;font-size:9px;line-height:1.2; }
body.adventure-mode .pvp-battle-stage.pvp-stadium .pvp-battle-action { min-height:12px;overflow:hidden;color:#9bb0bd;font-size:7px;line-height:1.25;text-overflow:ellipsis;white-space:nowrap; }
body.adventure-mode .pvp-battle-stage.pvp-stadium .pvp-battle-progress { width:100%;height:3px;overflow:hidden;border-radius:99px;background:rgba(0,0,0,.5); }
body.adventure-mode .pvp-battle-stage.pvp-stadium .pvp-battle-progress > b { height:100%;display:block;border-radius:inherit;background:linear-gradient(90deg,#72d8c8,#f3cf78);transition:width .18s linear; }
body.adventure-mode .pvp-stadium-pitch {
  position:absolute;inset:24% 4% 5%;overflow:hidden;border:0;border-radius:0;background:transparent;box-shadow:none;
}
body.adventure-mode .pvp-field-boundary,body.adventure-mode .pvp-field-midline,body.adventure-mode .pvp-field-circle,body.adventure-mode .pvp-field-spot { display:none; }
body.adventure-mode .pvp-stadium-pitch::before,body.adventure-mode .pvp-stadium-pitch::after { display:none; }
body.adventure-mode .pvp-battle-side { position:absolute;inset:0;z-index:auto;pointer-events:none; }
body.adventure-mode .pvp-battle-unit {
  position:absolute;left:var(--unit-x);top:var(--unit-y);width:clamp(64px,9vw,104px);min-width:0;
  display:grid;justify-items:center;gap:1px;overflow:visible;padding:0;border:0;border-radius:0;background:transparent;
  transform:translate(-50%,-50%);transition:left var(--step-duration,250ms) linear,top var(--step-duration,250ms) linear,filter .2s,opacity .25s;
}
body.adventure-mode .pvp-battle-unit.is-active { z-index:20!important;filter:drop-shadow(0 0 8px rgba(255,232,154,.9));box-shadow:none;transform:translate(-50%,-50%); }
body.adventure-mode .pvp-battle-unit.is-attacking { z-index:21!important; }
body.adventure-mode .pvp-battle-unit.is-hit { animation:pvp-stadium-hit .28s ease-in-out 2; }
body.adventure-mode .pvp-battle-unit.is-fainted { z-index:7;pointer-events:none;filter:grayscale(1);animation:pvp-stadium-faint-exit .62s ease-in forwards; }
body.adventure-mode .pvp-battle-unit.is-fainted-final { animation:none;opacity:0;visibility:hidden;transform:translate(-50%,calc(-50% + 30px)) scale(.45);filter:grayscale(1); }
body.adventure-mode .pvp-battle-unit.is-attacking { animation:pvp-stadium-lunge .48s cubic-bezier(.25,.75,.35,1); }
body.adventure-mode .pvp-battle-unit.is-moving { z-index:19!important; }
body.adventure-mode .pvp-battle-nameplate { width:100%;display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:2px 4px;padding:3px 5px 2px;border:1px solid rgba(210,235,238,.3);border-radius:6px;background:rgba(7,16,27,.86);box-shadow:0 2px 6px rgba(0,0,0,.24); }
body.adventure-mode .pvp-battle-nameplate > strong { min-width:0;overflow:hidden;color:#f0f5eb;font-size:8px;text-overflow:ellipsis;white-space:nowrap;text-shadow:0 1px 2px #102019; }
body.adventure-mode .pvp-battle-nameplate > small { color:#d2dfd9;font:700 7px 'DM Mono',monospace; }
body.adventure-mode .pvp-battle-hp { grid-column:1/-1;width:100%;height:4px;overflow:hidden;border-radius:99px;background:#10171d; }
body.adventure-mode .pvp-battle-hp > b { height:100%;display:block;border-radius:inherit;background:linear-gradient(90deg,#ee796b,#8be0a9);transition:width .25s; }
body.adventure-mode .pvp-battle-unit.is-hit .pvp-battle-hp > b { background:#ff987e; }
body.adventure-mode .pvp-battle-hp-text { grid-column:1/-1;color:#b8c9c3;font:6px 'DM Mono',monospace;text-align:right; }
body.adventure-mode .pvp-battle-art { position:relative;width:70px;height:62px;display:grid;place-items:end center;transform-origin:50% 100%;animation:pvp-stadium-idle 1.8s ease-in-out infinite; }
body.adventure-mode .pvp-battle-art img { position:relative;z-index:1;width:64px;height:58px;object-fit:contain;image-rendering:pixelated;filter:drop-shadow(0 2px 1px rgba(0,0,0,.38)); }
body.adventure-mode .pvp-battle-unit[data-pvp-facing="west"] .pvp-battle-art img { transform:scaleX(-1); }
body.adventure-mode .pvp-battle-unit[data-pvp-facing="east"] .pvp-battle-art img { transform:none; }
body.adventure-mode .pvp-battle-unit.is-moving .pvp-battle-art { animation:pvp-stadium-run .22s steps(2,end) infinite; }
body.adventure-mode .pvp-battle-shadow { position:absolute;bottom:1px;left:50%;width:44px;height:9px;border-radius:50%;background:rgba(4,20,14,.4);filter:blur(2px);transform:translateX(-50%); }
body.adventure-mode .pvp-battle-damage { position:absolute;left:50%;top:0;z-index:4;opacity:0;color:#ffe19a;font:900 10px 'DM Mono',monospace;text-shadow:0 1px 4px #000,0 0 6px #e7a645;transform:translate(-50%,6px);pointer-events:none;white-space:nowrap; }
body.adventure-mode .pvp-battle-damage.is-visible { animation:pvp-battle-damage .7s ease-out forwards; }
body.adventure-mode .pvp-stadium-lights { display:none; }
body.adventure-mode .pvp-stadium-lights i { width:7px;height:7px;border:1px solid rgba(255,242,202,.75);border-radius:50%;background:#fff2c9;box-shadow:0 0 12px 4px rgba(255,238,184,.38); }
@keyframes pvp-stadium-idle { 0%,100% { transform:translateY(0) scale(1); } 50% { transform:translateY(-3px) scale(1.025); } }
@keyframes pvp-stadium-run { 0%,100% { transform:translateY(0) scaleX(1); } 50% { transform:translateY(-2px) scaleX(.96); } }
@keyframes pvp-stadium-lunge { 0%,100% { transform:translate(-50%,-50%); } 45% { transform:translate(calc(-50% + var(--lunge-x,26px)),calc(-50% + var(--lunge-y,0px))) scale(1.06); } }
@keyframes pvp-stadium-hit { 25% { filter:brightness(2.2) drop-shadow(0 0 7px #ffd36e);transform:translate(calc(-50% + 4px),-50%); } 75% { transform:translate(calc(-50% - 4px),-50%); } }
@keyframes pvp-stadium-faint-exit { 0% { opacity:1;transform:translate(-50%,-50%) scale(1); } 22% { opacity:1;filter:brightness(2) grayscale(.3); } 100% { opacity:0;visibility:hidden;transform:translate(-50%,calc(-50% + 30px)) scale(.45);filter:grayscale(1); } }
@media(max-width:700px) {
  body.adventure-mode .pvp-battle-stage.pvp-stadium { min-height:430px; }
  body.adventure-mode .pvp-stadium-board { top:14px;width:92%;grid-template-columns:minmax(0,1fr) minmax(88px,.8fr) minmax(0,1fr);gap:5px;padding:7px; }
  body.adventure-mode .pvp-stadium-team small,body.adventure-mode .pvp-stadium-team > span { font-size:6px; }
  body.adventure-mode .pvp-battle-stage.pvp-stadium .pvp-battle-status { font-size:7px; }
  body.adventure-mode .pvp-battle-stage.pvp-stadium .pvp-battle-action { font-size:6px; }
  body.adventure-mode .pvp-stadium-pitch { inset:26% 2.5% 5%; }
  body.adventure-mode .pvp-battle-unit { width:58px; }
  body.adventure-mode .pvp-battle-nameplate { gap:1px 2px;padding:2px 3px; }
  body.adventure-mode .pvp-battle-nameplate > strong { font-size:7px; }
  body.adventure-mode .pvp-battle-nameplate > small { font-size:6px; }
  body.adventure-mode .pvp-battle-art { width:50px;height:49px; }
  body.adventure-mode .pvp-battle-art img { width:48px;height:46px; }
  body.adventure-mode .pvp-battle-shadow { width:32px;height:7px; }
}
@media(prefers-reduced-motion:reduce) {
  body.adventure-mode .pvp-battle-art { animation:none; }
  body.adventure-mode .pvp-battle-unit.is-attacking,body.adventure-mode .pvp-battle-unit.is-hit,body.adventure-mode .pvp-battle-unit.is-fainted { animation-duration:.01ms; }
  body.adventure-mode .pvp-battle-unit { transition-duration:.01ms; }
}


/* Legendary flight mounts */
.adventure-tool-card .mount-tool-icon { display:grid; place-items:center; color:#9fe5e6; font-size:24px; text-shadow:0 0 12px rgba(106,211,229,.45); }
.mount-modal { width:min(700px,calc(100vw - 28px)); max-height:min(760px,calc(100vh - 36px)); display:grid; grid-template-rows:auto auto minmax(0,1fr); overflow:hidden; }
.mount-modal .adventure-panel-head { padding:18px 20px 14px; }
.mount-modal .adventure-panel-head p { margin:7px 0 0; color:#9cacc1; font-size:11px; line-height:1.5; }
.mount-wallet { display:flex; justify-content:space-between; align-items:center; margin:0 18px; padding:10px 12px; border:1px solid rgba(154,184,214,.16); border-radius:10px; color:#aab8ca; background:rgba(13,25,41,.75); font-size:11px; }
.mount-wallet strong { color:#f4d58b; font:800 13px/1 "DM Mono",monospace; }
.mount-card-list { min-height:0; display:grid; align-content:start; gap:9px; overflow:auto; padding:12px 18px 18px; }
.mount-card { display:grid; grid-template-columns:82px minmax(0,1fr) auto; align-items:center; gap:13px; min-width:0; padding:11px; border:1px solid rgba(154,184,214,.15); border-radius:12px; background:linear-gradient(145deg,rgba(27,43,64,.9),rgba(14,25,41,.96)); }
.mount-card.is-active { border-color:rgba(126,225,215,.55); box-shadow:inset 0 0 0 1px rgba(126,225,215,.15); }
.mount-card-art { position:relative; display:grid; place-items:center; width:82px; height:82px; border:1px solid rgba(154,184,214,.12); border-radius:10px; background:radial-gradient(circle at 50% 60%,rgba(105,165,197,.16),rgba(17,28,44,.35) 68%); }
.mount-card-art img { width:74px; height:74px; object-fit:contain; image-rendering:pixelated; }
.mount-card-art span { position:absolute; right:3px; bottom:1px; color:#c8eff1; font-size:18px; text-shadow:0 1px 4px #09131e; }
.mount-card-art .mount-card-emoji { position:static; right:auto; bottom:auto; color:#d9efff; font-size:40px; text-shadow:none; }
.mount-card-copy { min-width:0; display:grid; gap:4px; }
.mount-card-copy .eyebrow { color:#87bfc5; font-size:8px; letter-spacing:.1em; }
.mount-card-copy h3 { margin:0; color:#eff5fc; font-size:14px; }
.mount-card-copy p { margin:0; color:#9cacc1; font-size:10px; }
.mount-card-copy p strong { color:#d9e7f2; }
.mount-card-status { color:#8bd8cb; font-size:9px; }
.mount-card-action { display:flex; justify-content:flex-end; }
@media (max-width:560px) {
  .mount-modal { width:calc(100vw - 18px); max-height:calc(100vh - 18px); }
  .mount-modal .adventure-panel-head { padding:14px 14px 11px; }
  .mount-wallet { margin:0 12px; }
  .mount-card-list { padding:10px 12px 14px; }
  .mount-card { grid-template-columns:64px minmax(0,1fr); gap:10px; padding:9px; }
  .mount-card-art { width:64px; height:64px; }
  .mount-card-art img { width:58px; height:58px; }
  .mount-card-action { grid-column:2; justify-content:flex-start; }
}


/* PvP uses the same move atlas and canvas renderer as hunt skills. */
body.adventure-mode .pvp-skill-effects-canvas { position:absolute;inset:0;z-index:16;width:100%;height:100%;pointer-events:none; }
body.adventure-mode .pvp-stadium-team.is-my-team small { color:#7de5d1; }
body.adventure-mode .pvp-stadium-team.is-opponent-team small { color:#ffb59e; }
body.adventure-mode .pvp-stadium-team.is-my-team { padding:5px 7px;border:1px solid rgba(105,231,204,.55);border-radius:8px;background:rgba(25,110,96,.18); }
body.adventure-mode .pvp-stadium-team.is-opponent-team { padding:5px 7px;border:1px solid rgba(255,153,128,.55);border-radius:8px;background:rgba(138,63,61,.18); }
body.adventure-mode .pvp-stadium-team small { font-size:9px; }
body.adventure-mode .pvp-stadium-team > span { font-size:8px; }
body.adventure-mode .pvp-battle-unit.is-my-team .pvp-battle-nameplate { border-color:rgba(105,231,204,.88);background:linear-gradient(145deg,rgba(12,53,53,.95),rgba(8,25,36,.93));box-shadow:0 0 10px rgba(81,222,193,.3),0 2px 6px rgba(0,0,0,.35); }
body.adventure-mode .pvp-battle-unit.is-opponent-team .pvp-battle-nameplate { border-color:rgba(255,153,128,.88);background:linear-gradient(145deg,rgba(61,34,43,.96),rgba(25,21,35,.94));box-shadow:0 0 10px rgba(245,127,115,.26),0 2px 6px rgba(0,0,0,.35); }
body.adventure-mode .pvp-battle-owner-tag { grid-column:1/-1;justify-self:center;padding:2px 6px;border:1px solid currentColor;border-radius:99px;font:800 8px/1.25 'DM Mono',monospace;letter-spacing:.06em;text-shadow:0 1px 2px rgba(0,0,0,.7); }
body.adventure-mode .pvp-battle-unit.is-my-team .pvp-battle-owner-tag { color:#86f4d9;background:rgba(19,107,93,.38); }
body.adventure-mode .pvp-battle-unit.is-opponent-team .pvp-battle-owner-tag { color:#ffb39b;background:rgba(138,63,61,.34); }
body.adventure-mode .pvp-battle-unit.is-my-team .pvp-battle-art::after,body.adventure-mode .pvp-battle-unit.is-opponent-team .pvp-battle-art::after { content:"";position:absolute;left:50%;bottom:2px;width:50px;height:12px;border:1px solid currentColor;border-radius:50%;transform:translateX(-50%);pointer-events:none; }
body.adventure-mode .pvp-battle-unit.is-my-team .pvp-battle-art::after { color:rgba(110,235,210,.85);box-shadow:0 0 10px rgba(88,225,199,.32); }
body.adventure-mode .pvp-battle-unit.is-opponent-team .pvp-battle-art::after { color:rgba(255,157,133,.85);box-shadow:0 0 10px rgba(245,133,119,.3); }
body.adventure-mode .pvp-replay-event.is-my-team { border-left-color:rgba(105,231,204,.8); }
body.adventure-mode .pvp-replay-event.is-opponent-team { border-left-color:rgba(255,153,128,.8); }
@media(max-width:700px) {
  body.adventure-mode .pvp-battle-unit.is-my-team .pvp-battle-art::after,body.adventure-mode .pvp-battle-unit.is-opponent-team .pvp-battle-art::after { width:40px;height:10px; }
  body.adventure-mode .pvp-stadium-team.is-my-team,body.adventure-mode .pvp-stadium-team.is-opponent-team { padding:4px; }
  body.adventure-mode .pvp-stadium-team small { font-size:7px; }
  body.adventure-mode .pvp-stadium-team > span { font-size:7px; }
  body.adventure-mode .pvp-battle-owner-tag { font-size:7px;padding:1px 4px; }
}


/* PvP result is shown on the stadium; match events are available in a modal. */
body.adventure-mode .pvp-result-banner {
  position:absolute;left:50%;top:54%;z-index:30;width:min(76%,560px);min-height:190px;
  display:grid;align-content:center;justify-items:center;gap:8px;padding:24px 30px;
  border:2px solid;border-radius:20px;text-align:center;backdrop-filter:blur(8px);
  transform:translate(-50%,-45%) scale(.88);opacity:0;pointer-events:none;
  transition:opacity .35s ease,transform .4s cubic-bezier(.2,.85,.25,1.2);
}
body.adventure-mode .pvp-result-banner[hidden] { display:none!important; }
body.adventure-mode .pvp-result-banner.is-visible { transform:translate(-50%,-50%) scale(1);opacity:1; }
body.adventure-mode .pvp-result-banner.is-victory { border-color:rgba(112,238,181,.92);background:linear-gradient(145deg,rgba(11,71,57,.96),rgba(7,31,39,.96));box-shadow:0 0 0 5px rgba(74,223,159,.13),0 18px 65px rgba(0,0,0,.58),0 0 38px rgba(74,223,159,.32); }
body.adventure-mode .pvp-result-banner.is-defeat { border-color:rgba(255,137,125,.94);background:linear-gradient(145deg,rgba(91,34,44,.97),rgba(36,20,33,.96));box-shadow:0 0 0 5px rgba(245,95,105,.13),0 18px 65px rgba(0,0,0,.58),0 0 38px rgba(245,95,105,.3); }
body.adventure-mode .pvp-result-banner.is-draw { border-color:rgba(148,196,215,.88);background:linear-gradient(145deg,rgba(35,63,79,.97),rgba(21,34,48,.97));box-shadow:0 0 0 5px rgba(128,180,203,.12),0 18px 65px rgba(0,0,0,.58),0 0 32px rgba(128,180,203,.25); }
body.adventure-mode .pvp-result-banner > span { color:#d3e2dd;font:800 11px 'DM Mono',monospace;letter-spacing:.22em; }
body.adventure-mode .pvp-result-banner > strong { font-size:clamp(36px,6vw,64px);font-weight:1000;line-height:1;text-shadow:0 4px 18px rgba(0,0,0,.55); }
body.adventure-mode .pvp-result-banner.is-victory > strong { color:#8af3bc; }
body.adventure-mode .pvp-result-banner.is-defeat > strong { color:#ff9b8c; }
body.adventure-mode .pvp-result-banner.is-draw > strong { color:#c5e7f2; }
body.adventure-mode .pvp-result-banner > p { margin:2px 0 0;color:#f1f5f1;font-size:clamp(14px,2vw,19px);font-weight:800; }
body.adventure-mode .pvp-result-banner > small { color:#d4e2df;font-size:12px;font-weight:700; }
body.adventure-mode .pvp-replay-score { margin-top:8px;color:#9db3be;font:700 9px 'DM Mono',monospace;text-align:right; }
body.adventure-mode .pvp-replay-actions [data-action="pvp-replay-events"] { border-color:rgba(122,219,210,.48);color:#a8f0e5;background:rgba(57,147,143,.15); }
.pvp-events-modal { width:min(900px,calc(100vw - 28px));max-height:min(820px,calc(100vh - 32px));display:grid;grid-template-rows:auto minmax(0,1fr) auto;overflow:hidden; }
.pvp-events-modal > header { display:flex;align-items:center;justify-content:space-between;gap:16px;padding:18px 22px;border-bottom:1px solid rgba(145,178,195,.2);background:linear-gradient(140deg,rgba(35,52,75,.95),rgba(18,31,49,.98)); }
.pvp-events-modal h2 { margin:4px 0;color:#f0f5fb;font-size:22px; }
.pvp-events-modal header p { margin:0;color:#aab8c6;font-size:13px; }
.pvp-events-modal .pvp-events-list { min-height:0;max-height:none;align-content:start;gap:6px;overflow:auto;margin:0;padding:14px 18px; }
.pvp-events-modal .pvp-replay-event { grid-template-columns:58px minmax(110px,.4fr) minmax(0,1fr) auto;gap:10px;padding:10px 12px; }
.pvp-events-modal .pvp-replay-event > span,.pvp-events-modal .pvp-replay-event > i { font-size:10px; }
.pvp-events-modal .pvp-replay-event > strong { font-size:12px; }
.pvp-events-modal .pvp-replay-event > small { font-size:11px; }
.pvp-events-modal .pvp-events-empty { padding:24px;color:#aab8c6;text-align:center; }
.pvp-events-modal .pvp-replay-truncated { margin:0;padding:0 18px 12px; }
@media(max-width:700px) {
  body.adventure-mode .pvp-result-banner { top:54%;width:90%;min-height:145px;gap:6px;padding:18px 14px;border-radius:15px; }
  body.adventure-mode .pvp-result-banner > span { font-size:9px; }
  body.adventure-mode .pvp-result-banner > strong { font-size:clamp(32px,11vw,48px); }
  body.adventure-mode .pvp-result-banner > p { font-size:14px; }
  body.adventure-mode .pvp-result-banner > small { font-size:10px; }
  .pvp-events-modal { width:calc(100vw - 16px);max-height:calc(100vh - 16px); }
  .pvp-events-modal > header { padding:14px; }
  .pvp-events-modal h2 { font-size:19px; }
  .pvp-events-modal header p { font-size:11px; }
  .pvp-events-modal .pvp-events-list { padding:10px; }
  .pvp-events-modal .pvp-replay-event { grid-template-columns:43px minmax(70px,.35fr) minmax(0,1fr);gap:6px;padding:8px; }
  .pvp-events-modal .pvp-replay-event > i { display:none; }
  .pvp-events-modal .pvp-replay-event > span { font-size:8px; }
  .pvp-events-modal .pvp-replay-event > strong { font-size:10px; }
  .pvp-events-modal .pvp-replay-event > small { font-size:9px; }
}


/* Make the 90-second PvP countdown legible and urgent near timeout. */
body.adventure-mode .pvp-battle-stage.pvp-stadium .pvp-battle-status {
  color:#a8f0e4;font:900 clamp(16px,2vw,24px)/1 'DM Mono',monospace;
  letter-spacing:.04em;text-shadow:0 0 14px rgba(97,225,204,.35);
}
body.adventure-mode .pvp-battle-stage.pvp-stadium .pvp-battle-status.is-time-low {
  color:#ff9285;text-shadow:0 0 15px rgba(255,100,87,.58);
}
@media(max-width:700px) {
  body.adventure-mode .pvp-battle-stage.pvp-stadium .pvp-battle-status { font-size:clamp(14px,4vw,18px); }
}

/* Sale locks sit on each Pokémon portrait; IV bands are visual only. */
.storage-card-art { position:relative; }
.pokemon-card-lock-button {
  position:absolute; z-index:8; top:4px; right:4px; width:27px; height:27px;
  display:grid; place-items:center; padding:3px; border:1px solid currentColor; border-radius:8px;
  box-shadow:0 2px 7px rgba(0,0,0,.46); cursor:pointer; touch-action:manipulation;
}
.pokemon-card-lock-button svg { display:block; width:17px; height:17px; fill:none; stroke:currentColor; stroke-width:2; stroke-linecap:round; stroke-linejoin:round; }
.pokemon-card-lock-button.is-open { color:#9ce6b9; border-color:rgba(156,230,185,.68); background:rgba(11,45,34,.94); }
.pokemon-card-lock-button.is-locked { color:#ffd166; border-color:rgba(255,209,102,.78); background:rgba(61,43,14,.96); }
.pokemon-card-lock-button.is-protected { color:#f3d993; border-color:rgba(243,217,147,.72); background:rgba(64,51,20,.94); cursor:not-allowed; }
.pokemon-card-lock-button:hover:not(:disabled) { transform:scale(1.08); filter:brightness(1.16); }
.pokemon-card-lock-button:focus-visible { outline:2px solid #efffbe; outline-offset:2px; }
.team-slot-info > .team-card-lock-button {
  position:relative; top:auto; right:auto; bottom:auto; left:auto; z-index:1;
  width:20px; height:20px; align-self:start; justify-self:start; margin:0 0 1px; padding:2px;
  border-radius:6px; box-shadow:0 1px 4px rgba(0,0,0,.35);
}
.team-slot-info > .team-card-lock-button svg { width:13px; height:13px; }
.screen-modal-content-equipe .team-slot-info > .team-card-lock-button { width:18px; height:18px; margin-bottom:0; padding:2px; }
.screen-modal-content-equipe .team-slot-info > .team-card-lock-button svg { width:12px; height:12px; }
.iv-band { --iv-accent:#c2cedf; color:var(--iv-accent); border-color:color-mix(in srgb,var(--iv-accent) 62%,transparent); background:color-mix(in srgb,var(--iv-accent) 13%,rgba(5,12,24,.9)); }
.iv-band-excellent { --iv-accent:#ffd166; }
.iv-band-high { --iv-accent:#80c8ff; }
.iv-band-good { --iv-accent:#7fe2a2; }
.iv-band-average { --iv-accent:#c2cedf; }
.iv-band-low { --iv-accent:#ffad6f; }
.iv-band-poor { --iv-accent:#ff7b82; }
.screen-modal[data-modal-view="equipe"] .team-slot-level,
.screen-modal[data-modal-view="equipe"] .team-slot-iv {
  min-height:26px !important; display:inline-flex !important; align-items:center !important; gap:5px !important;
  padding:4px 8px !important; border:1px solid rgba(176,198,222,.24) !important; border-radius:8px !important;
  color:#d5e0ed !important; background:rgba(7,14,27,.7) !important; font:700 12px/1.2 "DM Mono",monospace !important;
}
.screen-modal[data-modal-view="equipe"] .team-slot-level b { color:#fff !important; font-size:16px !important; }
.screen-modal[data-modal-view="equipe"] .team-slot-iv.iv-band { color:var(--iv-accent) !important; border-color:color-mix(in srgb,var(--iv-accent) 62%,transparent) !important; background:color-mix(in srgb,var(--iv-accent) 13%,rgba(5,12,24,.9)) !important; }
.screen-modal[data-modal-view="equipe"] .team-slot-iv b { color:var(--iv-accent) !important; font-size:15px !important; }
.screen-modal[data-modal-view="equipe"] .storage-card-stats { display:flex !important; align-items:center !important; flex-wrap:wrap !important; gap:7px !important; font:700 12px/1.2 "DM Mono",monospace !important; }
.screen-modal[data-modal-view="equipe"] .storage-card-level,
.screen-modal[data-modal-view="equipe"] .storage-card-iv {
  min-height:26px !important; display:inline-flex !important; align-items:center !important; gap:5px !important;
  padding:4px 8px !important; border:1px solid rgba(176,198,222,.24) !important; border-radius:8px !important;
  color:#d5e0ed !important; background:rgba(7,14,27,.7) !important; font:700 12px/1.2 "DM Mono",monospace !important;
}
.screen-modal[data-modal-view="equipe"] .storage-card-level b { color:#fff !important; font-size:15px !important; }
.screen-modal[data-modal-view="equipe"] .storage-card-iv.iv-band { color:var(--iv-accent) !important; border-color:color-mix(in srgb,var(--iv-accent) 62%,transparent) !important; background:color-mix(in srgb,var(--iv-accent) 13%,rgba(5,12,24,.9)) !important; }
.screen-modal[data-modal-view="equipe"] .storage-card-iv.iv-band b { color:var(--iv-accent) !important; font-size:14px !important; }
@media(max-width:560px) {
  .pokemon-card-lock-button { width:24px; height:24px; }
  .pokemon-card-lock-button svg { width:15px; height:15px; }
  .screen-modal[data-modal-view="equipe"] .team-slot-level,
  .screen-modal[data-modal-view="equipe"] .team-slot-iv,
  .screen-modal[data-modal-view="equipe"] .storage-card-level,
  .screen-modal[data-modal-view="equipe"] .storage-card-iv { min-height:25px !important; padding:4px 7px !important; font-size:11px !important; }
  .screen-modal[data-modal-view="equipe"] .team-slot-level b { font-size:15px !important; }
  .screen-modal[data-modal-view="equipe"] .team-slot-iv b,
  .screen-modal[data-modal-view="equipe"] .storage-card-level b { font-size:14px !important; }
  .screen-modal[data-modal-view="equipe"] .storage-card-iv.iv-band b { font-size:13px !important; }
}


/* Clear manual and automatic sale-lock state on PC copies. */
.storage-lock-state { display:inline-flex; align-items:center; gap:4px; width:max-content; max-width:100%; min-height:19px; padding:3px 6px; border:1px solid currentColor; border-radius:999px; font:700 8px/1.1 Inter,"Segoe UI",sans-serif; white-space:nowrap; }
.storage-lock-state svg { width:13px; height:13px; flex:0 0 13px; fill:none; stroke:currentColor; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; }
.storage-lock-state.is-locked { color:#f1bf78; background:rgba(113,74,30,.22); border-color:rgba(241,191,120,.35); }
.storage-lock-state.is-open { color:#8fe0b2; background:rgba(39,104,73,.2); border-color:rgba(143,224,178,.3); }
.storage-lock-state.is-protected { color:#f3d993; background:rgba(107,83,31,.2); border-color:rgba(243,217,147,.32); }
.storage-copy-meta > .storage-lock-state { font-size:8px; }
.storage-card-copy > .storage-lock-state { justify-self:start; }
.screen-modal-content-equipe .storage-card-copy > .storage-lock-state { grid-column:1/-1; }


/* Compact PC cards with the IV sum visible for each individual copy. */
.screen-modal[data-modal-view="equipe"] .storage-grid {
  grid-template-columns:repeat(auto-fill,minmax(190px,1fr)) !important;
  align-items:stretch;
  gap:7px !important;
}
.screen-modal[data-modal-view="equipe"] .storage-card {
  position:relative;
  min-height:92px !important;
  display:grid !important;
  grid-template-columns:54px minmax(0,1fr) !important;
  grid-template-rows:minmax(0,1fr) !important;
  justify-items:stretch !important;
  align-items:center !important;
  gap:5px 7px !important;
  padding:6px !important;
  border-radius:10px !important;
}
.screen-modal[data-modal-view="equipe"] .storage-card-art {
  grid-column:1 !important;
  grid-row:1 !important;
  width:54px !important;
  height:54px !important;
}
.screen-modal[data-modal-view="equipe"] .storage-card-art img {
  width:52px !important;
  height:52px !important;
}
.screen-modal[data-modal-view="equipe"] .storage-card-copy {
  grid-column:2 !important;
  grid-row:1 !important;
  display:grid !important;
  grid-template-columns:minmax(0,1fr) !important;
  grid-template-rows:auto auto auto auto auto !important;
  justify-items:start !important;
  align-content:center !important;
  align-items:center !important;
  gap:3px !important;
  width:100% !important;
  min-width:0 !important;
  padding:0 !important;
  text-align:left !important;
}
.screen-modal[data-modal-view="equipe"] .storage-card-title {
  grid-column:1 !important;
  grid-row:1 !important;
  display:grid !important;
  grid-template-columns:minmax(0,1fr) auto !important;
  align-items:center !important;
  justify-items:stretch !important;
  gap:3px !important;
  width:100% !important;
  min-width:0 !important;
}
.screen-modal[data-modal-view="equipe"] .storage-card-title strong {
  min-width:0 !important;
  overflow:hidden !important;
  font-size:10px !important;
  line-height:1.15 !important;
  text-overflow:ellipsis !important;
  white-space:nowrap !important;
}
.screen-modal[data-modal-view="equipe"] .storage-card-title .pokemon-rarity.compact {
  min-height:17px !important;
  margin:0 !important;
  padding:2px 4px !important;
  font-size:8px !important;
  line-height:1 !important;
}
.screen-modal[data-modal-view="equipe"] .storage-card-stats {
  grid-column:1 !important;
  grid-row:2 !important;
  display:flex !important;
  align-items:center !important;
  flex-wrap:nowrap !important;
  gap:9px !important;
  min-width:0 !important;
  color:#b7c5d6 !important;
  font:700 8px/1.2 "DM Mono",monospace !important;
  white-space:nowrap !important;
}
.screen-modal[data-modal-view="equipe"] .storage-card-level,
.screen-modal[data-modal-view="equipe"] .storage-card-iv {
  min-height:0 !important;
  display:inline-flex !important;
  align-items:center !important;
  gap:3px !important;
  margin:0 !important;
  padding:0 !important;
  border:0 !important;
  border-radius:0 !important;
  color:#b7c5d6 !important;
  background:transparent !important;
  font:inherit !important;
}
.screen-modal[data-modal-view="equipe"] .storage-card-level b,
.screen-modal[data-modal-view="equipe"] .storage-card-iv b { color:#f0f5fc !important; font-size:9px !important; }
.screen-modal[data-modal-view="equipe"] .storage-card-copy > .storage-lock-state {
  grid-column:1 !important;
  grid-row:3 !important;
  justify-self:start !important;
  min-height:16px !important;
  gap:3px !important;
  padding:2px 4px !important;
  font-size:7px !important;
}
.screen-modal[data-modal-view="equipe"] .storage-card-copy > .storage-lock-state svg {
  width:11px !important;
  height:11px !important;
  flex-basis:11px !important;
}
.screen-modal[data-modal-view="equipe"] .storage-card-copy > .pvp-reserved-badge {
  grid-column:1 !important;
  grid-row:4 !important;
  min-height:14px !important;
  padding:1px 4px !important;
  font-size:7px !important;
}
.screen-modal[data-modal-view="equipe"] .storage-card-actions {
  grid-column:1 !important;
  grid-row:5 !important;
  display:flex !important;
  align-items:center !important;
  justify-content:flex-start !important;
  gap:4px !important;
  width:100% !important;
  min-height:22px !important;
  margin:0 !important;
}
.screen-modal[data-modal-view="equipe"] .storage-card-actions .button,
.screen-modal[data-modal-view="equipe"] .storage-sale-protected-note {
  min-width:0 !important;
  min-height:22px !important;
  padding:3px 6px !important;
  font-size:8px !important;
}
.screen-modal[data-modal-view="equipe"] .storage-card-actions .storage-add-team-button {
  flex:0 0 24px !important;
  width:24px !important;
  min-width:24px !important;
  min-height:22px !important;
  padding:0 !important;
}
@media (max-width:620px) {
  .screen-modal[data-modal-view="equipe"] .storage-grid { grid-template-columns:repeat(2,minmax(0,1fr)) !important; gap:6px !important; }
  .screen-modal[data-modal-view="equipe"] .storage-card { min-height:86px !important; grid-template-columns:46px minmax(0,1fr) !important; gap:4px 5px !important; padding:5px !important; }
  .screen-modal[data-modal-view="equipe"] .storage-card-art { width:46px !important; height:46px !important; }
  .screen-modal[data-modal-view="equipe"] .storage-card-art img { width:44px !important; height:44px !important; }
  .screen-modal[data-modal-view="equipe"] .storage-card-title strong { font-size:9px !important; }
  .screen-modal[data-modal-view="equipe"] .storage-card-title .pokemon-rarity.compact { padding:2px 3px !important; font-size:7px !important; }
  .screen-modal[data-modal-view="equipe"] .storage-card-stats { gap:6px !important; font-size:7px !important; }
  .screen-modal[data-modal-view="equipe"] .storage-card-level b,
  .screen-modal[data-modal-view="equipe"] .storage-card-iv b { font-size:8px !important; }
  .screen-modal[data-modal-view="equipe"] .storage-card-copy > .storage-lock-state { gap:2px !important; padding:2px 3px !important; font-size:6px !important; }
  .screen-modal[data-modal-view="equipe"] .storage-card-copy > .storage-lock-state svg { width:10px !important; height:10px !important; flex-basis:10px !important; }
  .screen-modal[data-modal-view="equipe"] .storage-card-actions .button,
  .screen-modal[data-modal-view="equipe"] .storage-sale-protected-note { min-height:20px !important; padding:2px 4px !important; font-size:7px !important; }
}

.pokemon-status-capture-record {
  grid-column:1/-1;
  display:grid;
  gap:9px;
  margin:0 20px 14px;
  padding:12px;
  border:1px solid rgba(169,190,224,.16);
  border-radius:12px;
  background:linear-gradient(145deg,rgba(31,47,59,.72),rgba(7,14,27,.48));
}
.pokemon-status-capture-record > .eyebrow { color:#b6c9df; font:700 8px/1.2 "DM Mono",monospace; letter-spacing:.08em; }
.pokemon-capture-record-empty { margin:0; color:#a8b7c9; font-size:10px; line-height:1.5; }
.pokemon-capture-record-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:10px; }
.pokemon-capture-record-grid > div { display:grid; align-content:start; gap:5px; min-width:0; }
.pokemon-capture-record-grid small { color:#93a4bb; font:700 8px/1.2 "DM Mono",monospace; letter-spacing:.04em; }
.pokemon-capture-record-grid strong { display:flex; align-items:center; gap:6px; min-width:0; color:#f1f5fc; font-size:11px; line-height:1.35; overflow-wrap:anywhere; }
.pokemon-status-capture-record .pokeball-icon { width:18px; height:18px; }
.ball-shop-event-note { grid-column:1/-1; margin:0; padding:10px 12px; border:1px solid rgba(224,190,115,.2); border-radius:9px; background:rgba(71,54,27,.24); color:#e8d9b5; font-size:10px; line-height:1.45; }
@media(max-width:560px) {
  .pokemon-status-capture-record { margin-left:14px; margin-right:14px; }
  .pokemon-capture-record-grid { grid-template-columns:1fr; gap:8px; }
}

.social-friends-nav { position:relative; }
.nav-social-alert:not([hidden]) { min-width:17px; height:17px; display:grid; place-items:center; border-radius:99px; background:#e36c6c; color:#fff; font:800 9px 'DM Mono',monospace; }
.social-friends-backdrop { z-index:80; }
.social-friends-modal { width:min(620px,calc(100vw - 28px)); max-height:min(82vh,680px); display:flex; flex-direction:column; overflow:hidden; padding:0; border:1px solid rgba(151,193,212,.2); border-radius:15px; background:linear-gradient(150deg,#132536,#0a1725 72%); box-shadow:0 28px 90px rgba(0,0,0,.6); }
.social-friends-head { flex:0 0 auto; display:flex; align-items:flex-start; justify-content:space-between; gap:12px; padding:14px 18px 11px; border-bottom:1px solid rgba(151,193,212,.14); }
.social-friends-head h2 { margin:2px 0 0; color:#edf5f8; font-size:19px; }
.social-friends-head p { margin:3px 0 0; color:#90a7b4; font-size:10px; }
.social-friends-modal-content { min-height:0; overflow:auto; padding:10px 14px 13px; }
.social-friends-content { display:grid; gap:9px; }
.social-presence-card { min-width:0; display:flex; align-items:center; gap:8px; padding:7px 10px; border:1px solid rgba(116,227,193,.2); border-radius:9px; background:linear-gradient(100deg,rgba(36,91,76,.2),rgba(7,20,29,.3)); }
.social-presence-copy { min-width:0; display:flex; align-items:center; gap:7px; }
.social-presence-card small { color:#7fa99d; font:700 8px 'DM Mono',monospace; letter-spacing:.12em; }
.social-presence-card strong { overflow:hidden; color:#e5f4ed; font-size:10px; text-overflow:ellipsis; white-space:nowrap; }
.social-presence-live-dot,.social-friend-avatar i { width:9px; height:9px; flex:0 0 9px; border:2px solid #112432; border-radius:50%; background:#687986; }
.social-presence-live-dot.status-online,.social-friend-avatar i.status-online { background:#56d49d; box-shadow:0 0 8px rgba(86,212,157,.45); }
.social-presence-live-dot.status-hunting,.social-friend-avatar i.status-hunting { background:#7ec9ff; box-shadow:0 0 8px rgba(126,201,255,.4); }
.social-presence-live-dot.status-sleeping,.social-friend-avatar i.status-sleeping { background:#d1a3f2; box-shadow:0 0 8px rgba(209,163,242,.35); }
.social-live-label { display:none; }
.social-friends-tabs { display:flex; gap:5px; padding:4px; border:1px solid rgba(151,193,212,.13); border-radius:10px; background:rgba(5,16,26,.48); }
.social-friends-tab { min-height:32px; flex:1; display:flex; align-items:center; justify-content:center; gap:7px; padding:5px 9px; border:1px solid transparent; border-radius:7px; color:#9cb0bb; background:transparent; font-family:inherit; font-size:10px; font-weight:700; cursor:pointer; }
.social-friends-tab:hover { color:#e1edf0; background:rgba(151,193,212,.07); }
.social-friends-tab.is-active { border-color:rgba(116,210,227,.24); color:#e5f5f7; background:linear-gradient(110deg,rgba(63,135,148,.24),rgba(44,83,105,.25)); box-shadow:inset 0 0 0 1px rgba(116,210,227,.05); }
.social-friends-tab-count { min-width:17px; height:17px; display:grid; place-items:center; padding:0 4px; border-radius:99px; color:#a9c5cf; background:rgba(151,193,212,.12); font:700 8px 'DM Mono',monospace; }
.social-friends-panel { min-height:0; }
.social-friend-form { display:grid; gap:6px; padding:10px; border:1px solid rgba(151,193,212,.15); border-radius:10px; background:rgba(5,16,26,.44); }
.social-friend-form label { color:#dae7ea; font-size:10px; font-weight:700; }
.social-friend-form > div { display:flex; gap:8px; }
.social-friend-form input { flex:1; min-width:0; height:34px; padding:0 10px; border:1px solid rgba(151,193,212,.2); border-radius:8px; outline:none; color:#e3eef1; background:rgba(5,16,26,.72); }
.social-friend-form input:focus { border-color:rgba(116,210,227,.62); box-shadow:0 0 0 2px rgba(116,210,227,.1); }
.social-friend-form > small { color:#8198a5; font-size:9px; line-height:1.45; }
.social-friends-notice { padding:7px 9px; border:1px solid rgba(231,135,119,.28); border-radius:8px; color:#f0b3a7; background:rgba(87,37,37,.18); font-size:9px; line-height:1.4; }
.social-friends-section { display:grid; gap:6px; }
.social-friends-section > header { display:flex; align-items:center; justify-content:space-between; gap:10px; padding:0 2px; }
.social-friends-section h3 { margin:0; color:#e5eef2; font-size:12px; }
.social-section-count { color:#8da4b1; font:9px 'DM Mono',monospace; }
.social-friends-list { display:grid; gap:4px; }
.social-friend-row,.social-request-row { min-width:0; display:flex; align-items:center; gap:8px; padding:6px 8px; border:1px solid rgba(151,193,212,.13); border-radius:8px; background:rgba(5,16,26,.42); }
.social-friend-avatar { position:relative; width:30px; height:30px; flex:0 0 30px; display:grid; place-items:center; border:1px solid rgba(116,210,227,.24); border-radius:8px; background:linear-gradient(145deg,rgba(59,117,132,.34),rgba(23,46,62,.65)); color:#d8f4f3; font-size:12px; font-weight:800; }
.social-friend-avatar i { position:absolute; right:-3px; bottom:-3px; }
.social-friend-copy,.social-request-copy { min-width:0; flex:1; display:grid; gap:3px; }
.social-friend-copy strong,.social-request-copy strong { overflow:hidden; color:#e0edf0; font-size:10px; text-overflow:ellipsis; white-space:nowrap; }
.social-friend-copy small,.social-request-copy small { overflow:hidden; color:#91a8b4; font-size:9px; text-overflow:ellipsis; white-space:nowrap; }
.social-request-actions { display:flex; flex-wrap:wrap; gap:5px; }
.social-remove-button { margin-left:auto; }
.social-pvp-invite { width:30px; height:28px; flex:0 0 30px; display:grid; place-items:center; padding:0; color:#9de8d0; font-size:14px; line-height:1; }
.social-pvp-invite:hover:not(:disabled) { color:#d5fff0; border-color:rgba(120,230,194,.62); background:rgba(38,112,91,.32); }
.social-friends-empty { padding:9px 8px; border:1px dashed rgba(151,193,212,.15); border-radius:8px; color:#859aa6; text-align:center; font-size:9px; line-height:1.4; }
.social-friends-empty.compact { padding:7px; }
@media(max-width:560px) {
  .social-friends-head { padding:12px 13px 9px; }
  .social-friends-modal-content { padding:9px 10px 11px; }
  .social-friends-content { gap:7px; }
  .social-friends-tab { min-height:30px; padding:4px 5px; font-size:9px; }
  .social-friend-form > div { gap:5px; }
  .social-friend-form > div .button { min-height:32px; padding:5px 8px; font-size:9px; }
  .social-friend-row,.social-request-row { padding:6px; gap:6px; }
  .social-request-actions { gap:4px; }
  .social-request-actions .button,.social-request-row > .button,.social-remove-button { min-height:27px; padding:4px 6px; font-size:9px; }
  .social-friend-row .social-pvp-invite { width:28px; min-height:27px; height:27px; flex-basis:28px; padding:0; font-size:13px; }
}

/* Manual capture launcher lives in the map footer; the arrow only selects owned balls. */
body.adventure-mode .game-world-panel .world-bottom {
  z-index:10; display:grid; grid-template-columns:58px auto minmax(0,1fr) auto; gap:9px; pointer-events:none;
}
body.adventure-mode .quick-move-cooldowns { min-width:0; display:flex; align-items:center; gap:5px; pointer-events:auto; }
body.adventure-mode .quick-move-cooldowns[hidden] { display:none !important; }
body.adventure-mode .quick-move-cooldown {
  position:relative; width:40px; min-width:40px; height:47px; display:grid; grid-template-rows:30px auto; align-content:center; justify-items:center; gap:1px; padding:3px 2px;
  border:1.5px solid color-mix(in srgb,var(--move-accent,#aab9ce) 82%,white 18%); border-radius:11px; color:#f6f8ff;
  background:radial-gradient(circle at 50% 23%,color-mix(in srgb,var(--move-accent,#aab9ce) 38%,#182337),transparent 65%),linear-gradient(150deg,#182338,#0b1422);
  box-shadow:0 0 0 1px color-mix(in srgb,var(--move-accent,#aab9ce) 28%,transparent),0 0 12px color-mix(in srgb,var(--move-accent,#aab9ce) 28%,transparent),inset 0 1px 0 rgba(255,255,255,.2);
  cursor:pointer; touch-action:manipulation; transition:transform .12s ease,border-color .16s ease,box-shadow .16s ease;
}
body.adventure-mode .quick-move-cooldown::before { content:""; position:absolute; inset:-3px; border:1px solid color-mix(in srgb,var(--move-accent,#aab9ce) 56%,transparent); border-radius:13px; opacity:.55; pointer-events:none; }
body.adventure-mode .quick-move-cooldown:hover:not(:disabled) { transform:translateY(-2px); border-color:#fff; box-shadow:0 0 0 1px color-mix(in srgb,var(--move-accent,#aab9ce) 55%,transparent),0 0 17px color-mix(in srgb,var(--move-accent,#aab9ce) 52%,transparent),inset 0 1px 0 rgba(255,255,255,.24); }
body.adventure-mode .quick-move-cooldown:active:not(:disabled) { transform:translateY(1px) scale(.96); }
body.adventure-mode .quick-move-cooldown:disabled { cursor:default; }
body.adventure-mode .quick-move-cooldown.is-cooling-down { background:linear-gradient(150deg,rgba(15,23,36,.96),rgba(8,14,24,.97)); }
body.adventure-mode .quick-move-icon-orb { width:30px; height:30px; display:grid; place-items:center; filter:drop-shadow(0 1px 5px color-mix(in srgb,var(--move-accent,#aab9ce) 58%,transparent)); }
body.adventure-mode .quick-move-icon-orb svg { width:30px; height:30px; overflow:visible; }
body.adventure-mode .quick-move-icon-core { fill:color-mix(in srgb,var(--move-accent,#aab9ce) 25%,#111c2c); stroke:color-mix(in srgb,var(--move-accent,#aab9ce) 80%,white 20%); stroke-width:1.4; }
body.adventure-mode .quick-move-icon-ring { fill:none; stroke:rgba(255,255,255,.43); stroke-width:.8; }
body.adventure-mode .quick-move-icon-orb use { color:color-mix(in srgb,var(--move-accent,#aab9ce) 35%,white); filter:drop-shadow(0 0 2px color-mix(in srgb,var(--move-accent,#aab9ce) 75%,transparent)); }
body.adventure-mode .quick-move-icon-glint { fill:#fff; opacity:.85; }
body.adventure-mode .quick-move-cooldown.is-cooling-down .quick-move-icon-orb { opacity:.72; filter:saturate(.72); }
body.adventure-mode .quick-move-cooldown small { color:color-mix(in srgb,var(--move-accent,#aab9ce) 55%,white); font:900 8px/1 "DM Mono",monospace; white-space:nowrap; text-shadow:0 0 5px color-mix(in srgb,var(--move-accent,#aab9ce) 38%,transparent); }
body.adventure-mode .manual-ball-control { position:relative; z-index:2; width:54px; height:46px; display:flex; align-items:center; justify-content:center; flex:none; pointer-events:auto; }
body.adventure-mode .manual-ball-launch {
  position:relative; width:50px; height:44px; display:grid; place-items:center; padding:0;
  border:1px solid rgba(246,207,133,.72); border-radius:13px; color:#fff2d2;
  background:linear-gradient(145deg,rgba(54,78,89,.96),rgba(29,44,55,.98));
  box-shadow:0 4px 12px rgba(0,0,0,.34),inset 0 1px 0 rgba(255,255,255,.12); cursor:pointer; touch-action:manipulation;
}
body.adventure-mode .manual-ball-launch:hover:not(:disabled) { border-color:#ffe3a1; background:linear-gradient(145deg,#536c71,#344b54); transform:translateY(-1px); }
body.adventure-mode .manual-ball-launch:disabled { opacity:.55; cursor:not-allowed; }
body.adventure-mode .manual-ball-launch .pokeball-icon { width:32px; height:32px; filter:drop-shadow(0 3px 4px rgba(0,0,0,.62)); }
body.adventure-mode .manual-ball-launch > b { position:absolute; top:-6px; right:-6px; min-width:19px; padding:3px 5px; border:1px solid rgba(245,220,165,.45); border-radius:8px; color:#fff8e9; background:#19232c; font:800 8px/1 Inter,"Segoe UI",system-ui,sans-serif; text-align:center; }
body.adventure-mode .manual-ball-select { position:absolute; right:-4px; bottom:-3px; z-index:3; width:25px; height:25px; display:grid; place-items:center; padding:0; border:2px solid #1c2d37; border-radius:9px; color:#fff2cd; background:#577e83; box-shadow:0 2px 7px rgba(0,0,0,.44); cursor:pointer; pointer-events:auto; touch-action:manipulation; }
body.adventure-mode .manual-ball-select:hover { color:#fff; background:#6c9d9e; }
body.adventure-mode .manual-ball-select svg { width:14px; height:14px; fill:none; stroke:currentColor; stroke-width:2; stroke-linecap:round; stroke-linejoin:round; }
body.adventure-mode .manual-ball-menu { position:absolute; z-index:30; left:0; bottom:calc(100% + 8px); width:min(246px,calc(100vw - 32px)); max-height:min(42vh,310px); display:grid; gap:4px; overflow:auto; padding:7px; border:1px solid rgba(154,202,211,.3); border-radius:12px; background:rgba(12,21,33,.98); box-shadow:0 12px 30px rgba(0,0,0,.48); pointer-events:auto; }
body.adventure-mode .manual-ball-menu[hidden] { display:none !important; }
body.adventure-mode .manual-ball-option { min-height:38px; display:grid; grid-template-columns:28px minmax(0,1fr) auto; align-items:center; gap:8px; padding:5px 8px; border:1px solid rgba(192,212,235,.1); border-radius:8px; color:#eaf2fa; background:rgba(31,45,61,.72); text-align:left; cursor:pointer; }
body.adventure-mode .manual-ball-option:hover,.manual-ball-option.is-selected { border-color:rgba(244,208,137,.6); background:rgba(86,78,59,.56); }
body.adventure-mode .manual-ball-option-icon .pokeball-icon { width:25px; height:25px; }
body.adventure-mode .manual-ball-option-name { overflow:hidden; font:700 10px/1.2 Inter,"Segoe UI",system-ui,sans-serif; text-overflow:ellipsis; white-space:nowrap; }
body.adventure-mode .manual-ball-option > b { color:#f4d690; font:800 10px/1 "DM Mono",monospace; }
body.adventure-mode .manual-ball-empty { display:grid; gap:8px; padding:9px; color:#c5d3e4; font:600 10px/1.4 Inter,"Segoe UI",system-ui,sans-serif; }
body.adventure-mode .world-bottom .movement-hint { min-width:0; max-width:100%; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
body.adventure-mode .world-bottom .scene-controls { pointer-events:auto; }
@media(max-width:820px) {
  body.adventure-mode .game-world-panel .world-bottom { grid-template-columns:52px minmax(0,1fr) auto; gap:6px; min-height:42px; padding:5px 8px; }
  body.adventure-mode .world-bottom .movement-hint { display:none; }
  body.adventure-mode .quick-move-cooldowns { gap:3px; }
  body.adventure-mode .quick-move-cooldown { width:34px; min-width:34px; height:39px; grid-template-rows:24px auto; gap:1px; padding:2px 1px; border-radius:8px; }
  body.adventure-mode .quick-move-cooldown::before { inset:-2px; border-radius:10px; }
  body.adventure-mode .quick-move-icon-orb,body.adventure-mode .quick-move-icon-orb svg { width:24px; height:24px; }
  body.adventure-mode .quick-move-cooldown small { font-size:7px; }
  body.adventure-mode .manual-ball-control { width:49px; height:38px; }
  body.adventure-mode .manual-ball-launch { width:45px; height:37px; border-radius:11px; }
  body.adventure-mode .manual-ball-launch .pokeball-icon { width:27px; height:27px; }
  body.adventure-mode .manual-ball-select { right:-4px; bottom:-3px; width:22px; height:22px; border-radius:8px; }
  body.adventure-mode .world-bottom .movement-hint { padding:5px 6px; font-size:6px; letter-spacing:0; }
}


@media(max-width:360px) {
  body.adventure-mode .game-world-panel .world-bottom { grid-template-columns:45px minmax(0,1fr) auto; gap:4px; padding-right:5px; padding-left:5px; }
  body.adventure-mode .quick-move-cooldowns { gap:2px; }
  body.adventure-mode .quick-move-cooldown { width:30px; min-width:30px; height:36px; }
  body.adventure-mode .quick-move-icon-orb,body.adventure-mode .quick-move-icon-orb svg { width:22px; height:22px; }
}

/* Inventory card polish: keep locks off the artwork and show IV color on text only. */
.screen-modal[data-modal-view="equipe"] .storage-card-title {
  grid-template-columns:minmax(0,1fr) auto auto !important;
}
.screen-modal[data-modal-view="equipe"] .storage-card-title > .pokemon-card-lock-button {
  position:static !important;
  inset:auto !important;
  z-index:auto !important;
  width:18px !important;
  height:18px !important;
  min-width:18px !important;
  display:grid !important;
  place-items:center !important;
  padding:2px !important;
  border-radius:6px !important;
  box-shadow:none !important;
  transform:none !important;
}
.screen-modal[data-modal-view="equipe"] .storage-card-title > .pokemon-card-lock-button svg {
  width:12px !important;
  height:12px !important;
}
.screen-modal[data-modal-view="equipe"] .storage-card-iv.iv-band,
.screen-modal[data-modal-view="equipe"] .team-slot-iv.iv-band {
  color:var(--iv-accent) !important;
  border-color:transparent !important;
  background:transparent !important;
  box-shadow:none !important;
}
.screen-modal[data-modal-view="equipe"] .storage-card-iv.iv-band b,
.screen-modal[data-modal-view="equipe"] .team-slot-iv.iv-band b {
  color:var(--iv-accent) !important;
}
body.adventure-mode .team-pvp-badge {
  position:static !important;
  inset:auto !important;
  z-index:auto !important;
  flex:0 0 auto;
  align-self:center;
  white-space:nowrap;
}
.team-slot-footer {
  width:calc(100% + 34px);
  min-width:0;
  display:flex;
  align-items:center;
  justify-content:flex-start;
  gap:6px;
}
.team-slot-footer .team-edit-moves {
  width:auto !important;
  min-width:0;
  margin:0 !important;
  flex:0 0 auto;
}
.screen-modal-content-equipe .team-slot-footer { width:100%; }
.screen-modal-content-equipe .team-slot-footer .team-edit-moves { flex:0 1 auto; }
@media(max-width:560px) {
  .screen-modal-content-equipe .team-slot-footer { width:100%; justify-content:center; gap:5px; }
  .screen-modal-content-equipe .team-slot-footer .team-edit-moves { width:auto !important; flex:1 1 auto; }
}

body.adventure-mode.nap-active-mode .app-shell,
body.adventure-mode.nap-active-mode #toastRegion { display:none !important; }
body.adventure-mode.nap-active-mode #modalLayer { position:fixed; z-index:1000; inset:0; }
body.adventure-mode.nap-active-mode .modal-backdrop.nap-backdrop {
  position:fixed;
  inset:0;
  padding:clamp(12px,3vw,32px);
  background:#080d18 !important;
  backdrop-filter:none !important;
  animation:none !important;
}
body.adventure-mode.nap-active-mode .nap-modal {
  width:min(620px,100%);
  max-height:calc(100vh - 24px);
  max-height:calc(100dvh - 24px);
  overflow-y:auto;
}

/* Mobile dialog space respects the Android viewport and sits above the bottom navigation. */
.screen-modal-backdrop {
  z-index:60;
  overflow-y:auto;
  overscroll-behavior:contain;
}
.modal-backdrop { z-index:60; }
.pokemon-status-power {
  width:max-content;
  display:inline-flex;
  align-items:center;
  gap:7px;
  margin-top:5px;
  padding:5px 9px;
  border:1px solid rgba(112,221,211,.38);
  border-radius:9px;
  color:#9ee9dc;
  background:rgba(34,104,102,.25);
  font:700 11px/1.2 "DM Mono",monospace;
}
.pokemon-status-power strong { color:#f3fffb; font-size:14px; }

.storage-filterbar {
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  align-items:end;
  gap:8px;
  margin:12px 0 9px;
  padding:10px;
  border:1px solid rgba(144,171,209,.16);
  border-radius:12px;
  background:rgba(8,15,28,.52);
}
.storage-filter-search {
  grid-column:1/-1;
  min-width:0;
  display:flex;
  align-items:center;
  gap:8px;
  min-height:40px;
  padding:0 11px;
  border:1px solid rgba(144,171,209,.24);
  border-radius:9px;
  color:#8fe3d9;
  background:rgba(11,21,37,.86);
}
.storage-filter-search > span { flex:0 0 auto; font-size:20px; line-height:1; }
.storage-filter-search input {
  width:100%;
  min-width:0;
  border:0;
  outline:0;
  color:#eef5ff;
  background:transparent;
  font:500 12px/1.3 Inter,"Segoe UI",sans-serif;
}
.storage-filter-search input::placeholder { color:#8798ad; }
.storage-filter-control { min-width:0; display:grid; gap:4px; color:#aebed1; font:700 9px/1.2 Inter,"Segoe UI",sans-serif; }
.storage-filter-control select {
  width:100%;
  min-width:0;
  min-height:37px;
  padding:6px 8px;
  border:1px solid rgba(144,171,209,.24);
  border-radius:8px;
  color:#e8f0fa;
  background:#101b2c;
  font:600 10px/1.2 Inter,"Segoe UI",sans-serif;
}
.storage-filter-count { grid-column:1/-1; color:#92a7bd; font:600 9px/1.3 Inter,"Segoe UI",sans-serif; text-align:right; }
.storage-pagination-count { justify-content:flex-start; min-height:29px; color:#aebed1; }
.storage-card-power,
.team-slot-power {
  display:inline-flex;
  align-items:center;
  gap:4px;
  color:#91ded6;
  font:700 9px/1.2 "DM Mono",monospace;
  white-space:nowrap;
}
.storage-card-power b,
.team-slot-power b { color:#e5fffa; font-size:10px; }
.storage-card-power.is-strongest,
.team-slot-power.is-strongest { color:#ffdf91; }
.storage-card-power.is-strongest b,
.team-slot-power.is-strongest b { color:#fff0c3; }
.storage-card.is-strongest { outline:1px solid rgba(255,215,125,.38); outline-offset:-2px; }
.screen-modal[data-modal-view="equipe"] .storage-card-stats { flex-wrap:wrap !important; row-gap:5px !important; }
body.adventure-mode .ball-fallback-item { gap:9px; }
body.adventure-mode .ball-fallback-icon { width:29px; height:29px; flex-basis:29px; }
body.adventure-mode .ball-fallback-count {
  min-width:36px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:5px 8px;
  border:1px solid rgba(211,184,133,.25);
  border-radius:8px;
  color:#f4d690;
  background:rgba(34,45,48,.72);
  font:800 11px/1 'Courier New',monospace;
  font-variant-numeric:tabular-nums;
}
body.adventure-mode .ball-fallback-item.is-empty-stock .ball-fallback-count { color:#ffb5a2; border-color:rgba(244,125,103,.45); }

@media (max-width:820px) {
  .app-shell, body.adventure-mode .app-shell { padding-bottom:calc(80px + env(safe-area-inset-bottom)); }
  .sidebar, body.adventure-mode .sidebar {
    height:calc(72px + env(safe-area-inset-bottom));
    padding-bottom:env(safe-area-inset-bottom);
  }
  .main-nav { height:71px; gap:6px; }
  .nav-button, .nav-button.mobile-settings-nav { height:59px; min-height:59px; gap:3px; border-radius:12px; }
  .nav-icon { width:29px; height:27px; }
  .nav-icon svg { width:22px; height:22px; }
  .nav-button > span:nth-child(2) { font-size:9px; }
  .main-content, body.adventure-mode .main-content { padding-bottom:22px; }
  body.adventure-mode .main-content {
    height:calc(100dvh - 72px - env(safe-area-inset-bottom));
    padding:0 8px;
  }
  body.adventure-mode .expedition-heading { min-height:0; margin-bottom:6px; }
  body.adventure-mode .expedition-heading-actions {
    display:grid;
    grid-template-columns:repeat(4,42px);
    justify-content:center;
    align-items:center;
    gap:6px;
    width:100%;
    padding:3px 0 5px;
  }
  body.adventure-mode .expedition-heading-actions > button {
    width:42px !important;
    min-width:42px !important;
    height:42px !important;
    border-radius:11px;
  }
  body.adventure-mode .expedition-heading-actions .menu-icon { width:23px; height:23px; }
  body.adventure-mode .expedition-heading-actions .expedition-catch-button .ball-throw-icon { width:22px; height:22px; }
  body.adventure-mode .expedition-heading-actions .topbar-resources {
    grid-column:1/-1;
    justify-self:center;
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    width:min(250px,100%);
    gap:6px;
    margin:0;
  }
  body.adventure-mode .expedition-heading-actions .resource-chip {
    min-width:0;
    width:100%;
    height:34px;
    gap:6px;
    padding:0 7px;
    border-radius:9px;
  }
  body.adventure-mode .expedition-heading-actions .resource-chip small { font-size:7px; }
  body.adventure-mode .expedition-heading-actions .resource-chip strong { font-size:10px; }
  body.adventure-mode .expedition-heading-actions .coin-icon,
  body.adventure-mode .expedition-heading-actions .research-icon { width:21px; height:21px; }
  body.adventure-mode .expedition-heading-actions .coin-icon svg,
  body.adventure-mode .expedition-heading-actions .research-icon svg { width:16px; height:16px; }
  body.adventure-mode .ball-fallback-item { min-height:48px; gap:7px; padding:6px; }
  body.adventure-mode .ball-fallback-icon { width:30px; height:30px; flex-basis:30px; }
  body.adventure-mode .ball-fallback-count { min-width:38px; padding:6px 7px; font-size:12px; }
  .screen-modal-backdrop {
    align-items:center;
    padding: max(8px,env(safe-area-inset-top)) 8px max(8px,env(safe-area-inset-bottom));
  }
  .screen-modal {
    height:calc(100dvh - env(safe-area-inset-top) - env(safe-area-inset-bottom) - 16px);
    max-height:calc(100dvh - env(safe-area-inset-top) - env(safe-area-inset-bottom) - 16px);
    min-height:0;
  }
  .screen-modal[data-modal-view] {
    height:calc(100dvh - env(safe-area-inset-top) - env(safe-area-inset-bottom) - 16px) !important;
    max-height:calc(100dvh - env(safe-area-inset-top) - env(safe-area-inset-bottom) - 16px) !important;
  }
  .pokemon-status-backdrop { z-index:2147482600; align-items:center; overflow-y:auto; }
  .pokemon-status-modal {
    height:auto !important;
    max-height:calc(100dvh - env(safe-area-inset-top) - env(safe-area-inset-bottom) - 16px) !important;
    overflow-y:auto !important;
  }
  body.adventure-mode .pvp-config-backdrop {
    z-index:80;
    padding:max(6px,env(safe-area-inset-top)) 6px max(6px,env(safe-area-inset-bottom));
  }
  body.adventure-mode .pvp-team-config-modal {
    max-height:calc(100dvh - env(safe-area-inset-top) - env(safe-area-inset-bottom) - 12px);
  }
  body.adventure-mode .pvp-config-content {
    max-height:calc(100dvh - env(safe-area-inset-top) - env(safe-area-inset-bottom) - 164px);
  }
}
@media (max-width:520px) {
  .storage-filterbar { grid-template-columns:repeat(2,minmax(0,1fr)); gap:7px; padding:8px; }
  .storage-filter-search { min-height:42px; }
  .storage-filter-control select { min-height:40px; font-size:10px; }
  .storage-filter-count { font-size:10px; }
  .team-slot-power { font-size:8px; }
  .team-slot-power b { font-size:9px; }
}

/* PC filters live in a compact toolbar and an explicit, touch-friendly dialog. */
.storage-filterbar {
  display:flex;
  align-items:center;
  gap:8px;
  margin:10px 0;
  padding:0;
  border:0;
  background:transparent;
}
.storage-filter-open,
.storage-filter-clear {
  min-height:42px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  padding:0 13px;
  border:1px solid rgba(116,210,227,.28);
  border-radius:10px;
  color:#d8f3ef;
  background:rgba(25,59,72,.62);
  font:750 12px/1 Inter,"Segoe UI",sans-serif;
  cursor:pointer;
  touch-action:manipulation;
}
.storage-filter-open svg,
.storage-filter-clear svg,
.storage-filter-modal-clear svg { width:20px; height:20px; fill:none; stroke:currentColor; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; }
.storage-filter-open b { min-width:20px; height:20px; display:grid; place-items:center; padding:0 5px; border-radius:99px; color:#0c252b; background:#8ce1d9; font:800 10px/1 Inter,"Segoe UI",sans-serif; }
.storage-filter-clear { width:42px; padding:0; color:#f0b6ad; border-color:rgba(226,135,125,.28); background:rgba(99,45,49,.24); }
.storage-filter-open:hover,
.storage-filter-clear:hover:not(:disabled) { border-color:rgba(116,210,227,.56); background:rgba(43,90,101,.72); }
.storage-filter-clear:disabled { opacity:.4; cursor:not-allowed; }
.storage-filterbar .storage-filter-count { margin-left:auto; color:#9aacc2; font-size:11px; text-align:right; }
.storage-filter-modal-backdrop { z-index:100; overflow-y:auto; padding:14px; }
.storage-filter-modal {
  width:min(520px,100%);
  max-height:calc(100vh - 28px);
  max-height:min(760px,calc(100dvh - 28px));
  display:grid;
  grid-template-rows:auto minmax(0,1fr) auto;
  overflow:hidden;
  border:1px solid rgba(116,210,227,.28);
  border-radius:17px;
  color:var(--ink);
  background:linear-gradient(145deg,#17233a,#0d1726);
  box-shadow:0 24px 80px rgba(0,0,0,.58);
}
.storage-filter-modal > header { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:15px 17px; border-bottom:1px solid rgba(151,193,212,.15); }
.storage-filter-modal > header h2 { margin:4px 0; font-size:19px; }
.storage-filter-modal > header p { margin:0; color:#9eafc2; font-size:11px; }
.storage-filter-modal-fields { min-height:0; display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); align-content:start; gap:11px; overflow:auto; padding:15px 17px; }
.storage-filter-modal-fields .storage-filter-search { margin:0; min-height:44px; }
.storage-filter-modal-fields .storage-filter-control { gap:6px; font-size:11px; }
.storage-filter-modal-fields .storage-filter-control select { min-height:42px; font-size:12px; }
.storage-filter-modal > footer { display:flex; align-items:center; gap:8px; padding:11px 14px; border-top:1px solid rgba(151,193,212,.15); background:rgba(7,14,25,.65); }
.storage-filter-modal-count { flex:1 1 auto; color:#9aacc2; font:600 10px 'DM Mono',monospace; }
.storage-filter-modal-clear { min-height:40px; display:inline-flex; align-items:center; justify-content:center; gap:6px; padding:0 10px; border:1px solid rgba(226,135,125,.28); border-radius:9px; color:#f0b6ad; background:rgba(99,45,49,.24); font:700 11px Inter,"Segoe UI",sans-serif; cursor:pointer; touch-action:manipulation; }
.storage-filter-modal > footer .button { min-height:42px; padding:0 13px; font-size:11px; white-space:nowrap; }

@media (max-width:820px) {
  .app-shell, body.adventure-mode .app-shell { padding-bottom:calc(80px + env(safe-area-inset-bottom)); }
  .sidebar, body.adventure-mode .sidebar { height:calc(80px + env(safe-area-inset-bottom)); }
  .main-nav { height:76px; gap:2px; }
  .nav-button, .nav-button.mobile-settings-nav { height:68px; min-height:68px; gap:1px; padding:2px 1px; }
  .nav-icon { width:34px; height:32px; }
  .nav-icon svg { width:28px; height:28px; }
  .nav-button > span:nth-child(2) { font-size:9px; }
  body.adventure-mode .main-content {
    height:calc(100vh - 80px - env(safe-area-inset-bottom));
    height:calc(100dvh - 80px - env(safe-area-inset-bottom));
  }
  body.adventure-mode .expedition-heading-actions {
    display:grid;
    grid-template-columns:repeat(5,minmax(0,1fr));
    justify-content:stretch;
    gap:5px;
    width:100%;
    padding:4px 0 6px;
  }
  body.adventure-mode .expedition-heading-actions > button {
    width:100% !important;
    min-width:0 !important;
    height:52px !important;
    border-radius:12px;
  }
  body.adventure-mode .expedition-heading-actions .menu-icon { width:27px; height:27px; }
  body.adventure-mode .expedition-heading-actions .expedition-catch-button .ball-throw-icon { width:25px; height:25px; }
  body.adventure-mode .expedition-heading-actions .topbar-resources { width:min(320px,100%); }
  .screen-modal-backdrop {
    bottom:80px;
    bottom:calc(80px + env(safe-area-inset-bottom));
    padding-bottom:8px !important;
  }
  .screen-modal[data-modal-view] {
    height:calc(100vh - env(safe-area-inset-top) - env(safe-area-inset-bottom) - 96px) !important;
    max-height:calc(100vh - env(safe-area-inset-top) - env(safe-area-inset-bottom) - 96px) !important;
    height:calc(100dvh - env(safe-area-inset-top) - env(safe-area-inset-bottom) - 96px) !important;
    max-height:calc(100dvh - env(safe-area-inset-top) - env(safe-area-inset-bottom) - 96px) !important;
  }
  .screen-modal-content-equipe { scroll-padding-bottom:20px; padding-bottom:20px !important; }
  .storage-filter-modal-backdrop { padding:max(10px,env(safe-area-inset-top)) 10px max(10px,env(safe-area-inset-bottom)); }
  .storage-filter-modal { max-height:calc(100vh - env(safe-area-inset-top) - env(safe-area-inset-bottom) - 20px); max-height:calc(100dvh - env(safe-area-inset-top) - env(safe-area-inset-bottom) - 20px); }
  .storage-filter-modal > header { padding:12px; }
  .storage-filter-modal-fields { gap:9px; padding:11px 12px; }
  .storage-filter-modal > footer { display:grid; grid-template-columns:auto minmax(0,1fr); grid-template-areas:"clear count" "cancel save"; gap:7px; padding:9px 10px; }
  .storage-filter-modal-clear { grid-area:clear; min-height:42px; }
  .storage-filter-modal-count { grid-area:count; text-align:right; }
  .storage-filter-modal > footer .button.ghost { grid-area:cancel; }
  .storage-filter-modal > footer .button.primary { grid-area:save; }
  .storage-filter-modal > footer .button { width:100%; min-height:44px; padding:0 8px; }
}
@media (max-width:420px) {
  .storage-filter-modal-fields { grid-template-columns:1fr; }
  .storage-filter-modal-fields .storage-filter-search { grid-column:1; }
  .storage-filter-open { min-height:44px; }
  .storage-filter-clear { width:44px; min-height:44px; }
}

/* Compact hunt toolbar on touch screens while keeping each action labeled. */
@media (max-width:900px) {
  body.adventure-mode .expedition-heading {
    display:flex; align-items:center; justify-content:center; gap:0;
    min-height:36px; margin-bottom:3px;
  }
  body.adventure-mode .expedition-location,
  body.adventure-mode .trainer-summary { display:none!important; }
  body.adventure-mode .expedition-heading-actions {
    display:flex!important; flex:1 1 auto; flex-wrap:nowrap; align-items:center; justify-content:center;
    gap:4px; width:100%; min-width:0; padding:0;
  }
  body.adventure-mode .expedition-heading-actions > button {
    flex:0 0 auto; width:auto!important; min-width:0!important; height:34px!important; min-height:34px;
    gap:4px; padding:0 7px!important; border-radius:8px; font-size:8px; line-height:1; white-space:nowrap;
  }
  body.adventure-mode .expedition-heading-actions button span {
    display:inline-flex!important; align-items:center; font-size:8px; line-height:1;
  }
  body.adventure-mode .expedition-heading-actions .menu-icon { width:15px; height:15px; flex:0 0 15px; }
  body.adventure-mode .expedition-heading-actions .topbar-resources {
    display:flex; flex:0 0 auto; align-items:center; gap:4px; width:auto; margin:0 0 0 2px;
  }
  body.adventure-mode .expedition-heading-actions .resource-chip {
    min-width:80px; width:auto; height:30px; gap:4px; padding:0 5px; border-radius:8px;
  }
  body.adventure-mode .expedition-heading-actions .resource-chip small { font-size:7px; }
  body.adventure-mode .expedition-heading-actions .resource-chip strong { font-size:9px; }
  body.adventure-mode .expedition-heading-actions .coin-icon,
  body.adventure-mode .expedition-heading-actions .research-icon { width:18px; height:18px; flex:0 0 18px; }
  body.adventure-mode .expedition-heading-actions .coin-icon svg,
  body.adventure-mode .expedition-heading-actions .research-icon svg { width:13px; height:13px; }
}
@media (max-width:560px) {
  body.adventure-mode .expedition-heading { min-height:0; }
  body.adventure-mode .expedition-heading-actions {
    flex-wrap:wrap; justify-content:center; row-gap:4px; padding:1px 0 3px;
  }
  body.adventure-mode .expedition-heading-actions > button {
    flex:0 0 calc(25% - 4px); width:calc(25% - 4px)!important; min-width:0!important;
    height:32px!important; min-height:32px; gap:3px; padding:0 3px!important; font-size:8px;
  }
  body.adventure-mode .expedition-heading-actions button span { font-size:8px; }
  body.adventure-mode .expedition-heading-actions .menu-icon { width:14px; height:14px; flex-basis:14px; }
  body.adventure-mode .expedition-heading-actions .topbar-resources {
    flex:0 0 auto; justify-content:center; width:min(240px,100%); margin:0 auto;
  }
}
@media (max-width:360px) {
  body.adventure-mode .expedition-heading-actions > button { gap:2px; padding:0 2px!important; font-size:7px; }
  body.adventure-mode .expedition-heading-actions button span { font-size:7px; }
}

/* Keep all dialogs reachable when the browser viewport is short or changes orientation. */
.modal-backdrop,
.screen-modal-backdrop {
  display:flex !important;
  flex-direction:column;
  align-items:center;
  justify-content:flex-start;
  overflow-x:hidden;
  overflow-y:auto;
  overscroll-behavior:contain;
  padding-top:max(10px,env(safe-area-inset-top));
  padding-bottom:max(10px,env(safe-area-inset-bottom));
}
.modal-backdrop > .modal,
.modal-backdrop > .adventure-panel-modal,
.modal-backdrop > .ball-shop-modal,
.modal-backdrop > .adventure-chat-modal,
.modal-backdrop > .evolution-sequence {
  flex:0 0 auto;
  margin-block:auto;
  max-height:calc(100vh - 20px);
  max-height:calc(100dvh - env(safe-area-inset-top) - env(safe-area-inset-bottom) - 20px);
  overflow-x:hidden;
  overflow-y:auto;
}
.screen-modal-backdrop > .screen-modal {
  flex:0 0 auto;
  margin-block:auto;
  max-height:calc(100vh - 20px);
  max-height:calc(100dvh - env(safe-area-inset-top) - env(safe-area-inset-bottom) - 20px);
}
.modal button,
.screen-modal button { touch-action:manipulation; }

/* The Arena setup dialog always reserves a visible row for its save action. */
body.adventure-mode .pvp-config-backdrop {
  position:fixed;
  inset:0;
  display:flex !important;
  flex-direction:column;
  align-items:center;
  justify-content:flex-start;
  overflow-x:hidden;
  overflow-y:auto;
  overscroll-behavior:contain;
  padding:max(8px,env(safe-area-inset-top)) 8px max(8px,env(safe-area-inset-bottom));
}
body.adventure-mode .pvp-team-config-modal {
  width:min(1120px,100%);
  height:calc(100vh - env(safe-area-inset-top) - env(safe-area-inset-bottom) - 16px);
  height:calc(100dvh - env(safe-area-inset-top) - env(safe-area-inset-bottom) - 16px);
  min-height:0;
  max-height:calc(100vh - env(safe-area-inset-top) - env(safe-area-inset-bottom) - 16px);
  max-height:calc(100dvh - env(safe-area-inset-top) - env(safe-area-inset-bottom) - 16px);
  grid-template-rows:auto auto minmax(0,1fr) auto;
  overflow:hidden;
  margin-block:auto;
}
body.adventure-mode .pvp-config-content {
  min-height:0;
  height:auto;
  max-height:none;
  overflow-x:hidden;
  overflow-y:auto;
  overscroll-behavior:contain;
}
body.adventure-mode .pvp-config-foot {
  position:relative;
  z-index:2;
  flex:0 0 auto;
  flex-wrap:wrap;
}
body.adventure-mode .pvp-config-foot > span { min-width:0; line-height:1.35; }
body.adventure-mode .pvp-config-foot .button { min-height:42px; touch-action:manipulation; }

/* A short landscape touch screen gets a horizontal dock instead of a clipped rail. */
@media (orientation:landscape) and (max-height:600px) and (hover:none) and (pointer:coarse) {
  html {
    width:100%;
    height:100vh;
    height:100dvh;
    min-height:0;
  }
  body:not(.auth-mode),
  body.adventure-mode {
    width:100%;
    height:100vh;
    height:100dvh;
    min-height:0;
    overflow:hidden;
  }
  body:not(.auth-mode) .app-shell,
  body.adventure-mode .app-shell {
    width:100%;
    height:100vh;
    height:100dvh;
    min-height:0;
    overflow:hidden;
  }
  body:not(.auth-mode) .app-shell,
  body.adventure-mode .app-shell {
    display:block !important;
    padding:0 0 calc(62px + env(safe-area-inset-bottom));
  }
  body:not(.auth-mode) .sidebar,
  body.adventure-mode .sidebar {
    position:fixed;
    z-index:40;
    top:auto;
    right:0;
    bottom:0;
    left:0;
    display:block !important;
    width:100% !important;
    min-width:0;
    height:calc(62px + env(safe-area-inset-bottom));
    min-height:0;
    overflow:hidden;
    padding:0 8px env(safe-area-inset-bottom) !important;
    border-top:1px solid rgba(169,190,224,.18);
    border-right:0;
    background:rgba(10,16,30,.96);
  }
  .brand,
  .trainer-card,
  .nav-label,
  .sidebar-spacer,
  .sidebar-quest,
  .sidebar-footer,
  body.adventure-mode .brand,
  body.adventure-mode .trainer-card,
  body.adventure-mode .nav-label,
  body.adventure-mode .sidebar-spacer,
  body.adventure-mode .sidebar-quest,
  body.adventure-mode .sidebar-footer { display:none !important; }
  .main-nav,
  body.adventure-mode .main-nav {
    width:100%;
    height:100%;
    display:grid;
    grid-template-columns:repeat(7,minmax(0,1fr));
    align-items:center;
    gap:4px;
    overflow:visible;
  }
  .nav-button,
  .nav-button.mobile-settings-nav,
  body.adventure-mode .nav-button,
  body.adventure-mode .nav-button.mobile-settings-nav {
    width:100% !important;
    min-width:0 !important;
    height:50px;
    min-height:48px;
    display:flex !important;
    flex-direction:column;
    align-items:center;
    justify-content:center;
    gap:2px;
    margin:0;
    padding:2px;
    border-radius:10px;
  }
  .nav-icon,
  body.adventure-mode .nav-icon { width:28px; height:25px; }
  .nav-icon svg,
  body.adventure-mode .nav-icon svg { width:23px; height:23px; }
  .nav-button > span:nth-child(2),
  body.adventure-mode .nav-button > span:nth-child(2) {
    display:block !important;
    max-width:100%;
    overflow:hidden;
    font-size:8px;
    text-overflow:ellipsis;
    white-space:nowrap;
  }
  .nav-button > span:not(.nav-icon),
  body.adventure-mode .nav-button > span:not(.nav-icon) { display:block !important; }
  .nav-pill,
  .nav-count,
  body.adventure-mode .nav-pill,
  body.adventure-mode .nav-count { display:inline-flex !important; }
  .nav-count,
  body.adventure-mode .nav-count { font-size:7px; line-height:1; white-space:nowrap; }
  .nav-button,
  body.adventure-mode .nav-button { position:relative; }
  .nav-social-alert:not([hidden]),
  body.adventure-mode .nav-social-alert:not([hidden]) {
    position:absolute;
    top:1px;
    right:1px;
    min-width:14px;
    width:14px;
    height:14px;
    font-size:7px;
  }
  body:not(.auth-mode) .main-content,
  body.adventure-mode .main-content {
    width:100%;
    height:calc(100dvh - 62px - env(safe-area-inset-bottom));
    min-height:0;
    overflow:hidden;
    padding:0 10px 10px;
  }
  body:not(.auth-mode):not(.adventure-mode) .main-content {
    display:flex;
    flex-direction:column;
  }
  body:not(.auth-mode):not(.adventure-mode) .content-area {
    flex:1 1 auto;
    min-height:0;
    overflow-x:hidden;
    overflow-y:auto;
    padding-bottom:max(12px,env(safe-area-inset-bottom));
  }
  body.adventure-mode .main-content { padding:0 8px; }
  body.adventure-mode .content-area { min-height:0; overflow:hidden !important; padding:0 !important; }
  .topbar,
  body.adventure-mode .topbar { position:relative; top:auto; min-height:48px; margin:0 -10px; padding:0 10px; }
  .screen-modal-backdrop {
    bottom:calc(62px + env(safe-area-inset-bottom));
    padding:max(6px,env(safe-area-inset-top)) 8px 6px;
  }
  .screen-modal-backdrop > .screen-modal {
    width:100%;
    height:calc(100dvh - env(safe-area-inset-top) - 62px - env(safe-area-inset-bottom) - 12px) !important;
    max-height:calc(100dvh - env(safe-area-inset-top) - 62px - env(safe-area-inset-bottom) - 12px) !important;
  }
  body.adventure-mode .pvp-config-backdrop { padding:6px; }
  body.adventure-mode .pvp-team-config-modal {
    height:calc(100dvh - env(safe-area-inset-top) - env(safe-area-inset-bottom) - 12px);
    max-height:calc(100dvh - env(safe-area-inset-top) - env(safe-area-inset-bottom) - 12px);
  }
  body.adventure-mode .pvp-config-head { padding:8px 12px; }
  body.adventure-mode .pvp-config-tabs { padding-top:5px; }
  body.adventure-mode .pvp-config-content { padding:6px 10px; }
  body.adventure-mode .pvp-config-foot { flex-direction:row; align-items:center; padding:6px 10px; }
  body.adventure-mode .pvp-config-foot > span { flex:1 1 250px; }
  body.adventure-mode .pvp-config-foot .button { width:auto; min-width:160px; }
}

/* Keep the desktop navigation and game content scrollable in short PC windows. */
@media (orientation:landscape) and (max-height:600px) and (min-width:821px) and (hover:hover) {
  .sidebar,
  body.adventure-mode .sidebar { overflow-x:hidden; overflow-y:auto; scrollbar-width:thin; }
  body.adventure-mode .content-area { overflow-x:hidden !important; overflow-y:auto !important; }
}

.pvp-challenge-notifications {
  position:fixed;
  z-index:120;
  top:8px;
  top:max(8px,calc(env(safe-area-inset-top,0px) + 8px));
  right:8px;
  right:max(8px,calc(env(safe-area-inset-right,0px) + 8px));
  width:min(440px,calc(100vw - 16px));
  max-height:calc(100vh - 24px);
  max-height:calc(100dvh - env(safe-area-inset-top,0px) - env(safe-area-inset-bottom,0px) - 24px);
  display:grid;
  align-content:start;
  gap:8px;
  overflow-x:hidden;
  overflow-y:auto;
  pointer-events:none;
}
.pvp-challenge-notifications[hidden] { display:none !important; }
.pvp-challenge-notification {
  min-width:0;
  display:grid;
  grid-template-columns:34px minmax(0,1fr);
  align-items:start;
  gap:8px 10px;
  padding:12px;
  border:1px solid rgba(116,210,227,.38);
  border-radius:14px;
  color:#edf4fc;
  background:linear-gradient(145deg,rgba(24,38,61,.98),rgba(10,19,34,.98));
  box-shadow:0 16px 40px rgba(0,0,0,.5),inset 0 1px rgba(255,255,255,.04);
  pointer-events:auto;
}
.pvp-challenge-notification-icon {
  grid-row:1 / span 2;
  width:34px;
  height:34px;
  display:grid;
  place-items:center;
  border:1px solid rgba(116,210,227,.3);
  border-radius:10px;
  color:#9cebe0;
  background:rgba(59,143,157,.2);
  font-size:18px;
}
.pvp-challenge-notification-copy { min-width:0; display:grid; gap:4px; }
.pvp-challenge-notification-copy > strong { color:#f1f5fc; font-size:12px; }
.pvp-challenge-notification-copy p { margin:0; color:#becbd9; font-size:11px; line-height:1.4; }
.pvp-challenge-notification-copy small { color:#f0d58e; font:700 10px/1.2 'DM Mono',monospace; }
.pvp-challenge-notification-actions { grid-column:2; display:flex; flex-wrap:wrap; gap:7px; }
.pvp-challenge-notification-actions .button { flex:1 1 110px; min-height:44px; justify-content:center; touch-action:manipulation; }
.pvp-challenge-notification-actions .button:disabled { opacity:.58; }
.pvp-preference-status { display:block; margin-top:7px; color:#93a8bb; font-size:9px; line-height:1.45; }
.setting-row .toggle-switch:disabled { opacity:.55; cursor:wait; }
@media (max-width:520px) {
  .pvp-challenge-notifications { right:8px; left:8px; width:auto; }
  .pvp-challenge-notification { padding:10px; }
}
@media (orientation:landscape) and (max-height:600px) and (hover:none) and (pointer:coarse) {
  .pvp-challenge-notifications { top:6px; top:max(6px,env(safe-area-inset-top)); right:8px; left:50%; width:min(500px,calc(100vw - 16px)); transform:translateX(-50%); }
}

/* Put clear names under the main navigation icons on touch screens and the compact desktop rail. */
@media (max-width:820px) {
  .main-nav,
  body.adventure-mode .main-nav {
    grid-template-columns:repeat(7,minmax(0,1fr));
    gap:4px;
    overflow:visible;
  }
  .nav-button,
  .nav-button.mobile-settings-nav,
  body.adventure-mode .nav-button,
  body.adventure-mode .nav-button.mobile-settings-nav {
    flex-direction:column;
    align-items:center;
    justify-content:center;
    gap:3px;
  }
  .nav-icon,
  body.adventure-mode .nav-icon { width:26px; height:24px; }
  .nav-icon svg,
  body.adventure-mode .nav-icon svg { width:23px; height:23px; }
  .nav-button > span:nth-child(2),
  body.adventure-mode .nav-button > span:nth-child(2) {
    display:block !important;
    flex:0 0 auto;
    max-width:100%;
    overflow:hidden;
    color:#c6d2e3;
    font-size:8.5px;
    font-weight:700;
    line-height:1.1;
    text-align:center;
    text-overflow:ellipsis;
    white-space:nowrap;
  }
  .nav-count,
  body.adventure-mode .nav-count { display:none !important; }
}
@media (min-width:821px) {
  body.adventure-mode .app-shell:not(.sidebar-expanded) .main-nav { gap:5px; }
  body.adventure-mode .app-shell:not(.sidebar-expanded) .nav-button {
    width:56px;
    min-width:56px;
    height:54px;
    min-height:54px;
    flex-direction:column;
    justify-content:center;
    gap:2px;
    padding:2px;
  }
  body.adventure-mode .app-shell:not(.sidebar-expanded) .nav-icon { width:21px; height:19px; }
  body.adventure-mode .app-shell:not(.sidebar-expanded) .nav-icon svg { width:16px; height:16px; }
  body.adventure-mode .app-shell:not(.sidebar-expanded) .nav-button > span:nth-child(2) {
    display:block !important;
    max-width:100%;
    overflow:hidden;
    color:#c6d2e3;
    font-size:8px;
    font-weight:700;
    line-height:1;
    text-align:center;
    text-overflow:ellipsis;
    white-space:nowrap;
  }
  body.adventure-mode .app-shell:not(.sidebar-expanded) .nav-count { display:none !important; }
}
@media (orientation:landscape) and (max-height:600px) and (hover:none) and (pointer:coarse) {
  .nav-icon svg,
  body.adventure-mode .nav-icon svg { width:21px; height:21px; }
  .nav-button > span:nth-child(2),
  body.adventure-mode .nav-button > span:nth-child(2) { display:block !important; font-size:8px; }
}

/* Dense hunt catalog with readable flipped-card details and tier colors. */
.screen-modal-content-hunts { padding:8px 11px 10px !important; }
.screen-modal-content-hunts .hunt-page { display:grid; align-content:start; gap:7px; min-width:0; }
.screen-modal-content-hunts .hunt-page-intro { display:none; }
.screen-modal-content-hunts .hunt-page-toolbar { gap:8px; margin:0; }
.screen-modal-content-hunts .hunt-page-tier-list { display:grid; gap:8px; min-width:0; }
.screen-modal-content-hunts .hunt-page-tier-group {
  display:grid; gap:6px; min-width:0; padding:6px 7px 8px;
  border:1px solid rgba(var(--hunt-tier-rgb,169,190,224),.3); border-left:3px solid var(--hunt-tier-line,#8eacff);
  border-radius:12px; background:linear-gradient(145deg,rgba(var(--hunt-tier-rgb,169,190,224),.065),rgba(13,21,36,.3));
}
.hunt-page-tier-head, .hunt-picker-tier-head { min-width:0; }
.hunt-page-tier-head { display:flex; align-items:center; justify-content:space-between; gap:8px; padding:0 2px; }
.hunt-page-tier-head > div, .hunt-picker-tier-head > div { min-width:0; display:flex; align-items:center; gap:8px; }
.hunt-page-tier-head .power-tier, .hunt-picker-tier-head .power-tier.compact {
  flex:0 0 auto; min-height:25px; padding:5px 10px; font:900 11px/1.1 Inter,"Segoe UI",sans-serif; letter-spacing:.06em;
}
.hunt-page-tier-head strong, .hunt-picker-tier-head strong { color:#f1f5fc; font-size:12px; font-weight:800; }
.hunt-page-tier-head > small, .hunt-picker-tier-head > small { color:#b5c2d5; font:700 9px/1.2 "DM Mono",monospace; white-space:nowrap; }
.hunt-gallery.hunt-page-tier-grid, .hunt-picker-level-grid { grid-template-columns:repeat(5,minmax(0,1fr)); gap:7px; }

.hunt-page-tier-group[data-tier="5"], .hunt-picker-tier-group[data-hunt-tier-group="5"], .hunt-tile[data-tier="5"] {
  --hunt-tier-line:#a8baaa; --hunt-tier-rgb:168,186,170; --hunt-tier-surface:linear-gradient(145deg,rgba(49,66,57,.98),rgba(20,31,29,.98));
}
.hunt-page-tier-group[data-tier="4"], .hunt-picker-tier-group[data-hunt-tier-group="4"], .hunt-tile[data-tier="4"] {
  --hunt-tier-line:#83d28f; --hunt-tier-rgb:131,210,143; --hunt-tier-surface:linear-gradient(145deg,rgba(27,78,54,.98),rgba(14,38,33,.98));
}
.hunt-page-tier-group[data-tier="3"], .hunt-picker-tier-group[data-hunt-tier-group="3"], .hunt-tile[data-tier="3"] {
  --hunt-tier-line:#62ced0; --hunt-tier-rgb:98,206,208; --hunt-tier-surface:linear-gradient(145deg,rgba(24,72,83,.98),rgba(15,34,48,.98));
}
.hunt-page-tier-group[data-tier="2"], .hunt-picker-tier-group[data-hunt-tier-group="2"], .hunt-tile[data-tier="2"] {
  --hunt-tier-line:#95a5ff; --hunt-tier-rgb:149,165,255; --hunt-tier-surface:linear-gradient(145deg,rgba(51,57,104,.98),rgba(26,31,62,.98));
}
.hunt-page-tier-group[data-tier="1"], .hunt-picker-tier-group[data-hunt-tier-group="1"], .hunt-tile[data-tier="1"] {
  --hunt-tier-line:#f3c968; --hunt-tier-rgb:243,201,104; --hunt-tier-surface:linear-gradient(145deg,rgba(94,69,28,.98),rgba(43,36,27,.98));
}
.hunt-picker-tier-group[data-hunt-tier-group] { border-bottom-color:rgba(var(--hunt-tier-rgb),.32); }
.hunt-tile { height:160px; min-height:0; padding:0; }
.hunt-tile-face {
  padding:8px; border:1px solid rgba(var(--hunt-tier-rgb,168,186,170),.78); border-left:3px solid var(--hunt-tier-line,#a8baaa);
  background:var(--hunt-tier-surface,linear-gradient(145deg,rgba(23,47,61,.96),rgba(15,29,43,.98)));
  box-shadow:inset 0 0 0 1px rgba(var(--hunt-tier-rgb,168,186,170),.11),0 5px 14px rgba(0,0,0,.18);
}
.hunt-tile.selected .hunt-tile-face { border-color:var(--hunt-tier-line,#a8baaa); box-shadow:inset 0 0 0 1px rgba(var(--hunt-tier-rgb,168,186,170),.3),0 0 0 1px rgba(var(--hunt-tier-rgb,168,186,170),.28),0 0 16px rgba(var(--hunt-tier-rgb,168,186,170),.16); }
.hunt-tile-back { gap:3px; }
.hunt-tile-back-head { min-height:19px; gap:5px; }
.hunt-tile-back-head > span:first-child { font-size:9px; line-height:1.2; }
.hunt-tile-status { font-size:8px; line-height:1.15; }
.hunt-tile-back-flip { height:20px; min-width:40px; padding:0 6px; font-size:8px; }
.hunt-tile-route-name { font-size:11px; line-height:1.2; }
.hunt-tile-back .hunt-tile-foot { font-size:9px; line-height:1.2; }
.hunt-tile-back .hunt-tile-foot strong { font-size:10px; }
.hunt-tile-back .bestiary-progress, .hunt-tile-back .capture-study-progress { gap:3px; }
.hunt-tile-back .bestiary-progress small, .hunt-tile-back .capture-study-progress small {
  display:block; font:700 8px/1.2 Inter,"Segoe UI",sans-serif; letter-spacing:.01em;
}
.hunt-tile-back .bestiary-progress > i, .hunt-tile-back .capture-study-progress > i { height:4px; }
.hunt-tile-enter { min-height:25px; font-size:9px; }
.hunt-picker-toolbar { gap:8px; padding:8px 12px; }
.hunt-picker-gallery { gap:9px; padding:0 12px 12px; }
.hunt-picker-tier-group { gap:7px; padding-bottom:9px; }
.hunt-picker-level-group { gap:6px; padding-bottom:8px; }
.hunt-picker-level-head { padding:0 2px; }

@media (max-width:1100px) {
  .hunt-gallery.hunt-page-tier-grid, .hunt-picker-level-grid { grid-template-columns:repeat(4,minmax(0,1fr)); }
}
@media (max-width:820px) {
  .hunt-gallery.hunt-page-tier-grid, .hunt-picker-level-grid { grid-template-columns:repeat(3,minmax(0,1fr)); }
  .screen-modal-content-hunts { padding:7px 8px 9px !important; }
}
@media (max-width:680px) {
  .hunt-gallery.hunt-page-tier-grid, .hunt-picker-level-grid { grid-template-columns:repeat(2,minmax(0,1fr)); gap:6px; }
  .hunt-tile { height:164px; }
  .hunt-tile-face { padding:7px; }
  .hunt-page-tier-group { gap:5px; padding:5px 5px 7px; }
  .hunt-page-tier-head .power-tier, .hunt-picker-tier-head .power-tier.compact { min-height:24px; padding:4px 8px; font-size:10px; }
  .hunt-page-tier-head strong, .hunt-picker-tier-head strong { font-size:11px; }
  .hunt-page-tier-head > small, .hunt-picker-tier-head > small { font-size:8px; }
  .hunt-picker-toolbar { padding:7px 9px; }
  .hunt-picker-gallery { gap:8px; padding:0 9px 9px; }
}
@media (max-width:360px) {
  .hunt-gallery.hunt-page-tier-grid, .hunt-picker-level-grid { grid-template-columns:1fr; }
}
.hunt-tile:hover .hunt-tile-face { border-color:var(--hunt-tier-line,#a8baaa); box-shadow:inset 0 0 0 1px rgba(var(--hunt-tier-rgb,168,186,170),.2),0 0 14px rgba(var(--hunt-tier-rgb,168,186,170),.14); }
.hunt-tile.is-locked .hunt-tile-front { border-color:rgba(var(--hunt-tier-rgb,168,186,170),.68); background:var(--hunt-tier-surface,linear-gradient(145deg,rgba(23,47,61,.96),rgba(15,29,43,.98))); }
.hunt-tile-back-flip { min-width:0; padding:0 5px; }
.hunt-picker-tier-group[data-hunt-tier-group] {
  gap:7px; padding:8px; border:1px solid rgba(var(--hunt-tier-rgb),.28); border-left:3px solid var(--hunt-tier-line);
  border-radius:12px; background:linear-gradient(145deg,rgba(var(--hunt-tier-rgb),.055),rgba(12,20,34,.34));
}

/* Persistent player mail */
.player-mail-nav { position:relative; }
.nav-mail-alert:not([hidden]) { position:absolute; top:3px; right:5px; min-width:17px; height:17px; display:grid; place-items:center; padding:0 4px; border:1px solid rgba(10,16,30,.9); border-radius:99px; color:#fff; background:#e25f77; box-shadow:0 2px 8px rgba(0,0,0,.3); font:800 8px 'DM Mono',monospace; }
.player-mail-nav.has-mail-unread .nav-icon { color:#ff9aab; }
.player-mail-backdrop { z-index:82; padding:14px; }
.player-mail-modal { width:min(980px,calc(100vw - 28px)); height:min(760px,calc(100dvh - 28px)); max-height:calc(100dvh - 28px); display:flex; flex-direction:column; overflow:hidden; padding:0; border:1px solid rgba(151,193,212,.24); border-radius:16px; color:#e1edf1; background:linear-gradient(150deg,#132536,#0a1725 72%); box-shadow:0 28px 90px rgba(0,0,0,.62); }
.player-mail-head { flex:0 0 auto; display:flex; align-items:flex-start; justify-content:space-between; gap:12px; padding:15px 19px 12px; border-bottom:1px solid rgba(151,193,212,.15); }
.player-mail-head h2 { margin:3px 0 0; color:#edf5f8; font-size:20px; }
.player-mail-head p { margin:4px 0 0; color:#90a7b4; font-size:10px; line-height:1.45; }
.player-mail-content { min-height:0; flex:1; }
.player-mail-layout { min-height:0; height:100%; display:grid; grid-template-columns:minmax(220px,290px) minmax(0,1fr); }
.player-mail-sidebar { min-height:0; display:flex; flex-direction:column; overflow:hidden; border-right:1px solid rgba(151,193,212,.13); background:rgba(4,14,23,.2); }
.player-mail-new-form { flex:0 0 auto; display:grid; gap:6px; padding:12px; border-bottom:1px solid rgba(151,193,212,.12); }
.player-mail-new-form label { color:#cadce2; font-size:10px; font-weight:800; }
.player-mail-new-form > div { display:flex; gap:6px; }
.player-mail-new-form input { width:100%; min-width:0; height:34px; padding:0 9px; border:1px solid rgba(151,193,212,.2); border-radius:8px; outline:none; color:#e4eff2; background:rgba(4,14,23,.74); font:inherit; font-size:10px; }
.player-mail-new-form input:focus,.player-mail-composer textarea:focus { border-color:rgba(116,210,227,.6); box-shadow:0 0 0 2px rgba(116,210,227,.1); }
.player-mail-new-form .button { flex:0 0 38px; min-width:38px; padding:0; font-size:14px; }
.player-mail-new-form small { color:#738c9a; font-size:8px; }
.player-mail-list-head { flex:0 0 auto; display:flex; justify-content:space-between; align-items:center; gap:8px; padding:10px 12px 7px; color:#9eb2be; font-size:9px; text-transform:uppercase; letter-spacing:.08em; }
.player-mail-list-head span { color:#708896; font:8px 'DM Mono',monospace; }
.player-mail-thread-list { min-height:0; display:grid; align-content:start; gap:3px; overflow:auto; padding:0 7px 10px; }
.player-mail-thread-item { min-width:0; display:grid; grid-template-columns:32px minmax(0,1fr) auto; align-items:center; gap:8px; padding:8px 7px; border:1px solid transparent; border-radius:9px; color:inherit; text-align:left; background:transparent; cursor:pointer; }
.player-mail-thread-item:hover,.player-mail-thread-item.is-active { border-color:rgba(116,210,227,.18); background:rgba(66,133,150,.13); }
.player-mail-thread-item.has-unread .player-mail-thread-copy strong { color:#f0fbff; }
.player-mail-thread-avatar { width:31px; height:31px; flex:0 0 31px; display:grid; place-items:center; border:1px solid rgba(116,210,227,.24); border-radius:10px; color:#9ce1df; background:rgba(45,116,131,.17); font-size:11px; font-weight:800; }
.player-mail-thread-copy { min-width:0; display:grid; gap:4px; }
.player-mail-thread-copy strong { overflow:hidden; color:#dce8ed; font-size:10px; text-overflow:ellipsis; white-space:nowrap; }
.player-mail-thread-copy small { overflow:hidden; color:#8299a5; font-size:8px; text-overflow:ellipsis; white-space:nowrap; }
.player-mail-thread-meta { align-self:stretch; display:flex; flex-direction:column; align-items:flex-end; justify-content:space-between; gap:4px; }
.player-mail-thread-meta time { color:#708795; font:7px 'DM Mono',monospace; white-space:nowrap; }
.player-mail-thread-meta b { min-width:16px; height:16px; display:grid; place-items:center; padding:0 3px; border-radius:99px; color:#fff; background:#d75d73; font:800 7px 'DM Mono',monospace; }
.player-mail-list-empty { margin:7px; color:#758c99; font-size:9px; line-height:1.5; }
.player-mail-conversation { min-width:0; min-height:0; display:grid; grid-template-rows:auto minmax(0,1fr) auto auto; }
.player-mail-conversation-head { min-width:0; display:flex; align-items:center; gap:9px; padding:10px 14px; border-bottom:1px solid rgba(151,193,212,.12); }
.player-mail-conversation-head > div { min-width:0; display:grid; gap:3px; }
.player-mail-conversation-head strong { overflow:hidden; color:#e7f2f5; font-size:11px; text-overflow:ellipsis; white-space:nowrap; }
.player-mail-conversation-head small { color:#829aa7; font-size:8px; }
.player-mail-messages { min-height:0; display:flex; flex-direction:column; align-items:flex-start; gap:9px; overflow:auto; padding:13px; background:radial-gradient(ellipse at 50% 0,rgba(54,115,132,.1),transparent 64%); }
.player-mail-message { width:fit-content; max-width:min(82%,600px); padding:8px 10px; border:1px solid rgba(151,193,212,.14); border-radius:11px 11px 11px 3px; background:rgba(5,18,29,.76); box-shadow:0 5px 13px rgba(0,0,0,.12); }
.player-mail-message.is-mine { align-self:flex-end; border-color:rgba(105,204,188,.2); border-radius:11px 11px 3px 11px; background:rgba(33,85,83,.34); }
.player-mail-message > div { display:flex; align-items:center; justify-content:space-between; gap:14px; margin-bottom:4px; }
.player-mail-message > div span { color:#9bd9d8; font-size:8px; font-weight:800; }
.player-mail-message > div time { color:#718a97; font:7px 'DM Mono',monospace; }
.player-mail-message p { margin:0; color:#d9e5e9; font-size:10px; line-height:1.5; overflow-wrap:anywhere; }
.player-mail-empty { flex:1; width:100%; display:grid; align-content:center; justify-items:center; gap:7px; padding:22px; color:#8199a6; text-align:center; }
.player-mail-empty > span { color:#79d8d2; font-size:26px; }
.player-mail-empty strong { color:#c9dce2; font-size:11px; }
.player-mail-empty p { max-width:340px; margin:0; font-size:9px; line-height:1.5; }
.player-mail-older { align-self:center; padding:5px 9px; border:1px solid rgba(151,193,212,.14); border-radius:7px; color:#a8c4ce; background:rgba(20,43,55,.6); font-size:8px; cursor:pointer; }
.player-mail-notice { margin:0; padding:5px 13px; color:#f1a99d; font-size:8px; }
.player-mail-composer { display:grid; gap:6px; padding:9px 12px 11px; border-top:1px solid rgba(151,193,212,.12); background:rgba(4,13,22,.44); }
.player-mail-composer textarea { width:100%; min-height:48px; max-height:120px; resize:vertical; padding:8px 9px; border:1px solid rgba(151,193,212,.19); border-radius:8px; outline:none; color:#e4eff2; background:rgba(4,14,23,.74); font:inherit; font-size:10px; line-height:1.4; }
.player-mail-composer > div { display:flex; align-items:center; justify-content:space-between; gap:8px; }
.player-mail-composer small { color:#728b97; font-size:8px; }
.player-mail-composer .button { min-height:31px; padding:0 14px; font-size:9px; }
.player-mail-foot { flex:0 0 auto; padding:7px 13px; border-top:1px solid rgba(151,193,212,.1); color:#708795; font-size:8px; text-align:center; }
body.adventure-mode .player-mail-modal { border:1px solid rgba(151,193,212,.24); border-radius:16px; color:#e1edf1; background:linear-gradient(150deg,#132536,#0a1725 72%); box-shadow:0 28px 90px rgba(0,0,0,.62); }
body.adventure-mode .player-mail-modal h2 { color:#edf5f8; font-family:inherit; }
body.adventure-mode .player-mail-new-form input,body.adventure-mode .player-mail-composer textarea { border-radius:8px; color:#e4eff2; background:rgba(4,14,23,.74); font-family:inherit; }
body.adventure-mode .player-mail-new-form button,body.adventure-mode .player-mail-composer button { border-radius:8px; font-family:inherit; }
@media(max-width:650px) {
  .player-mail-backdrop { padding:7px; }
  .player-mail-modal { width:calc(100vw - 14px); height:calc(100dvh - 14px); max-height:calc(100dvh - 14px); border-radius:12px; }
  .player-mail-head { padding:11px 12px 9px; }
  .player-mail-head h2 { font-size:17px; }
  .player-mail-head p { max-width:280px; font-size:8px; }
  .player-mail-layout { grid-template-columns:minmax(0,1fr); grid-template-rows:minmax(110px,28%) minmax(0,1fr); }
  .player-mail-sidebar { border-right:0; border-bottom:1px solid rgba(151,193,212,.14); }
  .player-mail-new-form { grid-template-columns:minmax(80px,.5fr) minmax(0,1fr); align-items:center; gap:4px 8px; padding:7px 9px; }
  .player-mail-new-form label { grid-column:1; }
  .player-mail-new-form > div { grid-column:2; grid-row:1 / span 2; }
  .player-mail-new-form small { grid-column:1; }
  .player-mail-new-form input { height:31px; }
  .player-mail-list-head { padding:5px 10px 3px; }
  .player-mail-thread-list { grid-template-columns:repeat(auto-fill,minmax(185px,1fr)); grid-auto-rows:min-content; overflow:auto; padding:0 7px 6px; }
  .player-mail-thread-item { grid-template-columns:28px minmax(0,1fr) auto; gap:6px; padding:5px; }
  .player-mail-thread-avatar { width:27px; height:27px; flex-basis:27px; border-radius:8px; }
  .player-mail-thread-copy { gap:2px; }
  .player-mail-thread-copy strong { font-size:9px; }
  .player-mail-thread-copy small { font-size:7px; }
  .player-mail-thread-meta time { font-size:6px; }
  .player-mail-conversation-head { padding:7px 10px; }
  .player-mail-messages { gap:7px; padding:9px; }
  .player-mail-message { max-width:90%; padding:7px 8px; }
  .player-mail-message p { font-size:9px; }
  .player-mail-composer { padding:7px 8px calc(8px + env(safe-area-inset-bottom)); }
  .player-mail-composer textarea { min-height:42px; }
  .player-mail-foot { font-size:7px; }
}
