/* ==========================================================================
   Cat Stacker Online (CSO) - Minimalist Bento Grid Design System
   ========================================================================== */

@import url('fonts.css');

:root {
  /* Pure Stone Neutral Palette */
  --cso-bg: #fafaf9;               /* Stone-50 warm clean canvas */
  --cso-surface: #ffffff;          /* Pure white card surface */
  --cso-surface-subtle: #f5f5f4;   /* Stone-100 neutral block */
  --cso-surface-hover: #f1f1f0;    /* Stone-150 subtle hover */
  --cso-surface-active: #e7e5e4;   /* Stone-200 active click */

  /* Crisp 1px Borders */
  --cso-border: #e7e5e4;           /* Stone-200 crisp border */
  --cso-border-subtle: #f0eeeb;    /* Stone-100 delicate divider */
  --cso-border-dark: #27272a;      /* Dark border for accents */
  --cso-border-focus: #18181b;     /* High-contrast focus state */

  /* Sophisticated Monochromatic Typography */
  --cso-text-primary: #18181b;     /* Stone-900 / Zinc-900 deep contrast */
  --cso-text-secondary: #52525b;   /* Zinc-600 elegant body text */
  --cso-text-muted: #71717a;       /* Zinc-500 secondary notes */
  --cso-text-subtle: #a1a1aa;      /* Zinc-400 subtle metadata */

  /* Minimalist Accents */
  --cso-accent-black: #18181b;
  --cso-accent-black-hover: #27272a;
  --cso-accent-primary: #09090b;
  --cso-accent-primary-hover: #27272a;
  --cso-accent-green: #10b981;
  --cso-accent-amber: #f59e0b;

  /* Geometric Radii */
  --cso-radius-sm: 6px;
  --cso-radius-md: 10px;
  --cso-radius-lg: 14px;
  --cso-radius-xl: 18px;
  --cso-radius-full: 9999px;

  /* Subtle High-End Shadows */
  --cso-shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.04);
  --cso-shadow-card: 0 1px 3px 0 rgba(0, 0, 0, 0.04), 0 1px 2px -1px rgba(0, 0, 0, 0.03);
  --cso-shadow-hover: 0 10px 24px -4px rgba(0, 0, 0, 0.06), 0 4px 10px -2px rgba(0, 0, 0, 0.03);
  --cso-shadow-stage: 0 20px 48px -12px rgba(0, 0, 0, 0.08), 0 4px 12px -2px rgba(0, 0, 0, 0.04);

  /* Fonts */
  --cso-font-heading: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
  --cso-font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --cso-font-mono: 'IBM Plex Mono', monospace;

  /* Layout Max Widths */
  --cso-max-width: 1140px;

  /* Fullscreen Configuration */
  --cso-fs-bg: #0d0d0d;
  --cso-fs-zindex: 99999;
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  background-color: var(--cso-bg);
}

body {
  font-family: var(--cso-font-body);
  background-color: var(--cso-bg);
  color: var(--cso-text-secondary);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body.cso-fs-locked,
html.cso-fs-locked {
  overflow: hidden !important;
  touch-action: none;
}

/* Container */
.cso-container {
  width: 100%;
  max-width: var(--cso-max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
  position: relative;
  z-index: 1;
}

/* ==========================================================================
   Header (Minimalist Frosted Stone Navigation)
   ========================================================================== */
.cso-header-wrapper {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  background: rgba(250, 250, 249, 0.88);
  border-bottom: 1px solid var(--cso-border);
  margin-bottom: 2rem;
}

.cso-navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}

.cso-logo {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--cso-text-primary);
  user-select: none;
}

.cso-logo-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 0;
  box-shadow: none;
  margin-top: 3px;
  transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

.cso-logo-svg,
.cso-logo-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  transform: translateZ(0);
  -webkit-transform: translateZ(0);
}

.cso-logo:hover .cso-logo-icon {
  transform: scale(1.08) rotate(-2deg);
}

.cso-logo-text {
  font-family: var(--cso-font-heading);
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: -0.025em;
  color: var(--cso-text-primary);
  line-height: 1.1;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.cso-logo-sub {
  font-weight: 500;
  color: var(--cso-text-muted);
}

.cso-nav-actions {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.cso-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--cso-surface-subtle);
  border: 1px solid var(--cso-border);
  border-radius: var(--cso-radius-full);
  padding: 0.25rem 0.75rem;
  font-family: var(--cso-font-mono);
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--cso-text-secondary);
}

