/* ============================================================
   P5X.WORLD — database theme.
   Dark #111 canvas, #232323 rounded cards, Geist type, left
   sidebar nav. Minimal P5X red accents only.
   ============================================================ */

/* Self-hosted variable fonts: removes two third-party connections and the
   render-blocking Google Fonts stylesheet. */
@font-face {
  font-family: 'Geist';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('/fonts/geist-latin.woff2') format('woff2');
}

@font-face {
  font-family: 'Noto Sans';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('/fonts/noto-sans-latin.woff2') format('woff2');
}

:root {
  --bg: #111111;
  --page: #222222;
  --card: #232323;
  --card-2: #2a2a2a;
  --line: rgba(255, 255, 255, 0.07);
  --txt: #ffffff;
  --txt-2: rgba(255, 255, 255, 0.7);
  --txt-3: rgba(255, 255, 255, 0.45);
  --red: #e60012;
  --red-soft: #ff7777;
  --red-deep: rgba(115, 0, 0, 0.55);
  --gold: #ffb020;
  --radius: 12px;
  --radius-sm: 8px;
  --sidebar-w: 224px;
}

* {
  font-family: 'Geist', 'Noto Sans', 'Apple SD Gothic Neo', 'Open Sans', 'Segoe UI', Roboto, Arial, sans-serif;
  letter-spacing: -0.02rem;
  box-sizing: border-box;
}

html { color-scheme: dark; }

body {
  background-color: var(--page);
  color: var(--txt);
  line-height: 1.5;
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
}

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: rgba(255, 255, 255, 0.08); }
::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.25); border-radius: 4px; }
::selection { background: rgba(230, 0, 18, 0.55); color: #fff; }

a { color: var(--red-soft); text-decoration: none; }
a:hover { color: #ffa6a6; }
button { cursor: pointer; }

.l-container {
  display: flex;
  min-height: 100vh;
  background:
    linear-gradient(to bottom, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.15)),
    linear-gradient(45deg, transparent 48%, rgba(255, 255, 255, 0.012) 49%, rgba(255, 255, 255, 0.012) 51%, transparent 52%),
    linear-gradient(-45deg, transparent 48%, rgba(255, 255, 255, 0.012) 49%, rgba(255, 255, 255, 0.012) 51%, transparent 52%),
    var(--bg);
  background-size: 100% 100%, 30px 30px, 30px 30px, 100% 100%;
}

@media (min-width: 1101px) {
  .l-container {
    display: grid;
    grid-template-columns: var(--sidebar-w) minmax(0, 1fr);
  }
  .main-wrapper {
    grid-column: 2;
    margin-left: 0;
  }
}

/* ============================== sidebar ============================== */

.sidebar {
  position: fixed;
  top: 0; bottom: 0; left: 0;
  width: var(--sidebar-w);
  background: #151515;
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  padding: 18px 14px;
  z-index: 60;
  overflow-y: auto;
}

.side-logo {
  display: flex; align-items: center; gap: 10px;
  padding: 6px 8px 16px;
  color: var(--txt);
}
.side-logo:hover { color: var(--txt); }
.logo-mark {
  width: 32px; height: 32px; flex: none;
  border-radius: 8px;
  display: block;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(230, 0, 18, 0.3);
}
.logo-mark svg { display: block; width: 100%; height: 100%; }
.logo-name { font-size: 17px; font-weight: 700; letter-spacing: 0.2px; }
.logo-name em { font-style: normal; color: var(--txt-3); font-weight: 500; font-size: 13px; }

.side-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--txt-3);
  padding: 14px 10px 6px;
  font-weight: 600;
}

.side-group { margin: 0; }
.side-group > summary {
  list-style: none;
  cursor: pointer;
  user-select: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.side-group > summary::-webkit-details-marker { display: none; }
.side-group > summary::marker { content: ''; }
.side-label .chev { font-size: 13px; opacity: 0.55; transition: transform 0.18s; }
.side-group:not([open]) .chev { transform: rotate(-90deg); }
.side-label.static { cursor: default; }

.side-link {
  display: flex; align-items: center; gap: 10px;
  color: var(--txt-2);
  font-size: 14px;
  font-weight: 500;
  padding: 9px 10px;
  border-radius: var(--radius-sm);
  transition: background 0.15s, color 0.15s;
}
.side-link svg { width: 16px; height: 16px; flex: none; opacity: 0.75; }
.side-link:hover { background: rgba(255, 255, 255, 0.06); color: var(--txt); }
.side-link.active { background: var(--card-2); color: var(--txt); box-shadow: inset 2px 0 0 var(--red); }
.side-link .arrow-up { margin-left: auto; font-size: 11px; color: var(--txt-3); }

.side-foot {
  margin-top: auto;
  padding: 14px 10px 4px;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.3);
  line-height: 1.5;
}

/* mobile header */
.mobile-header {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 52px;
  background: rgba(17, 17, 17, 0.95);
  border-bottom: 1px solid var(--line);
  align-items: center;
  padding: 0 16px;
  z-index: 100;
}
.mobile-logo { display: flex; align-items: center; gap: 8px; color: var(--txt); font-weight: 700; font-size: 16px; }
.mobile-logo .logo-mark { width: 28px; height: 28px; border-radius: 7px; }
.hamburger {
  margin-left: auto;
  background: none; border: 0; padding: 8px;
  display: flex; flex-direction: column; gap: 5px;
}
.hamburger span { width: 22px; height: 2px; background: #fff; transition: 0.25s; display: block; }
body.nav-open .hamburger span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
body.nav-open .hamburger span:nth-child(2) { opacity: 0; }
body.nav-open .hamburger span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ============================== main ============================== */

.main-wrapper {
  flex: 1;
  margin-left: var(--sidebar-w);
  padding: 30px 34px 0;
  max-width: 1230px;
  width: 100%;
}

@media (min-width: 1440px) {
  .main-wrapper {
    grid-column: 2;
    justify-self: center;
    margin-right: 0;
  }
}

.breadcrumbs {
  font-size: 13px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 2px 0 12px;
}
.breadcrumbs a { color: rgba(255, 255, 255, 0.8); }
.breadcrumbs a:hover { color: #fff; }
.breadcrumbs .sep { color: rgba(255, 255, 255, 0.25); font-size: 11px; }
.breadcrumbs .current { color: rgba(255, 255, 255, 0.32); }

.header-container { padding-bottom: 14px; }
.header-container h1 {
  font-size: 28px;
  color: rgba(255, 255, 255, 0.92);
  margin: 0 0 6px;
  font-weight: 700;
}
.page-description {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.42);
  max-width: 72ch;
  margin: 0;
}

.notice-strip {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px 16px;
  font-size: 12.5px;
  color: var(--txt-2);
  margin-bottom: 18px;
}
.notice-strip .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--red); flex: none; box-shadow: 0 0 0 3px rgba(230, 0, 18, 0.18); }
.notice-strip a { color: var(--red-soft); }
.notice-strip .spacer { flex: 1; }
.pill {
  display: inline-flex; align-items: center; gap: 6px;
  border: 1px solid var(--line);
  background: var(--card-2);
  border-radius: 999px;
  font-size: 11.5px;
  padding: 3px 10px;
  color: var(--txt-2);
  font-weight: 600;
}
.pill b { color: #fff; font-weight: 600; }

/* sections */
.section-head {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin: 6px 0 14px;
}
.section-head h2 {
  font-size: 20px;
  font-weight: 700;
  margin: 0;
  color: rgba(255, 255, 255, 0.92);
}
.section-head .sub { font-size: 12.5px; color: var(--txt-3); }
.section-head a.more {
  margin-left: auto;
  font-size: 13px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.75);
  white-space: nowrap;
}
.section-head a.more:hover { color: #fff; }

.announcement-list {
  display: grid;
  gap: 8px;
  margin-bottom: 26px;
}
.announcement {
  display: grid;
  grid-template-columns: 160px minmax(0, 1fr) auto;
  align-items: start;
  gap: 12px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 13px 15px;
  color: var(--txt);
  transition: border-color 0.15s, background 0.15s;
}
.announcement:hover {
  background: var(--card-2);
  border-color: rgba(255, 119, 119, 0.45);
  color: var(--txt);
}
.announcement-meta {
  color: var(--red-soft);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.announcement-copy {
  display: grid;
  gap: 4px;
  min-width: 0;
}
.announcement strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.announcement-excerpt {
  color: var(--txt-2);
  font-size: 12.5px;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
}
.announcement-arrow {
  color: var(--txt-3);
  font-size: 16px;
}
.announcement-error { margin-bottom: 26px; }

.news-list {
  display: grid;
  gap: 10px;
  margin-bottom: 22px;
}
.news-entry {
  display: grid;
  grid-template-columns: 160px minmax(0, 1fr) auto;
  align-items: start;
  gap: 14px;
  padding: 17px 18px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--txt);
  transition: background 0.15s, border-color 0.15s, transform 0.15s;
}
.news-entry:hover {
  background: var(--card-2);
  border-color: rgba(255, 119, 119, 0.5);
  color: var(--txt);
  transform: translateY(-2px);
}
.news-entry-meta {
  color: var(--red-soft);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.news-entry-main { min-width: 0; }
.news-entry h2 {
  margin: 0 0 5px;
  font-size: 16px;
  line-height: 1.3;
}
.news-entry p {
  margin: 0;
  color: var(--txt-2);
  font-size: 13px;
  line-height: 1.5;
}
.news-entry-arrow {
  color: var(--txt-3);
  font-size: 24px;
  line-height: 1;
}
.article-back { margin: 0 0 14px; font-size: 13px; }
.news-article {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px 30px 30px;
}
.news-article h1 {
  margin: 8px 0 24px;
  font-size: 30px;
  line-height: 1.2;
}
.news-article-body {
  color: var(--txt-2);
  font-size: 14px;
  line-height: 1.7;
  max-width: 82ch;
  margin-bottom: 24px;
}
.news-article-body p {
  margin: 0 0 17px;
  white-space: pre-line;
}

.main-content {
  background: var(--card);
  border-radius: var(--radius);
  padding: 22px;
  border: 1px solid var(--line);
}

/* generic cards/tiles */
.tiles {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-bottom: 26px;
}
.tile {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  color: var(--txt);
  display: block;
  transition: transform 0.15s, border-color 0.15s;
  position: relative;
}
.tile:hover { transform: translateY(-2px); border-color: rgba(255, 119, 119, 0.5); color: var(--txt); }
.tile h3 { margin: 0 0 6px; font-size: 15.5px; font-weight: 700; }
.tile p { margin: 0; font-size: 13px; color: var(--txt-2); }
.tile .go {
  position: absolute; top: 14px; right: 14px;
  color: var(--txt-3); font-size: 18px; line-height: 1;
}
.tile:hover .go { color: var(--red-soft); }

/* home stat grid */
.facts {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 26px;
}
.fact {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px 14px;
}
.fact .k {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--txt-3);
  font-weight: 600;
  margin-bottom: 3px;
}
.fact .v { font-size: 13.5px; font-weight: 600; color: rgba(255, 255, 255, 0.88); }

/* prose / articles */
.prose {
  background: var(--card);
  border-radius: var(--radius);
  border: 1px solid var(--line);
  padding: 22px 24px;
  max-width: none;
}
.prose p { font-size: 14px; color: var(--txt-2); margin: 0 0 12px; }
.prose p:last-child { margin-bottom: 0; }
.prose h2 {
  font-size: 17px;
  font-weight: 700;
  margin: 22px 0 10px;
  color: rgba(255, 255, 255, 0.92);
}
.prose h2:first-of-type { margin-top: 0; }
.prose::before { content: none; }
.prose .red-accent::before { content: none; }
.prose h2::before, .prose h3::before { content: none; }
.prose ul { color: var(--txt-2); font-size: 14px; padding-left: 20px; margin: 0 0 12px; }
.prose li { margin-bottom: 6px; }
.prose code {
  background: #1c1c1c;
  border: 1px solid var(--line);
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 12.5px;
}
.prose h2::after { content: none; }
.prose h2.red { color: #ff8484; }

.section-note { font-size: 12.5px; color: var(--txt-3); margin: -6px 0 14px; max-width: 88ch; }

/* ------------------------------ characters ------------------------------ */

.filters {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 16px;
  margin-bottom: 18px;
}
.search-row { display: flex; gap: 10px; margin-bottom: 10px; }
.search-row input[type="search"] {
  flex: 1;
  background: #1a1a1a;
  border: 1px solid var(--line);
  color: #fff;
  font-size: 13.5px;
  border-radius: var(--radius-sm);
  padding: 9px 12px;
  outline: none;
}
.search-row input[type="search"]:focus { border-color: rgba(255, 119, 119, 0.45); }
.search-row .reset-btn {
  background: var(--card-2);
  color: var(--txt-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  font-size: 12.5px;
  font-weight: 600;
  padding: 0 14px;
}
.search-row .reset-btn:hover { color: #fff; border-color: rgba(255, 255, 255, 0.2); }

.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  padding: 4px 0;
}
.filter-row + .filter-row { border-top: 1px dashed var(--line); }
.filter-row .f-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--txt-3);
  font-weight: 700;
  width: 74px;
  flex: none;
}
.filter-options { display: flex; flex-wrap: wrap; gap: 7px; }
.filter-options input { display: none; }
.filter-options label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--txt-2);
  border: 1px solid var(--line);
  background: #1c1c1c;
  border-radius: 6px;
  padding: 4px 10px;
  cursor: pointer;
  transition: background 0.12s, color 0.12s, border-color 0.12s;
  user-select: none;
}
@media (hover: hover) and (pointer: fine) {
  .filter-options label:hover { filter: brightness(1.15); background: rgba(255, 255, 255, 0.14); }
}
.filter-options input:checked + label {
  background: rgba(255, 255, 255, 0.35);
  border-color: rgba(255, 255, 255, 0.35);
  color: #fff;
}
.filter-options .el-dot {
  width: 10px; height: 10px;
  border-radius: 3px;
  background: var(--el, #888);
  display: inline-block;
  flex: none;
  transform: none;
}
.filter-empty { color: var(--red-soft); font-size: 13px; margin: 8px 0 0; }

.char-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 14px;
}
.char-grid.wide { grid-template-columns: repeat(4, 1fr); }
.latest-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }

@media (min-width: 1251px) {
  .char-grid { grid-template-columns: repeat(6, 1fr); }
  .char-grid.wide { grid-template-columns: repeat(5, 1fr); }
}

.char-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  text-align: center;
  color: var(--txt);
  transition: transform 0.16s, border-color 0.16s, box-shadow 0.16s;
  position: relative;
  overflow: hidden;
}
.char-card:hover {
  transform: translateY(-4px);
  border-color: rgba(255, 119, 119, 0.55);
  color: var(--txt);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.45);
}
.cc-visual {
  width: 100%;
  aspect-ratio: 5 / 6;
  display: flex; align-items: center; justify-content: center;
  background: radial-gradient(circle at 50% 18%, rgba(255, 255, 255, 0.08), transparent 62%), #151515;
  border-bottom: 1px solid var(--line);
  position: relative;
  overflow: hidden;
}
.cc-img {
  position: absolute;
  inset: 2%;
  width: 96%;
  height: 96%;
  object-fit: contain;
  object-position: center;
  display: block;
  transition: transform 0.4s ease;
}
.char-card:hover .cc-img { transform: scale(1.03); }

/* ========================= progression calculator ========================= */

.prog-shell { max-width: 1180px; margin: 0 auto; }

