.tg-normal   { --tg: 130, 130, 130; --tg-hi: 214, 214, 222; }
.tg-fire     { --tg: 228, 97, 62;   --tg-hi: 255, 198, 160; }
.tg-water    { --tg: 48, 153, 225;  --tg-hi: 170, 220, 255; }
.tg-electric { --tg: 223, 188, 40;  --tg-hi: 255, 238, 150; }
.tg-grass    { --tg: 67, 152, 55;   --tg-hi: 180, 236, 160; }
.tg-ice      { --tg: 71, 200, 200;  --tg-hi: 190, 248, 246; }
.tg-fighting { --tg: 228, 144, 33;  --tg-hi: 255, 210, 150; }
.tg-poison   { --tg: 147, 84, 203;  --tg-hi: 214, 180, 250; }
.tg-ground   { --tg: 164, 115, 60;  --tg-hi: 236, 200, 150; }
.tg-flying   { --tg: 116, 170, 208; --tg-hi: 206, 232, 250; }
.tg-psychic  { --tg: 233, 108, 140; --tg-hi: 255, 196, 214; }
.tg-bug      { --tg: 159, 159, 40;  --tg-hi: 226, 230, 150; }
.tg-rock     { --tg: 169, 164, 129; --tg-hi: 232, 228, 200; }
.tg-ghost    { --tg: 111, 69, 112;  --tg-hi: 214, 176, 222; }
.tg-dragon   { --tg: 87, 111, 188;  --tg-hi: 186, 200, 255; }
.tg-dark     { --tg: 79, 71, 71;    --tg-hi: 196, 186, 186; }
.tg-steel    { --tg: 116, 176, 203; --tg-hi: 210, 236, 248; }
.tg-fairy    { --tg: 225, 140, 225; --tg-hi: 255, 214, 255; }
.tg-stellar  { --tg: 64, 181, 165;  --tg-hi: 190, 246, 236; }
.tg-sound    { --tg: 154, 127, 214; --tg-hi: 220, 206, 255; }

.scene--xp .cine { min-height: clamp(400px, 46svh, 520px); }
.cine-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; min-height: 38px; }
.cine-top .crumbs { min-width: 0; }
.scene--xp .cine-copy > .cine-cap { max-width: 60ch; }
.scene--xp .cine-row { align-items: end; }