.cso-status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--cso-accent-green);
  box-shadow: 0 0 6px rgba(16, 185, 129, 0.5);
}

/* ==========================================================================
   Buttons (Crisp Minimalist Style)
   ========================================================================== */
.cso-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  font-size: 0.825rem;
  font-weight: 500;
  line-height: 1;
  text-decoration: none;
  padding: 0.45rem 0.85rem;
  border-radius: var(--cso-radius-sm);
  transition: all 0.15s ease;
  cursor: pointer;
  outline: none;
  user-select: none;
  white-space: nowrap;
}

.cso-btn-primary {
  background: var(--cso-accent-primary);
  color: #ffffff;
  border: 1px solid var(--cso-accent-primary);
}

.cso-btn-primary:hover {
  background: var(--cso-accent-primary-hover);
  border-color: var(--cso-accent-primary-hover);
  color: #ffffff;
}

.cso-btn-secondary {
  background: var(--cso-surface);
  color: var(--cso-text-primary);
  border: 1px solid var(--cso-border);
}

.cso-btn-secondary:hover {
  background: var(--cso-surface-subtle);
  border-color: #d6d3d1;
}

.cso-btn:active {
  transform: translateY(1px);
}

.cso-action-btn.is-spinning svg {
  animation: cso-spin 0.75s linear infinite;
}

@keyframes cso-spin {
  100% { transform: rotate(360deg); }
}

/* ==========================================================================
   Hero Game Stage (Window Card Architecture)
   ========================================================================== */
.cso-stage-section {
  margin-bottom: 4.5rem;
}

.cso-stage-card {
  background: var(--cso-surface);
  border: 1px solid var(--cso-border);
  border-radius: var(--cso-radius-lg);
  box-shadow: var(--cso-shadow-stage);
  overflow: hidden;
  position: relative;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.cso-stage-card:hover {
  border-color: #d6d3d1;
}

/* Stage Window Top Bar */
.cso-stage-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1.25rem;
  background: var(--cso-surface);
  gap: 1rem;
}

.cso-stage-bar-top {
  border-bottom: 1px solid var(--cso-border);
  background: #ffffff;
}

.cso-stage-info {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.cso-window-dots {
  display: flex;
  align-items: center;
  gap: 6px;
}

.cso-window-dots span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #e4e4e7;
  border: 1px solid #d4d4d8;
  display: inline-block;
}

.cso-window-dots span:nth-child(1) { background: #fee2e2; border-color: #fca5a5; }
.cso-window-dots span:nth-child(2) { background: #fef3c7; border-color: #fcd34d; }
.cso-window-dots span:nth-child(3) { background: #dcfce7; border-color: #86efac; }

.cso-game-title {
  font-family: var(--cso-font-heading);
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--cso-text-primary);
}

.cso-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: var(--cso-surface-subtle);
  border: 1px solid var(--cso-border);
  border-radius: var(--cso-radius-full);
  padding: 0.15rem 0.55rem;
  font-family: var(--cso-font-mono);
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--cso-text-secondary);
}

.cso-chip-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--cso-accent-green);
}

/* Stage Screen Container */
.cso-screen-stage {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9.8;
  min-height: 540px;
  max-height: 720px;
  background-color: #88e1db;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cso-game-iframe {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
  background-color: #88e1db;
}