.prog-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin: 4px 0 16px;
}
.prog-toolbar-group { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

.prog-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  background: #292929;
  color: var(--txt);
  font-size: 12.5px;
  font-weight: 600;
  padding: 8px 13px;
  transition: border-color 0.14s, background 0.14s, color 0.14s, transform 0.14s;
}
.prog-btn:hover { border-color: rgba(255, 255, 255, 0.3); background: #303030; color: #fff; }
.prog-btn-primary { background: var(--red); border-color: var(--red); color: #fff; }
.prog-btn-primary:hover { background: #ff1a2b; border-color: #ff1a2b; color: #fff; }
.prog-btn-sm { padding: 6px 10px; font-size: 11.5px; }
.prog-btn-danger { background: rgba(230, 0, 18, 0.16); border-color: rgba(255, 90, 90, 0.45); color: #ffb3b3; }
.prog-btn-danger:hover { background: rgba(230, 0, 18, 0.26); border-color: rgba(255, 120, 120, 0.7); color: #fff; }
.prog-btn.is-active { border-color: rgba(255, 119, 119, 0.6); background: rgba(230, 0, 18, 0.16); color: #fff; }

.prog-sort { display: flex; align-items: center; gap: 8px; font-size: 11.5px; color: var(--txt-3); }
.prog-sort select,
.prog-dialog input[type="search"],
.prog-dialog input[type="number"],
.prog-dialog textarea,
.prog-filter-search input {
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #1b1b1b;
  color: var(--txt);
  padding: 8px 10px;
  font-size: 12px;
  outline: none;
  transition: border-color 0.14s, box-shadow 0.14s;
}
.prog-sort select:focus,
.prog-dialog input:focus,
.prog-dialog textarea:focus,
.prog-filter-search input:focus {
  border-color: rgba(255, 119, 119, 0.55);
  box-shadow: 0 0 0 2px rgba(230, 0, 18, 0.14);
}

.prog-icon-btn {
  width: 32px;
  height: 32px;
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--card-2);
  color: var(--txt-2);
  font-size: 18px;
  line-height: 1;
}
.prog-icon-btn:hover { color: #fff; border-color: rgba(255, 255, 255, 0.26); }

/* summary */
.prog-summary {
  padding: 15px 16px;
  border: 1px solid var(--line);
  border-bottom: 2px solid #d22;
  border-radius: var(--radius);
  background: linear-gradient(180deg, #252525, #202020);
  margin-bottom: 16px;
}
.prog-summary header { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.prog-summary-heading { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.prog-summary h2 { margin: 0; font-size: 15px; }
.prog-summary-meta { font-size: 11.5px; color: var(--txt-3); }
.prog-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(74px, 1fr));
  gap: 8px;
  margin-top: 14px;
}
.prog-summary-empty { margin: 14px 0 0; color: var(--txt-3); font-size: 12.5px; }
.prog-summary.is-collapsed .prog-summary-grid,
.prog-summary.is-collapsed .prog-summary-empty { display: none; }
.prog-chev { display: inline-block; transition: transform 0.16s; }
.prog-summary.is-collapsed .prog-chev { transform: rotate(-90deg); }

.prog-mat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  min-width: 0;
  padding: 7px 4px 5px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #292929;
  color: var(--txt);
  font-family: inherit;
  transition: transform 0.14s, border-color 0.14s, background 0.14s;
}
.prog-mat:hover { transform: translateY(-1px); border-color: rgba(255, 119, 119, 0.55); background: #2e2e2e; }
.prog-mat.is-short { border-color: rgba(230, 0, 18, 0.38); }
.prog-mat-icon img { width: 38px; height: 38px; object-fit: contain; display: block; }
.prog-mat-count { font-size: 10px; color: var(--txt-3); white-space: nowrap; }
.prog-mat-count b { color: #7ee0a0; font-weight: 700; }
.prog-mat.is-short .prog-mat-count b { color: #ff8b8b; }
.prog-mat-count i { font-style: normal; opacity: 0.5; margin: 0 2px; }
.prog-mat-sm { padding: 5px 3px; border-radius: 6px; background: #262626; }
.prog-mat-sm .prog-mat-icon img { width: 28px; height: 28px; }
.prog-mat-sm .prog-mat-count { font-size: 9px; }

/* filters */
.prog-filters {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  margin-bottom: 16px;
}
.prog-filters[hidden],
.prog-summary-grid[hidden],
.prog-summary-empty[hidden],
.prog-btn[hidden] { display: none; }
.prog-filter-search input { width: 100%; }
.prog-filter-groups { display: flex; flex-wrap: wrap; gap: 14px; }
.prog-filter-group { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.prog-filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #262626;
  color: var(--txt-2);
  font-family: inherit;
  font-size: 11px;
}
.prog-filter-chip img { width: 14px; height: 14px; }
.prog-filter-chip:hover { border-color: rgba(255, 255, 255, 0.26); color: #fff; }
.prog-filter-chip.is-active {
  border-color: var(--chip-color, var(--red-soft));
  background: rgba(230, 0, 18, 0.16);
  color: #fff;
  box-shadow: inset 0 0 0 1px var(--chip-color, rgba(230, 0, 18, 0.5));
}

/* cards */
.prog-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(360px, 1fr)); gap: 14px; }
.prog-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  overflow: hidden;
  transition: opacity 0.16s, border-color 0.16s, transform 0.16s;
}
.prog-card:hover { border-color: rgba(255, 255, 255, 0.16); }
.prog-card.is-excluded { opacity: 0.55; }
.prog-card-head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 12px 10px;
  border-bottom: 1px solid var(--line);
}
.prog-avatar {
  width: 52px;
  height: 52px;
  flex: none;
  border-radius: 10px;
  object-fit: cover;
  background: #151515;
}
.prog-card-id { flex: 1; min-width: 0; }
.prog-card-title { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.prog-card-title strong { font-size: 15px; }
.prog-stars { color: #ffcf5c; font-size: 10px; letter-spacing: 1px; }
.prog-card-sub {
  margin-top: 1px;
  font-size: 11.5px;
  color: var(--txt-3);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.prog-card-chips { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.prog-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 7px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.18);
  color: var(--txt-2);
  font-size: 9.5px;
}
.prog-chip img { width: 12px; height: 12px; }
.prog-chip[style*="--chip-color"] { border-color: var(--chip-color); }
.prog-chip-role { color: rgba(255, 255, 255, 0.62); }
.prog-chip-support { color: #ffd477; border-color: rgba(255, 190, 70, 0.35); }
.prog-card-tools { display: flex; align-items: center; justify-content: flex-end; gap: 6px; flex-wrap: wrap; }
.prog-include { display: inline-flex; align-items: center; gap: 5px; font-size: 10px; color: var(--txt-3); cursor: pointer; user-select: none; }
.prog-include input { accent-color: var(--red); }
.prog-mini-btn {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #292929;
  color: var(--txt-2);
  font-family: inherit;
  font-size: 10.5px;
  padding: 4px 7px;
}
.prog-mini-btn:hover { color: #fff; border-color: rgba(255, 255, 255, 0.26); }
.prog-remove {
  border: 0;
  background: transparent;
  color: var(--txt-3);
  font-size: 18px;
  line-height: 1;
  padding: 0 2px;
}
.prog-remove:hover { color: #ff7b7b; }
.prog-card-mats {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(62px, 1fr));
  gap: 6px;
  padding: 10px 12px 12px;
}
.prog-card-nomat {
  grid-column: 1 / -1;
  margin: 0;
  padding: 12px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--txt-3);
  font-size: 12px;
  text-align: center;
}
.prog-card-details {
  padding: 10px 12px 12px;
  border-top: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.14);
}
.prog-detail-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 2px 14px; }
.prog-detail-row {
  display: grid;
  grid-template-columns: 1fr auto auto auto;
  gap: 6px;
  align-items: baseline;
  padding: 3px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  font-size: 11px;
  color: var(--txt-3);
}
.prog-detail-row b { color: var(--txt); font-weight: 600; }
.prog-detail-row i { color: var(--txt-3); font-style: normal; }
.prog-detail-note { margin: 8px 0 0; color: #ffd477; font-size: 11px; }

/* empty states */
.prog-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 56px 20px;
  border: 1px dashed rgba(255, 255, 255, 0.14);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.015);
  text-align: center;
}
.prog-empty[hidden] { display: none; }
.prog-empty-mark {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(230, 0, 18, 0.4);
  border-radius: 50%;
  background: rgba(230, 0, 18, 0.1);
  color: #ff8b8b;
  font-size: 26px;
}
.prog-empty h2 { margin: 4px 0 0; font-size: 17px; }
.prog-empty p { margin: 0; max-width: 44ch; color: var(--txt-3); font-size: 12.5px; }
.prog-no-results {
  grid-column: 1 / -1;
  padding: 36px;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  color: var(--txt-3);
  font-size: 13px;
  text-align: center;
}
.prog-link-btn { border: 0; background: none; color: var(--red-soft); font: inherit; text-decoration: underline; padding: 0; }

.prog-disclaimer {
  margin-top: 24px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--txt-3);
  text-align: center;
  font-size: 11px;
}

/* dialogs */
.prog-dialog {
  width: min(720px, calc(100vw - 28px));
  max-height: min(86vh, 900px);
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  background: var(--card);
  color: var(--txt);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.6);
  overflow: hidden;
}
.prog-dialog::backdrop { background: rgba(0, 0, 0, 0.72); backdrop-filter: blur(2px); }
.prog-dialog-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
}
.prog-dialog-head h2 { margin: 0; font-size: 17px; }
.prog-dialog-head p { margin: 3px 0 0; color: var(--txt-3); font-size: 11.5px; }
.prog-dialog-tools {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 12px 18px;
  border-bottom: 1px solid var(--line);
}
.prog-dialog-tools input[type="search"] { flex: 1 1 220px; }
.prog-check { display: inline-flex; align-items: center; gap: 6px; color: var(--txt-2); font-size: 11.5px; }
.prog-check input { accent-color: var(--red); }
.prog-dialog-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 12px 18px;
  border-top: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.15);
}
.prog-foot-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-left: auto; }
.prog-foot-note { color: var(--txt-3); font-size: 11px; }
.prog-foot-note.is-error { color: #ff8b8b; }

/* add picker */
.prog-picker {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(112px, 1fr));
  gap: 8px;
  max-height: 56vh;
  overflow-y: auto;
  padding: 14px 18px 18px;
}
.prog-pick {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  min-width: 0;
  padding: 8px 6px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--card-2);
  color: var(--txt);
  font-family: inherit;
  transition: transform 0.14s, border-color 0.14s;
}
.prog-pick:hover { transform: translateY(-2px); border-color: rgba(255, 119, 119, 0.6); }
.prog-pick-art {
  display: block;
  width: 100%;
  aspect-ratio: 5 / 6;
  overflow: hidden;
  border-radius: 7px;
  background: radial-gradient(circle at 50% 18%, rgba(255, 255, 255, 0.08), transparent 62%), #151515;
}
.prog-pick-art img { width: 100%; height: 100%; object-fit: contain; display: block; }
.prog-pick-name { font-size: 11px; font-weight: 600; line-height: 1.2; text-align: center; }
.prog-pick-sub { color: var(--txt-3); font-size: 9px; line-height: 1.2; text-align: center; }
.prog-pick-spoiler {
  position: absolute;
  top: 6px;
  right: 6px;
  padding: 2px 4px;
  border: 1px solid rgba(255, 190, 70, 0.7);
  border-radius: 3px;
  background: rgba(37, 24, 5, 0.9);
  color: #ffd477;
  font-size: 8px;
}
.prog-picker-empty { margin: 0; padding: 28px 18px; color: var(--txt-3); font-size: 12.5px; text-align: center; }

/* setup */
.prog-setup-dialog { width: min(760px, calc(100vw - 28px)); }
.prog-setup-head { align-items: center; }
.prog-setup-title { display: flex; align-items: center; gap: 12px; min-width: 0; }
.prog-setup-title img { width: 54px; height: 54px; flex: none; border-radius: 10px; object-fit: cover; background: #151515; }
.prog-setup-body { display: grid; gap: 16px; max-height: 58vh; overflow-y: auto; padding: 14px 18px; }
.prog-setup-group h3 {
  margin: 0 0 8px;
  color: var(--txt-3);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.prog-setup-rows { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 10px; }
.prog-setup-row {
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: rgba(0, 0, 0, 0.16);
}
.prog-setup-row.is-locked { opacity: 0.55; }
.prog-setup-row-head { display: flex; justify-content: space-between; gap: 8px; margin-bottom: 6px; color: var(--txt-2); font-size: 11.5px; }
.prog-setup-row-head small { color: var(--txt-3); font-size: 9.5px; }
.prog-setup-controls { display: flex; align-items: center; gap: 6px; }
.prog-setup-controls input[type="number"] { width: 62px; padding: 5px 4px; text-align: center; }
.prog-arrow { color: var(--txt-3); font-size: 11px; }
.prog-range-pair { display: grid; gap: 2px; margin-top: 6px; }
.prog-range-pair input[type="range"] { width: 100%; height: 14px; margin: 0; accent-color: var(--red); }
.prog-toggle { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; color: var(--txt-2); font-size: 12px; }
.prog-toggle input { accent-color: var(--red); }
.prog-mindscape-fields.is-disabled { opacity: 0.4; }

/* inventory */
.prog-inventory-dialog { width: min(780px, calc(100vw - 28px)); }
.prog-inventory { display: grid; gap: 16px; max-height: 58vh; overflow-y: auto; padding: 14px 18px; }
.prog-inv-group h3 {
  margin: 0 0 6px;
  color: var(--txt-3);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.prog-inv-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 6px; }
.prog-inv-row {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 6px 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.16);
}
.prog-inv-row img { width: 30px; height: 30px; flex: none; object-fit: contain; }
.prog-inv-name { display: flex; flex: 1; flex-direction: column; min-width: 0; color: var(--txt-2); font-size: 11.5px; }
.prog-inv-name small { overflow: hidden; color: var(--txt-3); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.prog-inv-row input { width: 74px; padding: 5px 6px; text-align: right; }

/* backup */
.prog-backup-dialog { width: min(680px, calc(100vw - 28px)); }
.prog-backup-text {
  display: block;
  width: calc(100% - 36px);
  min-height: 240px;
  max-height: 48vh;
  margin: 14px 18px;
  resize: vertical;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 11px;
  line-height: 1.5;
}

/* confirm */
.prog-confirm-dialog { width: min(420px, calc(100vw - 28px)); padding: 20px; }
.prog-confirm-dialog h2 { margin: 0 0 6px; font-size: 17px; }
.prog-confirm-dialog p { margin: 0 0 18px; color: var(--txt-2); font-size: 12.5px; line-height: 1.55; }
.prog-confirm-dialog .prog-dialog-foot { justify-content: flex-end; padding: 0; border: 0; background: none; }

/* toasts */
.prog-toasts {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: min(360px, calc(100vw - 36px));
}
.prog-toast {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-left: 3px solid var(--red);
  border-radius: 8px;
  background: #1c1c1c;
  color: var(--txt);
  font-size: 12px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.45);
  animation: prog-toast-in 0.18s ease-out;
}
.prog-toast span { flex: 1; }
.prog-toast button { border: 0; background: none; padding: 0; color: var(--red-soft); font-family: inherit; font-size: 11px; font-weight: 700; }
@keyframes prog-toast-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.prog-visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 760px) {
  .prog-toolbar { align-items: stretch; flex-direction: column; }
  .prog-grid { grid-template-columns: minmax(0, 1fr); }
  .prog-card-head { flex-wrap: wrap; }
  .prog-card-tools { width: 100%; justify-content: flex-start; }
  .prog-setup-rows { grid-template-columns: minmax(0, 1fr); }
  .prog-dialog { max-height: 92vh; }
  .prog-setup-body,
  .prog-inventory { max-height: 64vh; }
}

@media (max-width: 460px) {
  .prog-summary-grid { grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); }
  .prog-card-mats { grid-template-columns: repeat(auto-fill, minmax(58px, 1fr)); }
  .prog-dialog-head,
  .prog-dialog-tools,
  .prog-dialog-foot { padding-left: 14px; padding-right: 14px; }
  .prog-picker { grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); padding-left: 14px; padding-right: 14px; }
  .prog-inv-list { grid-template-columns: minmax(0, 1fr); }
}

.cc-spoiler {
  position: absolute;
  right: 8px;
  bottom: 8px;
  padding: 3px 6px;
  border: 1px solid rgba(255, 190, 70, .7);
  border-radius: 3px;
  background: rgba(37, 24, 5, .88);
  color: #ffd477;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .08em;
}

.spoiler-filter-row label {
  border: 0;
  color: var(--txt-2);
  padding: 0;
  background: transparent;
  cursor: pointer;
}

.spoiler-check-input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.spoiler-check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
}

.spoiler-check span {
  width: 16px;
  height: 16px;
  border: 1px solid var(--txt-3);
  border-radius: 3px;
  display: inline-grid;
  place-items: center;
  transition: background .15s, border-color .15s, box-shadow .15s;
}

.spoiler-check span::after {
  content: '';
  width: 8px;
  height: 4px;
  border-left: 2px solid #111;
  border-bottom: 2px solid #111;
  transform: rotate(-45deg) scale(0);
  transition: transform .15s;
}

.spoiler-check-input:checked + .spoiler-check {
  color: #ffd477;
}

.spoiler-check-input:checked + .spoiler-check span {
  background: #ffd477;
  border-color: #ffd477;
  box-shadow: 0 0 0 3px rgba(255, 212, 119, .12);
}

.spoiler-check-input:checked + .spoiler-check span::after {
  transform: rotate(-45deg) scale(1);
}

