/* ============================================================
   YoseDex · 约瑟传说图鉴
   深灰观测台 × 纸质档案卡
   ============================================================ */

:root {
  /* 页面：深海蓝墨 */
  --page: #121b2a;
  --page-deep: #0c1420;
  --page-soft: #1b2940;

  /* 纸张：冷白档案纸 */
  --paper: #e9f0fa;
  --paper-hi: #f7fbff;
  --paper-lo: #dae5f3;
  --paper-line: #c3d4e8;
  --paper-line-soft: #d7e2f0;

  /* 墨色（纸面） */
  --ink: #101a2a;
  --ink-2: #45566e;
  --ink-3: #7a8ba2;

  /* 强调：蓝（沿用 gold 命名，实际是主强调色） */
  --gold: #2563a8;
  --gold-hi: #4f9be0;
  --gold-deep: #17456f;
  --gold-wash: rgba(37, 99, 168, .10);

  /* 暗面文字 */
  --on-dark: #e6eefb;
  --on-dark-2: #9db0c9;
  --on-dark-3: #6b7d96;

  --radius: 16px;
  --radius-sm: 10px;
  --radius-xs: 6px;

  --shadow-card: 0 1px 0 rgba(255, 255, 255, .45) inset, 0 6px 16px -8px rgba(0, 0, 0, .55);
  --shadow-card-hover: 0 1px 0 rgba(255, 255, 255, .5) inset, 0 18px 30px -14px rgba(0, 0, 0, .7);
  --shadow-panel: 0 24px 60px -24px rgba(0, 0, 0, .7);

  --ease: cubic-bezier(.22, 1, .36, 1);

  --font-display: "Songti SC", "Source Han Serif SC", "Noto Serif CJK SC", "Iowan Old Style", Georgia, serif;
  --font-ui: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", system-ui, -apple-system, sans-serif;
  --font-mono: "SF Mono", ui-monospace, Menlo, Consolas, monospace;

  --shell: 1180px;
}

* { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scrollbar-width: thin;
  scrollbar-color: rgba(79, 155, 224, .30) transparent;
}

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: rgba(79, 155, 224, .26);
  border-radius: 999px;
  border: 2px solid var(--page);
}
::-webkit-scrollbar-thumb:hover { background: rgba(79, 155, 224, .48); }

body {
  margin: 0;
  background: var(--page);
  color: var(--on-dark);
  font-family: var(--font-ui);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

/* 背景：坐标纸 + 星尘 */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    radial-gradient(1200px 620px at 50% -10%, rgba(90, 150, 220, .10), transparent 60%),
    linear-gradient(rgba(230, 238, 251, .028) 1px, transparent 1px),
    linear-gradient(90deg, rgba(230, 238, 251, .028) 1px, transparent 1px);
  background-size: auto, 96px 96px, 96px 96px;
  mask-image: radial-gradient(1100px 700px at 50% 0%, #000 20%, transparent 85%);
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 3;
  opacity: .07;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)' opacity='.55'/%3E%3C/svg%3E");
}

::selection { background: rgba(79, 155, 224, .34); color: #fff; }

a { color: inherit; text-decoration: none; }

button {
  font: inherit;
  color: inherit;
  border: 0;
  background: none;
  cursor: pointer;
}

:focus-visible {
  outline: 2px solid var(--gold-hi);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ============ 布局 ============ */
.shell {
  position: relative;
  z-index: 2;
  width: min(100% - 40px, var(--shell));
  margin: 0 auto;
  padding-bottom: 56px;
}

/* ============ 顶栏 ============ */
.topbar {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 22px 0 18px;
  border-bottom: 1px solid rgba(230, 238, 251, .10);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: none;
}

.brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(79, 155, 224, .45);
  border-radius: 12px;
  background: linear-gradient(160deg, rgba(79, 155, 224, .22), rgba(79, 155, 224, .04));
  box-shadow: 0 0 0 1px rgba(0, 0, 0, .3), 0 8px 18px -12px rgba(79, 155, 224, .8);
}

.brand-mark svg { width: 24px; height: 24px; stroke: var(--gold-hi); fill: none; stroke-width: 1.2; }

.brand-text { display: flex; flex-direction: column; line-height: 1.15; }

.brand-cn {
  font-family: var(--font-display);
  font-size: 20px;
  letter-spacing: .16em;
  color: var(--on-dark);
}

.brand-cn em { font-style: normal; color: var(--gold-hi); }

.brand-en {
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: .22em;
  color: var(--on-dark-3);
  margin-top: 3px;
}

.topbar-spacer { flex: 1; }

/* 搜索 */
.search {
  position: relative;
  width: 260px;
  flex: none;
}

.search-field {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 38px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid rgba(230, 238, 251, .16);
  background: rgba(0, 0, 0, .22);
  transition: border-color .24s var(--ease), background .24s var(--ease);
}

.search-field:focus-within {
  border-color: rgba(79, 155, 224, .6);
  background: rgba(0, 0, 0, .34);
}

.search-field svg { width: 15px; height: 15px; stroke: var(--on-dark-3); fill: none; stroke-width: 1.6; flex: none; }

.search input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: none;
  color: var(--on-dark);
  font-size: 13.5px;
  outline: 0;
}

.search input::placeholder { color: var(--on-dark-3); }

.search-key {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--on-dark-3);
  border: 1px solid rgba(230, 238, 251, .16);
  border-radius: 4px;
  padding: 1px 5px;
  flex: none;
}

