/* Swiss Modern Kinetic Gallery — Layout, Bento Stage, 3D Orbit Stage, Runway Stage, Reticle & Modals */

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

html,
body {
  min-height: 100%;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  selection-background-color: var(--accent);
}

::selection {
  background: var(--accent);
  color: #fff;
}

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

/* Prevent accidental text highlight on interactive UI components */
.portal-shell,
.brand-lockup,
.telemetry-bar,
.control-strip,
.portal-card,
.footer-rail,
.dimension-peek,
.spotlight-modal,
button,
a {
  -webkit-user-select: none;
  user-select: none;
}

input,
textarea,
.peek-frame {
  -webkit-user-select: auto;
  user-select: auto;
}

html.has-custom-cursor,
html.has-custom-cursor a,
html.has-custom-cursor button {
  cursor: none;
}

button,
input {
  font: inherit;
  color: inherit;
  background: none;
  border: none;
}

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

/* Background interactive field */
#swiss-field {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 0;
}

/* Custom Dual-Ring Swiss Reticle Cursor */
#swiss-cursor,
#swiss-cursor-ring {
  position: fixed;
  top: 0;
  left: 0;
  pointer-events: none;
  z-index: 9000;
  will-change: transform;
  display: none;
}

html.has-custom-cursor #swiss-cursor,
html.has-custom-cursor #swiss-cursor-ring {
  display: block;
}

#swiss-cursor::before {
  content: '';
  position: absolute;
  width: 7px;
  height: 7px;
  margin: -3.5px 0 0 -3.5px;
  border-radius: 50%;
  background: var(--accent);
}

#swiss-cursor-ring {
  width: 44px;
  height: 44px;
  margin: -22px 0 0 -22px;
  border: 1px solid var(--hairline-strong);
  border-radius: 50%;
  transition:
    width 0.28s var(--ease-out-expo),
    height 0.28s var(--ease-out-expo),
    margin 0.28s var(--ease-out-expo),
    border-color 0.2s ease,
    background-color 0.2s ease;
}

#swiss-cursor-ring.is-engaged {
  width: 72px;
  height: 72px;
  margin: -36px 0 0 -36px;
  border-color: var(--accent);
  background: var(--accent-soft);
  backdrop-filter: blur(3px);
}

#swiss-cursor-ring.is-down {
  transform-origin: center;
  border-color: var(--accent);
}

#swiss-cursor-label {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--ink);
  opacity: 0;
  transition: opacity 0.18s ease;
}

#swiss-cursor-ring.is-engaged #swiss-cursor-label {
  opacity: 1;
}

.cursor-gauge {
  position: absolute;
  inset: -6px;
  width: calc(100% + 12px);
  height: calc(100% + 12px);
  transform: rotate(-90deg);
}

#cursor-gauge-arc {
  fill: none;
  stroke: var(--accent);
  stroke-width: 2.5;
  stroke-dasharray: 163.36;
  stroke-dashoffset: 163.36;
  stroke-linecap: round;
}

/* Architectural Swiss Frame */
.portal-shell {
  position: relative;
  z-index: 1;
  max-width: 1520px;
  margin: 0 auto;
  min-height: 100vh;
  border-left: 1px solid var(--hairline);
  border-right: 1px solid var(--hairline);
  display: flex;
  flex-direction: column;
}

/* Sticky Top Telemetry Rail */
.telemetry-bar {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 22px;
  height: 52px;
  background: var(--bg-elevated);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--hairline);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
}

.telemetry-left,
.telemetry-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

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

.live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 0 var(--accent);
  animation: beaconPulse 2.2s infinite;
}

@keyframes beaconPulse {
  0% {
    box-shadow: 0 0 0 0 rgba(255, 59, 29, 0.55);
  }
  70% {
    box-shadow: 0 0 0 8px rgba(255, 59, 29, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(255, 59, 29, 0);
  }
}

.telemetry-sep {
  color: var(--hairline-strong);
}

.hud-coords {
  color: var(--ink-muted);
  font-variant-numeric: tabular-nums;
}

.rail-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 30px;
  padding: 0 10px;
  border: 1px solid var(--hairline);
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  background: var(--surface);
  transition:
    border-color 0.2s ease,
    background-color 0.2s ease,
    transform 0.2s var(--ease-spring),
    color 0.2s ease;
}

.rail-btn:hover {
  border-color: var(--ink);
  transform: translateY(-1px);
}

.rail-btn.is-active,
.rail-btn.is-complete {
  border-color: var(--accent);
  color: var(--accent);
}

/* Secret Easter-Egg Specimen Drawer */
.egg-drawer-wrap {
  overflow: hidden;
  max-height: 0;
  border-bottom: 0 solid var(--hairline);
  background: var(--surface);
  transition: max-height 0.4s var(--ease-out-expo), border-bottom-width 0.2s ease;
}

