:root {
  color-scheme: dark;
  --ink: #f4efe6;
  --muted: #b6ab99;
  --dim: #756b60;
  --paper: #121216;
  --panel: #1a191d;
  --panel-2: #222126;
  --line: rgba(214, 181, 109, 0.18);
  --gold: #d8b967;
  --dark-gold: #94722f;
  --hunter: #701a22;
  --survivor: #94722f;
  --red: #701a22;
  --green: #2d6f4f;
  --green-2: #65a878;
  --blue: #6d8494;
  --shadow: rgba(0, 0, 0, 0.46);
  --radius: 8px;
  --max: 1180px;
  font-family:
    "Microsoft YaHei", "PingFang SC", "Noto Sans SC", system-ui, sans-serif;
}

.assessment-page-body {
  background: #17130e;
}

.assessment-section,
.assessment-page {
  background: linear-gradient(135deg, #17130e 0%, #241b12 58%, #2d2114 100%);
  color: #f7ead2;
  border-top: 1px solid rgba(220, 177, 96, 0.32);
  border-bottom: 1px solid rgba(220, 177, 96, 0.32);
}

.assessment-form {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.assessment-form fieldset {
  margin: 0;
  padding: 18px;
  border: 1px solid rgba(220, 177, 96, 0.26);
  background: rgba(18, 15, 12, 0.78);
  color: #f7ead2;
  border-radius: 6px;
  box-shadow: inset 0 1px 0 rgba(255, 244, 210, 0.06);
}

.assessment-form legend {
  padding: 0 6px;
  font-weight: 700;
  color: #f4c56d;
}

.assessment-form label {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 9px 0;
  line-height: 1.5;
  cursor: pointer;
  color: rgba(255, 246, 228, 0.9);
}

.assessment-form input { margin-top: 4px; }
.assessment-form .primary-action { justify-self: start; border: 0; cursor: pointer; }

.assessment-result {
  display: none;
  margin-top: 20px;
  padding: 18px 20px;
  border-left: 4px solid #dcb160;
  background: rgba(12, 10, 8, 0.86);
  color: #f7ead2;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.28);
}

.assessment-result.is-visible { display: block; }
.assessment-result strong { font-size: 1.15rem; }
.assessment-result p { margin: 8px 0; }
.assessment-result a, .text-link { color: #f4c56d; font-weight: 700; }

.update-hero {
  min-height: calc(100vh - 72px);
  background:
    radial-gradient(circle at 14% 8%, rgba(216, 185, 103, 0.12), transparent 30%),
    linear-gradient(135deg, #121216 0%, #1c1915 58%, #2a1d13 100%);
}

.update-grid {
  display: grid;
  gap: 24px;
}

.update-card {
  padding: 24px;
  border: 1px solid rgba(216, 185, 103, 0.24);
  border-radius: var(--radius);
  background: rgba(19, 18, 22, 0.88);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.28);
}

.update-card.update-current {
  border-color: rgba(216, 185, 103, 0.54);
}

.update-card.update-archive {
  background: rgba(24, 21, 20, 0.82);
}

.update-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.update-card-head h2 {
  margin: 4px 0 0;
}

.update-date {
  color: var(--gold);
  font-weight: 700;
  white-space: nowrap;
}

.update-table {
  display: grid;
  gap: 8px;
  margin: 18px 0 22px;
}

.update-row {
  display: grid;
  grid-template-columns: 92px 1fr 1fr;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid rgba(216, 185, 103, 0.12);
  background: rgba(255, 255, 255, 0.025);
  color: var(--muted);
}

.update-row strong {
  color: var(--gold);
}

@media (max-width: 760px) {
  .update-row {
    grid-template-columns: 1fr;
    gap: 5px;
  }
}

@media (max-width: 860px) {
  .assessment-form { grid-template-columns: 1fr; }
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.5), transparent 18%, transparent 82%, rgba(0, 0, 0, 0.5)),
    linear-gradient(135deg, rgba(112, 26, 34, 0.11), transparent 36%),
    linear-gradient(225deg, rgba(148, 114, 47, 0.1), transparent 42%),
    var(--paper);
  color: var(--ink);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.09;
  background-image:
    repeating-linear-gradient(34deg, transparent 0 28px, rgba(214, 181, 109, 0.18) 29px 30px, transparent 31px 58px),
    repeating-linear-gradient(124deg, transparent 0 38px, rgba(112, 26, 34, 0.2) 39px 40px, transparent 41px 76px);
  background-size: 180px 180px;
  mask-image: linear-gradient(to bottom, black, transparent 85%);
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.62), transparent 14%, transparent 86%, rgba(0, 0, 0, 0.62)),
    linear-gradient(to bottom, transparent 58%, rgba(0, 0, 0, 0.28));
  opacity: 0.45;
  z-index: -1;
}

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