.cc-fallback {
  font-size: 42px;
  font-weight: 800;
  color: var(--el, #aaa);
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.6);
  opacity: 0.75;
}
.cc-rarity {
  position: absolute;
  top: 8px; left: 8px;
  z-index: 2;
  white-space: nowrap;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.6px;
  color: var(--gold);
  background: rgba(10, 10, 10, 0.7);
  border: 1px solid rgba(255, 176, 32, 0.32);
  border-radius: 5px;
  padding: 2px 7px;
  backdrop-filter: blur(4px);
}
.stars.unknown { color: var(--txt-3); font-weight: 700; }
.cc-body { margin-top: 0; padding: 10px 10px 12px; display: flex; flex-direction: column; gap: 3px; width: 100%; }
.cc-body h3 {
  margin: 0;
  font-size: 14.5px;
  font-weight: 700;
  line-height: 1.25;
}
.cc-name { margin: 0; font-size: 11.5px; color: var(--txt-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cc-chips {
  display: flex; flex-wrap: wrap; gap: 4px;
  margin-top: 6px;
  width: 100%;
  min-height: 18px;
}
.cc-chips:empty { min-height: 0; }
.chip {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 10.5px;
  font-weight: 600;
  color: var(--txt-2);
  border: 1px solid var(--line);
  background: #1c1c1c;
  border-radius: 5px;
  padding: 2px 7px;
  transform: none;
}
.chip .el-dot { width: 8px; height: 8px; border-radius: 2.5px; background: var(--el, #888); display: inline-block; flex: none; }
.chip-ico {
  width: 14px;
  height: 14px;
  object-fit: contain;
  flex: none;
  display: inline-block;
  vertical-align: -2px;
  filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.55));
}
.chip.role .chip-ico { opacity: 0.92; }
.filter-options .chip-ico { width: 15px; height: 15px; vertical-align: -3px; }
.chip.el { color: #fff; border-color: rgba(255, 255, 255, 0.14); }
.get { display: none; }

.group-head {
  margin: 26px 0 12px;
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
}
.group-head h2 { font-size: 16.5px; font-weight: 700; margin: 0; color: rgba(255, 255, 255, 0.9); }
.group-head .sub { font-size: 12.5px; color: var(--txt-3); }

/* character detail page */
.detail-grid {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 16px;
  margin-bottom: 26px;
}
.detail-side {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 14px 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 6px;
  align-self: start;
}
.detail-art {
  width: 100%;
  min-height: 260px;
  border-radius: 9px;
  overflow: hidden;
  background: #141414;
  border: 1px solid var(--line);
  position: relative;
  line-height: 0;
}
.detail-art img { position: relative; z-index: 1; width: 100%; height: auto; display: block; }
.detail-art .cc-fallback {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 64px;
}
.detail-side .cc-name { white-space: normal; margin-top: 4px; font-size: 13px; color: var(--txt-2); }
.detail-side .rarity-line { font-size: 13px; letter-spacing: 2px; color: var(--gold); margin-top: 2px; }
.detail-main { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 24px; }
.detail-main .code-name {
  font-size: 24px;
  font-weight: 700;
  margin: 0 0 2px;
  color: rgba(255, 255, 255, 0.94);
}
.detail-main .real-name { font-size: 13px; color: var(--txt-3); margin: 0 0 14px; }
.detail-meta {
  display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 16px;
}
.info-block {
  border-top: 1px dashed var(--line);
  padding: 10px 2px;
  font-size: 13.5px;
  color: var(--txt-2);
}
.info-block b {
  color: rgba(255, 255, 255, 0.9);
  font-weight: 600;
  margin-right: 6px;
}
.info-block:first-of-type { border-top: 0; }

.character-guide {
  border-top: 2px solid var(--guide-el, var(--gold));
  margin: 8px 0 30px;
  padding-top: 18px;
}
.guide-hero {
  min-height: 250px;
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 20px;
  align-items: center;
  position: relative;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--guide-el) 45%, var(--line));
  border-radius: var(--radius);
  background:
    linear-gradient(90deg, rgba(10,10,14,.2), rgba(10,10,14,.94) 56%),
    linear-gradient(135deg, color-mix(in srgb, var(--guide-el) 28%, #101014), #111116);
  margin-bottom: 12px;
}
.guide-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(135deg, transparent 0 18px, rgba(255,255,255,.025) 19px 20px);
}
.guide-hero-art {
  height: 250px;
  align-self: stretch;
  overflow: hidden;
  position: relative;
  z-index: 1;
}
.guide-hero-art::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent 45%, #111116 100%);
}
.guide-hero-art img { width: 100%; height: 100%; object-fit: cover; object-position: center top; filter: saturate(1.12) contrast(1.06); }
.guide-hero-copy { position: relative; z-index: 2; padding: 28px 28px 28px 0; }
.guide-kicker { color: var(--guide-el); font-size: 10px; font-weight: 800; letter-spacing: .18em; }
.guide-hero h2 { margin: 8px 0 8px; font-size: clamp(24px, 3vw, 36px); letter-spacing: -.03em; }
.guide-hero p { max-width: 650px; color: var(--txt-2); line-height: 1.65; margin: 0; }
.guide-hero-icons { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.guide-hero-icons span { display: inline-flex; align-items: center; gap: 7px; color: var(--txt-1); border: 1px solid color-mix(in srgb, var(--guide-el) 50%, var(--line)); background: rgba(0,0,0,.24); border-radius: 999px; padding: 6px 10px; font-size: 11px; }
.guide-hero-icons img, .guide-icon img { width: 20px; height: 20px; object-fit: contain; }
.guide-lead {
  background: linear-gradient(110deg, color-mix(in srgb, var(--guide-el) 18%, var(--card)), var(--card));
  border: 1px solid var(--line);
  border-left: 3px solid var(--guide-el);
  border-radius: var(--radius);
  padding: 16px 18px;
  color: var(--txt-2);
  line-height: 1.65;
  margin-bottom: 12px;
}
.guide-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.guide-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 18px;
}
.guide-card h3 { margin: 0 0 10px; font-size: 15px; color: rgba(255,255,255,.92); }
.guide-card-title { display: flex; align-items: center; gap: 9px; margin-bottom: 12px; }
.guide-card-title h3 { margin: 0; }
.guide-icon { width: 32px; height: 32px; border-radius: 8px; display: grid; place-items: center; background: color-mix(in srgb, var(--guide-el) 18%, #15151b); border: 1px solid color-mix(in srgb, var(--guide-el) 45%, var(--line)); }
.guide-card p, .guide-card li { color: var(--txt-2); font-size: 13px; line-height: 1.6; }
.guide-card p { margin: 0; }
.rhythm-rows { display: grid; gap: 7px; }
.rhythm-row { display: flex; align-items: center; gap: 9px; padding: 6px 0; border-bottom: 1px solid rgba(255,255,255,.1); }
.rhythm-row:last-child { border-bottom: 0; }
.rhythm-row > b { flex: 0 0 74px; color: var(--txt-1); font-size: 12px; font-style: italic; }
.rhythm-sequence { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; color: var(--txt-1); font-size: 12px; font-weight: 700; }
.rhythm-token { padding: 2px 5px; border-radius: 4px; background: color-mix(in srgb, var(--guide-el) 18%, transparent); color: var(--guide-el); }
.rhythm-token:first-letter { color: var(--txt-1); }
.rhythm-neutral { color: var(--txt-2); background: rgba(255,255,255,.08); }
.rhythm-arrow { color: var(--miku-pink, #e85aab); font-size: 17px; line-height: 1; }
.rhythm-legend { margin-top: 10px; padding-top: 8px; border-top: 1px solid rgba(255,255,255,.16); color: var(--txt-1); font-size: 12px; font-style: italic; }
.guide-card ul { margin: 0; padding-left: 18px; }
.guide-card li + li { margin-top: 7px; }
.awareness-list { display: grid; gap: 10px; }
.awareness-row { padding: 10px 12px; border-left: 2px solid var(--guide-el); background: rgba(255,255,255,.035); border-radius: 0 8px 8px 0; }
.awareness-row[hidden] { display: none; }
.awareness-row b { color: var(--guide-el); font-size: 12px; letter-spacing: .04em; }
.awareness-row p { margin: 4px 0 0; white-space: pre-line; }
.awareness-picks { display: flex; flex-wrap: wrap; gap: 3px; }
.awareness-pick {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  width: 28px;
  height: 32px;
  padding: 0;
  background: var(--card-2);
  border: 1px solid var(--line);
  border-radius: 6px;
  opacity: 0.68;
  cursor: pointer;
  transition: opacity 0.12s, border-color 0.12s, background 0.12s, box-shadow 0.12s;
}
.awareness-pick img { display: block; width: 17px; height: 17px; object-fit: contain; }
.awareness-pick span { font-size: 8px; font-weight: 700; letter-spacing: 0.03em; line-height: 1; color: var(--txt-3); }
.awareness-pick:hover { opacity: 0.9; border-color: rgba(255, 119, 119, 0.4); }
.awareness-pick:focus-visible { outline: none; border-color: rgba(255, 119, 119, 0.6); box-shadow: 0 0 0 2px rgba(230, 0, 18, 0.18); }
.awareness-pick.is-active {
  opacity: 1;
  border-color: var(--red);
  background: rgba(230, 0, 18, 0.14);
  box-shadow: inset 0 0 0 1px rgba(230, 0, 18, 0.35), 0 0 12px rgba(230, 0, 18, 0.22);
}
.awareness-pick.is-active span { color: var(--red-soft); }
.awareness-pick.is-active img { animation: awareness-pop 0.18s ease-out; }
@keyframes awareness-pop { from { transform: scale(0.8); } to { transform: scale(1); } }
.awareness-current { margin-left: auto; color: var(--gold); font-size: 11px; letter-spacing: 0.04em; }
.awareness-panels { margin-top: 10px; }
.guide-wide { grid-column: 1 / -1; }
.guide-tags { display: flex; flex-wrap: wrap; gap: 7px; }
.guide-tags span {
  border: 1px solid color-mix(in srgb, var(--guide-el) 55%, var(--line));
  border-radius: 999px;
  color: var(--txt-1);
  padding: 5px 10px;
  font-size: 12px;
}
.build-section-head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 10px; }
.build-section-head h4 { margin: 0; color: var(--guide-el); font-size: 10.5px; letter-spacing: .09em; text-transform: uppercase; }
.build-section-head span { color: var(--txt-3); font-size: 11px; }
.build-pairs { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 16px; }
.build-pair-card {
  --pair-accent: #e85aab;
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 168px;
  padding: 8px 12px 8px 8px;
  border: 1px solid color-mix(in srgb, var(--pair-accent) 55%, transparent);
  border-radius: 10px;
  background: linear-gradient(135deg, color-mix(in srgb, var(--pair-accent) 11%, transparent), rgba(0,0,0,.14));
}
.build-pair-card.tone-teal { --pair-accent: #37e0db; }
.build-pair-card.tone-gold { --pair-accent: #f0c76a; }
.build-pair-images { display: flex; align-items: center; flex: 0 0 auto; }
.build-pair-images img { width: 40px; height: 56px; object-fit: cover; border-radius: 5px; border: 1px solid rgba(255,255,255,.7); box-shadow: 0 3px 8px rgba(0,0,0,.35); background: #0b0b10; }
.build-pair-images img + img { margin-left: -14px; transform: translateY(5px) scale(.86); }
.build-pair-copy { display: flex; flex-direction: column; gap: 2px; }
.build-pair-copy b { color: #fff; font-size: 13px; }
.build-pair-copy small { color: var(--pair-accent); font-size: 11.5px; font-weight: 700; }
.build-columns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; padding-top: 14px; border-top: 1px solid rgba(255,255,255,.08); }
.build-options h4 { margin: 0 0 7px; color: var(--guide-el); font-size: 10.5px; letter-spacing: .09em; text-transform: uppercase; }
.build-option-row { display: flex; align-items: flex-start; gap: 10px; padding: 6px 0; border-bottom: 1px solid rgba(255,255,255,.06); }
.build-option-row:last-child { border-bottom: 0; padding-bottom: 0; }
.build-option-label { flex: 0 0 82px; color: var(--txt-3); font-size: 11px; line-height: 1.5; }
.build-option-values { display: flex; flex-wrap: wrap; gap: 5px; }
.build-option-values span { padding: 2px 8px; border-radius: 999px; border: 1px solid rgba(255,255,255,.09); background: rgba(255,255,255,.055); color: var(--txt-1); font-size: 11.5px; }
.build-option-values .build-empty { padding-left: 0; border: 0; background: none; color: var(--txt-3); }
.build-skill-priority { display: flex; align-items: center; gap: 10px; margin-top: 14px; padding-top: 12px; border-top: 1px solid rgba(255,255,255,.08); font-size: 12px; }
.build-skill-priority b { color: var(--guide-el); font-size: 10.5px; letter-spacing: .09em; text-transform: uppercase; }
.build-skill-priority span { color: var(--txt-1); }
@media (max-width: 700px) {
  .build-columns { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .build-pair-card { flex: 1 1 100%; }
}
.skill-level-tabs { display: flex; flex-wrap: wrap; gap: 7px; margin: 0 0 12px; }
.skill-level-tab {
  appearance: none;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 999px;
  background: rgba(255,255,255,.06);
  color: var(--txt-2);
  padding: 6px 12px;
  font: inherit;
  font-size: 11px;
  cursor: pointer;
  transition: background .16s ease, border-color .16s ease, color .16s ease;
}
.skill-level-tab:hover { border-color: var(--guide-el); color: var(--txt-1); }
.skill-level-tab.is-active { border-color: var(--guide-el); background: color-mix(in srgb, var(--guide-el) 24%, #181820); color: var(--txt-1); }
.skill-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.skill-row { display: flex; gap: 11px; padding: 10px; border-radius: 10px; background: rgba(255,255,255,.035); border: 1px solid rgba(255,255,255,.06); }
.skill-art, .weapon-art { flex: 0 0 50px; width: 50px; height: 50px; border-radius: 8px; overflow: hidden; position: relative; background: #101015; border: 1px solid color-mix(in srgb, var(--guide-el) 45%, var(--line)); }
.skill-art > img:first-child, .weapon-art img { width: 100%; height: 100%; object-fit: cover; object-position: center top; }
.skill-art .skill-element { position: absolute; width: 18px; height: 18px; right: 3px; bottom: 3px; padding: 2px; border-radius: 50%; background: #111116; }
.skill-row b { color: var(--guide-el); font-size: 12px; text-transform: uppercase; letter-spacing: .08em; }
.skill-list p { margin-top: 3px; white-space: pre-line; }
.skill-value { color: #fff; background: color-mix(in srgb, var(--guide-el) 28%, transparent); border-radius: 3px; padding: 0 2px; font-weight: 700; box-shadow: 0 0 0 1px color-mix(in srgb, var(--guide-el) 32%, transparent); }
.weapon-list { display: grid; gap: 9px; }
.weapon-row { display: flex; align-items: flex-start; gap: 14px; color: var(--txt-2); font-size: 13px; line-height: 1.55; }
.weapon-art { flex-basis: 84px; width: 84px; height: 84px; border-radius: 12px; }
.weapon-row b { color: rgba(255,255,255,.92); }
.guide-source { margin: 12px 2px 0; color: var(--txt-3); font-size: 11px; }
.guide-pending { border-top-color: var(--txt-3); }
.guide-pending .guide-lead { border-left-color: var(--txt-3); color: var(--txt-3); }
.synergy-toolbar { margin: 18px 0 12px; }
.synergy-toolbar input { width: min(360px, 100%); padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: rgba(255,255,255,.05); color: var(--txt-1); }
.synergy-character-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(145px, 1fr)); gap: 8px; margin-bottom: 16px; }
.synergy-character { display: grid; grid-template-columns: 38px 1fr; grid-template-rows: auto auto; align-items: center; gap: 0 8px; padding: 8px; border: 1px solid var(--line); border-radius: 8px; background: rgba(255,255,255,.04); color: var(--txt-1); text-align: left; cursor: pointer; }
.synergy-character:hover, .synergy-character.is-selected { border-color: var(--accent); background: rgba(255,255,255,.1); }
.synergy-avatar { grid-row: 1 / 3; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 8px; overflow: hidden; background: linear-gradient(135deg, #343446, #12121a); color: var(--accent); font-weight: 800; }
.synergy-avatar img { width: 100%; height: 100%; object-fit: cover; object-position: center; }
.synergy-character small { color: var(--txt-3); font-size: 10px; }
.synergy-detail-panel { padding: 18px; border: 1px solid var(--line); border-radius: 12px; background: rgba(255,255,255,.035); }
.synergy-detail-panel[hidden] { display: none; }
.synergy-detail-head { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; border-bottom: 1px solid var(--line); padding-bottom: 12px; }
.synergy-detail-head h2 { margin: 0; color: var(--accent); }
.synergy-detail-head span { color: var(--txt-3); font-size: 11px; }
.synergy-section { margin-top: 20px; }
.synergy-section h3 { margin: 0 0 8px; padding-bottom: 7px; border-bottom: 1px solid var(--accent); color: var(--txt-1); font-size: 14px; }
.synergy-quest { padding: 12px; background: rgba(0,0,0,.2); border-radius: 8px; }
.synergy-quest p { margin: 5px 0 0; color: var(--txt-2); font-size: 12px; }
.synergy-table img { width: 34px; height: 34px; object-fit: contain; vertical-align: middle; }
.synergy-table .synergy-currency-icon { width: 16px; height: 16px; margin-right: 4px; }
.synergy-dialog-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.synergy-dialog { padding: 10px; border-radius: 8px; background: rgba(0,0,0,.2); }
.synergy-dialog header { display: flex; justify-content: space-between; color: var(--accent); font-weight: 700; font-size: 12px; }
.synergy-dialog header small { color: var(--txt-3); font-weight: 400; }
.synergy-dialog ol { margin: 8px 0 0; padding-left: 18px; color: var(--txt-2); font-size: 12px; }
.synergy-dialog li { padding: 5px 0; border-bottom: 1px solid rgba(255,255,255,.06); }
.synergy-dialog li b { float: right; color: #5de8c4; }
.synergy-romance { display: flex; gap: 8px; flex-wrap: wrap; }
.synergy-romance span { padding: 8px 10px; border-radius: 6px; background: rgba(255,255,255,.06); color: var(--txt-2); font-size: 12px; }
@media (max-width: 700px) { .synergy-dialog-grid { grid-template-columns: minmax(0, 1fr); } .synergy-detail-head { display: block; } }
.guide-theme-miku {
  --guide-el: #37e0db !important;
  --miku-blue: #1b6ee8;
  --miku-pink: #e85aab;
  background:
    radial-gradient(circle at 82% 18%, rgba(55,224,219,.14), transparent 28%),
    radial-gradient(circle at 14% 80%, rgba(27,110,232,.16), transparent 30%);
}
.guide-theme-miku .guide-hero {
  border-color: rgba(55,224,219,.42);
  box-shadow: 0 18px 50px rgba(13,91,157,.22);
}
.guide-theme-miku .guide-card {
  border-color: rgba(55,224,219,.2);
  background: linear-gradient(135deg, rgba(7,28,58,.8), rgba(15,18,35,.88));
}
.guide-theme-miku .guide-card-title h3,
.guide-theme-miku .skill-row b,
.guide-theme-miku .awareness-row b { color: #76fff5; }
.guide-theme-miku .guide-lead {
  border-left-color: var(--miku-pink);
  background: linear-gradient(90deg, rgba(232,90,171,.13), rgba(55,224,219,.06));
}
.miku-build-columns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.miku-build-columns b { color: #fff; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; }
.miku-build-columns p { margin-top: 6px; color: #8dfaf1; font-weight: 700; }
.miku-or { display: block; margin: 4px 0; color: var(--miku-pink); font-size: 11px; text-transform: uppercase; }
.miku-team-note { margin-top: 12px; padding-top: 10px; border-top: 1px solid rgba(55,224,219,.18); color: #9fb6d8; font-size: 12px; line-height: 1.55; }
.miku-revelations { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 16px; }
.miku-revelation-card { display: flex; align-items: center; gap: 9px; min-width: 150px; padding: 9px 12px; border: 1px solid rgba(55,224,219,.24); border-radius: 10px; background: rgba(0,12,34,.55); }
.miku-revelation-card.hope { border-color: rgba(232,90,171,.55); }
.miku-revelation-images { display: flex; align-items: center; }
.miku-revelation-images img { width: 38px; height: 48px; object-fit: cover; border: 1px solid rgba(255,255,255,.7); border-radius: 4px; box-shadow: 0 3px 8px rgba(0,0,0,.35); }
.miku-revelation-images img + img { margin-left: -13px; transform: translateY(5px) scale(.86); }
.miku-revelation-card b { display: block; color: #fff; }
.miku-revelation-card small { color: #9fb6d8; }
.guide-theme-miku .skill-level-tab.is-active { background: linear-gradient(100deg, #1468d9, #16bfc5); border-color: #76fff5; }
.guide-theme-miku .skill-row { background: rgba(2,17,42,.54); }
@media (max-width: 700px) {
  .miku-build-columns { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .weapon-art { flex-basis: 68px; width: 68px; height: 68px; }
}

/* timeline */
.timeline {
  list-style: none;
  margin: 0;
  padding: 0 0 0 30px;
  position: relative;
}
.timeline::before {
  content: '';
  position: absolute;
  left: 9px; top: 8px; bottom: 14px;
  width: 2px;
  background: rgba(255, 255, 255, 0.12);
}
.timeline li { position: relative; padding: 0 0 22px 18px; }
.timeline li::before {
  content: '';
  position: absolute;
  left: -27px; top: 6px;
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--bg);
  border: 2px solid var(--red);
}
.timeline .tl-date {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--red-soft);
  font-weight: 700;
}
.timeline h3 { font-size: 15px; margin: 2px 0 4px; font-weight: 700; }
.timeline p { margin: 0; font-size: 13.5px; color: var(--txt-2); max-width: 76ch; }

/* story blocks */
.story-block { border-top: 1px dashed var(--line); padding: 18px 0 2px; }
.story-block:first-of-type { border-top: 0; padding-top: 0; }
.story-block h2 { font-size: 17px; font-weight: 700; margin: 0 0 8px; color: rgba(255, 255, 255, 0.92); }
.story-details summary {
  list-style: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--card-2);
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--txt-2);
  font-size: 12.5px;
  font-weight: 600;
  padding: 6px 14px;
  margin-bottom: 8px;
}
.story-details summary::-webkit-details-marker { display: none; }
.story-details[open] summary { color: var(--red-soft); border-color: rgba(255, 119, 119, 0.4); }
.story-details .spoiler-body p { font-size: 14px; color: var(--txt-2); margin: 0 0 10px; }
.spoiler-tag {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #fff;
  background: var(--red);
  border-radius: 4px;
  padding: 2px 8px;
  vertical-align: 2px;
  margin-left: 8px;
}

/* callout */
.callout {
  background: var(--card);
  border: 1px solid var(--line);
  border-left: 3px solid var(--red);
  border-radius: var(--radius);
  padding: 18px 20px;
  margin-top: 18px;
}
.callout.blue { border-left-color: #58b7d2; }
.callout h2 { font-size: 15.5px; font-weight: 700; margin: 0 0 6px; }
.callout p { margin: 0; font-size: 13.5px; color: var(--txt-2); }

.link-list { list-style: none; margin: 0; padding: 0; }
.link-list li { margin: 0 0 10px; font-size: 13.5px; color: var(--txt-3); }
.link-list a { font-weight: 600; }
.src-note { font-size: 12px; color: var(--txt-3); }

/* awards */
.awards { display: flex; gap: 12px; flex-wrap: wrap; margin: 16px 0 26px; }
.award {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px 16px;
}
.award-kind { display: block; font-size: 13px; font-weight: 700; }
.award-year { display: block; font-size: 11.5px; color: var(--txt-3); margin-top: 2px; }

/* buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--red);
  color: #fff;
  border: 1px solid var(--red);
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 700;
  padding: 9px 18px;
  transition: filter 0.12s, background 0.12s;
  transform: none;
}
.btn:hover { filter: brightness(1.15); color: #fff; }
.btn.ghost { background: var(--card-2); color: var(--txt-2); border-color: rgba(255, 255, 255, 0.16); }
.btn.ghost:hover { color: #fff; border-color: rgba(255, 255, 255, 0.3); }
.cta-row { display: flex; gap: 10px; flex-wrap: wrap; }

/* home banner — current-patch key art */
.home-banner {
  position: relative;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin-bottom: 18px;
  min-height: 400px;
  display: flex;
  align-items: flex-end;
  padding: 34px 38px 34px;
  overflow: hidden;
  isolation: isolate;
  background: #0f0f11;
}
.home-banner::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -2;
  background: url('/img/hero-patch.webp') center 16% / cover no-repeat;
  transform: scale(1.02);
  transition: transform 9s ease-out;
}
.home-banner:hover::before { transform: scale(1.07); }
.home-banner::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(90deg, rgba(10, 10, 12, 0.97) 0%, rgba(10, 10, 12, 0.93) 27%, rgba(10, 10, 12, 0.62) 50%, rgba(10, 10, 12, 0.16) 73%, rgba(10, 10, 12, 0.04) 100%),
    linear-gradient(0deg, rgba(10, 10, 12, 0.86) 0%, rgba(10, 10, 12, 0.12) 58%, rgba(10, 10, 12, 0.04) 100%);
}
.banner-copy { position: relative; z-index: 1; max-width: 530px; }
.banner-kicker {
  display: inline-block;
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.4px;
  color: #fff;
  background: var(--red);
  border-radius: 4px;
  padding: 3px 9px;
  margin-bottom: 10px;
}
.banner-title {
  font-size: 40px;
  font-weight: 800;
  letter-spacing: 0.5px;
  margin: 0 0 8px;
  line-height: 1.05;
  text-shadow: 0 3px 24px rgba(0, 0, 0, 0.6);
}
.banner-title .x { color: var(--red); }
.patch-label {
  display: inline-block;
  margin: 8px 0 0;
  color: rgba(255, 255, 255, 0.88);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.banner-event {
  margin: 10px 0 0;
  color: #fff;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.01em;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.85);
}
.banner-sub { font-size: 14px; color: rgba(255, 255, 255, 0.78); margin: 0 0 16px; max-width: 46ch; }
.banner-meta { font-size: 11.5px; color: rgba(255, 255, 255, 0.5); margin-top: 14px; }
.banner-pills { display: flex; flex-wrap: wrap; gap: 7px; margin: 0 0 16px; }
.banner-pills .pill { background: rgba(12, 12, 14, 0.6); backdrop-filter: blur(6px); }
.banner-credit {
  position: absolute;
  right: 16px; bottom: 12px;
  z-index: 1;
  font-size: 10.5px;
  line-height: 1.45;
  max-width: 320px;
  text-align: right;
  color: rgba(255, 255, 255, 0.42);
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.9);
}

.home-nav-buttons {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 26px;
}
.home-nav-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 48px;
  padding: 11px 14px;
  background: linear-gradient(135deg, var(--card-2), var(--card));
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  color: var(--txt-2);
  font-size: 13px;
  font-weight: 600;
  transition: background 0.15s, border-color 0.15s, color 0.15s, transform 0.15s;
}
.home-nav-card b {
  color: var(--txt-3);
  font-size: 20px;
  font-weight: 400;
  line-height: 1;
  transition: color 0.15s, transform 0.15s;
}
.home-nav-card:hover {
  background: linear-gradient(135deg, #343434, var(--card-2));
  border-color: rgba(255, 119, 119, 0.45);
  color: #fff;
  transform: translateY(-2px);
}
.home-nav-card:hover b {
  color: var(--red-soft);
  transform: translateX(2px);
}

/* footer */
.site-footer {
  margin: 30px 0 0;
  padding: 22px 34px 30px;
  border-top: 1px solid var(--line);
  text-align: center;
}
.footer-text { font-size: 12.5px; color: rgba(255, 255, 255, 0.5); max-width: 900px; margin: 0 auto 8px; }
.footer-links {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 18px;
  margin-bottom: 10px;
}
.footer-links a { color: rgba(255, 255, 255, 0.6); font-size: 12.5px; text-decoration: underline; text-underline-offset: 2px; }
.footer-links a:hover { color: #fff; }
.footer-tiny { font-size: 11.5px; color: rgba(255, 255, 255, 0.28); margin: 0; }

/* responsive */
@media (max-width: 1250px) {
  .char-grid { grid-template-columns: repeat(4, 1fr); }
  .facts { grid-template-columns: repeat(2, 1fr); }
  .tiles { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 1100px) {
  .sidebar { display: none; }
  .mobile-header { display: flex; }
  body.nav-open .sidebar {
    display: flex;
    position: fixed;
    top: 0; bottom: 0; left: 0;
    transform: none;
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.6);
  }
  body.nav-open { overflow: hidden; }
  .main-wrapper { margin-left: 0; padding: 72px 20px 0; }
  .detail-grid { grid-template-columns: minmax(0, 1fr); }
  .detail-side { max-width: 340px; margin: 0 auto; }
  .detail-main, .detail-side { min-width: 0; }
  .guide-grid, .skill-list { grid-template-columns: minmax(0, 1fr); }
  .guide-hero { grid-template-columns: 130px minmax(0, 1fr); min-height: 210px; }
  .guide-hero-art { height: 210px; }
  .guide-hero-copy { padding: 20px 14px 20px 0; }
  .guide-wide { grid-column: auto; }
  .info-block { overflow-wrap: anywhere; }
}
@media (max-width: 760px) {
  .char-grid { grid-template-columns: repeat(3, 1fr); }
  .char-grid.wide { grid-template-columns: repeat(2, 1fr); }
  .latest-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .tiles, .facts { grid-template-columns: 1fr; }
  .main-wrapper { padding: 72px 14px 0; }
  .announcement { grid-template-columns: 1fr auto; }
  .announcement-meta { grid-column: 1 / -1; }
  .news-entry { grid-template-columns: 1fr auto; }
  .news-entry-meta { grid-column: 1 / -1; }
  .news-article { padding: 20px 18px 24px; }
  .news-article h1 { font-size: 24px; }
  .home-nav-buttons { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .home-banner { min-height: 0; padding: 26px 22px 24px; flex-direction: column; align-items: stretch; }
  .banner-copy { max-width: none; }
  .home-banner::before { background-position: 62% top; }
  .home-banner::after {
    background:
      linear-gradient(90deg, rgba(10, 10, 12, 0.96) 0%, rgba(10, 10, 12, 0.85) 55%, rgba(10, 10, 12, 0.5) 100%),
      linear-gradient(0deg, rgba(10, 10, 12, 0.9) 0%, rgba(10, 10, 12, 0.26) 70%, rgba(10, 10, 12, 0.1) 100%);
  }
  .banner-title { font-size: 32px; }
  .banner-credit { position: static; text-align: left; max-width: none; margin-top: 16px; }
}
@media (max-width: 480px) {
  .char-grid { grid-template-columns: repeat(2, 1fr); }
  .banner-title { font-size: 27px; }
  .cc-body h3 { font-size: 13px; }
  .chip { font-size: 9.5px; padding: 2px 5px; }
}

/* ===================== database tables ===================== */

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  margin-bottom: 18px;
}
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}
.data-table th {
  text-align: left;
  font-size: 11px;
  letter-spacing: 0.7px;
  text-transform: uppercase;
  color: var(--txt-3);
  font-weight: 600;
  padding: 11px 14px;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
.data-table td {
  padding: 11px 14px;
  border-bottom: 1px solid var(--line);
  color: var(--txt-2);
  vertical-align: top;
}
.data-table tbody tr:last-child td { border-bottom: 0; }
.data-table td b { color: rgba(255, 255, 255, 0.9); font-weight: 600; }
.data-table tbody tr:hover { background: rgba(255, 255, 255, 0.025); }

/* ===================== personas ===================== */

.persona-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-bottom: 24px;
}
.persona-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-left: 3px solid var(--el, #8a8a90);
  border-radius: var(--radius);
  padding: 13px 15px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.persona-name { font-size: 15px; font-weight: 700; color: #fff; }
.persona-card > a { font-size: 12.5px; color: var(--txt-3); }
.persona-card > a:hover { color: var(--red-soft); }
.persona-tags { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 6px; }

/* ===================== tier list ===================== */

.tier-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 18px;
}
.tier-block {
  display: flex;
  gap: 0;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.tier-badge {
  flex: none;
  width: 66px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 19px;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #fff;
  background: linear-gradient(160deg, #b8000e, #6e0009);
  border-right: 1px solid var(--line);
}
.tier-block:nth-child(2) .tier-badge { background: linear-gradient(160deg, #a24a12, #5a2907); }
.tier-block:nth-child(3) .tier-badge { background: linear-gradient(160deg, #8a6a12, #4d3a08); }
.tier-block:nth-child(4) .tier-badge { background: linear-gradient(160deg, #3f5f8a, #22344d); }
.tier-block:nth-child(5) .tier-badge { background: linear-gradient(160deg, #4d4d55, #29292e); }
.tier-block:nth-child(6) .tier-badge { background: linear-gradient(160deg, #3d3d42, #202023); }
.tier-block:nth-child(7) .tier-badge { background: linear-gradient(160deg, #2f2f33, #1a1a1c); }
.tier-body { flex: 1; padding: 12px 16px; min-width: 0; }
.tier-label {
  margin: 0 0 8px;
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--txt-3);
  font-weight: 600;
}
.tier-role {
  display: flex;
  gap: 12px;
  padding: 5px 0;
  border-top: 1px solid var(--line);
  align-items: baseline;
}
.tier-role:first-of-type { border-top: 0; }
.tier-role-name {
  flex: none;
  width: 74px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--txt-3);
  font-weight: 600;
}
.tier-names { display: flex; flex-wrap: wrap; gap: 5px 6px; }
.tier-name {
  display: inline-block;
  font-size: 12.5px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.85);
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 2px 7px;
  line-height: 1.45;
}
a.tier-name:hover { color: #fff; border-color: rgba(255, 119, 119, 0.5); background: rgba(230, 0, 18, 0.12); }
.tier-name.missing { color: var(--txt-3); border-style: dashed; }

/* ===================== tools ===================== */

.tool-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px 22px;
}
.calc-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}
.calc-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.7px;
  color: var(--txt-3);
  font-weight: 600;
}
.calc-field input,
.calc-field select,
.team-slot select {
  background: #1a1a1a;
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 13.5px;
  border-radius: var(--radius-sm);
  padding: 9px 10px;
  outline: none;
  width: 100%;
  letter-spacing: normal;
  text-transform: none;
  font-weight: 500;
}
.calc-field input:focus,
.calc-field select:focus,
.team-slot select:focus { border-color: rgba(255, 119, 119, 0.5); }
.calc-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
}
.calc-hint { font-size: 12px; color: var(--txt-3); }
.calc-out {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-top: 16px;
}
.calc-stat {
  background: var(--card-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 11px 14px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.calc-stat span { font-size: 11px; text-transform: uppercase; letter-spacing: 0.6px; color: var(--txt-3); font-weight: 600; }
.calc-stat b { font-size: 19px; font-weight: 700; color: #fff; letter-spacing: -0.02em; }
.calc-stat.wide { grid-column: 1 / -1; }
.calc-stat.wide b { font-size: 15px; color: var(--red-soft); }

/* ===================== team builder ===================== */

.team-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}
.team-slot {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.7px;
  color: var(--txt-3);
  font-weight: 600;
}
.nav-slot { margin-top: 12px; }
.team-summary {
  margin-top: 16px;
  background: var(--card-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
}
.team-empty { margin: 0; font-size: 13px; color: var(--txt-3); }
.team-row { display: flex; gap: 12px; padding: 5px 0; align-items: baseline; }
.team-row + .team-row { border-top: 1px solid var(--line); }
.team-row .k {
  flex: none;
  width: 84px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--txt-3);
  font-weight: 600;
}
.team-chips { display: flex; flex-wrap: wrap; gap: 5px; }
.team-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--line);
  color: rgba(255, 255, 255, 0.85);
}
.team-chip .chip-ico { width: 14px; height: 14px; }
.team-chip.el { border-color: rgba(255, 119, 119, 0.35); color: #ffb3b3; }
.team-chip.missing { border-style: dashed; color: var(--txt-3); background: none; }
.team-note { margin: 8px 0 0; font-size: 12px; color: var(--txt-3); }

/* ===================== misc ===================== */

.tile-num {
  display: block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--red-soft);
  margin-bottom: 8px;
}
.priority-list {
  counter-reset: prio;
  list-style: none;
  padding-left: 0;
  margin: 0;
}
.priority-list li {
  counter-increment: prio;
  position: relative;
  padding: 9px 0 9px 34px;
  border-top: 1px solid var(--line);
  font-size: 13.5px;
  color: var(--txt-2);
}
.priority-list li:first-child { border-top: 0; }
.priority-list li::before {
  content: counter(prio);
  position: absolute;
  left: 0;
  top: 10px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(230, 0, 18, 0.18);
  border: 1px solid rgba(230, 0, 18, 0.45);
  color: #ffb3b3;
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}
.priority-list li b { color: #fff; }

.empty-state {
  background: var(--card);
  border: 1px dashed rgba(255, 255, 255, 0.16);
  border-radius: var(--radius);
  padding: 48px 24px;
  text-align: center;
}
.empty-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: rgba(230, 0, 18, 0.14);
  border: 1px solid rgba(230, 0, 18, 0.4);
  color: var(--red-soft);
  font-size: 21px;
  font-weight: 800;
  margin-bottom: 14px;
}
.empty-state h2 { margin: 0 0 8px; font-size: 19px; color: #fff; }
.empty-state p { margin: 0 auto 18px; max-width: 46ch; font-size: 13.5px; color: var(--txt-2); }

/* responsive additions */
@media (max-width: 1100px) {
  .calc-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 760px) {
  .persona-grid { grid-template-columns: 1fr; }
  .calc-grid { grid-template-columns: 1fr; }
  .calc-out { grid-template-columns: 1fr; }
  .team-grid { grid-template-columns: 1fr; }
  .tier-block { flex-direction: column; }
  .tier-badge { width: 100%; padding: 8px 0; font-size: 16px; border-right: 0; border-bottom: 1px solid var(--line); }
  .tier-role { flex-direction: column; gap: 4px; }
  .tier-role-name { width: auto; }
  .team-row { flex-direction: column; gap: 4px; }
  .team-row .k { width: auto; }
}

/* Layout fix: the fixed sidebar must not double-offset the main column. */
@media (min-width: 1101px) {
  .main-wrapper { margin-left: 0; }
}

/* Hide empty guide blocks. */.guide-lead:empty, .guide-tags:empty { display: none; }

/* ============================================================
   Persona compendium (split view)
   ============================================================ */

.ps-page {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 372px;
  gap: 18px;
  align-items: start;
  margin-top: 2px;
}

/* ------------------------------- detail ------------------------------- */

.ps-detail { min-width: 0; }

.ps-detail-inner {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.ps-detail-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 2px 2px 6px;
}

.ps-detail-title { min-width: 0; }

.ps-name {
  margin: 0;
  font-size: 26px;
  line-height: 1.15;
  font-weight: 700;
  letter-spacing: -0.035em;
  color: rgba(255, 255, 255, 0.96);
}

.ps-rarity {
  margin-left: 3px;
  font-size: 13px;
  font-weight: 700;
  color: var(--gold);
  letter-spacing: 0;
  vertical-align: 3px;
}

.ps-meta {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 9px;
  min-height: 16px;
}

.ps-meta .ps-grade { height: 15px; width: auto; object-fit: contain; }
.ps-meta .ps-el-icon,
.ps-meta .ps-pos-icon { width: 16px; height: 16px; object-fit: contain; }

.ps-stars { display: inline-flex; align-items: center; gap: 1px; }
.ps-stars img { width: 12px; height: 12px; object-fit: contain; display: block; }

.ps-level {
  display: flex;
  align-items: center;
  gap: 3px;
  flex: none;
  padding-top: 4px;
  color: var(--txt-3);
  font-size: 10px;
  white-space: nowrap;
}

.ps-level > span { margin-right: 3px; }

.ps-level-btn {
  border: 0;
  background: transparent;
  color: rgba(255, 255, 255, 0.5);
  border-radius: 999px;
  padding: 4px 7px;
  font-size: 10px;
  line-height: 1;
  transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.ps-level-btn:hover { color: #fff; background: rgba(255, 255, 255, 0.07); }

.ps-level-btn.is-active {
  background: #2b2b2f;
  color: #fff;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.15);
}

.ps-block {
  background: #1b1b1d;
  border: 1px solid rgba(255, 255, 255, 0.055);
  border-radius: 10px;
  padding: 15px 17px;
}

.ps-block h3 {
  margin: 0;
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.35;
  color: rgba(255, 255, 255, 0.94);
}

.ps-block p {
  margin: 10px 0 0;
  font-size: 12.5px;
  line-height: 1.68;
  color: rgba(255, 255, 255, 0.8);
  white-space: pre-line;
  overflow-wrap: anywhere;
}

/* Tier */

.ps-tier { position: relative; overflow: hidden; }

.ps-tier-head { display: flex; align-items: center; gap: 8px; }

.ps-tier-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  padding: 4px 6px;
  border-radius: 999px;
  background: #9aa4af;
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.2);
}

.ps-tier[data-tier="s"] {
  border-color: rgba(218, 196, 255, 0.34);
  background: linear-gradient(135deg, rgba(225, 177, 242, 0.12), rgba(203, 235, 234, 0.08)), #1b1b1d;
}
.ps-tier[data-tier="s"] .ps-tier-badge { background: linear-gradient(45deg, #cbebea, #e0b1f2, #cbebea, #e8baf9); color: #111; }
.ps-tier[data-tier="a"] {
  border-color: rgba(254, 240, 162, 0.24);
  background: linear-gradient(135deg, rgba(239, 209, 110, 0.12), rgba(254, 240, 162, 0.06)), #1b1b1d;
}
.ps-tier[data-tier="a"] .ps-tier-badge { background: linear-gradient(45deg, #efd16e, #fef0a2); color: #111; }
.ps-tier[data-tier="b"] {
  border-color: rgba(154, 164, 175, 0.34);
  background: linear-gradient(135deg, rgba(154, 164, 175, 0.16), rgba(100, 116, 139, 0.06)), #1b1b1d;
}
.ps-tier[data-tier="c"] {
  border-color: rgba(141, 110, 99, 0.34);
  background: linear-gradient(135deg, rgba(141, 110, 99, 0.16), rgba(104, 78, 68, 0.06)), #1b1b1d;
}
.ps-tier[data-tier="c"] .ps-tier-badge { background: #8d6e63; }

.ps-tier-desc { margin-top: 12px !important; }

.ps-tip {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.ps-tip > span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 3px 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.78);
  font-size: 9px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.06em;
}

.ps-tip p { margin-top: 9px !important; }

/* Instinct / passive */

.ps-block-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.ps-variants { display: inline-flex; gap: 4px; }

.ps-variant {
  border: 0;
  background: rgba(0, 0, 0, 0.32);
  color: rgba(255, 255, 255, 0.68);
  border-radius: 999px;
  padding: 4px 7px;
  font-size: 9px;
  line-height: 1;
}

.ps-variant:hover { color: #fff; background: rgba(255, 255, 255, 0.09); }

.ps-variant.is-active {
  background: rgba(0, 0, 0, 0.72);
  color: #fff;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.3);
}

/* Unique + highlight */

.ps-skill-pair {
  display: grid;
  grid-template-columns: 1.617fr 1fr;
  gap: 12px;
}

.ps-unique h3 { display: flex; align-items: center; gap: 8px; }
.ps-unique h3 img { width: 20px; height: 20px; object-fit: contain; }
.ps-highlight h3 { height: 20px; display: flex; align-items: center; }

/* Recommended / innate */

.ps-recommended ul,
.ps-innate ul {
  list-style: none;
  margin: 7px 0 0;
  padding: 0;
}

.ps-recommended li,
.ps-innate li {
  display: grid;
  grid-template-columns: 28px 20px 116px minmax(0, 1fr);
  align-items: start;
  gap: 8px;
  padding: 9px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.045);
}

.ps-recommended li:first-child,
.ps-innate li:first-child { border-top: 0; padding-top: 2px; }

.ps-prio {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 18px;
  margin-top: 1px;
  border-radius: 4px;
  background: #232326;
  color: rgba(255, 255, 255, 0.38);
  font-size: 8.5px;
  font-weight: 600;
  line-height: 1;
}

.ps-recommended li[data-priority="3"] .ps-prio { color: #e99292; }
.ps-recommended li[data-priority="2"] .ps-prio { color: rgba(114, 165, 224, 0.95); }

.ps-recommended li[data-priority="3"] .ps-skill-name { color: #e99292; }
.ps-recommended li[data-priority="2"] .ps-skill-name { color: rgba(114, 165, 224, 0.9); }
.ps-recommended li[data-priority="1"] .ps-skill-name { color: rgba(255, 255, 255, 0.82); }
.ps-recommended li[data-priority="0"] .ps-skill-name { color: rgba(255, 255, 255, 0.4); }

.ps-innate-lv {
  font-size: 9.5px;
  line-height: 20px;
  color: rgba(255, 255, 255, 0.36);
  white-space: nowrap;
}

.ps-skill-icon {
  width: 19px;
  height: 19px;
  object-fit: contain;
  margin-top: 1px;
}

.ps-skill-name {
  font-size: 12px;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.9);
  overflow-wrap: anywhere;
}

.ps-skill-desc {
  font-size: 11.5px;
  line-height: 1.58;
  color: rgba(255, 255, 255, 0.69);
  overflow-wrap: anywhere;
}

/* ------------------------------- browser ------------------------------- */

.ps-browse {
  position: sticky;
  top: 16px;
  display: flex;
  flex-direction: column;
  height: calc(100vh - 32px);
  max-height: 980px;
  min-height: 0;
  background: #18181a;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  overflow: hidden;
}

.ps-browse-top {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 12px 0;
}

.ps-search-wrap { position: relative; flex: 1; min-width: 0; }

.ps-search-wrap svg {
  position: absolute;
  left: 10px;
  top: 50%;
  width: 15px;
  height: 15px;
  transform: translateY(-50%);
  color: rgba(255, 255, 255, 0.4);
  pointer-events: none;
}

.ps-search {
  width: 100%;
  height: 34px;
  padding: 0 10px 0 31px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  background: #222226;
  color: #fff;
  font-size: 11px;
  outline: none;
  appearance: none;
}

.ps-search::placeholder { color: rgba(255, 255, 255, 0.38); }
.ps-search:focus { border-color: rgba(230, 0, 18, 0.55); }
.ps-search::-webkit-search-cancel-button { filter: invert(1); opacity: 0.5; }

.ps-sort-wrap { position: relative; flex: none; }

.ps-sort-wrap::after {
  content: "";
  position: absolute;
  right: 9px;
  top: 50%;
  width: 6px;
  height: 6px;
  border-right: 1.5px solid rgba(255, 255, 255, 0.55);
  border-bottom: 1.5px solid rgba(255, 255, 255, 0.55);
  transform: translateY(-70%) rotate(45deg);
  pointer-events: none;
}

.ps-sort {
  height: 34px;
  padding: 0 24px 0 10px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  background: #222226;
  color: rgba(255, 255, 255, 0.72);
  font-size: 11px;
  outline: none;
  appearance: none;
  cursor: pointer;
}

.ps-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;
}

.ps-browse-sub {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 12px;
  margin-top: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.ps-count { font-size: 10.5px; color: rgba(255, 255, 255, 0.42); }

.ps-filter-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 0;
  background: transparent;
  color: rgba(255, 255, 255, 0.55);
  font-size: 10.5px;
  padding: 3px 2px;
}

.ps-filter-btn:hover { color: #fff; }
.ps-filter-btn svg { width: 12px; height: 12px; }

.ps-active-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  padding: 0 12px;
}

.ps-active-filters:empty { display: none; }
.ps-active-filters:not(:empty) { padding-top: 8px; }

.ps-filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border: 1px solid rgba(230, 0, 18, 0.32);
  border-radius: 999px;
  background: rgba(230, 0, 18, 0.1);
  color: rgba(255, 255, 255, 0.8);
  font-size: 9.5px;
  line-height: 1;
  padding: 4px 7px;
  cursor: pointer;
}

.ps-filter-chip:hover { border-color: rgba(230, 0, 18, 0.6); color: #fff; }
.ps-filter-chip img { width: 12px; height: 12px; object-fit: contain; }

.ps-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 13px 10px;
  align-content: start;
  padding: 12px;
  overflow-y: auto;
  min-height: 0;
  flex: 1;
}

.ps-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  min-width: 0;
  padding: 0;
  border: 0;
  background: none;
  color: rgba(255, 255, 255, 0.86);
  text-decoration: none;
  text-align: center;
}

.ps-card:hover { color: #fff; }

.ps-card-art {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 0.68;
  border-radius: 8px;
  overflow: hidden;
  background: #0c0c0e;
  isolation: isolate;
  box-shadow: 0 2px 7px rgba(0, 0, 0, 0.38);
  transition: box-shadow 0.16s ease;
}

.ps-card-art > img { position: absolute; display: block; }

.ps-card-frame {
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
}

.ps-card-img {
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 2;
  transition: transform 0.25s ease;
}

.ps-card-star {
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 3;
  pointer-events: none;
}

.ps-card-pos {
  top: 2px;
  left: 2px;
  width: 15px;
  height: 15px;
  object-fit: contain;
  z-index: 5;
}

.ps-card-el {
  top: 0;
  left: 50%;
  width: 12%;
  height: auto;
  min-width: 11px;
  transform: translateX(-50%);
  object-fit: contain;
  z-index: 5;
}

.ps-card-rainbow {
  top: 2px;
  right: 2px;
  width: 17%;
  height: auto;
  z-index: 6;
}

.ps-card-tier {
  position: absolute;
  top: 12px;
  right: 0;
  z-index: 6;
  padding: 2px 5px;
  border-radius: 3px 0 0 3px;
  background: #9aa4af;
  color: #fff;
  font-size: 8.5px;
  font-weight: 800;
  line-height: 1;
  box-shadow: -2px 2px 4px rgba(0, 0, 0, 0.24);
}

.ps-card-tier.tier-s { background: linear-gradient(45deg, #cbebea, #e0b1f2, #cbebea, #e8baf9); color: #111; }
.ps-card-tier.tier-a { background: linear-gradient(45deg, #efd16e, #fef0a2); color: #111; }
.ps-card-tier.tier-b { background: #9aa4af; color: #fff; }
.ps-card-tier.tier-c { background: #8d6e63; color: #fff; }

.ps-card:hover .ps-card-img { transform: scale(1.05); }

.ps-card.is-selected .ps-card-art {
  box-shadow: 0 0 0 2px #ff1a1a, 0 0 15px rgba(255, 0, 0, 0.32);
}

.ps-card.is-selected .ps-card-name { color: #fff; }

.ps-card-name {
  display: block;
  width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 10.5px;
  line-height: 1.3;
  color: rgba(255, 255, 255, 0.82);
}

.ps-empty {
  margin: 0;
  padding: 16px 14px 22px;
  color: rgba(255, 255, 255, 0.45);
  font-size: 11.5px;
  text-align: center;
}

.ps-source { margin-top: 18px; }

/* ------------------------------- filter modal ------------------------------- */

.ps-modal[hidden] { display: none; }

.ps-modal {
  position: fixed;
  inset: 0;
  z-index: 220;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.ps-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.68);
  backdrop-filter: blur(2px);
}

.ps-modal-dialog {
  position: relative;
  display: flex;
  flex-direction: column;
  width: min(680px, 100%);
  max-height: min(82vh, 720px);
  background: #1b1b1d;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 12px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.62);
  overflow: hidden;
}

.ps-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.ps-modal-head h3 { margin: 0; font-size: 15px; font-weight: 600; }

.ps-modal-close {
  border: 0;
  background: transparent;
  color: rgba(255, 255, 255, 0.55);
  font-size: 24px;
  line-height: 1;
  padding: 0 3px;
}

.ps-modal-close:hover { color: #fff; }

.ps-modal-body {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 16px 18px;
  overflow-y: auto;
}

.ps-filter-group h4 {
  margin: 0 0 8px;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(255, 255, 255, 0.4);
}

.ps-filter-opts { display: flex; flex-wrap: wrap; gap: 7px; }

.ps-filter-opt {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 9px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 7px;
  background: #222226;
  color: rgba(255, 255, 255, 0.74);
  font-size: 10.5px;
  line-height: 1;
  cursor: pointer;
  user-select: none;
}

.ps-filter-opt input { display: none; }
.ps-filter-opt img { width: 15px; height: 15px; object-fit: contain; }

.ps-filter-opt:hover { border-color: rgba(255, 255, 255, 0.2); color: #fff; }

.ps-filter-opt:has(input:checked) {
  border-color: rgba(230, 0, 18, 0.55);
  background: rgba(230, 0, 18, 0.13);
  color: #fff;
}

.ps-filter-stars { display: inline-flex; gap: 1px; }
.ps-filter-stars img { width: 11px; height: 11px; }

.ps-modal-foot {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  padding: 12px 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
}

.ps-btn-ghost,
.ps-btn-red {
  border-radius: 7px;
  padding: 8px 14px;
  font-size: 11px;
  font-weight: 600;
}

.ps-btn-ghost {
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: transparent;
  color: rgba(255, 255, 255, 0.7);
}

.ps-btn-ghost:hover { color: #fff; border-color: rgba(255, 255, 255, 0.28); }

.ps-btn-red {
  border: 1px solid rgba(230, 0, 18, 0.6);
  background: var(--red);
  color: #fff;
}

.ps-btn-red:hover { background: #ff2030; }

/* ------------------------------- responsive ------------------------------- */

@media (max-width: 1280px) {
  .ps-page { grid-template-columns: minmax(0, 1fr) 340px; }
  .ps-skill-pair { grid-template-columns: 1.4fr 1fr; }
  .ps-recommended li,
  .ps-innate li { grid-template-columns: 26px 19px 102px minmax(0, 1fr); }
}

@media (max-width: 1100px) {
  .ps-page { grid-template-columns: minmax(0, 1fr); }
  .ps-browse {
    position: relative;
    top: 0;
    height: auto;
    max-height: none;
    order: -1;
  }
  .ps-grid {
    grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
    overflow-y: auto;
    max-height: 56vh;
    flex: none;
    overscroll-behavior: contain;
  }
  .ps-detail { order: 0; }
}

@media (max-width: 720px) {
  .ps-detail-head { flex-wrap: wrap; gap: 8px; }
  .ps-name { font-size: 22px; }
  .ps-level { padding-top: 0; }
  .ps-skill-pair { grid-template-columns: 1fr; }
  .ps-block { padding: 13px 14px; }
  .ps-recommended li,
  .ps-innate li { grid-template-columns: 24px 18px 92px minmax(0, 1fr); gap: 6px; }
  .ps-browse { border-radius: 10px; }
  .ps-grid { grid-template-columns: repeat(auto-fill, minmax(86px, 1fr)); gap: 11px 8px; padding: 10px; max-height: 50vh; }
  .ps-search { font-size: 11px; }
}

@media (max-width: 520px) {
  .ps-recommended li,
  .ps-innate li {
    grid-template-columns: 24px 18px minmax(0, 1fr);
  }
  .ps-skill-desc { grid-column: 3; }
  .ps-name { font-size: 20px; }
}

/* ------------------------------- pull planner ------------------------------- */
.pp-shell { max-width: 1180px; margin: 0 auto; display: flex; flex-direction: column; gap: 16px; }
.pp-guide { background: linear-gradient(180deg, rgba(230, 0, 18, 0.07), transparent 70%), var(--card); border: 1px solid var(--line); border-left: 3px solid var(--red); border-radius: 10px; overflow: hidden; }
.pp-guide summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px; }
.pp-guide summary::-webkit-details-marker { display: none; }
.pp-guide summary span { font-size: 12.5px; font-weight: 700; letter-spacing: 0.09em; text-transform: uppercase; color: #fff; }
.pp-guide summary b { font-size: 11.5px; color: var(--txt-3); font-weight: 500; }
.pp-guide summary::after { content: '⌄'; color: var(--txt-3); font-size: 15px; line-height: 1; }
.pp-guide[open] summary::after { transform: rotate(180deg); }
.pp-guide-body { padding: 0 18px 16px; }
.pp-guide-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 24px; }
.pp-guide-grid h3 { margin: 0 0 4px; font-size: 11.5px; color: var(--red-soft); text-transform: uppercase; letter-spacing: 0.08em; }
.pp-guide-grid p { margin: 0; font-size: 12.5px; line-height: 1.55; color: var(--txt-2); }
.pp-disclaimer { margin: 14px 0 0; padding-top: 12px; border-top: 1px dashed var(--line); font-size: 12px; color: var(--txt-3); }
.pp-top-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.pp-card { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 16px; min-width: 0; }
.pp-card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 12px; }
.pp-card-head h2 { margin: 0; font-size: 14px; letter-spacing: 0.02em; }
.pp-card-head p { margin: 3px 0 0; font-size: 11.5px; color: var(--txt-3); }
.pp-badge, .pp-pill { font-size: 9.5px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--red-soft); border: 1px solid rgba(230, 0, 18, 0.35); background: rgba(230, 0, 18, 0.1); padding: 4px 8px; border-radius: 999px; white-space: nowrap; }
.pp-pill { color: var(--txt-3); border-color: var(--line); background: var(--card-2); }
.pp-res-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.pp-res { display: flex; flex-direction: column; gap: 6px; background: var(--card-2); border: 1px solid var(--line); border-radius: 8px; padding: 10px 11px; }
.pp-res-label { display: flex; align-items: center; gap: 7px; font-size: 11px; color: var(--txt-2); }
.pp-res input, .pp-field input, .pp-field select, .pp-extra-grid input { width: 100%; background: #1d1d1d; border: 1px solid var(--line); border-radius: 6px; color: #fff; padding: 8px 9px; font: inherit; font-size: 13px; }
.pp-res input:focus, .pp-field input:focus, .pp-field select:focus, .pp-extra-grid input:focus, .pp-row-pulls input:focus { outline: none; border-color: rgba(255, 119, 119, 0.55); box-shadow: 0 0 0 2px rgba(230, 0, 18, 0.12); }
.pp-res-note { margin: 10px 0 0; font-size: 11.5px; color: var(--txt-3); }
.pp-res-note b { color: #7ee0a0; }
.pp-ico { width: 18px; height: 18px; display: inline-block; flex: none; object-fit: contain; vertical-align: -3px; }
.pp-ico-xs { width: 12px; height: 12px; vertical-align: -2px; }
.pp-field { display: flex; flex-direction: column; gap: 5px; font-size: 11px; color: var(--txt-3); }
.pp-field-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 10px 0; }
.pp-check { display: inline-flex; align-items: center; gap: 7px; font-size: 11.5px; color: var(--txt-2); margin: 6px 0; cursor: pointer; }
.pp-check input { accent-color: var(--red); }
.pp-hint { margin: 8px 0 0; font-size: 11px; color: var(--txt-3); line-height: 1.45; }
.pp-hint-inline { color: var(--txt-3); font-size: 10.5px; }
.pp-pity-row { margin: 10px 0 4px; }
.pp-pity-label { display: flex; justify-content: space-between; font-size: 11.5px; color: var(--txt-2); margin-bottom: 4px; }
.pp-pity-label b { color: #fff; font-variant-numeric: tabular-nums; }
.pp-pity-row input[type="range"] { width: 100%; accent-color: var(--red); }
.pp-extra-grid { display: grid; grid-template-columns: 86px repeat(4, minmax(0, 1fr)); gap: 8px; align-items: center; }
.pp-extra-grid > span { font-size: 9.5px; color: var(--txt-3); text-transform: uppercase; letter-spacing: 0.04em; text-align: center; }
.pp-extra-grid > span.pp-extra-period { text-align: left; text-transform: none; font-size: 11.5px; color: var(--txt-2); letter-spacing: 0; }
.pp-extra-grid input { padding: 7px 6px; font-size: 12px; text-align: right; }
.pp-section { display: flex; flex-direction: column; gap: 10px; }
.pp-section-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; flex-wrap: wrap; }
.pp-section-head h2 { margin: 0; font-size: 15px; }
.pp-section-head p { margin: 3px 0 0; font-size: 11.5px; color: var(--txt-3); }
.pp-section-tools { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.pp-schedule { display: flex; gap: 10px; overflow-x: auto; padding: 2px 2px 8px; scroll-snap-type: x proximity; }
.pp-sched-card { flex: 0 0 148px; scroll-snap-align: start; display: flex; flex-direction: column; gap: 4px; text-align: left; background: var(--card); border: 1px solid var(--line); border-radius: 9px; padding: 8px; color: var(--txt); cursor: pointer; transition: border-color 0.15s, transform 0.15s, background 0.15s; }
.pp-sched-card:hover { transform: translateY(-2px); border-color: rgba(255, 119, 119, 0.55); }
.pp-sched-card.is-planned { border-color: rgba(230, 0, 18, 0.65); background: linear-gradient(180deg, rgba(230, 0, 18, 0.12), transparent), var(--card); }
.pp-sched-top { display: flex; justify-content: space-between; font-size: 9.5px; color: var(--txt-3); }
.pp-sched-version { color: var(--red-soft); font-weight: 700; }
.pp-sched-art { position: relative; height: 78px; border-radius: 6px; overflow: hidden; background: #1b1b1b; display: flex; align-items: flex-end; justify-content: center; }
.pp-sched-art img { width: 100%; height: 100%; object-fit: contain; object-position: bottom; }
.pp-sched-spoiler, .pp-sched-current { position: absolute; top: 4px; left: 4px; font-size: 8px; font-weight: 800; letter-spacing: 0.06em; padding: 2px 4px; border-radius: 3px; background: rgba(0, 0, 0, 0.7); color: #ffd477; }
.pp-sched-current { left: auto; right: 4px; color: #7ee0a0; }
.pp-sched-name { font-size: 11.5px; font-weight: 700; line-height: 1.2; }
.pp-sched-code { font-size: 9.5px; color: var(--txt-3); line-height: 1.2; min-height: 12px; }
.pp-sched-chips { display: flex; flex-wrap: wrap; gap: 3px; min-height: 14px; }
.pp-chip { display: inline-flex; align-items: center; gap: 3px; font-size: 8.5px; color: var(--chip, var(--txt-3)); background: rgba(255, 255, 255, 0.04); border: 1px solid var(--line); border-radius: 999px; padding: 1px 4px; }
.pp-chip img { width: 9px; height: 9px; }
.pp-chip-role { color: var(--txt-3); }
.pp-sched-pulls { font-size: 11px; font-weight: 700; color: #fff; margin-top: 2px; }
.pp-rank-ico { width: 11px; height: 11px; object-fit: contain; vertical-align: -1px; margin-right: 1px; }
.pp-sched-cost { display: inline-flex; align-items: center; gap: 3px; font-size: 9.5px; color: var(--txt-3); }
.pp-sched-status { margin-top: 2px; font-size: 8.5px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; }
.pp-sched-status.is-ok { color: #7ee0a0; }
.pp-sched-status.is-short { color: #ff8b8b; }
.pp-sched-status.is-planned { color: var(--red-soft); }
.pp-schedule-empty { margin: 0; padding: 24px; color: var(--txt-3); font-size: 12px; text-align: center; width: 100%; }
.pp-graph-card { padding-bottom: 10px; }
.pp-legend { display: inline-flex; align-items: center; gap: 6px; font-size: 10px; color: var(--txt-3); }
.pp-legend i { width: 18px; height: 3px; border-radius: 2px; background: linear-gradient(90deg, #7ee0a0, #ff6b6b); }
.pp-graph svg { display: block; width: 100%; height: auto; }
.pp-grid-line { stroke: rgba(255, 255, 255, 0.07); stroke-width: 1; }
.pp-zero-line { stroke: rgba(255, 255, 255, 0.3); stroke-width: 1; stroke-dasharray: 4 4; }
.pp-axis-label { fill: var(--txt-3); font-size: 10px; font-family: inherit; }
.pp-graph-dot { stroke: #141414; stroke-width: 1.4; }
.pp-graph-target { cursor: help; }
.pp-graph-target circle:first-of-type { transition: stroke 0.15s; }
.pp-graph-target:hover circle:first-of-type { stroke: #ff8b8b; }
.pp-graph-target:focus { outline: none; }
.pp-graph-target:focus circle:first-of-type { stroke: #ff8b8b; }
.pp-graph-tip {
  position: fixed;
  z-index: 80;
  max-width: 260px;
  padding: 7px 10px;
  border-radius: 7px;
  border: 1px solid rgba(230, 0, 18, 0.55);
  background: rgba(12, 12, 12, 0.97);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.55);
  color: #fff;
  font-size: 11.5px;
  line-height: 1.35;
  pointer-events: none;
}
.pp-graph-tip[hidden] { display: none; }
.pp-graph-tip b { display: block; font-size: 12px; }
.pp-graph-tip small { display: block; margin-top: 2px; color: var(--txt-2); font-size: 10.5px; }
.pp-graph-stem { stroke: rgba(255, 255, 255, 0.22); stroke-width: 1; stroke-dasharray: 2 3; }
.pp-graph-note { margin: 4px 0 0; font-size: 10.5px; color: var(--txt-3); text-align: center; }
.pp-graph-note b { color: var(--txt-2); }
.pp-plan { display: flex; flex-direction: column; gap: 8px; }
.pp-row { display: grid; grid-template-columns: 44px minmax(150px, 1.4fr) 58px 82px 146px 58px 58px 92px 28px; gap: 10px; align-items: center; background: var(--card); border: 1px solid var(--line); border-radius: 9px; padding: 9px 11px; }
.pp-row.is-short { border-color: rgba(230, 0, 18, 0.35); }
.pp-row-art { width: 40px; height: 40px; border-radius: 7px; background: #1b1b1b; overflow: hidden; display: flex; align-items: flex-end; justify-content: center; }
.pp-row-art img { width: 100%; height: 100%; object-fit: contain; }
.pp-row-id { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.pp-row-id strong { font-size: 12.5px; }
.pp-row-id small { font-size: 10px; color: var(--txt-3); }
.pp-row-chips { display: flex; gap: 3px; flex-wrap: wrap; margin-top: 2px; }
.pp-row-pity, .pp-row-stat, .pp-row-aware { display: flex; flex-direction: column; gap: 1px; }
.pp-row-pity small, .pp-row-stat small, .pp-row-pulls small, .pp-row-aware small { font-size: 9px; color: var(--txt-3); text-transform: uppercase; letter-spacing: 0.04em; }
.pp-row-pity b, .pp-row-stat b { font-size: 12px; font-variant-numeric: tabular-nums; }
.pp-row-pulls input, .pp-row-aware select { width: 100%; background: #1d1d1d; border: 1px solid var(--line); border-radius: 5px; color: #fff; padding: 5px 6px; font: inherit; font-size: 12px; text-align: center; }
.pp-row-pulls input:focus, .pp-row-aware select:focus { outline: none; border-color: rgba(255, 119, 119, 0.55); box-shadow: 0 0 0 2px rgba(230, 0, 18, 0.12); }
.pp-row-aware .awareness-picks { gap: 2px; }
.pp-row-aware .awareness-pick { width: 18px; height: 24px; border-radius: 4px; }
.pp-row-aware .awareness-pick img { width: 12px; height: 12px; }
.pp-row-aware .awareness-pick span { font-size: 6.5px; }
.pp-after { background: rgba(126, 224, 160, 0.06); border: 1px solid rgba(126, 224, 160, 0.18); border-radius: 6px; padding: 4px 6px; }
.pp-after.is-short { background: rgba(230, 0, 18, 0.1); border-color: rgba(230, 0, 18, 0.35); }
.pp-after em { display: inline-flex; align-items: center; gap: 2px; font-style: normal; font-size: 9px; color: var(--txt-3); }
.pp-row-remove { border: 0; background: none; color: var(--txt-3); font-size: 18px; line-height: 1; cursor: pointer; padding: 2px; }
.pp-row-remove:hover { color: #ff7b7b; }
.pp-empty { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 34px 18px; border: 1px dashed var(--line); border-radius: 10px; text-align: center; background: rgba(255, 255, 255, 0.015); }
.pp-empty[hidden] { display: none; }
.pp-empty h2 { margin: 2px 0 0; font-size: 16px; }
.pp-empty p { margin: 0; max-width: 46ch; font-size: 12px; color: var(--txt-3); }
.pp-add-dialog { width: min(900px, calc(100vw - 28px)); }
.pp-add-dialog .prog-picker { max-height: min(56vh, 520px); overflow: auto; }
.prog-pick.is-planned { opacity: 0.5; }
@media (max-width: 900px) {
  .pp-top-grid { grid-template-columns: 1fr; }
  .pp-row { grid-template-columns: 40px minmax(140px, 1fr) 54px 78px 146px 54px 54px 82px 26px; gap: 8px; }
}
@media (max-width: 760px) {
  .pp-guide-grid { grid-template-columns: 1fr; }
  .pp-res-grid { grid-template-columns: 1fr; }
  .pp-field-grid { grid-template-columns: 1fr; }
  .pp-extra-grid { grid-template-columns: 64px repeat(4, minmax(0, 1fr)); gap: 6px; }
  .pp-extra-grid > span { font-size: 9px; }
  .pp-row { grid-template-columns: 36px minmax(100px, 1fr) 62px 146px 78px 26px; }
  .pp-row-pity, .pp-row-stat:not(.pp-after) { display: none; }
}
@media (max-width: 560px) {
  .pp-guide summary b { display: none; }
  .pp-row {
    grid-template-columns: 36px minmax(0, 1fr) 80px 26px;
    grid-template-areas:
      "art id id remove"
      "art pulls aware remove"
      "art after after remove";
    gap: 6px 8px;
    align-items: center;
  }
  .pp-row-art { grid-area: art; width: 36px; height: 36px; align-self: center; }
  .pp-row-id { grid-area: id; }
  .pp-row-pulls { grid-area: pulls; }
  .pp-row-aware { grid-area: aware; }
  .pp-after { grid-area: after; }
  .pp-row-remove { grid-area: remove; align-self: center; }
}
@media (max-width: 460px) {
  .pp-sched-card { flex-basis: 136px; }
  .pp-extra-grid { grid-template-columns: 54px repeat(4, minmax(0, 1fr)); }
  .pp-extra-grid input { padding: 6px 3px; font-size: 11px; }
}

/* ------------------------- future schedule (CN server) --------------------- */
.fs-warning-strip {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin: 14px 0 18px;
  padding: 12px 14px;
  border: 1px solid rgba(230, 0, 18, 0.38);
  border-left: 3px solid var(--red);
  border-radius: 10px;
  background: linear-gradient(90deg, rgba(230, 0, 18, 0.12), rgba(230, 0, 18, 0.03));
}
.fs-warning-badge {
  flex: none;
  padding: 3px 7px;
  border-radius: 4px;
  background: var(--red);
  color: #fff;
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 0.08em;
}
.fs-warning-strip p { flex: 1; margin: 0; color: var(--txt-2); font-size: 12.5px; line-height: 1.55; }
.fs-warning-strip b { color: var(--txt); }
.fs-warning-btn {
  flex: none;
  padding: 5px 9px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--txt-2);
  font: inherit;
  font-size: 11px;
  cursor: pointer;
}
.fs-warning-btn:hover { color: #fff; border-color: rgba(255, 255, 255, 0.32); }

.fs-overview {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 0 0 18px;
}
.fs-stat {
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--card);
}
.fs-stat span {
  display: block;
  color: var(--txt-3);
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}
.fs-stat b { display: block; margin: 4px 0 1px; font-size: 18px; line-height: 1.15; }
.fs-stat small { color: var(--txt-3); font-size: 10.5px; }

.fs-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin: 0 0 14px;
}
.fs-filters { display: flex; flex-wrap: wrap; gap: 6px; }
.fs-filter {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--card);
  color: var(--txt-2);
  font: inherit;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
}
.fs-filter span {
  padding: 1px 5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
  color: var(--txt-3);
  font-size: 9.5px;
}
.fs-filter:hover { border-color: rgba(255, 255, 255, 0.2); color: #fff; }
.fs-filter.is-active { border-color: rgba(230, 0, 18, 0.55); background: rgba(230, 0, 18, 0.13); color: #fff; }
.fs-filter.is-active span { background: rgba(230, 0, 18, 0.25); color: #ffd2d2; }
.fs-source { color: var(--txt-3); font-size: 10.5px; }
.fs-source a { color: var(--red-soft); }

.fs-released-note {
  margin: 0 0 12px;
  padding: 9px 11px;
  border: 1px solid rgba(90, 220, 140, 0.22);
  border-radius: 8px;
  background: rgba(90, 220, 140, 0.06);
  color: var(--txt-2);
  font-size: 11.5px;
}
.fs-released-note[hidden] { display: none; }

.fs-list { display: flex; flex-direction: column; gap: 12px; }
.fs-card {
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-left: 3px solid rgba(255, 255, 255, 0.13);
  border-radius: 12px;
  background: var(--card);
}
.fs-card[hidden] { display: none; }
.fs-card.fs-status-upcoming { border-left-color: var(--red); }
.fs-card.fs-status-pending { border-left-color: var(--gold); }
.fs-card-head { display: flex; align-items: flex-start; gap: 8px; flex-wrap: wrap; }
.fs-version { font-size: 19px; font-weight: 800; line-height: 1.1; }
.fs-chip {
  display: inline-flex;
  align-items: center;
  padding: 3px 7px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--txt-2);
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
}
.fs-chip-cn { border-color: rgba(90, 190, 255, 0.35); background: rgba(60, 150, 220, 0.12); color: #8ed8ff; }
.fs-chip-cn.is-muted { border-color: var(--line); background: rgba(255, 255, 255, 0.03); color: var(--txt-3); }
.fs-status-badge {
  margin-top: 3px;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--txt-2);
  font-size: 8.5px;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}
.fs-status-upcoming .fs-status-badge { background: var(--red); color: #fff; }
.fs-status-pending .fs-status-badge { background: rgba(255, 176, 32, 0.16); color: var(--gold); }
.fs-card.fs-status-released { border-left-color: rgba(90, 220, 140, 0.45); }
.fs-status-released .fs-status-badge { background: rgba(90, 220, 140, 0.14); color: #7be3a2; }
.fs-when { margin-left: auto; text-align: right; color: var(--txt-2); font-size: 11.5px; }
.fs-when time { display: block; color: var(--txt); font-weight: 700; }
.fs-when small { display: block; color: var(--txt-3); font-size: 10px; }

.fs-characters {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 8px;
  margin: 12px 0 0;
}
.fs-char {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: rgba(0, 0, 0, 0.18);
}
.fs-char-art {
  position: relative;
  flex: none;
  width: 64px;
  aspect-ratio: 5 / 6;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: radial-gradient(circle at 50% 18%, rgba(255, 255, 255, 0.08), transparent 62%), #151515;
}
.fs-char-img {
  position: absolute;
  inset: 2%;
  width: 96%;
  height: 96%;
  object-fit: contain;
  object-position: center;
  display: block;
}
.fs-char-fallback {
  font-size: 24px;
  font-weight: 800;
  color: var(--el, #aaa);
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.6);
  opacity: 0.75;
}
.fs-char-info { flex: 1; min-width: 0; }
.fs-char-top { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.fs-char-name { font-size: 14px; font-weight: 700; }
.fs-char-code { color: var(--txt-3); font-size: 9.5px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }
.fs-char-chips { display: flex; gap: 5px; flex-wrap: wrap; margin-top: 6px; }
.fs-char-persona { display: block; margin-top: 5px; color: var(--txt-3); font-size: 10.5px; }

.fs-tags { display: flex; gap: 6px; flex-wrap: wrap; margin: 10px 0 0; }
.fs-tag {
  padding: 3px 7px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.035);
  color: var(--txt-2);
  font-size: 10px;
  font-weight: 600;
}
.fs-tag-note { border-color: rgba(255, 176, 32, 0.3); color: var(--gold); }

.fs-details {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 8px 18px;
  margin: 12px 0 0;
}
.fs-detail { display: flex; align-items: flex-start; gap: 8px; min-width: 0; }
.fs-detail dt {
  flex: none;
  min-width: 92px;
  padding-top: 2px;
  color: var(--txt-3);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.fs-detail dd { display: flex; flex-wrap: wrap; gap: 4px; margin: 0; }
.fs-pill {
  padding: 2px 7px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.045);
  color: var(--txt-2);
  font-size: 10.5px;
}
.fs-no-char { margin: 10px 0 0; color: var(--txt-3); font-size: 12px; font-style: italic; }
.fs-empty { margin: 16px 0; color: var(--txt-3); font-size: 12.5px; text-align: center; }
.fs-empty[hidden] { display: none; }
.fs-about { margin-top: 20px; }
.fs-about p { font-size: 12.5px; color: var(--txt-2); }
.fs-about a { color: var(--red-soft); }

.fs-gate {
  position: fixed;
  inset: 0;
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.fs-gate[hidden] { display: none; }
.fs-gate-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.84);
  backdrop-filter: blur(4px);
}
.fs-gate-dialog {
  position: relative;
  width: min(560px, 100%);
  padding: 26px 26px 22px;
  border: 1px solid rgba(230, 0, 18, 0.45);
  border-radius: 14px;
  background:
    linear-gradient(180deg, rgba(230, 0, 18, 0.1), transparent 34%),
    #1b1b1d;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.72);
}
.fs-gate-kicker {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 4px;
  background: var(--red);
  color: #fff;
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 0.1em;
}
.fs-gate-dialog h2 { margin: 10px 0; font-size: 23px; line-height: 1.15; }
.fs-gate-dialog p { margin: 0 0 14px; color: var(--txt-2); font-size: 12.5px; line-height: 1.6; }
.fs-gate-dialog p b { color: var(--txt); }
.fs-gate-list { margin: 0 0 20px; padding-left: 18px; color: var(--txt-2); font-size: 12px; }
.fs-gate-list li { margin: 5px 0; }
.fs-gate-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.fs-gate-foot { margin: 13px 0 0; color: var(--txt-3); font-size: 10.5px; }
body.fs-gate-open { overflow: hidden; }

@media (max-width: 700px) {
  .fs-overview { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fs-when { margin-left: 0; text-align: left; }
  .fs-warning-strip { flex-wrap: wrap; }
  .fs-gate-dialog { padding: 20px 18px 18px; }
  .fs-gate-dialog h2 { font-size: 20px; }
}

/* ============================== wonder guide ============================== */

.wonder-section { scroll-margin-top: 18px; margin-bottom: 34px; }
.wonder-section:last-of-type { margin-bottom: 18px; }

.wonder-hero {
  display: grid;
  grid-template-columns: 216px minmax(0, 1fr);
  background:
    linear-gradient(115deg, rgba(230, 0, 18, 0.14), transparent 46%),
    var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  position: relative;
  margin-bottom: 30px;
}
.wonder-hero::after {
  content: '';
  position: absolute;
  right: -70px;
  top: -80px;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(230, 0, 18, 0.18), transparent 66%);
  pointer-events: none;
}
.wonder-hero-art {
  position: relative;
  min-height: 258px;
  background:
    radial-gradient(circle at 50% 30%, rgba(255, 119, 119, 0.2), transparent 62%),
    #191919;
  overflow: hidden;
}
.wonder-hero-art img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
}
.wonder-hero-art::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent 55%, var(--card) 99%);
  pointer-events: none;
}
.wonder-hero-copy {
  position: relative;
  z-index: 1;
  padding: 24px 26px 22px 2px;
}
.wonder-kicker {
  display: inline-block;
  background: var(--red);
  color: #fff;
  border-radius: 4px;
  padding: 3px 8px;
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 0.11em;
}
.wonder-hero-copy h2 {
  margin: 10px 0 8px;
  font-size: 25px;
  line-height: 1.12;
  letter-spacing: -0.03em;
}
.wonder-hero-copy > p {
  margin: 0;
  max-width: 70ch;
  font-size: 13.5px;
  line-height: 1.65;
  color: var(--txt-2);
}
.wonder-hero-copy > p strong { color: rgba(255, 255, 255, 0.9); }
.wonder-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 15px 0 17px;
}
.wonder-jump { display: flex; flex-wrap: wrap; gap: 8px; }
.wonder-jump .btn { padding: 8px 14px; font-size: 12px; }

.wonder-prose { margin-bottom: 16px; }

.guide-figure {
  margin: 0 0 16px;
  background: #161616;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.guide-figure img {
  display: block;
  width: 100%;
  height: auto;
}
.guide-figure figcaption {
  padding: 9px 13px;
  border-top: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.2);
  color: var(--txt-3);
  font-size: 11.5px;
  line-height: 1.5;
}
.guide-figure-hero { border-color: rgba(230, 0, 18, 0.4); }

.schema-legend {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}
.schema-legend-item {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 13px 15px;
}
.schema-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  flex: none;
  margin-top: 2px;
}
.schema-legend-item.red .schema-dot { background: #e0121f; box-shadow: 0 0 0 3px rgba(230, 0, 18, 0.16); }
.schema-legend-item.yellow .schema-dot { background: #f0b429; box-shadow: 0 0 0 3px rgba(240, 180, 41, 0.16); }
.schema-legend-item b { font-size: 13.5px; }
.schema-legend-item p { margin: 3px 0 0; font-size: 12.5px; line-height: 1.5; color: var(--txt-2); }

.schema-steps {
  list-style: none;
  margin: 0 0 20px;
  padding: 0;
  display: grid;
  gap: 8px;
}
.schema-steps li {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  background: var(--card);
  border: 1px solid var(--line);
  border-left: 3px solid rgba(230, 0, 18, 0.55);
  border-radius: var(--radius-sm);
  padding: 12px 15px;
}
.schema-step-rank {
  flex: none;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--red);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 800;
}
.schema-steps b { font-size: 13.5px; }
.schema-steps p { margin: 3px 0 0; font-size: 12.5px; line-height: 1.55; color: var(--txt-2); }

.guide-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  align-items: start;
  margin-bottom: 14px;
}
.guide-note {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  min-width: 0;
}
.guide-note h3 { margin: 0 0 8px; font-size: 15.5px; font-weight: 700; }
.guide-note > p { margin: 0 0 12px; font-size: 13px; line-height: 1.6; color: var(--txt-2); }
.guide-note .guide-figure { margin: 12px 0 0; }
.guide-note .guide-figure + .guide-figure { margin-top: 10px; }
.guide-note-wide { margin-bottom: 14px; }
.guide-note-stack { display: grid; gap: 14px; }
.guide-note-exception { border-color: rgba(240, 180, 41, 0.28); }

.weapon-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}
.weapon-stat {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
}
.weapon-stat b { display: block; font-size: 21px; line-height: 1.1; }
.weapon-stat span {
  display: block;
  margin-top: 2px;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--txt-3);
}
.wonder-filters { margin-bottom: 16px; }

.weapon-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 12px;
}
.weapon-card {
  display: grid;
  grid-template-columns: 128px minmax(0, 1fr);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color 0.15s, transform 0.15s;
}
.weapon-card:hover { border-color: rgba(255, 119, 119, 0.45); }
.weapon-card[hidden] { display: none; }
.weapon-art {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 150px;
  background:
    radial-gradient(circle at 50% 44%, rgba(230, 0, 18, 0.16), transparent 66%),
    #1b1b1d;
  border-right: 1px solid var(--line);
}
.weapon-art img {
  width: 100%;
  height: 150px;
  padding: 8px;
  object-fit: contain;
  filter: drop-shadow(0 8px 18px rgba(0, 0, 0, 0.5));
  transition: transform 0.18s;
}
.weapon-card:hover .weapon-art img { transform: translateY(-2px) scale(1.03); }
.weapon-order {
  position: absolute;
  top: 7px;
  left: 9px;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.35);
  text-transform: uppercase;
}
.weapon-body {
  min-width: 0;
  padding: 12px 14px 13px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.weapon-title { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.weapon-title h3 { margin: 0; font-size: 14.5px; font-weight: 700; }
.weapon-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  color: var(--txt-3);
}
.weapon-source {
  padding: 1px 6px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.78);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.weapon-dot { color: rgba(255, 255, 255, 0.2); }
.weapon-more {
  margin-top: auto;
  padding-top: 8px;
  border-top: 1px dashed var(--line);
}
.weapon-more summary {
  display: flex;
  align-items: center;
  gap: 6px;
  list-style: none;
  cursor: pointer;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--red-soft);
}
.weapon-more summary::-webkit-details-marker { display: none; }
.weapon-more summary::before {
  content: '+';
  width: 15px;
  height: 15px;
  border-radius: 4px;
  border: 1px solid rgba(255, 119, 119, 0.35);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  line-height: 1;
  flex: none;
}
.weapon-more[open] summary::before { content: '−'; }
.weapon-levels-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 10px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--txt-3);
}
.weapon-level-current { color: var(--gold); font-size: 11px; }
.weapon-levels {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin: 6px 0 10px;
}
.weapon-level {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  width: 30px;
  height: 34px;
  padding: 0;
  background: var(--card-2);
  border: 1px solid var(--line);
  border-radius: 6px;
  opacity: 0.68;
  transition: opacity 0.12s, border-color 0.12s, background 0.12s;
}
.weapon-level img { display: block; width: 18px; height: 18px; object-fit: contain; }
.weapon-level span { font-size: 8px; font-weight: 700; letter-spacing: 0.03em; line-height: 1; color: var(--txt-3); }
.weapon-level:hover { opacity: 0.9; border-color: rgba(255, 119, 119, 0.4); }
.weapon-level.is-active {
  opacity: 1;
  border-color: var(--red);
  background: rgba(230, 0, 18, 0.14);
  box-shadow: inset 0 0 0 1px rgba(230, 0, 18, 0.35);
}
.weapon-level.is-active span { color: var(--red-soft); }
.weapon-level.is-active img { animation: awareness-pop 0.18s ease-out; }
.weapon-effect-panels { margin-top: 2px; }
.weapon-effect[hidden] { display: none; }
.weapon-num { color: var(--gold); font-weight: 600; }
.weapon-effect { margin-top: 9px; }
.weapon-effect p { margin: 0 0 7px; font-size: 12px; line-height: 1.6; color: var(--txt-2); }
.weapon-effect p:last-child { margin-bottom: 0; }
.weapon-shard-title {
  margin-top: 10px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--txt-3);
}
.weapon-shards { margin: 5px 0 0; padding-left: 16px; font-size: 11.5px; color: var(--txt-2); }
.weapon-shards li { margin: 2px 0; }
.wonder-tiles { margin-bottom: 14px; }
.wonder-callout { margin-bottom: 10px; }

@media (max-width: 1100px) {
  .weapon-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 900px) {
  .wonder-hero { grid-template-columns: 168px minmax(0, 1fr); }
  .wonder-hero-copy { padding-right: 18px; }
  .wonder-hero-copy h2 { font-size: 21px; }
  .guide-grid { grid-template-columns: minmax(0, 1fr); }
  .schema-legend { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 700px) {
  .wonder-section .section-head { display: block; }
  .wonder-section .section-head .sub { display: block; margin-top: 4px; }
  .wonder-hero { grid-template-columns: minmax(0, 1fr); }
  .wonder-hero-art { min-height: 220px; max-height: 300px; }
  .wonder-hero-art::after { background: linear-gradient(180deg, transparent 52%, var(--card) 98%); }
  .wonder-hero-copy { padding: 0 18px 18px; margin-top: -38px; }
  .weapon-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .weapon-card { grid-template-columns: 104px minmax(0, 1fr); }
  .weapon-art img { height: 122px; }
  .wonder-tiles { grid-template-columns: minmax(0, 1fr); }
  .schema-steps li { padding: 11px 12px; }
}
@media (max-width: 480px) {
  .weapon-card { grid-template-columns: minmax(0, 1fr); }
  .weapon-art { min-height: 140px; border-right: 0; border-bottom: 1px solid var(--line); }
  .weapon-art img { height: 132px; }
  .wonder-facts .pill { font-size: 10.5px; }
}

/* ============================ revelations page ============================ */
.rev-filters .rev-filter-meta { display: flex; align-items: center; gap: 14px; padding-top: 10px; margin-top: 6px; border-top: 1px dashed var(--line); color: var(--txt-3); font-size: 11.5px; }
.rev-filters .rev-filter-meta #revCount { color: var(--txt-2); font-weight: 700; letter-spacing: 0.03em; }
.rev-filters #revEmpty { color: var(--red-soft); }
.rev-filter-icon { width: 14px; height: 14px; object-fit: contain; }
.rev-filter-options .chip,
.rev-filter-options .chip-ico { pointer-events: none; }

.rev-stats-section { margin: 0 0 22px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.rev-stats-section > summary { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; padding: 15px 18px; cursor: pointer; list-style: none; }
.rev-stats-section > summary::-webkit-details-marker { display: none; }
.rev-stats-section > summary span { color: var(--txt-1); font-size: 15px; font-weight: 700; }
.rev-stats-section > summary small { color: var(--txt-3); font-size: 12px; }
.rev-stats-section > summary::after { content: '+'; margin-left: auto; color: var(--red-soft); font-size: 17px; line-height: 1; }
.rev-stats-section[open] > summary::after { content: '�'; }
.rev-stats-body { padding: 0 18px 18px; border-top: 1px solid var(--line); }
.rev-stats-tabs { display: flex; flex-wrap: wrap; gap: 6px; padding: 14px 0 12px; }
.rev-stats-tab { display: inline-flex; align-items: center; gap: 7px; padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--card-2); color: var(--txt-2); font: inherit; font-size: 12px; }
.rev-stats-tab img { width: 16px; height: 16px; object-fit: contain; }
.rev-stats-tab:hover { border-color: rgba(255,255,255,.22); color: var(--txt-1); }
.rev-stats-tab.is-active { border-color: rgba(230,0,18,.55); background: rgba(230,0,18,.14); color: #fff; }
.rev-stats-panel h4 { margin: 16px 0 8px; color: var(--red-soft); font-size: 10.5px; letter-spacing: .09em; text-transform: uppercase; }
.rev-stats-panel h4:first-child { margin-top: 0; }
.rev-stats-panel[hidden] { display: none; }
.rev-stats-table td:first-child { color: var(--txt-1); font-weight: 600; }
.rev-stats-table th:not(:first-child), .rev-stats-table td:not(:first-child) { text-align: right; }

.rev-section[hidden],
.rev-card[hidden] { display: none; }
.rev-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.rev-card { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 14px; padding: 14px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); min-width: 0; }
.rev-card-media { position: relative; align-self: start; }
.rev-card-art { display: block; width: 100%; aspect-ratio: 2 / 3; object-fit: cover; border-radius: 8px; border: 1px solid rgba(255,255,255,.16); box-shadow: 0 8px 20px rgba(0,0,0,.4); background: #0b0b10; }
.rev-slot-icons { position: absolute; left: 4px; right: 4px; bottom: 4px; display: flex; justify-content: center; gap: 2px; padding: 4px; border-radius: 6px; background: rgba(8,8,12,.78); }
.rev-slot-icons img { width: 14px; height: 14px; object-fit: contain; }
.rev-card-body { min-width: 0; display: flex; flex-direction: column; gap: 9px; }
.rev-card-head { display: flex; align-items: flex-start; gap: 8px; }
.rev-card-head h3 { margin: 0; color: #fff; font-size: 16px; letter-spacing: -.02em; }
.rev-badge { margin-left: auto; padding: 2px 7px; border-radius: 999px; border: 1px solid rgba(255,176,32,.5); background: rgba(255,176,32,.1); color: var(--gold); font-size: 9.5px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; white-space: nowrap; }
.rev-tags { display: flex; flex-wrap: wrap; gap: 5px; }
.rev-tag { display: inline-flex; align-items: center; padding: 2px 7px; border-radius: 999px; border: 1px solid var(--line); background: rgba(255,255,255,.05); color: var(--txt-2); font-size: 10.5px; font-weight: 600; }
.rev-tag.buff { border-color: rgba(95,213,140,.36); background: rgba(95,213,140,.1); color: #8be6aa; }
.rev-tag.debuff { border-color: rgba(196,108,240,.36); background: rgba(196,108,240,.1); color: #d9a0ff; }
.rev-tag.resonance { border-color: rgba(55,208,208,.38); background: rgba(55,208,208,.1); color: #7fe8e4; }
.rev-tag.hl { border-color: rgba(255,176,32,.42); background: rgba(255,176,32,.1); color: #ffca66; }
.rev-tag.heal { border-color: rgba(81,200,234,.38); background: rgba(81,200,234,.1); color: #8adcf2; }
.rev-tag.space { border-color: rgba(230,0,18,.45); background: rgba(230,0,18,.12); color: var(--red-soft); }
.rev-effects { display: grid; gap: 6px; }
.rev-effect { display: grid; grid-template-columns: 46px minmax(0, 1fr); gap: 8px; align-items: start; padding-top: 6px; border-top: 1px solid rgba(255,255,255,.06); }
.rev-effect:first-child { padding-top: 0; border-top: 0; }
.rev-effect-label { color: var(--red-soft); font-size: 9.5px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; padding-top: 1px; }
.rev-effect p { margin: 0; color: var(--txt-2); font-size: 12px; line-height: 1.55; }
.rev-pair-list { display: grid; gap: 6px; }
.rev-pair { display: grid; grid-template-columns: 108px minmax(0, 1fr); gap: 9px; align-items: start; padding-top: 6px; border-top: 1px solid rgba(255,255,255,.06); }
.rev-pair:first-child { padding-top: 0; border-top: 0; }
.rev-pair-set { display: flex; align-items: center; gap: 6px; min-width: 0; color: var(--txt-1); font-size: 11.5px; font-weight: 700; }
.rev-pair-set img { width: 20px; height: 28px; object-fit: cover; border-radius: 3px; border: 1px solid rgba(255,255,255,.4); flex: none; }
.rev-pair p { margin: 0; color: var(--txt-2); font-size: 12px; line-height: 1.55; }
.rev-users { margin-top: auto; border-top: 1px solid rgba(255,255,255,.06); padding-top: 7px; }
.rev-users-head { color: var(--txt-3); font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.rev-users-head b { color: var(--txt-2); }
.rev-user-list { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 8px; }
.rev-user { display: inline-flex; align-items: center; gap: 5px; padding: 3px 7px 3px 3px; border-radius: 999px; border: 1px solid var(--line); background: rgba(255,255,255,.035); color: var(--txt-2); font-size: 10.5px; }
a.rev-user:hover { border-color: rgba(255,119,119,.45); color: #fff; }
.rev-user img { width: 22px; height: 22px; border-radius: 50%; object-fit: cover; object-position: center top; background: #15151b; }

@media (max-width: 1000px) {
  .rev-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 560px) {
  .rev-card { grid-template-columns: minmax(0, 1fr); }
  .rev-card-media { max-width: 132px; }
  .rev-pair { grid-template-columns: minmax(0, 1fr); gap: 5px; }
}

/* ============================ stats calculator ============================ */
.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;
}

.sc-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  width: fit-content;
  max-width: 100%;
  margin: 2px 0 16px;
  padding: 5px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.sc-tab {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 190px;
  padding: 10px 14px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: var(--txt-3);
  font: inherit;
  text-align: left;
}
.sc-tab:hover { background: rgba(255, 255, 255, 0.035); color: var(--txt-2); }
.sc-tab.is-active {
  background: rgba(230, 0, 18, 0.14);
  border-color: rgba(230, 0, 18, 0.45);
  color: #fff;
  box-shadow: inset 0 0 0 1px rgba(230, 0, 18, 0.08);
}
.sc-tab-index {
  display: grid;
  place-items: center;
  width: 28px; height: 28px;
  flex: none;
  border-radius: 7px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  color: var(--txt-3);
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.04em;
}
.sc-tab.is-active .sc-tab-index { border-color: rgba(230, 0, 18, 0.5); background: rgba(230, 0, 18, 0.2); color: #ffb4b4; }
.sc-tab b { display: block; font-size: 13.5px; color: var(--txt-2); }
.sc-tab.is-active b { color: #fff; }
.sc-tab small { display: block; margin-top: 1px; color: var(--txt-3); font-size: 10.5px; font-weight: 400; }

.sc-panel[hidden], .sc-subpanel[hidden] { display: none; }

.sc-summary {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) repeat(3, minmax(105px, 1fr));
  gap: 1px;
  margin-bottom: 14px;
  overflow: hidden;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.sc-summary-main,
.sc-summary-cell {
  background: var(--card);
  padding: 15px 16px;
}
.sc-summary-main { border-left: 3px solid var(--red); }
.sc-summary-label {
  display: block;
  color: var(--txt-3);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.sc-summary-main strong {
  display: block;
  margin-top: 4px;
  color: #fff;
  font-size: 32px;
  line-height: 1.1;
  font-weight: 800;
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
}
.sc-summary-main small { display: block; min-height: 15px; margin-top: 3px; color: var(--red-soft); font-size: 11px; font-weight: 600; }
.sc-summary-cell { display: flex; flex-direction: column; justify-content: center; gap: 4px; }
.sc-summary-cell span { color: var(--txt-3); font-size: 10.5px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; }
.sc-summary-cell b {
  color: var(--txt);
  font-size: 20px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}
.sc-summary-cell b.sc-needed { color: #7ee0a0; }

.sc-card {
  margin-bottom: 14px;
  padding: 16px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.sc-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 13px;
}
.sc-card-head h2 { margin: 0 0 3px; color: #fff; font-size: 15px; font-weight: 700; }
.sc-card-head p { margin: 0; max-width: 82ch; color: var(--txt-3); font-size: 12px; line-height: 1.55; }
.sc-reset {
  flex: none;
  padding: 6px 10px;
  border: 1px solid rgba(230, 0, 18, 0.4);
  border-radius: 7px;
  background: rgba(230, 0, 18, 0.1);
  color: #ffb3b3;
  font: inherit;
  font-size: 11px;
  font-weight: 600;
}
.sc-reset:hover { border-color: rgba(230, 0, 18, 0.7); background: rgba(230, 0, 18, 0.18); color: #fff; }
.sc-badge {
  flex: none;
  padding: 3px 8px;
  border: 1px solid rgba(255, 176, 32, 0.4);
  border-radius: 999px;
  background: rgba(255, 176, 32, 0.09);
  color: var(--gold);
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.sc-input-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(175px, 1fr));
  gap: 11px;
}
.sc-field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.sc-field-label {
  color: var(--txt-2);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.sc-field small { color: var(--txt-3); font-size: 10.5px; line-height: 1.4; }
.sc-field-input {
  display: flex;
  align-items: center;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  background: #1b1b1b;
}
.sc-field-input:focus-within { border-color: rgba(230, 0, 18, 0.55); box-shadow: 0 0 0 2px rgba(230, 0, 18, 0.08); }
.sc-field input[type="number"],
.sc-field input[type="search"],
.sc-field select,
.sc-boss-select select {
  width: 100%;
  min-width: 0;
  padding: 8px 10px;
  border: 0;
  background: transparent;
  color: #fff;
  font: inherit;
  font-size: 13px;
  outline: 0;
}
.sc-field input[type="number"] { font-variant-numeric: tabular-nums; }
.sc-field input[type="number"]::-webkit-outer-spin-button,
.sc-field input[type="number"]::-webkit-inner-spin-button { margin: 0; }
.sc-unit {
  flex: none;
  padding: 0 10px 0 2px;
  color: var(--txt-3);
  font-size: 11px;
}
.sc-amp-field .sc-check-line { width: 100%; }
.sc-check-line {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--txt-2);
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  user-select: none;
}
.sc-check-line input,
.sc-check input { accent-color: var(--red); }
.sc-toggle-field { justify-content: flex-start; }

.sc-boss-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) repeat(2, minmax(150px, 1fr));
  gap: 11px;
}
.sc-boss-select select {
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  background: #1b1b1b;
}
.sc-boss-select select:focus { border-color: rgba(230, 0, 18, 0.55); outline: 0; }
.sc-hint { margin: 11px 0 0; color: var(--txt-3); font-size: 11px; }

.sc-mini-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  margin-bottom: 14px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--line);
}
.sc-mini {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 11px 13px;
  background: var(--card);
}
.sc-mini span { color: var(--txt-3); font-size: 10px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; }
.sc-mini b { color: #fff; font-size: 17px; font-weight: 700; font-variant-numeric: tabular-nums; }
.sc-mini small { color: var(--txt-3); font-size: 10px; }

.sc-subtabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 2px 0 10px;
}
.sc-subtab {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--card-2);
  color: var(--txt-2);
  font: inherit;
  font-size: 12px;
  font-weight: 600;
}
.sc-subtab:hover { border-color: rgba(255, 255, 255, 0.22); color: #fff; }
.sc-subtab.is-active { border-color: rgba(230, 0, 18, 0.55); background: rgba(230, 0, 18, 0.14); color: #fff; }
.sc-subtab span {
  display: inline-grid;
  place-items: center;
  min-width: 20px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
  color: var(--txt-3);
  font-size: 9.5px;
  font-weight: 800;
}
.sc-subtab.is-active span { background: rgba(230, 0, 18, 0.25); color: #ffd2d2; }

.sc-table-tools {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}
.sc-filter {
  flex: 1;
  min-width: 0;
  max-width: 360px;
  padding: 7px 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  background: #1b1b1b;
  color: #fff;
  font: inherit;
  font-size: 12px;
  outline: 0;
}
.sc-filter:focus { border-color: rgba(230, 0, 18, 0.55); }
.sc-row-count { color: var(--txt-3); font-size: 11px; white-space: nowrap; }
.sc-bulk {
  margin-left: auto;
  padding: 5px 9px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--card-2);
  color: var(--txt-2);
  font: inherit;
  font-size: 10.5px;
  font-weight: 600;
  white-space: nowrap;
}
.sc-bulk:hover { border-color: rgba(255, 255, 255, 0.25); color: #fff; }

.sc-table-wrap {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  max-height: min(70vh, 690px);
}
.sc-table {
  width: 100%;
  min-width: 820px;
  border-collapse: collapse;
  font-size: 12px;
}
.sc-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  padding: 8px 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  background: #1b1b1b;
  color: var(--txt-3);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-align: left;
  text-transform: uppercase;
}
.sc-table td {
  padding: 7px 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  vertical-align: middle;
}
.sc-table tbody tr:hover { background: rgba(255, 255, 255, 0.025); }
.sc-table tbody tr.is-selected { background: rgba(230, 0, 18, 0.065); }
.sc-table tbody tr.is-selected:hover { background: rgba(230, 0, 18, 0.095); }
.sc-check-col { width: 34px; }
.sc-check-cell { width: 34px; padding-right: 2px !important; text-align: center; }
.sc-check { display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.sc-check input { width: 15px; height: 15px; margin: 0; cursor: pointer; }
.sc-target { width: 74px; color: var(--txt-3); font-size: 10.5px; white-space: nowrap; }
.sc-name-cell { min-width: 220px; }
.sc-name { display: block; color: #fff; font-size: 12.5px; font-weight: 600; line-height: 1.35; }
.sc-type { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; margin-top: 2px; color: var(--txt-3); font-size: 10px; }
.sc-option-cell { width: 170px; }
.sc-option {
  width: 100%;
  max-width: 180px;
  padding: 4px 7px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  background: #1b1b1b;
  color: var(--txt-2);
  font: inherit;
  font-size: 10.5px;
  outline: 0;
}
.sc-option:focus { border-color: rgba(230, 0, 18, 0.55); }
.sc-empty { color: var(--txt-3); }
.sc-value-col { width: 84px; text-align: right !important; }
.sc-value-cell { width: 84px; text-align: right; }
.sc-value { color: var(--txt); font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.sc-value.is-amp { color: var(--red-soft); }
.sc-duration-col { width: 74px; }
.sc-duration { width: 74px; color: var(--txt-3); font-size: 10.5px; white-space: nowrap; }
.sc-note-col { width: 190px; }
.sc-note { color: var(--txt-3); font-size: 10.5px; line-height: 1.35; }

.sc-tag {
  display: inline-flex;
  align-items: center;
  padding: 1px 5px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--txt-3);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.05em;
  line-height: 1.4;
}
.sc-tag.amp { border-color: rgba(230, 0, 18, 0.4); background: rgba(230, 0, 18, 0.11); color: #ff9d9d; }
.sc-tag.total { border-color: rgba(255, 176, 32, 0.4); background: rgba(255, 176, 32, 0.1); color: var(--gold); }

.sc-group-row td {
  padding: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  background: #1d1d1d;
}
.sc-group-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 8px 12px;
  border: 0;
  background: transparent;
  color: var(--txt-2);
  font: inherit;
  font-size: 11.5px;
  font-weight: 700;
  text-align: left;
}
.sc-group-toggle:hover { background: rgba(255, 255, 255, 0.03); color: #fff; }
.sc-caret { display: inline-block; width: 13px; color: var(--red-soft); font-size: 11px; transition: transform 0.15s; }
.sc-group-toggle.is-collapsed .sc-caret { transform: rotate(-90deg); }
.sc-group-name { flex: 1; }
.sc-group-count {
  padding: 1px 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--txt-3);
  font-size: 9.5px;
  font-weight: 700;
}

.sc-note-card {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 14px 0;
  padding: 11px 13px;
  border: 1px dashed rgba(255, 255, 255, 0.13);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.02);
  color: var(--txt-3);
  font-size: 11.5px;
  line-height: 1.55;
}
.sc-note-card b { flex: none; color: var(--txt-2); }
.sc-source {
  margin: 18px 0 8px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
}
.sc-source b { display: block; margin-bottom: 4px; color: var(--txt-2); font-size: 11px; letter-spacing: 0.04em; text-transform: uppercase; }
.sc-source p { margin: 0; color: var(--txt-3); font-size: 11.5px; line-height: 1.6; }
.sc-source a { color: var(--red-soft); }

@media (max-width: 900px) {
  .sc-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sc-summary-main { grid-column: span 2; }
  .sc-boss-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .sc-boss-select { grid-column: span 2; }
  .sc-mini-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .sc-table th.sc-note-col,
  .sc-table td.sc-note,
  .sc-table th.sc-duration-col,
  .sc-table td.sc-duration { display: none; }
  .sc-table { min-width: 620px; }
  .sc-tabs { width: 100%; }
  .sc-tab { flex: 1; min-width: 0; }
}
@media (max-width: 560px) {
  .sc-tabs { display: grid; grid-template-columns: minmax(0, 1fr); }
  .sc-summary-main strong { font-size: 26px; }
  .sc-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sc-summary-main { grid-column: span 2; }
  .sc-boss-grid { grid-template-columns: minmax(0, 1fr); }
  .sc-boss-select { grid-column: auto; }
  .sc-input-grid { grid-template-columns: minmax(0, 1fr); }
  .sc-mini { padding: 9px 11px; }
  .sc-card, .sc-source { padding: 13px; }
  .sc-card-head { flex-direction: column; gap: 8px; }
  .sc-filter { max-width: none; }
  .sc-row-count { display: none; }
  .sc-table { min-width: 560px; }
}

/* icons added by the Stats Calculator data import */
.sc-tab-icon { display: block; width: 18px; height: 18px; object-fit: contain; }
.sc-label-icon { width: 14px; height: 14px; flex: none; object-fit: contain; opacity: 0.92; }
.sc-summary-label { display: flex; align-items: center; gap: 6px; }
.sc-summary-cell > span { display: flex; align-items: center; gap: 5px; }
.sc-mini > span { display: flex; align-items: center; gap: 5px; }
.sc-field-label { display: flex; align-items: center; gap: 6px; }

.sc-mod { display: flex; align-items: flex-start; gap: 8px; min-width: 0; }
.sc-mod-text { min-width: 0; }
.sc-skill-icon {
  width: 26px;
  height: 26px;
  flex: none;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.035);
  object-fit: contain;
}
.sc-skill-icon-empty {
  display: inline-grid;
  place-items: center;
  color: var(--txt-3);
  font-size: 10px;
  font-weight: 800;
}
.sc-group-icon {
  width: 20px;
  height: 20px;
  flex: none;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 50%;
  background: #15151b;
  object-fit: cover;
  object-position: center top;
}
.sc-group-icon-empty { display: inline-block; background: rgba(255, 255, 255, 0.04); }

.sc-boss-picker { display: flex; align-items: center; gap: 8px; min-width: 0; }
.sc-boss-preview {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  flex: none;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #1b1b1b;
}
.sc-boss-img { width: 100%; height: 100%; object-fit: cover; }
.sc-boss-placeholder { color: var(--txt-3); font-size: 14px; font-weight: 700; }
.sc-boss-picker select { flex: 1; min-width: 0; }

@media (max-width: 560px) {
  .sc-skill-icon { width: 24px; height: 24px; }
  .sc-boss-preview { width: 34px; height: 34px; }
}

.sc-inline-icon { width: 13px; height: 13px; vertical-align: -2px; object-fit: contain; margin-right: 3px; }

/* ===================== game guides ===================== */

.gg-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px 14px;
  margin-bottom: 12px;
}
.gg-search-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1 1 260px;
  min-width: 0;
}
.gg-search-wrap svg { width: 16px; height: 16px; flex: none; color: var(--txt-3); }
.gg-search-wrap input {
  width: 100%;
  min-width: 0;
  background: var(--card-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  color: var(--txt);
  font: inherit;
  font-size: 13px;
  padding: 8px 11px;
}
.gg-search-wrap input:focus {
  outline: none;
  border-color: rgba(255, 119, 119, 0.45);
}
.gg-filters { display: flex; flex-wrap: wrap; gap: 6px; }
.gg-filter {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--card);
  color: var(--txt-2);
  font: inherit;
  font-size: 11px;
  font-weight: 600;
}
.gg-filter span {
  padding: 1px 5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
  color: var(--txt-3);
  font-size: 9.5px;
}
.gg-filter:hover { border-color: rgba(255, 255, 255, 0.2); color: #fff; }
.gg-filter.is-active { border-color: rgba(230, 0, 18, 0.55); background: rgba(230, 0, 18, 0.13); color: #fff; }
.gg-filter.is-active span { background: rgba(230, 0, 18, 0.25); color: #ffd2d2; }
.gg-count { font-size: 11.5px; color: var(--txt-3); margin: 0 0 12px; }

.gg-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 20px;
}
.gg-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  color: var(--txt);
  transition: transform 0.15s, border-color 0.15s;
}
.gg-card[hidden] { display: none; }
.gg-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 119, 119, 0.45);
  color: var(--txt);
}
.gg-card-media {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #171717;
  border-bottom: 1px solid var(--line);
}
.gg-card-media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.gg-card-media.is-fallback {
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 82% 18%, rgba(230, 0, 18, 0.24), transparent 42%),
    linear-gradient(135deg, #1d1d1d, #151515);
}
.gg-card-mark {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.22);
}
.gg-card-cat {
  position: absolute;
  left: 10px;
  top: 10px;
  padding: 3px 8px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.68);
  color: rgba(255, 255, 255, 0.8);
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  backdrop-filter: blur(4px);
}
.gg-card-body {
  display: flex;
  flex-direction: column;
  gap: 7px;
  flex: 1;
  padding: 14px 16px 16px;
}
.gg-card-title {
  color: #fff;
  font-size: 15px;
  line-height: 1.35;
  font-weight: 700;
}
.gg-card-excerpt {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
  color: var(--txt-2);
  font-size: 12.5px;
  line-height: 1.5;
}
.gg-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 12px;
  margin-top: auto;
  color: var(--txt-3);
  font-size: 11px;
}
.gg-empty {
  padding: 26px;
  margin-bottom: 18px;
  background: var(--card);
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  color: var(--txt-3);
  font-size: 13px;
  text-align: center;
}

.gg-back { margin: 0 0 12px; font-size: 13px; }
.gg-back a { color: var(--txt-2); font-weight: 600; }
.gg-back a:hover { color: #fff; }
.gg-article {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px 30px;
  margin-bottom: 22px;
}
.gg-head {
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}
.gg-cat {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  margin-bottom: 10px;
  border: 1px solid rgba(230, 0, 18, 0.32);
  border-radius: 999px;
  background: rgba(230, 0, 18, 0.12);
  color: #ffb3b3;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.gg-head h1 {
  margin: 0 0 10px;
  color: rgba(255, 255, 255, 0.95);
  font-size: 28px;
  line-height: 1.2;
  font-weight: 700;
}
.gg-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  color: var(--txt-3);
  font-size: 12px;
}
.gg-meta a { color: var(--red-soft); }
.gg-deck {
  margin: 0 0 22px;
  padding-left: 12px;
  border-left: 3px solid var(--red);
  color: var(--txt-2);
  font-size: 14px;
  line-height: 1.55;
}
.gg-content {
  color: var(--txt-2);
  font-size: 14.5px;
  line-height: 1.7;
}
.gg-content > *:first-child { margin-top: 0; }
.gg-content p { margin: 0 0 14px; }
.gg-content h2 {
  margin: 30px 0 12px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  color: rgba(255, 255, 255, 0.94);
  font-size: 20px;
  font-weight: 700;
  line-height: 1.3;
}
.gg-content h2:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.gg-content h3 {
  margin: 24px 0 10px;
  color: rgba(255, 255, 255, 0.92);
  font-size: 16.5px;
  font-weight: 700;
}
.gg-content h4 {
  margin: 20px 0 8px;
  color: rgba(255, 255, 255, 0.9);
  font-size: 15px;
  font-weight: 700;
}
.gg-content h5, .gg-content h6 {
  margin: 18px 0 8px;
  color: rgba(255, 255, 255, 0.88);
  font-size: 14px;
  font-weight: 700;
}
.gg-content ul, .gg-content ol { margin: 0 0 14px; padding-left: 22px; }
.gg-content li { margin-bottom: 6px; }
.gg-content li > p { margin-bottom: 6px; }
.gg-content strong, .gg-content b { color: rgba(255, 255, 255, 0.88); font-weight: 600; }
.gg-content blockquote {
  margin: 0 0 14px;
  padding: 12px 16px;
  background: var(--card-2);
  border-left: 3px solid var(--gold);
  border-radius: 0 8px 8px 0;
}
.gg-content blockquote p:last-child { margin-bottom: 0; }
.gg-content hr { margin: 24px 0; border: 0; border-top: 1px solid var(--line); }
.gg-content a { color: var(--red-soft); text-decoration: underline; text-underline-offset: 2px; }
.gg-content img {
  max-width: 100%;
  height: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #1a1a1a;
}
.gg-content p > img, .gg-content > img { display: block; margin: 2px auto 12px; }
.gg-content .table-wrap img {
  display: inline-block;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  object-fit: contain;
}
.gg-content pre {
  margin: 0 0 16px;
  padding: 14px 16px;
  overflow-x: auto;
  background: #181818;
  border: 1px solid var(--line);
  border-radius: 8px;
}
.gg-content pre code {
  padding: 0;
  border: 0;
  background: none;
  color: #d8d8d8;
  font-size: 12.5px;
  line-height: 1.6;
  white-space: pre;
}
.gg-content code {
  padding: 1px 6px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #1c1c1c;
  font-size: 12.5px;
}
.gg-content .gg-table { width: 100%; }
.gg-content .gg-table th { white-space: normal; }
.gg-content .gg-table td { font-size: 13px; }
.gg-content .gg-note {
  margin: 0 0 14px;
  padding: 10px 12px;
  background: var(--card-2);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--txt-3);
  font-size: 12px;
}
.gg-foot {
  margin-top: 24px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  color: var(--txt-3);
  font-size: 11.5px;
}
.gg-foot p { margin: 0; }
.gg-foot a { color: var(--txt-3); }
.gg-foot a:hover { color: var(--txt-2); }

@media (max-width: 1250px) {
  .gg-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .gg-grid { grid-template-columns: minmax(0, 1fr); }
  .gg-article { padding: 20px 18px; }
  .gg-head h1 { font-size: 23px; }
  .gg-content { font-size: 14px; }
}

/* ----------------------------------- about ---------------------------------- */

.about-beta {
  border-left-color: var(--red);
  background:
    radial-gradient(120% 160% at 0% 0%, rgba(230, 0, 18, 0.14), transparent 58%),
    var(--card);
}
.about-beta-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.about-beta h2 { margin: 0; }
.about-beta-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 4px;
  background: var(--red);
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 1.4px;
  text-transform: uppercase;
}
.about-beta p { max-width: 88ch; line-height: 1.6; }

.about-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin: 18px 0;
}
.about-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px 22px;
}
.about-card h2 { margin: 0 0 10px; font-size: 16px; }
.about-card p { margin: 0 0 12px; font-size: 13.5px; color: var(--txt-2); line-height: 1.65; }
.about-card b { color: var(--txt); }

.about-list { list-style: none; margin: 0; padding: 0; }
.about-list li {
  position: relative;
  padding-left: 18px;
  margin-bottom: 10px;
  font-size: 13px;
  color: var(--txt-2);
  line-height: 1.6;
}
.about-list li:last-child { margin-bottom: 0; }
.about-list li::before {
  content: '';
  position: absolute;
  left: 2px;
  top: 8px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--red);
}

.about-links { list-style: none; margin: 0; padding: 0; }
.about-links li {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  padding: 9px 0;
  border-bottom: 1px dashed var(--line);
  font-size: 13px;
}
.about-links li:first-child { padding-top: 0; }
.about-links li:last-child { border-bottom: 0; padding-bottom: 0; }
.about-links a { font-weight: 600; }
.about-links span { color: var(--txt-3); font-size: 12px; text-align: right; }

.about-discord {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 22px 24px;
  margin: 18px 0;
  border: 1px solid rgba(255, 119, 119, 0.28);
  border-radius: var(--radius);
  background:
    radial-gradient(130% 180% at 100% 0%, rgba(230, 0, 18, 0.2), transparent 60%),
    var(--card);
}
.about-discord-copy { max-width: 66ch; }
.about-kicker {
  display: block;
  margin-bottom: 4px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: var(--red-soft);
}
.about-discord h2 { margin: 0 0 8px; font-size: 17px; }
.about-discord p { margin: 0; font-size: 13.5px; color: var(--txt-2); line-height: 1.6; }
.about-discord-btn { flex: none; padding: 11px 20px; white-space: nowrap; }

.about-feedback {
  padding: 22px 24px;
  margin: 18px 0;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.about-feedback h2 { margin: 0 0 8px; font-size: 17px; }
.about-feedback > p { margin: 0 0 16px; font-size: 13.5px; color: var(--txt-2); line-height: 1.6; max-width: 80ch; }

.about-form { display: flex; flex-direction: column; gap: 14px; }
.about-form-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.about-field { display: flex; flex-direction: column; gap: 6px; }
.about-field > span {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--txt-3);
}
.about-field > span small { text-transform: none; letter-spacing: 0; font-weight: 500; font-size: 11px; color: var(--txt-3); }
.about-field input,
.about-field select,
.about-field textarea {
  width: 100%;
  background: #1a1a1a;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  color: var(--txt);
  font-size: 13.5px;
  padding: 10px 12px;
  outline: none;
  transition: border-color 0.14s, box-shadow 0.14s;
}
.about-field textarea { resize: vertical; min-height: 120px; line-height: 1.55; }
.about-field input::placeholder,
.about-field textarea::placeholder { color: var(--txt-3); }
.about-field input:focus,
.about-field select:focus,
.about-field textarea:focus {
  border-color: rgba(255, 119, 119, 0.5);
  box-shadow: 0 0 0 2px rgba(230, 0, 18, 0.14);
}
.about-form-foot { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.about-form-note { font-size: 11.5px; color: var(--txt-3); }
.about-form-status { margin: 0; font-size: 12.5px; min-height: 18px; color: var(--txt-3); }
.about-form-status.is-pending { color: var(--txt-2); }
.about-form-status.is-success { color: #6fd48b; }
.about-form-status.is-error { color: #ff8484; }
.about-form button[type="submit"]:disabled { opacity: 0.55; cursor: progress; }

@media (max-width: 820px) {
  .about-grid { grid-template-columns: minmax(0, 1fr); }
  .about-discord { flex-direction: column; align-items: flex-start; }
  .about-discord-btn { width: 100%; }
}
@media (max-width: 560px) {
  .about-form-row { grid-template-columns: minmax(0, 1fr); }
  .about-feedback { padding: 18px 16px; }
  .about-links li { flex-direction: column; gap: 2px; }
  .about-links span { text-align: left; }
}

/* Long database pages can contain hundreds of cards. Skipping layout and paint
   for off-screen cards keeps scrolling smooth; the browser remembers each
   card's real size after it has been rendered once. */
.char-card,
.ps-card,
.rev-card,
.fs-card {
  content-visibility: auto;
}
.char-card { contain-intrinsic-size: auto 300px; }
.ps-card { contain-intrinsic-size: auto 190px; }
.rev-card { contain-intrinsic-size: auto 220px; }
.fs-card { contain-intrinsic-size: auto 300px; }

