/* Aero Strike - Console Arcade Stylesheet */
:root {
  --sat: env(safe-area-inset-top, 0px);
  --sar: env(safe-area-inset-right, 0px);
  --sab: env(safe-area-inset-bottom, 0px);
  --sal: env(safe-area-inset-left, 0px);
  --game-safe-bottom: 0px;
  --game-corridor-left: 0px;
  --game-corridor-width: 100vw;
  --bg: #020308;
  --panel: rgba(14, 20, 35, 0.78);
  --panel-accent: #172136;
  --border: #233454;
  --border-bright: #00f0ff;
  --accent-cyan: #00f0ff;
  --accent-orange: #ff7700;
  --accent-crimson: #ff0055;
  --text-main: #e6edf8;
  --text-dim: #8ba2c2;
  --success: #00ff88;
  --gold: #ffcc00;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, Roboto, sans-serif;
  scrollbar-width: thin;
  scrollbar-color: #00f0ff rgba(6, 12, 24, 0.95);
}

/* ========================================================
   CYBERNETIC ARCADE SCROLLBAR (Sleek Neon Glassmorphism)
   ======================================================== */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: rgba(4, 9, 20, 0.95);
  border-left: 1px solid rgba(0, 240, 255, 0.15);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #00f0ff 0%, #0088ff 100%);
  border-radius: 4px;
  border: 1px solid rgba(0, 240, 255, 0.4);
  box-shadow: 0 0 8px rgba(0, 240, 255, 0.4);
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #38bdf8 0%, #00f0ff 100%);
  box-shadow: 0 0 14px rgba(0, 240, 255, 0.8);
}

::-webkit-scrollbar-corner {
  background: rgba(4, 9, 20, 0.95);
}

/* Fullscreen 100vw x 100vh Arcade Cabinet Viewport Styling */
body, html {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  width: 100dvw;
  max-width: 100vw;
  max-width: 100dvw;
  height: 100vh;
  height: 100svh;
  height: 100dvh;
  overflow: hidden;
  overflow-x: hidden;
  background: #020308;
  margin: 0;
  padding: 0;
}

#gameCanvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  width: 100dvw;
  height: 100vh;
  height: 100svh;
  height: 100dvh;
  display: block;
  z-index: 0;
  touch-action: none;
  background: #020308;
  margin: 0;
  padding: 0;
}

.scanline-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  width: 100dvw;
  height: 100vh;
  height: 100svh;
  height: 100dvh;
  pointer-events: none;
}

html, body {
  color: var(--text-main);
  user-select: none;
  -webkit-user-select: none;
  touch-action: none;
  -webkit-touch-callout: none;
  cursor: crosshair;
}

#gameCanvas {
  display: block;
  z-index: 0;
  touch-action: none;
  -webkit-touch-callout: none;
  user-select: none;
  -webkit-user-select: none;
}

/* Scanline and CRT Ambient Overlay - Disabled to prevent blur, moiré, and eye strain */
.scanline-overlay {
  display: none !important;
  opacity: 0 !important;
  pointer-events: none;
}

/* Suppress any legacy web elements or obsolete bars */
header, .top-hud-bar {
  display: none !important;
}

/* ==========================================================================
   Cybernetic In-Game Visual Asset Gallery Overlay (Toggled via G / Button)
   ========================================================================== */
/* Note: .gallery-trigger-btn styling is consolidated in the bottom-utility-bar section below */

.gallery-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  width: 100dvw;
  height: 100vh;
  height: 100svh;
  height: 100dvh;
  z-index: 1000;
  background: rgba(3, 6, 16, 0.94);
  backdrop-filter: blur(14px);
  display: flex;
  justify-content: center;
  align-items: stretch;
  padding: 16px;
  padding-bottom: max(16px, calc(16px + env(safe-area-inset-bottom, 0px)));
  box-sizing: border-box;
}

.gallery-modal-content {
  width: 100%;
  max-width: 1600px;
  height: 100%;
  background: #080c1d;
  border: 1px solid #1e294b;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 0 40px rgba(0, 0, 0, 0.9), 0 0 20px rgba(0, 240, 255, 0.15);
}