code,
pre {
  font-family: "Cascadia Code", "SFMono-Regular", Consolas, monospace;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid rgba(214, 181, 109, 0.16);
  background: rgba(18, 18, 22, 0.66);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.22);
  backdrop-filter: blur(22px) saturate(125%);
}

.nav-shell {
  width: min(var(--max), calc(100% - 32px));
  min-height: 72px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

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

.brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  overflow: hidden;
  border: 1px solid rgba(216, 185, 103, 0.58);
  border-radius: 50%;
  background: #e8e5df;
  box-shadow:
    inset 0 0 0 2px rgba(18, 18, 22, 0.65),
    0 0 24px rgba(216, 185, 103, 0.18);
}

.brand-mark img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: contrast(1.08) sepia(0.1);
}

.brand strong,
.brand small {
  display: block;
}

.brand small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 14px;
}

.nav-links a {
  padding: 10px 12px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  transition: border-color 160ms ease, color 160ms ease, background 160ms ease;
}

.nav-links a:hover {
  color: var(--ink);
  border-color: rgba(216, 185, 103, 0.55);
  background: rgba(148, 114, 47, 0.12);
  box-shadow: inset 0 0 16px rgba(216, 185, 103, 0.08);
}

.hero {
  position: relative;
  min-height: calc(100vh - 72px);
  display: grid;
  align-items: center;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}

.hero-backdrop {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(18, 18, 22, 0.92), rgba(18, 18, 22, 0.56)),
    repeating-linear-gradient(90deg, transparent 0 46px, rgba(148, 114, 47, 0.08) 47px 48px),
    repeating-linear-gradient(135deg, transparent 0 28px, rgba(112, 26, 34, 0.1) 29px 30px),
    linear-gradient(145deg, #121216 0%, #1c1a1e 48%, #0f0f12 100%);
}

.hero-backdrop::after {
  content: "";
  position: absolute;
  right: 7vw;
  top: 14vh;
  width: min(38vw, 430px);
  aspect-ratio: 3 / 4;
  border: 1px solid rgba(214, 181, 109, 0.28);
  background:
    linear-gradient(160deg, rgba(148, 114, 47, 0.12), rgba(112, 26, 34, 0.16)),
    repeating-linear-gradient(0deg, transparent 0 18px, rgba(255, 255, 255, 0.045) 19px 20px);
  transform: rotate(3deg);
  box-shadow: 0 30px 90px var(--shadow);
}

.hero-content {
  position: relative;
  width: min(var(--max), calc(100% - 32px));
  margin: 0 auto;
  padding: 92px 0 110px;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--gold);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

.hero h1 {
  margin: 0;
  font-size: clamp(72px, 13vw, 156px);
  line-height: 0.92;
  letter-spacing: 0;
  text-shadow:
    0 0 16px rgba(216, 185, 103, 0.26),
    0 18px 42px rgba(0, 0, 0, 0.62);
}

.hero-lead {
  width: min(640px, 100%);
  margin: 24px 0 0;
  color: #ded5c7;
  font-size: clamp(18px, 2vw, 24px);
  line-height: 1.65;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 34px;
}

.primary-action,
.ghost-action,
.notice-band a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border-radius: var(--radius);
  font-weight: 700;
}

.primary-action {
  background: linear-gradient(135deg, #f2d488, var(--dark-gold));
  color: #201914;
  box-shadow: 0 10px 24px rgba(148, 114, 47, 0.22);
}

.ghost-action,
.notice-band a {
  border: 1px solid var(--line);
  color: var(--ink);
  background: rgba(255, 255, 255, 0.04);
}

.github-star {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border-radius: var(--radius);
  font-weight: 700;
  background: #24292e;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.28);
  transition: background 0.2s ease, transform 0.2s ease;
}

.github-star:hover {
  background: #2f363d;
  transform: translateY(-1px);
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 150px));
  gap: 12px;
  margin: 54px 0 0;
}

