/* ==========================================================================
   小恐龙的小毛孩 · Design System & Layout
   Apple / Google Editorial Standards · Anchored in Brand Seal Vermilion
   ========================================================================== */

:root {
  /* Brand Palette (Sampled from Official Seal) */
  --brand: #e84e08;
  --brand-hover: #cc4102;
  --brand-soft: #fff2eb;
  --brand-border: rgba(232, 78, 8, 0.18);

  /* Semantic Palette */
  --ok: #0d8a5f;
  --ok-bg: #ebfaf3;
  --ok-border: rgba(13, 138, 95, 0.18);
  --warn: #c45106;
  --warn-bg: #fff5eb;
  --warn-border: rgba(196, 81, 6, 0.18);

  /* Neutral Surfaces (Apple-inspired crisp light hierarchy) */
  --bg: #ffffff;
  --bg-alt: #f5f5f7;
  --bg-elevated: #ffffff;
  --bg-glass: rgba(255, 255, 255, 0.78);

  /* Typography Ink */
  --ink: #1d1d1f;
  --ink-2: #515154;
  --ink-3: #86868b;

  /* Borders & Shadows */
  --hairline: rgba(0, 0, 0, 0.08);
  --hairline-subtle: rgba(0, 0, 0, 0.05);
  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.04), 0 1px 2px rgba(0, 0, 0, 0.03);
  --shadow-md: 0 8px 28px rgba(0, 0, 0, 0.06), 0 2px 6px rgba(0, 0, 0, 0.03);
  --shadow-lg: 0 24px 64px rgba(0, 0, 0, 0.12), 0 4px 16px rgba(0, 0, 0, 0.05);

  /* Radii */
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;
  --radius-pill: 999px;

  /* Layout & Motion */
  --container: 1200px;
  --nav-height: 64px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --font-sans: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text",
    "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC",
    "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
}

/* Reset & Base */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-height) + 20px);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.65;
  font-size: 15px;
  overflow-x: hidden;
}

img {
  display: block;
  max-width: 100%;
}

button,
input,
select {
  font: inherit;
  color: inherit;
}

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

:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}

.skip-link {
  position: absolute;
  top: -100px;
  left: 16px;
  z-index: 999;
  padding: 10px 16px;
  background: var(--ink);
  color: #fff;
  border-radius: var(--radius-sm);
  font-weight: 600;
}
.skip-link:focus {
  top: 12px;
}

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

.container-narrow {
  max-width: 820px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid transparent;
  border-radius: var(--radius-pill);
  font-weight: 600;
  letter-spacing: -0.01em;
  cursor: pointer;
  transition: transform 0.2s var(--ease), background-color 0.2s var(--ease),
    border-color 0.2s var(--ease), box-shadow 0.2s var(--ease), color 0.2s var(--ease);
  white-space: nowrap;
}
.btn:active {
  transform: scale(0.98);
}

.btn-sm {
  height: 36px;
  padding: 0 16px;
  font-size: 13.5px;
}

.btn-lg {
  height: 48px;
  padding: 0 24px;
  font-size: 15px;
}

.btn-primary {
  background: var(--brand);
  color: #fff;
  box-shadow: 0 4px 14px rgba(232, 78, 8, 0.24);
}
.btn-primary:hover {
  background: var(--brand-hover);
  box-shadow: 0 6px 20px rgba(232, 78, 8, 0.32);
  transform: translateY(-1px);
}

.btn-secondary {
  background: var(--bg-elevated);
  color: var(--ink);
  border-color: var(--hairline);
  box-shadow: var(--shadow-xs);
}
.btn-secondary:hover {
  background: var(--bg-alt);
  border-color: rgba(0, 0, 0, 0.14);
}

.btn-ghost {
  background: transparent;
  color: var(--ink-2);
}
.btn-ghost:hover {
  background: rgba(0, 0, 0, 0.05);
  color: var(--ink);
}

.btn-link {
  border: 0;
  background: none;
  color: var(--brand);
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
  transition: background-color 0.18s var(--ease);
}
.btn-link:hover {
  background: var(--brand-soft);
}

/* ==========================================================================
   Global Navigation
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg-glass);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--hairline-subtle);
  transition: box-shadow 0.25s var(--ease), border-color 0.25s var(--ease);
}

.site-header.scrolled {
  border-bottom-color: var(--hairline);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
}

.nav-inner {
  height: var(--nav-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.brand-logo {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 1px 4px rgba(232, 78, 8, 0.18);
}

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

.brand-name {
  font-size: 15.5px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.brand-sub {
  font-size: 11px;
  color: var(--ink-3);
  font-weight: 500;
  letter-spacing: 0.01em;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-links a {
  padding: 7px 12px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--ink-2);
  border-radius: var(--radius-pill);
  transition: color 0.18s var(--ease), background-color 0.18s var(--ease);
}
.nav-links a:hover {
  color: var(--ink);
  background: rgba(0, 0, 0, 0.045);
}
.nav-links a.is-active {
  color: var(--brand);
  background: var(--brand-soft);
  font-weight: 600;
}

/* Global Scroll Reading Progress Bar */
.scroll-progress-track {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: transparent;
  pointer-events: none;
  overflow: hidden;
}

