@font-face {
  font-family: "Blueaka";
  src: url("../assets/fonts/Blueaka.woff2") format("woff2");
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg-base: #eef6ff;
  --bg-tint: #e3f0ff;
  --ink-primary: #0b1b38;
  --ink-secondary: #415982;
  --ink-muted: #6e85ac;
  --cyan: #00aeef;
  --cyan-bright: #3ad1ff;
  --azure: #128afa;
  --azure-deep: #0959c4;
  --glass-border: rgba(255, 255, 255, 0.96);
  --shadow-3d-panel:
    0 22px 48px -16px rgba(13, 40, 88, 0.14),
    0 6px 16px -3px rgba(18, 138, 250, 0.08),
    0 0 0 1px rgba(18, 138, 250, 0.09);
  --shadow-3d-card:
    0 12px 28px -10px rgba(13, 40, 88, 0.13),
    0 3px 8px -2px rgba(18, 138, 250, 0.08),
    0 0 0 1px rgba(18, 138, 250, 0.09);
  --shadow-3d-hover:
    0 22px 44px -12px rgba(0, 174, 239, 0.28),
    0 8px 18px -4px rgba(18, 138, 250, 0.14),
    0 0 0 1px rgba(0, 174, 239, 0.35);
  --shadow-well:
    inset 0 2px 5px rgba(13, 33, 72, 0.07),
    inset 0 0 0 1px rgba(18, 138, 250, 0.14);
  --radius-xl: 20px;
  --radius-lg: 16px;
  --radius-md: 12px;
  --radius-sm: 8px;
  --spring: cubic-bezier(0.22, 1, 0.36, 1);
  --font-ui: "Plus Jakarta Sans", "Inter", "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Hiragino Kaku Gothic ProN", "Apple SD Gothic Neo", sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

/* Custom Sleek Sky-Blue Scrollbars */
* {
  scrollbar-width: thin;
  scrollbar-color: rgba(18, 138, 250, 0.28) transparent;
}

*::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

*::-webkit-scrollbar-track {
  background: transparent;
}

*::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, rgba(0, 174, 239, 0.42), rgba(18, 138, 250, 0.45));
  border-radius: 999px;
}

*::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, rgba(0, 174, 239, 0.72), rgba(18, 138, 250, 0.75));
}

.h-scroll-track,
.creator-strip,
.school-pills-grid,
.creator-tabs,
.set-pills,
.emotion-chips {
  scrollbar-width: none;
}

.h-scroll-track::-webkit-scrollbar,
.creator-strip::-webkit-scrollbar,
.school-pills-grid::-webkit-scrollbar,
.creator-tabs::-webkit-scrollbar,
.set-pills::-webkit-scrollbar,
.emotion-chips::-webkit-scrollbar {
  display: none;
}

/* Prevent dragging/selecting decorative avatars & sprite images when copying text */
img {
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -webkit-user-drag: none;
}

.creator-name,
.creator-former,
.char-name-main,
.char-name-sub,
.insp-titles,
.hero-main,
.upstream-card,
.modal-body,
.creator-tab-name,
.sprite-label-text {
  user-select: text;
  -webkit-user-select: text;
}

html {
  scroll-behavior: smooth;
  -webkit-tap-highlight-color: transparent;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink-primary);
  background: var(--bg-base);
  font-family: var(--font-ui);
  line-height: 1.48;
  overflow-x: hidden;
}

.font-ba {
  font-family: "Blueaka", var(--font-ui);
  letter-spacing: 0.03em;
}

.hidden {
  display: none !important;
}

/* ==================== Creative Kivotos Sky & Shittim Crystal Backdrop ==================== */
.ambient-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
}

.sky-wash {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(90% 60% at 15% 0%, rgba(186, 230, 255, 0.75) 0%, transparent 65%),
    radial-gradient(70% 55% at 88% 8%, rgba(219, 240, 255, 0.8) 0%, transparent 65%),
    linear-gradient(180deg, #e5f2ff 0%, #f5faff 42%, #ffffff 78%, #e8f4ff 100%);
}

.sky-beam {
  position: absolute;
  top: -20%;
  width: 38vw;
  height: 140%;
  background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.55) 45%, rgba(0, 174, 239, 0.07) 60%, transparent 100%);
  transform: rotate(-22deg);
  filter: blur(24px);
  animation: beamDrift 16s ease-in-out infinite alternate;
}

.sky-beam-1 {
  left: 8%;
}

.sky-beam-2 {
  right: 10%;
  width: 28vw;
  animation-delay: -8s;
}

@keyframes beamDrift {
  0% { transform: rotate(-22deg) translateX(-18px); opacity: 0.7; }
  100% { transform: rotate(-20deg) translateX(24px); opacity: 1; }
}

.horizon-grid {
  position: absolute;
  left: -10%;
  right: -10%;
  bottom: -60px;
  height: 44vh;
  background-image:
    linear-gradient(to right, rgba(18, 138, 250, 0.075) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(18, 138, 250, 0.075) 1px, transparent 1px);
  background-size: 46px 46px;
  transform: perspective(520px) rotateX(62deg);
  transform-origin: bottom center;
  mask-image: linear-gradient(to top, rgba(0, 0, 0, 0.65) 0%, rgba(0, 0, 0, 0.15) 55%, transparent 100%);
}

#bg-particles {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

#confetti-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 120;
  pointer-events: none;
}

.mesh-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(88px);
  opacity: 0.6;
  animation: orbFloat 18s ease-in-out infinite alternate;
}

.orb-1 {
  width: 48vw;
  height: 48vw;
  max-width: 700px;
  max-height: 700px;
  top: -190px;
  left: -110px;
  background: radial-gradient(circle, rgba(0, 174, 239, 0.25), rgba(18, 138, 250, 0.04) 70%);
}

.orb-2 {
  width: 42vw;
  height: 42vw;
  max-width: 560px;
  max-height: 560px;
  top: 18%;
  right: -110px;
  background: radial-gradient(circle, rgba(58, 209, 255, 0.24), rgba(14, 165, 233, 0.03) 70%);
  animation-delay: -6s;
}

.orb-3 {
  width: 40vw;
  height: 40vw;
  max-width: 520px;
  max-height: 520px;
  bottom: -140px;
  left: 34%;
  background: radial-gradient(circle, rgba(147, 197, 253, 0.42), transparent 72%);
  animation-delay: -11s;
}

@keyframes orbFloat {
  0% { transform: translate3d(0, 0, 0) scale(1); }
  100% { transform: translate3d(28px, -22px, 0) scale(1.06); }
}

.hexa-pattern {
  position: absolute;
  inset: 0;
  background-image: url("../assets/ui/hexa_back_01.webp");
  background-size: 360px auto;
  background-repeat: repeat;
  opacity: 0.05;
  mix-blend-mode: multiply;
}

.halftone-overlay {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(18, 138, 250, 0.1) 1px, transparent 1px);
  background-size: 20px 20px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.45) 0%, rgba(0, 0, 0, 0.08) 65%, transparent 100%);
}

/* ==================== Layered 3D Glass Surfaces & Tactile Controls ==================== */
.glass-panel {
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.9), rgba(244, 250, 255, 0.78));
  backdrop-filter: blur(22px) saturate(185%);
  -webkit-backdrop-filter: blur(22px) saturate(185%);
  border: 1px solid var(--glass-border);
  box-shadow:
    var(--shadow-3d-panel),
    inset 0 1.5px 0 rgba(255, 255, 255, 0.99),
    inset 0 -2px 0 rgba(18, 138, 250, 0.06);
}

.glass-subpanel {
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.94), rgba(235, 245, 255, 0.8));
  border: 1px solid rgba(255, 255, 255, 0.98);
  box-shadow:
    0 12px 26px -12px rgba(13, 38, 84, 0.15),
    0 0 0 1px rgba(18, 138, 250, 0.12),
    inset 0 1.5px 0 #ffffff,
    inset 0 -2px 0 rgba(18, 138, 250, 0.05);
}

.hud-frame {
  position: relative;
}

.hud-frame::after {
  content: "";
  position: absolute;
  top: 10px;
  right: 10px;
  width: 14px;
  height: 14px;
  border-top: 2px solid rgba(0, 174, 239, 0.42);
  border-right: 2px solid rgba(0, 174, 239, 0.42);
  border-top-right-radius: 4px;
  pointer-events: none;
}