.suggest {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  z-index: 60;
  background: var(--paper-hi);
  border: 1px solid var(--paper-line);
  border-radius: 12px;
  box-shadow: var(--shadow-panel);
  padding: 6px;
  max-height: 320px;
  overflow: auto;
  display: none;
}

.suggest[data-open="true"] { display: block; }

.suggest-item {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  padding: 7px 9px;
  border-radius: 8px;
  color: var(--ink);
  text-align: left;
}

.suggest-item:hover,
.suggest-item[aria-selected="true"] { background: rgba(37, 99, 168, .12); }

.suggest-item .no { font-family: var(--font-mono); font-size: 10.5px; color: var(--ink-3); }
.suggest-item .nm { font-family: var(--font-display); font-size: 14.5px; }
.suggest-item .tp { margin-left: auto; font-size: 11px; color: var(--ink-2); }

.suggest-empty { padding: 14px 10px; color: var(--ink-3); font-size: 12.5px; }

/* ============ 工具条 ============ */
.toolbar {
  display: flex;
  align-items: flex-end;
  gap: 18px;
  padding: 16px 0 14px;
  border-bottom: 1px solid rgba(230, 238, 251, .08);
}

.tabs { display: flex; gap: 22px; }

.tab {
  position: relative;
  padding: 4px 0 10px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: .04em;
  color: var(--on-dark-3);
  transition: color .2s var(--ease);
}

.tab:hover { color: var(--on-dark-2); }

.tab[aria-current="page"] { color: var(--on-dark); }

.tab[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  background: var(--gold-hi);
  border-radius: 2px;
}

.tab .count {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--on-dark-3);
  margin-left: 6px;
}

.toolbar-end { margin-left: auto; display: flex; align-items: center; gap: 10px; }

.result-count {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--on-dark-3);
  letter-spacing: .06em;
}

.select {
  position: relative;
}

.select-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 32px;
  padding: 0 11px;
  border-radius: 8px;
  border: 1px solid rgba(230, 238, 251, .16);
  background: rgba(0, 0, 0, .18);
  font-size: 12.5px;
  color: var(--on-dark-2);
  transition: border-color .2s var(--ease), color .2s var(--ease);
}

.select-btn:hover { border-color: rgba(79, 155, 224, .5); color: var(--on-dark); }

.select-btn svg { width: 12px; height: 12px; stroke: currentColor; fill: none; stroke-width: 1.7; opacity: .7; }

.select-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 148px;
  z-index: 55;
  background: var(--paper-hi);
  border: 1px solid var(--paper-line);
  border-radius: 10px;
  box-shadow: var(--shadow-panel);
  padding: 5px;
  display: none;
}

.select-menu[data-open="true"] { display: block; }

.select-menu button {
  display: block;
  width: 100%;
  text-align: left;
  padding: 7px 10px;
  border-radius: 6px;
  font-size: 13px;
  color: var(--ink-2);
}

.select-menu button:hover { background: rgba(37, 99, 168, .12); color: var(--ink); }

.select-menu button[aria-checked="true"] { color: var(--gold-deep); font-weight: 600; }

/* ============ 系别筛选 ============ */
.filters {
  display: flex;
  gap: 7px;
  padding: 14px 0 4px;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  mask-image: linear-gradient(90deg, #000 0, #000 calc(100% - 28px), transparent 100%);
}

.filters::-webkit-scrollbar { display: none; }

/* 宽屏下换行展示全部系别，窄屏保留横向滑动 */
@media (min-width: 881px) {
  .filters {
    flex-wrap: wrap;
    overflow-x: visible;
    mask-image: none;
    padding-bottom: 8px;
  }
}

.chip {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 30px;
  padding: 0 11px;
  border-radius: 999px;
  border: 1px solid rgba(230, 238, 251, .14);
  background: rgba(0, 0, 0, .14);
  font-size: 12.5px;
  color: var(--on-dark-2);
  white-space: nowrap;
  transition: all .2s var(--ease);
}

.chip:hover { border-color: rgba(230, 238, 251, .3); color: var(--on-dark); }

.chip[aria-pressed="true"] {
  border-color: transparent;
  background: var(--paper);
  color: var(--ink);
  box-shadow: 0 4px 12px -6px rgba(0, 0, 0, .8);
}

.chip .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--dot, var(--on-dark-3));
  box-shadow: 0 0 0 2px rgba(0, 0, 0, .18);
}

.chip .n {
  font-family: var(--font-mono);
  font-size: 10px;
  opacity: .55;
}

/* ============ 网格 ============ */
.grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  padding-top: 16px;
}

/* ============ 精灵卡 ============ */
.card {
  position: relative;
  display: flex;
  flex-direction: column;
  text-align: left;
  padding: 12px 14px 11px;
  border-radius: var(--radius);
  border: 1px solid var(--paper-line);
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--tc) 10%, transparent) 0%, transparent 44%),
    radial-gradient(120% 90% at 50% -10%, rgba(255, 255, 255, .5), transparent 55%),
    var(--paper);
  box-shadow: var(--shadow-card);
  color: var(--ink);
  transition: transform .3s var(--ease), box-shadow .3s var(--ease), border-color .3s var(--ease);
  overflow: hidden;
  animation: card-in .5s var(--ease) both;
}

@keyframes card-in {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}