.scroll-progress-bar {
  height: 100%;
  width: 100%;
  background: linear-gradient(90deg, var(--brand) 0%, #ff8547 100%);
  transform-origin: left center;
  transform: scaleX(0);
  will-change: transform;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-toggle {
  display: none;
  width: 38px;
  height: 38px;
  border: 0;
  background: transparent;
  border-radius: 50%;
  cursor: pointer;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.nav-toggle span {
  display: block;
  width: 18px;
  height: 1.8px;
  background: var(--ink);
  border-radius: 2px;
  transition: transform 0.2s var(--ease);
}

.mobile-drawer {
  border-top: 1px solid var(--hairline-subtle);
  background: rgba(255, 255, 255, 0.96);
  padding: 12px 24px 20px;
}

.mobile-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.mobile-nav a {
  padding: 11px 12px;
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-weight: 500;
  color: var(--ink);
}
.mobile-nav a:hover {
  background: var(--bg-alt);
}

/* ==========================================================================
   Hero Section
   ========================================================================== */
.hero {
  position: relative;
  padding: 72px 0 88px;
  overflow: hidden;
}

/* Subtle diamond lattice watermark referencing the official emblem */
.hero-bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  background-color: #ffffff;
  background-image:
    radial-gradient(ellipse 70% 60% at 80% 18%, rgba(232, 78, 8, 0.09) 0%, transparent 65%),
    radial-gradient(ellipse 50% 45% at 12% 85%, rgba(255, 168, 92, 0.08) 0%, transparent 65%),
    linear-gradient(135deg, rgba(232, 78, 8, 0.028) 1px, transparent 1px),
    linear-gradient(45deg, rgba(232, 78, 8, 0.028) 1px, transparent 1px);
  background-size: 100% 100%, 100% 100%, 40px 40px, 40px 40px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 1) 70%, rgba(0, 0, 0, 0));
  -webkit-mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 1) 70%, rgba(0, 0, 0, 0));
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
  gap: 56px;
  align-items: center;
}

.eyebrow-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  background: var(--brand-soft);
  border: 1px solid var(--brand-border);
  color: var(--brand);
  font-size: 12.5px;
  font-weight: 600;
  margin-bottom: 22px;
}

.pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--brand);
  box-shadow: 0 0 0 4px rgba(232, 78, 8, 0.16);
}

.hero-title {
  margin: 0;
  font-size: clamp(36px, 4.6vw, 56px);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -0.03em;
  color: var(--ink);
}

.hero-title-accent {
  display: block;
  margin-top: 8px;
  font-size: clamp(24px, 3vw, 38px);
  font-weight: 700;
  color: var(--ink-2);
  letter-spacing: -0.025em;
  line-height: 1.24;
}

.hero-en {
  margin: 14px 0 0;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--brand);
}

.hero-lead {
  margin: 18px 0 0;
  max-width: 540px;
  font-size: 16.5px;
  line-height: 1.7;
  color: var(--ink-2);
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.hero-metrics {
  margin: 40px 0 0;
  padding-top: 28px;
  border-top: 1px solid var(--hairline);
  display: flex;
  align-items: center;
  gap: 28px;
  flex-wrap: wrap;
}

.hero-metric dt {
  font-size: 12.5px;
  color: var(--ink-3);
  font-weight: 500;
  margin-bottom: 4px;
}

.hero-metric dd {
  margin: 0;
  font-size: 30px;
  font-weight: 750;
  letter-spacing: -0.03em;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}

.metric-unit {
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-3);
  margin-left: 3px;
}
.metric-unit em {
  font-style: normal;
  color: var(--ok);
  font-weight: 700;
}

.hero-metric-divider {
  width: 1px;
  height: 38px;
  background: var(--hairline);
}

/* Hero Visual Showcase */
.showcase-stage {
  position: relative;
  padding: 16px 16px 0;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.showcase-mosaic {
  position: relative;
  width: 100%;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.mosaic-card {
  position: relative;
  border: 0;
  padding: 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 1 / 1;
  background: var(--bg-alt);
  box-shadow: var(--shadow-md);
  cursor: pointer;
  transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease);
}

.mosaic-card:nth-child(2) {
  transform: translateY(18px);
}
.mosaic-card:nth-child(3) {
  transform: translateY(-6px);
}
.mosaic-card:nth-child(4) {
  transform: translateY(12px);
}

.mosaic-card:hover {
  transform: translateY(-4px) scale(1.02);
  box-shadow: var(--shadow-lg);
  z-index: 2;
}

.mosaic-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 22%;
  transition: transform 0.6s var(--ease);
}
.mosaic-card:hover img {
  transform: scale(1.05);
}

.mosaic-caption {
  position: absolute;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  background: rgba(29, 29, 31, 0.72);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.01em;
}

/* Position each mosaic caption on its unobstructed outer corner */
.mosaic-a .mosaic-caption {
  top: 12px;
  left: 12px;
}
.mosaic-b .mosaic-caption {
  top: 12px;
  right: 12px;
}
.mosaic-c .mosaic-caption {
  bottom: 12px;
  left: 12px;
}
.mosaic-d .mosaic-caption {
  top: 12px;
  right: 12px;
}

.showcase-emblem {
  position: absolute;
  top: 45%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 5;
  width: 112px;
  height: 112px;
  border-radius: 50%;
  background: #ffffff;
  padding: 6px;
  box-shadow: 0 14px 36px rgba(232, 78, 8, 0.2), 0 0 0 6px rgba(255, 255, 255, 0.85);
}

.showcase-emblem img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

.showcase-float-badge {
  position: relative;
  z-index: 6;
  margin-top: 28px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 18px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(14px);
  border: 1px solid var(--hairline);
  box-shadow: var(--shadow-sm);
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
}

.badge-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--brand);
}

/* ==========================================================================
   Shared Section Layout
   ========================================================================== */
.section {
  padding: 96px 0;
}

.section-alt {
  background: var(--bg-alt);
}

.section-head {
  max-width: 680px;
  margin-bottom: 48px;
}