.gallery-header {
  background: linear-gradient(180deg, #0f172a 0%, #090e21 100%);
  border-bottom: 1px solid #1e294b;
  padding: 14px 20px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.gallery-title-area h2 {
  font-size: 1.15rem;
  font-weight: 800;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 8px;
}
.gallery-badge-title {
  font-size: 0.7rem;
  background: rgba(0, 240, 255, 0.15);
  color: #00f0ff;
  border: 1px solid rgba(0, 240, 255, 0.35);
  padding: 2px 7px;
  border-radius: 4px;
}
.gallery-subtitle {
  font-size: 0.78rem;
  color: #64748b;
  margin-top: 2px;
}
.gallery-header-right {
  display: flex;
  align-items: center;
  gap: 14px;
}
.gallery-stats-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.gallery-pill {
  background: #11172e;
  border: 1px solid #1e294b;
  padding: 3px 8px;
  border-radius: 12px;
  font-size: 0.72rem;
  font-family: monospace;
}
.gallery-pill b { color: #fff; }
.gallery-pill.sprites b { color: #f59e0b; }
.gallery-pill.bg b { color: #60a5fa; }
.gallery-pill.boss b { color: #f87171; }
.gallery-pill.enemy b { color: #34d399; }
.gallery-pill.audio b { color: #f472b6; }
.gallery-pill.boss-bgm b { color: #ff007f; text-shadow: 0 0 6px rgba(255, 0, 127, 0.5); }
.gallery-pill.sfx b { color: #a78bfa; }
.gallery-pill.voice b { color: #38bdf8; }
.gallery-close-btn {
  background: rgba(255, 0, 85, 0.15);
  border: 1px solid rgba(255, 0, 85, 0.4);
  color: #ff0055;
  width: 32px;
  height: 32px;
  border-radius: 6px;
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}
.gallery-close-btn:hover {
  background: #ff0055;
  color: #fff;
  box-shadow: 0 0 12px rgba(255, 0, 85, 0.6);
}

.gallery-controls {
  padding: 10px 20px;
  background: #0b1026;
  border-bottom: 1px solid #1a233d;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: space-between;
  align-items: center;
}
.gallery-tab-group {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.gallery-tab-btn {
  background: #11172e;
  border: 1px solid #1e294b;
  color: #8ba2c2;
  padding: 5px 12px;
  border-radius: 4px;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}
.gallery-tab-btn:hover {
  background: #192342;
  color: #fff;
}
.gallery-tab-btn.active {
  background: #00f0ff;
  color: #030814;
  border-color: #00f0ff;
  box-shadow: 0 0 10px rgba(0, 240, 255, 0.35);
}
.gallery-filter-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}
.gallery-search-input {
  background: #090e21;
  border: 1px solid #1e294b;
  color: #fff;
  padding: 5px 12px;
  border-radius: 4px;
  font-size: 0.78rem;
  outline: none;
  width: 200px;
}
.gallery-search-input:focus {
  border-color: #00f0ff;
}
.gallery-bg-toggle {
  display: flex;
  background: #11172e;
  border: 1px solid #1e294b;
  border-radius: 4px;
  overflow: hidden;
}
.gallery-bg-btn {
  background: none;
  border: none;
  color: #8ba2c2;
  padding: 4px 8px;
  font-size: 0.72rem;
  cursor: pointer;
}
.gallery-bg-btn.active {
  background: #1e294b;
  color: #fff;
}

.gallery-body {
  flex-grow: 1;
  overflow-y: auto;
  padding: 16px 20px;
}
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr));
  gap: 14px;
}
.gallery-card {
  background: #10162c;
  border: 1px solid #1a233d;
  border-radius: 6px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  cursor: pointer;
  transition: transform 0.15s, border-color 0.15s, box-shadow 0.15s;
  position: relative;
}
.gallery-card:hover {
  transform: translateY(-2px);
  border-color: #00f0ff;
  box-shadow: 0 4px 16px rgba(0, 240, 255, 0.2);
}
.gallery-thumb-wrapper {
  width: 100%;
  height: 160px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  background-color: #05070f;
}
.gallery-thumb-wrapper.checker {
  background-image: linear-gradient(45deg, #111 25%, transparent 25%),
                    linear-gradient(-45deg, #111 25%, transparent 25%),
                    linear-gradient(45deg, transparent 75%, #111 75%),
                    linear-gradient(-45deg, transparent 75%, #111 75%);
  background-size: 16px 16px;
  background-position: 0 0, 0 8px, 8px -8px, -8px 0px;
  background-color: #1a1a24;
}
.gallery-thumb-wrapper.white {
  background-color: #ffffff;
}
.gallery-thumb-wrapper img {
  max-width: 90%;
  max-height: 90%;
  object-fit: contain;
  transition: transform 0.2s ease;
}
.gallery-card:hover .gallery-thumb-wrapper img {
  transform: scale(1.05);
}
.gallery-card-body {
  padding: 10px;
  background: #0c1124;
  border-top: 1px solid #1a233d;
  display: flex;
  flex-direction: column;
  gap: 3px;
  flex-grow: 1;
}
.gallery-card-title {
  font-size: 0.78rem;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.gallery-card-meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.7rem;
  color: #64748b;
  font-family: monospace;
}
.gallery-stage-pill {
  position: absolute;
  top: 6px;
  right: 6px;
  background: rgba(0, 0, 0, 0.75);
  border: 1px solid rgba(0, 240, 255, 0.4);
  color: #00f0ff;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 3px;
  z-index: 2;
  font-family: monospace;
}
.gallery-stage-pill.system-pill {
  border-color: rgba(245, 158, 11, 0.7);
  color: #fbbf24;
  background: rgba(30, 20, 5, 0.85);
  box-shadow: 0 0 6px rgba(245, 158, 11, 0.25);
}
.gallery-badge-tag {
  font-size: 0.65rem;
  padding: 1px 6px;
  border-radius: 3px;
  font-weight: 600;
}
.gallery-badge-sprites { background: rgba(245, 158, 11, 0.15); color: #f59e0b; border: 1px solid rgba(245, 158, 11, 0.35); }
.gallery-badge-bg { background: rgba(59, 130, 246, 0.15); color: #60a5fa; border: 1px solid rgba(59, 130, 246, 0.35); }
.gallery-badge-boss { background: rgba(239, 68, 68, 0.15); color: #f87171; border: 1px solid rgba(239, 68, 68, 0.35); }
.gallery-badge-enemy { background: rgba(16, 185, 129, 0.15); color: #34d399; border: 1px solid rgba(16, 185, 129, 0.35); }
.gallery-badge-audio { background: rgba(236, 72, 153, 0.15); color: #f472b6; border: 1px solid rgba(236, 72, 153, 0.35); }
.gallery-badge-boss-bgm { background: rgba(255, 0, 127, 0.2); color: #ff007f; border: 1px solid rgba(255, 0, 127, 0.45); text-shadow: 0 0 5px rgba(255, 0, 127, 0.4); }
.boss-bgm-card { border-color: rgba(255, 0, 127, 0.3) !important; }
.boss-bgm-card:hover { border-color: #ff007f !important; box-shadow: 0 0 16px rgba(255, 0, 127, 0.35) !important; }
.gallery-badge-sfx { background: rgba(167, 139, 250, 0.18); color: #c4b5fd; border: 1px solid rgba(167, 139, 250, 0.4); }
.gallery-badge-voice { background: rgba(56, 189, 248, 0.18); color: #7dd3fc; border: 1px solid rgba(56, 189, 248, 0.4); }
.gallery-folder-pill {
  font-size: 0.65rem;
  color: #64748b;
  font-family: monospace;
}
.gallery-empty-msg {
  padding: 60px 20px;
  text-align: center;
  color: #64748b;
  font-size: 0.9rem;
}

@media (max-width: 680px) {
  .gallery-modal {
    padding: 6px 4px;
    padding-bottom: max(6px, calc(6px + env(safe-area-inset-bottom, 0px)));
    overflow-x: hidden;
  }
  .gallery-modal-content {
    border-radius: 6px;
    max-width: 100%;
    width: 100%;
    overflow-x: hidden;
  }
  .gallery-header {
    padding: 10px 12px;
    gap: 8px;
  }
  .gallery-title-area h2 {
    font-size: 0.95rem;
  }
  .gallery-subtitle {
    font-size: 0.68rem;
    line-height: 1.3;
  }
  .gallery-controls {
    padding: 8px 10px;
    gap: 8px;
  }
  .gallery-filter-actions {
    width: 100%;
  }
  .gallery-search-input {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }
  .gallery-body {
    padding: 10px 8px;
    overflow-x: hidden;
  }
  .gallery-grid {
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 8px;
  }
}

/* Lightbox */
.gallery-lightbox {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  width: 100dvw;
  height: 100vh;
  height: 100svh;
  height: 100dvh;
  z-index: 1200;
  background: rgba(0, 0, 0, 0.88);
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  padding-bottom: max(20px, calc(20px + env(safe-area-inset-bottom, 0px)));
  box-sizing: border-box;
}
.gallery-lightbox-box {
  background: #090e21;
  border: 1px solid #00f0ff;
  box-shadow: 0 0 30px rgba(0, 240, 255, 0.3);
  border-radius: 8px;
  max-width: 90vw;
  max-width: 90dvw;
  max-height: 90vh;
  max-height: 90dvh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.gallery-lightbox-header {
  padding: 12px 16px;
  background: #0f172a;
  border-bottom: 1px solid #1e294b;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.gallery-lightbox-header h3 {
  font-size: 0.95rem;
  color: #fff;
}
.gallery-lightbox-close {
  background: none;
  border: none;
  color: #8ba2c2;
  font-size: 1.4rem;
  cursor: pointer;
}
.gallery-lightbox-close:hover {
  color: #ff0055;
}
.gallery-lightbox-body {
  padding: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  max-height: 65vh;
  max-height: 65dvh;
  overflow: auto;
  background: #050711;
}
.gallery-lightbox-body img {
  max-width: 100%;
  max-height: 60vh;
  max-height: 60dvh;
  object-fit: contain;
}
.gallery-lightbox-footer {
  padding: 10px 16px;
  background: #0d1224;
  border-top: 1px solid #1e294b;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.75rem;
}
.gallery-lightbox-meta {
  color: #8ba2c2;
  font-family: monospace;
}
.gallery-lightbox-link {
  color: #00f0ff;
  text-decoration: none;
  font-weight: 600;
}
.gallery-lightbox-link:hover {
  text-decoration: underline;
}

/* Audio Gallery & Jukebox Enhancements */
.gallery-card.audio-card {
  border-color: rgba(236, 72, 153, 0.3);
}
.gallery-card.audio-card:hover {
  border-color: #f472b6;
  box-shadow: 0 4px 18px rgba(236, 72, 153, 0.25);
}
.gallery-card.audio-card.is-playing {
  border-color: #00f0ff;
  box-shadow: 0 0 20px rgba(0, 240, 255, 0.4), inset 0 0 10px rgba(236, 72, 153, 0.2);
}

.gallery-audio-thumb {
  background: radial-gradient(circle at center, #1e1b4b 0%, #030712 85%) !important;
  display: flex !important;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}
.gallery-wave-bars {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 5px;
  height: 50px;
  width: 70%;
  pointer-events: none;
}
.gallery-wave-bar {
  width: 5px;
  height: 12px;
  background: linear-gradient(to top, #00f0ff, #ec4899);
  border-radius: 3px;
  transition: height 0.2s ease;
}
.is-playing .gallery-wave-bar:nth-child(1) { animation: wavePulse 0.7s infinite alternate ease-in-out 0.0s; }
.is-playing .gallery-wave-bar:nth-child(2) { animation: wavePulse 0.5s infinite alternate ease-in-out 0.1s; }
.is-playing .gallery-wave-bar:nth-child(3) { animation: wavePulse 0.8s infinite alternate ease-in-out 0.2s; }
.is-playing .gallery-wave-bar:nth-child(4) { animation: wavePulse 0.6s infinite alternate ease-in-out 0.3s; }
.is-playing .gallery-wave-bar:nth-child(5) { animation: wavePulse 0.9s infinite alternate ease-in-out 0.15s; }
.is-playing .gallery-wave-bar:nth-child(6) { animation: wavePulse 0.55s infinite alternate ease-in-out 0.25s; }
.is-playing .gallery-wave-bar:nth-child(7) { animation: wavePulse 0.75s infinite alternate ease-in-out 0.05s; }

@keyframes wavePulse {
  0% { height: 10px; opacity: 0.6; }
  100% { height: 44px; opacity: 1; filter: drop-shadow(0 0 6px #00f0ff); }
}

.gallery-audio-play-btn {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(15, 23, 42, 0.85);
  border: 2px solid #00f0ff;
  color: #00f0ff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 0 12px rgba(0, 240, 255, 0.3);
  z-index: 4;
}
.gallery-audio-play-btn:hover {
  background: rgba(0, 240, 255, 0.25);
  transform: scale(1.12);
  box-shadow: 0 0 20px rgba(0, 240, 255, 0.6);
  color: #fff;
}
.is-playing .gallery-audio-play-btn {
  border-color: #f472b6;
  color: #f472b6;
  box-shadow: 0 0 15px rgba(244, 114, 182, 0.5);
}

.gallery-audio-prog-bar {
  width: 100%;
  height: 3px;
  background: rgba(255, 255, 255, 0.1);
  margin-top: 6px;
  border-radius: 2px;
  overflow: hidden;
}
.gallery-audio-card-prog-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #00f0ff, #ec4899);
  transition: width 0.15s linear;
}

/* Sticky Bottom Player Bar */
.gallery-player-bar {
  background: #090e21;
  border-top: 1px solid #00f0ff;
  box-shadow: 0 -4px 25px rgba(0, 240, 255, 0.2);
  padding: 10px 18px;
  padding-bottom: max(10px, calc(10px + env(safe-area-inset-bottom, 0px)));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  z-index: 10;
  color: #fff;
  flex-shrink: 0;
}
.gallery-player-left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 180px;
  max-width: 300px;
}
.gallery-player-eq {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  height: 20px;
}
.gallery-player-eq span {
  width: 3px;
  height: 8px;
  background: #00f0ff;
  border-radius: 1px;
  animation: eqBounce 0.6s infinite alternate ease-in-out;
}
.gallery-player-eq span:nth-child(2) { animation-delay: 0.15s; }
.gallery-player-eq span:nth-child(3) { animation-delay: 0.3s; }
.gallery-player-eq span:nth-child(4) { animation-delay: 0.45s; }

@keyframes eqBounce {
  0% { height: 4px; }
  100% { height: 18px; }
}

.gallery-player-info {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.gallery-player-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: #00f0ff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.gallery-player-sub {
  font-size: 0.7rem;
  color: #94a3b8;
  font-family: monospace;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.gallery-player-center {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  max-width: 550px;
}
.gallery-player-btn {
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid #00f0ff;
  color: #00f0ff;
  padding: 6px 12px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 600;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.gallery-player-btn:hover {
  background: rgba(0, 240, 255, 0.2);
  color: #fff;
  box-shadow: 0 0 10px rgba(0, 240, 255, 0.4);
}
.gallery-player-btn.play {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: 1.1rem;
}
.gallery-player-btn.play.playing {
  border-color: #f472b6;
  color: #f472b6;
}
.gallery-player-btn.loop.active {
  background: rgba(0, 240, 255, 0.25);
  border-color: #00f0ff;
  color: #00f0ff;
}
.gallery-player-btn.close {
  color: #94a3b8;
  border-color: #334155;
}
.gallery-player-btn.close:hover {
  color: #f87171;
  border-color: #f87171;
}

.gallery-player-time {
  font-size: 0.75rem;
  font-family: monospace;
  color: #94a3b8;
  min-width: 90px;
}
.gallery-player-scrub, .gallery-lb-scrub {
  flex: 1;
  height: 5px;
  background: #1e294b;
  border-radius: 3px;
  outline: none;
  cursor: pointer;
  accent-color: #00f0ff;
}

.gallery-player-right {
  display: flex;
  align-items: center;
  gap: 10px;
}
.gallery-player-vol-wrapper {
  display: flex;
  align-items: center;
  gap: 6px;
}
.gallery-player-vol-icon {
  font-size: 0.85rem;
}
.gallery-player-vol {
  width: 70px;
  height: 4px;
  background: #1e294b;
  border-radius: 2px;
  outline: none;
  cursor: pointer;
  accent-color: #00f0ff;
}

/* Lightbox Audio Deck */
.gallery-audio-lightbox-deck {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 30px 20px;
  gap: 20px;
  width: 100%;
  max-width: 520px;
}
.gallery-lb-core-disc {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background: radial-gradient(circle, #1e1b4b 20%, #090e21 70%, #000 100%);
  border: 3px solid #00f0ff;
  box-shadow: 0 0 30px rgba(0, 240, 255, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.5s;
}
.gallery-audio-lightbox-deck.is-playing .gallery-lb-core-disc {
  animation: discSpin 8s linear infinite;
  border-color: #f472b6;
  box-shadow: 0 0 35px rgba(244, 114, 182, 0.5);
}
@keyframes discSpin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}
.gallery-lb-core-inner {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: #0f172a;
  border: 2px solid #334155;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}
.gallery-lb-audio-meta {
  text-align: center;
}
.gallery-lb-audio-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 6px;
}
.gallery-lb-audio-desc {
  font-size: 0.85rem;
  color: #94a3b8;
  max-width: 440px;
  line-height: 1.4;
}
.gallery-lb-audio-ctrls {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
}
.gallery-lb-play-btn {
  background: linear-gradient(135deg, rgba(0, 240, 255, 0.2), rgba(236, 72, 153, 0.2));
  border: 1px solid #00f0ff;
  color: #fff;
  padding: 10px 32px;
  border-radius: 6px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 0 15px rgba(0, 240, 255, 0.3);
  transition: all 0.2s;
}
.gallery-lb-play-btn:hover {
  background: linear-gradient(135deg, rgba(0, 240, 255, 0.4), rgba(236, 72, 153, 0.4));
  box-shadow: 0 0 25px rgba(0, 240, 255, 0.6);
  transform: scale(1.05);
}
.gallery-lb-scrub-row {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
}
.gallery-lb-time {
  font-size: 0.8rem;
  font-family: monospace;
  color: #94a3b8;
  min-width: 90px;
}
.gallery-lb-extra-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 0 10px;
}
.gallery-lb-loop-btn {
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid #334155;
  color: #94a3b8;
  padding: 5px 12px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.75rem;
  transition: all 0.2s;
}
.gallery-lb-loop-btn.active {
  border-color: #00f0ff;
  color: #00f0ff;
  background: rgba(0, 240, 255, 0.15);
}

@media (max-width: 768px) {
  .gallery-player-bar {
    flex-wrap: wrap;
    padding: 8px 12px;
    gap: 8px;
  }
  .gallery-player-left {
    min-width: 100%;
    max-width: 100%;
  }
  .gallery-player-center {
    min-width: 100%;
  }
  .gallery-player-right {
    min-width: 100%;
    justify-content: flex-end;
  }
}

/* ==========================================================================
   Aero Strike: Stage Custom Studio Cybernetic HUD Styles
   ========================================================================== */
.bottom-utility-bar,
.cabinet-bottom-bar,
.bottom-toolbar,
#bottomUtilityBar,
#bottomToolbar {
  position: fixed;
  left: max(8px, calc(var(--game-corridor-left, 0px) + max(8px, env(safe-area-inset-left, 8px))));
  bottom: 12px;
  bottom: max(12px, calc(12px + var(--game-safe-bottom, 0px)));
  bottom: max(12px, calc(12px + var(--game-safe-bottom, env(safe-area-inset-bottom, 0px))));
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 6px;
  z-index: 50;
  pointer-events: auto;
  user-select: none;
  -webkit-user-select: none;
}

.bottom-util-btn,
.toolbar-btn {
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 5px;
  height: 28px;
  padding: 0 8px;
  border-radius: 6px;
  font-family: 'Share Tech Mono', 'Orbitron', monospace, sans-serif;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.5px;
  cursor: pointer;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: all 0.18s ease;
  user-select: none;
  -webkit-user-select: none;
  white-space: nowrap;
  box-sizing: border-box;
  touch-action: manipulation;
}

.bottom-util-btn .btn-icon,
.toolbar-btn .btn-icon {
  font-family: 'Share Tech Mono', 'Apple Color Emoji', 'Segoe UI Emoji', 'Noto Color Emoji', monospace, sans-serif;
  font-size: 12px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.bottom-util-btn .btn-icon svg,
.toolbar-btn .btn-icon svg {
  display: inline-block;
  vertical-align: middle;
}

.bottom-util-btn .btn-label,
.toolbar-btn .btn-label {
  font-size: 9.5px;
  line-height: 1;
  text-transform: uppercase;
}

.stage-studio-trigger-btn {
  background: rgba(36, 24, 10, 0.88);
  color: #ffaa00;
  border: 1px solid rgba(255, 170, 0, 0.65);
  box-shadow: 0 0 10px rgba(255, 170, 0, 0.25);
}
.stage-studio-trigger-btn:hover,
.stage-studio-trigger-btn:active {
  background: rgba(255, 170, 0, 0.35);
  border-color: #ffd700;
  box-shadow: 0 0 16px rgba(255, 170, 0, 0.6);
  transform: translateY(-1px);
}

.gallery-trigger-btn {
  background: rgba(10, 22, 40, 0.88);
  color: #00f0ff;
  border: 1px solid rgba(0, 240, 255, 0.6);
  box-shadow: 0 0 10px rgba(0, 240, 255, 0.25);
}
.gallery-trigger-btn:hover,
.gallery-trigger-btn:active {
  background: rgba(0, 240, 255, 0.35);
  border-color: #00f0ff;
  box-shadow: 0 0 16px rgba(0, 240, 255, 0.6);
  transform: translateY(-1px);
}

.settings-trigger-btn {
  background: rgba(18, 12, 32, 0.88);
  color: #c084fc;
  border: 1px solid rgba(192, 132, 252, 0.65);
  box-shadow: 0 0 10px rgba(192, 132, 252, 0.25);
}
.settings-trigger-btn:hover,
.settings-trigger-btn:active {
  background: rgba(192, 132, 252, 0.35);
  border-color: #e879f9;
  box-shadow: 0 0 16px rgba(192, 132, 252, 0.6);
  transform: translateY(-1px);
}

.pause-trigger-btn {
  background: rgba(10, 30, 48, 0.88);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.65);
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.25);
}
.pause-trigger-btn:hover,
.pause-trigger-btn:active {
  background: rgba(56, 189, 248, 0.35);
  border-color: #38bdf8;
  box-shadow: 0 0 16px rgba(56, 189, 248, 0.6);
  transform: translateY(-1px);
}

@media (max-width: 768px), (max-height: 500px) and (orientation: landscape) {
  .bottom-utility-bar,
  .cabinet-bottom-bar,
  .bottom-toolbar,
  #bottomUtilityBar,
  #bottomToolbar {
    left: max(6px, calc(var(--game-corridor-left, 0px) + max(6px, env(safe-area-inset-left, 6px))));
    bottom: 7px;
    bottom: max(7px, calc(7px + var(--game-safe-bottom, 0px)));
    bottom: max(7px, calc(7px + var(--game-safe-bottom, env(safe-area-inset-bottom, 0px))));
    gap: 4px;
  }
  .bottom-util-btn,
  .toolbar-btn {
    width: 30px;
    height: 30px;
    min-width: 30px;
    min-height: 30px;
    padding: 0;
    border-radius: 6px;
    gap: 0;
    justify-content: center;
    position: relative;
  }
  /* Accessible >=44px invisible touch target for mobile touch interactions */
  .bottom-util-btn::after,
  .toolbar-btn::after {
    content: '';
    position: absolute;
    top: -7px;
    bottom: -7px;
    left: -7px;
    right: -7px;
    pointer-events: auto;
  }
  .bottom-util-btn .btn-icon,
  .toolbar-btn .btn-icon {
    font-size: 13px;
    margin: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
  .bottom-util-btn .btn-label,
  .toolbar-btn .btn-label {
    display: none !important;
  }
}

.stage-studio-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  width: 100dvw;
  height: 100vh;
  height: 100svh;
  height: 100dvh;
  z-index: 1000;
  background: rgba(3, 6, 16, 0.95);
  backdrop-filter: blur(14px);
  display: flex;
  justify-content: center;
  align-items: stretch;
  padding: 14px;
  padding-bottom: max(14px, calc(14px + env(safe-area-inset-bottom, 0px)));
  box-sizing: border-box;
}

.stage-studio-content {
  width: 100%;
  max-width: 1600px;
  height: 100%;
  background: #080c1d;
  border: 1px solid #1e294b;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 0 40px rgba(0, 0, 0, 0.9), 0 0 20px rgba(255, 170, 0, 0.15);
}

.studio-header {
  background: linear-gradient(180deg, #191228 0%, #090e21 100%);
  border-bottom: 1px solid #1e294b;
  padding: 12px 20px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.studio-title-area h2 {
  font-size: 1.15rem;
  font-weight: 800;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-family: monospace;
}
.studio-badge-title {
  font-size: 0.7rem;
  background: rgba(255, 170, 0, 0.15);
  color: #ffaa00;
  border: 1px solid rgba(255, 170, 0, 0.4);
  padding: 2px 7px;
  border-radius: 4px;
}
.studio-subtitle {
  font-size: 0.78rem;
  color: #94a3b8;
  margin-top: 2px;
}
.studio-header-right {
  display: flex;
  align-items: center;
  gap: 12px;
}
.studio-nav-btn {
  background: rgba(0, 240, 255, 0.12);
  color: #00f0ff;
  border: 1px solid rgba(0, 240, 255, 0.35);
  border-radius: 4px;
  padding: 6px 12px;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}
.studio-nav-btn:hover {
  background: rgba(0, 240, 255, 0.25);
  border-color: #00f0ff;
}
.studio-close-btn {
  color: #64748b;
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  padding: 0 4px;
  transition: color 0.2s;
  user-select: none;
}
.studio-close-btn:hover {
  color: #ff3366;
}

.studio-stage-bar {
  background: #0d1326;
  border-bottom: 1px solid #1e294b;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
}
.studio-stage-select-wrapper {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 0;
  max-width: 680px;
}
.studio-stage-select-wrapper label {
  font-size: 0.82rem;
  color: #94a3b8;
  font-family: monospace;
  white-space: nowrap;
  flex-shrink: 0;
}
.studio-stage-select {
  flex: 1;
  min-width: 0;
  background: #090e21;
  color: #00f0ff;
  border: 1px solid rgba(0, 240, 255, 0.4);
  border-radius: 4px;
  padding: 6px 10px;
  font-size: 0.85rem;
  font-family: monospace;
  outline: none;
  cursor: pointer;
  text-overflow: ellipsis;
  white-space: nowrap;
  overflow: hidden;
}
.studio-stage-select option {
  background: #090e21;
  color: #fff;
}
.studio-stage-nav-btn {
  background: #1e294b;
  color: #fff;
  border: 1px solid #334155;
  border-radius: 4px;
  padding: 6px 14px;
  font-size: 0.78rem;
  font-weight: 700;
  font-family: monospace;
  cursor: pointer;
  transition: all 0.2s;
  flex-shrink: 0;
  white-space: nowrap;
}
.studio-stage-nav-btn:hover {
  background: #334155;
  border-color: #00f0ff;
  color: #00f0ff;
}

.studio-pill {
  padding: 3px 8px;
  border-radius: 12px;
  font-size: 0.7rem;
  font-family: monospace;
  font-weight: 700;
  white-space: nowrap;
  flex-shrink: 0;
}
.studio-pill.canonical {
  background: rgba(100, 116, 139, 0.2);
  border: 1px solid #475569;
  color: #94a3b8;
}
.studio-pill.custom {
  background: rgba(255, 170, 0, 0.2);
  border: 1px solid #ffaa00;
  color: #ffd700;
}

@media (max-width: 860px) {
  .studio-stage-bar {
    flex-wrap: wrap;
    gap: 8px 10px;
    padding: 8px 12px;
  }
  .studio-stage-select-wrapper {
    order: 1;
    width: 100%;
    max-width: 100%;
    flex: 1 1 100%;
  }
  .studio-stage-nav-btn#studioPrevStageBtn {
    order: 2;
  }
  .studio-stage-nav-btn#studioNextStageBtn {
    order: 3;
    margin-left: auto;
  }
}

.studio-body {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 16px;
  background: radial-gradient(circle at 50% 10%, #0e152d 0%, #060916 100%);
}

.studio-slots-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 360px), 1fr));
  gap: 16px;
  width: 100%;
  min-width: 0;
}

.studio-slot-card {
  background: rgba(13, 19, 38, 0.8);
  border: 1px solid #1e294b;
  border-radius: 6px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  overflow: visible;
}
.studio-slot-card:hover {
  border-color: rgba(0, 240, 255, 0.35);
}

.studio-slot-header {
  display: flex;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 8px;
}
.studio-slot-icon {
  font-size: 1.2rem;
}
.studio-slot-header h3 {
  margin: 0;
  font-size: 0.9rem;
  font-weight: 700;
  color: #f1f5f9;
  font-family: monospace;
}

.studio-slot-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.studio-field-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.studio-field-row label {
  font-size: 0.75rem;
  color: #94a3b8;
  font-family: monospace;
}
.studio-input {
  background: #090e21;
  border: 1px solid #243254;
  border-radius: 4px;
  padding: 6px 10px;
  color: #f1f5f9;
  font-size: 0.82rem;
  font-family: monospace;
  outline: none;
}
.studio-input:focus {
  border-color: #00f0ff;
  box-shadow: 0 0 8px rgba(0, 240, 255, 0.25);
}

.studio-slider-wrapper {
  display: flex;
  align-items: center;
  gap: 10px;
}
.studio-slider-wrapper input[type="range"] {
  flex: 1;
  accent-color: #00f0ff;
}
.studio-slider-wrapper span {
  font-size: 0.78rem;
  color: #00f0ff;
  font-family: monospace;
  min-width: 60px;
  text-align: right;
}

.studio-btn {
  background: rgba(0, 240, 255, 0.1);
  color: #00f0ff;
  border: 1px solid rgba(0, 240, 255, 0.3);
  border-radius: 4px;
  padding: 8px 12px;
  font-size: 0.8rem;
  font-weight: 700;
  font-family: monospace;
  cursor: pointer;
  transition: all 0.2s;
  text-align: center;
}
.studio-btn:hover {
  background: rgba(0, 240, 255, 0.25);
  border-color: #00f0ff;
}
.studio-btn.pick-btn {
  margin-top: 4px;
}

.studio-btn-sub {
  background: #1e294b;
  color: #cbd5e1;
  border: 1px solid #334155;
  border-radius: 3px;
  padding: 4px 8px;
  font-size: 0.72rem;
  font-family: monospace;
  cursor: pointer;
}
.studio-btn-sub:hover {
  background: #334155;
  color: #00f0ff;
  border-color: #00f0ff;
}

/* BGM preview box */
.studio-bgm-preview-box {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #090e21;
  border: 1px solid #1e294b;
  border-radius: 4px;
  padding: 8px 10px;
}
.studio-bgm-disc {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: radial-gradient(circle, #ff0055 20%, #111 70%);
  border: 2px solid #ff0055;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
}
.studio-bgm-disc.spinning {
  animation: studioSpin 2s linear infinite;
}
@keyframes studioSpin {
  100% { transform: rotate(360deg); }
}
.studio-bgm-info {
  flex: 1;
  min-width: 0;
}
.studio-bgm-title {
  font-size: 0.82rem;
  font-weight: 700;
  color: #f1f5f9;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.studio-bgm-file {
  font-size: 0.7rem;
  color: #64748b;
  font-family: monospace;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Background preview */
.studio-thumb-preview-box {
  width: 100%;
  height: 120px;
  background: #060914;
  border: 1px solid #1e294b;
  border-radius: 4px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.studio-thumb-preview-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.studio-colors-row {
  display: flex;
  gap: 12px;
}
.studio-color-item {
  display: flex;
  align-items: center;
  gap: 6px;
}
.studio-color-item label {
  font-size: 0.72rem;
  color: #94a3b8;
  font-family: monospace;
}
.studio-color-item input[type="color"] {
  border: 1px solid #1e294b;
  border-radius: 3px;
  width: 28px;
  height: 24px;
  background: transparent;
  cursor: pointer;
}

/* Boss preview */
.studio-boss-preview-box {
  display: flex;
  gap: 12px;
  align-items: center;
  background: #090e21;
  border: 1px solid #1e294b;
  border-radius: 4px;
  padding: 8px;
}
.studio-boss-preview-box img {
  width: 80px;
  height: 80px;
  object-fit: contain;
  background: radial-gradient(circle, rgba(255, 0, 85, 0.15) 0%, transparent 70%);
  border: 1px solid rgba(255, 0, 85, 0.3);
  border-radius: 4px;
}
.studio-boss-meta {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.studio-hp-control {
  display: flex;
  align-items: center;
  gap: 8px;
}
.studio-hp-effective {
  font-size: 0.72rem;
  color: #ffaa00;
  font-family: monospace;
  white-space: nowrap;
}

/* Squadron units */
.studio-units-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  width: 100%;
  min-width: 0;
}
.studio-unit-col {
  background: #090e21;
  border: 1px solid #1e294b;
  border-radius: 4px;
  padding: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  text-align: center;
  min-width: 0;
  width: 100%;
  box-sizing: border-box;
}
.studio-unit-role {
  font-size: 0.68rem;
  font-weight: 700;
  color: #00f0ff;
  font-family: monospace;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  width: 100%;
}
.studio-unit-img {
  width: 50px;
  height: 50px;
  object-fit: contain;
  background: radial-gradient(circle, rgba(0, 240, 255, 0.12) 0%, transparent 70%);
  flex-shrink: 0;
}
.studio-unit-stats {
  display: flex;
  flex-direction: column;
  gap: 2px;
  width: 100%;
  min-width: 0;
}
.studio-unit-stats label {
  font-size: 0.65rem;
  color: #94a3b8;
  display: flex;
  justify-content: space-between;
}
.studio-unit-stats input[type="range"] {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  accent-color: #ffaa00;
}
.studio-unit-col .pick-unit-btn {
  max-width: 100%;
  box-sizing: border-box;
  white-space: nowrap;
}

/* Footer Action Bar */
.studio-footer {
  background: #0b1024;
  border-top: 1px solid #1e294b;
  padding: 12px 20px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  width: 100%;
  box-sizing: border-box;
}
.studio-footer-left, .studio-footer-right {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}
.studio-act-btn {
  padding: 8px 16px;
  border-radius: 4px;
  font-size: 0.82rem;
  font-weight: 800;
  font-family: monospace;
  cursor: pointer;
  transition: all 0.2s;
  letter-spacing: 0.3px;
  box-sizing: border-box;
}
.studio-act-btn.save-btn {
  background: rgba(0, 240, 255, 0.15);
  color: #00f0ff;
  border: 1px solid #00f0ff;
}
.studio-act-btn.save-btn:hover {
  background: rgba(0, 240, 255, 0.3);
  box-shadow: 0 0 14px rgba(0, 240, 255, 0.4);
}
.studio-act-btn.sortie-btn {
  background: linear-gradient(90deg, #ff0055 0%, #ff5500 100%);
  color: #fff;
  border: 1px solid #ff3366;
  box-shadow: 0 0 12px rgba(255, 0, 85, 0.4);
}
.studio-act-btn.sortie-btn:hover {
  box-shadow: 0 0 20px rgba(255, 0, 85, 0.7);
  transform: translateY(-1px);
}
.studio-act-btn.reset-btn {
  background: rgba(100, 116, 139, 0.15);
  color: #94a3b8;
  border: 1px solid #475569;
}
.studio-act-btn.reset-btn:hover {
  background: rgba(100, 116, 139, 0.3);
  color: #fff;
}
.studio-act-btn.util-btn {
  background: #151d38;
  color: #cbd5e1;
  border: 1px solid #334155;
  padding: 7px 12px;
  font-size: 0.75rem;
}
.studio-act-btn.util-btn:hover {
  background: #1e294b;
  color: #fff;
}
.studio-act-btn.util-btn.danger {
  color: #f87171;
  border-color: rgba(239, 68, 68, 0.4);
}
.studio-act-btn.util-btn.danger:hover {
  background: rgba(239, 68, 68, 0.2);
  border-color: #ef4444;
}

@media (max-width: 768px) {
  .stage-studio-modal {
    padding: 6px 4px;
    padding-bottom: max(8px, calc(8px + env(safe-area-inset-bottom, 0px)));
    overflow-x: hidden;
  }
  .stage-studio-content {
    border-radius: 6px;
    max-width: 100%;
    width: 100%;
    overflow-x: hidden;
  }
  .studio-header {
    padding: 10px 12px;
    gap: 8px;
  }
  .studio-title-area h2 {
    font-size: 1rem;
  }
  .studio-subtitle {
    font-size: 0.72rem;
    line-height: 1.3;
  }
  .studio-body {
    padding: 10px 8px;
    overflow-x: hidden;
  }
  .studio-slots-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .studio-footer {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    padding: 8px 10px;
    padding-bottom: max(10px, calc(10px + env(safe-area-inset-bottom, 0px)));
    width: 100%;
    box-sizing: border-box;
  }
  .studio-footer-left,
  .studio-footer-right {
    display: contents;
  }
  .studio-act-btn {
    width: 100%;
    margin: 0;
    padding: 9px 6px;
    font-size: 0.76rem;
    box-sizing: border-box;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .studio-act-btn.save-btn {
    grid-column: 1;
    order: 1;
  }
  .studio-act-btn.sortie-btn {
    grid-column: 2;
    order: 2;
  }
  .studio-act-btn.reset-btn {
    grid-column: 1 / -1;
    order: 3;
  }
  .studio-act-btn#studioExportBtn {
    grid-column: 1;
    order: 4;
  }
  .studio-act-btn#studioImportBtn {
    grid-column: 2;
    order: 5;
  }
  .studio-act-btn#studioResetAllBtn {
    grid-column: 1 / -1;
    order: 6;
  }
}

@media (max-width: 540px) {
  .studio-units-row {
    grid-template-columns: 1fr;
    gap: 10px;
    width: 100%;
  }
  .studio-unit-col {
    display: grid;
    grid-template-columns: 52px 1fr auto;
    grid-template-rows: auto 1fr;
    align-items: center;
    gap: 6px 12px;
    padding: 10px;
    text-align: left;
    width: 100%;
    box-sizing: border-box;
  }
  .studio-unit-role {
    grid-column: 1 / -1;
    font-size: 0.72rem;
    text-align: left;
    margin-bottom: 2px;
  }
  .studio-unit-img {
    width: 48px;
    height: 48px;
    grid-column: 1;
    grid-row: 2;
  }
  .studio-unit-stats {
    grid-column: 2;
    grid-row: 2;
    width: 100%;
    min-width: 0;
  }
  .studio-unit-col .pick-unit-btn {
    grid-column: 3;
    grid-row: 2;
    padding: 8px 12px;
    font-size: 0.76rem;
    white-space: nowrap;
    align-self: center;
    min-height: 36px;
  }
  .studio-boss-preview-box {
    gap: 10px;
    padding: 6px;
  }
  .studio-boss-preview-box img {
    width: 68px;
    height: 68px;
  }
  .studio-colors-row {
    flex-wrap: wrap;
    gap: 8px;
  }
}

/* Sub-Picker Modal */
.studio-picker-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  width: 100dvw;
  height: 100vh;
  height: 100svh;
  height: 100dvh;
  z-index: 1100;
  background: rgba(2, 4, 10, 0.92);
  backdrop-filter: blur(12px);
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
  padding-bottom: max(20px, calc(20px + env(safe-area-inset-bottom, 0px)));
  box-sizing: border-box;
}
.studio-picker-content {
  width: 100%;
  max-width: 1100px;
  height: 80vh;
  height: 80svh;
  height: 80dvh;
  background: #090e21;
  border: 1px solid #243254;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 0 30px rgba(0, 0, 0, 0.95);
}
.studio-picker-header {
  background: #0f172a;
  border-bottom: 1px solid #1e294b;
  padding: 12px 18px;
  display: flex;
  align-items: center;
  gap: 14px;
}
.studio-picker-header h3 {
  margin: 0;
  font-size: 0.95rem;
  color: #00f0ff;
  font-family: monospace;
  white-space: nowrap;
}
.studio-picker-search {
  flex: 1;
  background: #090e21;
  border: 1px solid #334155;
  border-radius: 4px;
  padding: 6px 12px;
  color: #fff;
  font-size: 0.82rem;
  font-family: monospace;
  outline: none;
}
.studio-picker-search:focus {
  border-color: #00f0ff;
}
.studio-picker-close {
  color: #64748b;
  font-size: 1.5rem;
  cursor: pointer;
  line-height: 1;
}
.studio-picker-close:hover {
  color: #ff3366;
}
.studio-picker-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
}
.studio-picker-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 180px), 1fr));
  gap: 12px;
  width: 100%;
}

.studio-picker-card {
  background: #0d1326;
  border: 1px solid #1e294b;
  border-radius: 6px;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
  transition: all 0.2s;
  min-width: 0;
  box-sizing: border-box;
}
.studio-picker-card:hover {
  border-color: #00f0ff;
  background: #111a36;
}
.studio-picker-card.bgm-card {
  flex-direction: row;
  grid-column: 1 / -1;
  justify-content: space-between;
  min-width: 0;
  box-sizing: border-box;
}
.picker-card-disc {
  font-size: 1.5rem;
  flex-shrink: 0;
}
.picker-card-info {
  flex: 1;
  min-width: 0;
}
.picker-card-title {
  font-size: 0.82rem;
  font-weight: 700;
  color: #f1f5f9;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.picker-card-sub {
  font-size: 0.72rem;
  color: #64748b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.picker-select-btn {
  background: #00f0ff;
  color: #000;
  border: none;
  border-radius: 4px;
  padding: 5px 12px;
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
  flex-shrink: 0;
  white-space: nowrap;
}
.picker-select-btn:hover {
  background: #fff;
}

.picker-thumb-wrapper {
  width: 100%;
  height: 90px;
  background: #060914;
  border-radius: 4px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.picker-thumb-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.picker-thumb-wrapper.boss-thumb img,
.picker-thumb-wrapper.enemy-thumb img {
  object-fit: contain;
}

@media (max-width: 600px) {
  .studio-picker-modal {
    padding: 6px 4px;
    padding-bottom: max(6px, calc(6px + env(safe-area-inset-bottom, 0px)));
    overflow-x: hidden;
  }
  .studio-picker-content {
    border-radius: 6px;
    max-width: 100%;
    width: 100%;
    height: 88vh;
    height: 88svh;
    height: 88dvh;
    overflow-x: hidden;
  }
  .studio-picker-header {
    padding: 8px 12px;
    gap: 8px;
    flex-wrap: wrap;
  }
  .studio-picker-header h3 {
    font-size: 0.85rem;
  }
  .studio-picker-search {
    order: 3;
    width: 100%;
    flex: 1 1 100%;
  }
  .studio-picker-close {
    margin-left: auto;
  }
  .studio-picker-body {
    padding: 8px 6px;
    overflow-x: hidden;
  }
  .studio-picker-grid {
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 8px;
  }
}

/* Floating Toast */
.studio-toast {
  position: fixed;
  bottom: max(24px, calc(24px + env(safe-area-inset-bottom, 0px)));
  left: 50%;
  transform: translateX(-50%) translateY(40px);
  background: rgba(13, 19, 38, 0.95);
  color: #00f0ff;
  border: 1px solid #00f0ff;
  box-shadow: 0 0 20px rgba(0, 240, 255, 0.4);
  padding: 10px 20px;
  border-radius: 6px;
  font-family: monospace;
  font-size: 0.85rem;
  font-weight: 700;
  z-index: 2000;
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.studio-toast.visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.gallery-tab-btn.studio-tab {
  background: rgba(255, 170, 0, 0.12);
  border-color: rgba(255, 170, 0, 0.4);
  color: #ffaa00;
  margin-left: auto;
}

.gallery-tab-btn.studio-tab:hover {
  background: rgba(255, 170, 0, 0.25);
  border-color: #ffaa00;
  color: #ffffff;
  box-shadow: 0 0 12px rgba(255, 170, 0, 0.4);
}

/* ==========================================================================
   Cybernetic Audio & System Settings Modal (Toggled via O / Button)
   ========================================================================== */
.settings-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  width: 100dvw;
  height: 100vh;
  height: 100svh;
  height: 100dvh;
  z-index: 1000;
  background: rgba(4, 7, 18, 0.94);
  backdrop-filter: blur(14px);
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 16px;
  padding-bottom: max(16px, calc(16px + env(safe-area-inset-bottom, 0px)));
  box-sizing: border-box;
}

.settings-modal-content {
  width: 100%;
  max-width: 680px;
  background: rgba(10, 16, 32, 0.96);
  border: 1px solid rgba(192, 132, 252, 0.5);
  border-radius: 12px;
  box-shadow: 0 0 35px rgba(192, 132, 252, 0.25), inset 0 0 20px rgba(10, 16, 32, 0.8);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.settings-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid rgba(192, 132, 252, 0.25);
  background: rgba(20, 14, 38, 0.6);
}

.settings-title-area h2 {
  margin: 0;
  font-family: 'Orbitron', monospace, sans-serif;
  font-size: 1.15rem;
  color: #e879f9;
  letter-spacing: 1px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.settings-badge-title {
  font-size: 0.65rem;
  padding: 2px 6px;
  background: rgba(192, 132, 252, 0.2);
  border: 1px solid #c084fc;
  border-radius: 4px;
  color: #c084fc;
}

.settings-subtitle {
  font-size: 0.75rem;
  color: #94a3b8;
  margin-top: 4px;
}

.settings-close-btn {
  font-size: 1.6rem;
  color: #94a3b8;
  cursor: pointer;
  line-height: 1;
  transition: all 0.2s ease;
  user-select: none;
}

.settings-close-btn:hover {
  color: #ff0055;
  transform: scale(1.15);
}

.settings-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  overflow-y: auto;
  max-height: calc(85vh - 120px);
  max-height: calc(85svh - 120px);
  max-height: calc(85dvh - 120px);
}

.settings-card {
  background: rgba(14, 20, 42, 0.75);
  border: 1px solid rgba(192, 132, 252, 0.2);
  border-radius: 8px;
  padding: 14px 16px;
  transition: border-color 0.2s;
  overflow: visible;
}

.settings-card:hover {
  border-color: rgba(192, 132, 252, 0.45);
}

.settings-card-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}

.settings-icon {
  font-size: 1.3rem;
}

.settings-card-info {
  flex: 1;
}

.settings-card-title {
  font-family: 'Orbitron', monospace, sans-serif;
  font-size: 0.85rem;
  font-weight: 700;
  color: #f1f5f9;
  letter-spacing: 0.5px;
}

.settings-card-desc {
  font-size: 0.72rem;
  color: #64748b;
  margin-top: 2px;
}

.settings-val-badge {
  font-family: monospace;
  font-size: 0.95rem;
  font-weight: 700;
  color: #00f0ff;
  background: rgba(0, 240, 255, 0.1);
  border: 1px solid rgba(0, 240, 255, 0.35);
  padding: 3px 10px;
  border-radius: 4px;
  min-width: 50px;
  text-align: center;
}

.settings-profile-options {
  display: flex;
  gap: 8px;
  margin-top: 10px;
  flex-wrap: wrap;
}

.profile-btn {
  flex: 1;
  min-width: 140px;
  font-size: 0.8rem;
  padding: 8px 10px;
  background: rgba(10, 15, 30, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #94a3b8;
  cursor: pointer;
  border-radius: 4px;
  transition: all 0.2s ease;
  line-height: 1.3;
}

.profile-btn:hover {
  border-color: rgba(0, 240, 255, 0.6);
  color: #f1f5f9;
}

.profile-btn.active {
  border-color: #00f0ff !important;
  background: rgba(0, 240, 255, 0.25) !important;
  color: #ffffff !important;
  box-shadow: 0 0 10px rgba(0, 240, 255, 0.5) !important;
}

.settings-slider-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.slider-min, .slider-max {
  font-size: 0.7rem;
  font-family: monospace;
  color: #64748b;
  min-width: 32px;
}
.slider-max {
  text-align: right;
}

.cyber-slider {
  flex: 1;
  -webkit-appearance: none;
  appearance: none;
  height: 6px;
  background: #1e293b;
  border-radius: 3px;
  outline: none;
  transition: all 0.2s;
}

.cyber-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #00f0ff;
  cursor: pointer;
  box-shadow: 0 0 10px rgba(0, 240, 255, 0.7);
  transition: transform 0.15s ease;
}

.cyber-slider::-webkit-slider-thumb:hover {
  transform: scale(1.2);
  background: #38bdf8;
}

.cyber-slider::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #00f0ff;
  cursor: pointer;
  border: none;
  box-shadow: 0 0 10px rgba(0, 240, 255, 0.7);
}

.settings-footer {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
  padding: 14px 20px;
  border-top: 1px solid rgba(192, 132, 252, 0.2);
  background: rgba(14, 18, 36, 0.6);
}

.cyber-btn {
  font-family: 'Orbitron', monospace, sans-serif;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 8px 16px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}

.cyber-btn.mute-btn {
  background: rgba(0, 240, 255, 0.15);
  border: 1px solid #00f0ff;
  color: #00f0ff;
  font-size: 0.75rem;
  padding: 6px 14px;
}
.cyber-btn.mute-btn.muted {
  background: rgba(239, 68, 68, 0.2);
  border-color: #ef4444;
  color: #ef4444;
}

.cyber-btn.reset-btn {
  background: rgba(100, 116, 139, 0.2);
  border: 1px solid #64748b;
  color: #94a3b8;
}
.cyber-btn.reset-btn:hover {
  background: rgba(100, 116, 139, 0.4);
  color: #ffffff;
}

.cyber-btn.confirm-btn {
  background: rgba(192, 132, 252, 0.2);
  border: 1px solid #c084fc;
  color: #e879f9;
  box-shadow: 0 0 12px rgba(192, 132, 252, 0.3);
}
.cyber-btn.confirm-btn:hover {
  background: rgba(192, 132, 252, 0.4);
  color: #ffffff;
  box-shadow: 0 0 18px rgba(192, 132, 252, 0.6);
  transform: translateY(-1px);
}

@media (max-width: 768px) {
  .settings-modal {
    padding: 0;
    align-items: flex-start;
    justify-content: flex-start;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-y: contain;
    scrollbar-width: none !important;
    -ms-overflow-style: none !important;
  }
  .settings-modal::-webkit-scrollbar {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
  }
  .settings-modal-content {
    border-radius: 0;
    max-width: 100%;
    width: 100%;
    min-height: 100%;
    border: none;
    display: flex;
    flex-direction: column;
    overflow: visible !important;
    box-shadow: none;
    scrollbar-width: none !important;
    -ms-overflow-style: none !important;
  }
  .settings-modal-content::-webkit-scrollbar {
    display: none !important;
  }
  .settings-header {
    position: sticky;
    top: 0;
    z-index: 30;
    padding: 12px 16px;
    background: rgba(14, 10, 32, 0.98);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(192, 132, 252, 0.35);
  }
  .settings-title-area h2 {
    font-size: 0.95rem;
  }
  .settings-subtitle {
    font-size: 0.68rem;
  }
  .settings-body {
    flex: 1 0 auto;
    padding: 14px 12px;
    gap: 12px;
    overflow: visible !important;
    max-height: none !important;
    scrollbar-width: none !important;
    -ms-overflow-style: none !important;
  }
  .settings-body::-webkit-scrollbar {
    display: none !important;
  }
  .settings-card {
    padding: 12px 14px;
    overflow: visible !important;
    width: 100%;
    box-sizing: border-box;
    scrollbar-width: none !important;
    -ms-overflow-style: none !important;
  }
  .settings-card::-webkit-scrollbar {
    display: none !important;
  }
  .settings-footer {
    position: sticky;
    bottom: 0;
    z-index: 30;
    padding: 12px 16px;
    padding-bottom: max(12px, calc(12px + env(safe-area-inset-bottom, 0px)));
    background: rgba(14, 10, 32, 0.98);
    backdrop-filter: blur(16px);
    border-top: 1px solid rgba(192, 132, 252, 0.35);
    gap: 8px;
    flex-wrap: wrap;
  }
  .cyber-btn {
    flex: 1 1 auto;
    text-align: center;
    padding: 9px 12px;
    font-size: 0.78rem;
  }
}

/* ==========================================================================
   Ready To Start Tap Overlay (Mobile Audio Autoplay Unlock)
   ========================================================================== */
.ready-to-start-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  width: 100dvw;
  height: 100vh;
  height: 100svh;
  height: 100dvh;
  z-index: 90;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.40);
  cursor: pointer;
  touch-action: manipulation;
  animation: readyFadeIn 0.3s ease;
  padding-bottom: max(12px, env(safe-area-inset-bottom, 0px));
}

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

.ready-to-start-card {
  max-width: 92vw;
  width: 720px;
  padding: 24px 20px;
  background: rgba(4, 10, 24, 0.94);
  border: 2px solid #00f0ff;
  border-radius: 12px;
  box-shadow: 0 0 32px rgba(0, 240, 255, 0.5), inset 0 0 20px rgba(0, 240, 255, 0.2);
  text-align: center;
  color: #ffffff;
  pointer-events: auto;
  user-select: none;
  box-sizing: border-box;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.ready-to-start-title {
  font-family: 'Orbitron', monospace, sans-serif;
  font-size: clamp(0.85rem, 3.4vw, 1.45rem);
  font-weight: 900;
  color: #00f0ff;
  text-shadow: 0 0 16px #00f0ff;
  margin-bottom: 12px;
  white-space: nowrap;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: 0.8px;
}

.ready-to-start-desc {
  font-family: 'Orbitron', monospace, sans-serif;
  font-size: clamp(0.68rem, 2.3vw, 1.02rem);
  font-weight: 700;
  color: #ffd700;
  text-shadow: 0 0 10px rgba(255, 215, 0, 0.7);
  margin-bottom: 10px;
  white-space: nowrap;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: 0.3px;
}

.ready-to-start-sub {
  font-size: 0.85rem;
  color: #8ba2c2;
  letter-spacing: 1px;
  white-space: nowrap;
}

.ready-to-start-btn {
  font-family: 'Orbitron', monospace, sans-serif;
  font-size: clamp(0.78rem, 2.8vw, 1.15rem);
  font-weight: 900;
  padding: 13px 26px;
  margin: 12px auto 8px auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(0, 240, 255, 0.25), rgba(0, 114, 255, 0.45));
  color: #00f0ff;
  border: 2px solid #00f0ff;
  border-radius: 8px;
  box-shadow: 0 0 20px rgba(0, 240, 255, 0.4), inset 0 0 12px rgba(0, 240, 255, 0.2);
  cursor: pointer;
  transition: all 0.2s ease;
  letter-spacing: 1.0px;
  max-width: 95%;
  box-sizing: border-box;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ready-to-start-btn:hover {
  background: linear-gradient(135deg, rgba(0, 240, 255, 0.5), rgba(0, 114, 255, 0.7));
  color: #ffffff;
  box-shadow: 0 0 30px rgba(0, 240, 255, 0.8), inset 0 0 16px rgba(0, 240, 255, 0.4);
  transform: scale(1.03);
}

.ready-to-start-build {
  font-family: 'Orbitron', monospace, sans-serif;
  font-size: clamp(0.62rem, 1.8vw, 0.82rem);
  font-weight: 700;
  color: #00f0ff;
  text-shadow: 0 0 10px rgba(0, 240, 255, 0.7);
  letter-spacing: 1.0px;
  margin-top: 10px;
  white-space: nowrap;
}

@media (max-width: 768px) {
  .ready-to-start-card {
    padding: 16px 12px;
    width: 94vw;
    max-width: 94vw;
    box-sizing: border-box;
    overflow-x: hidden;
  }
  .ready-to-start-title {
    font-size: clamp(0.78rem, 3.6vw, 1.05rem);
    white-space: nowrap;
    letter-spacing: 0.5px;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .ready-to-start-desc {
    font-size: clamp(0.64rem, 2.6vw, 0.85rem);
    white-space: nowrap;
    letter-spacing: 0.2px;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .ready-to-start-sub {
    font-size: 0.72rem;
    white-space: nowrap;
  }
  .ready-to-start-btn {
    font-size: clamp(0.74rem, 3.2vw, 0.92rem);
    padding: 11px 18px;
    letter-spacing: 0.6px;
    width: auto;
    max-width: 95%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    box-sizing: border-box;
  }
  .ready-to-start-build {
    font-size: clamp(0.58rem, 2.2vw, 0.70rem);
    letter-spacing: 0.6px;
    margin-top: 8px;
    white-space: nowrap;
  }
}

@media (max-width: 540px) {
  .ready-to-start-card {
    padding: 14px 8px;
    width: 96vw;
    max-width: 96vw;
    border-width: 1.5px;
  }
  .ready-to-start-title {
    font-size: clamp(0.58rem, 3.6vw, 0.90rem);
    letter-spacing: 0.2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .ready-to-start-desc {
    font-size: clamp(0.48rem, 2.4vw, 0.74rem);
    letter-spacing: 0px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .ready-to-start-btn {
    font-size: clamp(0.64rem, 3.2vw, 0.86rem);
    padding: 10px 14px;
    letter-spacing: 0.3px;
    max-width: 98%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .ready-to-start-build {
    font-size: clamp(0.50rem, 2.0vw, 0.66rem);
    letter-spacing: 0.4px;
    margin-top: 8px;
    white-space: nowrap;
  }
}

@media (max-width: 340px) {
  .ready-to-start-card {
    padding: 12px 6px;
    width: 98vw;
    max-width: 98vw;
  }
  .ready-to-start-title {
    font-size: clamp(0.50rem, 3.4vw, 0.75rem);
    letter-spacing: 0px;
  }
  .ready-to-start-desc {
    font-size: clamp(0.42rem, 2.2vw, 0.60rem);
    letter-spacing: 0px;
  }
  .ready-to-start-btn {
    font-size: clamp(0.55rem, 3.0vw, 0.75rem);
    padding: 8px 10px;
    letter-spacing: 0.2px;
  }
  .ready-to-start-build {
    font-size: clamp(0.42rem, 1.8vw, 0.54rem);
    margin-top: 6px;
  }
}

