/* =========================================================
   포고랩 — "포켓몬 연구소 데이터 단말기"
   흑연 바탕 + 연구소 모눈, 형광 라임 / 코럴 포인트,
   제목은 Black Han Sans, 숫자는 IBM Plex Mono
   ========================================================= */
:root {
  --bg: #0b0d10;
  --bg-2: #101317;
  --panel: #14181d;
  --panel-2: #1b2027;
  --line: #262c34;
  --line-2: #323a44;
  --text: #ecefe6;
  --muted: #8a939c;
  --dim: #5c656e;
  --lime: #c8f53c;
  --lime-ink: #1a2300;
  --coral: #ff6a4d;
  --violet: #a58bff;
  --accent: var(--lime);
  --radius: 4px;
  --notch: 10px;

  --f-display: "Black Han Sans", "IBM Plex Sans KR", sans-serif;
  --f-body: "IBM Plex Sans KR", "Malgun Gothic", system-ui, sans-serif;
  --f-mono: "IBM Plex Mono", "IBM Plex Sans KR", "Malgun Gothic", ui-monospace, Consolas, sans-serif;

  /* 티어: 라임(최상) → 청록 → 남보라 → 코럴 → 회색 */
  --tier-s: #c8f53c;
  --tier-ap: #7cf0b4;
  --tier-a: #46d3e6;
  --tier-bp: #7a9bff;
  --tier-b: #b48bff;
  --tier-c: #ff8a63;
  --tier-d: #6c747d;

  --t-normal: #a0a29f; --t-fighting: #ff8000; --t-flying: #81b9ef; --t-poison: #9141cb;
  --t-ground: #b57a3c; --t-rock: #afa981; --t-bug: #91a119; --t-ghost: #8a5a8a;
  --t-steel: #60a1b8; --t-fire: #e62829; --t-water: #2980ef; --t-grass: #3fa129;
  --t-electric: #fac000; --t-psychic: #ef4179; --t-ice: #3dcef3; --t-dragon: #5060e1;
  --t-dark: #7a6566; --t-fairy: #ef70ef;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background:
    radial-gradient(1200px 500px at 85% -10%, rgba(200, 245, 60, .07), transparent 60%),
    radial-gradient(900px 500px at -10% 30%, rgba(255, 106, 77, .05), transparent 60%),
    linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px) 0 0 / 28px 28px,
    linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px) 0 0 / 28px 28px,
    var(--bg);
  color: var(--text);
  font-family: var(--f-body);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
a.link { color: var(--lime); }
a.link:hover { text-decoration: underline; text-underline-offset: 3px; }
button, input, select { font: inherit; color: inherit; }
img { display: block; }
::selection { background: var(--lime); color: var(--lime-ink); }

h1, h2 { font-family: var(--f-display); font-weight: 400; letter-spacing: .01em; }
h1 { font-size: 30px; line-height: 1.25; margin: 0 0 12px; }
h2 { font-size: 21px; margin: 24px 0 10px; }
h3 { font-size: 14px; margin: 16px 0 8px; font-weight: 700; letter-spacing: .06em; color: var(--muted); text-transform: uppercase; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.num, td.num, th.num { font-family: var(--f-mono); }

/* 모서리를 깎은 패널 (표본 카드 느낌) */
.notch { clip-path: polygon(0 0, calc(100% - var(--notch)) 0, 100% var(--notch), 100% 100%, var(--notch) 100%, 0 calc(100% - var(--notch))); }

/* ---------- 상단 바 ---------- */
.topbar {
  position: sticky; top: 0; z-index: 30;
  display: grid; grid-template-columns: 1fr minmax(0, 560px) 1fr; align-items: center; gap: 14px;
  padding: 10px 20px;
  background: rgba(11, 13, 16, .88);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.logo { display: flex; align-items: center; gap: 10px; white-space: nowrap; }
.logo-mark {
  width: 26px; height: 30px; background: var(--lime);
  clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%);
  position: relative;
}
.logo-mark::after {
  content: ""; position: absolute; inset: 7px 6px; background: var(--bg);
  clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%);
}
.wm { font-family: var(--f-display); font-size: 21px; letter-spacing: .02em; }
.wm b { font-family: var(--f-mono); font-weight: 600; font-size: 13px; color: var(--lime-ink); background: var(--lime); padding: 1px 5px; margin-left: 4px; vertical-align: 3px; }
.menu-btn {
  display: flex; align-items: center; gap: 6px; cursor: pointer;
  padding: 7px 12px; border-radius: var(--radius); border: 1px solid var(--line-2); background: transparent;
  font-family: var(--f-mono); font-size: 13px; letter-spacing: .04em;
}
.topbar-left { display: flex; align-items: center; gap: 14px; }
.search { position: relative; flex: 1; max-width: 560px; }
/* 검색창은 화면 가운데. 좁은 화면에선 왼쪽 묶음 옆을 채움 */
@media (max-width: 900px) { .topbar { display: flex; } }
.search input {
  width: 100%; padding: 9px 14px 9px 36px; border-radius: var(--radius);
  border: 1px solid var(--line-2); background: var(--bg-2);
  background-image: radial-gradient(circle at 17px 50%, transparent 5px, var(--muted) 5.5px, var(--muted) 6.5px, transparent 7px);
}
.search input:focus, .page-search input:focus, .field input:focus, .field select:focus { outline: none; border-color: var(--lime); box-shadow: 0 0 0 3px rgba(200,245,60,.12); }
.search-results {
  position: absolute; left: 0; right: 0; top: calc(100% + 6px);
  background: var(--panel); border: 1px solid var(--line-2); border-radius: var(--radius);
  max-height: 60vh; overflow-y: auto; display: none; box-shadow: 0 18px 40px rgba(0,0,0,.55);
}
.search-results.open { display: block; }
.search-results a { display: flex; align-items: center; gap: 10px; padding: 6px 10px; border-left: 2px solid transparent; }
.search-results a:hover, .search-results a.active { background: var(--panel-2); border-left-color: var(--lime); }
.search-results img { width: 36px; height: 36px; }
.search-results small { color: var(--muted); font-family: var(--f-mono); font-size: 11.5px; }

/* ---------- 메뉴 서랍 ---------- */
.drawer-bg { position: fixed; inset: 0; background: rgba(0,0,0,.6); z-index: 40; display: none; }
.drawer {
  position: fixed; top: 0; left: 0; bottom: 0; z-index: 50;
  width: min(360px, 88vw); overflow-y: auto; padding: 18px;
  background: var(--bg-2); border-right: 1px solid var(--line);
  transform: translateX(-100%); transition: transform .2s;
}
body.drawer-open .drawer { transform: none; }
body.drawer-open .drawer-bg { display: block; }
.drawer h4 { margin: 20px 0 6px; color: var(--lime); font: 600 11px var(--f-mono); letter-spacing: .14em; }
.drawer a { display: block; padding: 6px 10px; border-radius: var(--radius); border-left: 2px solid transparent; }
.drawer .type-links { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; }
.drawer .type-links a { padding: 4px 6px; font-size: 13px; text-align: center; }

/* ---------- 레이아웃 ---------- */
main { max-width: 1200px; margin: 0 auto; padding: 24px 20px 60px; }
.panel {
  position: relative;
  background: linear-gradient(180deg, rgba(255,255,255,.015), transparent 40%), var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius); padding: 20px; margin-bottom: 18px;
}
.panel::before { /* 왼쪽 위 라임 모서리 표식 */
  content: ""; position: absolute; left: -1px; top: -1px; width: 14px; height: 14px;
  border-left: 2px solid var(--lime); border-top: 2px solid var(--lime);
}
.panel > h2:first-child, .panel > h3:first-child { margin-top: 0; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 800px) { .grid-2 { grid-template-columns: 1fr; } }

.hero { display: grid; grid-template-columns: 1.3fr 1fr; gap: 20px; align-items: center; }
.hero-art {
  min-height: 170px; border-radius: var(--radius); border: 1px dashed var(--line-2);
  background:
    radial-gradient(circle at 50% 60%, rgba(200,245,60,.12), transparent 60%),
    repeating-linear-gradient(0deg, transparent 0 13px, rgba(255,255,255,.03) 13px 14px),
    var(--bg-2);
  display: flex; align-items: center; justify-content: center; gap: 8px; overflow: hidden;
}
.hero-art img { width: 110px; height: 110px; filter: drop-shadow(0 8px 14px rgba(0,0,0,.6)); }
@media (max-width: 800px) { .hero { grid-template-columns: 1fr; } .hero-art { min-height: 120px; } .hero-art img { width: 80px; height: 80px; } }

/* ---------- 티어 (육각 배지) ---------- */
.tier-jump { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0; }
.tier-jump a {
  width: 50px; height: 56px; position: relative; display: grid; place-items: center; text-align: center;
  clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%);
  font: 400 28px/1 var(--f-display); color: #0b0d10;
}
.tier-jump a small { position: absolute; left: 0; right: 0; bottom: 7px; font: 600 9px/1 var(--f-mono); letter-spacing: .1em; opacity: .7; }
.tier-S { background: var(--tier-s); } .tier-Ap { background: var(--tier-ap); } .tier-A { background: var(--tier-a); }
.tier-Bp { background: var(--tier-bp); } .tier-B { background: var(--tier-b); } .tier-C { background: var(--tier-c); }
.tier-D { background: var(--tier-d); }
.tier-head { display: flex; align-items: center; gap: 12px; }
.tier-head h2 { margin: 0; }
.tier-badge {
  display: inline-grid; place-items: center; width: 38px; height: 42px; color: #0b0d10;
  clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%);
  font: 400 17px/1 var(--f-display);
}
.tier-badge.sm { width: 24px; height: 27px; font-size: 12px; }
section[id^="tier-"] { border-top: 2px solid var(--tc, var(--line)); }
#tier-tier-S { --tc: var(--tier-s); } #tier-tier-Ap { --tc: var(--tier-ap); } #tier-tier-A { --tc: var(--tier-a); }
#tier-tier-Bp { --tc: var(--tier-bp); } #tier-tier-B { --tc: var(--tier-b); } #tier-tier-C { --tc: var(--tier-c); } #tier-tier-D { --tc: var(--tier-d); }

.seg { display: inline-flex; border: 1px solid var(--line-2); border-radius: var(--radius); overflow: hidden; }
.seg a, .seg button { padding: 7px 14px; background: transparent; border: 0; cursor: pointer; font-size: 13.5px; }
.seg a + a { border-left: 1px solid var(--line-2); }
.seg .on { background: var(--lime); color: var(--lime-ink); font-weight: 700; }

/* ---------- 표본 카드 ---------- */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(138px, 1fr)); gap: 10px; }
.card {
  position: relative; display: flex; flex-direction: column; align-items: center;
  padding: 8px 8px 10px; text-align: center;
  background:
    radial-gradient(circle at 50% 42%, color-mix(in srgb, var(--c1) 26%, transparent), transparent 62%),
    var(--panel-2);
  border: 1px solid var(--line);
  clip-path: polygon(0 0, calc(100% - var(--notch)) 0, 100% var(--notch), 100% 100%, var(--notch) 100%, 0 calc(100% - var(--notch)));
}
.card::before { /* 타입 색 띠 */
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
  background: linear-gradient(var(--c1), var(--c2, var(--c1)));
}
.card-top { align-self: stretch; display: flex; justify-content: space-between; align-items: center; }
.card .rk { font: 600 12px var(--f-mono); color: var(--lime); letter-spacing: .04em; }
.card-types { display: flex; gap: 2px; }
.card img:not(.tdot) { width: 82px; height: 82px; margin: 2px auto 4px; }
.card .cimg { position: relative; display: block; width: 82px; height: 82px; margin: 2px auto 4px; overflow: hidden; }
.card .cimg img { position: absolute; max-width: none; margin: 0; }
.card .nm { font-weight: 700; font-size: 13.5px; line-height: 1.3; min-height: 2.6em; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 2px 4px; }
.card .sub { font: 500 11px var(--f-mono); color: var(--muted); }