.section-head-center {
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

.section-head-split {
  max-width: none;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}
.section-head-split > div:first-child {
  max-width: 660px;
}

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

.section-title {
  margin: 0;
  font-size: clamp(28px, 3.4vw, 42px);
  font-weight: 750;
  line-height: 1.18;
  letter-spacing: -0.028em;
  color: var(--ink);
}

.section-desc {
  margin: 14px 0 0;
  font-size: 16px;
  line-height: 1.7;
  color: var(--ink-2);
}

/* ==========================================================================
   About / Pillars Section
   ========================================================================== */
.pillars-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.pillar-card {
  background: var(--bg-elevated);
  border: 1px solid var(--hairline-subtle);
  border-radius: var(--radius-lg);
  padding: 32px 28px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

.pillar-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.pillar-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: var(--brand-soft);
  color: var(--brand);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}

.pillar-card h3 {
  margin: 0 0 10px;
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -0.015em;
}

.pillar-card p {
  margin: 0;
  color: var(--ink-2);
  font-size: 14.5px;
  line-height: 1.7;
}

/* ==========================================================================
   Data Insights Bento Grid
   ========================================================================== */
.bento-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 20px;
}

.bento-card {
  background: var(--bg-alt);
  border: 1px solid var(--hairline-subtle);
  border-radius: var(--radius-lg);
  padding: 28px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: border-color 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
.bento-card:hover {
  border-color: var(--hairline);
  box-shadow: var(--shadow-sm);
}

.bento-tnr {
  grid-column: span 5;
  background: linear-gradient(155deg, #ffffff 0%, #fff7f2 100%);
  border-color: var(--brand-border);
}

.bento-status {
  grid-column: span 4;
}

.bento-gender {
  grid-column: span 3;
}

.bento-colors {
  grid-column: span 7;
}

.bento-ages {
  grid-column: span 5;
}

.bento-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 22px;
}

.bento-kicker {
  margin: 0 0 4px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--ink-3);
}

.bento-title {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.015em;
}

.bento-meta {
  font-size: 12.5px;
  color: var(--ink-3);
  font-weight: 500;
  white-space: nowrap;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}
.status-pill-ok {
  background: var(--ok-bg);
  color: var(--ok);
  border: 1px solid var(--ok-border);
}
.status-pill-warn {
  background: var(--warn-bg);
  color: var(--warn);
  border: 1px solid var(--warn-border);
}
.status-pill-neutral {
  background: rgba(0, 0, 0, 0.05);
  color: var(--ink-2);
}

/* TNR Ring */
.tnr-ring-layout {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}

.ring-wrap {
  position: relative;
  width: 146px;
  height: 146px;
  flex-shrink: 0;
}

.ring-svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.ring-track {
  fill: none;
  stroke: rgba(232, 78, 8, 0.12);
  stroke-width: 12;
}

.ring-fill {
  fill: none;
  stroke: var(--brand);
  stroke-width: 12;
  stroke-linecap: round;
  transition: stroke-dashoffset 1.2s var(--ease);
}

.ring-center {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.ring-center strong {
  font-size: 27px;
  font-weight: 800;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}

.ring-center span {
  font-size: 11.5px;
  color: var(--ink-3);
  margin-top: 2px;
}

.tnr-breakdown {
  flex: 1;
  min-width: 160px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.tnr-stat-btn {
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--hairline-subtle);
  background: #ffffff;
  cursor: pointer;
  text-align: left;
  transition: transform 0.2s var(--ease), border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.tnr-stat-btn:hover {
  transform: translateX(2px);
  border-color: var(--brand-border);
  box-shadow: var(--shadow-xs);
}

.tnr-stat-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink-2);
}

.tnr-stat-btn strong {
  font-size: 20px;
  font-weight: 750;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}

.tnr-stat-arrow {
  font-size: 12px;
  color: var(--brand);
  font-weight: 600;
}

.dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
}
.dot-ok {
  background: var(--ok);
}
.dot-warn {
  background: var(--brand);
}

/* Status Card */
.status-numbers {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.status-block {
  border: 1px solid var(--hairline-subtle);
  background: #ffffff;
  border-radius: var(--radius-md);
  padding: 14px;
  text-align: left;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 2px;
  transition: border-color 0.2s var(--ease), transform 0.2s var(--ease);
}
.status-block:hover {
  border-color: var(--brand-border);
  transform: translateY(-2px);
}
.status-block-label {
  font-size: 12.5px;
  color: var(--ink-3);
  font-weight: 500;
}
.status-block strong {
  font-size: 28px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
}
.status-block-sub {
  font-size: 12px;
  color: var(--ink-2);
  font-variant-numeric: tabular-nums;
}

.stacked-bar {
  height: 10px;
  border-radius: var(--radius-pill);
  background: rgba(0, 0, 0, 0.06);
  overflow: hidden;
  display: flex;
  gap: 3px;
}

.stacked-seg {
  height: 100%;
  border-radius: var(--radius-pill);
  transition: width 0.8s var(--ease);
}
.stacked-resident {
  background: var(--ink);
}
.stacked-temp {
  background: var(--brand);
}

.bento-footnote {
  margin: 14px 0 0;
  font-size: 12.5px;
  color: var(--ink-3);
  line-height: 1.55;
}

/* Gender Breakdown */
.gender-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
  flex: 1;
  justify-content: center;
}

.gender-item {
  width: 100%;
  border: 1px solid var(--hairline-subtle);
  background: #ffffff;
  border-radius: var(--radius-md);
  padding: 14px;
  cursor: pointer;
  text-align: left;
  transition: border-color 0.2s var(--ease), transform 0.2s var(--ease);
}
.gender-item:hover {
  border-color: var(--brand-border);
  transform: translateY(-2px);
}

.gender-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 8px;
}
.gender-top strong {
  font-size: 15px;
  font-weight: 700;
}
.gender-top span {
  font-size: 13px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--ink-2);
}