.egg-drawer-wrap.is-open {
  max-height: 160px;
  border-bottom-width: 1px;
}

.egg-drawer {
  display: grid;
  grid-template-columns: repeat(10, minmax(0, 1fr));
}

.egg-slot {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 12px 6px;
  border-right: 1px solid var(--hairline);
  font-family: var(--font-mono);
  transition: background-color 0.2s ease, color 0.2s ease;
}

.egg-slot:last-child {
  border-right: none;
}

.egg-slot:hover {
  background: var(--accent-soft);
}

.egg-slot.is-unlocked {
  color: var(--accent);
}

.egg-slot.is-nudged {
  animation: eggShake 0.34s ease;
}

@keyframes eggShake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-4px); }
  75% { transform: translateX(4px); }
}

.egg-code {
  font-size: 9px;
  color: var(--ink-muted);
}

.egg-glyph {
  font-size: 16px;
  line-height: 1.1;
}

.egg-name {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.06em;
}

/* Giant Swiss Kinetic Masthead */
.masthead {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  gap: 24px;
  padding: clamp(28px, 4.5vw, 56px) clamp(20px, 3vw, 40px) clamp(22px, 3vw, 38px);
  border-bottom: 1px solid var(--hairline);
}

.brand-lockup {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: clamp(4px, 1vw, 14px);
  line-height: 0.94;
  user-select: none;
}

.brand-word {
  display: inline-block;
  font-family: var(--font-sans);
  font-weight: 900;
  font-size: clamp(54px, 9.2vw, 136px);
  letter-spacing: -0.055em;
  transition: transform 0.32s var(--ease-out-expo), color 0.2s ease;
  animation: shutterUp 0.85s var(--ease-out-expo) both;
}

.brand-word-btn {
  background: none;
  border: none;
  padding: 0;
  text-align: left;
  color: inherit;
  cursor: pointer;
}

#hero-word-left {
  cursor: pointer;
}

#hero-word-left:hover {
  color: var(--accent);
}

#hero-word-left.is-flipping {
  animation: wordFlip 0.32s var(--ease-spring);
}

#hero-word-right {
  animation-delay: 0.08s;
}

/* English Gloss under the Masthead */
.brand-gloss {
  grid-column: 1 / -1;
  margin-top: 10px;
  padding: 10px 14px;
  border-left: 3px solid var(--accent);
  background: var(--surface);
  border: 1px solid var(--hairline-strong);
  border-left-width: 3px;
  border-left-color: var(--accent);
  border-radius: 0 6px 6px 0;
  font-family: var(--font-mono);
  font-size: 11.5px;
  line-height: 1.55;
  color: var(--ink-muted);
  max-width: 640px;
  animation: shutterUp 0.35s var(--ease-out-expo) both;
}

.brand-gloss[hidden] {
  display: none !important;
}

.brand-gloss .gloss-pinyin {
  display: block;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--ink);
  font-size: 12px;
  margin-bottom: 2px;
}

.brand-gloss .gloss-dot {
  color: var(--accent);
  font-weight: 900;
}

.brand-gloss .gloss-dot-highlight {
  color: var(--accent);
  font-size: 13px;
}

.brand-gloss .gloss-line {
  display: block;
  font-size: 11px;
}

.brand-gloss b {
  color: var(--ink);
}

.brand-gloss em {
  font-style: normal;
  color: var(--card-accent, var(--accent));
  font-weight: 600;
}

@keyframes shutterUp {
  from {
    opacity: 0;
    transform: translateY(34px) skewY(3deg);
  }
  to {
    opacity: 1;
    transform: translateY(0) skewY(0);
  }
}

@keyframes wordFlip {
  0% { transform: translateY(-10px) scale(0.95); }
  100% { transform: translateY(0) scale(1); }
}

/* Slingshot Red Dot */
.brand-dot-btn {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: clamp(28px, 3.8vw, 50px);
  height: clamp(28px, 3.8vw, 50px);
  align-self: center;
  touch-action: none;
  z-index: 5;
}

.brand-dot-core {
  width: clamp(18px, 2.5vw, 32px);
  height: clamp(18px, 2.5vw, 32px);
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 24px rgba(255, 59, 29, 0.38);
  transition: transform 0.25s var(--ease-spring);
}

.brand-dot-btn:hover .brand-dot-core {
  transform: scale(1.24);
}

.brand-dot-btn.is-dragging .brand-dot-core {
  transform: scale(0.92);
}

.brand-tld {
  font-family: var(--font-mono);
  font-size: clamp(14px, 1.8vw, 24px);
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--ink-muted);
  margin-left: 4px;
  animation: shutterUp 0.9s 0.16s var(--ease-out-expo) both;
}

/* Big Swiss Odometer Index Counter */
.masthead-counter {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  font-family: var(--font-mono);
}