/* 顶部属性色线 */
.card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--tc), color-mix(in srgb, var(--tc) 20%, transparent));
  opacity: .85;
}

/* 印刷内框 */
.card-inner-frame {
  position: absolute;
  inset: 5px;
  border-radius: 11px;
  border: 1px solid rgba(36, 31, 25, .055);
  pointer-events: none;
  z-index: 0;
}

/* 纹章背后的柔光 */
.card::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 38px;
  width: 190px;
  height: 140px;
  transform: translateX(-50%);
  pointer-events: none;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--tc) 30%, transparent), transparent 72%);
  opacity: .9;
}

.card:focus-within {
  transform: translateY(-4px);
  border-color: rgba(37, 99, 168, .55);
}

.card-hit:focus-visible {
  outline: 2px solid var(--gold-hi);
  outline-offset: -3px;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-card-hover);
  border-color: rgba(37, 99, 168, .55);
}

.card-top {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.card-no {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: .08em;
  color: var(--ink-3);
}

.card-q {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  letter-spacing: .08em;
  color: var(--q, var(--ink-3));
  border: 1px solid currentColor;
  border-radius: 999px;
  padding: 0 6px;
  opacity: .9;
}

.card-art {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  height: 112px;
  margin: 2px 0 0;
}

.card-art svg { width: 96px; height: 96px; transition: transform .55s var(--ease); }
.card:hover .card-art svg { transform: rotate(6deg) scale(1.04); }

.card-name {
  position: relative;
  z-index: 1;
  font-family: var(--font-display);
  font-size: 21px;
  font-weight: 600;
  letter-spacing: .06em;
  line-height: 1.2;
  text-align: center;
}

.card-sub {
  position: relative;
  z-index: 1;
  display: block;
  max-width: 100%;
  margin-top: 3px;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--ink-3);
  letter-spacing: .1em;
  text-align: center;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.card-foot {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin-top: 11px;
  padding-top: 9px;
  border-top: 1px solid var(--paper-line-soft);
}

.types { display: flex; gap: 4px; flex-wrap: wrap; }

.type-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 20px;
  padding: 0 7px;
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: .04em;
  color: color-mix(in srgb, var(--tc) 88%, #101a2a);
  background: color-mix(in srgb, var(--tc) 15%, #f7fbff);
  border: 1px solid color-mix(in srgb, var(--tc) 26%, transparent);
}

.type-pill .dot { width: 5px; height: 5px; border-radius: 50%; background: var(--tc); }

.card-total {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-2);
}

.card-total b { font-size: 14px; color: var(--ink); }

/* 收藏按钮 */
.card-hit {
  position: absolute;
  inset: 0;
  z-index: 2;
  border-radius: inherit;
}

.bookmark {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 4;
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  opacity: 0;
  background: rgba(36, 31, 25, .06);
  transition: opacity .2s var(--ease), background .2s var(--ease);
}

.bookmark svg { width: 14px; height: 14px; stroke: var(--ink-2); fill: none; stroke-width: 1.5; }
.bookmark[aria-pressed="true"] { opacity: 1; background: rgba(37, 99, 168, .16); }
.bookmark[aria-pressed="true"] svg { stroke: var(--gold-deep); fill: var(--gold-hi); }
.card:hover .bookmark, .bookmark:focus-visible { opacity: 1; }
.card:hover .card-q, .card:focus-within .card-q { opacity: 0; }

/* 悬停光泽:一道斜光从左扫到右 */
.card-sheen {
  position: absolute;
  top: -45%;
  bottom: -45%;
  left: 0;
  width: 34%;
  z-index: 3;
  pointer-events: none;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .32), transparent);
  transform: translateX(-240%) skewX(-16deg);
  opacity: 0;
}

.card:hover .card-sheen { animation: card-sheen .85s var(--ease); }

@keyframes card-sheen {
  0% { transform: translateX(-240%) skewX(-16deg); opacity: 0; }
  18% { opacity: 1; }
  100% { transform: translateX(480%) skewX(-16deg); opacity: 0; }
}

/* ============ 空状态 ============ */
.empty {
  grid-column: 1 / -1;
  display: grid;
  place-items: center;
  gap: 10px;
  padding: 70px 20px;
  border: 1px dashed rgba(230, 238, 251, .2);
  border-radius: var(--radius);
  color: var(--on-dark-3);
  text-align: center;
}

/* 空状态:虚线罗盘装饰 */
.empty::before {
  content: "";
  width: 44px;
  height: 44px;
  border: 1px dashed rgba(230, 238, 251, .28);
  border-radius: 50%;
}

.empty b { font-family: var(--font-display); font-size: 19px; color: var(--on-dark-2); font-weight: 400; }
.empty span { font-size: 12.5px; }

/* ============ 详情页 ============ */
.detail-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 0 10px;
}

.back-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 32px;
  padding: 0 11px 0 9px;
  border-radius: 8px;
  border: 1px solid rgba(230, 238, 251, .16);
  font-size: 12.5px;
  color: var(--on-dark-2);
  transition: all .2s var(--ease);
}

.back-btn:hover { border-color: rgba(79, 155, 224, .5); color: var(--on-dark); }
.back-btn svg { width: 13px; height: 13px; stroke: currentColor; fill: none; stroke-width: 1.7; }

.pager { margin-left: auto; display: flex; gap: 6px; }