.mini-progress {
  height: 7px;
  border-radius: var(--radius-pill);
  background: rgba(0, 0, 0, 0.06);
  overflow: hidden;
  margin-bottom: 6px;
}
.mini-progress-fill {
  height: 100%;
  border-radius: var(--radius-pill);
  background: var(--brand);
}
.gender-item[data-sex="母"] .mini-progress-fill {
  background: var(--brand);
}
.gender-item[data-sex="公"] .mini-progress-fill {
  background: var(--ok);
}

.gender-sub {
  font-size: 12px;
  color: var(--ink-3);
  font-variant-numeric: tabular-nums;
}

/* Coat Color & Age Interactive Bars */
.color-bars {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 20px;
}

.bar-row {
  border: 0;
  background: transparent;
  padding: 6px 8px;
  margin: 0 -8px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: background-color 0.18s var(--ease);
}
.bar-row:hover {
  background: rgba(255, 255, 255, 0.9);
}

.bar-row-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13.5px;
}

.bar-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  color: var(--ink);
}

.coat-swatch {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 1px solid rgba(0, 0, 0, 0.14);
  flex-shrink: 0;
}

.bar-count {
  font-size: 13px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--ink-2);
}

.bar-track {
  height: 7px;
  border-radius: var(--radius-pill);
  background: rgba(0, 0, 0, 0.06);
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  border-radius: var(--radius-pill);
  background: linear-gradient(90deg, var(--brand) 0%, #f5823d 100%);
  transition: width 0.8s var(--ease);
}

.age-bars {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.age-bars .bar-fill {
  background: linear-gradient(90deg, #1d1d1f 0%, #52525b 100%);
}
.age-bars .bar-row:hover .bar-fill {
  background: linear-gradient(90deg, var(--brand) 0%, #f5823d 100%);
}

/* ==========================================================================
   Cat Roster Section
   ========================================================================== */
.filter-console {
  background: var(--bg-elevated);
  border: 1px solid var(--hairline-subtle);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.filter-top-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.search-field {
  flex: 1 1 280px;
  position: relative;
  display: flex;
  align-items: center;
}

.search-icon {
  position: absolute;
  left: 14px;
  color: var(--ink-3);
  pointer-events: none;
}

.search-field input {
  width: 100%;
  height: 44px;
  padding: 0 42px 0 42px;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-md);
  background: var(--bg-alt);
  font-size: 14.5px;
  transition: background-color 0.18s var(--ease), border-color 0.18s var(--ease), box-shadow 0.18s var(--ease);
}
.search-field input::placeholder {
  color: var(--ink-3);
}
.search-field input:focus {
  outline: none;
  background: #ffffff;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(232, 78, 8, 0.12);
}

.search-kbd {
  position: absolute;
  right: 12px;
  padding: 2px 7px;
  border-radius: 6px;
  border: 1px solid var(--hairline);
  background: #ffffff;
  color: var(--ink-3);
  font-family: var(--font-mono);
  font-size: 11px;
  pointer-events: none;
}

.search-clear {
  position: absolute;
  right: 10px;
  width: 24px;
  height: 24px;
  border: 0;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.08);
  color: var(--ink-2);
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.search-clear:hover {
  background: rgba(0, 0, 0, 0.15);
}

.filter-controls-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.select-wrap {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  padding: 0 12px;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-sm);
  background: #ffffff;
}

.select-label {
  font-size: 12.5px;
  color: var(--ink-3);
  font-weight: 500;
  white-space: nowrap;
}

.select-wrap select {
  border: 0;
  background: transparent;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink);
  cursor: pointer;
  padding-right: 4px;
}
.select-wrap select:focus {
  outline: none;
}

.view-switch {
  display: inline-flex;
  padding: 3px;
  border-radius: var(--radius-sm);
  background: var(--bg-alt);
  border: 1px solid var(--hairline-subtle);
}

.view-btn {
  width: 34px;
  height: 32px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--ink-3);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.18s var(--ease), color 0.18s var(--ease), box-shadow 0.18s var(--ease);
}
.view-btn.active {
  background: #ffffff;
  color: var(--ink);
  box-shadow: var(--shadow-xs);
}

.filter-facets {
  display: flex;
  align-items: center;
  gap: 16px 24px;
  flex-wrap: wrap;
  padding-top: 14px;
  border-top: 1px solid var(--hairline-subtle);
}

.facet-group {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.facet-label {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink-3);
  margin-right: 4px;
}

.chip {
  height: 32px;
  padding: 0 13px;
  border: 1px solid transparent;
  border-radius: var(--radius-pill);
  background: var(--bg-alt);
  color: var(--ink-2);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.18s var(--ease);
}
.chip:hover {
  background: #eaeaf0;
  color: var(--ink);
}
.chip.active {
  background: var(--ink);
  color: #ffffff;
  font-weight: 600;
}

.facet-selects {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
  flex-wrap: wrap;
}

/* Roster Meta Bar */
.roster-meta-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin: 22px 0 20px;
}

.result-count {
  margin: 0;
  font-size: 14px;
  color: var(--ink-2);
  font-variant-numeric: tabular-nums;
}
.result-count strong {
  color: var(--ink);
  font-weight: 700;
}

.active-tags {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.active-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  background: var(--brand-soft);
  border: 1px solid var(--brand-border);
  color: var(--brand);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
}
.active-tag:hover {
  background: #ffe5d6;
}

/* Roster Grid (Gallery Mode) */
.roster-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
}

.cat-card {
  border: 1px solid var(--hairline-subtle);
  background: var(--bg-elevated);
  border-radius: var(--radius-lg);
  overflow: hidden;
  padding: 0;
  text-align: left;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-sm);
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease), border-color 0.3s var(--ease);
}