.counter-num {
  font-family: var(--font-display);
  font-size: clamp(40px, 5.4vw, 76px);
  font-weight: 800;
  line-height: 0.9;
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
}

.counter-tag {
  font-size: 10px;
  letter-spacing: 0.16em;
  color: var(--ink-muted);
}

/* Swiss Filter & Stage Mode Control Bar */
.control-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding: 12px 22px;
  border-bottom: 1px solid var(--hairline);
  background: var(--bg);
}

.filter-pills,
.stage-modes {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.pill-btn {
  height: 32px;
  padding: 0 13px;
  border: 1px solid var(--hairline);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--ink-muted);
  background: transparent;
  transition:
    color 0.18s ease,
    border-color 0.18s ease,
    background-color 0.18s ease,
    transform 0.2s var(--ease-spring);
}

.pill-btn:hover {
  color: var(--ink);
  border-color: var(--ink);
}

.pill-btn.is-active {
  background: var(--ink);
  color: var(--bg);
  border-color: var(--ink);
}

.pill-btn.is-vault {
  border-style: dashed;
  color: var(--accent);
  border-color: var(--accent);
}

.pill-btn.is-vault.is-active {
  background: var(--accent);
  color: #fff;
  border-style: solid;
}

/* =========================================================
   STAGE MODE 1: SWISS ASYMMETRIC BENTO GRID (⊞ GRID)
   ========================================================= */
.stage-container {
  position: relative;
  flex: 1;
}

/* Full-Viewport Multi-Scene 3D Cyberpunk Canvas Cinema */
.cyber-load-stage {
  position: relative;
  min-height: 540px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: #05040c;
  color: #00f0ff;
  isolation: isolate;
  transition:
    opacity 0.36s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.36s cubic-bezier(0.16, 1, 0.3, 1),
    clip-path 0.36s cubic-bezier(0.16, 1, 0.3, 1),
    filter 0.36s ease;
}

.cyber-load-stage[hidden] {
  display: none !important;
}

.cyber-load-stage.is-fullscreen {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100dvh;
  min-height: 100dvh;
  z-index: 9999;
  border: 2px solid rgba(0, 240, 255, 0.55);
  box-shadow:
    inset 0 0 80px rgba(255, 0, 85, 0.28),
    inset 0 0 30px rgba(0, 240, 255, 0.35);
}

.cyber-load-stage.is-regional {
  position: relative;
  width: 100%;
  min-height: clamp(460px, 64vh, 680px);
  border-bottom: 1.5px solid rgba(0, 240, 255, 0.55);
  box-shadow:
    inset 0 0 65px rgba(255, 0, 85, 0.24),
    inset 0 0 24px rgba(0, 240, 255, 0.3);
}

.cyber-load-stage.is-compact {
  min-height: 100%;
  border-bottom: none;
}

.cyber-stage-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  z-index: 0;
}

.cyber-load-stage.is-exiting {
  opacity: 0;
  transform: scale(1.12) skewX(-8deg);
  filter: hue-rotate(90deg) contrast(2.2) brightness(2.2) blur(8px);
  pointer-events: none;
}

.cyber-load-stage::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(
      0deg,
      rgba(0, 240, 255, 0.05) 0px,
      rgba(0, 240, 255, 0.05) 1px,
      transparent 1px,
      transparent 4px
    ),
    radial-gradient(circle at center, transparent 48%, rgba(3, 2, 8, 0.72) 100%);
  pointer-events: none;
  z-index: 1;
}

/* Sweeping Laser Scan Beam */
.cyber-scan-beam {
  position: absolute;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, transparent 0%, #00f0ff 22%, #fcee09 50%, #ff0055 78%, transparent 100%);
  box-shadow:
    0 0 18px #00f0ff,
    0 0 36px #ff0055;
  opacity: 0.78;
  animation: cyberLaserScan 1.9s ease-in-out infinite;
  pointer-events: none;
  z-index: 2;
}

@keyframes cyberLaserScan {
  0% {
    top: -4%;
    opacity: 0.2;
  }
  50% {
    opacity: 0.9;
  }
  100% {
    top: 104%;
    opacity: 0.2;
  }
}

/* Corner HUD Telemetry Brackets */
.cyber-corner {
  position: absolute;
  z-index: 3;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.14em;
  padding: 6px 12px;
  color: #fcee09;
  background: rgba(8, 8, 18, 0.84);
  border: 1px solid rgba(0, 240, 255, 0.55);
  text-shadow: 0 0 8px rgba(252, 238, 9, 0.8);
  clip-path: polygon(0 0, calc(100% - 8px) 0, 100% 8px, 100% 100%, 8px 100%, 0 calc(100% - 8px));
}

.cyber-corner.is-tl {
  top: 22px;
  left: 24px;
  border-left: 3px solid #00f0ff;
}