.pager button {
  height: 32px;
  padding: 0 11px;
  border-radius: 8px;
  border: 1px solid rgba(230, 238, 251, .16);
  font-size: 12.5px;
  color: var(--on-dark-2);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.pager button:hover { border-color: rgba(79, 155, 224, .5); color: var(--on-dark); }
.pager button:disabled { opacity: .35; cursor: default; border-color: rgba(230, 238, 251, .1); }
.pager svg { width: 12px; height: 12px; stroke: currentColor; fill: none; stroke-width: 1.8; }

/* Hero */
.hero {
  position: relative;
  display: grid;
  grid-template-columns: 264px minmax(0, 1fr);
  gap: 22px;
  padding: 22px;
  border-radius: 20px;
  border: 1px solid var(--paper-line);
  background:
    radial-gradient(90% 120% at 0% 0%, rgba(255, 255, 255, .8), transparent 55%),
    var(--paper);
  box-shadow: var(--shadow-card);
  color: var(--ink);
}

.hero-art {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 236px;
  border-radius: 14px;
  border: 1px solid var(--paper-line-soft);
  background:
    radial-gradient(70% 70% at 50% 45%, var(--tint, transparent), transparent 70%),
    repeating-linear-gradient(0deg, rgba(36, 31, 25, .03) 0 1px, transparent 1px 9px),
    rgba(255, 255, 255, .35);
  overflow: hidden;
}

.hero-art svg { width: 168px; height: 168px; }

.hero-art::before,
.hero-art::after {
  content: "";
  position: absolute;
  border: 1px solid rgba(36, 31, 25, .1);
  border-radius: 50%;
}

.hero-art::before { width: 210px; height: 210px; }
.hero-art::after { width: 150px; height: 150px; border-style: dashed; opacity: .7; }

.hero-art .corner {
  position: absolute;
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: .18em;
  color: var(--ink-3);
  opacity: .7;
}
.hero-art .corner.tl { top: 9px; left: 11px; }
.hero-art .corner.br { bottom: 9px; right: 11px; }

.hero-body { display: flex; flex-direction: column; }

.hero-eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: .18em;
  color: var(--ink-3);
}

.hero-eyebrow .sep { width: 22px; height: 1px; background: var(--paper-line); }

.hero-name {
  margin: 6px 0 2px;
  font-family: var(--font-display);
  font-size: clamp(34px, 4.4vw, 46px);
  line-height: 1.1;
  letter-spacing: .04em;
  font-weight: 500;
}

.hero-types { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; margin: 8px 0 0; }

.hero-types .type-pill { height: 24px; font-size: 11.5px; padding: 0 9px; }

.hero-quote {
  margin: 14px 0 0;
  padding-left: 12px;
  border-left: 2px solid rgba(37, 99, 168, .45);
  font-family: var(--font-display);
  font-size: 14.5px;
  line-height: 1.85;
  color: var(--ink-2);
}

.hero-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px 18px;
  margin-top: auto;
  padding-top: 18px;
}

.meta-item { min-width: 0; }

.meta-k {
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: .16em;
  color: var(--ink-3);
  text-transform: uppercase;
}

.meta-v { font-size: 13px; color: var(--ink); margin-top: 2px; line-height: 1.45; }

/* 区块 */
.section { margin-top: 26px; }

.section-head {
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(230, 238, 251, .1);
  margin-bottom: 14px;
}

.section-title {
  font-family: var(--font-display);
  font-size: 17px;
  letter-spacing: .12em;
  color: var(--on-dark);
}

.section-sub {
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: .18em;
  color: var(--on-dark-3);
}

.section-end { margin-left: auto; font-size: 11.5px; color: var(--on-dark-3); }

/* 面板 */
.panel {
  border-radius: var(--radius);
  border: 1px solid var(--paper-line);
  background: var(--paper);
  box-shadow: var(--shadow-card);
  color: var(--ink);
  padding: 16px 18px;
}

.panel-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  letter-spacing: .1em;
  color: var(--ink-3);
  margin-bottom: 8px;
}

.panel-title .bar { width: 3px; height: 11px; border-radius: 2px; background: var(--gold-hi); }

.panel-hint {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: .06em;
  color: var(--ink-3);
  opacity: .8;
}

.panel-name {
  font-family: var(--font-display);
  font-size: 18px;
  letter-spacing: .06em;
  margin-bottom: 4px;
}

.panel-text { font-size: 13px; line-height: 1.8; color: var(--ink-2); }

.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

/* 种族值 */
.stats-wrap {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 24px;
  padding: 20px;
  border-radius: var(--radius);
  border: 1px solid var(--paper-line);
  background: var(--paper);
  box-shadow: var(--shadow-card);
  color: var(--ink);
}

.radar { display: grid; place-items: center; }
.radar svg {
  width: 100%;
  max-width: 268px;
  height: auto;
  overflow: visible;
  animation: radar-in .55s var(--ease) both;
}

@keyframes radar-in {
  from { opacity: 0; transform: scale(.93); }
  to { opacity: 1; transform: none; }
}

.radar-grid { fill: none; stroke: rgba(36, 31, 25, .12); stroke-width: 1; }
.radar-axis { stroke: rgba(36, 31, 25, .10); stroke-width: 1; }
.radar-shape { fill: color-mix(in srgb, var(--tc) 20%, transparent); stroke: var(--tc); stroke-width: 1.6; }
.radar-node { fill: var(--paper-hi); stroke: var(--tc); stroke-width: 1.6; }
.radar-label { font-family: var(--font-mono); font-size: 9px; fill: var(--ink-3); letter-spacing: .08em; }
.radar-value { font-family: var(--font-mono); font-size: 10.5px; fill: var(--ink); font-weight: 700; }