.hero-stats div {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(20, 18, 17, 0.7);
}

.hero-stats dt {
  color: var(--gold);
  font-size: 30px;
  font-weight: 800;
}

.hero-stats dd {
  margin: 4px 0 0;
  color: var(--muted);
}

.notice-band {
  width: min(var(--max), calc(100% - 32px));
  margin: -38px auto 0;
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 20px;
  border: 1px solid rgba(214, 181, 109, 0.28);
  border-radius: var(--radius);
  background: rgba(26, 25, 29, 0.96);
  box-shadow: 0 24px 70px var(--shadow);
}

.notice-band p {
  margin: 6px 0 0;
  color: var(--muted);
  line-height: 1.7;
}

.section {
  width: min(var(--max), calc(100% - 32px));
  margin: 0 auto;
  padding: 94px 0;
}

.section-tight {
  padding-top: 58px;
}

.section-heading {
  max-width: 760px;
  margin-bottom: 28px;
  position: relative;
  padding: 24px;
  border: 1px solid rgba(214, 181, 109, 0.12);
  border-radius: var(--radius);
  background:
    repeating-linear-gradient(45deg, transparent 0 18px, rgba(214, 181, 109, 0.04) 19px 20px),
    repeating-linear-gradient(135deg, transparent 0 26px, rgba(112, 26, 34, 0.06) 27px 28px),
    rgba(18, 18, 22, 0.38);
  box-shadow: inset 0 0 36px rgba(0, 0, 0, 0.22);
}

.section-heading h2 {
  margin: 0;
  font-size: clamp(32px, 5vw, 54px);
  line-height: 1.08;
}

.section-heading p:not(.eyebrow) {
  color: var(--muted);
  line-height: 1.8;
}

.model-grid,
.insight-grid,
.definition-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.definition-grid {
  margin-top: 16px;
}

.video-notes {
  margin-top: 16px;
}

.model-card,
.insight-panel,
.character-card,
.summary-panel,
.schema-layout,
.data-notes,
.definition-card {
  border: 1px solid rgba(148, 114, 47, 0.42);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.012)),
    rgba(24, 23, 27, 0.88);
  box-shadow:
    0 18px 0 -15px rgba(216, 185, 103, 0.16),
    0 22px 52px rgba(0, 0, 0, 0.28);
}

.model-card,
.definition-card {
  padding: 20px;
}

.model-card h3,
.insight-panel h3,
.data-notes h3,
.definition-card h3 {
  margin: 0 0 10px;
  font-size: 20px;
}

.definition-card p,
.model-card p {
  color: var(--muted);
  line-height: 1.8;
}

.weight-row {
  display: grid;
  grid-template-columns: 92px 1fr 44px;
  gap: 10px;
  align-items: center;
  margin-top: 12px;
  color: var(--muted);
  font-size: 13px;
}

.weight-track {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.075);
  box-shadow: inset 0 0 0 1px rgba(216, 185, 103, 0.08);
}

.weight-fill {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--dark-gold), #d8b967, var(--hunter));
}