.cyber-corner.is-tr {
  top: 22px;
  right: 24px;
  border-right: 3px solid #ff0055;
  color: #ff2a85;
  text-shadow: 0 0 8px rgba(255, 0, 85, 0.85);
}

.cyber-corner.is-bl {
  bottom: 22px;
  left: 24px;
  border-left: 3px solid #fcee09;
  color: #00f0ff;
  text-shadow: 0 0 8px rgba(0, 240, 255, 0.8);
}

.cyber-corner.is-br {
  bottom: 22px;
  right: 24px;
  border-right: 3px solid #00f0ff;
  color: #fcee09;
}

.cyber-corner-group.is-br {
  position: absolute;
  bottom: 22px;
  right: 24px;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.cyber-corner-group .cyber-corner {
  position: relative;
  top: auto;
  right: auto;
  bottom: auto;
  left: auto;
  border-right: 3px solid #00f0ff;
}

.cyber-scene-btn {
  cursor: pointer;
  pointer-events: auto;
  transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}

.cyber-scene-btn:hover {
  border-color: #fcee09;
  box-shadow: 0 0 18px rgba(252, 238, 9, 0.65), 0 0 28px rgba(255, 0, 85, 0.45);
  transform: scale(1.04);
}

/* Random Periodic Cyberpunk Signal Malfunction / Static Crackle ("滋滋滋") */
.cyber-signal-overlay {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100dvh;
  pointer-events: none;
  z-index: 9998;
  mix-blend-mode: screen;
}

.cyber-signal-overlay[hidden] {
  display: none !important;
}

body.is-signal-glitch .portal-shell {
  transform: translate3d(var(--signal-jx, 0px), var(--signal-jy, 0px), 0)
    skewX(var(--signal-skew, 0deg));
  filter:
    drop-shadow(-4px 0 0 rgba(0, 240, 255, 0.85))
    drop-shadow(4px 0 0 rgba(255, 0, 85, 0.85))
    contrast(1.28)
    saturate(1.65);
}

body.is-signal-dropout .portal-shell {
  opacity: 0.24;
  filter:
    drop-shadow(-9px 0 0 #00f0ff)
    drop-shadow(9px 0 0 #ff0055)
    contrast(2.4)
    brightness(0.45);
}

body.is-signal-invert .portal-shell {
  filter:
    invert(0.92)
    hue-rotate(160deg)
    drop-shadow(-6px 0 0 #fcee09)
    drop-shadow(6px 0 0 #00f0ff);
}

.stage-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  grid-auto-rows: 256px;
  grid-auto-flow: dense;
}

.portal-card {
  --rx: 0deg;
  --ry: 0deg;
  --gx: 50%;
  --gy: 50%;
  --card-accent: var(--accent);
  grid-column: span 3;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: var(--surface);
  border-right: 1px solid var(--hairline);
  border-bottom: 1px solid var(--hairline);
  overflow: hidden;
  transform-style: preserve-3d;
  transition:
    background-color 0.25s ease,
    box-shadow 0.3s ease,
    transform 0.24s var(--ease-out-expo);
  animation: cardAppear 0.65s var(--ease-out-expo) both;
}

.portal-card[data-span='hero'] {
  grid-column: span 6;
  grid-row: span 2;
}

.portal-card[data-span='wide'] {
  grid-column: span 6;
}

.portal-card[data-span='tall'] {
  grid-column: span 3;
  grid-row: span 2;
}

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

.portal-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(
    420px circle at var(--gx) var(--gy),
    var(--glare),
    transparent 65%
  );
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.28s ease;
  z-index: 3;
}

.portal-card::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 3px;
  background: var(--card-accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.34s var(--ease-out-expo);
  z-index: 4;
}

.portal-card:hover {
  z-index: 6;
  background: var(--surface-hover);
  box-shadow: var(--shadow-card);
  transform: perspective(960px) rotateX(var(--rx)) rotateY(var(--ry)) translateZ(6px);
}

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

.portal-card:hover::after {
  transform: scaleX(1);
}

.portal-card.is-hit,
.portal-card.is-roulette {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
  background: var(--accent-soft);
}

/* Zero-G Easter Egg Floating Mode */
body.is-zero-g .portal-card {
  animation: zeroGFloat 3.8s ease-in-out infinite alternate;
  animation-delay: var(--float-delay, 0s);
  box-shadow: var(--shadow-card);
}

@keyframes zeroGFloat {
  0% {
    transform: translateY(-10px) rotate(calc(var(--float-tilt, 1.5deg) * -1));
  }
  100% {
    transform: translateY(12px) rotate(var(--float-tilt, 1.5deg));
  }
}

.card-top {
  position: relative;
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px 0;
  font-family: var(--font-mono);
  font-size: 11px;
}

.card-index {
  font-weight: 700;
  color: var(--ink-muted);
  font-variant-numeric: tabular-nums;
  transition: color 0.2s ease;
}

.portal-card:hover .card-index {
  color: var(--card-accent);
}

.card-top-right {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

/* Recommended / Hot Flagship Badge */
.hot-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px 2px 6px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(255, 69, 0, 0.16), rgba(255, 140, 0, 0.22));
  border: 1px solid rgba(255, 77, 0, 0.45);
  color: #ff4500;
  font-family: var(--font-mono);
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 0.06em;
  box-shadow: 0 0 12px rgba(255, 69, 0, 0.28);
  animation: hotPulse 2.2s ease-in-out infinite;
  white-space: nowrap;
}

:root[data-theme='dark'] .hot-badge {
  background: linear-gradient(135deg, rgba(255, 69, 0, 0.25), rgba(255, 140, 0, 0.35));
  border-color: rgba(255, 100, 30, 0.65);
  color: #ff6b3d;
  box-shadow: 0 0 16px rgba(255, 80, 0, 0.4);
}

.hot-flame {
  display: inline-block;
  font-size: 11px;
  line-height: 1;
  transform-origin: 50% 90%;
  animation: flameFlicker 1.4s ease-in-out infinite alternate;
}

@keyframes hotPulse {
  0%, 100% {
    box-shadow: 0 0 8px rgba(255, 69, 0, 0.2);
  }
  50% {
    box-shadow: 0 0 18px rgba(255, 69, 0, 0.45);
  }
}

@keyframes flameFlicker {
  0% { transform: rotate(-3deg) scale(0.96); }
  50% { transform: rotate(4deg) scale(1.08); }
  100% { transform: rotate(-2deg) scale(1.02); }
}

.brand-badge {
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 6px;
  border: 1px solid var(--hairline);
  background: var(--surface);
  overflow: hidden;
  flex-shrink: 0;
}

.brand-badge.is-light-seal {
  background: #F7F5F0;
}

.brand-badge img {
  width: 18px;
  height: 18px;
  object-fit: contain;
  display: block;
}

.brand-badge .img-dark {
  display: none;
}

:root[data-theme='dark'] .brand-badge.has-dark-variant .img-light {
  display: none;
}

:root[data-theme='dark'] .brand-badge.has-dark-variant .img-dark {
  display: block;
}

.card-tag {
  padding: 2px 7px;
  border: 1px solid var(--hairline);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--ink-muted);
}

/* Official FULI Geometric Wordmark Watermark on FULI Hero Card */
.fuli-wordmark-badge {
  height: 15px;
  width: auto;
  display: inline-block;
  vertical-align: middle;
  margin-right: 6px;
}

/* Live Interactive 3-Portrait fuli-avatar v5 Stage */
.fuli-avatar-stage {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 10px 16px;
  z-index: 4;
  pointer-events: none;
}

.fuli-avatar-trio {
  display: flex;
  align-items: center;
  justify-content: center;
  perspective: 700px;
}

.avatar-portrait-card {
  width: clamp(68px, 7.6vw, 98px);
  height: clamp(68px, 7.6vw, 98px);
  border-radius: 16px;
  overflow: hidden;
  border: 1.5px solid var(--hairline-strong);
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.16);
  transition: transform 0.38s var(--ease-spring), box-shadow 0.3s ease;
  background: #F6F5EF;
}