/* 메가·원시는 빨강, 그림자는 보라 글자 */
.v-mega { color: #ff4d4d; }
.v-shadow { color: var(--violet); }

/* ---------- 타입 배지 ---------- */
.type {
  display: inline-flex; align-items: center; gap: 5px; padding: 2px 10px 2px 3px; border-radius: 999px;
  font-size: 12.5px; font-weight: 600; white-space: nowrap;
  background: color-mix(in srgb, var(--tc) 22%, var(--bg-2)); border: 1px solid color-mix(in srgb, var(--tc) 55%, transparent);
}
.type .ti { width: 18px; height: 18px; }
.type.big { font-size: 15px; padding: 3px 12px 3px 4px; vertical-align: middle; font-family: var(--f-body); }
.type.big .ti { width: 22px; height: 22px; }
.types { display: inline-flex; gap: 5px; flex-wrap: wrap; }
.chip { display: inline-block; padding: 2px 9px; font: 500 11.5px var(--f-mono); letter-spacing: .04em; border: 1px solid var(--line-2); color: var(--muted); }
.tdot { width: 18px; height: 18px; }

/* ---------- 표 ---------- */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { padding: 8px; border-bottom: 1px solid var(--line); text-align: left; white-space: nowrap; }
th { color: var(--muted); font: 600 14px var(--f-body, inherit); letter-spacing: .02em; position: sticky; top: 0; background: var(--panel); }
th.sortable { cursor: pointer; }
th.sortable:hover { color: var(--lime); }
th[data-dir]::after { content: " ▾"; color: var(--lime); }
th[data-dir="asc"]::after { content: " ▴"; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
tbody tr:hover td { background: rgba(200,245,60,.035); }
.mini { width: 32px; height: 32px; display: inline-block; vertical-align: middle; margin-right: 6px; }
.elite { color: var(--coral); font-weight: 700; margin-left: 1px; }

/* ---------- 상세 ---------- */
.dex-head { display: grid; grid-template-columns: 220px 1fr; gap: 24px; align-items: center; }
.dex-art {
  border: 1px dashed var(--line-2); border-radius: var(--radius);
  background: radial-gradient(circle, color-mix(in srgb, var(--c1) 35%, transparent), transparent 70%), var(--bg-2);
}
.dex-art img { width: 200px; height: 200px; margin: 0 auto; filter: drop-shadow(0 10px 16px rgba(0,0,0,.6)); }
@media (max-width: 700px) { .dex-head { grid-template-columns: 1fr; text-align: center; } .dex-head .types, .dex-head .forms { justify-content: center; } }
.forms { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.forms a { padding: 3px 10px; border: 1px solid var(--line-2); font-size: 13px; }
.forms a.on { border-color: var(--lime); color: var(--lime); }
.stat { display: grid; grid-template-columns: 56px 1fr 48px; gap: 10px; align-items: center; margin: 7px 0; }
.stat b { font-family: var(--f-mono); text-align: right; }
.bar { height: 8px; background: var(--bg-2); border: 1px solid var(--line); overflow: hidden; }
.bar i { display: block; height: 100%; background: repeating-linear-gradient(90deg, var(--lime) 0 6px, transparent 6px 8px); }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; }
.kv dd b { font-family: var(--f-mono); color: var(--lime); }
.eff-grid { display: flex; flex-direction: column; gap: 8px; }
.eff-row { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.eff-row b { width: 64px; font: 600 13px var(--f-mono); color: var(--coral); }
.evo { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.evo a { text-align: center; font-size: 13px; }
.evo img { width: 72px; height: 72px; margin: 0 auto; }
.evo .arrow { color: var(--lime); font-family: var(--f-mono); }

/* ---------- 폼 ---------- */
.field { display: flex; flex-direction: column; gap: 4px; }
.field label { font: 600 11px var(--f-mono); letter-spacing: .08em; color: var(--muted); }
.field input, .field select { padding: 8px 10px; border-radius: var(--radius); border: 1px solid var(--line-2); background: var(--bg-2); }
.row { display: flex; gap: 12px; flex-wrap: wrap; align-items: flex-end; }
.big-num { font: 600 44px/1.1 var(--f-mono); color: var(--lime); }

.type-chart td, .type-chart th { padding: 4px; text-align: center; font: 500 12px var(--f-mono); }
.type-chart td.x2 { background: rgba(200,245,60,.28); color: var(--lime); }
.type-chart td.x05 { background: rgba(255,106,77,.18); color: var(--coral); }
.type-chart td.x0 { background: rgba(255,106,77,.38); color: #fff; }

footer { text-align: center; color: var(--dim); font-size: 12.5px; padding: 30px 20px; border-top: 1px solid var(--line); }
.loading { text-align: center; padding: 80px 0; color: var(--muted); font-family: var(--f-mono); }

/* ---------- 필터 · 토글 ---------- */
.filters { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 12px; }
.filters > .small { font: 600 11px var(--f-mono); letter-spacing: .08em; }
.toggle {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 11px; font-size: 13px; font-weight: 600;
  border: 1px dashed var(--line-2); color: var(--dim);
}
.toggle::before { content: ""; width: 9px; height: 9px; border: 1px solid currentColor; }
.toggle.on { border-style: solid; border-color: var(--lime); color: var(--text); }
.toggle.on::before { background: var(--lime); border-color: var(--lime); box-shadow: 0 0 8px var(--lime); }

/* ---------- 목록 보기 (계기판) ---------- */
.lrows { display: flex; flex-direction: column; gap: 6px; margin-bottom: 18px; }
.lrow {
  position: relative;
  display: grid; grid-template-columns: var(--lcols); align-items: center; column-gap: var(--lgap, 16px);
  padding: 10px 16px 10px 14px; background: var(--panel); border: 1px solid var(--line);
  clip-path: polygon(0 0, calc(100% - var(--notch)) 0, 100% var(--notch), 100% 100%, 0 100%);
}
.lrow::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--c1); }
.lrank { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.lrank b { font: 600 18px/1 var(--f-mono); color: var(--text); letter-spacing: -.02em; }
.lrow:nth-child(-n+3) .lrank b { color: var(--lime); }
.limg { width: 60px; height: 60px; }
.limg img { width: 60px; height: 60px; }
.linfo { display: flex; flex-direction: column; min-width: 0; gap: 2px; }
.linfo b { font-size: 16.5px; font-weight: 700; }
.linfo small { display: flex; align-items: center; gap: 6px; color: var(--muted); font: 500 11.5px var(--f-mono); }
.tdots { display: inline-flex; gap: 2px; }
.tdots .tdot { width: 18px; height: 18px; }
.lmoves { font-size: 14px; font-weight: 500; color: var(--text); margin-top: 2px; }
.lmoves i { font-style: normal; color: var(--dim); font-family: var(--f-mono); margin: 0 2px; }
.meters { display: flex; flex-direction: column; gap: 5px; }
.meter { display: grid; grid-template-columns: 54px 62px 1fr; align-items: center; gap: 10px; }
.meter small { font: 600 13px var(--f-mono); color: var(--muted); letter-spacing: .04em; }
.meter b { font: 500 15px var(--f-mono); text-align: right; color: var(--text); font-variant-numeric: tabular-nums; }
.gauge { height: 7px; background: var(--bg-2); border: 1px solid var(--line); }
.gauge i { display: block; height: 100%; background: var(--line-2); }
.meter.on small { color: var(--lime); }
.meter.on b { color: var(--lime); font-weight: 600; }
.meter.on .gauge i { background: repeating-linear-gradient(90deg, var(--lime) 0 5px, rgba(200,245,60,.55) 5px 6px); box-shadow: 0 0 8px rgba(200,245,60,.35); }
@media (max-width: 760px) {
  .limg, .limg img { width: 52px; height: 52px; }
}

/* ---------- 목록 안 검색 ---------- */
.page-search { display: flex; align-items: center; gap: 10px; margin-top: 12px; }
.page-search input { flex: 1; max-width: 420px; padding: 8px 12px; border-radius: var(--radius); border: 1px solid var(--line-2); background: var(--bg-2); }
.ps-count { font-family: var(--f-mono); color: var(--lime); }

/* ---------- 레이드 티어: 이미지 + 타입 마크 ---------- */
.raid-hero { align-items: stretch; }
.hero-side { display: flex; flex-direction: column; gap: 10px; }
.raid-hero .hero-art { min-height: 120px; flex: 1; }
.raid-hero .hero-art img { width: 96px; height: 96px; }
.type-picker { display: flex; flex-direction: column; gap: 6px; }
.tp-all { text-align: center; padding: 5px; font: 600 12px var(--f-mono); letter-spacing: .1em; border: 1px solid var(--line-2); }
.tp-all.on { background: var(--lime); color: var(--lime-ink); border-color: var(--lime); }
.tp-grid { display: grid; grid-template-columns: repeat(9, 1fr); gap: 4px; }
.tp { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 5px 2px; border: 1px solid transparent; font-size: 11px; color: var(--muted); }
.tp .ticon { width: 26px; height: 26px; transition: transform .15s; }
.tp.on { border-color: var(--lime); background: rgba(200,245,60,.08); color: var(--lime); }
@media (max-width: 800px) { .tp-grid { grid-template-columns: repeat(6, 1fr); } }

/* ---------- 홈 ---------- */
.home-hero {
  display: grid; grid-template-columns: 1.05fr 1fr; gap: 24px; align-items: center; padding: 32px;
  background:
    radial-gradient(circle at 78% 55%, rgba(200,245,60,.14), transparent 45%),
    repeating-linear-gradient(90deg, transparent 0 27px, rgba(255,255,255,.025) 27px 28px),
    var(--panel);
}
.eyebrow { display: inline-block; font: 600 11px var(--f-mono); letter-spacing: .16em; color: var(--lime-ink); background: var(--lime); padding: 3px 8px; }
.home-hero h1 { font-size: 40px; line-height: 1.2; margin: 14px 0 12px; }
.home-hero h1 em { font-style: normal; color: var(--lime); }
.cta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 11px 18px; border: 1px solid var(--line-2); font-weight: 700; }
.btn.primary { background: var(--lime); color: var(--lime-ink); border-color: var(--lime); }
.btn.primary span { font-family: var(--f-mono); }
.hh-podium { position: relative; display: flex; justify-content: center; align-items: flex-end; gap: 4px; min-height: 210px; }
.hh-podium::after { /* 받침대 선 */
  content: ""; position: absolute; left: 6%; right: 6%; bottom: 18px; height: 1px;
  background: linear-gradient(90deg, transparent, var(--lime), transparent);
}
.pod { position: relative; display: flex; flex-direction: column; align-items: center; }
.pod img { width: 84px; height: 84px; filter: drop-shadow(0 8px 12px rgba(0,0,0,.6)); }
.pod span { font: 600 11px var(--f-mono); color: var(--muted); letter-spacing: .06em; margin-top: 4px; }
.pod-1 span { color: var(--lime); }
.pod-1 { order: 3; } .pod-1 img { width: 150px; height: 150px; }
.pod-2 { order: 2; } .pod-2 img { width: 112px; height: 112px; }
.pod-3 { order: 4; } .pod-3 img { width: 112px; height: 112px; }
.pod-4 { order: 1; } .pod-5 { order: 5; }
.sec-head { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.sec-head h2 { margin: 0; }
.type-strip { display: grid; grid-template-columns: repeat(9, 1fr); gap: 6px; }
.type-strip .tp { padding: 10px 2px 8px; font-size: 12.5px; color: var(--text); background: var(--bg-2); border-color: var(--line); }
.type-strip .tp .ticon { width: 34px; height: 34px; }
.home-cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.home-col { margin-bottom: 0; }
.home-col h2 { margin: 0 0 10px; font-size: 18px; }
.navrow { display: grid; grid-template-columns: 48px 1fr 18px; align-items: center; gap: 12px; padding: 10px; border: 1px solid transparent; }
.navrow + .navrow { margin-top: 4px; }
.nr-ic { width: 48px; height: 48px; background: var(--bg-2); border: 1px solid var(--line); display: grid; place-items: center; overflow: hidden; }
.nr-ic img { width: 44px; height: 44px; }
.nr-ic .nr-type { width: 30px; height: 30px; }
.nr-glyph { font: 600 12.5px var(--f-mono); color: var(--lime); }
.nr-tx { display: flex; flex-direction: column; min-width: 0; }
.nr-tx b { font-size: 15px; }
.nr-tx small { color: var(--muted); font-size: 12.5px; }
.nr-go { color: var(--dim); font: 400 18px/1 var(--f-mono); transition: transform .15s, color .15s; }
@media (max-width: 900px) {
  .home-hero { grid-template-columns: 1fr; padding: 22px; }
  .home-hero h1 { font-size: 30px; }
  .home-cols { grid-template-columns: 1fr; }
  .type-strip { grid-template-columns: repeat(6, 1fr); }
  .hh-podium { min-height: 140px; }
  .pod img { width: 64px; height: 64px; } .pod-1 img { width: 104px; height: 104px; } .pod-2 img, .pod-3 img { width: 80px; height: 80px; }
}

/* =========================================================
   hover: 살짝 밝아지고 글자에 옅은 밑줄 + 라임 신호
   ========================================================= */
:root { --ul: rgba(236, 239, 230, .45); }
.card, .lrow, .navrow, .seg a, .toggle, .menu-btn, .drawer a, .tp, .tp-all, .btn, .tier-jump a, .forms a, .pod, .type {
  transition: background-color .15s, border-color .15s, filter .15s, transform .15s, color .15s;
}
.card:hover, .lrow:hover { filter: brightness(1.15); border-color: var(--lime); }
.card:hover .nm, .lrow:hover .linfo b, .navrow:hover b,
.seg a:hover, .menu-btn:hover, .drawer a:hover, .tp:hover span, .tp-all:hover, .btn:hover, .forms a:hover {
  text-decoration: underline; text-decoration-color: var(--ul); text-decoration-thickness: 1px; text-underline-offset: 3px;
}
.toggle:hover { text-decoration: underline; text-decoration-color: var(--ul); text-underline-offset: 3px; }
.seg a:hover:not(.on), .menu-btn:hover, .drawer a:hover, .tp:hover, .tp-all:hover:not(.on), .forms a:hover, .navrow:hover, .btn:not(.primary):hover {
  background: var(--panel-2);
}
.menu-btn:hover, .btn:not(.primary):hover, .navrow:hover { border-color: var(--line-2); }
.drawer a:hover { border-left-color: var(--lime); }
.toggle:hover { border-color: var(--lime); filter: brightness(1.15); }
.tp:hover .ticon { transform: translateY(-2px) scale(1.06); }
.btn.primary:hover { filter: brightness(1.08); text-decoration-color: rgba(26,35,0,.5); }
.tier-jump a:hover { filter: brightness(1.12); transform: translateY(-2px); }
.navrow:hover .nr-go { transform: translateX(3px); color: var(--lime); }
.pod:hover { transform: translateY(-4px); }
a.type:hover { filter: brightness(1.2); }

/* 공격 타입별 항목 표시: 메가 레쿠쟈(비행) */
.esuf { margin-left: 3px; font-size: .86em; font-weight: 600; color: color-mix(in srgb, var(--tc) 70%, #fff); }
.entry-rank { display: flex; gap: 12px; align-items: center; margin: 8px 0; }
.entry-rank b { font-family: var(--f-mono); color: var(--lime); }

/* ---------- 더보기 + 성능 ---------- */
.tier-head h2 { margin: 0; }
.more-wrap { margin: 4px 0 24px; }
.more-btn {
  width: 100%; justify-content: center; padding: 14px; cursor: pointer;
  background: var(--panel); border: 1px dashed var(--line-2); color: var(--text); font-size: 14px;
}
.more-btn b { font-family: var(--f-mono); color: var(--lime); font-weight: 600; }
.more-btn span { font: 500 12px var(--f-mono); color: var(--muted); }
.more-btn:hover { border-style: solid; border-color: var(--lime); background: var(--panel-2); text-decoration: underline; text-decoration-color: var(--ul); text-underline-offset: 3px; }
/* 화면 밖 카드·줄은 그리기를 미룬다 */
.lrow { content-visibility: auto; contain-intrinsic-size: auto 92px; }
.card { content-visibility: auto; contain-intrinsic-size: auto 172px; }

#setMore { margin-top: 12px; padding: 10px; }

/* ---------- 강화 비용: 양끝 막대 ---------- */
.cost { display: flex; flex-direction: column; gap: 14px; }
.cost-inputs { display: flex; align-items: flex-end; gap: 10px; }
.cost-inputs label { display: flex; flex-direction: column; gap: 4px; font: 600 11px var(--f-mono); letter-spacing: .06em; color: var(--muted); }
.cost-inputs input {
  width: 92px; padding: 7px 10px; border: 1px solid var(--line-2); background: var(--bg-2);
  font: 600 18px var(--f-mono); color: var(--lime);
}
.cost-inputs input:focus { outline: none; border-color: var(--lime); }
.cost-arrow { font: 600 18px var(--f-mono); color: var(--dim); padding-bottom: 8px; }
.range2 { position: relative; height: 44px; margin: 0 9px; }
.range2-track { position: absolute; left: 0; right: 0; top: 12px; height: 8px; background: var(--bg-2); border: 1px solid var(--line-2); }
.range2-track i {
  position: absolute; top: -1px; bottom: -1px;
  background: repeating-linear-gradient(90deg, var(--lime) 0 6px, rgba(200,245,60,.6) 6px 8px);
  box-shadow: 0 0 10px rgba(200,245,60,.35);
}
.range2 input[type=range] {
  position: absolute; left: -9px; right: -9px; top: 4px; width: calc(100% + 18px); margin: 0; height: 24px;
  background: none; pointer-events: none; -webkit-appearance: none; appearance: none;
}
.range2 input[type=range]::-webkit-slider-runnable-track { background: none; border: 0; }
.range2 input[type=range]::-moz-range-track { background: none; border: 0; }
.range2 input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none; pointer-events: auto; cursor: grab; width: 18px; height: 22px;
  background: var(--lime); border: 2px solid var(--bg);
  clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%);
}
.range2 input[type=range]::-moz-range-thumb {
  pointer-events: auto; cursor: grab; width: 16px; height: 20px; border: 0; border-radius: 0;
  background: var(--lime); clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%);
}
.range2 input[type=range]:active::-webkit-slider-thumb { cursor: grabbing; filter: brightness(1.15); }
.range2 input[type=range]:focus { outline: none; }
.range2 input[type=range]:focus-visible::-webkit-slider-thumb { box-shadow: 0 0 0 3px rgba(200,245,60,.35); }
.range2-ticks { position: absolute; left: 0; right: 0; top: 26px; height: 16px; }
.range2-ticks span { position: absolute; transform: translateX(-50%); font: 500 11px var(--f-mono); color: var(--dim); }
.cost-out { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.cost-cell { padding: 10px 12px; background: var(--bg-2); border: 1px solid var(--line); border-top: 2px solid var(--cc, var(--lime)); }
.cost-cell small { display: block; font: 600 11px var(--f-mono); letter-spacing: .06em; color: var(--muted); }
.cost-cell b { font: 600 22px var(--f-mono); color: var(--text); }
.cost-cell.dust { --cc: #c9a7ff; } .cost-cell.candy { --cc: var(--coral); } .cost-cell.xl { --cc: #46d3e6; }
.cost-cp { grid-column: 1 / -1; font-size: 13.5px; color: var(--muted); }
.cost-cp b { font-family: var(--f-mono); color: var(--lime); }

/* ---------- 돌아가기 ---------- */
.backbar { margin: -8px 0 12px; }
.back-btn {
  display: inline-flex; align-items: center; gap: 8px; cursor: pointer;
  padding: 7px 14px 7px 12px; background: transparent; border: 1px solid var(--line-2);
  font-size: 13.5px; font-weight: 600; color: var(--muted);
  transition: background-color .15s, border-color .15s, color .15s;
}
.back-btn span { font-family: var(--f-mono); color: var(--lime); transition: transform .15s; }
.back-btn:hover { background: var(--panel-2); border-color: var(--lime); color: var(--text);
  text-decoration: underline; text-decoration-color: var(--ul); text-underline-offset: 3px; }
.back-btn:hover span { transform: translateX(-3px); }

/* ---------- 레이드 이력 · 합체 · 전용기 ---------- */
.hist-sum { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-bottom: 14px; color: var(--muted); }
.hist-sum b { font-family: var(--f-mono); color: var(--lime); font-weight: 600; }
.hist-now { color: var(--lime); font-weight: 700; animation: blink 1.6s infinite; }
@keyframes blink { 50% { opacity: .45; } }
.hist-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 4px 24px; }
.hist-year { display: contents; }
.hist-year h4 { grid-column: 1 / -1; margin: 10px 0 2px; font: 600 12px var(--f-mono); letter-spacing: .12em; color: var(--lime); border-bottom: 1px solid var(--line); padding-bottom: 4px; }
.hist-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 5px 0; border-bottom: 1px dashed var(--line); }
.hist-row.now { background: rgba(200,245,60,.06); }
.hist-date { font: 500 13.5px var(--f-mono); min-width: 168px; }
.rt { display: inline-block; padding: 1px 8px; font: 600 11.5px var(--f-mono); border: 1px solid currentColor; }
.rt-5 { color: var(--tier-b); } .rt-4 { color: var(--tier-bp); } .rt-3 { color: var(--tier-a); } .rt-2 { color: var(--tier-ap); } .rt-1 { color: var(--muted); }
.rt-mega { color: #ff4d4d; } .rt-shadow { color: var(--violet); background: rgba(165,139,255,.1); }
.rt-super { background: rgba(255,77,77,.12); font-weight: 700; }
.rt-form { display: block; margin-top: 3px; font-size: 11px; color: var(--muted, #8a93a0); }
.chip-energy { color: var(--lime); border-color: rgba(200,245,60,.4); }
.hist-src { margin: 14px 0 0; font-size: 12px; color: var(--dim); }
.hist-src b { color: var(--muted); }
#histMore { margin-top: 12px; padding: 10px; }
.fc + .fc { margin-top: 16px; padding-top: 16px; border-top: 1px dashed var(--line-2); }
.fc-flow { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.fc-flow a { display: flex; flex-direction: column; align-items: center; font-size: 12px; }
.fc-flow img { width: 60px; height: 60px; }
.fc-op { font: 600 18px var(--f-mono); color: var(--dim); }
.fc-kind { margin-left: auto; font: 600 11px var(--f-mono); letter-spacing: .1em; color: var(--lime-ink); background: var(--lime); padding: 2px 8px; }
.sig-list { display: flex; flex-direction: column; gap: 8px; }

/* 레이드 이력 표 */
.hist-table td, .bg-table td { vertical-align: middle; }
.hist-table td.hist-date small { display: block; color: var(--muted); font: 500 11px var(--f-body); }
.hist-table tr.now td { background: rgba(200,245,60,.06); }
.hist-now { font-size: 11px; }
.dash { color: var(--dim); }
.mv-p { margin-left: 6px; padding: 0 4px; font-size: 10.5px; color: var(--lime); border: 1px solid rgba(200,245,60,.4); }
.mv-p.chance { color: #ffc24d; border-color: rgba(255,194,77,.45); }
.mv-tag { display: inline-block; padding: 1px 8px; font-size: 12.5px; font-weight: 600; color: var(--coral); border: 1px solid rgba(255,106,77,.45); }
.mv-unknown { color: var(--muted); border-style: dashed; border-color: var(--line-2); font-weight: 500; }
.bg-tag { display: inline-block; padding: 1px 8px; font-size: 12.5px; color: #8fd8ff; border: 1px solid rgba(70,211,230,.4); background: rgba(70,211,230,.07); }
.hist-legend { margin: 8px 0 0; font-size: 12px; color: var(--dim); }
.bg-table td.small { white-space: normal; min-width: 180px; }
.hist-table tr.hist-row { display: table-row; padding: 0; border: 0; }
.hist-table .hist-date { min-width: 0; }

/* 이벤트 종류 태그 */
.hist-ev { white-space: normal; min-width: 150px; max-width: 240px; }
.hist-ev small { display: block; color: var(--muted); font-size: 11.5px; line-height: 1.35; margin-top: 2px; }
.evt { display: inline-block; padding: 1px 8px; font-size: 12px; font-weight: 700; border: 1px solid currentColor; }
.evt-fest { color: var(--lime); background: rgba(200,245,60,.1); }
.evt-finale { color: #ffd23d; background: rgba(255,210,61,.1); }
.evt-tour { color: #46d3e6; background: rgba(70,211,230,.1); }
.evt-wild { color: #7cf0b4; background: rgba(124,240,180,.1); }
.evt-eve { color: #b48bff; }
.evt-local { color: #ff8a63; }
.evt-raidday { color: #ff4d4d; background: rgba(255,77,77,.1); }
.evt-event { color: #c9d1da; }
.evt-rot { color: var(--dim); border-style: dashed; font-weight: 500; }

/* 배경 이미지 보기 */
button.bg-tag { font: inherit; font-size: 12.5px; cursor: pointer; display: inline-flex; align-items: center; gap: 5px; }
button.bg-tag i { font-style: normal; font-size: 11px; opacity: .8; }
button.bg-tag:hover { background: rgba(70,211,230,.18); border-color: #46d3e6; color: #fff;
  text-decoration: underline; text-decoration-color: var(--ul); text-underline-offset: 3px; }
.bg-modal { position: fixed; inset: 0; z-index: 100; background: rgba(0,0,0,.75); display: grid; place-items: center; padding: 20px; }
.bg-modal-card { position: relative; max-width: min(520px, 92vw); background: var(--panel); border: 1px solid var(--line-2); padding: 14px; text-align: center; }
.bg-modal-card::before { content: ""; position: absolute; left: -1px; top: -1px; width: 14px; height: 14px; border-left: 2px solid var(--lime); border-top: 2px solid var(--lime); }
.bg-modal-card img { width: 100%; height: auto; max-height: 70vh; object-fit: contain; display: block; }
.bg-modal-name { font-family: var(--f-display); font-size: 20px; margin: 10px 0 2px; }
.bg-close { position: absolute; right: 6px; top: 4px; width: 32px; height: 32px; border: 0; background: transparent; color: var(--muted); font-size: 24px; cursor: pointer; }
.bg-close:hover { color: var(--lime); }

/* 배경 + 포켓몬 (게임 속 정보 화면 느낌) */
.bg-modal-card { width: min(420px, 92vw); }
.go-card {
  position: relative; aspect-ratio: 1 / 1.08; border-radius: 14px; overflow: hidden;
  background-size: cover; background-position: center top; box-shadow: inset 0 -80px 60px -40px rgba(0,0,0,.35);
}
.go-cp {
  position: absolute; top: 14px; left: 0; right: 0; text-align: center; color: #fff;
  font: 700 34px/1 var(--f-body); letter-spacing: .02em; text-shadow: 0 2px 6px rgba(0,0,0,.55);
}
.go-cp small { font-size: 16px; font-weight: 600; margin-right: 4px; vertical-align: 6px; }
.go-stage { position: absolute; left: 0; right: 0; bottom: 9%; height: 66%; display: flex; align-items: flex-end; justify-content: center; }
.go-mon { position: relative; width: 74%; height: auto; max-height: 100%; object-fit: contain; filter: drop-shadow(0 10px 8px rgba(0,0,0,.35)); }
.go-mon.is-shadow { filter: drop-shadow(0 0 14px rgba(150,80,255,.95)) drop-shadow(0 0 4px rgba(90,20,160,.9)); }
.go-floor { position: absolute; bottom: -2%; width: 46%; height: 9%; border-radius: 50%; background: radial-gradient(ellipse, rgba(0,0,0,.4), transparent 70%); }
.go-sparkle { position: absolute; top: 4%; right: 18%; color: #fff6b0; font-size: 30px; text-shadow: 0 0 10px #ffe25a; animation: twinkle 1.4s infinite; }
@keyframes twinkle { 50% { opacity: .35; transform: scale(.8) rotate(20deg); } }
.go-info { margin-top: 10px; }
.go-name { font-family: var(--f-display); font-size: 24px; }
.go-types { display: flex; justify-content: center; gap: 6px; margin-top: 4px; }
.go-types .tdot { width: 24px; height: 24px; }
.go-shiny { margin: 10px auto 2px; }
.go-shiny button { font: inherit; font-size: 13.5px; padding: 6px 16px; color: var(--text); }
.go-shiny button[disabled] { opacity: .35; cursor: not-allowed; }
.go-shiny button.on { background: var(--lime); color: var(--lime-ink); font-weight: 700; }
.bg-modal-name { font-size: 15px; margin-top: 8px; color: #8fd8ff; font-family: var(--f-body); font-weight: 600; }

/* 인게임 정보 화면처럼: 포켓몬 크게, 위쪽까지 차고 발은 아래 카드 위 */
.go-card { aspect-ratio: 1 / 1.05; }
.go-cp { display: none; }
.go-arc { position: absolute; left: 7%; right: 7%; top: 9%; bottom: -36%; border: 2px solid rgba(255,255,255,.85); border-bottom: 0; border-radius: 50% 50% 0 0 / 60% 60% 0 0; }
.go-stage { left: 0; right: 0; bottom: 3%; height: 92%; justify-content: center; }
.go-mon { width: 92%; max-height: 100%; }
.go-floor { bottom: 0; width: 55%; }
.go-stars { position: absolute; inset: 0; pointer-events: none; }
.go-stars i {
  position: absolute; left: var(--x); top: var(--y); width: 26px; height: 26px; margin: -13px;
  background: radial-gradient(circle, #fff 0 18%, transparent 20%), #fff8c9;
  clip-path: polygon(50% 0, 60% 40%, 100% 50%, 60% 60%, 50% 100%, 40% 60%, 0 50%, 40% 40%);
  filter: drop-shadow(0 0 6px #ffe86b);
  transform: scale(0); animation: star-pop 1.6s var(--d) ease-out forwards, star-twinkle 2.2s calc(var(--d) + 1.6s) ease-in-out infinite;
}
@keyframes star-pop { 0% { transform: scale(0) rotate(0); opacity: 0; } 35% { transform: scale(calc(var(--s) * 1.4)) rotate(45deg); opacity: 1; } 100% { transform: scale(var(--s)) rotate(90deg); opacity: .9; } }
@keyframes star-twinkle { 50% { transform: scale(calc(var(--s) * .55)) rotate(90deg); opacity: .4; } }

.go-arc { display: none; }
/* 게임 정보 화면처럼 포켓몬이 화면 왼쪽을 보도록 좌우 반전, 크게·가운데·발은 아래쪽 */
.go-stage { bottom: 2%; height: 96%; align-items: flex-end; justify-content: center; }
.go-mon { width: 96%; transform: scaleX(-1); margin-left: 4%; }
.go-floor { bottom: 1%; width: 60%; }
/* GO 원본 그림(256px): 뒤집지 않고, 원본 크기에 가깝게 그려 깨짐을 줄인다 */
.go-mon { transform: none; margin-left: 0; width: auto; height: 82%; max-width: 92%; image-rendering: auto; }
.go-stage { bottom: 4%; height: 92%; }
/* 배경·포켓몬 모두 256px 원본 크기 (늘리지 않음) */
.bg-modal-card { width: auto; }
.go-card { width: 256px; height: 256px; aspect-ratio: auto; margin: 0 auto; border-radius: 10px; background-size: 256px 256px; }
.go-stage { left: 0; right: 0; bottom: 0; top: 0; height: auto; display: block; }
.go-mon { position: absolute; left: 0; top: 0; width: 256px; height: 256px; max-width: none; max-height: none; }
.go-floor { display: none; }
.bg-modal-card .small.muted { max-width: 256px; margin: 0 auto; }
/* 이로치 별: 무작위 위치·무작위 최대 크기, 회전하며 커졌다 작아짐 */
.go-stars i {
  position: absolute; width: 28px; height: 28px; margin: -14px;
  left: auto; top: auto;
  background: radial-gradient(circle, #fff 0 22%, #fff7c2 23% 60%, transparent 62%);
  clip-path: polygon(50% 0, 59% 41%, 100% 50%, 59% 59%, 50% 100%, 41% 59%, 0 50%, 41% 41%);
  filter: drop-shadow(0 0 5px #ffe86b) drop-shadow(0 0 2px #fff);
  transform: scale(0); opacity: 0;
  animation: shiny-star 1.2s ease-in-out forwards;
}
@keyframes shiny-star {
  0%   { transform: scale(0) rotate(0deg); opacity: 0; }
  15%  { opacity: 1; }
  50%  { transform: scale(var(--m)) rotate(calc(var(--r) * 90deg)); opacity: 1; }
  100% { transform: scale(0) rotate(calc(var(--r) * 180deg)); opacity: 0; }
}

/* 상세 그림 이로치 전환 */
.dex-art { position: relative; overflow: hidden; }
.dex-art .go-stars { position: absolute; inset: 0; pointer-events: none; }
.shiny-toggle {
  position: absolute; right: 8px; bottom: 8px; cursor: pointer;
  padding: 4px 10px; font: 600 12px var(--f-body); color: var(--muted);
  background: rgba(11,13,16,.75); border: 1px solid var(--line-2);
  transition: background-color .15s, border-color .15s, color .15s;
}
.shiny-toggle:hover { color: var(--text); border-color: var(--lime); text-decoration: underline; text-decoration-color: var(--ul); text-underline-offset: 3px; }
.shiny-toggle.on { background: var(--lime); color: var(--lime-ink); border-color: var(--lime); }

/* ---------- 따라오는 바 (스크롤하면 오른쪽에 나타남, 좁은 화면은 아래) ---------- */
.rail {
  position: fixed; right: 14px; top: 50%; z-index: 25;
  display: flex; flex-direction: column; align-items: stretch; gap: 4px;
  padding: 6px; width: 62px;
  background: rgba(20, 24, 29, .92); backdrop-filter: blur(8px);
  border: 1px solid var(--line-2);
  opacity: 0; pointer-events: none; transform: translate(12px, -50%);
  transition: opacity .2s, transform .2s;
}
body.scrolled .rail { opacity: 1; pointer-events: auto; transform: translate(0, -50%); }
.rail a { display: grid; place-items: center; min-height: 30px; text-align: center; }
.rail-tg { font: 600 12px var(--f-body); color: var(--dim); border: 1px dashed var(--line-2); }
.rail-tg.on { color: var(--lime-ink); background: var(--lime); border: 1px solid var(--lime); }
.rail-tg:hover { filter: brightness(1.15); text-decoration: underline; text-underline-offset: 3px; }
.rail-sep { height: 1px; background: var(--line-2); margin: 2px 0; }
.rail-tier { font: 400 17px/1 var(--f-display); color: #0b0d10; min-height: 26px !important; }
.rail-tier:hover { filter: brightness(1.12); }
.rail-top { font: 600 16px var(--f-mono); color: var(--lime); border: 1px solid var(--line-2); }
.rail-top:hover { border-color: var(--lime); }
@media (max-width: 1100px) {
  .rail { top: auto; bottom: 10px; left: 50%; right: auto; width: auto; max-width: calc(100vw - 20px);
    flex-direction: row; overflow-x: auto; transform: translate(-50%, 12px); }
  body.scrolled .rail { transform: translate(-50%, 0); }
  .rail a { min-width: 40px; padding: 0 6px; }
  .rail-tg { min-width: 48px; }
  .rail-sep { width: 1px; height: auto; margin: 0 2px; }
}

/* 메가레벨 선택 */
.mega-lv { display: inline-flex; align-items: center; gap: 6px; margin-left: 10px; color: var(--muted); }
.mega-lv select { background: var(--panel, #15181d); color: var(--text, #e8ecef); border: 1px solid var(--line, #2a2f36); padding: 3px 6px; font: inherit; }

/* 필드 효과 */
.adv { padding: 10px 0; border-bottom: 1px solid var(--line); }
.adv:last-of-type { border-bottom: 0; }
.adv-head { display: flex; align-items: center; gap: 8px; }
.adv p { margin: 6px 0 0; }

/* 과거 레이드 기록 */
.rh-group { padding: 14px 0; border-bottom: 1px solid var(--line); }
.rh-group:last-of-type { border-bottom: 0; }
.rh-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 10px 16px; margin-bottom: 10px; }
.rh-bosses { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 8px; }
.rh-boss { display: flex; align-items: center; gap: 10px; padding: 8px 10px; background: var(--bg-2); border: 1px solid var(--line); color: inherit; text-decoration: none; min-width: 0; }
.rh-boss:hover { border-color: var(--line-2); }
.rh-boss img { width: 48px; height: 48px; object-fit: contain; flex: none; }
.rh-info { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; min-width: 0; }
.rh-info b { font-size: 14px; overflow-wrap: anywhere; }
.rh-mv { display: flex; flex-wrap: wrap; gap: 4px; }
.rh-mv .mv-tag { font-size: 11.5px; padding: 0 6px; }
.rh-tier + .rh-tier { margin-top: 10px; }
.rh-tier-h { margin: 0 0 6px; font-size: 12px; }
.rh-reg { display: inline-block; padding: 0 6px; font-size: 11px; font-weight: 600; font-family: inherit; color: #7fd4ff; background: none; border: 1px solid rgba(127,212,255,.45); cursor: pointer; }
.rh-reg:hover { background: rgba(127,212,255,.12); }
.mv-st { font-family: var(--f-mono); white-space: nowrap; }

/* 위쪽 모드 바: PVE / 다이맥스 / PVP */
.modebar { display: grid; grid-template-columns: repeat(3, 1fr); max-width: 1200px; margin: 14px auto 0; padding: 0 20px; gap: 0; }
.modebar a { display: flex; align-items: baseline; justify-content: center; gap: 8px; padding: 12px 8px; font: 700 15px var(--f-mono); color: var(--muted); text-decoration: none; background: var(--panel); border: 1px solid var(--line); }
.modebar a + a { border-left: 0; }
.modebar a small { font: 500 12px var(--f-body, inherit); color: var(--dim, var(--muted)); }
.modebar a:hover { color: var(--text); }
.modebar a.on { color: #0b0d10; background: var(--lime); border-color: var(--lime); }
.modebar a.on small { color: rgba(11,13,16,.7); }
@media (max-width: 520px) { .modebar { padding: 0 16px; } .modebar a { flex-direction: column; align-items: center; gap: 2px; font-size: 13px; } }
.adv-cost { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; }
.cost-ic { width: 22px; height: 22px; object-fit: contain; vertical-align: middle; margin-right: 3px; }
.cost-plus { color: var(--muted); margin: 0 2px; }
.appr { list-style: none; margin: 8px 0 0; padding: 0; font-size: 13px; }
.appr li { display: flex; align-items: center; gap: 6px; margin: 3px 0; }
.appr-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--muted); flex: none; }
.appr-dot.blue, .appr-blue { color: #4da3ff; } .appr-dot.blue { background: #4da3ff; box-shadow: 0 0 6px #4da3ff; }
.appr-dot.red, .appr-red { color: #ff4d4d; } .appr-dot.red { background: #ff4d4d; box-shadow: 0 0 6px #ff4d4d; }
.modebar[hidden] { display: none; }
.rh-range { max-width: 640px; margin: 4px 0 12px; }
.rh-range .cost-inputs input[type=date] { width: 170px; font: 600 15px var(--f-mono); color-scheme: dark; }

/* 상세 머리: 이름 옆 순위, 진화 바로가기 */
.dex-title { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; }
.head-rank { display: inline-flex; align-items: center; gap: 8px; font: 600 15px var(--f-body, inherit); color: var(--muted); letter-spacing: 0; }
.head-rank b { color: var(--lime); font-family: var(--f-mono); }
.head-rank a { color: inherit; text-decoration: none; } .head-rank a:hover { color: var(--text); }
.evo-quick { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 10px; }
.evo-quick > .small { margin-right: 4px; }
.evo-quick a { display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px 3px 4px; border: 1px solid var(--line-2); color: var(--text); text-decoration: none; font-size: 13px; background: var(--bg-2); }
.evo-quick a img { width: 28px; height: 28px; object-fit: contain; }
.evo-quick a:hover { border-color: var(--lime); }
.evo-quick a.on { border-color: var(--lime); color: var(--lime); }
.evo-arrow { color: var(--muted); }
.card .sub .card-mv { display: block; margin-top: 3px; font: 500 10.5px var(--f-body, inherit); color: var(--dim, var(--muted)); line-height: 1.3; overflow-wrap: anywhere; }
.map-card { max-width: min(1200px, 96vw); width: 100%; text-align: left; }
.world-map { width: 100%; height: auto; display: block; }
.world-map path { fill: #2a313a; stroke: #14181d; stroke-width: .4; }
.world-map path.on { fill: #7fd4ff; }
.world-map .map-sphere { fill: #0f1216; stroke: var(--line-2); }
.map-head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin: 0 40px 10px 0; }
.map-title { font-family: var(--f-display); font-size: 20px; color: #7fd4ff; font-weight: 400; }
.map-search { flex: 0 1 280px; min-width: 180px; padding: 8px 10px; background: var(--bg-2); color: var(--text); border: 1px solid var(--line-2); font: inherit; }
.map-search:focus { outline: none; border-color: var(--lime); }
.map-result .in, .map-tip .in { color: var(--lime); font-weight: 700; }
.map-result .out, .map-tip .out { color: #ff6a4d; font-weight: 700; }
.map-wrap { position: relative; }
.map-tip { position: absolute; z-index: 2; pointer-events: none; padding: 4px 8px; font-size: 13px; background: #0b0d10; border: 1px solid var(--line-2); white-space: nowrap; }
.world-map path[data-i]:hover { stroke: #fff; stroke-width: 1; }
.world-map.searching path[data-i] { opacity: .35; }
.world-map.searching path.hit { opacity: 1; stroke: #fff; stroke-width: 1.2; }
.world-map path.hit:not(.on) { fill: #ff6a4d; }
.world-map path.hit.on { fill: var(--lime); }
.map-card > p { text-align: left; max-width: none; margin: 8px 0 0; }

/* 레이드 보스 페이지 */
.raid-kv { margin-top: 12px; }
.need-big { font-size: 22px; margin: 4px 0 8px; } .need-big b { color: var(--lime); }
.sim-win { color: var(--lime); } .sim-lose { color: #ff6a4d; }
.deck { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 8px; margin-bottom: 10px; }
.deck-slot { display: flex; align-items: center; gap: 6px; }
.deck-slot span { font: 700 13px var(--f-mono); color: var(--muted); width: 14px; }
.deck-slot input, #raidTrainers { flex: 1; min-width: 0; padding: 7px 8px; background: var(--bg-2); color: var(--text); border: 1px solid var(--line-2); font: inherit; }
.rewards { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.reward { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px; background: var(--bg-2); border: 1px solid var(--line); text-align: center; }
.reward img { width: 40px; height: 40px; object-fit: contain; }
.reward small { color: var(--muted); font-size: 11.5px; }

/* PVP 랭킹 */
.pvp-row { border-bottom: 1px solid var(--line); }
.pvp-row .pvp-sum { display: grid; grid-template-columns: 34px 44px minmax(220px, 1fr) auto auto 150px; align-items: center; gap: 10px; padding: 8px 4px; cursor: pointer; list-style: none; }
.pvp-row .pvp-sum::-webkit-details-marker { display: none; }
.pvp-row .pvp-sum:hover { background: var(--bg-2); }
.pvp-row[open] summary { background: var(--bg-2); }
.pvp-rank { font: 700 14px var(--f-mono); color: var(--muted); text-align: right; }
.pvp-row .pvp-sum > img, .pvp-row .pvp-sum > .shw img { width: 44px; height: 44px; object-fit: contain; }
.pvp-name { display: flex; flex-direction: column; min-width: 0; }
.pvp-name small { color: var(--muted); font-size: 12px; display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.pvp-score { display: flex; flex-direction: column; gap: 4px; align-items: stretch; }
.pvp-score b { font: 700 16px var(--f-mono); color: var(--lime); text-align: right; }
.pvp-score .gauge, .pvp-cats .gauge { display: block; height: 6px; background: var(--bg); border: 1px solid var(--line); }
.pvp-score .gauge i, .pvp-cats .gauge i { display: block; height: 100%; background: var(--lime); }
.pvp-detail { padding: 6px 12px 14px 56px; }
.pvp-cats { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 6px 14px; margin-bottom: 10px; }
.pvp-cats > div { display: grid; grid-template-columns: 52px 1fr 40px; align-items: center; gap: 6px; font-size: 12px; }
.pvp-cats b { font-family: var(--f-mono); text-align: right; }
.pvp-mu { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.pvp-mu h4 { margin: 0 0 6px; font-size: 12px; color: var(--muted); }
.pvp-mu a { display: flex; justify-content: space-between; padding: 3px 0; color: var(--text); text-decoration: none; font-size: 13px; border-bottom: 1px dashed var(--line); }
.pvp-mu a:hover { color: var(--lime); }
.pvp-mu .win { color: var(--lime); font-family: var(--f-mono); } .pvp-mu .lose { color: #ff6a4d; font-family: var(--f-mono); }
.seg a small { font-size: 11px; opacity: .7; margin-left: 4px; }

/* 다이맥스 딜러/탱커 큰 바 */
.role-bar { display: grid; grid-template-columns: 1fr 1fr; margin: 6px 0 14px; }
.role-bar a { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 16px 10px; font: 400 24px var(--f-display); color: var(--muted); text-decoration: none; background: var(--bg-2); border: 1px solid var(--line-2); }
.role-bar a + a { border-left: 0; }
.role-bar a small { font: 500 12px var(--f-body, inherit); color: var(--dim); }
.role-bar a:hover { color: var(--text); }
.role-bar a.on { background: var(--lime); color: #0b0d10; border-color: var(--lime); }
.role-bar a.on small { color: rgba(11,13,16,.7); }
.tp .tp-all { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--line-2); font: 700 11px var(--f-mono); color: var(--text); }
.unrel-badge { display: inline-block; margin-left: 4px; padding: 0 5px; font-size: 10px; font-weight: 700; color: #ffc24d; border: 1px solid rgba(255,194,77,.5); vertical-align: middle; }
.raid-stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; margin: 14px 0 10px; }
.raid-stats > div { display: flex; flex-direction: column; gap: 4px; padding: 10px 12px; background: var(--bg-2); border: 1px solid var(--line); }
.raid-stats small { font-size: 12px; color: var(--muted); }
.raid-stats b { font: 700 26px var(--f-mono); color: var(--text); line-height: 1.1; }
.raid-stats b i { font-style: normal; font-size: 14px; color: var(--muted); margin-left: 2px; }
.boss-moves { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.boss-moves h4 { margin: 0 0 6px; font-size: 12px; color: var(--muted); }
.cnt-name { display: inline-flex; align-items: center; gap: 6px; color: var(--text); text-decoration: none; }
.cnt-name .tdots { margin-left: 2px; }
.cnt-tbl { font-size: 16px; }
.cnt-tbl th { font-size: 15px; }
.cnt-tbl td { padding: 6px 10px; }
.cnt-tbl .cnt-rk { width: 1%; font: 700 18px var(--f-mono); color: var(--muted); }
.cnt-tbl .cnt-name { font-size: 18px; font-weight: 600; gap: 8px; }
.cnt-tbl .mini { width: 48px; height: 48px; margin-right: 2px; }
.cnt-tbl .tdots .tdot { width: 22px; height: 22px; }
.cnt-tbl .cnt-mv { font-size: 15px; line-height: 1.5; }
.cnt-tbl td.num { font: 700 19px var(--f-mono); }
.cnt-tbl .cnt-solo { width: 26%; }
.cnt-solo { display: table-cell; }
.cnt-solo > * { vertical-align: middle; }
.cnt-bar { display: inline-block; width: calc(100% - 64px); height: 10px; background: var(--bg-2); border: 1px solid var(--line); }
.cnt-bar i { display: block; height: 100%; background: var(--muted); }
.cnt-bar.win i { background: var(--lime); }
.cnt-solo b { display: inline-block; width: 56px; text-align: right; font: 700 17px var(--f-mono); }
.sim-opts { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 8px 12px; align-items: end; margin: 6px 0 12px; }
.sim-opts label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--muted); }
.sim-opts label.chk { flex-direction: row; align-items: center; gap: 6px; font-size: 13px; color: var(--text); }
.sim-opts select, .sim-opts input[type=number] { padding: 7px 8px; background: var(--bg-2); color: var(--text); border: 1px solid var(--line-2); font: inherit; font-size: 14px; }
.sim-opts .btn { justify-self: start; }

/* 레이드 보스 페이지: 글씨·여백 키우기 */
.need-big { font-size: 30px; font-weight: 800; }
.need-rows { display: flex; flex-direction: column; gap: 10px; margin: 6px 0 14px; }
.need-row { display: grid; grid-template-columns: 44px 1fr 110px; align-items: center; gap: 12px; font-size: 16px; }
.need-row > span { color: var(--muted); font-weight: 600; }
.need-row .cnt-bar { width: 100%; height: 14px; }
.need-row b { font: 700 17px var(--f-mono); text-align: right; }
.boss-moves h4 { font-size: 14px; }
.boss-moves .sig-list { font-size: 15px; gap: 10px; }
.sim-opts label { font-size: 14px; }
.sim-opts label.chk { font-size: 15px; }
.sim-opts select, .sim-opts input[type=number] { font-size: 15px; padding: 9px 10px; }
.sim-opts .btn { background: var(--bg-2); color: var(--text); font: 700 15px var(--f-body, inherit); padding: 9px 16px; cursor: pointer; }
.sim-opts .btn:hover { border-color: var(--lime); color: var(--lime); }
#raidDeck input { font-size: 15px; }
.sim-deck { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px; margin-top: 8px; }
.sim-deck > div { display: flex; align-items: center; gap: 8px; padding: 8px 10px; background: var(--bg-2); border: 1px solid var(--line); }
.sim-deck .mini { width: 44px; height: 44px; margin: 0; }
.sim-deck span { display: flex; flex-direction: column; gap: 2px; font-size: 15px; }
.sim-deck small { color: var(--muted); font: 500 13px var(--f-mono); }
.reward img { width: 52px; height: 52px; }
.reward b { font-size: 15px; }
.reward small { font-size: 13px; }
.hist-table { font-size: 15px; }
.sim-deck { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.sim-deck span b { display: block; white-space: nowrap; }
.sim-deck span b * { display: inline; }
.sim-deck small { white-space: nowrap; }
.cpt-find { display: flex; align-items: center; gap: 12px; margin: 4px 0 10px; font-size: 15px; flex-wrap: wrap; }
.cpt-find input { width: 180px; padding: 9px 10px; background: var(--bg-2); color: var(--text); border: 1px solid var(--line-2); font: 700 17px var(--f-mono); }
.cpt-wrap { max-height: 460px; overflow-y: auto; }
.cpt-tbl { font: 600 16px var(--f-mono); }
.cpt-tbl th small { color: var(--muted); font-weight: 500; font-size: 12px; }
.cpt-tbl td { padding: 6px 12px; }
.cpt-tbl tr.iv100 td { color: var(--lime); }
.cpt-tbl tr.iv96 td:last-child { color: var(--lime); }
.cpt-tbl tr.hit td { background: rgba(200,245,60,.18); }
.rewards + h3 { margin-top: 18px; }
.reward small { line-height: 1.4; }
.need-row { grid-template-columns: 56px 1fr; padding: 10px 14px; background: var(--bg-2); border: 1px solid var(--line); font-size: 18px; }
.need-row .nv { font: 700 18px var(--f-body, inherit); text-align: left; }
.nv-no { color: var(--muted); }
.nv-cond { color: #ffb347; }
.nv-tight { color: #f5e663; }
.nv-ok, .nv-easy { color: var(--lime); }
.reward { justify-content: center; }
.raid-head { grid-template-columns: 220px minmax(260px, 340px) 1fr; align-items: start; }
.raid-head .raid-stats { display: flex; flex-direction: column; gap: 0; margin: 14px 0 10px; border: 1px solid var(--line); }
.raid-head .raid-stats > div { flex-direction: row; justify-content: space-between; align-items: baseline; padding: 8px 12px; border: 0; border-bottom: 1px solid var(--line); background: var(--bg-2); }
.raid-head .raid-stats > div:last-child { border-bottom: 0; }
.raid-head .raid-stats small { font-size: 14px; }
.raid-head .raid-stats b { font-size: 22px; }
.raid-need { align-self: stretch; padding-left: 24px; border-left: 1px solid var(--line); }
.raid-need h2 { margin-top: 0; }
.need-row { grid-template-columns: 110px 1fr; }
.cpt-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.cpt-grid .cpt-tbl { font-size: 15px; }
.cpt-grid .cpt-tbl td, .cpt-grid .cpt-tbl th { padding: 4px 8px; }
.pvp-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.pvp-top h1 { margin: 0; }
.pvp-top .page-search { margin: 0; flex: 0 1 420px; }
.pvp-leagues { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 16px; }
.pvp-leagues a { display: flex; flex-direction: row; justify-content: center; align-items: center; gap: 12px; padding: 14px; background: var(--bg-2); border: 1px solid var(--line-2); color: var(--text); text-decoration: none; }
.pvp-leagues a b { font-size: 20px; }
.pvp-leagues a small { color: var(--muted); font: 600 14px var(--f-mono); }
.pvp-leagues a.on { background: var(--lime); border-color: var(--lime); color: var(--lime-ink); }
.pvp-leagues a.on small { color: var(--lime-ink); opacity: .75; }
.pvp-leagues a:hover:not(.on) { border-color: var(--lime); }
.xl-tag { display: inline-block; margin-left: 8px; padding: 1px 7px; font: 700 12px var(--f-mono); color: #ffb347; border: 1px solid #ffb347; vertical-align: middle; }
.pvp-st { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 12px; }
.pvp-st > div { display: grid; grid-template-columns: auto 1fr; align-items: baseline; gap: 4px 10px; padding: 10px 12px; background: var(--bg-2); border: 1px solid var(--line); }
.pvp-st small { color: var(--muted); font-size: 14px; }
.pvp-st b { font: 700 20px var(--f-mono); text-align: right; }
.pvp-st .gauge { grid-column: 1 / -1; }
.pvp-st .all b { color: var(--lime); }
.pvp-r1 > div { align-items: center; }
.pvp-r1 .xl { display: flex; justify-content: center; border-color: #ffb347; }
.pvp-r1 .xl b { color: #ffb347; font-size: 16px; }
.pvp-mu h4 { font-size: 14px; color: var(--muted); }
.pvp-cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-bottom: 8px; }
.pvp-cols .pvp-mu { display: contents; }
.pvp-cols h4 { margin: 0 0 8px; font-size: 14px; color: var(--muted); }
.pvp-info .pvp-st { grid-template-columns: 1fr 1fr; gap: 6px; margin-bottom: 6px; }
.pvp-info .pvp-st > div { padding: 8px 10px; }
.pvp-info .pvp-st b { font-size: 18px; }
.pvp-info .pvp-r1 .xl { grid-column: 1 / -1; padding: 6px; }
.pvp-cols .pvp-mu a { font-size: 15px; padding: 6px 0; }
.pvp-st small { white-space: nowrap; }
/* 그림자 불꽃 표시 */
.shw { position: relative; display: inline-block; vertical-align: middle; line-height: 0; flex: none; }
.shw::after, .cimg.is-sh::after { content: ""; position: absolute; left: 0; bottom: 0; width: 38%; height: 38%; min-width: 12px; min-height: 12px; max-width: 40px; max-height: 40px; background: url(../img/shadow.png) no-repeat left bottom / contain; pointer-events: none; filter: drop-shadow(0 0 3px rgba(160,90,255,.7)); }
.dex-art .shw, .evo .shw { display: block; width: fit-content; margin: 0 auto; }
.cimg.is-sh::after { width: 30%; height: 30%; }
.lg-ic { width: 44px; height: 44px; object-fit: contain; flex: none; }
.pvp-leagues a b { font-size: 21px; }
.pvp-cups { margin-top: 10px; }
.pvp-cups > summary { cursor: pointer; list-style: none; padding: 10px 14px; text-align: center; background: var(--bg-2); border: 1px dashed var(--line-2); color: var(--muted); font-weight: 700; }
.pvp-cups > summary::-webkit-details-marker { display: none; }
.pvp-cups > summary::after { content: " ▾"; }
.pvp-cups[open] > summary::after { content: " ▴"; }
.pvp-cups > summary:hover { color: var(--lime); border-color: var(--lime); }
.pvp-cup-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 8px; margin-top: 8px; }
.pvp-cup-list a { display: flex; align-items: center; gap: 10px; padding: 8px 12px; background: var(--bg-2); border: 1px solid var(--line-2); color: var(--text); text-decoration: none; font-weight: 600; }
.pvp-cup-list a .lg-ic { width: 30px; height: 30px; }
.pvp-cup-list a:hover { border-color: var(--lime); }
.pvp-cup-list a.on { background: var(--lime); border-color: var(--lime); color: var(--lime-ink); }
.pvp-mini { display: flex; flex-direction: column; gap: 2px; padding: 0 10px; border-left: 1px solid var(--line); }
.pvp-mini > small { font-size: 12px; font-weight: 700; padding-left: 4px; }
.pvp-mini .pms { display: flex; gap: 2px; }
.pvp-mini.mu > small { color: var(--lime); } .pvp-mini.co > small { color: #ff6a4d; }
.pvp-mini .pm { display: flex; flex-direction: column; align-items: center; width: 68px; gap: 2px; }
.pvp-mini .pm img { width: 36px; height: 36px; object-fit: contain; }
.pvp-mini .pm i { font-style: normal; font-size: 11px; color: var(--muted); max-width: 68px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* 그림자 아우라: 뒤쪽 보라 원형 빛 + 실루엣 윤곽 빛 (불꽃은 작게 유지) */
.shw::before, .cimg.is-sh::before { content: ""; position: absolute; inset: -6%; border-radius: 50%; pointer-events: none;
  background: radial-gradient(closest-side, rgba(170,90,255,.55), rgba(110,40,200,.28) 55%, transparent 100%);
  animation: shadowPulse 3.2s ease-in-out infinite; }
.cimg.is-sh::before { inset: 8%; z-index: 0; }
.shw > img, .cimg.is-sh > img { position: relative; z-index: 1; filter: drop-shadow(0 0 2px rgba(200,140,255,.9)) drop-shadow(0 0 6px rgba(140,60,255,.75)); }
.cimg.is-sh > img { position: absolute; }
.shw::after, .cimg.is-sh::after { z-index: 2; width: 30%; height: 30%; }
@keyframes shadowPulse { 0%, 100% { opacity: .75; transform: scale(.94); } 50% { opacity: 1; transform: scale(1.04); } }
@media (prefers-reduced-motion: reduce) { .shw::before, .cimg.is-sh::before { animation: none; } }
.sig-strip { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 4px 0 12px; }
.sig-h { font-weight: 700; color: var(--muted); margin-right: 4px; }
.sig-mv { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; background: var(--bg-2); border: 1px solid var(--line-2); font-size: 15px; font-weight: 600; }
.sig-mv small { color: var(--muted); font-size: 12px; }
.fc-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(380px, 1fr)); gap: 16px 28px; }
.fc-grid .fc { border-bottom: 0; padding-bottom: 0; }
.fc-grid .fc + .fc { margin-top: 0; padding-top: 0; border-top: 0; }
.shiny-toggle { z-index: 3; }
.stat-all b { color: var(--lime); }
.sr-head { display: flex; justify-content: space-between; align-items: center; padding: 8px 10px 4px; font-size: 13px; color: var(--muted); font-weight: 700; }
.sr-head button, .sr-del { background: none; border: 0; color: var(--muted); cursor: pointer; font: inherit; }
.sr-head button:hover, .sr-del:hover { color: var(--lime); }
.sr-del { margin-left: auto; font-size: 18px; padding: 0 6px; line-height: 1; }
.eff-row.res b { color: #5aa9ff; }
.type-picker > .tp-all { display: block; margin-bottom: 8px; padding: 9px; text-align: center; font: 700 14px var(--f-body, inherit); letter-spacing: 0; color: var(--text); background: var(--bg-2); border: 1px solid var(--line-2); }
.type-picker > .tp-all.on { background: var(--lime); color: var(--lime-ink); border-color: var(--lime); }
.pvp-use { order: 3; text-align: right; font-size: 13px; color: var(--muted); }
.pvp-use em { font: 700 14px var(--f-mono); font-style: normal; color: var(--text); }
/* 다이맥스 순위 */
.role-bar a { font-size: 26px; padding: 18px 10px; }
.dx-jump { margin-top: 14px; }
.dx-sec { scroll-margin-top: 80px; }
.dx-h { display: flex; align-items: center; gap: 10px; }
.dx-h .ticon, .dx-h .tp-all { width: 32px; height: 32px; }
.dx-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.dx-row { display: grid; grid-template-columns: 44px 60px 1fr auto; align-items: center; gap: 12px; padding: 12px 16px; background: var(--bg-2); border: 1px solid var(--line); color: var(--text); text-decoration: none; }
.dx-row:hover { border-color: var(--lime); }
.dx-row.more { display: none; }
.dx-sec.open .dx-row.more { display: grid; }
.dx-row > img, .dx-row > .shw img { width: 60px; height: 60px; object-fit: contain; }
.dx-name .tdot { width: 20px; height: 20px; }
.dx-rk { display: grid; place-items: center; width: 44px; height: 44px; font: 700 18px var(--f-mono); background: var(--line-2); color: var(--text); }
.dx-rk.rk1 { background: linear-gradient(135deg, #ffd34d, #f5a500); color: #1a1300; }
.dx-rk.rk2 { background: linear-gradient(135deg, #e8edf3, #a9b4c2); color: #10151c; }
.dx-rk.rk3 { background: linear-gradient(135deg, #e48a3c, #b25a14); color: #1a0d00; }
.dx-name { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.dx-name b { font-size: 18px; }
.dx-name small { display: flex; align-items: center; gap: 4px; color: var(--muted); font-size: 13px; }
.dx-score { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.dx-score b { font: 700 20px var(--f-mono); color: var(--lime); }
.dx-score small { font-size: 12px; padding: 2px 6px; background: var(--line-2); color: var(--text); white-space: nowrap; }
.dx-score small:empty { display: none; }
.dx-score small.gmax { color: #ff6a6a; }
.dx-more { display: block; margin: 12px auto 0; cursor: pointer; background: var(--bg-2); color: var(--text); }
.dx-rail { position: fixed; right: 12px; top: 50%; transform: translate(120%, -50%); display: flex; flex-direction: column; gap: 2px; padding: 6px; background: var(--panel); border: 1px solid var(--line-2); z-index: 50; transition: transform .2s; max-height: 90vh; overflow-y: auto; }
.dx-rail.show { transform: translate(0, -50%); }
.dx-rail .tp { padding: 3px; }
.dx-rail .tp span:not(.tp-all) { display: none; }
.dx-rail .ticon, .dx-rail .tp-all { width: 28px; height: 28px; font-size: 9px; }
@media (max-width: 900px) { .dx-grid { grid-template-columns: 1fr; } }
.dx-sec.searching .dx-row.more { display: grid; }
.dx-sec.searching .dx-more { display: none; }
.dx-sec.searching .dx-row:not(.hit) { opacity: .35; }
.dx-row.hit { border-color: var(--lime); background: rgba(200,245,60,.1); box-shadow: 0 0 0 1px var(--lime) inset; }

/* 상단 바: 로고 · 모드(PVE/다이맥스/PVP) · 검색 · 메뉴 */
.topbar { grid-template-columns: auto auto 1fr auto; gap: 24px; padding: 8px 24px; }
.topbar .modebar { display: flex; max-width: none; margin: 0; padding: 0; gap: 4px; }
.topbar .modebar a { display: flex; align-items: center; gap: 8px; padding: 10px 16px; border: 0; background: none; font: 700 16px var(--f-body, inherit); color: var(--muted); position: relative; }
.topbar .modebar a .mb-ic { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--line-2); color: var(--text); font-size: 13px; }
.topbar .modebar a:hover { color: var(--text); }
.topbar .modebar a.on { color: var(--lime); background: none; }
.topbar .modebar a.on .mb-ic { background: var(--lime); color: var(--lime-ink); }
.topbar .modebar a.on::after { content: ""; position: absolute; left: 16px; right: 16px; bottom: -9px; height: 3px; background: var(--lime); }
.topbar .search { justify-self: end; width: 100%; max-width: 380px; }
.topbar .menu-btn { width: 44px; height: 40px; justify-content: center; padding: 0; }
.burger, .burger::before, .burger::after { display: block; width: 22px; height: 3px; background: var(--text); border-radius: 2px; position: relative; }
.burger::before, .burger::after { content: ""; position: absolute; left: 0; }
.burger::before { top: -7px; } .burger::after { top: 7px; }
@media (max-width: 860px) {
  .topbar { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; padding: 8px 16px; }
  .topbar .modebar { grid-column: 1 / -1; grid-row: 2; justify-content: space-around; }
  .topbar .modebar a { flex-direction: row; font-size: 15px; padding: 8px 10px; }
  .topbar .modebar a.on::after { bottom: -4px; }
  .topbar .search { max-width: none; }
}
.drawer { left: auto; right: 0; border-right: 0; border-left: 1px solid var(--line); transform: translateX(100%); }
/* 상단 바 내용을 본문 폭(1200px)에 맞춰 가운데로 */
@media (min-width: 861px) { .topbar { padding-left: max(20px, calc((100vw - 1160px) / 2)); padding-right: max(20px, calc((100vw - 1160px) / 2)); } }

.pvp-row { display: block; color: var(--text); text-decoration: none; }
.pvp-row:hover .pvp-sum { background: var(--bg-2); }
/* PVP 포켓몬 상세 */
.pvpm-head .muted .lg-ic { width: 24px; height: 24px; vertical-align: middle; }
.pvpm-head .raid-stats { grid-template-columns: repeat(3, minmax(120px, 180px)); }
.pvpm-leagues { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px; margin-top: 16px; }
.pvpm-leagues a { display: grid; grid-template-columns: 28px 1fr auto; grid-template-rows: auto auto; align-items: center; column-gap: 8px; padding: 8px 12px; background: var(--bg-2); border: 1px solid var(--line-2); color: var(--text); text-decoration: none; }
.pvpm-leagues a .lg-ic { width: 28px; height: 28px; grid-row: 1 / 3; }
.pvpm-leagues a span { font-weight: 600; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pvpm-leagues a b { font: 700 16px var(--f-mono); color: var(--lime); grid-row: 1 / 3; grid-column: 3; }
.pvpm-leagues a small { color: var(--muted); font: 500 12px var(--f-mono); }
.pvpm-leagues a.on { border-color: var(--lime); background: rgba(200,245,60,.08); }
.pvpm-leagues a:hover { border-color: var(--lime); }
.pvpm-rec { display: flex; flex-direction: column; gap: 8px; }
.pvpm-rec > div { display: flex; align-items: center; gap: 10px; padding: 12px 14px; background: var(--bg-2); border: 1px solid var(--line); font-size: 17px; }
.pvpm-rec small { width: 70px; color: var(--muted); font-size: 13px; }
.pvpm-rec .tdot { width: 24px; height: 24px; }
.pvpm-mv { font-size: 15px; }
.pvpm-mv tr.rec td { background: rgba(200,245,60,.06); }
.pvpm-use { min-width: 180px; }
.pvpm-use .gauge { display: inline-block; width: calc(100% - 64px); height: 8px; vertical-align: middle; background: var(--bg); border: 1px solid var(--line); }
.pvpm-use .gauge i { display: block; height: 100%; background: var(--lime); }
.pvpm-use b { display: inline-block; width: 56px; text-align: right; font: 700 14px var(--f-mono); }
.pvpm-mus { display: flex; flex-direction: column; gap: 6px; }
.pvpm-mu { display: grid; grid-template-columns: 48px 1fr auto; align-items: center; gap: 10px; padding: 6px 12px; background: var(--bg-2); border: 1px solid var(--line); color: var(--text); text-decoration: none; font-size: 16px; font-weight: 600; }
.pvpm-mu img { width: 48px; height: 48px; object-fit: contain; }
.pvpm-mu b { font: 700 18px var(--f-mono); }
.pvpm-mu b.win { color: var(--lime); } .pvpm-mu b.lose { color: #ff6a4d; }
.pvpm-mu:hover { border-color: var(--lime); }
.pvpm-head .muted { display: flex; align-items: center; gap: 6px; font-weight: 600; }
.pvpm-head .muted .lg-ic { display: inline-block; }
.pvpm-leagues { grid-template-columns: repeat(3, 1fr); }
.pvpm-leagues .pvpm-none { display: grid; grid-template-columns: 28px 1fr auto; align-items: center; column-gap: 8px; padding: 8px 12px; border: 1px dashed var(--line-2); color: var(--muted); opacity: .6; }
.pvpm-leagues .pvpm-none .lg-ic { width: 28px; height: 28px; }
.pvp-cups .pvpm-leagues { margin-top: 8px; }
.gimmick { border-left: 3px solid var(--lime); }
.gimmick p { margin: 0; font-size: 16px; line-height: 1.7; }
td.bf { font-size: 13px; white-space: nowrap; }
.bf-up { color: var(--lime); font-weight: 700; }
.bf-down { color: #ff6a4d; font-weight: 700; }
td.bf small { color: var(--muted); }
td.bf, td.bf small, td.bf span { font-size: 14px; }
td.bf span { font-weight: 600; }
.bf-self { color: var(--lime); }
.bf-opp { color: #ff6a4d; }
.bf-self { color: #5aa9ff; }
.backbar { display: flex; align-items: center; gap: 12px; }
.mode-sw a { min-width: 72px; text-align: center; font-weight: 700; }
.fx dl { display: grid; grid-template-columns: 200px 1fr; gap: 10px 20px; margin: 0; }
.fx dt { color: var(--muted); font-weight: 600; }
.fx dd { margin: 0; font-size: 15px; line-height: 1.6; }
@media (max-width: 700px) { .fx dl { grid-template-columns: 1fr; gap: 2px; } .fx dd { margin-bottom: 10px; } }

/* ================= 모바일 ================= */
.grid-2 > *, .home-hero > *, .dex-head > *, .raid-head > * { min-width: 0; }
@media (max-width: 760px) {
  main { padding: 16px 12px 48px; }
  .panel { padding: 16px; }
  .grid-2 { grid-template-columns: 1fr; gap: 12px; }
  h1, .dex-title { font-size: 26px; word-break: keep-all; overflow-wrap: anywhere; }
  .home-hero h1 { font-size: 26px; }
  .hh-podium { overflow: hidden; }
  .pod-4, .pod-5 { display: none; }
  /* 상세 머리: 그림 위, 정보 아래 */
  .dex-head, .raid-head { grid-template-columns: 1fr; text-align: left; gap: 14px; }
  .dex-art { max-width: 200px; margin: 0 auto; }
  .dex-art img { width: 160px; height: 160px; }
  .raid-need { padding-left: 0; border-left: 0; border-top: 1px solid var(--line); padding-top: 14px; }
  .raid-stats, .pvpm-head .raid-stats { grid-template-columns: repeat(2, 1fr); }
  .types { flex-wrap: wrap; }
  .kv { grid-template-columns: 110px 1fr; }
  .kv dd { overflow-wrap: anywhere; }
  .fc-grid { grid-template-columns: 1fr; }
  .fc-flow { flex-wrap: wrap; }
  .cpt-grid { grid-template-columns: 1fr; }
  /* 표는 칸 안에서 가로 스크롤 */
  .table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .cnt-tbl .cnt-solo { min-width: 140px; }
  /* PVP 목록: 상대 아이콘 숨기고 이름·점수만 */
  .pvp-row .pvp-sum { grid-template-columns: 26px 40px minmax(0, 1fr) 76px; gap: 8px; }
  .pvp-mini { display: none !important; }
  .pvp-name b { font-size: 15px; overflow-wrap: anywhere; }
  .pvp-name small { font-size: 12px; }
  .pvp-leagues { grid-template-columns: repeat(3, 1fr); gap: 6px; }
  .pvp-leagues a { flex-direction: column; gap: 4px; padding: 10px 4px; }
  .pvp-leagues a b { font-size: 14px; }
  .lg-ic { width: 32px; height: 32px; }
  .pvp-top .page-search { flex: 1 1 100%; }
  .pvpm-leagues { grid-template-columns: repeat(2, 1fr); }
  .pvp-st { grid-template-columns: repeat(2, 1fr); }
  .pvpm-mv { font-size: 13px; }
  /* 다이맥스 */
  .dx-row { grid-template-columns: 36px 48px minmax(0, 1fr) auto; gap: 8px; padding: 10px; }
  .dx-rk { width: 36px; height: 36px; font-size: 15px; }
  .dx-row > img, .dx-row > .shw img { width: 48px; height: 48px; }
  .dx-name b { font-size: 15px; }
  .dx-rail { right: 4px; }
  .role-bar a { font-size: 20px; padding: 12px 6px; }
  .tp-grid { grid-template-columns: repeat(6, 1fr); }
  /* 레이드 기록 날짜 입력 */
  .rh-range { flex-wrap: wrap; }
  .rh-range input[type=date] { min-width: 0; width: 100%; }
  .rh-range label { flex: 1 1 140px; min-width: 0; }
  .seg { flex-wrap: wrap; }
  .sim-opts { grid-template-columns: 1fr 1fr; }
  .deck { grid-template-columns: 1fr 1fr; }
  .need-row { grid-template-columns: 80px 1fr; font-size: 16px; }
  .rewards { grid-template-columns: repeat(2, 1fr); }
  .page-search input { max-width: none; }
}
.deck > *, .sim-opts > * { min-width: 0; }
.sim-opts select, .sim-opts input[type=number] { width: 100%; min-width: 0; }
@media (max-width: 760px) { .sim-opts label.chk { white-space: normal; } .sim-opts { grid-template-columns: 1fr; } }
/* PVP 배틀 */
.pvp-tabs { margin-bottom: 16px; }
.pvp-tabs a { font-size: 20px; padding: 12px; }
.btl-grid { display: grid; grid-template-columns: 1fr auto 1fr; gap: 14px; align-items: start; }
.btl-grid > * { min-width: 0; }
.btl-vs { align-self: center; font: 400 32px var(--f-display); color: var(--lime); }
.btl-side { display: flex; flex-direction: column; gap: 10px; }
.btl-side label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--muted); }
.btl-side select, .btl-side input { padding: 9px 10px; background: var(--bg-2); color: var(--text); border: 1px solid var(--line-2); font: inherit; font-size: 15px; min-width: 0; }
.btl-pick { display: flex; align-items: center; gap: 10px; }
.btl-pick img { width: 64px; height: 64px; object-fit: contain; flex: none; }
.btl-pick input { flex: 1; font-size: 18px; font-weight: 700; }
.btl-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.btl-row > span { width: 52px; color: var(--muted); font-size: 13px; }
.btl-row .btl-iv { width: 56px; text-align: center; }
.btl-r1 { padding: 8px 12px; background: var(--bg-2); color: var(--text); cursor: pointer; font-size: 13px; }
.btl-cp { font: 600 13px var(--f-mono); }
.btl-res { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.btl-res > div { display: flex; flex-direction: column; gap: 6px; padding: 16px; background: var(--bg-2); border: 1px solid var(--line); }
.btl-res b { font: 700 40px var(--f-mono); }
.btl-res .win b { color: var(--lime); } .btl-res .lose b { color: #ff6a4d; }
.btl-res span { font-size: 18px; font-weight: 700; }
.btl-res small { color: var(--muted); font-size: 13px; }
.btl-hp { height: 12px; background: var(--bg); border: 1px solid var(--line); }
.btl-hp i { display: block; height: 100%; background: var(--lime); }
.btl-res .lose .btl-hp i { background: #ff6a4d; }
.btl-tl { font-size: 14px; }
.btl-tl td { padding: 4px 10px; }
.btl-ev.charged { color: var(--lime); font-weight: 700; }
.btl-ev.shield { color: #5aa9ff; font-weight: 700; }
.btl-ev.faint { color: #ff6a4d; font-weight: 700; }
.btl-ev small { color: var(--muted); }
@media (max-width: 760px) { .btl-grid { grid-template-columns: 1fr; } .btl-vs { justify-self: center; font-size: 24px; } .btl-res b { font-size: 30px; } }
.btl-tl tr.tl-fast { display: none; }
.btl-tl.show-fast tr.tl-fast { display: table-row; }
.btl-tl td.num, .btl-tl th.num { width: 60px; }
.btl-tl-h { display: flex; align-items: center; gap: 14px; }
.toggle-chk { font: 500 14px var(--f-body, inherit); color: var(--muted); display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
/* 배틀 재생 */
.btl-go-wrap { display: flex; justify-content: center; margin: 10px 0; }
.btl-go { padding: 14px 44px; font: 400 26px var(--f-display); color: var(--lime-ink); background: var(--lime); border: 0; cursor: pointer; box-shadow: 0 0 0 3px rgba(200,245,60,.2); }
.btl-go:hover { filter: brightness(1.08); }
.btl-lives { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.btl-live { padding: 12px 14px; background: var(--bg-2); border: 1px solid var(--line); transition: opacity .3s; }
.btl-live.ko { opacity: .45; }
.bl-name { display: flex; align-items: center; gap: 8px; font-size: 17px; }
.bl-name img { width: 44px; height: 44px; object-fit: contain; }
.bl-hp { position: relative; height: 26px; margin: 8px 0; background: #0b1a33; border: 2px solid var(--line-2); }
.bl-hp i { position: absolute; inset: 0 auto 0 0; background: linear-gradient(90deg, #19b37a, #3ddc97); transition: width .15s; }
.bl-hp span { position: relative; display: block; text-align: center; font: 700 15px/22px var(--f-mono); color: #fff; text-shadow: 0 1px 2px #000; }
.bl-row { display: flex; align-items: center; gap: 12px; }
.bl-moves { display: flex; gap: 8px; }
.bl-cm { position: relative; display: grid; place-items: center; width: 54px; height: 54px; border-radius: 50%; overflow: hidden; background: color-mix(in srgb, var(--tc) 25%, var(--bg)); border: 2px solid var(--tc); }
.bl-cm i { position: absolute; left: 0; right: 0; bottom: 0; height: 0; background: var(--tc); opacity: .55; transition: height .15s; }
.bl-cm em { position: relative; font-style: normal; font-size: 10px; font-weight: 700; text-align: center; line-height: 1.1; padding: 0 3px; }
.bl-cm.ready { box-shadow: 0 0 10px var(--tc); }
.bl-cm.ready i { opacity: .9; }
.bl-en { display: flex; flex-direction: column; align-items: center; }
.bl-en b { font: 700 22px var(--f-mono); }
.bl-en small { color: var(--muted); font-size: 11px; }
.bl-sh { display: flex; gap: 4px; margin-left: auto; }
.bl-sh i { width: 18px; height: 20px; background: #e43ab3; clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%); }
.bl-sh i.used { background: var(--line-2); }
.btl-svg { width: 100%; height: 120px; margin-top: 6px; background: var(--bg-2); border: 1px solid var(--line); }
.btl-svg .lane { stroke: var(--line-2); stroke-dasharray: 4 4; }
.btl-svg .ev { opacity: 0; transition: opacity .2s; }
.btl-svg .ev.on { opacity: 1; }
.btl-svg .cur { stroke: var(--lime); stroke-width: 2; }
.btl-ctl { display: flex; justify-content: center; gap: 10px; margin: 10px 0; }
.btl-ctl button, .btl-ctl select { padding: 6px 14px; background: var(--bg-2); color: var(--text); border: 1px solid var(--line-2); font-size: 16px; cursor: pointer; }
.btl-sum { text-align: center; font-size: 20px; margin: 12px 0; padding: 14px; background: var(--bg-2); border: 1px solid var(--line); }
.btl-sum .br { display: inline-block; padding: 2px 12px; font: 700 22px var(--f-mono); }
.btl-sum .br.win { background: var(--lime); color: var(--lime-ink); } .btl-sum .br.lose { background: #ff6a4d; color: #1a0500; }
@media (max-width: 760px) { .btl-lives { grid-template-columns: 1fr; } .bl-cm { width: 46px; height: 46px; } }
.btl-lives { grid-template-columns: 1fr auto 1fr; align-items: center; }
.btl-lives .btl-vs { font-size: 28px; }
.btl-live[data-i="0"] { border-top: 3px solid #f5c400; }
.btl-live[data-i="1"] { border-top: 3px solid #6a6af5; }
.btl-now { display: flex; align-items: center; gap: 14px; margin-top: 12px; padding: 12px 16px; background: var(--bg-2); border: 1px solid var(--line); font-size: 18px; min-height: 52px; }
.bn-time { font: 700 18px var(--f-mono); color: var(--muted); min-width: 64px; }
.bn-msg b.a0 { color: #f5c400; } .bn-msg b.a1 { color: #8f8fff; }
.bn-msg b.sh { color: #e43ab3; } .bn-msg b.ko { color: #ff4d4d; }
.btl-svg { height: 150px; }
.btl-svg .lane.l0 { stroke: rgba(245,196,0,.5); } .btl-svg .lane.l1 { stroke: rgba(106,106,245,.6); }
.lane-lb { font: 700 15px var(--f-body, sans-serif); }
.lane-lb.l0 { fill: #f5c400; } .lane-lb.l1 { fill: #8f8fff; }
.ev-lb { font: 600 12px var(--f-body, sans-serif); fill: var(--text); }
.btl-legend { display: flex; justify-content: center; gap: 18px; flex-wrap: wrap; margin-top: 8px; font-size: 13px; color: var(--muted); }
.btl-legend span { display: inline-flex; align-items: center; gap: 6px; }
.btl-legend i { display: inline-block; }
.lg-f { width: 9px; height: 9px; background: var(--muted); }
.lg-c { width: 14px; height: 14px; border-radius: 50%; background: var(--muted); }
.lg-s { width: 14px; height: 15px; background: #e43ab3; clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%); }
.btl-legend b { color: #ff4d4d; }
@media (max-width: 760px) { .btl-lives { grid-template-columns: 1fr; } .btl-lives .btl-vs { justify-self: center; } }
.gm-sum { font-size: 18px; font-weight: 700; margin: 0 0 14px; }
.gm-flow { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 14px; }
.gm-form { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 16px; background: var(--bg-2); border: 1px solid var(--line); font-weight: 700; }
.gm-form img { width: 72px; height: 72px; object-fit: contain; }
.gm-arrow { display: flex; flex-direction: column; align-items: center; color: var(--lime); font-size: 28px; line-height: 1; }
.gm-arrow span { font-size: 13px; color: var(--muted); margin-bottom: 4px; }
.gm-rules { width: 100%; font-size: 15px; margin-bottom: 12px; }
.gm-rules td { white-space: normal; vertical-align: top; line-height: 1.6; }
.gm-rules td:first-child { width: 42%; color: var(--muted); }
.gm-rules b { color: var(--lime); }
.gm-tip { margin: 0; padding: 10px 14px; background: rgba(200,245,60,.06); border-left: 3px solid var(--lime); font-size: 15px; line-height: 1.6; }
.gm-tip b { color: var(--lime); margin-right: 6px; }
@media (max-width: 760px) { .gm-rules td:first-child { width: 45%; } }
/* PVP 상세 스탯: 왼쪽 열 = 공격·방어·체력·스탯곱, 오른쪽 열 = 1등 개체·레벨·XL */
.pvpm-st2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; align-items: start; }
.pvpm-st2 .pvp-st { grid-template-columns: 1fr; margin: 0; }
.pvpm-st2 .pvp-r1 .xl { grid-column: auto; padding: 12px; }
.pvpm-active { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 6px; }
.pvpm-active a, .pvpm-active span { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px 4px 6px; border: 1px solid var(--line-2); color: var(--muted); font-weight: 700; font-size: 15px; text-decoration: none; }
.pvpm-active .lg-ic { width: 24px; height: 24px; }
.pvpm-active a.on { color: var(--text); border-color: var(--lime); background: rgba(200,245,60,.08); }
.pvpm-active a:hover { color: var(--text); border-color: var(--lime); }
.bf-key { margin-left: 6px; font-size: 12px; font-weight: 600; }
.bf-key i { font-style: normal; margin-right: 6px; }
.legacy-seg { display: grid; grid-template-columns: 1fr 1fr; margin: 12px 0 4px; max-width: 520px; }
.legacy-seg a { text-align: center; padding: 10px; font-weight: 700; font-size: 15px; }
/* 잡을 때 CP표: 눈 편하게 (얇은 글씨, 줄무늬, IV만 색) */
.cpt-grid { gap: 0 28px; }
.cpt-grid .cpt-tbl { font: 500 14px var(--f-mono); }
.cpt-grid .cpt-tbl th { font: 500 12px var(--f-body, inherit); color: var(--dim, var(--muted)); border-bottom: 1px solid var(--line); }
.cpt-grid .cpt-tbl td { padding: 5px 8px; border-bottom: 0; color: var(--text); }
.cpt-grid .cpt-tbl tbody tr:nth-child(even) td { background: rgba(255,255,255,.025); }
.cpt-grid .cpt-tbl td:nth-child(2) { color: var(--muted); }
.cpt-iv { color: var(--muted) !important; }
.cpt-iv i { font-style: normal; opacity: .4; margin: 0 1px; }
.cpt-grid .cpt-tbl tr.iv100 td, .cpt-grid .cpt-tbl tr.iv96 td:last-child { color: inherit; }
.ivb { display: inline-block; min-width: 46px; padding: 1px 6px; text-align: center; font-size: 13px; color: var(--muted); }
.iv96 .ivb { color: var(--lime); }
.iv100 .ivb { background: var(--lime); color: var(--lime-ink); font-weight: 700; }
.iv100 td:first-child { color: var(--lime) !important; font-weight: 700; }
.cpt-grid { gap: 0 16px; }
.cpt-grid > * { min-width: 0; }
.cpt-grid .cpt-tbl { width: 100%; table-layout: fixed; }
.cpt-grid .cpt-tbl td, .cpt-grid .cpt-tbl th { padding: 5px 4px; }
.cpt-grid .cpt-tbl th:nth-child(3), .cpt-grid .cpt-tbl td:nth-child(3) { width: 34%; }
.ivb { min-width: 0; width: 100%; }
.pvpm-head { grid-template-columns: 220px 1fr minmax(260px, 380px); align-items: start; }
.pvpm-eff { padding-left: 20px; border-left: 1px solid var(--line); align-self: stretch; }
.pvpm-eff h3 { margin: 0 0 10px; font-size: 16px; }
.pvpm-eff .eff-row b { font-size: 15px; }
@media (max-width: 760px) { .pvpm-head { grid-template-columns: 1fr; } .pvpm-eff { padding-left: 0; border-left: 0; border-top: 1px solid var(--line); padding-top: 12px; } }
/* PVP 메뉴 */
.pvp-menu { display: flex; flex-direction: column; gap: 14px; max-width: 640px; margin: 10px auto; }
.pvp-menu a { display: flex; align-items: center; gap: 20px; padding: 20px 26px; background: var(--bg-2); border: 1px solid var(--line-2); color: var(--text); text-decoration: none; transition: border-color .15s, transform .15s; }
.pvp-menu a:hover { border-color: var(--lime); transform: translateY(-2px); }
.pm-ic { display: grid; place-items: center; width: 56px; height: 56px; flex: none; border-radius: 50%; background: var(--lime); color: var(--lime-ink); font: 700 26px var(--f-mono); }
.pvp-menu b { display: block; font: 400 30px var(--f-display); }
.pvp-menu small { color: var(--muted); font-size: 15px; }
.pvp-tabs { grid-template-columns: repeat(5, 1fr); }
/* 데미지 계산 */
.dmg-st a { min-width: 34px; text-align: center; padding: 6px 4px; font: 600 13px var(--f-mono); }
.dmg-tbl { font-size: 14px; }
.dmg-tbl tr.rec td { background: rgba(200,245,60,.06); }
.dmg-pct { min-width: 150px; }
.dmg-pct .gauge { display: inline-block; width: calc(100% - 64px); height: 8px; vertical-align: middle; background: var(--bg); border: 1px solid var(--line); }
.dmg-pct .gauge i { display: block; height: 100%; background: var(--lime); }
.dmg-pct b { display: inline-block; width: 58px; text-align: right; font: 700 14px var(--f-mono); }
.eff-up { color: #ff6a4d; font-weight: 700; } .eff-down { color: #5aa9ff; font-weight: 700; }

/* 입력칸 자동완성 드롭다운 */
.combo { position: relative; display: flex; flex: 1; min-width: 0; }
.combo > input { flex: 1; min-width: 0; width: 100%; }
.combo-list { z-index: 30; max-height: 320px; min-width: 220px; }
.combo-list .tdots { display: inline-flex; gap: 2px; margin-right: 6px; vertical-align: -2px; }
.combo-list .tdot { width: 14px; height: 14px; }
.map-head .combo { flex: 0 1 240px; }
.combo .combo-list img:not(.tdot) { width: 40px; height: 40px; flex: none; }
.combo .combo-list .tdot { width: 14px; height: 14px; }
.combo-list a { padding: 4px 10px; }
.dmg-tbl tr.dmg-sec td { padding: 10px 10px 6px; background: none; border-bottom: 1px solid var(--line-2); font-weight: 700; font-size: 13px; color: var(--lime); letter-spacing: .02em; }
.dmg-tbl th, .dmg-tbl td { padding-left: 8px; padding-right: 8px; white-space: nowrap; }
.dmg-pct { min-width: 0; }
.dmg-pct .gauge { width: 56px; }
.dmg-pct b { width: auto; min-width: 52px; margin-left: 6px; }
/* 메가 레벨 + 기술 */
.mv-plus { font-weight: 800; background: linear-gradient(90deg, #fff6b0, #ffd23f 45%, #ff9de2); -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 0 4px rgba(255,210,63,.3)); }

/* 목록 보기: 표처럼 열 고정 */
.lrows { --lcols: 52px 64px minmax(220px, 340px) 88px 88px 88px minmax(120px, 1fr); --lgap: 20px; }
.lhead { display: grid; grid-template-columns: var(--lcols); column-gap: var(--lgap); align-items: end; padding: 4px 16px 8px 14px; font: 700 15px var(--f-body); color: var(--text); letter-spacing: .02em; }
.lhead a { text-align: center; color: var(--text); font: 700 16px var(--f-mono); }
.lhead a:hover, .lhead a.on { color: var(--lime); }
.lnum { font: 500 16px var(--f-mono); text-align: center; color: var(--text); font-variant-numeric: tabular-nums; }
.lnum.on { color: var(--lime); font-weight: 700; }
.ltot { grid-column: span 2; display: grid; grid-template-columns: 88px 1fr; align-items: center; gap: var(--lgap); }
.ltot .lnum { color: var(--text); }
.ltot.on .lnum { color: var(--lime); font-weight: 700; }
.ltot .gauge i { background: repeating-linear-gradient(90deg, var(--lime) 0 5px, rgba(200,245,60,.55) 5px 6px); box-shadow: 0 0 8px rgba(200,245,60,.35); }
@media (max-width: 760px) {
  .lrows { --lcols: 40px 52px repeat(3, minmax(0, 1fr)); --lgap: 10px; }
  .lrow { padding: 10px; column-gap: 10px; row-gap: 8px; }
  .lhead { display: none; }
  .linfo { grid-column: 3 / -1; }
  .lrow > .lnum[data-l="DPS"] { grid-column: 1 / 3; }
  .lnum { text-align: left; font-size: 14px; }
  .lnum::before { content: attr(data-l) " "; font: 600 11px var(--f-mono); color: var(--muted); }
  .ltot { grid-column: 4 / -1; grid-template-columns: auto 1fr; gap: 8px; }
  .ltot .lnum { text-align: left; }
}
@media (max-width: 480px) {
  .topbar .modebar a { font-size: 13.5px; padding: 8px 4px; gap: 5px; }
  .topbar .modebar a .mb-ic { width: 22px; height: 22px; font-size: 11px; }
}
/* 잡을 때 CP 찾기: 줄무늬보다 우선, 맞는 줄은 전부 강조 */
.cpt-grid .cpt-tbl tbody tr.hit td { background: rgba(200,245,60,.2); color: var(--text); }
.cpt-grid .cpt-tbl tbody tr.hit td:first-child { box-shadow: inset 3px 0 0 var(--lime); color: var(--lime); font-weight: 700; }
/* 받을 수 있었던 배경: 배경 그림 크기(정사각형) 카드, 그림은 뒤에 은은하게 */
.bgg-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.bgg { position: relative; aspect-ratio: 1; display: flex; flex-direction: column; justify-content: space-between; padding: 12px; background: var(--bg-2); border: 1px solid var(--line); isolation: isolate; }
.bgg.has-img::before { content: ""; position: absolute; inset: 0; z-index: -2; background: var(--bgimg) center / cover no-repeat; opacity: .55; }
.bgg::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(11,13,16,.55) 0%, rgba(11,13,16,.15) 35%, rgba(11,13,16,.75) 65%, rgba(11,13,16,.95) 100%); }
.bgg-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.bgg-head .bg-tag { background: rgba(11,13,16,.75); backdrop-filter: blur(2px); max-width: 100%; text-align: left; }
.bgg-kind { font-size: 12.5px; color: var(--text); background: rgba(11,13,16,.7); padding: 2px 6px; flex: none; }
.bgg ul { list-style: none; margin: 0; padding: 0; }
.bgg li { display: grid; grid-template-columns: 1fr auto; align-items: center; column-gap: 8px; padding: 6px 0; border-top: 1px solid rgba(255,255,255,.12); font-size: 13px; }
.bgg li .hist-date { font-size: 13.5px; white-space: nowrap; }
.bgg-src { grid-column: 1 / -1; grid-row: 2; color: #b7bec8; font-size: 12px; }
.bgg-g { font-size: 12.5px; color: #b7bec8; }
.bgg-g.on { color: var(--lime); font-weight: 700; }
@media (max-width: 520px) { .bgg-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; } .bgg { padding: 8px; } .bgg-head { flex-direction: column; align-items: flex-start; gap: 4px; } .bgg-head .bg-tag { font-size: 12px; } .bgg li { grid-template-columns: minmax(0, 1fr) auto; } .bgg li .hist-date { font-size: 11.5px; grid-column: 1 / -1; white-space: normal; } .bgg-src { grid-column: 1; } .bgg-g { grid-row: 2; grid-column: 2; } }
.btl-img { display: block; flex: none; border-radius: 8px; transition: transform .12s, filter .12s; }
.btl-img:hover { transform: scale(1.08); filter: drop-shadow(0 0 8px rgba(200,245,60,.5)); }
/* 배경 모아보기 */
.bgc-grid { display: grid; grid-template-columns: repeat(var(--cols, 4), minmax(0, 1fr)); gap: 12px; }
@media (max-width: 1000px) { .bgc-grid { grid-template-columns: repeat(min(var(--cols, 4), 3), minmax(0, 1fr)); } }
.bgc { position: relative; aspect-ratio: 1; display: flex; flex-direction: column; justify-content: space-between; padding: 10px; border: 1px solid var(--line); background: var(--bg-2); isolation: isolate; }
.bgc::before { content: ""; position: absolute; inset: 0; z-index: -2; background: var(--bgimg) center / cover no-repeat; opacity: .7; }
.bgc::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(11,13,16,.8) 0%, rgba(11,13,16,0) 35%, rgba(11,13,16,0) 60%, rgba(11,13,16,.85) 100%); }
.bgc-head b { display: block; font-size: 14.5px; line-height: 1.3; }
.bgc-head small { font: 500 11.5px var(--f-mono); color: #c3cad3; }
.bgc-mons { display: flex; flex-wrap: wrap; gap: 4px; }
.bgc-mon.bg-tag { padding: 0; width: 40px; height: 40px; background: rgba(11,13,16,.7); border: 1px solid rgba(255,255,255,.15); display: grid; place-items: center; }
.bgc-mon img { width: 36px; height: 36px; }
.bgc-mon:hover { border-color: var(--lime); }
@media (max-width: 520px) { .bgc-grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 8px; } .bgc-cols { display: none; } .bgc-mon.bg-tag { width: 34px; height: 34px; } .bgc-mon img { width: 30px; height: 30px; } }
.bgc-mon.more { display: none; }
.bgc.open .bgc-mon.more { display: grid; }
.bgc.open .bgc-more { display: none; }
.bgc-more { width: 40px; height: 40px; background: rgba(11,13,16,.8); border: 1px solid rgba(255,255,255,.25); color: var(--lime); font: 700 13px var(--f-mono); cursor: pointer; }
.bgc-more:hover { border-color: var(--lime); }
.bgc.open { aspect-ratio: auto; min-height: 0; }
@media (max-width: 520px) { .bgc-more { width: 34px; height: 34px; } }
/* 잠재파워 '타입 랜덤' 배지: 18타입 색을 도는 무지개 */
.type.type-any { --tc: #8a93a3; background: linear-gradient(var(--bg-2), var(--bg-2)) padding-box, linear-gradient(90deg, #ff9741, #f4d23c, #63bc5a, #4fc1a6, #3692dc, #a864c7, #ec8fe6) border-box; border: 1px solid transparent; }
.ti-any { display: grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; font: 800 11px/1 var(--f-mono); font-style: normal; color: #fff; background: conic-gradient(#ff9741, #f4d23c, #63bc5a, #4fc1a6, #3692dc, #5a53be, #a864c7, #ec8fe6, #ff9741); text-shadow: 0 0 3px rgba(0,0,0,.6); }
/* ---------- 메인 ---------- */
.mm-hero { display: flex; align-items: center; gap: 18px; padding: 26px 4px 22px; }
.logo-mark.big { width: 52px; height: 60px; flex: none; }
.logo-mark.big::after { inset: 14px 12px; }
.mm-hero h1 { margin: 0; font-size: 44px; line-height: 1; }
.mm-hero h1 b { font: 600 22px var(--f-mono); background: var(--lime); color: var(--lime-ink); padding: 2px 8px; margin-left: 8px; vertical-align: 10px; }
.mm-hero p { margin: 8px 0 0; color: var(--muted); font-size: 16px; }
.mm-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 18px; }
.mm-card { --mc: var(--lime); display: flex; flex-direction: column; background: #0d0f13; border: 1px solid var(--line); position: relative; overflow: hidden; }
.mm-card.mm-dmax { --mc: #ff3d6e; }
.mm-card.mm-pvp { --mc: #4da3ff; }
.mm-card::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px; background: var(--mc); z-index: 3; box-shadow: 0 0 18px var(--mc); }
.mm-main { position: relative; display: block; height: 440px; text-decoration: none; color: var(--text); overflow: hidden; isolation: isolate; }
.mm-art { position: absolute; inset: 0; z-index: -1;
  background: radial-gradient(90% 70% at 60% 60%, color-mix(in srgb, var(--mc) 30%, transparent), transparent 70%), linear-gradient(180deg, #0d0f13, color-mix(in srgb, var(--mc) 10%, #0d0f13)); }
.mm-main::after { content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none; background: linear-gradient(180deg, rgba(9,10,13,.92) 0%, rgba(9,10,13,.35) 32%, rgba(9,10,13,0) 55%, rgba(9,10,13,.55) 100%); }
.mm-txt { position: relative; z-index: 1; display: flex; flex-direction: column; gap: 6px; padding: 24px 24px 0; }
.mm-ic { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--mc); color: #0b0d10; font-size: 20px; font-weight: 700; box-shadow: 0 0 20px color-mix(in srgb, var(--mc) 60%, transparent); }
.mm-txt b { font: 400 46px/1.05 var(--f-display); margin-top: 6px; text-shadow: 0 2px 18px rgba(0,0,0,.8); }
.mm-txt small { color: #c3cad3; font-size: 15px; text-shadow: 0 1px 8px rgba(0,0,0,.9); }
.mm-main:hover .mm-txt b { color: var(--mc); }
.mm-art img { position: absolute; pointer-events: none; filter: drop-shadow(0 14px 30px rgba(0,0,0,.6)); }

/* PVE: 이로치 메가레쿠쟈가 크게 떠다님 + 반짝임 */
.art-ray { width: 112%; right: -18%; bottom: -6%; animation: mm-float 7s ease-in-out infinite; }
@keyframes mm-float { 0%, 100% { transform: translateY(0) rotate(-2deg); } 50% { transform: translateY(-16px) rotate(1deg); } }
.sp { position: absolute; left: var(--x); top: var(--y); width: 14px; height: 14px; background: #fff7c2; clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%); opacity: 0; animation: mm-twinkle 2.4s var(--d) ease-in-out infinite; filter: drop-shadow(0 0 6px #ffe86b); }
@keyframes mm-twinkle { 0%, 100% { opacity: 0; transform: scale(.3) rotate(0); } 50% { opacity: 1; transform: scale(1) rotate(90deg); } }

/* 다이맥스: 거다이맥스 리자몽이 화면을 꽉 채우고 붉은 기운이 맥동 */
.dmax-cloud { position: absolute; left: -10%; right: -10%; bottom: -20%; height: 70%; background: radial-gradient(60% 60% at 50% 60%, rgba(255,61,110,.55), rgba(160,30,90,.25) 50%, transparent 75%); animation: mm-pulse 3s ease-in-out infinite; }
@keyframes mm-pulse { 0%, 100% { opacity: .7; transform: scale(1); } 50% { opacity: 1; transform: scale(1.08); } }
.art-gmax { width: 125%; left: -8%; bottom: -16%; animation: mm-grow 6s ease-in-out infinite; transform-origin: 50% 100%; }
@keyframes mm-grow { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.05); } }
.em { position: absolute; left: var(--x); bottom: -10px; width: var(--s); height: var(--s); border-radius: 50%; background: #ff7a9c; box-shadow: 0 0 10px #ff3d6e; opacity: 0; animation: mm-rise 3s var(--d) linear infinite; }
@keyframes mm-rise { 0% { opacity: 0; transform: translateY(0); } 15% { opacity: 1; } 100% { opacity: 0; transform: translateY(-360px); } }

/* PVP: 파비코리 vs 두드리짱, 번갈아 들썩 */
.art-l { width: 50%; left: 0; bottom: 14%; animation: mm-bob 2.6s ease-in-out infinite; }
.art-r { width: 48%; right: 0; bottom: 4%; transform: scaleX(-1); animation: mm-bob-r 2.6s 1.3s ease-in-out infinite; }
.art-b { width: 30%; left: 35%; bottom: -4%; opacity: .9; animation: mm-bob 3.2s .6s ease-in-out infinite; }
@keyframes mm-bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }
@keyframes mm-bob-r { 0%, 100% { transform: scaleX(-1) translateY(0); } 50% { transform: scaleX(-1) translateY(-12px); } }
.vs { position: absolute; left: 50%; top: 60%; transform: translate(-50%, -50%); font: 400 54px var(--f-display); color: #fff; text-shadow: 0 0 18px var(--mc), 0 0 36px var(--mc); animation: mm-vs 1.6s ease-in-out infinite; z-index: 1; }
@keyframes mm-vs { 0%, 100% { opacity: .75; transform: translate(-50%, -50%) scale(1); } 50% { opacity: 1; transform: translate(-50%, -50%) scale(1.12); } }

.mm-links { display: flex; border-top: 1px solid var(--line); background: var(--panel); position: relative; z-index: 2; }
.mm-links a { flex: 1; text-align: center; padding: 14px 6px; font-size: 14.5px; font-weight: 600; color: var(--text); }
.mm-links a + a { border-left: 1px solid var(--line); }
.mm-links a:hover { background: color-mix(in srgb, var(--mc) 16%, transparent); color: var(--mc); }
@media (prefers-reduced-motion: reduce) { .mm-art *, .vs { animation: none !important; } }

/* 아래 기능: 도감 · 기록 · 도구 묶음 */
.mm-tools { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; padding: 24px; }
.mt-group h3 { margin: 0 0 10px; font-size: 13px; letter-spacing: .08em; color: var(--muted); }
.mt { display: flex; align-items: center; gap: 12px; padding: 10px 8px; border-radius: 6px; color: var(--text); }
.mt + .mt { margin-top: 2px; }
.mt:hover { background: var(--bg-2); }
.mt:hover .mt-ic { color: #0b0d10; background: var(--lime); border-color: var(--lime); }
.mt-ic { display: grid; place-items: center; width: 40px; height: 40px; flex: none; border-radius: 10px; background: var(--bg-2); border: 1px solid var(--line-2); color: var(--lime); transition: background .12s, color .12s; }
.mt-ic svg { width: 21px; height: 21px; }
.mt b { display: block; font-size: 15px; }
.mt small { display: block; color: var(--muted); font-size: 12.5px; margin-top: 1px; }
@media (max-width: 860px) {
  .mm-grid { grid-template-columns: 1fr; }
  .mm-main { height: 300px; }
  .mm-txt b { font-size: 36px; }
  .art-ray { width: 80%; right: -6%; bottom: -16%; }
  .art-gmax { width: 72%; left: auto; right: -4%; bottom: -14%; }
  .art-l { width: 30%; left: 34%; bottom: 6%; } .art-r { width: 32%; right: 0; bottom: 2%; } .art-b { width: 18%; left: 58%; bottom: -6%; }
  .vs { left: 66%; top: 66%; font-size: 36px; }
  .mm-hero h1 { font-size: 34px; }
  .mm-tools { grid-template-columns: 1fr; gap: 14px; padding: 16px; }
  .mt-group { display: grid; grid-template-columns: 1fr 1fr; gap: 2px 8px; }
  .mt-group h3 { grid-column: 1 / -1; }
  .mt + .mt { margin-top: 0; }
  .mt { padding: 8px 4px; gap: 8px; }
  .mt-ic { width: 34px; height: 34px; }
  .mt small { display: none; }
}
.mm-leagues { display: flex; gap: 10px; margin-top: 10px; }
.mm-leagues img { width: 46px; height: 46px; object-fit: contain; filter: drop-shadow(0 4px 10px rgba(0,0,0,.6)) drop-shadow(0 0 8px rgba(77,163,255,.35)); animation: mm-bob 2.8s var(--d) ease-in-out infinite; }
@media (max-width: 860px) { .mm-leagues img { width: 36px; height: 36px; } }
/* 타입 상성: 타입별 목록 */
.tc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 12px; }
.tc-card { background: var(--bg-2); border: 1px solid var(--line); border-left: 3px solid var(--tc); padding: 12px 14px; }
.tc-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.tc-head .type { font-size: 15px; }
.tc-head small { color: var(--muted); font-size: 12.5px; }
.tc-row { display: grid; grid-template-columns: 92px 1fr; gap: 8px; align-items: start; padding: 6px 0; border-top: 1px solid var(--line); }
.tc-row b { font: 700 13.5px var(--f-mono); padding-top: 3px; }
.tc-row.up b { color: #ff6b5a; }
.tc-row.down b { color: #5aa9ff; }
.tc-row.zero b { color: #8a93a3; }
.tc-row span { display: flex; flex-wrap: wrap; gap: 5px; }
@media (max-width: 520px) { .tc-grid { grid-template-columns: 1fr; } }
/* 기술 목록 표: 숫자 열 폭을 같게, 기술·타입 열만 넓게 */
#mvTable { width: 100%; table-layout: fixed; }
#mvTable th, #mvTable td { padding-left: 10px; padding-right: 10px; }
#mvTable th:nth-child(1) { width: 26%; }
#mvTable th:nth-child(2) { width: 120px; }
#mvTable th.num, #mvTable td.num { text-align: center; }
#mvTable th:has(.bf-key) { width: 24%; }
#mvTable td:first-child { overflow-wrap: anywhere; }
@media (max-width: 760px) { #mvTable { table-layout: auto; min-width: 720px; } }
.mv-users { background: none; border: 1px solid var(--line-2); color: var(--text); font: 500 14px var(--f-mono); padding: 3px 10px; cursor: pointer; border-radius: 4px; }
.mv-users:hover, .mv-users.on { border-color: var(--lime); color: var(--lime); }
.mv-users-row td { background: var(--bg-2); padding: 10px 12px !important; }
.mvu-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 6px; }
.mvu-list a { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 4px; font-size: 12px; text-align: center; color: var(--text); border: 1px solid transparent; }
.mvu-list a:hover { border-color: var(--lime); }
.mvu-list img { width: 48px; height: 48px; }
.mvu-list a span { overflow-wrap: anywhere; line-height: 1.25; }
.mv-lv small { margin-left: 3px; color: #ffd23f; font-size: .85em; }
/* 한 줄 카드 수가 적을수록 포켓몬 아이콘도 크게 */
.bgc-grid[data-n="3"] .bgc-mon.bg-tag, .bgc-grid[data-n="3"] .bgc-more { width: 54px; height: 54px; }
.bgc-grid[data-n="3"] .bgc-mon img { width: 50px; height: 50px; }
.bgc-grid[data-n="2"] .bgc-mon.bg-tag, .bgc-grid[data-n="2"] .bgc-more { width: 72px; height: 72px; }
.bgc-grid[data-n="2"] .bgc-mon img { width: 66px; height: 66px; }
.bgc-grid[data-n="2"] .bgc-mons, .bgc-grid[data-n="3"] .bgc-mons { gap: 6px; }
.bgc-grid[data-n="2"] .bgc-head b { font-size: 18px; }
@media (max-width: 520px) { .bgc-grid[data-n] .bgc-mon.bg-tag, .bgc-grid[data-n] .bgc-more { width: 34px; height: 34px; } .bgc-grid[data-n] .bgc-mon img { width: 30px; height: 30px; } }
.bgc-grid[data-n="2"] .bgc-mon img, .bgc-grid[data-n="3"] .bgc-mon img { transform: scale(1.3); }
.bgc-grid[data-n="2"] .bgc-more { font-size: 17px; }
/* ---------- PVP 팀 ---------- */
.tm-view { margin-bottom: 4px; }
.tm-list { display: flex; flex-direction: column; gap: 10px; }
.tm-card { background: var(--bg-2); border: 1px solid var(--line); }
.tm-card.open { border-color: var(--lime); }
.tm-top { display: grid; grid-template-columns: 40px 1fr 90px auto; align-items: center; gap: 14px; padding: 10px 14px; }
.tm-rank { font: 700 18px var(--f-mono); color: var(--muted); text-align: center; }
.tm-card:nth-child(-n+3) .tm-rank { color: var(--lime); }
.tm-line { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.tm-mon { display: flex; align-items: center; gap: 8px; min-width: 0; color: var(--text); }
.tm-mon img, .tm-noimg { width: 52px; height: 52px; flex: none; }
.tm-noimg { display: grid; place-items: center; border: 1px dashed var(--line-2); color: var(--muted); font-size: 22px; }
.tm-mon span { min-width: 0; }
.tm-mon b { display: block; font-size: 15px; }
.tm-mon small { display: block; color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tm-mon:hover b { color: var(--lime); }
.tm-stat { text-align: center; }
.tm-stat b { display: block; font: 700 20px var(--f-mono); color: var(--lime); }
.tm-stat small { color: var(--muted); font-size: 12px; }
.tm-btns { display: flex; flex-direction: column; gap: 6px; }
.tm-btns .btn { padding: 6px 12px; font-size: 13px; }
.tm-report { padding: 14px; border-top: 1px solid var(--line); }
.tm-kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 12px; }
.tm-kpis > div { background: var(--panel); border: 1px solid var(--line); padding: 10px 12px; }
.tm-kpis small { display: block; color: var(--muted); font-size: 12.5px; margin-bottom: 4px; }
.tm-kpis b { font: 700 24px var(--f-mono); }
.tm-kpis b i { font-style: normal; font-size: 15px; color: var(--muted); }
.tm-kpis .good, .tm-report h4.good { color: var(--lime); }
.tm-kpis .bad, .tm-report h4.bad { color: #ff6b5a; }
.tm-types { display: flex; flex-wrap: wrap; gap: 5px; }
.tm-order { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; padding: 10px 12px; margin-bottom: 12px; background: rgba(200,245,60,.06); border-left: 3px solid var(--lime); }
.tm-order > span { font-weight: 700; color: var(--lime); margin-right: 6px; }
.tm-order > div { display: flex; align-items: center; gap: 6px; }
.tm-order small { font-size: 12px; color: var(--muted); }
.tm-order img { width: 40px; height: 40px; }
.tm-order i { font-style: normal; color: var(--muted); }
.tm-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.tm-report h4 { margin: 0 0 8px; font-size: 15px; }
.tm-report h4 small { color: var(--muted); font-weight: 500; font-size: 12px; margin-left: 4px; }
.tm-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.tm-chip { display: flex; align-items: center; gap: 4px; padding: 2px 8px 2px 2px; background: var(--panel); border: 1px solid var(--line); font-size: 13px; color: var(--text); }
.tm-chip img, .tm-chip .tm-noimg { width: 30px; height: 30px; }
.tm-chip.win { border-color: rgba(200,245,60,.4); }
.tm-chip.lose { border-color: rgba(255,107,90,.45); }
.tm-matrix { margin-top: 12px; }
.tm-matrix summary { cursor: pointer; color: var(--muted); font-size: 13.5px; }
.tm-r.w2 { color: var(--lime); font-weight: 700; } .tm-r.w1 { color: #b7e36a; } .tm-r.l1 { color: #ffb36b; } .tm-r.l2 { color: #ff6b5a; font-weight: 700; }
.tm-slots { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.tm-slot { background: var(--bg-2); border: 1px solid var(--line); padding: 12px; }
.tm-slot.empty { border-style: dashed; }
.tm-slot-h { display: flex; align-items: center; gap: 10px; }
.tm-slot-h img, .tm-slot-h .tm-noimg { width: 56px; height: 56px; flex: none; }
.tm-no { font: 700 14px var(--f-mono); color: var(--muted); }
.tm-slot-h .combo { flex: 1; min-width: 0; }
.tm-slot-h input { flex: 1; min-width: 0; font-size: 16px; font-weight: 700; padding: 8px 10px; background: var(--panel); color: var(--text); border: 1px solid var(--line-2); }
.tm-del { background: none; border: 1px solid var(--line-2); color: var(--muted); width: 30px; height: 30px; cursor: pointer; flex: none; }
.tm-del:hover { color: #ff6b5a; border-color: #ff6b5a; }
.tm-moves { display: grid; gap: 6px; margin-top: 10px; }
.tm-moves select { padding: 6px 8px; background: var(--panel); color: var(--text); border: 1px solid var(--line-2); font: inherit; font-size: 13.5px; }
.tm-sugs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.tm-sug { display: flex; align-items: center; gap: 10px; padding: 8px 12px; background: var(--bg-2); border: 1px solid var(--line); color: var(--text); text-align: left; cursor: pointer; font: inherit; }
.tm-sug img, .tm-sug .tm-noimg { width: 48px; height: 48px; flex: none; }
.tm-sug span { flex: 1; min-width: 0; }
.tm-sug b { display: block; font-size: 15px; }
.tm-sug small { color: var(--muted); font-size: 12.5px; }
.tm-sug i { font-style: normal; font-size: 22px; color: var(--lime); }
.tm-sug:hover { border-color: var(--lime); }
@media (max-width: 860px) {
  .tm-top { grid-template-columns: 30px 1fr; }
  .tm-stat, .tm-btns { grid-column: 2; }
  .tm-btns { flex-direction: row; }
  .tm-stat { text-align: left; display: flex; gap: 6px; align-items: baseline; }
  .tm-line { grid-template-columns: 1fr; }
  .tm-kpis, .tm-cols, .tm-slots, .tm-sugs { grid-template-columns: 1fr; }
}
@media (max-width: 520px) { .pvp-tabs a { font-size: 15px; padding: 10px 4px; } }
.tm-mon .shw, .tm-sug .shw, .tm-chip .shw, .tm-order .shw, .tm-slot-h .shw { flex: none; display: inline-block; position: relative; }
.tm-mon .shw { width: 52px; height: 52px; } .tm-sug .shw { width: 48px; height: 48px; } .tm-chip .shw { width: 30px; height: 30px; } .tm-order .shw { width: 40px; height: 40px; } .tm-slot-h .shw { width: 56px; height: 56px; }
.tm-mon .shw img, .tm-sug .shw img, .tm-chip .shw img, .tm-order .shw img, .tm-slot-h .shw img { width: 100%; height: 100%; }
@media (max-width: 520px) { .pvp-tabs { grid-template-columns: repeat(3, 1fr); } .pvp-tabs a { font-size: 14px; } }
/* 인기 팀 카드 버튼 (button 기본 흰 바탕 덮기) */
.tm-btns .btn { background: var(--bg-2); color: var(--text); font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; justify-content: center; }
.tm-btns .btn:hover { border-color: var(--lime); color: var(--lime); }
.tm-btns .tm-an { background: var(--lime); color: var(--lime-ink); border-color: var(--lime); }
.tm-btns .tm-an:hover { color: var(--lime-ink); filter: brightness(1.08); }