.weight-win { background: linear-gradient(90deg, #3f8a5d, #85c98e); }
.weight-draw { background: linear-gradient(90deg, #9b7a2f, #e2c66d); }
.weight-pick { background: linear-gradient(90deg, #4f6f8f, #8fb3d1); }
.weight-ban { background: linear-gradient(90deg, #7b1f2a, #d95a63); }
.weight-cognition { background: linear-gradient(90deg, #8a6d2f, #f0c86a); }
.weight-elite { background: linear-gradient(90deg, #6d4d93, #b18be3); }
.weight-reliability { background: linear-gradient(90deg, #5f6c72, #a7b0b5); }
.weight-version { background: linear-gradient(90deg, #a35e20, #f1a64f); }
}

.toolbar {
  position: sticky;
  top: 73px;
  z-index: 10;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  padding: 14px;
  margin-bottom: 16px;
  border: 1px solid rgba(214, 181, 109, 0.22);
  border-radius: var(--radius);
  background: rgba(18, 18, 22, 0.72);
  box-shadow: 0 16px 44px rgba(0, 0, 0, 0.24);
  backdrop-filter: blur(20px) saturate(120%);
}

fieldset {
  margin: 0;
  padding: 0;
  border: 0;
}

legend {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.segmented-control {
  display: inline-grid;
  grid-auto-flow: column;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.04);
}

.part-control {
  grid-auto-flow: row;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.segmented-control label {
  display: inline-flex;
  min-height: 36px;
  align-items: center;
  justify-content: center;
  padding: 0 12px;
  border-radius: 6px;
  color: var(--muted);
  cursor: pointer;
  white-space: nowrap;
  border: 1px solid transparent;
}

.segmented-control input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.segmented-control label:has(input:checked) {
  color: #211914;
  background: linear-gradient(135deg, #e1c06d, var(--dark-gold));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.28);
}

.segmented-control label:hover {
  border-color: rgba(216, 185, 103, 0.58);
  color: var(--ink);
}

.select-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
}

select {
  min-height: 42px;
  padding: 0 34px 0 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--ink);
  background: var(--panel-2);
}

.rank-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 16px;
}

.summary-panel {
  padding: 18px;
}

.summary-panel strong {
  display: block;
  margin-bottom: 8px;
  color: var(--gold);
}

.summary-panel p {
  margin: 0;
  color: var(--muted);
  line-height: 1.75;
}

.rank-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(132px, 1fr));
  gap: 12px;
}

.rank-hint {
  margin: -8px 0 16px;
  color: rgba(232, 215, 179, 0.76);
  font-size: 14px;
}

.character-tile {
  position: relative;
  min-height: 198px;
  padding: 10px;
  overflow: hidden;
  border: 1px solid rgba(148, 114, 47, 0.34);
  border-radius: var(--radius);
  color: var(--ink);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.01)),
    rgba(24, 23, 27, 0.88);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.24);
  cursor: pointer;
  text-align: left;
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.character-tile::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 35%, rgba(0, 0, 0, 0.82));
  z-index: 1;
}

.character-tile.hunter {
  box-shadow: inset 0 0 0 1px rgba(112, 26, 34, 0.22), 0 12px 30px rgba(0, 0, 0, 0.24);
}

.character-tile.survivor {
  box-shadow: inset 0 0 0 1px rgba(148, 114, 47, 0.22), 0 12px 30px rgba(0, 0, 0, 0.24);
}

.character-tile:hover,
.character-tile.active {
  transform: translateY(-2px);
  border-color: rgba(216, 185, 103, 0.78);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.36), 0 0 0 1px rgba(216, 185, 103, 0.24);
}

.character-tile img {
  position: absolute;
  inset: 10px 12px auto;
  width: calc(100% - 24px);
  height: 104px;
  object-fit: contain;
  opacity: 0.86;
  filter: saturate(0.9) contrast(1.08);
}

.tile-rank,
.tile-name,
.tile-meta,
.tile-score,
.tile-stats {
  position: relative;
  z-index: 2;
  display: block;
}

.tile-rank {
  width: 34px;
  height: 28px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(216, 185, 103, 0.55);
  border-radius: 6px;
  color: #f8e5a5;
  background: linear-gradient(145deg, #2d2518, #94722f 58%, #1b1713);
  font-weight: 900;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.72);
}

.tile-name {
  margin-top: 96px;
  font-size: 18px;
  font-weight: 800;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.85);
}

.tile-meta {
  margin-top: 4px;
  min-height: 34px;
  color: rgba(244, 239, 230, 0.76);
  font-size: 12px;
  line-height: 1.35;
}

.tile-score {
  margin-top: 6px;
  color: var(--gold);
  font-size: 22px;
  font-weight: 900;
}

.tile-stats {
  color: rgba(232, 215, 179, 0.82);
  font-size: 12px;
}

.character-card {
  display: grid;
  grid-template-columns: 76px 1.1fr 1.4fr;
  gap: 18px;
  align-items: stretch;
  padding: 16px;
  position: relative;
  overflow: hidden;
}

.detail-shell {
  margin-top: 18px;
}

.character-page {
  padding-top: 72px;
}

.character-page .section-heading h1 {
  margin: 0;
  font-size: clamp(42px, 8vw, 84px);
  line-height: 1;
  text-shadow: 0 0 16px rgba(216, 185, 103, 0.22);
}

.detail-card {
  border: 1px solid rgba(148, 114, 47, 0.5);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(148, 114, 47, 0.08), transparent 38%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.014)),
    rgba(24, 23, 27, 0.94);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.32);
  padding: 20px;
}

.detail-card.hunter {
  border-color: rgba(112, 26, 34, 0.72);
}

.detail-hero {
  display: grid;
  grid-template-columns: 132px 1fr;
  gap: 18px;
  align-items: center;
  margin-bottom: 18px;
}

.detail-hero img {
  width: 132px;
  height: 132px;
  border: 1px solid rgba(216, 185, 103, 0.44);
  border-radius: var(--radius);
  object-fit: cover;
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.34);
}

.detail-hero h3 {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin: 0;
  font-size: clamp(30px, 5vw, 54px);
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.detail-grid section {
  padding: 16px;
  border: 1px solid rgba(216, 185, 103, 0.18);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.025);
}

.detail-grid h4 {
  margin: 0 0 8px;
  color: var(--gold);
  font-size: 15px;
}

.detail-grid p {
  margin: 0;
  color: var(--muted);
  line-height: 1.8;
}

.detail-meters {
  margin-top: 16px;
}

.detail-nav {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.detail-nav a,
.detail-nav-disabled {
  display: flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  padding: 12px;
  border: 1px solid rgba(148, 114, 47, 0.42);
  border-radius: var(--radius);
  color: var(--gold);
  background: rgba(255, 255, 255, 0.035);
  text-align: center;
}

.detail-nav-disabled {
  color: var(--dim);
}

.environment-overview {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 16px;
}

.environment-card {
  padding: 18px;
  border: 1px solid rgba(148, 114, 47, 0.42);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.014)),
    rgba(24, 23, 27, 0.88);
}

.environment-card strong {
  display: block;
  margin-bottom: 8px;
  color: var(--gold);
  font-size: 18px;
}

.environment-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.75;
}