/* Stage Window Bottom Bar */
.cso-stage-bar-bottom {
  border-top: 1px solid var(--cso-border);
  background: var(--cso-surface-subtle);
  padding: 0.6rem 1.25rem;
  font-size: 0.8rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.cso-stage-hint {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.8rem;
  color: var(--cso-text-muted);
}

.cso-hint-mobile {
  display: none;
}

.cso-hint-desktop {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.cso-kbd, kbd {
  font-family: var(--cso-font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--cso-text-primary);
  background: #ffffff;
  border: 1px solid var(--cso-border);
  border-radius: var(--cso-radius-sm);
  padding: 0.15rem 0.4rem;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.05);
}

.cso-stage-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* ==========================================================================
   Pseudo & Native Fullscreen Overlay
   ========================================================================== */
body.cso-fs-locked {
  overflow: hidden !important;
  touch-action: none;
}

body.cso-fs-locked .cso-header-wrapper {
  display: none !important;
}

/* Fullscreen takes 100% full viewport with no max limits */
.cso-screen-stage.is-fullscreen {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  width: 100dvw !important;
  height: 100dvh !important;
  max-width: none !important;
  max-height: none !important;
  min-width: 0 !important;
  min-height: 0 !important;
  z-index: var(--cso-fs-zindex) !important;
  border-radius: 0 !important;
  border: none !important;
  margin: 0 !important;
  padding: 0 !important;
  background: var(--cso-fs-bg) !important;
  aspect-ratio: auto !important;
}

.cso-screen-stage.is-fullscreen .cso-game-iframe {
  width: 100vw !important;
  height: 100vh !important;
  width: 100dvw !important;
  height: 100dvh !important;
  max-width: none !important;
  max-height: none !important;
  min-width: 0 !important;
  min-height: 0 !important;
  border-radius: 0 !important;
  display: block !important;
}

.cso-screen-stage:fullscreen,
.cso-screen-stage:-webkit-full-screen {
  width: 100vw !important;
  height: 100vh !important;
  max-width: none !important;
  max-height: none !important;
  min-width: 0 !important;
  min-height: 0 !important;
  border-radius: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  background: #0d0d0d !important;
}

.cso-screen-stage:fullscreen .cso-game-iframe,
.cso-screen-stage:-webkit-full-screen .cso-game-iframe {
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  max-height: none !important;
}

/* Exit button stationed at BOTTOM-RIGHT */
.cso-fs-exit-btn {
  display: none;
  position: absolute;
  bottom: 24px;
  right: 24px;
  z-index: 100000;
  width: 44px;
  height: 44px;
  border-radius: var(--cso-radius-full);
  align-items: center;
  justify-content: center;
  color: #ffffff;
  background: rgba(24, 24, 27, 0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
  transition: all 0.2s ease;
  outline: none;
}

.cso-screen-stage:fullscreen .cso-fs-exit-btn,
.cso-screen-stage:-webkit-full-screen .cso-fs-exit-btn,
.cso-screen-stage.is-fullscreen .cso-fs-exit-btn {
  display: inline-flex !important;
}

.cso-fs-exit-btn:hover {
  background: #ef4444;
  border-color: rgba(255, 255, 255, 0.5);
  transform: translateY(-2px) scale(1.05);
}

/* ==========================================================================
   Section Header Standard
   ========================================================================== */
.cso-section-header {
  margin-bottom: 2rem;
}

.cso-tag {
  display: inline-block;
  font-family: var(--cso-font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--cso-text-primary);
  background: var(--cso-surface);
  border: 1px solid var(--cso-border);
  padding: 0.2rem 0.65rem;
  border-radius: var(--cso-radius-full);
  margin-bottom: 0.75rem;
}

.cso-section-title {
  font-family: var(--cso-font-heading);
  font-size: 1.85rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--cso-text-primary);
  line-height: 1.25;
  margin-bottom: 0.5rem;
}

.cso-section-subtitle {
  font-size: 1rem;
  color: var(--cso-text-secondary);
  max-width: 680px;
  line-height: 1.6;
}

/* ==========================================================================
   Bento Grids (Modern Modular Architecture)
   ========================================================================== */
.cso-bento-section {
  margin-bottom: 4.5rem;
}

.cso-bento-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

.cso-bento-card {
  background: var(--cso-surface);
  border: 1px solid var(--cso-border);
  border-radius: var(--cso-radius-lg);
  box-shadow: var(--cso-shadow-card);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.cso-bento-card:hover {
  border-color: #d6d3d1;
  box-shadow: var(--cso-shadow-hover);
  transform: translateY(-2px);
}

.cso-bento-card-inner {
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.cso-bento-span-1 {
  grid-column: span 1;
}

.cso-bento-span-2 {
  grid-column: span 2;
}

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

.cso-bento-tag {
  font-family: var(--cso-font-mono);
  font-size: 0.725rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--cso-text-muted);
  margin-bottom: 0.65rem;
}

.cso-bento-title {
  font-family: var(--cso-font-heading);
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--cso-text-primary);
  margin-bottom: 0.5rem;
  line-height: 1.35;
}

.cso-bento-desc {
  font-size: 0.9rem;
  color: var(--cso-text-secondary);
  line-height: 1.6;
  margin-bottom: 1.25rem;
}

/* Visual Block: Physics Engine Diagram (Card 1) */
.cso-physics-visual {
  margin-top: auto;
  background: var(--cso-surface-subtle);
  border: 1px solid var(--cso-border-subtle);
  border-radius: var(--cso-radius-md);
  padding: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  position: relative;
  overflow: hidden;
}

.cso-diagram-pendulum {
  width: 80px;
  height: 100px;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.cso-diagram-pivot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--cso-text-primary);
}