.avatar-portrait-card svg {
  width: 100%;
  height: 100%;
  display: block;
}

.avatar-portrait-card.is-pos-0 {
  transform: translateX(14px) rotate(-8deg) scale(0.9);
  z-index: 1;
}

.avatar-portrait-card.is-pos-1 {
  transform: translateY(-4px) scale(1.06);
  z-index: 3;
  border-color: #34543B;
}

.avatar-portrait-card.is-pos-2 {
  transform: translateX(-14px) rotate(8deg) scale(0.9);
  z-index: 2;
}

.portal-card:hover .avatar-portrait-card.is-pos-0 {
  transform: translateX(-8px) rotate(-14deg) scale(0.96);
}

.portal-card:hover .avatar-portrait-card.is-pos-1 {
  transform: translateY(-10px) scale(1.13);
}

.portal-card:hover .avatar-portrait-card.is-pos-2 {
  transform: translateX(8px) rotate(14deg) scale(0.96);
}

.fuli-avatar-caption {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 10px;
  pointer-events: auto;
}

.fuli-avatar-name {
  color: var(--ink-muted);
  font-weight: 600;
}

.fuli-avatar-roll {
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid #C9773F;
  color: #C9773F;
  background: var(--surface);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  transition: background-color 0.18s ease, color 0.18s ease, transform 0.2s var(--ease-spring);
}

.fuli-avatar-roll:hover {
  background: #C9773F;
  color: #fff;
  transform: scale(1.08);
}

.card-stage {
  position: relative;
  flex: 1;
  min-height: 130px;
  width: 100%;
  z-index: 2;
}

.card-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