.wide-panel {
  grid-column: span 3;
}

.character-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: var(--dark-gold);
  opacity: 0.9;
}

.character-card.hunter::before {
  background: var(--hunter);
}

.character-card.survivor::before {
  background: var(--survivor);
}

.rank-badge {
  display: grid;
  place-items: center;
  min-height: 76px;
  border: 1px solid rgba(216, 185, 103, 0.5);
  border-radius: var(--radius);
  background:
    linear-gradient(145deg, #2d2518, #94722f 58%, #1b1713),
    var(--dark-gold);
  color: #f8e5a5;
  font-size: 28px;
  font-weight: 900;
  text-shadow: 0 1px 0 #3b2b12, 0 0 12px rgba(255, 226, 148, 0.36);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.18),
    inset 0 -18px 26px rgba(0, 0, 0, 0.24),
    0 12px 26px rgba(0, 0, 0, 0.26);
}

.character-main h3 {
  margin: 0;
  font-size: 24px;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.character-main p {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.65;
}

.character-main p strong {
  color: #e5d0a0;
}

.character-main .role-line {
  color: rgba(232, 215, 179, 0.9);
  font-size: 14px;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}

.cognition-line {
  margin-top: 12px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.65;
}

.cognition-line strong {
  color: #e5d7bf;
  font-weight: 700;
}

.tag {
  padding: 5px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: rgba(244, 239, 230, 0.78);
  font-size: 12px;
  background: rgba(255, 255, 255, 0.025);
}

.tier-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: 1px solid rgba(216, 185, 103, 0.62);
  border-radius: 50%;
  color: #f6d98b;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.16), transparent 34%),
    linear-gradient(160deg, #3a3020, #94722f 55%, #1a1510);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.22),
    inset 0 -8px 12px rgba(0, 0, 0, 0.28),
    0 7px 18px rgba(0, 0, 0, 0.24);
  font-size: 12px;
  font-weight: 800;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.6);
}

.meter-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 14px;
}