[class*="tg-"] .scene--xp::before {
  background:
    radial-gradient(240px 34px at var(--hx) calc(100% - 4px), rgba(var(--tg-hi), .75), rgba(var(--tg-hi), 0)),
    radial-gradient(620px 110px at var(--hx) 100%, rgba(var(--tg), .55), rgba(var(--tg), 0)),
    radial-gradient(980px 240px at calc(var(--hx) + 10%) 100%, rgba(52, 128, 204, .45), rgba(36, 100, 184, 0)),
    radial-gradient(130% 420px at 50% 100%, rgba(14, 44, 104, .75), rgba(10, 34, 86, 0)),
    radial-gradient(48% 90% at 0% 0%, rgba(34, 8, 46, .8), rgba(34, 8, 46, 0)),
    radial-gradient(48% 90% at 100% 0%, rgba(2, 4, 38, .8), rgba(2, 4, 38, 0)),
    linear-gradient(180deg, #08041a 0%, #050716 40%, #04102a 80%, #061a3c 100%);
}
[class*="tg-"] .scene--xp::after { background: linear-gradient(90deg, transparent, rgba(127, 210, 246, .6) 24%, rgba(var(--tg-hi), .95) 50%, rgba(var(--tg), .8) 72%, transparent); box-shadow: 0 0 22px 2px rgba(var(--tg), .4); }
.page--xp::before {
  background:
    radial-gradient(800px 360px at 62% 0%, rgba(var(--tg, 2, 128, 222), .13), transparent 70%),
    radial-gradient(560px 300px at 20% 6%, rgba(2, 128, 222, .1), transparent 70%),
    radial-gradient(560px 300px at 85% 8%, rgba(226, 92, 76, .07), transparent 70%) !important;
}
.page--xp .page-flow { gap: clamp(72px, 8vw, 104px); }
.page--xp .asec-sub a, .page--xp .note a { color: var(--cyan); }

.cine-types { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; margin-top: 22px; }
.cine-types .tpill, .cine-types .tchip { height: 30px; padding: 0 14px; font-size: 12.5px; }

.xp-pager { display: flex; flex-wrap: wrap; gap: 8px; }
.xp-pager > a, .xp-pager > span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 38px;
  padding: 0 15px;
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 999px;
  background: rgba(10, 8, 24, .35);
  -webkit-backdrop-filter: blur(8px);
          backdrop-filter: blur(8px);
  color: #fff;
  font: 400 12.5px/1 var(--mono);
  letter-spacing: .02em;
  white-space: nowrap;
  transition: border-color var(--t-fast) var(--ease-out), background-color var(--t-fast) var(--ease-out), translate var(--t-mid) var(--ease-out), scale var(--t-mid) var(--ease-spring);
}
.xp-pager > a:hover { border-color: rgba(127, 210, 246, .6); background-color: rgba(127, 210, 246, .1); }
.xp-pager > a:active { scale: .96; transition-duration: 80ms; }
.xp-pager .pager-num { color: var(--ink-3); font-variant-numeric: tabular-nums; }
.xp-pager .ico { width: 14px; height: 14px; color: var(--cantaloupe); transition: translate var(--t-mid) var(--ease-spring); }
.xp-pager-prev:hover .ico { translate: -3px 0; }
.xp-pager-next:hover .ico { translate: 3px 0; }

.plinth {
  --glow: rgb(var(--tg, 127, 210, 246));
  --glow-hi: rgb(var(--tg-hi, 255, 236, 226));
  position: relative;
  isolation: isolate;
  display: grid;
  place-items: end center;
  width: clamp(300px, 32vw, 440px);
  height: clamp(300px, 30vw, 400px);
  margin: 0 0 -10px;
  pointer-events: none;
}
.plinth > span:not(.plinth-obj) { position: absolute; pointer-events: none; }
.plinth-mark {
  z-index: -3;
  top: -.08em;
  left: 50%;
  translate: -50% 0;
  background: linear-gradient(180deg, color-mix(in srgb, var(--glow) 30%, rgba(255, 255, 255, .14)) 0%, rgba(255, 255, 255, 0) 80%);
  -webkit-background-clip: text;
          background-clip: text;
  color: transparent;
  font: italic 400 clamp(170px, 17vw, 250px)/1 var(--serif);
  letter-spacing: -.04em;
  white-space: nowrap;
  user-select: none;
}
.plinth-beam {
  z-index: -2;
  inset: -40px 0 6%;
  background: linear-gradient(180deg, rgba(127, 210, 246, 0) 0%, color-mix(in srgb, var(--glow) 40%, rgba(127, 210, 246, .5)) 55%, color-mix(in srgb, var(--glow-hi) 70%, rgba(255, 240, 232, .9)) 100%);
  -webkit-mask-image: conic-gradient(from 180deg at 50% -10%, #000 0deg, rgba(0, 0, 0, .5) 10deg, transparent 20deg, transparent 340deg, rgba(0, 0, 0, .5) 350deg, #000 360deg);
          mask-image: conic-gradient(from 180deg at 50% -10%, #000 0deg, rgba(0, 0, 0, .5) 10deg, transparent 20deg, transparent 340deg, rgba(0, 0, 0, .5) 350deg, #000 360deg);
  opacity: .42;
}
.plinth-floor {
  z-index: -2;
  right: -12%;
  bottom: -6%;
  left: -12%;
  height: 40%;
  background:
    radial-gradient(ellipse 20% 14% at 50% 50%, rgba(255, 248, 242, .95), rgba(255, 240, 230, 0)),
    radial-gradient(ellipse closest-side at 50% 50%, color-mix(in srgb, var(--glow) 50%, rgba(246, 208, 188, .8)), color-mix(in srgb, var(--glow) 18%, transparent) 55%, transparent);
  opacity: .9;
}
.plinth-ring {
  z-index: -1;
  bottom: 9%;
  left: 50%;
  width: 62%;
  aspect-ratio: 4.4;
  translate: -50% 0;
  border: 1.5px solid rgba(255, 244, 236, .85);
  border-radius: 50%;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--glow) 40%, rgba(255, 244, 236, .25)), transparent);
  box-shadow: 0 0 24px color-mix(in srgb, var(--glow) 65%, transparent), inset 0 0 16px rgba(255, 238, 226, .5);
}
.plinth-ring::after { position: absolute; inset: -12px -24px; border: 1px solid rgba(255, 244, 236, .45); border-radius: 50%; content: ""; }
.plinth-obj { position: relative; z-index: 1; display: grid; place-items: end center; width: 86%; height: 82%; margin-bottom: 13%; }
.plinth-obj > * { max-width: 100%; max-height: 100%; filter: drop-shadow(0 12px 16px rgba(0, 0, 0, .55)); }
.plinth-note {
  position: absolute;
  z-index: 2;
  right: 0;
  bottom: -14px;
  left: 0;
  margin: 0 auto;
  width: fit-content;
  max-width: 100%;
  padding: 6px 14px;
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 999px;
  background: rgba(4, 8, 18, .7);
  -webkit-backdrop-filter: blur(10px);
          backdrop-filter: blur(10px);
  color: var(--ink-2);
  font: 400 11.5px/1.35 var(--mono);
  text-align: center;
}
.plinth--small { width: clamp(220px, 22vw, 300px); height: clamp(220px, 21vw, 280px); }
.plinth--small .plinth-obj { width: 62%; height: 60%; margin-bottom: 16%; }
.plinth--small .plinth-ring { width: 58%; }