.card-hit-link {
  position: absolute;
  inset: 0;
  z-index: 3;
}

/* One-line frosted-glass introduction shown on hover inside stage */
.card-blurb {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 12px;
  z-index: 4;
  padding: 8px 12px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-left: 3px solid var(--card-accent, var(--accent));
  box-shadow:
    0 12px 28px rgba(0, 0, 0, 0.12),
    0 2px 6px rgba(0, 0, 0, 0.04),
    inset 0 1px 0 rgba(255, 255, 255, 0.85);
  font-family: var(--font-sans);
  font-size: 11.5px;
  font-weight: 600;
  line-height: 1.45;
  color: var(--ink);
  letter-spacing: -0.01em;
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
  transition:
    opacity 0.26s var(--ease-out-expo),
    transform 0.26s var(--ease-out-expo);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
}

:root[data-theme='dark'] .card-blurb {
  background: rgba(18, 18, 24, 0.78);
  border-color: rgba(255, 255, 255, 0.14);
  border-left-color: var(--card-accent, var(--accent));
  box-shadow:
    0 14px 34px rgba(0, 0, 0, 0.45),
    0 2px 8px rgba(0, 0, 0, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.14);
}

.portal-card:hover .card-blurb {
  opacity: 1;
  transform: translateY(0);
}

.card-bottom {
  position: relative;
  z-index: 4;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 10px;
  padding: 0 16px 14px;
  pointer-events: none;
}

.card-identity {
  flex: 1;
  min-width: 0;
}

.card-title {
  font-family: var(--font-sans);
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.15;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.portal-card[data-span='hero'] .card-title {
  font-size: clamp(24px, 2.6vw, 34px);
}

.card-route {
  display: block;
  margin-top: 3px;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--ink-muted);
  letter-spacing: 0.03em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-actions {
  display: flex;
  align-items: center;
  gap: 5px;
  pointer-events: auto;
  flex-shrink: 0;
}

.icon-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-width: 28px;
  height: 28px;
  padding: 0 7px;
  border: 1px solid var(--hairline-strong);
  background: var(--bg);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.03em;
  white-space: nowrap;
  transition:
    background-color 0.18s ease,
    color 0.18s ease,
    border-color 0.18s ease,
    transform 0.2s var(--ease-spring);
}

.icon-chip svg {
  width: 13px;
  height: 13px;
  fill: currentColor;
  flex-shrink: 0;
}

.icon-chip:hover {
  background: var(--ink);
  color: var(--bg);
  border-color: var(--ink);
  transform: translateY(-1px) scale(1.04);
}

.icon-chip.is-site:hover {
  background: var(--card-accent, var(--accent));
  border-color: var(--card-accent, var(--accent));
  color: #fff;
}

/* =========================================================
   STAGE MODE 2: INTERACTIVE 3D ORBIT RING (◎ ORBIT)
   ========================================================= */
.stage-orbit-wrap {
  position: relative;
  height: min(72vh, 660px);
  min-height: 500px;
  display: grid;
  place-items: center;
  perspective: 1500px;
  overflow: hidden;
  user-select: none;
  touch-action: pan-y;
}

.orbit-ring {
  position: relative;
  width: 300px;
  height: 360px;
  transform-style: preserve-3d;
}

.orbit-ring .portal-card {
  position: absolute;
  inset: 0;
  border: 1px solid var(--hairline-strong);
  box-shadow: var(--shadow-card);
  backface-visibility: visible;
}

.orbit-hint {
  position: absolute;
  bottom: 18px;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  color: var(--ink-muted);
  padding: 5px 12px;
  border: 1px solid var(--hairline);
  background: var(--surface);
}

/* =========================================================
   STAGE MODE 3: BRUTALIST KINETIC RUNWAY STRIP (≡ RUNWAY)
   ========================================================= */
.stage-runway {
  display: flex;
  flex-direction: column;
}

.runway-row {
  position: relative;
  display: grid;
  grid-template-columns: 74px 1fr auto auto;
  align-items: center;
  gap: 20px;
  padding: 18px 26px;
  border-bottom: 1px solid var(--hairline);
  overflow: hidden;
  transition: padding-left 0.3s var(--ease-out-expo), color 0.2s ease;
}

.runway-row::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--ink);
  transform: scaleY(0);
  transform-origin: bottom;
  transition: transform 0.3s var(--ease-out-expo);
  z-index: 0;
}

.runway-row:hover {
  padding-left: 38px;
  color: var(--bg);
}

.runway-row:hover::before {
  transform: scaleY(1);
}

.runway-row > * {
  position: relative;
  z-index: 1;
}

.runway-idx {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  color: var(--accent);
}

.runway-name {
  font-family: var(--font-sans);
  font-size: clamp(22px, 3.2vw, 42px);
  font-weight: 900;
  letter-spacing: -0.03em;
}