.cta-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: none;
  padding: 8px 15px;
  border-radius: 10px;
  font-family: inherit;
  font-size: 0.81rem;
  font-weight: 800;
  color: #ffffff;
  background: linear-gradient(165deg, #27c3ff 0%, #128afa 55%, #0c74df 100%);
  box-shadow:
    inset 0 1.5px 0 rgba(255, 255, 255, 0.48),
    inset 0 -2.5px 0 rgba(8, 66, 158, 0.34),
    0 8px 20px -4px rgba(18, 138, 250, 0.46),
    0 2px 4px rgba(13, 29, 58, 0.08);
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  transition: transform 0.2s var(--spring), box-shadow 0.2s ease, filter 0.2s ease;
}

.cta-btn:hover {
  transform: translateY(-2px);
  filter: brightness(1.05);
  box-shadow:
    inset 0 1.5px 0 rgba(255, 255, 255, 0.52),
    inset 0 -2.5px 0 rgba(8, 66, 158, 0.35),
    0 12px 26px -4px rgba(0, 174, 239, 0.54);
}

.cta-btn:active {
  transform: translateY(1px);
  box-shadow:
    inset 0 2px 4px rgba(8, 66, 158, 0.35),
    0 3px 8px -2px rgba(18, 138, 250, 0.36);
}

.raised-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 13px;
  border-radius: 10px;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--ink-primary);
  text-decoration: none;
  background: linear-gradient(180deg, #ffffff 0%, #f3f8ff 100%);
  border: 1px solid rgba(18, 138, 250, 0.18);
  box-shadow:
    inset 0 1px 0 #ffffff,
    inset 0 -1.5px 0 rgba(18, 138, 250, 0.08),
    0 3px 8px -2px rgba(13, 33, 72, 0.08);
  transition: transform 0.18s var(--spring), border-color 0.18s ease, box-shadow 0.18s ease;
}

.raised-pill:hover {
  transform: translateY(-1.5px);
  border-color: var(--cyan);
  color: var(--azure-deep);
  box-shadow: 0 6px 14px -4px rgba(0, 174, 239, 0.22);
}

.shine-fx {
  position: relative;
  overflow: hidden;
}

.shine-fx::before {
  content: "";
  position: absolute;
  top: 0;
  left: -130%;
  width: 55%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.34), transparent);
  transform: skewX(-22deg);
  animation: shineSweep 6s ease-in-out infinite;
  pointer-events: none;
}

@keyframes shineSweep {
  0%, 74% { left: -130%; }
  100% { left: 165%; }
}

.btn-sm {
  padding: 6px 12px;
  font-size: 0.77rem;
  border-radius: 8px;
}

/* ==================== Top Navigation & Language Attention Hint ==================== */
.top-nav {
  position: sticky;
  top: 0;
  z-index: 40;
  border-radius: 0;
  border-left: none;
  border-right: none;
  border-top: none;
  border-bottom: 1px solid rgba(18, 138, 250, 0.16);
}

.nav-top-beam {
  height: 2.5px;
  width: 100%;
  background: linear-gradient(90deg, rgba(0, 174, 239, 0.2), var(--cyan), var(--azure), var(--cyan-bright), rgba(0, 174, 239, 0.2));
  background-size: 200% 100%;
  animation: beamSlide 8s linear infinite;
}

@keyframes beamSlide {
  0% { background-position: 0% 0%; }
  100% { background-position: 200% 0%; }
}

.nav-inner {
  max-width: 1500px;
  margin: 0 auto;
  padding: 10px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.brand-cluster {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  text-decoration: none;
  padding: 2px 4px;
}

.brand-prism {
  display: inline-flex;
  align-items: center;
  gap: 3.5px;
  height: 26px;
}

.prism-bar {
  display: block;
  width: 5px;
  border-radius: 3px;
  transform: skewX(-18deg);
  transition: transform 0.25s var(--spring);
}

.prism-1 {
  height: 24px;
  background: linear-gradient(180deg, #3ad1ff 0%, #128afa 100%);
  box-shadow: 0 3px 10px rgba(0, 174, 239, 0.45);
}

.prism-2 {
  height: 17px;
  margin-top: 5px;
  background: linear-gradient(180deg, #8ee5ff 0%, #38bdf8 100%);
  opacity: 0.9;
}

.brand-cluster:hover .prism-1 {
  transform: skewX(-18deg) translateY(-2px);
}

.brand-cluster:hover .prism-2 {
  transform: skewX(-18deg) translateY(1px);
}

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

.brand-title {
  font-size: 1.42rem;
  font-weight: 800;
  line-height: 1;
  background: linear-gradient(135deg, #0b1b38 0%, #128afa 58%, #00aeef 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 1px 0 rgba(255, 255, 255, 0.9));
}

.brand-pill {
  display: inline-flex;
  align-items: center;
  padding: 3.5px 10px;
  border-radius: 7px;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--azure-deep);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(226, 242, 255, 0.92) 100%);
  border: 1px solid rgba(18, 138, 250, 0.22);
  box-shadow:
    inset 0 1px 0 #ffffff,
    0 2px 6px rgba(18, 138, 250, 0.12);
}

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

.seg-control {
  display: inline-flex;
  padding: 3px;
  border-radius: 10px;
  background: rgba(223, 238, 255, 0.85);
  box-shadow: var(--shadow-well);
  gap: 2px;
}

.seg-btn {
  border: none;
  background: transparent;
  padding: 5px 11px;
  border-radius: 7px;
  font-family: inherit;
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--ink-secondary);
  cursor: pointer;
  transition: all 0.2s var(--spring);
}

.seg-btn:hover:not(.active) {
  color: var(--ink-primary);
  background: rgba(255, 255, 255, 0.45);
}

.seg-btn.active {
  background: linear-gradient(180deg, #ffffff 0%, #f5faff 100%);
  color: var(--azure-deep);
  box-shadow:
    0 2px 6px rgba(13, 33, 72, 0.12),
    0 0 0 1px rgba(18, 138, 250, 0.16),
    inset 0 1px 0 #ffffff;
}

.lang-cluster {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 4px 2px 8px;
  border-radius: 10px;
  background: linear-gradient(180deg, #ffffff 0%, #f2f8ff 100%);
  border: 1px solid rgba(18, 138, 250, 0.22);
  box-shadow: inset 0 1px 0 #ffffff, 0 2px 6px rgba(13, 33, 72, 0.06);
}

.lang-cluster.lang-flash {
  animation: langDoubleFlash 0.72s ease-in-out 2;
}

@keyframes langDoubleFlash {
  0%, 100% {
    box-shadow: inset 0 1px 0 #ffffff, 0 2px 6px rgba(13, 33, 72, 0.06);
    border-color: rgba(18, 138, 250, 0.22);
  }
  50% {
    box-shadow: 0 0 0 4px rgba(0, 174, 239, 0.35), 0 0 18px rgba(0, 174, 239, 0.55);
    border-color: var(--cyan);
    background: #e6f7ff;
  }
}

.lang-hint-bubble {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 65;
  white-space: nowrap;
  padding: 6px 12px;
  border-radius: 9px;
  background: linear-gradient(135deg, #0d2148, #128afa);
  color: #ffffff;
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  box-shadow: 0 10px 24px rgba(11, 27, 56, 0.28);
  pointer-events: none;
  animation: bubbleIn 0.3s var(--spring);
  transition: opacity 0.35s ease, transform 0.35s ease;
}

.lang-hint-bubble::before {
  content: "";
  position: absolute;
  top: -5px;
  right: 22px;
  width: 10px;
  height: 10px;
  background: #0f3a75;
  transform: rotate(45deg);
}

.lang-hint-bubble.fade-out {
  opacity: 0;
  transform: translateY(-4px);
}

@keyframes bubbleIn {
  from { opacity: 0; transform: translateY(6px) scale(0.95); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.geo-badge {
  font-size: 0.66rem;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 5px;
  background: rgba(0, 174, 239, 0.13);
  color: var(--azure-deep);
  letter-spacing: 0.04em;
}

.lang-cluster .select-wrap select {
  border: none;
  background-color: transparent;
  box-shadow: none;
  padding: 4px 22px 4px 6px;
}

.select-wrap select {
  appearance: none;
  background-color: #ffffff;
  border: 1px solid rgba(18, 138, 250, 0.2);
  border-radius: 10px;
  padding: 6.5px 26px 6.5px 11px;
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--ink-primary);
  cursor: pointer;
  box-shadow: inset 0 1px 0 #ffffff, 0 2px 6px rgba(13, 33, 72, 0.06);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23415982' stroke-width='2.5'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
  transition: border-color 0.2s ease;
}

.select-wrap select:hover {
  border-color: var(--cyan);
}

/* ==================== Page Shell & Hero ==================== */
.page-shell {
  max-width: 1500px;
  margin: 0 auto;
  padding: 18px 22px 76px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.hero-banner {
  position: relative;
  border-radius: var(--radius-xl);
  padding: 22px 24px;
  overflow: hidden;
}

.hero-stripes {
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    -45deg,
    rgba(0, 174, 239, 0.022) 0px,
    rgba(0, 174, 239, 0.022) 6px,
    transparent 6px,
    transparent 18px
  );
  pointer-events: none;
}

.hero-deco {
  position: absolute;
  right: 12px;
  top: -12px;
  width: 240px;
  height: 240px;
  background: url("../assets/ui/Popup_Img_Deco_0.webp") no-repeat center/contain;
  opacity: 0.07;
  pointer-events: none;
}

.hero-grid {
  position: relative;
  display: grid;
  grid-template-columns: 1.32fr 0.98fr;
  gap: 22px;
  align-items: center;
}

.hero-top-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.09em;
  color: var(--azure);
  text-transform: uppercase;
}

.hero-stat-chips {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.stat-pill {
  padding: 2.5px 9px;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 800;
  color: var(--azure-deep);
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(18, 138, 250, 0.16);
  box-shadow: 0 2px 6px rgba(18, 138, 250, 0.08);
}

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 0 0 rgba(0, 174, 239, 0.55);
  animation: pulseRing 2.2s infinite;
}

@keyframes pulseRing {
  0% { box-shadow: 0 0 0 0 rgba(0, 174, 239, 0.55); }
  70% { box-shadow: 0 0 0 8px rgba(0, 174, 239, 0); }
  100% { box-shadow: 0 0 0 0 rgba(0, 174, 239, 0); }
}

.hero-heading {
  margin: 7px 0 8px;
  font-size: clamp(1.34rem, 2.15vw, 1.88rem);
  font-weight: 800;
  line-height: 1.2;
  color: var(--ink-primary);
}

.hero-desc {
  margin: 0;
  font-size: 0.9rem;
  color: var(--ink-secondary);
  max-width: 66ch;
}

.upstream-card {
  border-radius: var(--radius-lg);
  padding: 15px 17px;
}

.upstream-head-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}

.upstream-avatar {
  width: 48px;
  height: 48px;
  border-radius: 13px;
  object-fit: cover;
  border: 2px solid #ffffff;
  box-shadow: 0 6px 16px rgba(13, 38, 84, 0.18);
  flex-shrink: 0;
}

.upstream-badge {
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--azure);
  margin-bottom: 2px;
}

.upstream-title-row {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
  font-size: 0.98rem;
}

.pill-tag {
  font-size: 0.68rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(18, 138, 250, 0.1);
  color: var(--azure-deep);
}

.upstream-note {
  margin: 0 0 8px;
  font-size: 0.78rem;
  color: var(--ink-secondary);
}

.upstream-future-note {
  margin: 0 0 10px;
  padding: 7px 10px;
  border-radius: 9px;
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.08), rgba(99, 102, 241, 0.08));
  border: 1px dashed rgba(14, 165, 233, 0.38);
  font-size: 0.74rem;
  font-weight: 700;
  color: #0e5a96;
  line-height: 1.45;
}

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