.stat-list { display: flex; flex-direction: column; gap: 9px; justify-content: center; }

.stat-row {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) 54px;
  align-items: center;
  gap: 10px;
}

.stat-k { font-size: 12px; color: var(--ink-2); }

.stat-track {
  position: relative;
  height: 7px;
  border-radius: 999px;
  background: rgba(36, 31, 25, .08);
  overflow: hidden;
}

.stat-fill {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, color-mix(in srgb, var(--tc) 62%, #fff), var(--tc));
  width: 0;
  transition: width .9s var(--ease);
}

.stat-v {
  font-family: var(--font-mono);
  font-size: 13px;
  text-align: right;
  color: var(--ink);
}

.stat-total {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-top: 6px;
  padding-top: 11px;
  border-top: 1px dashed var(--paper-line);
}

.stat-total .k { font-size: 12px; letter-spacing: .1em; color: var(--ink-3); }
.stat-total .v { font-family: var(--font-mono); font-size: 26px; font-weight: 700; letter-spacing: .02em; }
.stat-total .v em { font-style: normal; font-size: 11px; color: var(--ink-3); margin-left: 4px; }

/* 技能表 */
.skill-table {
  width: 100%;
  border-collapse: collapse;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--paper);
  box-shadow: var(--shadow-card);
  color: var(--ink);
}

.skill-table thead th {
  text-align: left;
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: .16em;
  font-weight: 400;
  color: var(--ink-3);
  background: var(--paper-lo);
  padding: 9px 10px;
  border-bottom: 1px solid var(--paper-line);
  white-space: nowrap;
}

.skill-table td {
  padding: 9px 10px;
  border-bottom: 1px solid var(--paper-line-soft);
  font-size: 12.5px;
  vertical-align: top;
}

.skill-table tbody tr:last-child td { border-bottom: 0; }
.skill-table tbody tr:nth-child(even):not(.is-ultimate):not(:hover) td { background: rgba(16, 26, 42, .028); }
.skill-table tbody tr:hover td { background: rgba(37, 99, 168, .06); }

.skill-table .c-lv { font-family: var(--font-mono); font-size: 11.5px; color: var(--ink-3); width: 44px; }
.skill-table .c-name { font-family: var(--font-display); font-size: 14px; letter-spacing: .04em; white-space: nowrap; }
.skill-table .c-num { font-family: var(--font-mono); font-size: 12px; text-align: right; white-space: nowrap; }
.skill-table .c-eff { color: var(--ink-2); line-height: 1.65; min-width: 200px; }
.skill-table .c-cat { font-size: 11px; white-space: nowrap; }

.cat {
  display: inline-block;
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 10.5px;
  letter-spacing: .04em;
}
.cat[data-cat="物理"] { color: #8d3a2b; background: rgba(141, 58, 43, .10); }
.cat[data-cat="特殊"] { color: #5b4a8c; background: rgba(91, 74, 140, .10); }
.cat[data-cat="属性"] { color: #4a6b3c; background: rgba(74, 107, 60, .10); }
.cat[data-cat="必杀"] { color: #8a5a12; background: rgba(138, 90, 18, .14); font-weight: 700; }

tr.is-ultimate td { background: rgba(37, 99, 168, .07); }
tr.is-ultimate .c-name { color: var(--gold-deep); }

/* 进化链 */
.evo {
  display: flex;
  align-items: stretch;
  gap: 10px;
  padding: 18px;
  border-radius: var(--radius);
  border: 1px solid var(--paper-line);
  background: var(--paper);
  box-shadow: var(--shadow-card);
  color: var(--ink);
  overflow-x: auto;
}

.evo-node {
  flex: 1 1 0;
  min-width: 132px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 12px 10px;
  border-radius: 12px;
  border: 1px solid var(--paper-line-soft);
  background: rgba(255, 255, 255, .4);
  text-align: center;
}

.evo-node.is-now {
  border-color: rgba(37, 99, 168, .55);
  background: rgba(37, 99, 168, .08);
  box-shadow: 0 0 0 1px rgba(37, 99, 168, .18) inset;
}

.evo-node .no { font-family: var(--font-mono); font-size: 9.5px; color: var(--ink-3); letter-spacing: .1em; }
.evo-node .nm { font-family: var(--font-display); font-size: 15px; letter-spacing: .04em; }
.evo-node .rq { font-size: 10.5px; color: var(--ink-3); }

.evo-arrow {
  flex: none;
  display: grid;
  place-items: center;
  width: 22px;
  color: var(--ink-3);
}

.evo-arrow svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 1.4; }

/* 属性关系 */
.rel-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

.rel-list { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }

.rel-list .type-pill { height: 24px; font-size: 11.5px; padding: 0 9px; }

.rel-empty { font-size: 12px; color: var(--ink-3); margin-top: 8px; }

/* 培养 */
.train { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

.train-item { display: flex; gap: 12px; align-items: flex-start; }

.train-k {
  flex: none;
  width: 46px;
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: .14em;
  color: var(--ink-3);
  padding-top: 3px;
}

.train-v { font-size: 13px; color: var(--ink); line-height: 1.7; }

.moves { display: flex; flex-wrap: wrap; gap: 6px; }

.move-chip {
  padding: 3px 9px;
  border-radius: 6px;
  border: 1px solid var(--paper-line);
  background: rgba(255, 255, 255, .5);
  font-size: 12px;
  color: var(--ink-2);
}

.move-chip:first-child {
  border-color: rgba(37, 99, 168, .5);
  color: var(--gold-deep);
  background: rgba(37, 99, 168, .08);
}

/* ============ 属性页 ============ */
.type-layout { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 18px; margin-top: 16px; align-items: start; }

.type-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  padding: 10px;
  border-radius: var(--radius);
  border: 1px solid rgba(230, 238, 251, .1);
  background: rgba(0, 0, 0, .16);
  position: sticky;
  top: 14px;
}

.type-btn {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 7px 8px;
  border-radius: 7px;
  font-size: 12.5px;
  color: var(--on-dark-2);
  text-align: left;
  transition: background .18s var(--ease), color .18s var(--ease);
}

.type-btn .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--tc); flex: none; }
.type-btn:hover { background: rgba(230, 238, 251, .07); color: var(--on-dark); }
.type-btn[aria-pressed="true"] { background: var(--paper); color: var(--ink); }
.type-btn .n { margin-left: auto; font-family: var(--font-mono); font-size: 9.5px; opacity: .5; }

.type-panel { display: flex; flex-direction: column; gap: 14px; }

.type-hero {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 20px 22px;
  border-radius: var(--radius);
  border: 1px solid var(--paper-line);
  background:
    radial-gradient(80% 120% at 0% 0%, rgba(255, 255, 255, .8), transparent 60%),
    var(--paper);
  box-shadow: var(--shadow-card);
  color: var(--ink);
}

.type-glyph {
  width: 64px;
  height: 64px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 16px;
  border: 1px solid color-mix(in srgb, var(--tc) 30%, transparent);
  background: color-mix(in srgb, var(--tc) 10%, transparent);
}

.type-glyph svg { width: 34px; height: 34px; }

.type-hero h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 30px;
  letter-spacing: .12em;
  font-weight: 500;
}