.runway-meta {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  opacity: 0.72;
}

.runway-actions {
  display: flex;
  gap: 8px;
}

.runway-row:hover .icon-chip {
  border-color: var(--bg);
  background: transparent;
  color: var(--bg);
}

.runway-row:hover .icon-chip:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

/* Swiss Footer Stamp Rail */
.footer-rail {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding: 16px 22px;
  border-top: 1px solid var(--hairline);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--ink-muted);
}

.footer-stamp-btn {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--ink-muted);
  transition: color 0.2s ease;
}

.footer-stamp-btn:hover {
  color: var(--accent);
}

/* When Peek or Spotlight modal is open, suppress custom reticle cursor completely */
body.has-peek-open #swiss-cursor,
body.has-peek-open #swiss-cursor-ring,
body.has-spotlight-open #swiss-cursor,
body.has-spotlight-open #swiss-cursor-ring {
  display: none !important;
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

body.has-peek-open,
body.has-peek-open *,
body.has-spotlight-open,
body.has-spotlight-open * {
  cursor: auto !important;
}

body.has-peek-open a,
body.has-peek-open button,
body.has-peek-open [role="button"],
body.has-spotlight-open a,
body.has-spotlight-open button,
body.has-spotlight-open [role="button"] {
  cursor: pointer !important;
}

/* Dimension Peek (◫) Live Preview Glass Viewport */
.peek-backdrop {
  position: fixed;
  inset: 0;
  z-index: 500;
  background: rgba(8, 8, 10, 0.62);
  backdrop-filter: blur(10px);
  display: grid;
  place-items: center;
  padding: 20px;
  animation: fadeFast 0.22s ease;
}

.peek-backdrop[hidden],
.spotlight-backdrop[hidden] {
  display: none;
}

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

.peek-window {
  width: min(1220px, 95vw);
  height: min(84vh, 840px);
  background: var(--surface);
  border: 1px solid var(--hairline-strong);
  box-shadow: 0 32px 90px rgba(0, 0, 0, 0.55);
  display: flex;
  flex-direction: column;
  transition: width 0.35s var(--ease-out-expo);
}

.peek-window.is-mobile {
  width: 412px;
}

.peek-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 14px;
  height: 44px;
  border-bottom: 1px solid var(--hairline);
  font-family: var(--font-mono);
  font-size: 11px;
}

.peek-url {
  color: var(--ink-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.peek-controls {
  display: flex;
  align-items: center;
  gap: 6px;
}

.peek-body {
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.peek-loading {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface);
  transition: opacity 0.22s ease;
}

.peek-loading[hidden] {
  display: none !important;
}

.peek-frame {
  flex: 1;
  width: 100%;
  border: none;
  background: #fff;
}

/* ⌘K Spotlight Palette */
.spotlight-backdrop {
  position: fixed;
  inset: 0;
  z-index: 600;
  background: rgba(8, 8, 10, 0.52);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 13vh;
}

.spotlight-box {
  width: min(560px, 92vw);
  background: var(--surface);
  border: 1px solid var(--hairline-strong);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5);
}

.spotlight-input {
  width: 100%;
  height: 52px;
  padding: 0 18px;
  border-bottom: 1px solid var(--hairline);
  font-family: var(--font-mono);
  font-size: 14px;
  outline: none;
}

.spotlight-list {
  max-height: 340px;
  overflow-y: auto;
}

.spotlight-item {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 18px;
  border-bottom: 1px solid var(--hairline);
  font-family: var(--font-mono);
  font-size: 12px;
  text-align: left;
}

.spotlight-item:hover,
.spotlight-item.is-selected {
  background: var(--ink);
  color: var(--bg);
}

/* Easter Egg Unlock Toast */
.egg-toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 800;
  padding: 11px 16px;
  background: var(--ink);
  color: var(--bg);
  border: 1px solid var(--accent);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  transform: translateY(20px);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.32s var(--ease-spring), opacity 0.25s ease;
}

.egg-toast.is-visible {
  transform: translateY(0);
  opacity: 1;
}

/* Responsive Swiss Breakpoints */
@media (max-width: 1120px) {
  .stage-grid {
    grid-template-columns: repeat(8, minmax(0, 1fr));
  }
  .portal-card {
    grid-column: span 4;
  }
  .portal-card[data-span='hero'],
  .portal-card[data-span='wide'] {
    grid-column: span 8;
  }
  .portal-card[data-span='tall'] {
    grid-column: span 4;
  }
}