.cat-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
  border-color: rgba(0, 0, 0, 0.11);
}

.cat-media {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3.6;
  background: #ececef;
  overflow: hidden;
}

.cat-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 22%;
  transition: transform 0.55s var(--ease);
}

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

.cat-seq {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 3px 9px;
  border-radius: var(--radius-pill);
  background: rgba(29, 29, 31, 0.68);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: #ffffff;
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.cat-tnr-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  font-size: 11.5px;
  font-weight: 700;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.cat-tnr-badge.is-neutered {
  background: rgba(235, 250, 243, 0.92);
  color: var(--ok);
}
.cat-tnr-badge.is-pending {
  background: rgba(255, 245, 235, 0.92);
  color: var(--warn);
}

.cat-tnr-badge::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.cat-body {
  padding: 16px 18px 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}

.cat-name-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.cat-name {
  margin: 0;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.015em;
  color: var(--ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cat-sex-chip {
  flex-shrink: 0;
  font-size: 12px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  background: var(--bg-alt);
  color: var(--ink-2);
}

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

.attr-pill {
  padding: 3px 9px;
  border-radius: 7px;
  background: var(--bg-alt);
  color: var(--ink-2);
  font-size: 12px;
  font-weight: 500;
}

.attr-pill-temp {
  background: var(--brand-soft);
  color: var(--brand);
}
.attr-pill-ok {
  background: var(--ok-bg);
  color: var(--ok);
}

/* Optional Announcement Bar (site-config.js) */
.announce-bar {
  background: #1d1d1f;
  color: #f5f5f7;
  font-size: 13px;
}
.announce-bar[hidden] {
  display: none;
}
.announce-inner {
  min-height: 40px;
  padding-top: 8px;
  padding-bottom: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  position: relative;
}
.announce-badge {
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--brand);
  color: #ffffff;
  font-size: 11px;
  font-weight: 700;
}
.announce-link {
  color: #ff9966;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.announce-close {
  position: absolute;
  right: 16px;
  border: 0;
  background: transparent;
  color: rgba(245, 245, 247, 0.7);
  font-size: 18px;
  cursor: pointer;
  line-height: 1;
  padding: 4px;
}
.announce-close:hover {
  color: #ffffff;
}

/* Optional Footer Contacts & Modal Custom Bio */
.footer-contacts {
  margin-top: 14px !important;
  display: flex !important;
  flex-direction: column;
  gap: 6px !important;
  grid-template-columns: none !important;
}
.footer-contacts li {
  font-size: 13px;
  color: var(--ink-2);
}
.footer-contacts strong {
  color: var(--ink);
  margin-right: 6px;
}
.footer-contacts a {
  color: var(--brand);
  font-weight: 600;
}
.modal-custom-bio {
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  background: var(--bg-alt);
  border-left: 3px solid var(--brand);
  font-size: 13.5px;
  color: var(--ink);
  line-height: 1.65;
}
.modal-custom-bio[hidden] {
  display: none;
}

/* Compact List Mode */
.roster-grid.view-list {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.roster-grid.view-list .cat-card {
  flex-direction: row;
  align-items: center;
  border-radius: var(--radius-md);
  padding: 10px;
  gap: 14px;
}

.roster-grid.view-list .cat-card:hover {
  transform: translateY(-2px);
}

.roster-grid.view-list .cat-media {
  width: 82px;
  height: 82px;
  aspect-ratio: 1 / 1;
  border-radius: 12px;
  flex-shrink: 0;
}

.roster-grid.view-list .cat-seq,
.roster-grid.view-list .cat-tnr-badge {
  display: none;
}

.roster-grid.view-list .cat-body {
  padding: 0 6px 0 0;
  gap: 6px;
  min-width: 0;
}

.list-inline-meta {
  display: none;
}

.roster-grid.view-list .list-inline-meta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
}

/* Skeleton Loader */
.skeleton-card {
  height: 310px;
  border-radius: var(--radius-lg);
  background: linear-gradient(90deg, #ececef 25%, #f5f5f7 50%, #ececef 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite linear;
}
@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 72px 24px;
  background: #ffffff;
  border-radius: var(--radius-lg);
  border: 1px dashed var(--hairline);
}
.empty-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 16px;
  border-radius: 50%;
  background: var(--bg-alt);
  color: var(--ink-3);
  display: flex;
  align-items: center;
  justify-content: center;
}
.empty-state h3 {
  margin: 0 0 8px;
  font-size: 20px;
}
.empty-state p {
  margin: 0 0 22px;
  color: var(--ink-2);
}

/* ==========================================================================
   TNR Science Section
   ========================================================================== */
.tnr-steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
}

.tnr-step {
  background: var(--bg-alt);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  border: 1px solid var(--hairline-subtle);
  transition: transform 0.25s var(--ease), background-color 0.25s var(--ease);
}
.tnr-step:hover {
  transform: translateY(-3px);
  background: #ffffff;
  box-shadow: var(--shadow-md);
}

.step-num {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  color: var(--brand);
  background: var(--brand-soft);
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  margin-bottom: 16px;
}

.tnr-step h3 {
  margin: 0 0 10px;
  font-size: 17.5px;
  font-weight: 700;
}

.tnr-step p {
  margin: 0;
  font-size: 14px;
  color: var(--ink-2);
  line-height: 1.68;
}

.ear-tip-banner {
  margin-top: 28px;
  padding: 28px 32px;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, #fff5ef 0%, #ffffff 100%);
  border: 1px solid var(--brand-border);
  display: flex;
  align-items: flex-start;
  gap: 20px;
}