.type-hero p { margin: 4px 0 0; font-size: 12.5px; color: var(--ink-2); }

.matrix { width: 100%; min-width: 780px; border-collapse: collapse; font-family: var(--font-mono); font-size: 11px; }

.matrix th {
  font-weight: 400;
  color: var(--ink-3);
  padding: 6px 3px;
  text-align: center;
  border-bottom: 1px solid var(--paper-line);
  white-space: nowrap;
}

.matrix th.rl { text-align: right; padding-right: 8px; white-space: nowrap; }

.matrix td {
  text-align: center;
  padding: 5px 2px;
  border-bottom: 1px solid var(--paper-line-soft);
  color: var(--ink-3);
}

.matrix td[data-r="2"], .matrix td[data-r="1.25"], .matrix td[data-r="1.5"] { color: #8d3a2b; background: rgba(141, 58, 43, .09); font-weight: 700; }
.matrix td[data-r="0.5"], .matrix td[data-r="0.75"] { color: #2c6e9c; background: rgba(44, 110, 156, .08); }
.matrix td[data-r="0"] { color: rgba(122, 139, 162, .55); background: rgba(122, 139, 162, .08); text-decoration: line-through; }
.matrix td[data-r="1"] { color: rgba(122, 139, 162, .5); }
.matrix tr.is-row td { outline: 1px solid rgba(37, 99, 168, .2); outline-offset: -1px; }

.matrix-wrap { overflow-x: auto; padding-bottom: 8px; }

.matrix-wrap::-webkit-scrollbar { height: 6px; }
.matrix-wrap::-webkit-scrollbar-track { background: rgba(122, 139, 162, .10); border-radius: 3px; }
.matrix-wrap::-webkit-scrollbar-thumb { background: rgba(122, 139, 162, .38); border-radius: 3px; }
.matrix-wrap::-webkit-scrollbar-thumb:hover { background: rgba(37, 99, 168, .55); }

/* ============ 特性 / 纹章卡 ============ */
.ability-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.ability-grid .panel { min-width: 0; }

/* ============ 进化链箭头标注 ============ */
.evo-arrow { position: relative; }

.evo-node.is-missing {
  border-style: dashed;
  background: transparent;
  opacity: .62;
}

.evo-arrow em {
  position: absolute;
  top: -15px;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-mono);
  font-size: 9.5px;
  font-style: normal;
  letter-spacing: .04em;
  color: var(--ink-3);
  white-space: nowrap;
}

/* ============ 加载更多 ============ */
.sentinel {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  margin: 26px 0 8px;
  padding: 11px 16px;
  border: 1px solid rgba(230, 238, 251, .14);
  border-radius: 999px;
  background: rgba(0, 0, 0, .16);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .12em;
  color: var(--on-dark-2);
  cursor: pointer;
  transition: border-color .2s var(--ease), background .2s var(--ease), color .2s var(--ease);
}

.sentinel:hover {
  border-color: rgba(79, 155, 224, .5);
  background: rgba(37, 99, 168, .16);
  color: var(--on-dark);
}

.sentinel span { position: relative; }

/* ============ 收藏 ============ */
.saved-head { padding: 26px 0 4px; }

.saved-title {
  font-family: var(--font-display);
  font-size: 28px;
  letter-spacing: .1em;
  color: var(--on-dark);
}

.saved-sub { font-size: 12.5px; color: var(--on-dark-3); margin-top: 4px; }

/* ============ 页脚 ============ */
.footer {
  margin-top: 44px;
  padding-top: 18px;
  border-top: 1px solid rgba(230, 238, 251, .1);
  display: flex;
  gap: 20px;
  align-items: flex-start;
  color: var(--on-dark-3);
  font-size: 11.5px;
  line-height: 1.75;
}

.footer-brand { font-family: var(--font-mono); font-size: 10px; letter-spacing: .18em; flex: none; }
.footer p { margin: 0; max-width: 720px; }
.footer b { color: var(--on-dark-2); font-weight: 500; }

/* ============ 初始加载 ============ */
.boot {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: grid;
  place-items: center;
  background: var(--page-deep);
  transition: opacity .5s var(--ease), visibility .5s;
}

.boot[data-done="true"] { opacity: 0; visibility: hidden; }

.boot-mark { text-align: center; }

.boot-mark svg { width: 44px; height: 44px; stroke: var(--gold-hi); fill: none; stroke-width: 1; animation: spin 3.4s linear infinite; }

@keyframes spin { to { transform: rotate(360deg); } }

.boot-mark p {
  margin: 10px 0 0;
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: .3em;
  color: var(--on-dark-3);
}

/* ============ 吸顶导航 ============ */
.nav-sticky {
  position: sticky;
  top: 0;
  z-index: 40;
  margin: 0 -20px;
  padding: 0 20px;
  background: color-mix(in srgb, var(--page) 84%, transparent);
  backdrop-filter: blur(16px) saturate(1.25);
  -webkit-backdrop-filter: blur(16px) saturate(1.25);
  transition: box-shadow .3s var(--ease);
}

.nav-sticky.is-stuck {
  box-shadow: 0 16px 36px -22px rgba(0, 0, 0, .7), 0 1px 0 rgba(230, 238, 251, .05);
}

/* ============ 视图切换渐入 ============ */
#view > * { animation: view-in .42s var(--ease) both; }
#view > *:nth-child(2) { animation-delay: .05s; }
#view > *:nth-child(3) { animation-delay: .1s; }
#view > *:nth-child(4) { animation-delay: .15s; }
#view > *:nth-child(5) { animation-delay: .2s; }

@keyframes view-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

/* ============ 回到顶部 ============ */
.to-top {
  position: fixed;
  right: 26px;
  bottom: 26px;
  z-index: 80;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid rgba(79, 155, 224, .38);
  background: color-mix(in srgb, var(--page-soft) 80%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: var(--on-dark-2);
  box-shadow: 0 12px 28px -14px rgba(0, 0, 0, .8);
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  transition: opacity .3s var(--ease), transform .3s var(--ease), border-color .2s var(--ease), color .2s var(--ease);
}

.to-top.show { opacity: 1; transform: none; pointer-events: auto; }
.to-top:hover { border-color: rgba(79, 155, 224, .7); color: var(--on-dark); }
.to-top svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 1.8; }

/* ============ 详情页档案角标 ============ */
.hero-corners i {
  position: absolute;
  width: 15px;
  height: 15px;
  border: 0 solid rgba(37, 99, 168, .55);
  pointer-events: none;
}

.hero-corners .tl { top: 9px; left: 9px; border-top-width: 1.5px; border-left-width: 1.5px; }
.hero-corners .tr { top: 9px; right: 9px; border-top-width: 1.5px; border-right-width: 1.5px; }
.hero-corners .bl { bottom: 9px; left: 9px; border-bottom-width: 1.5px; border-left-width: 1.5px; }
.hero-corners .br { bottom: 9px; right: 9px; border-bottom-width: 1.5px; border-right-width: 1.5px; }

/* ============ 更新日志 ============ */
.log-list { margin-top: 6px; }

.log-item { display: grid; grid-template-columns: 28px minmax(0, 1fr); }

.log-rail { display: flex; flex-direction: column; align-items: center; }

.log-node {
  flex: none;
  width: 11px;
  height: 11px;
  margin-top: 22px;
  border-radius: 50%;
  background: var(--page);
  border: 2px solid var(--on-dark-3);
}

.log-item.is-latest .log-node {
  border-color: var(--gold-hi);
  box-shadow: 0 0 0 4px rgba(79, 155, 224, .16);
}

.log-line {
  width: 1px;
  flex: 1;
  margin-top: 5px;
  background: linear-gradient(rgba(230, 238, 251, .22), rgba(230, 238, 251, .05));
}

.log-card {
  margin: 0 0 16px 14px;
  padding: 15px 18px 13px;
  border-radius: var(--radius);
  border: 1px solid var(--paper-line);
  background: var(--paper);
  box-shadow: var(--shadow-card);
  color: var(--ink);
  min-width: 0;
}

.log-item.is-latest .log-card { border-color: rgba(37, 99, 168, .45); }

.log-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }

.log-ver {
  font-family: var(--font-mono);
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: .04em;
  color: var(--gold-deep);
}

.log-name { font-family: var(--font-display); font-size: 17px; letter-spacing: .06em; }

.log-badge {
  font-size: 10px;
  letter-spacing: .1em;
  color: var(--gold-deep);
  border: 1px solid rgba(37, 99, 168, .45);
  background: rgba(37, 99, 168, .08);
  border-radius: 999px;
  padding: 1px 8px;
}

.log-date { margin-left: auto; font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .08em; color: var(--ink-3); }

.log-group { margin-top: 11px; padding-top: 9px; border-top: 1px dashed var(--paper-line-soft); }

.log-group-k {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  letter-spacing: .14em;
  color: var(--ink-3);
  margin-bottom: 5px;
}

.log-group-k::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }

.log-add .log-group-k { color: #2e7d4f; }
.log-opt .log-group-k { color: var(--gold-deep); }
.log-fix .log-group-k { color: #b05a2a; }

.log-group ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 4px; }

.log-group li { position: relative; padding-left: 14px; font-size: 12.5px; line-height: 1.7; color: var(--ink-2); }

.log-group li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: .7em;
  width: 4px;
  height: 4px;
  border-radius: 1px;
  background: var(--paper-line);
}