@media (max-width: 760px) {
  .portal-shell {
    border-left: none;
    border-right: none;
  }

  .hud-coords,
  .telemetry-sep,
  .hide-sm {
    display: none;
  }

  .telemetry-bar {
    height: auto;
    min-height: 46px;
    padding: 6px 12px;
    gap: 8px;
  }

  .telemetry-left {
    flex-shrink: 0;
  }

  .live-beacon {
    font-size: 10px;
    gap: 6px;
  }

  .telemetry-right {
    gap: 5px;
    overflow-x: auto;
    max-width: 100%;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }

  .telemetry-right::-webkit-scrollbar {
    display: none;
  }

  .rail-btn {
    height: 26px;
    padding: 0 8px;
    font-size: 10px;
    flex-shrink: 0;
  }

  .egg-drawer {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  .egg-drawer-wrap.is-open {
    max-height: 240px;
  }

  .masthead {
    grid-template-columns: 1fr auto;
    align-items: end;
    gap: 10px;
    padding: 18px 14px 16px;
  }

  .brand-lockup {
    flex-wrap: nowrap;
    gap: 5px;
    min-width: 0;
  }

  .brand-word {
    font-size: clamp(34px, 10.5vw, 52px);
  }

  .brand-dot-btn {
    width: clamp(22px, 6vw, 32px);
    height: clamp(22px, 6vw, 32px);
  }

  .brand-dot-core {
    width: clamp(14px, 4vw, 20px);
    height: clamp(14px, 4vw, 20px);
  }

  .brand-tld {
    font-size: clamp(11px, 3.2vw, 15px);
    margin-left: 2px;
  }

  .masthead-counter {
    align-items: flex-end;
    gap: 3px;
  }

  .counter-num {
    font-size: clamp(28px, 8vw, 40px);
  }

  .counter-tag {
    font-size: 9px;
    letter-spacing: 0.1em;
  }

  .brand-gloss {
    font-size: 10.5px;
    padding: 8px 10px;
    margin-top: 6px;
  }

  .control-strip {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    padding: 10px 12px;
  }

  .filter-pills,
  .stage-modes {
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    gap: 6px;
  }

  .filter-pills::-webkit-scrollbar,
  .stage-modes::-webkit-scrollbar {
    display: none;
  }

  .pill-btn {
    flex-shrink: 0;
    height: 30px;
    padding: 0 11px;
    font-size: 10.5px;
  }

  .stage-grid {
    grid-template-columns: 1fr;
    grid-auto-rows: 232px;
  }

  .cyber-load-stage {
    min-height: 400px;
    padding: 52px 16px;
  }

  .cyber-corner {
    font-size: 9.5px;
    padding: 3px 7px;
  }

  .cyber-corner.is-tl,
  .cyber-corner.is-tr {
    top: 10px;
  }

  .cyber-corner.is-bl,
  .cyber-corner.is-br,
  .cyber-corner-group.is-br {
    bottom: 10px;
  }

  .cyber-corner.is-tl,
  .cyber-corner.is-bl {
    left: 10px;
  }

  .cyber-corner.is-tr,
  .cyber-corner.is-br,
  .cyber-corner-group.is-br {
    right: 10px;
    gap: 6px;
  }

  .cyber-corner.is-bl {
    display: none;
  }

  .cyber-reactor {
    width: 144px;
    height: 144px;
  }

  .cyber-core-word {
    font-size: 19px;
  }

  .portal-card,
  .portal-card[data-span='wide'],
  .portal-card[data-span='tall'] {
    grid-column: 1 / -1;
    grid-row: span 1;
    border-right: none;
  }

  .portal-card[data-span='hero'] {
    grid-column: 1 / -1;
    grid-row: span 1;
    min-height: 256px;
    border-right: none;
  }

  .portal-card:hover {
    transform: none;
  }

  .card-top {
    padding: 12px 14px 0;
  }

  .card-bottom {
    padding: 0 14px 12px;
  }

  .card-title {
    font-size: 16px;
  }

  .portal-card[data-span='hero'] .card-title {
    font-size: 21px;
  }

  .card-blurb {
    left: 10px;
    right: 10px;
    bottom: 8px;
    padding: 5px 10px;
    font-size: 10.5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    opacity: 0.92;
    transform: none;
  }

  .stage-orbit-wrap {
    height: 420px;
    min-height: 390px;
    perspective: 1100px;
  }

  .orbit-ring {
    width: 236px;
    height: 292px;
  }

  .runway-row {
    grid-template-columns: 52px minmax(0, 1fr) auto;
    gap: 10px;
    padding: 12px 14px;
  }

  .runway-row:hover {
    padding-left: 14px;
  }

  .runway-name {
    font-size: 15px;
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .runway-meta {
    display: none;
  }

  .footer-rail {
    padding: 14px 12px;
    gap: 10px;
    font-size: 10px;
    justify-content: center;
    text-align: center;
  }

  .peek-backdrop {
    padding: 0;
  }

  .peek-window,
  .peek-window.is-mobile {
    width: 100vw;
    height: 100dvh;
    border: none;
  }

  .peek-bar {
    padding: 0 10px;
    gap: 6px;
  }

  #peek-viewport-toggle {
    display: none;
  }
}