.cso-diagram-arm {
  width: 2px;
  height: 70px;
  background: #cbd5e1;
  transform-origin: top center;
  animation: cso-pendulum-swing 3.2s ease-in-out infinite alternate;
  position: relative;
}

@keyframes cso-pendulum-swing {
  0% { transform: rotate(-24deg); }
  100% { transform: rotate(24deg); }
}

.cso-diagram-cat-node {
  position: absolute;
  bottom: -22px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  filter: drop-shadow(0 4px 10px rgba(234, 88, 12, 0.18)) drop-shadow(0 1px 2px rgba(0, 0, 0, 0.08));
  transition: transform 0.2s ease;
}

.cso-svg-loaf-cat {
  display: block;
  width: 44px;
  height: 32px;
}

.cso-diagram-tower {
  display: flex;
  flex-direction: column;
  gap: 5px;
  align-items: center;
  flex: 1;
}

.cso-tower-block {
  font-family: var(--cso-font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  padding: 0.35rem 0.75rem;
  border-radius: var(--cso-radius-sm);
  background: #ffffff;
  border: 1px solid var(--cso-border);
  color: var(--cso-text-primary);
  text-align: center;
  box-shadow: var(--cso-shadow-sm);
  width: 100%;
  max-width: 220px;
}

.cso-tb-3 {
  border-color: #fca5a5;
  background: #fff5f5;
  color: #991b1b;
  animation: cso-wobble 2.5s ease-in-out infinite alternate;
}

@keyframes cso-wobble {
  0% { transform: translateX(-3px) rotate(-1.5deg); }
  100% { transform: translateX(3px) rotate(1.5deg); }
}

.cso-diagram-metrics {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.cso-metric-pill {
  font-family: var(--cso-font-mono);
  font-size: 0.7rem;
  color: var(--cso-text-secondary);
  background: #ffffff;
  border: 1px solid var(--cso-border);
  border-radius: var(--cso-radius-sm);
  padding: 0.25rem 0.5rem;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  white-space: nowrap;
}

.cso-dot-green {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--cso-accent-green);
}

.cso-icon-loaf {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 3px 3px 2px 2px;
  background: linear-gradient(135deg, #f59e0b, #d97706);
}

/* Visual Block: Breed Badges (Card 2) */
.cso-breed-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: auto;
}

.cso-breed-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background: var(--cso-surface-subtle);
  border: 1px solid var(--cso-border);
  border-radius: var(--cso-radius-sm);
  padding: 0.3rem 0.65rem;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--cso-text-primary);
  transition: all 0.15s ease;
}

.cso-breed-badge:hover {
  background: #ffffff;
  border-color: var(--cso-text-primary);
  transform: translateY(-1px);
}

.cso-swatch {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.08);
}