/* ============ 关于 ============ */
.about-intro { display: flex; gap: 18px; align-items: flex-start; margin-top: 18px; }

.about-mark {
  flex: none;
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  border: 1px solid rgba(37, 99, 168, .35);
  background: linear-gradient(160deg, rgba(37, 99, 168, .13), rgba(37, 99, 168, .02));
}

.about-mark svg { width: 30px; height: 30px; stroke: var(--gold-deep); fill: none; stroke-width: 1.2; }

.about-intro h3 {
  margin: 2px 0 8px;
  font-family: var(--font-display);
  font-size: 20px;
  letter-spacing: .08em;
  font-weight: 500;
}

.about-intro p { margin: 0; font-size: 13px; line-height: 1.85; color: var(--ink-2); }

.about-stats {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.stat-card {
  padding: 15px 10px 12px;
  border-radius: var(--radius);
  border: 1px solid var(--paper-line);
  background: var(--paper);
  box-shadow: var(--shadow-card);
  color: var(--ink);
  text-align: center;
}

.stat-card .num { font-family: var(--font-mono); font-size: 23px; font-weight: 700; color: var(--gold-deep); letter-spacing: .02em; }
.stat-card .lbl { margin-top: 3px; font-size: 11px; letter-spacing: .1em; color: var(--ink-3); }

.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 14px; align-items: start; }
.about-grid .panel { min-width: 0; }

.hot-list { display: grid; gap: 8px; margin-top: 4px; }
.hot-row { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; font-size: 12.5px; color: var(--ink-2); }

.kbd {
  display: inline-block;
  min-width: 20px;
  text-align: center;
  padding: 1px 6px;
  border-radius: 5px;
  border: 1px solid var(--paper-line);
  border-bottom-width: 2px;
  background: rgba(255, 255, 255, .55);
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink);
}

/* ============ 页脚导航 ============ */
.footer-body { min-width: 0; }
.footer-links { display: flex; flex-wrap: wrap; gap: 4px 16px; margin-top: 10px; }
.footer-links a { font-size: 11.5px; color: var(--on-dark-3); transition: color .2s var(--ease); }
.footer-links a:hover { color: var(--gold-hi); }

/* ============ 响应式 ============ */
@media (max-width: 1080px) {
  .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .hero { grid-template-columns: 220px minmax(0, 1fr); }
  .hero-art { min-height: 210px; }
  .hero-art svg { width: 140px; height: 140px; }
  .stats-wrap { grid-template-columns: 250px minmax(0, 1fr); }
  .type-layout { grid-template-columns: 246px minmax(0, 1fr); }
}

@media (max-width: 880px) {
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .topbar { flex-wrap: wrap; gap: 12px; }
  .search { order: 3; width: 100%; }
  .hero { grid-template-columns: 1fr; gap: 16px; }
  .hero-art { min-height: 190px; }
  .hero-meta { grid-template-columns: 1fr 1fr; }
  .stats-wrap { grid-template-columns: 1fr; gap: 16px; }
  .radar svg { max-width: 240px; }
  .two-col, .rel-grid, .train, .ability-grid { grid-template-columns: 1fr; }
  .type-layout { grid-template-columns: 1fr; }
  .type-list { position: static; grid-template-columns: repeat(4, 1fr); }
  .footer { flex-direction: column; gap: 8px; }
  .about-grid { grid-template-columns: 1fr; }
  .about-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .about-intro { flex-direction: column; gap: 12px; }
}

@media (max-width: 620px) {
  .shell { width: calc(100% - 28px); }
  .nav-sticky { position: static; margin: 0; padding: 0; backdrop-filter: none; -webkit-backdrop-filter: none; }
  .about-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .to-top { right: 16px; bottom: 16px; width: 38px; height: 38px; }
  .grid { gap: 10px; }
  .card-name { font-size: 18px; }
  .card-art { height: 88px; }
  .card-art svg { width: 72px; height: 72px; }
  .toolbar { flex-wrap: wrap; gap: 10px; }
  .toolbar-end { width: 100%; justify-content: space-between; }
  .tabs { gap: 16px; }
  .hero { padding: 16px; }
  .hero-name { font-size: 32px; }
  .skill-table thead th:nth-child(4),
  .skill-table td:nth-child(4),
  .skill-table thead th:nth-child(7),
  .skill-table td:nth-child(7) { display: none; }
  .skill-table .c-eff { min-width: 120px; font-size: 11.5px; }
  .type-list { grid-template-columns: repeat(3, 1fr); }
  .saved-title { font-size: 24px; }
}

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