.ear-tip-icon {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  background: var(--brand);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.ear-tip-content h3 {
  margin: 0 0 8px;
  font-size: 18px;
  font-weight: 700;
}
.ear-tip-content p {
  margin: 0;
  font-size: 14.5px;
  color: var(--ink-2);
  line-height: 1.7;
}

/* ==========================================================================
   Campus Coexistence Guide
   ========================================================================== */
.guide-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

.guide-card {
  background: #ffffff;
  border-radius: var(--radius-lg);
  padding: 32px;
  border: 1px solid var(--hairline-subtle);
  box-shadow: var(--shadow-sm);
}

.guide-card-head {
  margin-bottom: 24px;
}

.guide-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 10px;
}

.guide-badge-do {
  background: var(--ok-bg);
  color: var(--ok);
}

.guide-badge-dont {
  background: var(--brand-soft);
  color: var(--brand);
}

.guide-card-head h3 {
  margin: 0;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.guide-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.guide-list li {
  position: relative;
  padding-left: 22px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.guide-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.guide-do .guide-list li::before {
  background: var(--ok);
}

.guide-dont .guide-list li::before {
  background: var(--brand);
}

.guide-list strong {
  font-size: 15px;
  font-weight: 650;
  color: var(--ink);
}

.guide-list span {
  font-size: 14px;
  color: var(--ink-2);
  line-height: 1.65;
}

/* ==========================================================================
   FAQ Section
   ========================================================================== */
.faq-list {
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--hairline);
}

.faq-item {
  border-bottom: 1px solid var(--hairline);
}

.faq-item summary {
  list-style: none;
  padding: 22px 36px 22px 0;
  font-size: 16.5px;
  font-weight: 650;
  color: var(--ink);
  cursor: pointer;
  position: relative;
  transition: color 0.18s var(--ease);
}
.faq-item summary::-webkit-details-marker {
  display: none;
}
.faq-item summary:hover {
  color: var(--brand);
}

.faq-item summary::after {
  content: "+";
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 22px;
  font-weight: 400;
  color: var(--ink-3);
  transition: transform 0.25s var(--ease), color 0.2s var(--ease);
}

.faq-item[open] summary::after {
  transform: translateY(-50%) rotate(45deg);
  color: var(--brand);
}

.faq-body {
  padding: 0 0 22px;
}
.faq-body p {
  margin: 0;
  font-size: 14.5px;
  color: var(--ink-2);
  line-height: 1.75;
}

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
  background: var(--bg-alt);
  border-top: 1px solid var(--hairline);
  padding: 64px 0 36px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr 0.8fr 1.2fr;
  gap: 40px;
  padding-bottom: 40px;
  border-bottom: 1px solid var(--hairline);
}

.footer-brand-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.footer-brand-row img {
  width: 44px;
  height: 44px;
  border-radius: 50%;
}

.footer-brand-row strong {
  display: block;
  font-size: 16px;
  font-weight: 700;
}

.footer-brand-row span {
  display: block;
  font-size: 12px;
  color: var(--ink-3);
}

.footer-slogan {
  margin: 0;
  font-size: 14px;
  color: var(--ink-2);
}

.footer-col h4 {
  margin: 0 0 14px;
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: 0.02em;
}

.footer-col ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 16px;
}

.footer-col a {
  font-size: 13.5px;
  color: var(--ink-2);
  transition: color 0.18s var(--ease);
}
.footer-col a:hover {
  color: var(--brand);
}

.footer-note {
  margin: 0 0 10px;
  font-size: 13.5px;
  color: var(--ink-2);
  line-height: 1.65;
}

.footer-bottom {
  padding-top: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 12.5px;
  color: var(--ink-3);
}

/* ==========================================================================
   Profile Detail Lightbox Modal
   ========================================================================== */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(15, 15, 18, 0.56);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  animation: fadeIn 0.22s var(--ease);
}

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

.modal-panel {
  position: relative;
  width: 100%;
  max-width: 880px;
  max-height: min(88vh, 640px);
  background: #ffffff;
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  animation: modalUp 0.28s var(--ease);
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes modalUp {
  from {
    opacity: 0;
    transform: translateY(16px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 10;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--hairline);
  background: rgba(255, 255, 255, 0.9);
  color: var(--ink);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.18s var(--ease), transform 0.18s var(--ease);
}
.modal-close:hover {
  background: #ffffff;
  transform: scale(1.06);
}

.modal-media {
  position: relative;
  background: #141416;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 340px;
  overflow: hidden;
}

.modal-media img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  max-height: min(88vh, 640px);
}

.modal-index-pill {
  position: absolute;
  top: 16px;
  left: 16px;
  padding: 5px 12px;
  border-radius: var(--radius-pill);
  background: rgba(20, 20, 22, 0.72);
  backdrop-filter: blur(8px);
  color: #ffffff;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
}

.modal-body {
  padding: 32px 30px 24px;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}

.modal-badges {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.modal-title {
  margin: 0;
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.2;
}

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

.spec-item {
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  background: var(--bg-alt);
}

.spec-item dt {
  font-size: 12px;
  color: var(--ink-3);
  margin-bottom: 2px;
}

.spec-item dd {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
}

.modal-note {
  margin-top: 18px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  background: var(--brand-soft);
  color: var(--ink-2);
  font-size: 13px;
  line-height: 1.6;
}

.modal-footer {
  margin-top: auto;
  padding-top: 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.modal-nav-group {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.modal-pos {
  font-size: 12.5px;
  color: var(--ink-3);
  font-variant-numeric: tabular-nums;
  padding: 0 6px;
}

/* Back to Top */
.back-to-top {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 90;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--hairline);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  color: var(--ink);
  box-shadow: var(--shadow-md);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s var(--ease), background-color 0.2s var(--ease);
}
.back-to-top[hidden] {
  display: none;
}
.back-to-top:hover {
  transform: translateY(-2px);
  background: #ffffff;
  color: var(--brand);
}

/* ==========================================================================
   Responsive Breakpoints
   ========================================================================== */
@media (max-width: 1080px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 48px;
  }
  .hero-visual {
    max-width: 560px;
    margin: 0 auto;
    width: 100%;
  }
  .bento-tnr,
  .bento-status,
  .bento-gender,
  .bento-colors,
  .bento-ages {
    grid-column: span 6;
  }
  .bento-tnr {
    grid-column: span 12;
  }
  .bento-colors {
    grid-column: span 12;
  }
  .bento-ages {
    grid-column: span 12;
  }
  .roster-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .tnr-steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 820px) {
  .nav-links,
  #navRandomBtn {
    display: none;
  }
  .nav-toggle {
    display: inline-flex;
  }
  .section {
    padding: 68px 0;
  }
  .hero {
    padding: 48px 0 64px;
  }
  .pillars-grid,
  .guide-grid,
  .footer-grid {
    grid-template-columns: 1fr;
  }
  .bento-status,
  .bento-gender {
    grid-column: span 12;
  }
  .roster-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
  }
  .roster-grid.view-list {
    grid-template-columns: 1fr;
  }
  .facet-selects {
    margin-left: 0;
  }
  .modal-panel {
    grid-template-columns: 1fr;
    max-height: 92vh;
  }
  .modal-media {
    min-height: 240px;
    max-height: 40vh;
  }
  .modal-body {
    padding: 22px 20px 20px;
  }
}