.cso-swatch-ginger {
  background: linear-gradient(135deg, #fb923c, #ea580c);
}

.cso-swatch-calico {
  background: conic-gradient(#ea580c 0deg 120deg, #18181b 120deg 240deg, #ffffff 240deg 360deg);
}

.cso-swatch-tuxedo {
  background: linear-gradient(90deg, #18181b 50%, #ffffff 50%);
}

.cso-swatch-siamese {
  background: radial-gradient(circle, #451a03 35%, #fef3c7 70%);
}

.cso-swatch-ragdoll {
  background: linear-gradient(135deg, #f8fafc 40%, #7dd3fc 40%, #0284c7 100%);
}

.cso-swatch-blue {
  background: linear-gradient(135deg, #94a3b8, #475569);
}

/* Visual Block: Combo Multiplier (Card 3) */
.cso-combo-board {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin-top: auto;
  margin-bottom: 0.85rem;
}

.cso-combo-stat {
  background: var(--cso-surface-subtle);
  border: 1px solid var(--cso-border-subtle);
  border-radius: var(--cso-radius-md);
  padding: 0.75rem;
  display: flex;
  flex-direction: column;
}

.cso-combo-val {
  font-family: var(--cso-font-heading);
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--cso-text-primary);
  line-height: 1.1;
}

.cso-combo-lbl {
  font-size: 0.725rem;
  color: var(--cso-text-muted);
  margin-top: 0.2rem;
}

.cso-combo-steps {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.35rem;
  background: var(--cso-surface-subtle);
  border: 1px solid var(--cso-border-subtle);
  border-radius: var(--cso-radius-sm);
  padding: 0.4rem 0.6rem;
  font-family: var(--cso-font-mono);
  font-size: 0.72rem;
  color: var(--cso-text-secondary);
}

.cso-combo-step {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  white-space: nowrap;
}

.cso-combo-step b {
  color: var(--cso-text-primary);
  font-weight: 600;
}

/* Visual Block: Controls Keycards (Card 4) */
.cso-keys-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
  margin-top: auto;
}

.cso-key-card {
  background: var(--cso-surface-subtle);
  border: 1px solid var(--cso-border-subtle);
  border-radius: var(--cso-radius-md);
  padding: 0.75rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.cso-key-badge kbd {
  font-size: 0.8rem;
}

.cso-key-label {
  font-size: 0.78rem;
  color: var(--cso-text-muted);
}

/* Visual Block: Soundwave (Card 5) */
.cso-bento-horizontal {
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.cso-bento-h-text {
  flex: 1;
}

.cso-bento-h-text .cso-bento-desc {
  margin-bottom: 0;
}

.cso-soundwave-display {
  display: flex;
  align-items: center;
  gap: 5px;
  height: 48px;
  padding: 0 1rem;
  background: var(--cso-surface-subtle);
  border: 1px solid var(--cso-border-subtle);
  border-radius: var(--cso-radius-md);
}

.cso-sw-bar {
  width: 4px;
  height: 12px;
  background: var(--cso-text-primary);
  border-radius: var(--cso-radius-full);
  animation: cso-soundwave 1.4s ease-in-out infinite alternate;
}

.cso-sw-bar:nth-child(1) { height: 16px; animation-delay: 0.1s; }
.cso-sw-bar:nth-child(2) { height: 32px; animation-delay: 0.3s; }
.cso-sw-bar:nth-child(3) { height: 22px; animation-delay: 0.15s; }
.cso-sw-bar:nth-child(4) { height: 40px; animation-delay: 0.45s; }
.cso-sw-bar:nth-child(5) { height: 28px; animation-delay: 0.25s; }
.cso-sw-bar:nth-child(6) { height: 18px; animation-delay: 0.35s; }
.cso-sw-bar:nth-child(7) { height: 34px; animation-delay: 0.5s; }
.cso-sw-bar:nth-child(8) { height: 14px; animation-delay: 0.2s; }

@keyframes cso-soundwave {
  0% { transform: scaleY(0.4); opacity: 0.5; }
  100% { transform: scaleY(1); opacity: 1; }
}

/* ==========================================================================
   FAQ Accordion
   ========================================================================== */
.cso-faq-section {
  margin-bottom: 5rem;
}

.cso-faq-grid {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.cso-faq-row {
  background: var(--cso-surface);
  border: 1px solid var(--cso-border);
  border-radius: var(--cso-radius-md);
  overflow: hidden;
  box-shadow: var(--cso-shadow-card);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.cso-faq-row:hover {
  border-color: #d6d3d1;
}

.cso-faq-row.is-open {
  border-color: var(--cso-text-primary);
  box-shadow: var(--cso-shadow-hover);
}

.cso-faq-trigger {
  width: 100%;
  padding: 1.15rem 1.35rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--cso-font-heading);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--cso-text-primary);
  text-align: left;
  background: transparent;
  border: none;
  cursor: pointer;
  transition: color 0.15s ease;
}

.cso-faq-icon {
  width: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--cso-radius-sm);
  background: var(--cso-surface-subtle);
  border: 1px solid var(--cso-border-subtle);
  flex-shrink: 0;
  margin-left: 1rem;
}

.cso-faq-icon svg {
  width: 14px;
  height: 14px;
  color: var(--cso-text-muted);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), color 0.15s ease;
}

.cso-faq-row.is-open .cso-faq-icon svg {
  transform: rotate(180deg);
  color: var(--cso-text-primary);
}

.cso-faq-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.cso-faq-body-inner {
  padding: 0 1.35rem 1.25rem;
  font-size: 0.92rem;
  color: var(--cso-text-secondary);
  line-height: 1.65;
  border-top: 1px solid var(--cso-border-subtle);
  padding-top: 0.9rem;
}

/* ==========================================================================
   Footer (Minimalist Structure)
   ========================================================================== */
.cso-footer {
  border-top: 1px solid var(--cso-border);
  padding: 2.25rem 0;
  margin-top: auto;
  background: var(--cso-bg);
}

.cso-footer-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1.25rem;
}

.cso-footer-links {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.cso-footer-links a {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--cso-text-secondary);
  text-decoration: none;
  transition: color 0.15s ease;
}

.cso-footer-links a:hover {
  color: var(--cso-text-primary);
}

.cso-footer-copy {
  font-size: 0.82rem;
  color: var(--cso-text-subtle);
}

/* ==========================================================================
   Responsive Adaptations
   ========================================================================== */
@media (max-width: 900px) {
  .cso-bento-grid {
    grid-template-columns: 1fr 1fr;
  }

  .cso-bento-span-1 {
    grid-column: span 1;
  }

  .cso-bento-span-2 {
    grid-column: span 2;
  }

  .cso-bento-span-3 {
    grid-column: span 2;
  }

  .cso-bento-horizontal {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 768px) {
  .cso-header-wrapper {
    margin-bottom: 1.25rem;
  }

  .cso-navbar {
    height: 58px;
  }

  .cso-stage-section {
    margin-bottom: 3rem;
  }

  .cso-screen-stage {
    aspect-ratio: auto;
    height: clamp(500px, 64svh, 620px);
    min-height: 480px;
    max-height: 640px;
  }

  .cso-bento-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .cso-bento-span-1,
  .cso-bento-span-2,
  .cso-bento-span-3 {
    grid-column: span 1;
  }

  .cso-physics-visual {
    flex-direction: column;
    align-items: center;
  }

  .cso-keys-grid {
    grid-template-columns: 1fr;
  }

  .cso-section-title {
    font-size: 1.5rem;
  }

  .cso-footer-content {
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 0.75rem;
  }

  .cso-footer-links {
    justify-content: center;
    gap: 1.25rem;
  }

  .cso-footer-copy {
    text-align: center;
  }
}

@media (max-width: 640px) {
  .cso-action-btn .cso-btn-text {
    display: none;
  }

  .cso-action-btn {
    padding: 0.45rem 0.55rem;
    min-width: 32px;
    height: 32px;
  }

  .cso-hint-desktop {
    display: none;
  }

  .cso-hint-mobile {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
  }

  .cso-stage-bar-bottom {
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding: 0.5rem 0.85rem;
    gap: 0.5rem;
  }

  .cso-stage-actions {
    width: auto !important;
    justify-content: flex-end;
  }
}

@media (max-width: 580px) {
  .cso-container {
    padding: 0 0.85rem;
  }

  .cso-chip {
    display: none;
  }

  .cso-window-dots {
    display: none;
  }

  .cso-stage-bar {
    padding: 0.65rem 0.85rem;
  }

  .cso-screen-stage {
    aspect-ratio: auto;
    height: clamp(480px, calc(100svh - 160px), 580px);
    min-height: 460px;
    max-height: 600px;
  }

  .cso-bento-card-inner {
    padding: 1.25rem;
  }
}

@media (max-width: 400px) {
  .cso-logo-text {
    font-size: 0.95rem;
  }

  .cso-status-badge {
    padding: 0.18rem 0.5rem;
    font-size: 0.72rem;
  }
}