@keyframes plinth-rise { from { opacity: 0; translate: 0 26px; scale: .92; filter: blur(8px) drop-shadow(0 12px 16px rgba(0, 0, 0, .55)); } }
@keyframes plinth-light { from { opacity: 0; transform: scaleX(.3); } }
@keyframes plinth-ring { 0% { opacity: .9; scale: 1; } 100% { opacity: 0; scale: 1.9; } }
@keyframes plinth-bob { 0%, 100% { translate: 0 0; } 50% { translate: 0 -6px; } }
@media (prefers-reduced-motion: no-preference) {
  .plinth-obj { animation: plinth-rise 1.2s var(--ease-out) .55s backwards, plinth-bob 7s var(--ease-io) 2s infinite; }
  .plinth-floor, .plinth-beam { animation: plinth-light 1.4s var(--ease-out) .35s backwards; }
  .plinth-mark { animation: show 1.6s var(--ease-out) .2s backwards; opacity: 1; }
  .plinth-ring { animation: card-in 1s var(--ease-out) .45s backwards; }
  .plinth-ring::after { animation: plinth-ring 1.8s var(--ease-out) 1.5s 1 forwards; }
}

.xp-panel { min-width: 0; padding: clamp(18px, 2.2vw, 28px); border: 1px solid var(--line-2); border-radius: 24px; background: var(--panel), rgba(6, 10, 22, .5); }
.xp-ov > * + * { margin-top: 0; }
.xp-ov .note, .xp-ov .lead-text { max-width: 68ch; }
.lead-text { margin: 0 0 16px; color: #fff; font: 400 19px/1.65 var(--sans); text-wrap: pretty; }
.sub-h { display: flex; align-items: baseline; gap: 10px; margin: 36px 0 14px; color: #fff; font: 400 28px/1.1 var(--serif); }
.sub-h small { color: var(--ink-3); font: 400 12px/1 var(--mono); letter-spacing: .04em; }
.sub-h:first-child { margin-top: 0; }
.glance .chips, .glance .types { display: flex; flex-wrap: wrap; gap: 6px; }
.glance-note { margin-top: 14px !important; }
.glance .mono { font-family: var(--mono); font-size: 13.5px; }

:is(.lfilter-input, .tinput, .tselect, .spage-input, .compare-input) {
  transition: border-color var(--t-fast) var(--ease-out), box-shadow var(--t-mid) var(--ease-out), background-color var(--t-fast) var(--ease-out);
}
:is(.lfilter-input, .tinput, .tselect, .spage-input, .compare-input):hover { border-color: rgba(255, 255, 255, .28); }
:is(.lfilter-input, .tinput, .tselect, .spage-input, .compare-input):focus { border-color: rgba(127, 210, 246, .75); outline: none; box-shadow: 0 0 0 4px rgba(2, 151, 222, .2); }
:is(.lfilter-input, .tinput, .tselect, .spage-input, .compare-input):focus-visible { outline: none; }
:is(.seg-btn, .tpick, .tstrip-a, .btn, .ball-row, .lv-chip, .ball-more, .step-btn, .form-chip, .dm, .dcard-a, .spage-go) {
  transition:
    background-color var(--t-fast) var(--ease-out),
    border-color var(--t-fast) var(--ease-out),
    color var(--t-fast) var(--ease-out),
    box-shadow var(--t-mid) var(--ease-out),
    scale var(--t-mid) var(--ease-spring),
    translate var(--t-mid) var(--ease-out);
}
:is(.seg-btn, .tpick, .tstrip-a, .btn, .lv-chip, .ball-more, .step-btn, .form-chip, .spage-go):active:not(:disabled) { scale: .96; transition-duration: 80ms; }
:is(.ball-row):active:not(:disabled) { scale: .99; transition-duration: 80ms; }
:is(.seg-btn, .tpick, .tstrip-a, .btn, .lv-chip, .ball-more, .form-chip, .spage-go, .atab):focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

.xp-dex .panel { padding: clamp(18px, 2vw, 24px); border: 1px solid var(--line-2); border-radius: 24px; background: var(--panel), rgba(6, 10, 22, .55); box-shadow: 0 30px 60px -40px rgba(0, 0, 0, .9); }
.xp-dex .panel-title { color: #fff; font: 400 30px/1.05 var(--serif); }
.xp-dex .tool .tsource { border-top-color: var(--line-2); }

.search-page .page--xp { padding-top: 56px; }
.search-page .spage-form { gap: 10px; max-width: 760px; margin-bottom: 34px; padding: 8px; border: 1px solid var(--line-2); border-radius: 999px; background: var(--panel), rgba(6, 10, 22, .6); box-shadow: 0 30px 60px -40px rgba(0, 0, 0, .9); transition: border-color var(--t-mid) var(--ease-out), box-shadow var(--t-mid) var(--ease-out); }
.search-page .spage-form:focus-within { border-color: rgba(127, 210, 246, .6); box-shadow: 0 0 0 4px rgba(2, 151, 222, .16), 0 30px 60px -40px rgba(0, 0, 0, .9); }
.search-page .spage-input { height: 50px; border: 0; background: transparent; color: #fff; font: 400 16px var(--sans); }
.search-page .spage-input:focus { box-shadow: none; }
.search-page .spage-go { height: 50px; padding: 0 26px; box-shadow: 0 0 30px rgba(2, 151, 222, .3); font: 400 13.5px/1 var(--mono); letter-spacing: .02em; }
.search-page .spage-go:hover { background: #ffeee6; box-shadow: 0 0 34px rgba(252, 115, 77, .45); }
.search-page .spage-results { max-width: 900px; margin-bottom: 56px; padding: 8px; border: 1px solid var(--line-2); border-radius: 24px; background: var(--panel), rgba(6, 10, 22, .5); }
.search-page .spage-results:empty { display: none; }
.search-page .spage-results .sres { border: 0; border-radius: 14px; }
.search-page .az-intro { color: var(--ink-2); font-size: 15.5px; }
.search-page .az-group { margin-top: 56px; }
.search-page .az-title { position: relative; display: flex; align-items: baseline; gap: 12px; margin: 0 0 18px; padding-bottom: 12px; color: #fff; font: 400 clamp(30px, 3vw, 40px)/1 var(--serif); }
.search-page .az-title::after { position: absolute; right: 0; bottom: 0; left: 0; height: 1px; background: linear-gradient(90deg, rgba(127, 210, 246, .75), rgba(127, 210, 246, .2) 45%, rgba(127, 210, 246, .06)); content: ""; }
.search-page .az-list { columns: 4 220px; column-gap: 28px; font: 400 14.5px/2 var(--sans); }
.search-page .az-list a { color: rgba(232, 238, 252, .88); transition: color var(--t-fast) var(--ease-out); }
.search-page .az-list a:hover { color: var(--cyan); }

.glance .g-small { display: block; margin-top: 2px; color: var(--ink-3); font: 400 12px/1.4 var(--sans); }
.glance .g-num { font: 400 22px/1.1 var(--serif); font-variant-numeric: lining-nums tabular-nums; }

.xp-dex .tbl-wrap { border: 1px solid var(--line-2); border-radius: 24px; background: var(--panel), rgba(6, 10, 22, .5); }
.xp-dex .w-table { border: 0; border-radius: 0; background: none; font: 400 13.5px/1.4 var(--sans); }
.xp-dex .w-table thead th { padding: 16px 20px 12px; border-bottom: 1px solid var(--line-2); color: var(--ink-3); font: 400 11.5px/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; }
.xp-dex .w-table td, .xp-dex .w-table tbody th { padding: 11px 20px; border-top: 1px solid var(--line); }
.xp-dex .w-table tbody tr:first-child > * { border-top: 0; }
.xp-dex .w-table tbody tr > * { transition: background-color var(--t-fast) var(--ease-out); }
.xp-dex .w-table tbody tr:hover > * { background: rgba(255, 255, 255, .03); }

@media (prefers-reduced-motion: reduce) {
  .plinth-obj, .plinth-floor, .plinth-beam, .plinth-mark, .plinth-ring, .plinth-ring::after { animation: none !important; }
}

@media (max-width: 1000px) {
  .scene--xp .cine { min-height: 0; }
  .scene--xp .cine-row { gap: 24px; }
  .plinth { justify-self: center; width: min(360px, 100%); height: 280px; margin: 0; }
  .plinth--small { width: min(260px, 100%); height: 220px; }
  .plinth-mark { font-size: 170px; }
}
@media (max-width: 1000px) {
  .plinth--item { order: -1; }
  .plinth:has(.plinth-note) { margin-bottom: 22px; }
}
@media (max-width: 640px) {
  .plinth--type { display: none; }
  .plinth--item { height: 170px; margin-bottom: -6px; }
  .search-page .spage-form { border-radius: 24px; }
  .search-page .spage-go { width: 100%; height: 54px; background: linear-gradient(180deg, #fff, var(--peach) 70%, #ffc9b0); box-shadow: inset 0 1px 0 #fff, 0 0 26px -6px rgba(252, 115, 77, .8); color: #160b10; font-size: 14px; }
  .search-page .spage-input { flex: none; padding: 0 16px; }
  .search-page .az-list { font-size: 15px; line-height: 2.95; }
  .xp-dex .w-table thead th { font-size: 12px; }
  .cine-top { gap: 10px; }
  .xp-pager > a, .xp-pager > span { height: 34px; padding: 0 12px; font-size: 12px; }
  .xp-pager .pager-name { display: none; }
  .plinth { height: 240px; }
  .plinth--small { height: 190px; }
  .plinth-mark { font-size: 140px; }
  .lead-text { font-size: 17px; }
  .sub-h { font-size: 24px; }
}