.ext-chip {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 8px;
  font-size: 0.74rem;
  font-weight: 700;
  text-decoration: none;
  color: var(--ink-primary);
  background: linear-gradient(180deg, #ffffff 0%, #f6faff 100%);
  border: 1px solid rgba(18, 138, 250, 0.2);
  box-shadow: 0 2px 5px rgba(13, 33, 72, 0.06);
  transition: all 0.18s ease;
}

.ext-chip:hover {
  border-color: var(--cyan);
  color: var(--azure-deep);
  transform: translateY(-1.5px);
  box-shadow: 0 6px 12px rgba(0, 174, 239, 0.18);
}

.ext-bili {
  color: #db2777;
  border-color: rgba(244, 114, 182, 0.35);
}

.ext-tieba {
  color: #2563eb;
  border-color: rgba(37, 99, 235, 0.3);
}

/* ==================== Creator Spotlight Wall ==================== */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.section-title-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.accent-bar {
  width: 4.5px;
  height: 20px;
  border-radius: 99px;
  background: linear-gradient(180deg, var(--cyan-bright), var(--azure));
  box-shadow: 0 0 10px rgba(0, 174, 239, 0.45);
}

.section-title-wrap h2 {
  margin: 0;
  font-size: 1.04rem;
  font-weight: 800;
}

.section-hint {
  font-size: 0.78rem;
  color: var(--ink-muted);
}

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

.text-btn {
  background: none;
  border: none;
  padding: 5px 10px;
  font-family: inherit;
  font-size: 0.79rem;
  font-weight: 700;
  color: var(--azure);
  cursor: pointer;
  text-decoration: none;
  border-radius: 8px;
}

.text-btn:hover {
  background: rgba(18, 138, 250, 0.09);
}

.swipe-hint-pill {
  display: none;
  align-items: center;
  gap: 4px;
  padding: 2px 9px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(0, 174, 239, 0.14), rgba(18, 138, 250, 0.1));
  border: 1px solid rgba(0, 174, 239, 0.28);
  color: var(--azure-deep);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.01em;
  box-shadow: 0 2px 8px rgba(0, 174, 239, 0.12);
}

.creator-marquee-shell {
  position: relative;
  border-radius: var(--radius-md);
}

.creator-strip {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(236px, 1fr));
  gap: 11px;
  scroll-behavior: auto;
  transition: opacity 0.25s ease;
}

.creator-marquee-shell:has(.creator-strip.collapsed) {
  display: none;
}

.creator-strip.collapsed {
  display: none;
}

.creator-card-clone {
  display: none;
}

.creator-card {
  position: relative;
  border-radius: var(--radius-md);
  padding: 12px 13px;
  background: linear-gradient(155deg, rgba(255, 255, 255, 0.95), rgba(240, 248, 255, 0.85));
  backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.98);
  box-shadow:
    var(--shadow-3d-card),
    inset 0 1.5px 0 #ffffff,
    inset 0 -2px 0 rgba(18, 138, 250, 0.05);
  cursor: pointer;
  overflow: hidden;
  transform-style: preserve-3d;
  animation: cardReveal 0.4s var(--spring) backwards;
  transition: transform 0.25s var(--spring), box-shadow 0.25s ease, border-color 0.2s ease;
}

.creator-card::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  background: radial-gradient(240px circle at var(--mx, 50%) var(--my, 50%), rgba(0, 174, 239, 0.17), transparent 65%);
  transition: opacity 0.2s ease;
}

.creator-card:hover::before {
  opacity: 1;
}

.creator-card:hover {
  transform: perspective(700px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) translateY(-3px);
  box-shadow: var(--shadow-3d-hover);
  border-color: rgba(0, 174, 239, 0.5);
}

.creator-card.active {
  background: linear-gradient(145deg, rgba(220, 243, 255, 0.98), rgba(255, 255, 255, 0.98));
  border-color: var(--azure);
  box-shadow:
    0 14px 30px -8px rgba(18, 138, 250, 0.34),
    0 0 0 1.5px var(--azure),
    inset 0 1px 0 #ffffff;
}

.creator-card-row {
  display: flex;
  align-items: center;
  gap: 11px;
}

.creator-avatar-wrap {
  position: relative;
  width: 46px;
  height: 46px;
  flex-shrink: 0;
}

.creator-avatar-img {
  width: 46px;
  height: 46px;
  border-radius: 13px;
  object-fit: cover;
  border: 2px solid #ffffff;
  box-shadow: 0 5px 14px rgba(13, 33, 72, 0.16);
  background: #e6f2ff;
  transition: transform 0.25s var(--spring);
}