@media (max-width: 560px) {
  .container {
    padding: 0 16px;
  }
  .hero-metrics {
    gap: 18px;
  }
  .hero-metric-divider {
    display: none;
  }
  .hero-metric dd {
    font-size: 25px;
  }
  .showcase-emblem {
    width: 84px;
    height: 84px;
  }
  .color-bars {
    grid-template-columns: 1fr;
  }
  .tnr-steps {
    grid-template-columns: 1fr;
  }
  .ear-tip-banner {
    flex-direction: column;
    padding: 22px 20px;
  }
  .cat-body {
    padding: 12px 12px 14px;
  }
  .cat-name {
    font-size: 15px;
  }
  .search-kbd {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .scroll-story {
    height: auto !important;
  }
  .scroll-story-sticky {
    position: relative !important;
    top: 0 !important;
    height: auto !important;
    padding: 64px 0 !important;
  }
  .story-viewport {
    position: relative !important;
    height: auto !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 56px !important;
  }
  .story-act {
    position: relative !important;
    opacity: 1 !important;
    transform: none !important;
    pointer-events: auto !important;
  }
  .story-hud {
    display: none !important;
  }
  .scroll-float {
    opacity: 1 !important;
    transform: none !important;
  }
}

/* ==========================================================================
   Apple-Style Continuous Scroll-Linked Animations
   ========================================================================== */

/* Hero Scroll-Scrubbed Parallax */
.hero {
  --hero-p: 0;
}
.hero-copy {
  transform: translate3d(0, calc(var(--hero-p) * -28px), 0);
  opacity: calc(1 - var(--hero-p) * 0.45);
  will-change: transform, opacity;
}
.showcase-emblem {
  transform: translate(-50%, -44%)
    rotate(calc(var(--hero-p) * 28deg))
    scale(calc(1 + var(--hero-p) * 0.08));
  will-change: transform;
}
.mosaic-a {
  transform: translate3d(calc(var(--hero-p) * -18px), calc(var(--hero-p) * -24px), 0);
}
.mosaic-b {
  transform: translate3d(calc(var(--hero-p) * 18px), calc(18px + var(--hero-p) * -36px), 0);
}
.mosaic-c {
  transform: translate3d(calc(var(--hero-p) * -14px), calc(-6px + var(--hero-p) * 14px), 0);
}
.mosaic-d {
  transform: translate3d(calc(var(--hero-p) * 16px), calc(12px + var(--hero-p) * 24px), 0);
}

/* Continuous Scroll-Scrubbed Section Reveal */
.scroll-float {
  --rv: 1;
  transform: translate3d(0, calc((1 - var(--rv)) * 36px), 0)
    scale(calc(0.965 + var(--rv) * 0.035));
  opacity: calc(0.14 + var(--rv) * 0.86);
  will-change: transform, opacity;
}

/* ==========================================================================
   Sticky Scroll Storytelling Stage (3-Act Apple Keynote Theater)
   ========================================================================== */
.scroll-story {
  position: relative;
  height: 300vh;
  background: #0d0d10;
  --story-p: 0;
}

.scroll-story-sticky {
  position: sticky;
  top: var(--nav-height);
  height: calc(100vh - var(--nav-height));
  min-height: 540px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: #0d0d10;
  color: #f5f5f7;
}

.story-ambient {
  position: absolute;
  inset: -20%;
  background:
    radial-gradient(circle at calc(25% + var(--story-p) * 50%) calc(30% + var(--story-p) * 35%), rgba(232, 78, 8, 0.24) 0%, transparent 48%),
    radial-gradient(circle at calc(80% - var(--story-p) * 45%) 72%, rgba(255, 148, 77, 0.14) 0%, transparent 45%);
  pointer-events: none;
  will-change: background;
}

.story-grid-bg {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(135deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(45deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 48px 48px;
  opacity: 0.7;
  transform: translate3d(0, calc(var(--story-p) * -40px), 0);
  pointer-events: none;
}

.story-viewport {
  position: relative;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.story-act {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 24px 0 64px;
  opacity: 0;
  transform: translate3d(0, 40px, 0) scale(0.96);
  pointer-events: none;
  will-change: transform, opacity;
}

.story-act.is-visible {
  pointer-events: auto;
}

.story-eyebrow {
  margin: 0 0 14px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #ff7a3d;
}

.story-headline {
  margin: 0;
  font-size: clamp(32px, 4.8vw, 60px);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -0.032em;
  color: #ffffff;
}

.story-headline-muted {
  display: block;
  margin-top: 8px;
  font-size: clamp(22px, 3vw, 40px);
  font-weight: 700;
  background: linear-gradient(90deg, #ff9966 0%, #f5f5f7 65%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.story-headline-left {
  text-align: left;
}

.story-sub {
  margin: 18px auto 0;
  max-width: 600px;
  font-size: 16px;
  line-height: 1.72;
  color: rgba(245, 245, 247, 0.72);
}

.story-sub-left {
  margin-left: 0;
  text-align: left;
}

/* Act 1: Orbiting Real Cat Portrait Strip */
.story-orbit-cards {
  margin-top: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: nowrap;
  max-width: 100%;
}

.orbit-card {
  position: relative;
  width: 148px;
  height: 176px;
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: #1c1c20;
  padding: 0;
  cursor: pointer;
  flex-shrink: 0;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
  transition: border-color 0.2s var(--ease);
  will-change: transform;
}
.orbit-card:hover {
  border-color: #ff7a3d;
}
.orbit-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 22%;
}
.orbit-card span {
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: 8px;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(13, 13, 16, 0.74);
  backdrop-filter: blur(8px);
  color: #ffffff;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Act 2: Scrubbed TNR Ring */
.story-ring-stage {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 56px;
  max-width: 960px;
  width: 100%;
  margin-top: 12px;
}

.story-ring-box {
  position: relative;
  width: 240px;
  height: 240px;
  flex-shrink: 0;
}

.story-ring-svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
  filter: drop-shadow(0 0 24px rgba(232, 78, 8, 0.35));
}

.story-ring-track {
  fill: none;
  stroke: rgba(255, 255, 255, 0.1);
  stroke-width: 14;
}

.story-ring-progress {
  fill: none;
  stroke: url(#storyRingGrad);
  stroke-width: 14;
  stroke-linecap: round;
  will-change: stroke-dashoffset;
}

.story-ring-readout {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.story-ring-readout strong {
  font-size: 46px;
  font-weight: 800;
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
  color: #ffffff;
  line-height: 1.05;
}

.story-ring-readout span {
  font-size: 13px;
  color: rgba(245, 245, 247, 0.68);
  margin-top: 6px;
}

.story-ring-copy {
  flex: 1;
  min-width: 0;
}

/* Act 3: Seal Reveal */
.story-seal-wrap {
  width: 132px;
  height: 132px;
  border-radius: 50%;
  padding: 6px;
  background: #ffffff;
  margin-bottom: 24px;
  box-shadow: 0 0 0 10px rgba(232, 78, 8, 0.14), 0 20px 60px rgba(232, 78, 8, 0.35);
  will-change: transform;
}
.story-seal-wrap img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

/* Story Bottom HUD */
.story-hud {
  position: relative;
  z-index: 5;
  width: min(520px, calc(100% - 48px));
  margin: 0 auto 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.story-hud-steps {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: rgba(245, 245, 247, 0.4);
}

.story-hud-step {
  transition: color 0.25s var(--ease);
}
.story-hud-step.active {
  color: #ffffff;
}

.story-hud-bar {
  height: 3px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  overflow: hidden;
}

.story-hud-fill {
  height: 100%;
  width: 100%;
  background: linear-gradient(90deg, #ff7a33 0%, var(--brand) 100%);
  transform-origin: left center;
  transform: scaleX(0);
  will-change: transform;
}

/* ==========================================================================
   Integrated Continuous Dual-Row Cat Photo Ribbon (inside #roster)
   ========================================================================== */
.photo-ribbon {
  padding: 0 0 36px;
  background: transparent;
  overflow: hidden;
}

.ribbon-viewport {
  display: flex;
  flex-direction: column;
  gap: 12px;
  mask-image: linear-gradient(90deg, transparent 0%, #000 8%, #000 92%, transparent 100%);
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 8%, #000 92%, transparent 100%);
}

.ribbon-track {
  display: flex;
  gap: 12px;
  width: max-content;
  will-change: transform;
}

.ribbon-card {
  position: relative;
  width: 132px;
  height: 132px;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid var(--hairline-subtle);
  background: #ffffff;
  padding: 0;
  cursor: pointer;
  flex-shrink: 0;
  box-shadow: var(--shadow-xs);
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

.ribbon-card:hover {
  transform: scale(1.04);
  box-shadow: var(--shadow-md);
  z-index: 2;
}

.ribbon-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 22%;
}

.ribbon-label {
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: 8px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(29, 29, 31, 0.72);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: #ffffff;
  font-size: 11.5px;
  font-weight: 600;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  opacity: 0.92;
}

@media (max-width: 900px) {
  .story-ring-stage {
    flex-direction: column;
    gap: 24px;
    text-align: center;
  }
  .story-headline-left,
  .story-sub-left {
    text-align: center;
    margin-left: auto;
  }
  .story-ring-box {
    width: 184px;
    height: 184px;
  }
  .story-ring-readout strong {
    font-size: 36px;
  }
  .orbit-card {
    width: 116px;
    height: 140px;
  }
  .orbit-card.orbit-1,
  .orbit-card.orbit-5 {
    display: none;
  }
}

@media (max-width: 600px) {
  .scroll-story {
    height: 240vh;
  }
  .ribbon-card {
    width: 108px;
    height: 108px;
    border-radius: 14px;
  }
  .story-hud-steps {
    font-size: 11px;
  }
}