.metric {
  min-width: 0;
}

.metric-label {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: rgba(182, 171, 153, 0.82);
  font-size: 12px;
}

.metric-label strong {
  color: #ebdfc7;
  font-size: 14px;
}

.metric-bar {
  height: 8px;
  margin-top: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
  position: relative;
}

.metric-bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #3e4f5d, var(--blue));
  position: relative;
}

.metric-bar span::after {
  content: "";
  position: absolute;
  right: -3px;
  top: 50%;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: linear-gradient(145deg, #ead28d, #94722f);
  box-shadow: 0 0 8px rgba(216, 185, 103, 0.42);
  transform: translateY(-50%);
}

.metric-bar.good span {
  background: linear-gradient(90deg, #173d31, var(--green), var(--green-2));
}

.metric-bar.warn span {
  background: linear-gradient(90deg, #8b7032, #e0c271);
}

.metric-bar.pick span {
  background: linear-gradient(90deg, #334450, #6d8494);
}

.metric-bar.risk span {
  background: linear-gradient(90deg, #361116, var(--hunter), #9a2934);
}

.score-line {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-top: 12px;
}

.score-line strong {
  color: var(--gold);
  font-size: 34px;
  line-height: 1;
  text-shadow: 0 0 14px rgba(216, 185, 103, 0.26);
}

.score-line span {
  color: var(--muted);
}

.insight-panel {
  padding: 22px;
}

.insight-panel p {
  margin: 0;
  color: var(--muted);
  line-height: 1.85;
}

.section-sources {
  padding-top: 30px;
}

.source-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.source-list a {
  display: flex;
  min-height: 70px;
  align-items: center;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--gold);
  background: rgba(255, 255, 255, 0.035);
}

.signal-list {
  margin: 14px 0 0;
  padding-left: 18px;
  color: var(--muted);
  line-height: 1.75;
}

.schema-layout {
  display: grid;
  grid-template-columns: 1fr 0.9fr;
  gap: 18px;
  padding: 18px;
  background: rgba(255, 255, 255, 0.03);
}

pre {
  margin: 0;
  overflow: auto;
  padding: 18px;
  border-radius: var(--radius);
  color: #e8dcc8;
  background: #11100f;
  line-height: 1.6;
}

.data-notes {
  padding: 20px;
}

.data-notes ul {
  margin: 12px 0 0;
  padding-left: 20px;
  color: var(--muted);
  line-height: 1.8;
}

.footer {
  width: min(var(--max), calc(100% - 32px));
  margin: 0 auto;
  padding: 34px 0 46px;
  color: rgba(117, 107, 96, 0.74);
  border-top: 1px solid var(--line);
}

@media (max-width: 900px) {
  .nav-shell {
    align-items: flex-start;
    flex-direction: column;
    padding: 14px 0;
  }

  .nav-links {
    width: 100%;
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .hero {
    min-height: auto;
  }

  .hero-content {
    padding-top: 72px;
  }

  .hero-backdrop::after {
    opacity: 0.35;
    right: -18vw;
  }

  .notice-band,
  .rank-summary,
  .environment-overview,
  .schema-layout,
  .character-card {
    grid-template-columns: 1fr;
  }

  .notice-band {
    display: grid;
  }

  .model-grid,
  .insight-grid,
  .definition-grid,
  .source-list {
    grid-template-columns: 1fr;
  }

  .part-control {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .toolbar {
    top: 110px;
  }

  .detail-grid,
  .detail-hero,
  .detail-nav {
    grid-template-columns: 1fr;
  }

  .wide-panel {
    grid-column: span 1;
  }
}

@media (max-width: 560px) {
  .hero-stats,
  .meter-grid {
    grid-template-columns: 1fr;
  }

  .segmented-control {
    width: 100%;
    grid-auto-flow: row;
  }

  .segmented-control label {
    justify-content: flex-start;
  }

  .toolbar {
    position: static;
  }

  .character-card {
    padding: 12px;
  }

  .rank-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .character-tile {
    min-height: 176px;
  }

  .tile-name {
    margin-top: 82px;
    font-size: 16px;
  }

  .character-tile img {
    height: 88px;
  }

  .detail-card {
    padding: 14px;
  }
}