.creator-card:hover .creator-avatar-img {
  transform: scale(1.06);
}

.ring-bilibili { box-shadow: 0 0 0 2px rgba(244, 114, 182, 0.34), 0 5px 12px rgba(13, 33, 72, 0.14); }
.ring-tieba { box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.28), 0 5px 12px rgba(13, 33, 72, 0.14); }
.ring-x { box-shadow: 0 0 0 2px rgba(15, 23, 42, 0.22), 0 5px 12px rgba(13, 33, 72, 0.14); }

.creator-info {
  min-width: 0;
  flex: 1;
}

.creator-badges {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-bottom: 3px;
  flex-wrap: wrap;
}

.platform-badge {
  display: inline-flex;
  align-items: center;
  padding: 1.5px 7px;
  border-radius: 5px;
  font-size: 0.63rem;
  font-weight: 800;
}

.plat-bilibili { background: rgba(251, 114, 153, 0.14); color: #db2777; }
.plat-tieba { background: rgba(37, 99, 235, 0.12); color: #1d4ed8; }
.plat-x { background: rgba(15, 23, 42, 0.08); color: #0f172a; }

.named-tag {
  font-size: 0.61rem;
  font-weight: 800;
  padding: 1.5px 5px;
  border-radius: 4px;
  background: rgba(245, 158, 11, 0.15);
  color: #b45309;
}

.creator-name {
  font-size: 0.9rem;
  font-weight: 800;
  color: var(--ink-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.creator-former {
  font-size: 0.68rem;
  color: var(--ink-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.creator-bottom {
  margin-top: 9px;
  padding-top: 7px;
  border-top: 1px dashed rgba(18, 138, 250, 0.14);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  font-size: 0.72rem;
  color: var(--ink-secondary);
}

.creator-links-row {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

.creator-home-link {
  position: relative;
  z-index: 2;
  padding: 2.5px 7px;
  border-radius: 6px;
  background: rgba(18, 138, 250, 0.1);
  color: var(--azure-deep);
  font-weight: 700;
  text-decoration: none;
  font-size: 0.69rem;
  transition: background 0.15s ease, color 0.15s ease;
}

.creator-home-link:hover {
  background: var(--azure);
  color: #ffffff;
}

/* ==================== Search & School Control Dock ==================== */
.filter-bar {
  border-radius: var(--radius-xl);
  padding: 14px 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.filter-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.search-cluster {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1 1 300px;
  flex-wrap: wrap;
}

.search-box {
  position: relative;
  flex: 1 1 260px;
  max-width: 520px;
}

.search-icon {
  position: absolute;
  left: 13px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--azure);
  pointer-events: none;
}

#search-input {
  width: 100%;
  padding: 9px 56px 9px 38px;
  border-radius: 11px;
  border: 1px solid rgba(18, 138, 250, 0.16);
  background: rgba(244, 249, 255, 0.88);
  box-shadow: var(--shadow-well);
  font-family: inherit;
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--ink-primary);
  outline: none;
  transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

#search-input:focus {
  background: #ffffff;
  border-color: var(--cyan);
  box-shadow: 0 0 0 4px rgba(0, 174, 239, 0.15), inset 0 1px 2px rgba(13, 33, 72, 0.04);
}

.search-clear-btn {
  position: absolute;
  right: 35px;
  top: 50%;
  transform: translateY(-50%);
  border: none;
  background: rgba(18, 138, 250, 0.14);
  color: var(--azure-deep);
  width: 20px;
  height: 20px;
  border-radius: 50%;
  font-size: 0.68rem;
  font-weight: 800;
  cursor: pointer;
  display: grid;
  place-items: center;
}

.kbd-hint {
  position: absolute;
  right: 11px;
  top: 50%;
  transform: translateY(-50%);
  padding: 2px 7px;
  border-radius: 6px;
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--ink-muted);
  background: #ffffff;
  border: 1px solid rgba(18, 138, 250, 0.18);
  box-shadow: 0 1px 2px rgba(13, 33, 72, 0.06);
  pointer-events: none;
}

.active-filter-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--cyan);
  background: linear-gradient(180deg, #ffffff 0%, #e4f4ff 100%);
  color: var(--azure-deep);
  font-family: inherit;
  font-size: 0.76rem;
  font-weight: 800;
  box-shadow: 0 4px 10px -3px rgba(0, 174, 239, 0.25);
  cursor: pointer;
}

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

.result-badge {
  padding: 6px 12px;
  border-radius: 10px;
  background: linear-gradient(180deg, #ffffff 0%, #eaf4ff 100%);
  border: 1px solid rgba(18, 138, 250, 0.18);
  box-shadow: inset 0 1px 0 #ffffff, 0 2px 6px rgba(13, 33, 72, 0.06);
  color: var(--azure-deep);
  font-size: 0.78rem;
  font-weight: 800;
}

.filter-divider {
  height: 1px;
  width: 100%;
  background: linear-gradient(90deg, rgba(18, 138, 250, 0.04), rgba(18, 138, 250, 0.18), rgba(18, 138, 250, 0.04));
}

/* ==================== Horizontal Scroll Edge Glow & Chevrons ==================== */
.h-scroll-wrap {
  position: relative;
  display: flex;
  align-items: center;
  min-width: 0;
  width: 100%;
}

.h-scroll-track {
  display: flex;
  align-items: center;
  overflow-x: auto;
  min-width: 0;
  width: 100%;
  padding: 6px 2px 8px;
  margin-top: -5px;
  margin-bottom: -6px;
  scroll-behavior: smooth;
  transition: padding 0.18s ease;
}

/* Soft translucent edge feathering when scrollable */
.h-scroll-wrap.has-left:not(.has-right) .h-scroll-track {
  padding-left: 26px;
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 32px, #000 100%);
  mask-image: linear-gradient(90deg, transparent 0%, #000 32px, #000 100%);
}

.h-scroll-wrap.has-right:not(.has-left) .h-scroll-track {
  padding-right: 26px;
  -webkit-mask-image: linear-gradient(90deg, #000 0%, #000 calc(100% - 32px), transparent 100%);
  mask-image: linear-gradient(90deg, #000 0%, #000 calc(100% - 32px), transparent 100%);
}

.h-scroll-wrap.has-left.has-right .h-scroll-track {
  padding-left: 26px;
  padding-right: 26px;
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 32px, #000 calc(100% - 32px), transparent 100%);
  mask-image: linear-gradient(90deg, transparent 0%, #000 32px, #000 calc(100% - 32px), transparent 100%);
}

.h-scroll-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%) scale(0.9);
  z-index: 6;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 1px solid rgba(18, 138, 250, 0.28);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(235, 246, 255, 0.94));
  backdrop-filter: blur(8px);
  color: var(--azure-deep);
  font-size: 0.98rem;
  font-weight: 800;
  line-height: 1;
  display: grid;
  place-items: center;
  padding: 0 0 1px;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  box-shadow:
    0 4px 12px rgba(13, 38, 84, 0.16),
    0 0 10px rgba(0, 174, 239, 0.22);
  transition: opacity 0.2s ease, transform 0.2s var(--spring), background 0.18s ease, box-shadow 0.2s ease;
}

.h-scroll-left {
  left: 2px;
}

.h-scroll-right {
  right: 2px;
}

.h-scroll-wrap.has-left .h-scroll-left,
.h-scroll-wrap.has-right .h-scroll-right {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(-50%) scale(1);
}

.h-scroll-arrow:hover {
  background: linear-gradient(155deg, #27c3ff, #128afa);
  border-color: transparent;
  color: #ffffff;
  box-shadow: 0 6px 16px rgba(18, 138, 250, 0.42);
  transform: translateY(-50%) scale(1.08);
}

.school-pills-grid {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.school-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 11px;
  padding: 4.5px 12px 4.5px 5.5px;
  border: 1px solid rgba(18, 138, 250, 0.16);
  background: linear-gradient(180deg, #ffffff 0%, #f5f9ff 100%);
  box-shadow:
    inset 0 1px 0 #ffffff,
    inset 0 -1.5px 0 rgba(18, 138, 250, 0.07),
    0 3px 8px -3px rgba(13, 33, 72, 0.09);
  cursor: pointer;
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--ink-secondary);
  transition: transform 0.2s var(--spring), box-shadow 0.2s ease, border-color 0.2s ease;
}

.school-pill-all {
  padding: 8px 14px;
}

.school-icon-badge {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: #ffffff;
  border: 1px solid rgba(18, 138, 250, 0.14);
  padding: 3px;
  display: inline-grid;
  place-items: center;
  box-shadow: inset 0 1px 0 #ffffff, 0 2px 6px rgba(13, 33, 72, 0.09);
  flex-shrink: 0;
}

.school-icon-badge img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  mix-blend-mode: multiply;
}

.school-pill:hover {
  border-color: var(--cyan);
  color: var(--ink-primary);
  transform: translateY(-2px);
  box-shadow:
    inset 0 1px 0 #ffffff,
    0 8px 18px -6px rgba(0, 174, 239, 0.28);
}

.school-pill.active {
  background: linear-gradient(160deg, #27c3ff 0%, #128afa 60%, #0b71dc 100%);
  border-color: transparent;
  color: #ffffff;
  box-shadow:
    inset 0 1.5px 0 rgba(255, 255, 255, 0.45),
    inset 0 -2px 0 rgba(8, 66, 158, 0.3),
    0 8px 20px -4px rgba(18, 138, 250, 0.46);
}

.school-pill.active .school-icon-badge {
  border-color: rgba(255, 255, 255, 0.96);
  box-shadow: 0 3px 10px rgba(8, 66, 158, 0.28);
}

.school-pill-count {
  padding: 1px 6px;
  border-radius: 999px;
  background: rgba(18, 138, 250, 0.09);
  color: var(--azure-deep);
  font-size: 0.71rem;
  font-weight: 800;
}

.school-pill.active .school-pill-count {
  background: rgba(255, 255, 255, 0.24);
  color: #ffffff;
}

/* ==================== Two-Column Workbench ==================== */
.workbench {
  display: grid;
  grid-template-columns: minmax(360px, 44%) 1fr;
  gap: 18px;
  align-items: start;
}

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

@keyframes cardReveal {
  from { opacity: 0; transform: translateY(8px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.char-card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 9px;
  border-radius: var(--radius-md);
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.95), rgba(241, 248, 255, 0.86));
  backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.98);
  box-shadow:
    var(--shadow-3d-card),
    inset 0 1.5px 0 #ffffff,
    inset 0 -2px 0 rgba(18, 138, 250, 0.05);
  cursor: pointer;
  overflow: hidden;
  transform-style: preserve-3d;
  animation: cardReveal 0.36s var(--spring) backwards;
  transition: transform 0.24s var(--spring), box-shadow 0.24s ease, border-color 0.2s ease;
}

.char-card::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  background: radial-gradient(210px circle at var(--mx, 50%) var(--my, 50%), rgba(0, 174, 239, 0.2), transparent 65%);
  transition: opacity 0.2s ease;
}

.char-card:hover::before {
  opacity: 1;
}

.char-card:hover {
  transform: perspective(650px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) translateY(-3px);
  box-shadow: var(--shadow-3d-hover);
  border-color: rgba(0, 174, 239, 0.5);
}

.char-card.active {
  border-color: var(--azure);
  background: linear-gradient(160deg, #ffffff 0%, #dcf0ff 100%);
  box-shadow:
    0 14px 30px -8px rgba(18, 138, 250, 0.36),
    0 0 0 1.5px var(--azure),
    inset 0 1.5px 0 #ffffff;
}

.char-avatar-box {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 10px;
  overflow: hidden;
  background: linear-gradient(145deg, #e7f3ff, #f7fbff);
  margin-bottom: 7px;
  box-shadow: inset 0 0 0 1px rgba(18, 138, 250, 0.08);
}

.char-avatar-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.35s var(--spring);
}

.char-card:hover .char-avatar-box img {
  transform: scale(1.06);
}

.char-count-pill {
  position: absolute;
  right: 6px;
  bottom: 6px;
  padding: 2px 8px;
  border-radius: 6px;
  background: rgba(11, 27, 56, 0.82);
  backdrop-filter: blur(8px);
  color: #ffffff;
  font-size: 0.69rem;
  font-weight: 800;
  box-shadow: 0 2px 6px rgba(11, 27, 56, 0.25);
}

.char-school-dot {
  position: absolute;
  left: 6px;
  top: 6px;
  width: 28px;
  height: 28px;
  padding: 3px;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 3px 8px rgba(13, 29, 58, 0.16);
}

.char-school-dot img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  mix-blend-mode: multiply;
}

.char-name-main {
  font-size: 0.86rem;
  font-weight: 800;
  color: var(--ink-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.char-name-sub {
  font-size: 0.72rem;
  color: var(--ink-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.empty-state {
  padding: 44px 20px;
  text-align: center;
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.8);
  border: 1px dashed rgba(18, 138, 250, 0.3);
  color: var(--ink-secondary);
}

/* ==================== Stage Inspector (Right Sticky Desktop / Bottom Sheet Mobile) ==================== */
.inspector-backdrop {
  display: none;
}

.inspector-pane {
  position: sticky;
  top: 66px;
  height: calc(100vh - 76px);
  min-height: 580px;
  border-radius: var(--radius-xl);
  padding: 11px 14px;
  display: flex;
  flex-direction: column;
  gap: 7px;
  overflow: hidden;
}

@media (max-height: 820px) and (min-width: 1025px) {
  .inspector-pane {
    overflow-y: auto;
  }
}

.sheet-handle-bar {
  display: none;
}

.inspector-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-shrink: 0;
}

.inspector-student {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 1;
}

.insp-accent-pill {
  width: 4px;
  height: 42px;
  border-radius: 99px;
  background: linear-gradient(180deg, var(--cyan-bright) 0%, var(--azure) 100%);
  box-shadow: 0 0 10px rgba(0, 174, 239, 0.45);
  flex-shrink: 0;
}

.insp-avatar {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  object-fit: cover;
  border: 2px solid #ffffff;
  box-shadow: 0 5px 14px rgba(13, 38, 84, 0.18);
  background: #e6f2ff;
  flex-shrink: 0;
}

.insp-titles {
  min-width: 0;
  flex: 1;
}

.insp-name-line {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
}

.insp-name-line h2 {
  margin: 0;
  font-size: 1.06rem;
  font-weight: 800;
}

.cid-chip {
  font-size: 0.68rem;
  font-weight: 800;
  padding: 1.5px 7px;
  border-radius: 5px;
  background: rgba(18, 138, 250, 0.12);
  color: var(--azure-deep);
}

.insp-subnames {
  margin: 1px 0;
  font-size: 0.72rem;
  color: var(--ink-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.insp-club-line {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--ink-secondary);
  min-width: 0;
}

.insp-club-text {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

.insp-count-badge {
  flex-shrink: 0;
  padding: 1px 7px;
  border-radius: 999px;
  background: rgba(18, 138, 250, 0.1);
  color: var(--azure-deep);
  font-size: 0.69rem;
  font-weight: 800;
}

.mini-school-badge {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  background: #ffffff;
  border: 1px solid rgba(18, 138, 250, 0.16);
  padding: 2px;
  display: inline-grid;
  place-items: center;
  flex-shrink: 0;
}

.mini-school-icon {
  width: 100%;
  height: 100%;
  object-fit: contain;
  mix-blend-mode: multiply;
}

.insp-head-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.icon-pill-btn {
  border: 1px solid rgba(18, 138, 250, 0.22);
  background: linear-gradient(180deg, #ffffff 0%, #f5faff 100%);
  color: var(--azure-deep);
  border-radius: 9px;
  padding: 5.5px 11px;
  font-family: inherit;
  font-size: 0.74rem;
  font-weight: 700;
  box-shadow: 0 2px 6px rgba(13, 33, 72, 0.06);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.18s ease;
}

.icon-pill-btn:hover {
  border-color: var(--cyan);
  transform: translateY(-1px);
}

.close-sheet-btn {
  display: none;
  border: none;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: rgba(15, 31, 61, 0.08);
  color: var(--ink-primary);
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
}

/* Redesigned Creator Tabs & Set Selector (Layered, Spacious, Edge-Glowing) */
.set-controls {
  display: flex;
  flex-direction: column;
  gap: 7px;
  flex-shrink: 0;
}

.control-group-box {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 7px 9px;
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(244, 249, 255, 0.85), rgba(255, 255, 255, 0.92));
  border: 1px solid rgba(18, 138, 250, 0.14);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.95),
    0 3px 10px -4px rgba(13, 33, 72, 0.08);
}

.control-group-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

@media (min-width: 721px) {
  .control-group-box {
    flex-direction: row;
    align-items: center;
    padding: 5px 9px;
    gap: 8px;
  }

  .control-group-head {
    display: contents;
  }

  .control-group-head .row-prefix-label {
    order: 1;
  }

  .control-group-box > .h-scroll-wrap {
    order: 2;
    flex: 1;
    min-width: 0;
  }

  .control-group-head .scroll-cue,
  .control-group-head #download-set-zip-btn {
    order: 3;
    flex-shrink: 0;
  }
}

.row-prefix-label {
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--ink-muted);
  white-space: nowrap;
  letter-spacing: 0.02em;
}

.scroll-cue {
  display: none;
  align-items: center;
  gap: 4px;
  padding: 1.5px 8px;
  border-radius: 999px;
  background: rgba(0, 174, 239, 0.12);
  border: 1px solid rgba(0, 174, 239, 0.25);
  color: var(--azure-deep);
  font-size: 0.67rem;
  font-weight: 800;
  white-space: nowrap;
  animation: pulseCue 2.2s ease-in-out infinite;
}

.scroll-cue.visible {
  display: inline-flex;
}

@keyframes pulseCue {
  0%, 100% { box-shadow: 0 0 0 0 rgba(0, 174, 239, 0.2); }
  50% { box-shadow: 0 0 0 4px rgba(0, 174, 239, 0); }
}

.btn-xs {
  padding: 4px 10px;
  font-size: 0.72rem;
  border-radius: 8px;
  gap: 5px;
}

.creator-tabs {
  display: flex;
  align-items: center;
  gap: 6px;
}

.creator-tab {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4.5px 10px 4.5px 6px;
  border-radius: 9px;
  border: 1px solid rgba(18, 138, 250, 0.2);
  background: linear-gradient(180deg, #ffffff 0%, #f4f9ff 100%);
  box-shadow: 0 2px 6px rgba(13, 33, 72, 0.06);
  font-family: inherit;
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--ink-secondary);
  cursor: pointer;
  user-select: text;
  -webkit-user-select: text;
  transition: all 0.18s ease;
}

.creator-tab:hover {
  border-color: var(--cyan);
  transform: translateY(-1px);
  box-shadow: 0 5px 12px rgba(0, 174, 239, 0.18);
}

.creator-tab.active {
  background: linear-gradient(160deg, #27c3ff 0%, #128afa 100%);
  color: #ffffff;
  border-color: transparent;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.45),
    0 5px 14px -3px rgba(18, 138, 250, 0.44);
}

.creator-tab-avatar {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  object-fit: cover;
  border: 1.5px solid rgba(255, 255, 255, 0.95);
  flex-shrink: 0;
}

.creator-tab a {
  color: inherit;
  text-decoration: none;
  opacity: 0.92;
  padding: 1px 3px;
  border-radius: 5px;
  transition: background 0.15s ease;
}

.creator-tab a:hover {
  background: rgba(255, 255, 255, 0.22);
}

.set-pills {
  display: flex;
  align-items: center;
  gap: 5px;
}

.set-pill {
  flex: 0 0 auto;
  padding: 4.5px 10px;
  border-radius: 8px;
  border: 1px solid rgba(18, 138, 250, 0.18);
  background: linear-gradient(180deg, #ffffff 0%, #f5faff 100%);
  font-family: inherit;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--ink-secondary);
  cursor: pointer;
  transition: all 0.16s ease;
}

.set-pill:hover {
  border-color: var(--cyan);
  color: var(--azure-deep);
}

.set-pill.active {
  background: rgba(0, 174, 239, 0.15);
  border-color: var(--cyan);
  color: var(--azure-deep);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8), 0 2px 6px rgba(0, 174, 239, 0.15);
}

/* Stage Viewport */
.stage-card {
  display: flex;
  flex-direction: column;
  border-radius: var(--radius-md);
  border: 1px solid rgba(18, 138, 250, 0.16);
  background: #ffffff;
  overflow: hidden;
  flex-shrink: 0;
  box-shadow:
    0 10px 26px -10px rgba(13, 38, 84, 0.16),
    inset 0 1px 0 #ffffff;
}

.stage-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 10px;
  border-bottom: 1px solid rgba(18, 138, 250, 0.1);
  background: linear-gradient(90deg, #f3f8ff, #ffffff);
  flex-wrap: wrap;
}

.stage-bg-group {
  display: flex;
  align-items: center;
  gap: 5px;
}

.bg-swatch {
  width: 18px;
  height: 18px;
  border-radius: 5px;
  border: 1.5px solid rgba(15, 31, 61, 0.2);
  cursor: pointer;
  padding: 0;
}

.bg-swatch.active {
  outline: 2px solid var(--azure);
  outline-offset: 1px;
}

.swatch-check {
  background-image: linear-gradient(45deg, #dce6f2 25%, transparent 25%),
    linear-gradient(-45deg, #dce6f2 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #dce6f2 75%),
    linear-gradient(-45deg, transparent 75%, #dce6f2 75%);
  background-size: 8px 8px;
  background-position: 0 0, 0 4px, 4px -4px, -4px 0;
  background-color: #ffffff;
}
.swatch-white { background: #ffffff; }
.swatch-green { background: #00ff00; }
.swatch-navy { background: #0f172a; }

.stage-mode-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.play-btn.playing {
  background: var(--azure);
  color: #ffffff;
  border-color: var(--azure);
}

.zoom-controls {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--ink-secondary);
}

.mini-ctrl-btn {
  border: 1px solid rgba(18, 138, 250, 0.2);
  background: linear-gradient(180deg, #ffffff 0%, #f5f9ff 100%);
  color: var(--ink-primary);
  border-radius: 6px;
  padding: 2px 7px;
  font-family: inherit;
  font-size: 0.73rem;
  font-weight: 700;
  box-shadow: 0 1px 3px rgba(13, 33, 72, 0.06);
  cursor: pointer;
}

.mini-ctrl-btn:hover {
  border-color: var(--cyan);
  color: var(--azure-deep);
}

.stage-viewport {
  position: relative;
  height: clamp(160px, 23vh, 220px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px 44px;
  overflow: hidden;
  cursor: grab;
  user-select: none;
}

.stage-viewport:active {
  cursor: grabbing;
}

.stage-viewport.bg-checker {
  background-color: #ffffff;
  background-image: linear-gradient(45deg, #edf4fc 25%, transparent 25%),
    linear-gradient(-45deg, #edf4fc 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #edf4fc 75%),
    linear-gradient(-45deg, transparent 75%, #edf4fc 75%);
  background-size: 20px 20px;
  background-position: 0 0, 0 10px, 10px -10px, -10px 0;
}
.stage-viewport.bg-white { background: #ffffff; }
.stage-viewport.bg-green { background: #00ff00; }
.stage-viewport.bg-navy { background: #0f172a; }

.stage-frame {
  height: 100%;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

#stage-img {
  max-height: 100%;
  max-width: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 12px;
  box-shadow: 0 12px 28px rgba(13, 29, 58, 0.16);
  transform-origin: center center;
  will-change: transform;
  pointer-events: none;
}

.stage-img-pop {
  animation: spritePop 0.18s var(--spring);
}

@keyframes spritePop {
  from { opacity: 0.72; filter: blur(1px); }
  to { opacity: 1; filter: blur(0); }
}

.stage-spinner {
  position: absolute;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 3px solid rgba(0, 174, 239, 0.25);
  border-top-color: var(--azure);
  animation: spin 0.7s linear infinite;
}

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

.stage-nav-arrows {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 8px;
  pointer-events: none;
}

.stage-arrow {
  pointer-events: auto;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid rgba(18, 138, 250, 0.22);
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(8px);
  color: var(--ink-primary);
  font-size: 1.15rem;
  font-weight: 700;
  box-shadow: 0 4px 12px rgba(13, 33, 72, 0.12);
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: transform 0.15s ease, background 0.15s ease;
}

.stage-arrow:hover {
  transform: scale(1.08);
  background: #ffffff;
  color: var(--azure);
}

.stage-kbd-tip {
  position: absolute;
  right: 8px;
  bottom: 5px;
  padding: 2px 7px;
  border-radius: 5px;
  font-size: 0.64rem;
  font-weight: 600;
  color: var(--ink-secondary);
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(6px);
  pointer-events: none;
}

.sprite-action-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 7px 10px;
  border-top: 1px solid rgba(18, 138, 250, 0.12);
  background: #ffffff;
  flex-wrap: wrap;
}

.sprite-meta {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  flex: 1;
}

.sprite-index-badge {
  font-size: 0.72rem;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 5px;
  background: rgba(18, 138, 250, 0.12);
  color: var(--azure-deep);
  flex-shrink: 0;
}

.sprite-label-text {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--ink-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sprite-btns {
  display: flex;
  align-items: center;
  gap: 6px;
}

.action-pill {
  border: 1px solid rgba(18, 138, 250, 0.22);
  background: linear-gradient(180deg, #ffffff 0%, #f5f9ff 100%);
  color: var(--ink-primary);
  border-radius: 8px;
  padding: 5px 11px;
  font-family: inherit;
  font-size: 0.73rem;
  font-weight: 700;
  box-shadow: 0 2px 5px rgba(13, 33, 72, 0.06);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.18s ease;
}

.action-pill:hover {
  border-color: var(--cyan);
  color: var(--azure-deep);
}

.action-pill.selected {
  background: rgba(0, 174, 239, 0.16);
  border-color: var(--cyan);
  color: var(--azure-deep);
}

.action-pill-primary {
  background: linear-gradient(165deg, #27c3ff 0%, #128afa 100%);
  border-color: transparent;
  color: #ffffff;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.45),
    inset 0 -1.5px 0 rgba(8, 66, 158, 0.3),
    0 5px 14px -3px rgba(18, 138, 250, 0.42);
}

.action-pill-primary:hover {
  filter: brightness(1.06);
  color: #ffffff;
}

/* ==================== Emotion Tags & Virtual Grid ==================== */
.emotion-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
  flex-shrink: 0;
}

.emotion-bar .h-scroll-wrap {
  flex: 1;
  min-width: 180px;
}

.emotion-chips {
  display: flex;
  align-items: center;
  gap: 5px;
}

.emotion-chip {
  flex: 0 0 auto;
  padding: 2.5px 9px;
  border-radius: 999px;
  border: 1px solid rgba(18, 138, 250, 0.18);
  background: #ffffff;
  font-family: inherit;
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--ink-secondary);
  cursor: pointer;
}

.emotion-chip.active {
  background: var(--azure);
  border-color: var(--azure);
  color: #ffffff;
}

.thumb-tools {
  display: flex;
  align-items: center;
  gap: 6px;
}

.thumb-filter-input {
  width: 145px;
  padding: 4px 9px;
  border-radius: 7px;
  border: 1px solid rgba(18, 138, 250, 0.18);
  background: rgba(244, 249, 255, 0.92);
  box-shadow: var(--shadow-well);
  font-family: inherit;
  font-size: 0.74rem;
  color: var(--ink-primary);
  outline: none;
}

.thumb-filter-input:focus {
  border-color: var(--cyan);
  background: #ffffff;
}

.thumb-viewport {
  position: relative;
  flex: 1 1 260px;
  min-height: 255px;
  overflow-y: auto;
  overflow-x: hidden;
  border-radius: var(--radius-md);
  background: rgba(232, 243, 255, 0.7);
  box-shadow: var(--shadow-well);
  padding: 8px;
  outline: none;
}

.thumb-spacer {
  position: relative;
  width: 100%;
}

.thumb-grid {
  position: relative;
  width: 100%;
}

.thumb-cell {
  position: absolute;
  display: flex;
  flex-direction: column;
  padding: 4px;
  border-radius: 9px;
  background: #ffffff;
  border: 1.5px solid rgba(18, 138, 250, 0.14);
  box-shadow: 0 3px 8px -3px rgba(13, 33, 72, 0.1);
  cursor: pointer;
  overflow: hidden;
  transition: border-color 0.14s ease, transform 0.14s ease, box-shadow 0.14s ease;
}

.thumb-cell:hover {
  border-color: var(--cyan);
  transform: translateY(-2px);
  box-shadow: 0 8px 16px rgba(0, 174, 239, 0.22);
  z-index: 2;
}

.thumb-cell.active {
  border-color: var(--azure);
  box-shadow: 0 0 0 2px rgba(18, 138, 250, 0.28);
}

.thumb-img-wrap {
  position: relative;
  flex: 1;
  border-radius: 6px;
  overflow: hidden;
  background: linear-gradient(110deg, #eef6ff 30%, #ffffff 50%, #eef6ff 70%);
  background-size: 200% 100%;
  animation: shimmer 1.6s infinite linear;
}

.thumb-img-wrap.loaded {
  animation: none;
  background: #ffffff;
}

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.thumb-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.thumb-check {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 19px;
  height: 19px;
  border-radius: 5px;
  border: 1.5px solid rgba(18, 138, 250, 0.45);
  background: rgba(255, 255, 255, 0.94);
  color: transparent;
  display: grid;
  place-items: center;
  font-size: 0.7rem;
  font-weight: 800;
  cursor: pointer;
  z-index: 3;
}

.thumb-check.checked {
  background: var(--azure);
  border-color: var(--azure);
  color: #ffffff;
}

.thumb-caption {
  margin-top: 3px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  font-size: 0.66rem;
  font-weight: 700;
  color: var(--ink-secondary);
}

.thumb-caption-label {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ==================== Footer, Dock, Toast, Modal ==================== */
.site-footer {
  max-width: 1456px;
  margin: 0 auto 24px;
  width: calc(100% - 44px);
  border-radius: var(--radius-xl);
  padding: 15px 22px;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.footer-copy strong {
  font-size: 0.87rem;
}

.footer-copy p {
  margin: 3px 0 0;
  font-size: 0.76rem;
  color: var(--ink-secondary);
}

.footer-links {
  display: flex;
  align-items: center;
  gap: 10px;
}

.basket-dock {
  position: fixed;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  z-index: 60;
  max-width: calc(100vw - 20px);
  border-radius: 14px;
  padding: 10px 16px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px 14px;
  border: 1.5px solid var(--cyan);
  box-shadow: 0 16px 38px rgba(15, 31, 61, 0.22);
  animation: slideUp 0.25s var(--spring);
}

.basket-info {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 0.84rem;
  font-weight: 700;
  white-space: nowrap;
}

.basket-count {
  display: inline-grid;
  place-items: center;
  min-width: 26px;
  height: 24px;
  padding: 0 7px;
  border-radius: 999px;
  background: var(--azure);
  color: #ffffff;
  font-size: 0.77rem;
}

.basket-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.basket-direct-btn {
  padding: 6.5px 12px;
  font-size: 0.78rem;
  font-weight: 800;
  border-color: rgba(0, 174, 239, 0.4);
  color: var(--azure-deep);
  background: linear-gradient(180deg, #ffffff 0%, #eaf6ff 100%);
  box-shadow: 0 3px 10px -3px rgba(0, 174, 239, 0.22);
}

.basket-direct-btn:hover:not(:disabled) {
  border-color: var(--cyan);
  background: linear-gradient(180deg, #ffffff 0%, #dbf0ff 100%);
  transform: translateY(-1px);
}

.basket-direct-btn:disabled {
  opacity: 0.65;
  cursor: wait;
}

.credit-toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 70;
  max-width: 400px;
  border-radius: 14px;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  box-shadow: 0 18px 42px rgba(15, 31, 61, 0.2), 0 0 0 1px rgba(0, 174, 239, 0.28);
  animation: toastIn 0.25s var(--spring);
}

.toast-title {
  font-size: 0.82rem;
  font-weight: 800;
  color: var(--ink-primary);
}

.toast-sub {
  font-size: 0.74rem;
  color: var(--ink-secondary);
  margin-top: 2px;
}

.toast-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.toast-close {
  border: none;
  background: transparent;
  color: var(--ink-muted);
  cursor: pointer;
  font-size: 0.95rem;
  padding: 4px;
}

@keyframes slideUp {
  from { opacity: 0; transform: translate(-50%, 16px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}

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

/* Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: rgba(11, 27, 56, 0.44);
  backdrop-filter: blur(8px);
  display: grid;
  place-items: center;
  padding: 18px;
}

.modal-card {
  width: 100%;
  max-width: 820px;
  max-height: 86vh;
  border-radius: 20px;
  padding: 22px 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  overflow: hidden;
}

.modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.modal-eyebrow {
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--azure);
}

.modal-header h2 {
  margin: 2px 0 0;
  font-size: 1.18rem;
}

.close-modal-btn {
  border: none;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(15, 31, 61, 0.08);
  cursor: pointer;
  font-size: 1rem;
  font-weight: 700;
}

.modal-tabs {
  display: flex;
  gap: 6px;
}

.modal-tab {
  border: 1px solid rgba(18, 138, 250, 0.22);
  background: rgba(255, 255, 255, 0.9);
  border-radius: 8px;
  padding: 5px 14px;
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  color: var(--ink-secondary);
}

.modal-tab.active {
  background: var(--azure);
  border-color: var(--azure);
  color: #ffffff;
}

.modal-body {
  overflow-y: auto;
  padding-right: 4px;
  font-size: 0.85rem;
  color: var(--ink-secondary);
}

.modal-section {
  margin-bottom: 16px;
  padding: 13px 15px;
  border-radius: 13px;
  background: rgba(244, 249, 255, 0.88);
  border: 1px solid rgba(18, 138, 250, 0.14);
}

.modal-section h3 {
  margin: 0 0 6px;
  font-size: 0.94rem;
  color: var(--ink-primary);
}

.modal-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8rem;
}

.modal-table th,
.modal-table td {
  text-align: left;
  padding: 7px 8px;
  border-bottom: 1px solid rgba(18, 138, 250, 0.12);
}

.modal-creator-cell {
  display: flex;
  align-items: center;
  gap: 8px;
}

.modal-creator-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid rgba(18, 138, 250, 0.2);
}

.modal-table a {
  color: var(--azure-deep);
  font-weight: 700;
  text-decoration: none;
  margin-right: 6px;
}

/* ==================== Tablet & Mobile Responsive Overhaul ==================== */
@media (max-width: 1024px) {
  .hero-grid {
    grid-template-columns: 1fr;
  }

  .workbench {
    grid-template-columns: 1fr;
  }

  .inspector-backdrop.open {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 50;
    background: rgba(11, 27, 56, 0.36);
    backdrop-filter: blur(4px);
  }

  .inspector-pane {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    top: auto;
    height: 92dvh;
    min-height: 0;
    z-index: 55;
    border-radius: 22px 22px 0 0;
    padding: 8px 14px calc(12px + env(safe-area-inset-bottom));
    transform: translateY(105%);
    transition: transform 0.34s var(--spring);
    box-shadow: 0 -16px 48px rgba(11, 27, 56, 0.22);
    gap: 8px;
  }

  .inspector-pane.sheet-open {
    transform: translateY(0);
  }

  .sheet-handle-bar {
    display: flex;
    justify-content: center;
    padding: 3px 0 4px;
    cursor: grab;
  }

  .sheet-handle-pill {
    width: 44px;
    height: 4.5px;
    border-radius: 999px;
    background: rgba(18, 138, 250, 0.28);
  }

  .close-sheet-btn {
    display: grid;
    place-items: center;
  }

  .stage-viewport {
    height: clamp(160px, 24dvh, 220px);
  }

  .credit-toast {
    left: 12px;
    right: 12px;
    bottom: 76px;
    max-width: none;
  }
}

@media (max-width: 640px) {
  .nav-inner {
    padding: 8px 12px;
    gap: 8px;
    display: grid;
    grid-template-columns: 1fr auto auto;
    align-items: center;
  }

  .nav-controls {
    display: contents;
  }

  .brand-cluster {
    grid-column: 1;
    grid-row: 1;
    gap: 8px;
    padding: 0;
    min-width: 0;
  }

  .brand-title {
    font-size: 1.15rem;
  }

  .brand-pill {
    display: none;
  }

  .lang-cluster {
    grid-column: 2;
    grid-row: 1;
    padding: 1.5px 3px 1.5px 6px;
  }

  .lang-cluster .select-wrap select {
    font-size: 0.73rem;
    padding: 4px 19px 4px 4px;
  }

  .nav-credits {
    grid-column: 3;
    grid-row: 1;
    padding: 6px 10px;
    font-size: 0.74rem;
  }

  .nav-upstream {
    display: none;
  }

  .nav-fmt {
    grid-column: 1;
    grid-row: 2;
    justify-self: start;
  }

  .nav-cdn {
    grid-column: 2 / 4;
    grid-row: 2;
    justify-self: end;
  }

  .nav-cdn select {
    padding: 5px 24px 5px 9px;
    font-size: 0.74rem;
  }

  .page-shell {
    padding: 12px 12px 86px;
    gap: 14px;
  }

  .hero-banner {
    padding: 15px 15px;
    border-radius: var(--radius-lg);
  }

  .hero-heading {
    font-size: 1.25rem;
  }

  .hero-desc {
    font-size: 0.83rem;
  }

  .swipe-hint-pill {
    display: inline-flex;
  }

  /* Single-row continuous marquee on mobile with soft luminous edge fade */
  .creator-marquee-shell {
    -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 18px, #000 calc(100% - 22px), transparent 100%);
    mask-image: linear-gradient(90deg, transparent 0%, #000 18px, #000 calc(100% - 22px), transparent 100%);
  }

  .creator-strip {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 10px;
    padding: 5px 14px 10px;
    scroll-behavior: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
  }

  .creator-card {
    flex: 0 0 248px;
    animation: none;
    backdrop-filter: none;
    background: linear-gradient(155deg, rgba(255, 255, 255, 0.96), rgba(242, 249, 255, 0.92));
    transform: translateZ(0);
    contain: layout style;
  }

  .creator-card:hover {
    transform: translateZ(0);
  }

  .creator-card-clone {
    display: block;
  }

  .filter-bar {
    padding: 12px;
    border-radius: var(--radius-lg);
    gap: 10px;
  }

  .search-box {
    flex: 1 1 100%;
    max-width: none;
  }

  .filter-meta-controls {
    width: 100%;
    justify-content: space-between;
  }

  .school-pills-grid {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .school-pill {
    flex: 0 0 auto;
  }

  .roster-grid {
    grid-template-columns: repeat(auto-fill, minmax(136px, 1fr));
    gap: 9px;
  }

  /* Polished Mobile Bottom Sheet Proportions */
  .inspector-pane {
    padding: 6px 12px calc(10px + env(safe-area-inset-bottom));
    gap: 7px;
  }

  .insp-avatar {
    width: 42px;
    height: 42px;
  }

  .insp-accent-pill {
    height: 34px;
  }

  .insp-name-line h2 {
    font-size: 0.96rem;
  }

  .insp-subnames {
    font-size: 0.68rem;
  }

  .insp-club-line {
    font-size: 0.71rem;
  }

  .icon-pill-btn {
    padding: 5px 8px;
    font-size: 0.7rem;
  }

  .control-group-box {
    padding: 6px 8px;
    gap: 4px;
  }

  .stage-viewport {
    height: clamp(152px, 22dvh, 195px);
    padding: 8px 36px;
  }

  .stage-arrow {
    width: 28px;
    height: 28px;
    font-size: 1rem;
  }

  .sprite-action-bar {
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
    padding: 7px 9px;
  }

  .sprite-meta {
    width: 100%;
  }

  .sprite-btns {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
    width: 100%;
  }

  .action-pill {
    text-align: center;
    padding: 6px 4px;
    font-size: 0.71rem;
  }

  .emotion-bar {
    gap: 6px;
  }

  .thumb-tools {
    width: 100%;
  }

  .thumb-filter-input {
    flex: 1;
    width: auto;
  }

  .thumb-viewport {
    min-height: 150px;
    padding: 6px;
  }

  .site-footer {
    width: calc(100% - 24px);
    padding: 14px 16px;
  }

  .kbd-hint,
  .stage-kbd-tip {
    display: none;
  }
}

@media (max-width: 390px) {
  .brand-title {
    font-size: 1.04rem;
  }

  .geo-badge {
    display: none;
  }

  .nav-credits {
    padding: 5.5px 8px;
    font-size: 0.7rem;
  }

  .roster-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
