/* ==========================================================================
   FC 英灵殿 · 从者检索档案
   底图：蓝天漩涡 / 主色：奶油白 + 朱红 + 金色
   ========================================================================== */
:root {
  --ink: #172433;
  --ink-2: #3c4e60;
  --muted: #7b6a52;
  --cream: #fff8e8;
  --paper: #fffdf6;
  --red: #e8402f;
  --red-deep: #b92418;
  --gold: #f2b53c;
  --sky: #9ed8f0;
  --line: #e9ddc4;
  --w: 1160px;
  --r: 26px;
  --mono: ui-monospace, "Cascadia Mono", "SFMono-Regular", Consolas, monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: #081726;
  font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { display: block; max-width: 100%; }
button, input, select { font: inherit; }
button { color: inherit; }
a { color: inherit; text-decoration: none; }
code {
  font-family: var(--mono);
  font-size: .9em;
  background: #f4ead6;
  border: 1px solid #e7d9bd;
  border-radius: 5px;
  padding: 1px 5px;
  color: #8a5220;
}
.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
main { position: relative; z-index: 1; }

/* ---------------------------------------------------------------- backdrop */
.sky {
  position: fixed; inset: 0; z-index: 0;
  background: #081726 url("bg.jpg") center 38% / cover no-repeat;
}
.sky::after {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(115% 75% at 50% 40%, rgba(4, 15, 30, .08) 0%, rgba(4, 15, 30, .42) 68%, rgba(4, 15, 30, .66) 100%),
    linear-gradient(180deg, rgba(3, 12, 24, .74) 0%, rgba(3, 12, 24, .22) 24%, rgba(3, 12, 24, .16) 54%, rgba(5, 18, 32, .80) 100%);
}

/* ------------------------------------------------------------------ topbar */
.topbar {
  position: fixed; inset: 0 0 auto 0; z-index: 40;
  display: flex; align-items: center; gap: 26px;
  padding: 14px clamp(16px, 3.4vw, 40px);
  transition: background .25s ease, box-shadow .25s ease, backdrop-filter .25s;
}
.topbar.scrolled {
  background: rgba(7, 19, 33, .80);
  backdrop-filter: blur(14px) saturate(130%);
  -webkit-backdrop-filter: blur(14px) saturate(130%);
  box-shadow: 0 1px 0 rgba(255, 248, 232, .12);
}
.brand { display: flex; align-items: center; gap: 11px; }
.brand img { width: 42px; height: 42px; filter: drop-shadow(0 6px 12px rgba(0, 0, 0, .45)); }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-text strong { color: var(--cream); font-size: 16px; letter-spacing: .06em; }
.brand-text em {
  font-style: normal; font-size: 8.5px; letter-spacing: .26em;
  color: var(--gold); margin-top: 3px;
}
.nav { display: flex; gap: 26px; margin-left: auto; }
.nav a {
  color: rgba(255, 248, 232, .78); font-size: 13.5px; letter-spacing: .06em;
  padding: 6px 0; position: relative; transition: color .18s;
}
.nav a::after {
  content: ""; position: absolute; left: 0; right: 100%; bottom: 0;
  height: 2px; background: var(--gold); transition: right .2s ease;
}
.nav a:hover { color: var(--cream); }
.nav a:hover::after { right: 0; }
.group-chip {
  color: rgba(255, 248, 232, .62); font-size: 11px; letter-spacing: .05em;
  border: 1px solid rgba(255, 248, 232, .22); border-radius: 999px;
  padding: 6px 12px; white-space: nowrap;
}
.group-chip b { color: var(--cream); font-weight: 700; letter-spacing: .08em; }

/* -------------------------------------------------------------------- hero */
.hero {
  min-height: 100svh;
  padding: 148px 22px 92px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; position: relative;
}
.kicker {
  display: flex; align-items: center; gap: 14px;
  margin: 0 0 20px; color: #ffe6ae;
  font-size: 10.5px; font-weight: 700; letter-spacing: .34em;
}
.kicker span { width: 42px; height: 1px; background: linear-gradient(90deg, transparent, rgba(255, 230, 174, .75)); }
.kicker span:last-child { background: linear-gradient(90deg, rgba(255, 230, 174, .75), transparent); }
.hero h1 {
  margin: 0; color: var(--cream); font-weight: 900;
  font-size: clamp(54px, 9.6vw, 118px);
  line-height: .98; letter-spacing: .015em;
  text-shadow: 0 4px 0 rgba(160, 26, 18, .42), 0 30px 70px rgba(0, 0, 0, .55);
}
.hero h1 .hl { display: inline-block; color: var(--gold); }
.lede {
  margin: 26px 0 0; color: rgba(255, 248, 232, .88);
  font-size: clamp(13.5px, 1.5vw, 16px); line-height: 2; letter-spacing: .04em;
  text-shadow: 0 2px 18px rgba(0, 8, 18, .55);
}
.lede b { color: var(--gold); font-size: 1.18em; font-weight: 800; padding: 0 2px; }

/* -------------------------------------------------------------- search bar */
.search { width: min(780px, 100%); margin-top: 32px; text-align: left; }
.searchbox {
  display: flex; align-items: center;
  background: var(--cream);
  border: 4px solid var(--red);
  border-radius: 10px;
  box-shadow: 0 22px 60px rgba(1, 9, 20, .5), inset 0 2px 0 rgba(255, 255, 255, .5);
  transition: outline-color .18s, transform .18s, box-shadow .18s;
}
.searchbox:focus-within {
  outline: 3px solid var(--gold); outline-offset: 4px;
  box-shadow: 0 26px 70px rgba(1, 9, 20, .55);
}
.ico-search {
  width: 25px; height: 25px; margin: 0 4px 0 20px; flex: none;
  fill: none; stroke: var(--red); stroke-width: 2.6; stroke-linecap: round;
}
#q {
  flex: 1; min-width: 0; height: 72px; border: 0; outline: 0; background: transparent;
  padding: 0 10px; color: var(--ink); font-size: 19px; font-weight: 600; letter-spacing: .02em;
}
#q::placeholder { color: #a1937c; font-weight: 500; }
#q::-webkit-search-cancel-button { -webkit-appearance: none; }
.key {
  flex: none; margin-right: 12px; padding: 3px 8px;
  border: 1px solid #dccdaf; border-bottom-width: 2px; border-radius: 6px;
  background: #fffdf6; color: #a08d6f; font-family: var(--mono); font-size: 11px;
}
.searchbtn {
  flex: none; display: flex; align-items: center; justify-content: center; gap: 8px;
  align-self: stretch; width: 128px; border: 0; cursor: pointer;
  background: var(--red); color: #fff; font-weight: 800; font-size: 17px; letter-spacing: .08em;
  transition: background .18s ease;
}
.searchbtn svg { width: 22px; height: 22px; fill: none; stroke: #fff; stroke-width: 2.8; stroke-linecap: round; }
.searchbtn:hover { background: var(--red-deep); }
.searchbtn:active { transform: translateY(1px); }
.suggests { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 13px; color: rgba(255, 248, 232, .55); font-size: 11.5px; }
.suggests button {
  border: 1px solid rgba(255, 248, 232, .30); background: rgba(4, 14, 27, .28);
  color: rgba(255, 248, 232, .88); border-radius: 999px; padding: 5px 12px; cursor: pointer;
  font-size: 11.5px; letter-spacing: .04em; transition: .18s;
}
.suggests button:hover { background: var(--cream); border-color: var(--cream); color: var(--red); }
.search-status {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  margin: 12px 2px 0; color: rgba(255, 248, 232, .9); font-size: 12px; letter-spacing: .03em;
}
.search-status b { color: var(--gold); font-size: 14px; }
.search-status button {
  border: 0; border-bottom: 1px solid rgba(255, 230, 174, .7); background: transparent;
  color: #ffe6ae; font-size: 12px; font-weight: 700; padding: 2px 0; cursor: pointer;
}
.search-status button:hover { color: #fff; border-color: #fff; }

.hero-meta { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 32px; }
.meta-chip {
  display: inline-flex; align-items: baseline; gap: 6px;
  background: rgba(255, 248, 232, .94); color: var(--ink);
  border: 1px solid rgba(255, 255, 255, .5); border-radius: 999px;
  padding: 9px 16px; font-size: 12.5px; font-weight: 600; letter-spacing: .02em;
  box-shadow: 0 10px 26px rgba(0, 8, 18, .35);
}
.meta-chip b { color: var(--red); font-size: 15px; font-weight: 900; letter-spacing: .02em; }
.meta-chip.gold b { color: #a8720c; }
.meta-chip.act {
  background: rgba(5, 16, 30, .42); color: rgba(255, 248, 232, .92);
  border: 1px solid rgba(255, 248, 232, .45); cursor: pointer;
  backdrop-filter: blur(6px); transition: .18s;
}
.meta-chip.act b { color: var(--gold); font-family: var(--mono); }
.meta-chip.act:hover { background: var(--gold); border-color: var(--gold); color: #2b1a00; }
.meta-chip.act:hover b { color: #7a2a00; }

.scrollcue {
  position: absolute; left: 50%; bottom: 26px; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  color: rgba(255, 248, 232, .55); font-size: 8.5px; letter-spacing: .34em;
  transition: opacity .35s ease, transform .35s ease;
}
.topbar.scrolled ~ main .scrollcue { opacity: 0; transform: translate(-50%, 12px); pointer-events: none; }
.scrollcue span { width: 1px; height: 44px; background: linear-gradient(180deg, transparent, rgba(255, 248, 232, .7)); animation: cue 2.4s ease-in-out infinite; }
@keyframes cue { 0%, 100% { opacity: .25; transform: scaleY(.7); } 50% { opacity: 1; transform: scaleY(1); } }

/* ------------------------------------------------------------------- panel */
.panel {
  width: min(calc(100% - 32px), var(--w));
  margin: 26px auto;
  padding: clamp(28px, 4.2vw, 58px);
  background: var(--paper);
  border-radius: var(--r);
  border: 1px solid rgba(255, 255, 255, .6);
  box-shadow: 0 44px 100px rgba(1, 8, 18, .42);
  scroll-margin-top: 84px;
}
.sec-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 28px; margin-bottom: 30px;
}
.eyebrow {
  margin: 0 0 9px; color: var(--red); font-size: 10.5px; font-weight: 900;
  letter-spacing: .22em;
}
.sec-head h2 {
  margin: 0; font-size: clamp(25px, 3.1vw, 40px); font-weight: 900;
  letter-spacing: .01em; line-height: 1.15;
}
.sec-note { margin: 0; color: #8b7c66; font-size: 11.5px; line-height: 1.85; text-align: right; letter-spacing: .03em; }

/* ----------------------------------------------------------------- popular */
.popular { display: grid; grid-template-columns: 1.02fr .98fr; gap: 24px; align-items: stretch; }
.champ {
  position: relative; overflow: hidden; isolation: isolate;
  display: flex; flex-direction: column; justify-content: space-between; gap: 22px;
  min-height: 320px; padding: clamp(24px, 3vw, 38px); border-radius: 20px;
  color: var(--cream);
  background: linear-gradient(140deg, #ef4b38 0%, #c82a1d 58%, #9d1a10 100%);
  box-shadow: 0 18px 40px rgba(160, 30, 18, .28);
}
.champ::before {
  content: ""; position: absolute; inset: 0; z-index: -1; opacity: .5;
  background: repeating-linear-gradient(135deg, rgba(255, 255, 255, .055) 0 2px, transparent 2px 16px);
}
.champ::after {
  content: "01"; position: absolute; right: -6px; bottom: -56px; z-index: -1;
  font-family: var(--mono); font-size: 210px; font-weight: 900; line-height: 1;
  color: rgba(255, 255, 255, .075); letter-spacing: -.06em;
}
.champ-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.crown {
  display: inline-flex; align-items: center; gap: 7px;
  background: rgba(255, 240, 200, .16); border: 1px solid rgba(255, 240, 200, .42);
  color: #ffe9b0; border-radius: 999px; padding: 6px 12px;
  font-size: 10.5px; font-weight: 800; letter-spacing: .16em;
}
.crown svg { width: 14px; height: 14px; fill: #ffd873; }
.champ-count { font-size: 12px; letter-spacing: .1em; color: rgba(255, 248, 232, .8); }
.champ-count b { font-size: 24px; color: #fff; margin-right: 3px; }
.champ-main { display: flex; align-items: center; gap: 18px; }
.champ-main img { width: 88px; height: 88px; filter: drop-shadow(0 10px 18px rgba(60, 0, 0, .45)); }
.champ-name { margin: 0; font-size: clamp(38px, 4.6vw, 58px); font-weight: 900; line-height: 1.05; letter-spacing: .04em; }
.champ-classes { margin: 8px 0 0; font-size: 11.5px; letter-spacing: .12em; color: rgba(255, 240, 206, .78); }
.champ-btn {
  align-self: flex-start; display: inline-flex; align-items: center; gap: 8px;
  border: 0; background: var(--cream); color: var(--red-deep);
  border-radius: 999px; padding: 11px 20px; font-size: 12px; font-weight: 800;
  letter-spacing: .06em; cursor: pointer; transition: .18s;
}
.champ-btn:hover { background: #fff; transform: translateX(3px); }
.champ-btn svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; }

.ranklist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; justify-content: center; gap: 9px; }
.rankrow {
  display: grid; grid-template-columns: 30px 36px minmax(0, 1fr) auto;
  align-items: center; gap: 12px;
  padding: 11px 15px; background: #fff; border: 1px solid var(--line);
  border-radius: 14px; cursor: pointer; transition: .18s;
}
.rankrow:hover { border-color: rgba(232, 64, 47, .55); transform: translateX(4px); box-shadow: 0 10px 22px rgba(120, 55, 20, .09); }
.rankno { font-family: var(--mono); font-size: 15px; font-weight: 800; color: #c4b393; }
.rankrow:nth-child(1) .rankno { color: var(--red); }
.rankrow img { width: 36px; height: 36px; filter: drop-shadow(0 2px 3px rgba(90, 60, 0, .3)); }
.rankmain { min-width: 0; }
.rankname { display: block; font-size: 15.5px; font-weight: 800; letter-spacing: .02em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rankcls { display: block; margin-top: 2px; font-size: 10px; color: #9a8c76; letter-spacing: .06em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rankcnt { font-size: 11px; font-weight: 800; color: var(--red); background: #fdeae7; border-radius: 999px; padding: 4px 9px; }

/* ----------------------------------------------------------------- classes */
.classgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: 11px; }
.classtile {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 14px 6px 12px; border-radius: 16px; cursor: pointer;
  background: linear-gradient(180deg, #fffefa 0%, #f8f0de 100%);
  border: 1px solid #e9ddc4; transition: transform .18s, border-color .18s, box-shadow .18s, background .18s;
}
.classtile img { width: 46px; height: 46px; filter: drop-shadow(0 3px 4px rgba(90, 55, 0, .2)); }
.classtile .cname { font-size: 12.5px; font-weight: 800; letter-spacing: .01em; line-height: 1.2; }
.classtile .ccn { font-size: 9.5px; color: #9a8c76; letter-spacing: .06em; }
.classtile .ccount {
  position: absolute; top: 8px; right: 9px;
  font-family: var(--mono); font-size: 9.5px; color: #ab9a7d;
}
.classtile:hover { transform: translateY(-3px); border-color: rgba(232, 64, 47, .6); box-shadow: 0 12px 22px rgba(150, 50, 20, .12); }
.classtile.on {
  background: linear-gradient(150deg, #ef4b38, #c0291c);
  border-color: #9d1a10; color: var(--cream);
  box-shadow: 0 14px 26px rgba(170, 35, 20, .3);
}
.classtile.on .ccn, .classtile.on .ccount { color: rgba(255, 248, 232, .72); }
.classtile.on img { filter: drop-shadow(0 4px 8px rgba(60, 0, 0, .45)) brightness(1.12); }

/* ----------------------------------------------------------------- archive */
.archive-head { align-items: center; }
.count {
  margin: 0; font-size: 12px; font-weight: 700; color: #7b6a52;
  background: #f4ead6; border: 1px solid #eadcbe; border-radius: 999px; padding: 8px 14px;
  white-space: nowrap;
}
.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; min-height: 30px; }
.fchip {
  display: inline-flex; align-items: center; gap: 7px;
  background: #f7edda; border: 1px dashed #d9c9ab; color: #6f5f47;
  border-radius: 999px; padding: 6px 8px 6px 12px; font-size: 11.5px; font-weight: 600;
}
.fchip button {
  display: grid; place-items: center; width: 17px; height: 17px; padding: 0;
  border: 0; border-radius: 50%; background: #e7d8bb; color: #6f5f47;
  font-size: 11px; line-height: 1; cursor: pointer;
}
.fchip button:hover { background: var(--red); color: #fff; }
.filters .none { font-size: 11.5px; color: #ad9f89; }
.tools { display: flex; align-items: center; gap: 9px; margin-left: auto; }
.sort { display: inline-flex; align-items: center; gap: 7px; font-size: 11.5px; color: #8b7c66; }
.sort select {
  border: 1px solid #e3d6ba; background: #fffdf6; color: var(--ink);
  border-radius: 10px; padding: 7px 8px; font-size: 11.5px; cursor: pointer;
}
.ghost {
  border: 1px solid #e3d6ba; background: transparent; color: #6f5f47;
  border-radius: 10px; padding: 8px 13px; font-size: 11.5px; font-weight: 600;
  cursor: pointer; transition: .18s;
}
.ghost:hover { border-color: var(--red); color: var(--red); }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(244px, 1fr)); gap: 11px; }
.card {
  position: relative; overflow: hidden;
  display: flex; align-items: center; gap: 12px; width: 100%;
  padding: 13px 14px; text-align: left; cursor: pointer;
  background: #fff; border: 1px solid var(--line); border-radius: 15px;
  transition: transform .16s, border-color .16s, box-shadow .16s;
}
.card::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
  background: var(--red); transform: scaleY(0); transform-origin: bottom; transition: transform .18s;
}
.card:hover { transform: translateY(-2px); border-color: rgba(232, 64, 47, .5); box-shadow: 0 12px 24px rgba(120, 55, 20, .10); }
.card:hover::before { transform: scaleY(1); transform-origin: top; }
.card-ico { flex: none; width: 46px; height: 46px; }
.card-ico img { width: 100%; height: 100%; filter: drop-shadow(0 2px 3px rgba(90, 55, 0, .18)); }
.card-main { min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.card-id { font-family: var(--mono); font-size: 9.5px; letter-spacing: .1em; color: #b29c74; font-weight: 700; }
.card-name { font-size: 16.5px; font-weight: 800; line-height: 1.32; word-break: break-word; letter-spacing: .01em; }
.card-sub { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 6px; margin-top: 3px; font-size: 10px; color: #8b7c66; min-width: 0; }
.card-cls { white-space: normal; max-width: 100%; }
.pill-src { flex: none; background: #eaf6fb; color: #3d7d96; border-radius: 999px; padding: 2px 7px; font-size: 9.5px; white-space: nowrap; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.card-hot { flex: none; margin-left: auto; display: flex; flex-direction: column; align-items: center; gap: 1px; color: var(--red); }
.card-hot b { font-family: var(--mono); font-size: 12px; }
.card-hot span { font-size: 8px; letter-spacing: .1em; color: #b09a7d; }

.empty { text-align: center; padding: 64px 18px 54px; }
.empty-mark {
  display: grid; place-items: center; width: 54px; height: 54px; margin: 0 auto 16px;
  border: 2px dashed #d8c8a9; border-radius: 50%; color: #b7a586;
  font-family: var(--mono); font-size: 22px;
}
.empty p { margin: 0 0 6px; font-size: 14px; font-weight: 700; }
.empty-tip { color: #94856f; font-weight: 500; font-size: 12px; margin-bottom: 18px !important; }

.loadwrap { display: flex; flex-direction: column; align-items: center; gap: 9px; margin-top: 26px; }
.loadmore {
  border: 0; background: var(--red); color: #fff; cursor: pointer;
  border-radius: 999px; padding: 12px 32px; font-size: 12.5px; font-weight: 800;
  letter-spacing: .06em; transition: .18s; box-shadow: 0 10px 24px rgba(200, 45, 25, .25);
}
.loadmore:hover { background: var(--red-deep); transform: translateY(-1px); }
.loadnote { margin: 0; font-size: 10.5px; color: #ad9f89; letter-spacing: .04em; }

/* ------------------------------------------------------------------- about */
.about-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.about-grid article { background: #fbf5e7; border: 1px solid #eee1c8; border-radius: 16px; padding: 20px 20px 18px; }
.about-grid h3 { margin: 0 0 9px; font-size: 14px; font-weight: 900; letter-spacing: .02em; }
.about-grid p { margin: 0; font-size: 11.8px; line-height: 1.95; color: #6f6352; }
.about-grid b { color: var(--red); }

/* -------------------------------------------------------------------- foot */
.foot { display: flex; flex-direction: column; align-items: center; gap: 5px; padding: 34px 16px 44px; text-align: center; }
.foot img { width: 30px; height: 30px; opacity: .9; margin-bottom: 4px; }
.foot p { margin: 0; color: rgba(255, 248, 232, .72); font-size: 11.5px; letter-spacing: .08em; }
.foot-sub { color: rgba(255, 248, 232, .4) !important; font-size: 9.5px !important; letter-spacing: .12em !important; }

/* ----------------------------------------------------------------- profiles */
.ptoolbar { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; flex-wrap: wrap; }
.psearch {
  position: relative; flex: 1 1 300px; display: flex; align-items: center; gap: 10px;
  height: 46px; padding: 0 14px; background: #fff;
  border: 1px solid #e7dcc4; border-radius: 12px; transition: border-color .18s, box-shadow .18s;
}
.psearch:focus-within { border-color: rgba(232, 64, 47, .55); box-shadow: 0 0 0 3px rgba(232, 64, 47, .08); }
.psearch svg { width: 18px; height: 18px; flex: none; fill: none; stroke: #a08d6f; stroke-width: 2.2; stroke-linecap: round; }
#profileSearch { flex: 1; min-width: 0; height: 44px; border: 0; outline: 0; background: transparent; font-size: 13.5px; color: var(--ink); }
#profileSearch::placeholder { color: #a99a82; }
#profileSearch::-webkit-search-cancel-button { -webkit-appearance: none; }
.presults {
  position: absolute; top: calc(100% + 6px); left: 0; right: 0; z-index: 25;
  max-height: 340px; overflow: auto; padding: 6px;
  background: var(--paper); border: 1px solid #e7dcc4; border-radius: 14px;
  box-shadow: 0 22px 55px rgba(40, 25, 10, .2);
}
.presult { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; border: 0; border-radius: 9px; background: transparent; text-align: left; cursor: pointer; }
.presult:hover { background: #fbf2df; }
.presult img { width: 30px; height: 30px; flex: none; }
.pres-name { display: block; font-size: 13px; font-weight: 800; }
.pres-meta { display: block; margin-top: 1px; font-size: 10px; color: #9a8c76; }
.pres-badge { margin-left: auto; flex: none; font-size: 9px; color: #b08a3a; letter-spacing: .04em; }
.pnav { display: flex; align-items: center; gap: 8px; }
.iconbtn { width: 38px; height: 38px; border: 1px solid #e3d6ba; border-radius: 10px; background: #fff; color: #6f5f47; font-size: 16px; cursor: pointer; transition: .18s; }
.iconbtn:hover { border-color: var(--red); color: var(--red); }
.pidx { min-width: 64px; text-align: center; font-family: var(--mono); font-size: 11px; color: #8b7c66; }
.profile { background: #fff; border: 1px solid #eee3cd; border-radius: 18px; overflow: hidden; }
.p-top {
  display: flex; align-items: center; gap: 18px; flex-wrap: wrap;
  padding: 24px 26px; border-bottom: 1px solid #efe2c9;
  background: linear-gradient(180deg, #fffdf7, #fbf3e3);
}
.p-crest { width: 82px; height: 82px; flex: none; filter: drop-shadow(0 6px 10px rgba(90, 55, 0, .22)); }
.p-ident { flex: 1; min-width: 180px; }
.p-id { margin: 0; font-family: var(--mono); font-size: 10px; font-weight: 700; letter-spacing: .12em; color: #b09a6f; }
.p-name { margin: 2px 0 6px; font-size: clamp(28px, 4vw, 42px); font-weight: 900; line-height: 1.1; word-break: break-word; text-wrap: balance; }
.p-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.ptag { padding: 3px 8px; border-radius: 999px; background: #f1e5cc; color: #7b6a52; font-size: 10.5px; white-space: nowrap; }
.ptag.gold { background: #f9e2a8; color: #7a5100; font-weight: 700; }
.p-archive {
  margin-left: auto; flex: none; border: 1px solid #e7dcc4; background: #fff;
  color: #6f5f47; border-radius: 999px; padding: 9px 14px; font-size: 11px; cursor: pointer; transition: .18s;
}
.p-archive:hover { border-color: var(--red); color: var(--red); }
.p-grid { display: grid; grid-template-columns: minmax(280px, 360px) 1fr; gap: 30px; padding: 24px 26px 26px; }
.p-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.p-stat { display: flex; flex-direction: column; gap: 2px; padding: 8px 10px; background: #fbf5e7; border: 1px solid #efe2c9; border-radius: 10px; }
.p-stat span { font-size: 9.5px; letter-spacing: .1em; color: #9a8c76; }
.p-stat b { font-family: var(--mono); font-size: 20px; line-height: 1.1; color: var(--ink); }
.p-stat b.ex { color: var(--red); }
.p-radar { display: flex; justify-content: center; margin-top: 14px; }
.p-radar svg { width: 100%; max-width: 300px; height: auto; }
.p-skills { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.psk h4 { display: flex; align-items: baseline; gap: 8px; margin: 0 0 7px; font-size: 13px; font-weight: 900; }
.psk h4 small { font-size: 8.5px; letter-spacing: .18em; color: #b09a7d; }
.psk ul { list-style: none; margin: 0; padding: 0; }
.psk li { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px dashed #eee3cc; font-size: 12.5px; }
.psk li:last-child { border-bottom: 0; }
.sk-name { color: #3c4e60; line-height: 1.7; word-break: break-word; }
.lv { flex: none; padding: 2px 7px; border-radius: 6px; background: #f6ead2; color: #8a4a12; font-family: var(--mono); font-size: 11px; font-weight: 800; white-space: nowrap; }
.lv[data-tier="ex"] { background: #f8d98f; color: #5a3300; }
.lv[data-tier="a"] { background: #fbe0db; color: #b92418; }
.psk-empty { margin: 0; padding: 2px 0; font-size: 11.5px; color: #a99a82; }
.raw-block { padding: 10px 12px; background: #fbf7ec; border: 1px dashed #e4d6bb; border-radius: 10px; }
.raw-names { list-style: none; margin: 0 0 6px; padding: 0; font-size: 12px; line-height: 1.8; color: #3c4e60; }
.raw-levels { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.raw-label { font-size: 9.5px; letter-spacing: .08em; color: #a99a82; }
.raw-note { margin: 6px 0 0; font-size: 10px; color: #a99a82; }
.psource { margin: 14px 2px 0; font-size: 10.5px; color: #a99a82; letter-spacing: .02em; }
.p-empty { padding: 52px 24px; text-align: center; color: #8b7c66; font-size: 13px; line-height: 2; }
.detail-profile {
  display: block; width: 100%; margin-top: 6px; padding: 11px;
  border: 0; border-radius: 10px; background: var(--red); color: #fff;
  font-size: 12px; font-weight: 800; letter-spacing: .04em; cursor: pointer; transition: .18s;
}
.detail-profile:hover { background: var(--red-deep); }

/* ----------------------------------------------------------------- dialogs */
.dlg {
  width: min(560px, calc(100vw - 26px)); max-height: 88vh; overflow: auto;
  padding: 0; border: 0; border-radius: 24px; background: var(--paper); color: var(--ink);
  box-shadow: 0 50px 120px rgba(0, 0, 0, .55);
}
.dlg::backdrop { background: rgba(3, 11, 21, .64); backdrop-filter: blur(7px); }
.dlg-close {
  position: absolute; top: 12px; right: 14px; z-index: 3;
  width: 36px; height: 36px; border: 0; border-radius: 50%;
  background: #f2e7d2; color: #6f5f47; font-size: 22px; line-height: 1; cursor: pointer;
  transition: .18s;
}
.dlg-close:hover { background: var(--red); color: #fff; }

.detail-head { display: flex; align-items: center; gap: 18px; padding: 28px 30px 20px; border-bottom: 1px solid #f0e4cc; }
.detail-head img { width: 76px; height: 76px; filter: drop-shadow(0 6px 10px rgba(90, 55, 0, .22)); }
.detail-kicker { margin: 0 0 4px; font-size: 10px; font-weight: 900; letter-spacing: .2em; color: var(--red); }
.detail-name { margin: 0; font-size: clamp(26px, 5vw, 36px); font-weight: 900; line-height: 1.15; word-break: break-word; text-wrap: balance; }
.detail-body { padding: 20px 30px 30px; }
.id-row {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  background: #fbf3e2; border: 1px dashed #ddcbab; border-radius: 12px;
  padding: 11px 14px; margin-bottom: 16px;
}
.id-row .idlabel { font-size: 9.5px; letter-spacing: .18em; color: #9a8a70; font-weight: 800; }
.id-row .idval { font-family: var(--mono); font-size: 18px; font-weight: 800; letter-spacing: .08em; color: #8a4a12; }
.copybtn {
  margin-left: auto; border: 1px solid #e0cfae; background: #fffdf6; color: #6f5f47;
  border-radius: 8px; padding: 6px 10px; font-size: 10.5px; cursor: pointer;
}
.copybtn:hover { border-color: var(--red); color: var(--red); }
.detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 0 0 18px; }
.detail-grid div { background: #fbf6ea; border-radius: 11px; padding: 10px 13px; }
.detail-grid dt { margin: 0 0 3px; font-size: 9.5px; letter-spacing: .14em; color: #a2947c; font-weight: 700; }
.detail-grid dd { margin: 0; font-size: 14px; font-weight: 800; word-break: break-word; }
.detail-grid dd small { font-size: 10px; color: #9a8c76; font-weight: 500; }
.same-title { margin: 0 0 8px; font-size: 10px; letter-spacing: .16em; color: #a2947c; font-weight: 800; }
.same-list { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 16px; }
.same-item {
  display: inline-flex; align-items: center; gap: 6px;
  border: 1px solid #e8dcc2; background: #fff; border-radius: 999px;
  padding: 5px 10px 5px 6px; font-size: 10.5px; cursor: pointer; color: var(--ink-2);
}
.same-item img { width: 20px; height: 20px; }
.same-item:hover { border-color: var(--red); color: var(--red); }
.detail-note { margin: 0; font-size: 10.5px; line-height: 1.8; color: #9a8c76; }
.detail-note.warn { color: #b5651d; }

.randomdlg { width: min(430px, calc(100vw - 26px)); padding: 30px; text-align: center; }
.randomdlg h3 { margin: 0 0 16px; font-size: 22px; font-weight: 900; letter-spacing: .03em; }
.randcard { background: #fbf4e4; border: 1px solid #ecdfc6; border-radius: 18px; padding: 24px 18px 20px; margin-bottom: 18px; }
.randicon img { width: 96px; height: 96px; margin: 0 auto 12px; filter: drop-shadow(0 8px 14px rgba(90, 55, 0, .25)); }
.randicon.spin img { animation: rspin .55s cubic-bezier(.3, .7, .3, 1) infinite; }
@keyframes rspin { 0% { transform: rotate(0) scale(1); } 50% { transform: rotate(18deg) scale(1.08); } 100% { transform: rotate(0) scale(1); } }
.randname { margin: 0; font-size: 30px; font-weight: 900; letter-spacing: .04em; line-height: 1.2; min-height: 36px; }
.randmeta { margin: 7px 0 0; font-size: 11px; color: #8b7c66; letter-spacing: .06em; }
.randactions { display: flex; justify-content: center; gap: 9px; }
.solid {
  border: 0; background: var(--red); color: #fff; border-radius: 999px;
  padding: 10px 22px; font-size: 12px; font-weight: 800; cursor: pointer;
}
.solid:hover { background: var(--red-deep); }

/* ------------------------------------------------------------------ motion */
.fade-up { animation: fadeUp .7s cubic-bezier(.2, .7, .2, 1) both; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }

/* --------------------------------------------------------------- responsive */
@media (max-width: 1024px) {
  .popular { grid-template-columns: 1fr; }
  .champ { min-height: 280px; }
  .sec-note { text-align: left; }
}
@media (max-width: 860px) {
  .nav { display: none; }
  .topbar { gap: 14px; }
  .group-chip { margin-left: auto; }
  .hero { padding-top: 132px; }
  .searchbtn { width: 104px; font-size: 15px; }
  #q { font-size: 17px; height: 66px; }
  .about-grid { grid-template-columns: 1fr 1fr; }
  .p-grid { grid-template-columns: 1fr; gap: 22px; }
  .p-radar svg { max-width: 260px; }
}
@media (max-width: 620px) {
  .brand-text em { display: none; }
  .brand img { width: 36px; height: 36px; }
  .game-chip { display: none; }
  .group-chip { font-size: 10px; padding: 5px 9px; }
  .hero { padding: 118px 16px 88px; }
  .kicker { font-size: 9px; letter-spacing: .24em; gap: 9px; }
  .kicker span { width: 22px; }
  .hero h1 { font-size: clamp(46px, 13vw, 70px); }
  .lede { margin-top: 20px; font-size: 12.5px; }
  .search { margin-top: 24px; }
  .searchbox { border-width: 3px; border-radius: 9px; }
  .ico-search { width: 21px; height: 21px; margin-left: 14px; }
  #q { height: 60px; font-size: 16px; padding: 0 4px; }
  .key { display: none; }
  .searchbtn { width: 60px; }
  .searchbtn span { display: none; }
  .searchbtn svg { width: 24px; height: 24px; }
  .suggests { gap: 6px; font-size: 10.5px; }
  .suggests button { font-size: 10.5px; padding: 4px 9px; }
  .hero-meta { margin-top: 24px; gap: 7px; }
  .meta-chip { font-size: 11px; padding: 7px 12px; }
  .meta-chip b { font-size: 13px; }
  .scrollcue { display: none; }
  .panel { border-radius: 20px; padding: 24px 18px; margin: 16px auto; width: calc(100% - 20px); }
  .sec-head { flex-direction: column; align-items: flex-start; gap: 10px; margin-bottom: 22px; }
  .sec-note br { display: none; }
  .popular { gap: 16px; }
  .champ { min-height: 250px; padding: 22px; }
  .champ-main { gap: 13px; }
  .champ-main img { width: 64px; height: 64px; }
  .ranklist { gap: 7px; }
  .rankrow { padding: 10px 12px; gap: 9px; }
  .rankname { font-size: 14px; }
  .classgrid { grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; }
  .classtile { padding: 11px 4px 10px; border-radius: 13px; }
  .classtile img { width: 40px; height: 40px; }
  .classtile .cname { font-size: 11.5px; }
  .archive-head { flex-direction: row; align-items: center; }
  .toolbar { gap: 10px; }
  .tools { width: 100%; justify-content: flex-end; }
  .grid { grid-template-columns: 1fr; gap: 8px; }
  .card { padding: 11px 13px; }
  .card-name { font-size: 15.5px; }
  .ptoolbar { gap: 9px; }
  .psearch { flex-basis: 100%; }
  .pnav { width: 100%; justify-content: space-between; }
  .pidx { flex: 1; }
  .p-top { padding: 20px 18px; gap: 14px; }
  .p-crest { width: 64px; height: 64px; }
  .p-name { font-size: 30px; }
  .p-archive { margin-left: 0; width: 100%; }
  .p-grid { grid-template-columns: 1fr; padding: 18px; gap: 20px; }
  .p-stats { grid-template-columns: repeat(2, 1fr); }
  .p-stat b { font-size: 18px; }
  .psk li { font-size: 12px; }
  .about-grid { grid-template-columns: 1fr; }
  .about-grid article { padding: 16px 16px 15px; }
  .detail-head { padding: 24px 20px 16px; }
  .detail-head img { width: 60px; height: 60px; }
  .detail-body { padding: 16px 20px 24px; }
  .detail-grid { grid-template-columns: 1fr 1fr; }
  .randomdlg { padding: 24px 18px; }
}
@media (max-width: 400px) {
  .group-chip { display: none; }
  .hero h1 { font-size: 44px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}
