/* Double root IDs outrank the legacy :is(...,#move-priority-panel) theme without affecting other panels. */
/* Community panels — scoped to the existing GVG, Rankings and Guild surfaces. */
body :is(#rankings-system#rankings-system,#guild-system#guild-system,#guild-gym-global-warning) {
  --community-bg:#071827;--community-panel:#0b2234;--community-line:#28536b;
  --community-text:#e3f2fa;--community-muted:#a2c1d2;--community-cyan:#79dcff;
  color:var(--community-text);font-family:Arial,sans-serif;
}
body :is(#rankings-system#rankings-system,#guild-system#guild-system) {padding:12px!important}
body :is(#rankings-system#rankings-system,#guild-system#guild-system) :is(.system-window,.guild-content,.ranking-toolbar,.ranking-podium,.ranking-list) {box-sizing:border-box;min-width:0}
body :is(#rankings-system#rankings-system,#guild-system#guild-system) .system-window {
  width:min(1080px,calc(100vw - 24px))!important;max-width:1080px!important;
  max-height:calc(100dvh - 32px)!important;border:1px solid #3894b8!important;
  border-radius:4px 16px!important;background:var(--community-bg)!important;
  box-shadow:0 22px 70px #000a,inset 0 0 0 3px #0a2c40!important;
  color:var(--community-text)!important;overflow:auto!important;
  scrollbar-width:thin;scrollbar-color:#317795 #071827;
}
body :is(#rankings-system#rankings-system,#guild-system#guild-system) .system-window>header {
  display:flex!important;align-items:center!important;justify-content:space-between!important;gap:16px;
  padding:18px 22px!important;min-height:72px!important;border-bottom:1px solid var(--community-line)!important;
  background:linear-gradient(110deg,#10344c,#0a2031)!important;box-shadow:none!important;
}
body :is(#rankings-system#rankings-system,#guild-system#guild-system) .system-window>header>div {min-width:0}
body :is(#rankings-system#rankings-system,#guild-system#guild-system) .system-window>header small {
  color:var(--community-cyan)!important;font:700 9px/1.5 Arial,sans-serif!important;letter-spacing:1.7px!important;
}
body :is(#rankings-system#rankings-system,#guild-system#guild-system) .system-window>header h2 {
  margin:4px 0 0!important;color:#f4fbff!important;font:700 25px/1.15 Arial,sans-serif!important;letter-spacing:0!important;
}
body :is(#rankings-system#rankings-system,#guild-system#guild-system) .system-window>header h2 em {color:var(--community-cyan)!important;font-style:normal!important}
body :is(#rankings-system#rankings-system,#guild-system#guild-system) .system-window>header p {margin:7px 0 0!important;color:var(--community-muted)!important;font:12px/1.45 Arial,sans-serif!important}
body :is(#rankings-system#rankings-system,#guild-system#guild-system) .system-window>header>button {
  flex:0 0 34px!important;width:34px!important;height:34px!important;border:1px solid #315d76!important;
  border-radius:5px!important;background:#0a2436!important;color:#dff6ff!important;font:23px/1 Arial,sans-serif!important;
}
body :is(#rankings-system#rankings-system,#guild-system#guild-system,#guild-gym-global-warning) :is(button,input,select,textarea):focus-visible {
  outline:2px solid #82e2ff!important;outline-offset:2px!important;
}
body :is(#rankings-system#rankings-system,#guild-system#guild-system) :is(input,select,textarea) {
  max-width:100%;min-width:0;border:1px solid #365c73!important;border-radius:5px!important;
  background:#081725!important;color:#e4f3fc!important;font-size:12px!important;
}
/* GVG uses its real countdown and native registration/dismiss actions. */
body #guild-gym-global-warning {inset:82px 12px auto!important}
body #guild-gym-global-warning .gvg-global-warning-card {
  box-sizing:border-box!important;width:min(560px,100%)!important;max-height:calc(100dvh - 100px)!important;
  padding:26px!important;overflow-x:hidden!important;overflow-y:auto!important;
  border:1px solid #369dc3!important;border-radius:4px 16px!important;
  background:linear-gradient(140deg,#0c2b41,#061523 75%)!important;box-shadow:0 18px 55px #000a,inset 0 0 0 3px #0a2638!important;
  scrollbar-width:thin;scrollbar-color:#317795 #071827;
}
body #guild-gym-global-warning .gvg-global-warning-card:before {content:none!important}
body #guild-gym-global-warning .gvg-global-warning-kicker {color:#79dcff!important;font:700 10px/1.5 Arial,sans-serif!important;letter-spacing:1.5px!important}
body #guild-gym-global-warning h2 {margin:12px 0!important;color:#fff0b1!important;font:700 clamp(24px,3vw,32px)/1.16 Arial,sans-serif!important;overflow-wrap:anywhere}
body #guild-gym-global-warning p {margin:0 auto 20px!important;color:#b9d2e1!important;font:13px/1.6 Arial,sans-serif!important}
body #guild-gym-global-warning .gvg-global-warning-clock {
  min-width:0!important;max-width:100%;box-sizing:border-box;padding:12px 28px!important;margin-bottom:20px!important;
  background:#071a2a!important;border:1px solid #316986!important;border-radius:5px!important;
}
body #guild-gym-global-warning .gvg-global-warning-clock small {color:#99c4d9!important;letter-spacing:1px!important}
body #guild-gym-global-warning .gvg-global-warning-clock strong {color:#e5f7ff!important;font:700 30px/1.3 Arial,sans-serif!important;font-variant-numeric:tabular-nums!important}
body #guild-gym-global-warning .gvg-global-warning-actions {display:grid!important;grid-template-columns:minmax(0,1fr) auto!important;gap:10px!important}
body #guild-gym-global-warning button {min-height:42px;border:1px solid #355c74!important;border-radius:5px!important;padding:12px!important;background:#0d283a!important;color:#d5eaf5!important;font:700 11px/1.35 Arial,sans-serif!important;white-space:normal!important}
body #guild-gym-global-warning button.primary {border-color:#49bce6!important;background:linear-gradient(#1475a4,#0a476c)!important;color:#f5fcff!important;box-shadow:none!important}
/* Official rankings; layout changes never touch the ranking data. */
body #rankings-system#rankings-system .ranking-scope-tabs {
  display:flex!important;gap:0!important;padding:0 18px!important;background:#091d2c!important;border-bottom:1px solid var(--community-line)!important;
}
body #rankings-system#rankings-system .ranking-scope-tabs button {
  flex:1;min-height:44px!important;margin:0!important;padding:10px!important;border:0!important;border-bottom:2px solid transparent!important;
  border-radius:0!important;background:transparent!important;box-shadow:none!important;color:#9fbfce!important;font:700 11px/1.3 Arial,sans-serif!important;
}
body #rankings-system#rankings-system .ranking-scope-tabs button.active {color:#dcf6ff!important;border-bottom-color:#66d7ff!important;background:#103047!important}
body #rankings-system#rankings-system .ranking-toolbar {display:flex!important;align-items:end!important;justify-content:space-between!important;gap:16px!important;padding:18px 22px!important;background:transparent!important;border-bottom:1px solid #1b394d!important}
body #rankings-system#rankings-system .ranking-toolbar label {display:grid;gap:7px;flex:0 1 250px;min-width:0}
body #rankings-system#rankings-system .ranking-toolbar label>span {font:700 9px/1.3 Arial,sans-serif!important;color:#97c6dc!important;letter-spacing:1px}
body #rankings-system#rankings-system select {min-height:36px!important;width:100%!important}
body #rankings-system#rankings-system .ranking-status {flex:1;font:11px/1.5 Arial,sans-serif!important;color:#98b8cc!important;text-align:right}
body #rankings-system#rankings-system .ranking-podium {display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;align-items:stretch!important;gap:10px!important;padding:18px 22px!important;margin:0!important}
body #rankings-system#rankings-system .ranking-podium-card {
  display:flex!important;flex-direction:column!important;align-items:center!important;justify-content:center!important;
  position:relative!important;min-width:0!important;min-height:160px!important;margin:0!important;padding:16px 10px!important;
  background:linear-gradient(150deg,#102c40,#091c2b)!important;border:1px solid #426578!important;border-radius:7px!important;box-shadow:none!important;transform:none!important;text-align:center;
}
body #rankings-system#rankings-system .ranking-podium-card.gold {border-color:#b59951!important;background:linear-gradient(155deg,#2c2e26,#0a2032 70%)!important}
body #rankings-system#rankings-system .ranking-podium-card.bronze {border-color:#936848!important}
body #rankings-system#rankings-system .ranking-crown {font-size:20px!important;color:#b7d3e5!important;text-shadow:none!important}
body #rankings-system#rankings-system .gold .ranking-crown,body #rankings-system#rankings-system .gold>strong {color:#ffdf82!important}
body #rankings-system#rankings-system .bronze .ranking-crown,body #rankings-system#rankings-system .bronze>strong {color:#e1ab83!important}
body #rankings-system#rankings-system .ranking-place {position:absolute;right:8px;top:8px;color:#9bbccf!important;background:#071a2a!important;border:1px solid #305169!important;border-radius:4px!important;font:700 8px/1.4 Arial,sans-serif!important;padding:3px 5px}
body #rankings-system#rankings-system .ranking-identity {display:grid!important;place-items:center!important;background:#11334a!important;border:1px solid #3b6b86!important;border-radius:6px!important;color:#c3edff!important}
body #rankings-system#rankings-system .ranking-identity.podium {width:40px!important;height:40px!important;margin:6px auto!important}
body #rankings-system#rankings-system .ranking-podium-card h3 {margin:8px 0 4px!important;font:700 13px/1.3 Arial,sans-serif!important;color:#e8f5fb!important;overflow-wrap:anywhere}
body #rankings-system#rankings-system .ranking-podium-card :is(h3,small,em,strong) {position:static!important;width:100%!important;max-width:none!important;min-width:0!important;white-space:normal!important;overflow-wrap:anywhere!important;text-align:center!important}
body #rankings-system#rankings-system .ranking-podium-card small,body #rankings-system#rankings-system .ranking-podium-card em {display:block!important;color:#9cbccd!important;font:10px/1.45 Arial,sans-serif!important}
body #rankings-system#rankings-system .ranking-podium-card>strong {display:block!important;margin:8px 0 3px!important;color:#d8edf9!important;font:700 clamp(14px,1.7vw,20px)/1.2 Arial,sans-serif!important;overflow-wrap:anywhere}
body #rankings-system#rankings-system .ranking-list {max-height:36vh!important;overflow:auto!important;margin:0!important;padding:0 22px 20px!important;scrollbar-width:thin;scrollbar-color:#317795 #071827}
body #rankings-system#rankings-system .ranking-row {display:grid!important;grid-template-columns:34px 34px minmax(0,1fr) auto auto!important;gap:10px!important;align-items:center!important;margin:5px 0!important;padding:10px!important;min-height:54px;border:1px solid #233f53!important;border-radius:5px!important;background:#0c2232!important}
body #rankings-system#rankings-system .ranking-row.self {border-color:#56b8df!important;background:#11364b!important}
body #rankings-system#rankings-system .ranking-row>span {min-width:0}
body #rankings-system#rankings-system .ranking-row>span b {color:#e3f2fa!important;font-size:12px!important;overflow-wrap:anywhere}
body #rankings-system#rankings-system .ranking-row :is(small,em) {color:#9bbdce!important;font:10px/1.4 Arial,sans-serif!important}
body #rankings-system#rankings-system .ranking-row>strong {color:#ffdb80!important;font-size:12px!important}
body #rankings-system#rankings-system .ranking-row .ranking-identity {width:32px;height:32px}
body #rankings-system#rankings-system .ranking-value {color:#b6eaff!important;font-size:13px!important;overflow-wrap:anywhere}
body #rankings-system#rankings-system .ranking-empty {grid-column:1/-1;padding:24px!important;color:#a8c6d7!important;background:#0a1e2e!important;border:1px dashed #35566b!important;border-radius:5px!important}
/* Guild discovery and every existing tab share the same surfaces. */
body #guild-system#guild-system .guild-content {padding:18px!important;max-height:calc(100dvh - 112px)!important;overflow:auto!important;background:var(--community-bg)!important;scrollbar-color:#317795 #071827}
body #guild-system#guild-system :is(.guild-discovery-hero,.guild-command-hero) {border:1px solid #2f6a86!important;border-radius:7px!important;background:linear-gradient(115deg,#12364b,#0b2234)!important;padding:20px!important;box-shadow:none!important}
body #guild-system#guild-system :is(.guild-discovery-hero h3,.guild-command-brand h3) {color:#edf7ff!important;font:700 24px/1.2 Arial,sans-serif!important;letter-spacing:0!important;white-space:normal!important;overflow-wrap:anywhere}
body #guild-system#guild-system :is(.guild-discovery-hero small,.guild-command-brand>div>span) {color:#77d8fa!important}
body #guild-system#guild-system :is(.guild-panel,.guild-card,.guild-invite-card,.guild-directory>article,.guild-benefits article,.guild-member-list article,.guild-activity-list article) {background:#0b2131!important;border-color:#294d64!important;border-radius:6px!important;box-shadow:none!important}
body #guild-system#guild-system .guild-panel>header {border-bottom-color:#294d64!important}
body #guild-system#guild-system :is(.guild-panel h4,.guild-panel b,.guild-invite-card b) {color:#e3f2fa!important}
body #guild-system#guild-system :is(.guild-panel p,.guild-discovery-hero p,.guild-command-brand p,.guild-panel label,.guild-directory p) {color:#a9c8d9!important;font-size:12px!important;line-height:1.5!important}
body #guild-system#guild-system :is(.guild-panel small,.guild-command-metrics small,.guild-xp-large span,.guild-capacity-meter small) {color:#94bed2!important;font-size:9px!important}
body #guild-system#guild-system :is(.guild-panel>header small,.guild-directory>article>div>small,.guild-command-brand span) {color:#7bdafa!important}
body #guild-system#guild-system :is(.guild-panel>header>span,.guild-avatar,.guild-discovery-seal,.guild-command-metrics,.guild-benefits i,.guild-activity-icon) {border-color:#3b7995!important;background:#0b2b40!important;color:#beeaff!important;box-shadow:none!important;border-radius:6px!important}
body #guild-system#guild-system .guild-discovery-seal b {color:#ffdd83!important;font-family:Arial,sans-serif!important}
body #guild-system#guild-system :is(.guild-action,.guild-upload-button) {min-height:36px!important;padding:9px 12px!important;border:1px solid #3b9dc2!important;border-radius:5px!important;background:linear-gradient(#15618a,#0c3f5d)!important;color:#effaff!important;box-shadow:none!important;font:700 11px/1.3 Arial,sans-serif!important;letter-spacing:.2px!important}
body #guild-system#guild-system .guild-ghost {min-height:34px!important;border:1px solid #355d74!important;border-radius:5px!important;background:#0a2639!important;color:#c8e4f2!important;font-size:11px!important}
body #guild-system#guild-system :is(button:disabled,input:disabled) {opacity:.5!important;cursor:not-allowed!important}
body #guild-system#guild-system .guild-command-tabs {background:#091d2d!important;border-color:#294f66!important;overflow-x:auto!important;scrollbar-width:thin;scrollbar-color:#317795 #071827}
body #guild-system#guild-system .guild-command-tabs button {color:#a6c7d8!important;font-size:10px!important;letter-spacing:.3px!important;min-height:44px!important}
body #guild-system#guild-system .guild-command-tabs button.active {color:#d7f5ff!important;background:#103046!important}
body #guild-system#guild-system .guild-command-tabs button.active:after {background:#58cefa!important}
body #guild-system#guild-system :is(.guild-treasury,.guild-slot-upgrade,.guild-slot-roadmap>span,.guild-max-capacity,.guild-empty) {border-color:#345c73!important;border-radius:5px!important;background:#0a1c2b!important;color:#a9c8d9!important;box-shadow:none!important}
body #guild-system#guild-system :is(.guild-slot-roadmap .unlocked,.guild-slot-roadmap .available) {border-color:#438dae!important;background:#113147!important}
body #guild-system#guild-system :is(.guild-xp-large>i,.guild-capacity-meter>i) {background:#061622!important;border-color:#29536a!important}
body #guild-system#guild-system :is(.guild-xp-large>i>span,.guild-capacity-meter>i>span) {background:linear-gradient(90deg,#1779a5,#76dcff)!important;box-shadow:none!important}
body #guild-system#guild-system .guild-danger-zone {border-color:#835363!important;background:#241d2b!important}
body #guild-system#guild-system .guild-danger-zone :is(h4,small),body #guild-system#guild-system .guild-form-status.error {color:#ffc2cb!important}
body #guild-system#guild-system :is(.guild-danger-zone button,.guild-leave-button,.guild-member-remove) {border-color:#925766!important;background:#392131!important;color:#ffd6de!important}
/* Restore data-bearing controls that an older HUD layer hid. */
html.reference-hud.reference-hud.reference-hud.reference-hud.reference-hud body #stage #pokemon-team-bar .team-slot-helds {
  display:flex!important;position:absolute!important;inset:auto 7px 6px auto!important;gap:3px!important;width:auto!important;height:22px!important;z-index:2!important;
}
html.reference-hud.reference-hud.reference-hud.reference-hud.reference-hud body #stage #pokemon-team-bar .team-slot-helds i {
  display:grid!important;place-items:center!important;width:22px!important;height:22px!important;padding:0!important;
  box-sizing:border-box!important;border:1px solid #396780!important;border-radius:4px!important;background:#071a29!important;
  font:700 11px/1 Arial,sans-serif!important;color:#90b6cc!important;cursor:pointer!important;pointer-events:auto!important;
}
html.reference-hud.reference-hud.reference-hud.reference-hud.reference-hud body #stage #pokemon-team-bar .team-slot-helds i.filled {border-color:#6bd9ff!important;background:#123b54!important;color:#e1f7ff!important;box-shadow:inset 0 0 0 1px #246583!important}
html.reference-hud.reference-hud.reference-hud.reference-hud.reference-hud body #stage #pokemon-team-bar .status-bars {right:62px!important}
html.reference-hud.reference-hud.reference-hud.reference-hud.reference-hud body #stage #pokemon-team-bar .team-slot:after {content:none!important}
html.reference-hud.reference-hud.reference-hud.reference-hud.reference-hud body #shiny-kills-hunt-analyzer {
  display:flex!important;flex:0 0 auto!important;align-items:center!important;justify-content:center!important;gap:4px!important;
  width:auto!important;min-width:42px!important;min-height:26px!important;height:var(--rh-control-size,28px)!important;
  padding:0 6px!important;border:1px solid #70845d!important;border-radius:4px!important;background:#122c37!important;color:#ffe08a!important;
  font:700 11px/1 Arial,sans-serif!important;white-space:nowrap!important;
}
html.reference-hud.reference-hud.reference-hud.reference-hud.reference-hud body #shiny-kills-hunt-analyzer b {font:700 var(--rh-text-size,11px)/1 Arial,sans-serif!important;color:#ffdf86!important}
html.reference-hud body :is(.team-slot-helds i,#shiny-kills-hunt-analyzer):focus-visible {outline:2px solid #ffe393!important;outline-offset:1px!important}
@media(max-width:620px) {
  body :is(#rankings-system#rankings-system,#guild-system#guild-system) {padding:6px!important}
  body :is(#rankings-system#rankings-system,#guild-system#guild-system) .system-window {width:calc(100vw - 12px)!important;max-height:calc(100dvh - 16px)!important}
  body :is(#rankings-system#rankings-system,#guild-system#guild-system) .system-window>header {padding:14px!important;min-height:64px!important}
  body :is(#rankings-system#rankings-system,#guild-system#guild-system) .system-window>header h2 {font-size:21px!important}
  body #guild-gym-global-warning {inset:60px 8px auto!important}
  body #guild-gym-global-warning .gvg-global-warning-card {max-height:calc(100dvh - 76px)!important;padding:20px 16px!important}
  body #guild-gym-global-warning .gvg-global-warning-actions {grid-template-columns:1fr!important}
  body #rankings-system#rankings-system .ranking-toolbar {align-items:stretch!important;flex-direction:column!important;gap:10px!important;padding:14px!important}
  body #rankings-system#rankings-system .ranking-toolbar label {flex:auto!important}
  body #rankings-system#rankings-system .ranking-status {text-align:left!important}
  body #rankings-system#rankings-system .ranking-podium {gap:6px!important;padding:12px!important}
  body #rankings-system#rankings-system .ranking-podium-card {padding:12px 5px!important;min-height:170px!important}
  body #rankings-system#rankings-system .ranking-podium-card h3 {font-size:11px!important}
  body #rankings-system#rankings-system .ranking-podium-card small {font-size:9px!important}
  body #rankings-system#rankings-system .ranking-list {max-height:none!important;overflow:visible!important;padding:0 12px 12px!important}
  body #rankings-system#rankings-system .ranking-row {grid-template-columns:25px 28px minmax(0,1fr) auto!important;gap:6px!important;padding:8px!important}
  body #rankings-system#rankings-system .ranking-row>em {grid-column:3!important;grid-row:2!important}
  body #rankings-system#rankings-system .ranking-value {grid-column:4!important;grid-row:1/3!important;font-size:11px!important;max-width:100px}
  body #guild-system#guild-system .guild-content {padding:10px!important;max-height:calc(100dvh - 88px)!important}
  body #guild-system#guild-system :is(.guild-discovery-hero,.guild-command-hero) {padding:15px!important}
  body #guild-system#guild-system :is(.guild-discovery-hero h3,.guild-command-brand h3) {font-size:21px!important}
}
