/* Full-Screen Standalone Isometric Game Layout (100vw x calc(100vh - 88px)) */
.workspace-container {
  display: flex;
  flex-direction: column;
  height: calc(100vh - 58px);
  width: 100vw;
  position: relative;
  overflow: hidden;
}

.view-pane {
  display: none;
  flex: 1;
  overflow: hidden;
  position: relative;
}

.view-pane.active {
  display: flex;
}

/* Full-Viewport Isometric World Container */
.iso-viewport {
  position: relative;
  width: 100vw;
  height: calc(100vh - 88px);
  flex: 1;
  background: radial-gradient(circle at 50% 45%, #111c33 0%, #060a12 85%);
  overflow: hidden;
}

#isoCanvas {
  width: 100vw;
  height: calc(100vh - 88px);
  cursor: grab;
  display: block;
}

#isoCanvas:active {
  cursor: grabbing;
}

/* Top-Center Floating Isometric Overlay & Lighting Toolbar */
.iso-overlay-toolbar {
  position: absolute;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  justify-content: center;
  align-items: center;
  pointer-events: none;
  z-index: 20;
}

.iso-toolbar-group {
  display: flex;
  gap: 6px;
  pointer-events: auto;
  flex-wrap: wrap;
  background: rgba(9, 14, 26, 0.9);
  border-top: 2px solid #4e658f;
  border-left: 2px solid #4e658f;
  border-right: 2px solid #050811;
  border-bottom: 2px solid #050811;
  padding: 5px 8px;
  border-radius: 6px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(6px);
}

/* WhatsApp-Web Style Live Update Ready Notification Banner (CR-006) */
.update-ready-banner {
  position: absolute;
  top: 56px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-width: 420px;
  max-width: calc(100vw - 40px);
  padding: 9px 14px;
  background: linear-gradient(90deg, rgba(6, 78, 59, 0.96) 0%, rgba(15, 23, 42, 0.97) 100%);
  border-top: 2px solid var(--accent-green);
  border-left: 2px solid var(--accent-green);
  border-right: 2px solid var(--accent-gold);
  border-bottom: 2px solid var(--accent-gold);
  border-radius: 6px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8), 0 0 20px rgba(0, 255, 157, 0.35);
  pointer-events: auto;
}

.update-banner-content {
  display: flex;
  align-items: center;
  gap: 10px;
}

.update-banner-icon {
  font-size: 1.35rem;
  filter: drop-shadow(0 0 8px rgba(0, 255, 157, 0.6));
}

.update-banner-title {
  font-size: 0.8rem;
  font-weight: 800;
  color: var(--accent-gold);
  letter-spacing: 0.4px;
}

.update-banner-sub {
  font-size: 0.7rem;
  color: #d1fae5;
  font-family: var(--font-mono);
}

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

/* Floating Collapsible RollerCoaster-Tycoon Style HUD Docks */
.floating-hud-dock {
  position: absolute;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
  z-index: 25;
}

.floating-hud-dock.dock-left {
  top: 12px;
  left: 12px;
  bottom: 48px;
  width: 300px;
}

/* Positioned directly below the Top-Right Isometric Minimap Radar (12px..132px) */
.floating-hud-dock.dock-right {
  top: 138px;
  right: 12px;
  bottom: 12px;
  width: 345px;
}

.floating-rct-win {
  pointer-events: auto;
  background: rgba(14, 22, 38, 0.92);
  backdrop-filter: blur(8px);
  transition: height 0.18s ease, max-height 0.18s ease;
}

.floating-rct-win.minimized {
  flex: 0 0 auto !important;
  height: auto !important;
}

.floating-rct-win.minimized .rct-window-body {
  display: none !important;
}

.rct-min-btn {
  background: #0b1324;
  border: 1px solid #3c527a;
  color: var(--accent-cyan);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 3px;
  cursor: pointer;
  line-height: 1.2;
}

.rct-min-btn:hover {
  background: #1e3252;
  color: #fff;
  border-color: var(--accent-gold);
}

/* Cookie Clicker Neural Core Panel */
.clicker-panel {
  padding: 10px 12px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.neural-core-btn {
  width: 118px;
  height: 118px;
  margin: 4px auto 8px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #00f0ff 0%, #2563eb 48%, #0f172a 90%);
  border: 3px solid var(--accent-gold);
  box-shadow: 0 0 28px rgba(0, 240, 255, 0.45), inset 0 0 18px rgba(255, 255, 255, 0.35);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition: transform 0.06s ease, box-shadow 0.15s ease;
  position: relative;
}

.neural-core-btn:hover {
  transform: scale(1.04);
  box-shadow: 0 0 38px rgba(0, 240, 255, 0.75), inset 0 0 22px rgba(255, 255, 255, 0.5);
}

.neural-core-btn:active, .neural-core-btn.clicked {
  transform: scale(0.93);
  box-shadow: 0 0 48px rgba(255, 204, 77, 0.9);
}

.core-icon {
  font-size: 2.2rem;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.6));
}

.core-label {
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #fff;
  margin-top: 2px;
}

.combo-strip {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #080d18;
  border: 1px solid #22324f;
  padding: 4px 10px;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 0.73rem;
  margin-bottom: 6px;
}

.frontier-lab-box {
  background: #080d18;
  border: 1px solid #22324f;
  border-radius: 4px;
  padding: 8px;
  text-align: left;
}

.frontier-lab-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--accent-gold);
  margin-bottom: 6px;
  text-transform: uppercase;
}

/* Interactive Silicon Valley Executive Dilemma Modal */
.dilemma-modal-card {
  position: absolute;
  top: 66px;
  left: 50%;
  transform: translateX(-50%);
  width: 440px;
  max-width: calc(100vw - 40px);
  padding: 12px 14px;
  z-index: 35;
  background: rgba(12, 18, 34, 0.97);
  border: 2px solid var(--accent-pink);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.8), 0 0 24px rgba(255, 42, 133, 0.35);
}

/* Tile Inspector Floating Card */
.tile-inspector-card {
  position: absolute;
  bottom: 44px;
  left: 50%;
  transform: translateX(-50%);
  width: 320px;
  padding: 10px 12px;
  z-index: 30;
  background: rgba(11, 18, 34, 0.96);
  border: 2px solid var(--accent-gold);
}

.iso-legend-bar {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(9, 14, 26, 0.88);
  border: 1px solid #273859;
  padding: 5px 12px;
  border-radius: 4px;
  font-size: 0.71rem;
  color: var(--text-muted);
  pointer-events: none;
  white-space: nowrap;
  z-index: 18;
}

/* Right Side Management Tabs (Build, Models, Staff, Tech, Trophies) */
.mgmt-tab-buttons {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 3px;
  padding: 5px;
  background: #0b111e;
  border-bottom: 1px solid #22324f;
}

.mgmt-tab-buttons .rct-btn {
  padding: 5px 4px;
  font-size: 0.7rem;
  justify-content: center;
}

.mgmt-list {
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 7px;
  overflow-y: auto;
  flex: 1;
}

.catalog-card {
  background: var(--bg-panel-alt);
  border: 1px solid #263654;
  border-radius: 5px;
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  transition: border-color 0.15s;
}

.catalog-card:hover {
  border-color: var(--accent-cyan);
}

.catalog-card.selected {
  border: 2px solid var(--accent-gold);
  background: rgba(255, 204, 77, 0.08);
}

.catalog-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.catalog-title {
  font-size: 0.82rem;
  font-weight: 700;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 6px;
}

.catalog-cost {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--accent-gold);
}

.catalog-desc {
  font-size: 0.71rem;
  color: var(--text-muted);
  line-height: 1.3;
}

.catalog-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  font-family: var(--font-mono);
  font-size: 0.68rem;
}

.stat-tag {
  background: #090e1a;
  padding: 2px 6px;
  border-radius: 3px;
  border: 1px solid #1e2d47;
}

/* Progress Bar */
.progress-track {
  width: 100%;
  height: 10px;
  background: #070b14;
  border: 1px solid #283a5e;
  border-radius: 5px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent-cyan), var(--accent-green));
  transition: width 0.25s ease;
}

/* Bottom News Ticker (30px) */
.news-ticker-bar {
  height: 30px;
  background: #080d18;
  border-top: 2px solid #22324f;
  display: flex;
  align-items: center;
  padding: 0 12px;
  gap: 10px;
  font-size: 0.76rem;
  font-family: var(--font-mono);
  overflow: hidden;
  z-index: 40;
}

.ticker-badge {
  background: var(--accent-pink);
  color: #fff;
  font-weight: 700;
  font-size: 0.66rem;
  padding: 2px 7px;
  border-radius: 3px;
  text-transform: uppercase;
  white-space: nowrap;
}

.ticker-content {
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* In-Game Release Notes Modal & Changelog Cards (CR-007) */
.release-notes-overlay {
  position: fixed;
  inset: 0;
  background: rgba(5, 9, 18, 0.82);
  backdrop-filter: blur(5px);
  z-index: 120;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.release-notes-window {
  width: 720px;
  max-width: 95vw;
  max-height: 86vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.release-notes-body {
  padding: 14px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.release-notes-intro {
  background: rgba(15, 23, 42, 0.88);
  border: 1px solid #2b3e63;
  border-left: 3px solid var(--accent-gold);
  border-radius: 4px;
  padding: 9px 12px;
  font-size: 0.76rem;
  color: #cbd5e1;
  line-height: 1.45;
}

.release-notes-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.release-note-card {
  background: linear-gradient(180deg, #131d31 0%, #0b1220 100%);
  border-top: 2px solid #3c527a;
  border-left: 2px solid #3c527a;
  border-right: 2px solid #050911;
  border-bottom: 2px solid #050911;
  border-radius: 6px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.release-note-card.latest {
  border-top-color: var(--accent-gold);
  border-left-color: var(--accent-gold);
  box-shadow: 0 0 18px rgba(255, 204, 77, 0.16);
}

.release-note-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  border-bottom: 1px solid #1e2d4a;
  padding-bottom: 7px;
}

.release-note-highlights {
  margin: 0;
  padding-left: 18px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 0.76rem;
  color: #e2e8f0;
  line-height: 1.42;
}

.release-note-qa {
  background: rgba(6, 11, 20, 0.85);
  border: 1px solid #1e293b;
  border-radius: 4px;
  padding: 6px 9px;
  font-family: var(--font-mono);
  font-size: 0.69rem;
  color: var(--accent-green);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

/* Live "Why Users Choose CRONOS" Marketshare Causal Box (CR-008) */
.why-users-box {
  margin-top: 6px;
  padding-top: 5px;
  border-top: 1px dashed #22324f;
}

.why-users-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.63rem;
  font-weight: 700;
  color: var(--accent-cyan);
  margin-bottom: 3px;
}

.mmlu-edge-badge {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  padding: 1px 5px;
  border-radius: 3px;
  background: rgba(0, 240, 255, 0.12);
  border: 1px solid rgba(0, 240, 255, 0.35);
}

.why-users-list {
  margin: 0;
  padding-left: 14px;
  font-size: 0.62rem;
  color: #cbd5e1;
  line-height: 1.35;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

/* Map Mode Toolbar, Stage Pitch VC CTA & Tab Notification Badges (CR-010, CR-012) */
.iso-overlay-toolbar {
  flex-direction: column;
  align-items: center;
  gap: 5px;
}

.map-mode-toolbar {
  background: rgba(11, 18, 34, 0.96);
  border: 2px solid var(--accent-gold);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.75), 0 0 14px rgba(255, 204, 77, 0.22);
}

.stage-pitch-ready {
  color: #111827 !important;
  background: linear-gradient(90deg, #fbbf24, #00ff9d) !important;
  padding: 1px 7px;
  border-radius: 4px;
  font-weight: 800;
  box-shadow: 0 0 12px rgba(251, 191, 36, 0.75);
  animation: pitchPulse 1.2s infinite alternate;
}

@keyframes pitchPulse {
  from {
    filter: brightness(1);
    transform: scale(1);
  }
  to {
    filter: brightness(1.18);
    transform: scale(1.03);
  }
}

.tab-notif-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-gold);
  color: #090d16;
  font-family: var(--font-mono);
  font-size: 0.58rem;
  font-weight: 800;
  padding: 0 4px;
  border-radius: 999px;
  margin-left: 2px;
  box-shadow: 0 0 8px rgba(255, 204, 77, 0.7);
}

.world-build-palette {
  padding: 7px 8px;
  background: linear-gradient(180deg, rgba(14, 25, 45, 0.98), rgba(8, 14, 26, 0.98));
  border-bottom: 2px solid var(--accent-gold);
  display: flex;
  flex-direction: column;
  gap: 5px;
  max-height: 230px;
  overflow-y: auto;
}

@media (max-width: 1180px) {
  .floating-hud-dock.dock-left {
    width: 265px;
  }
  .floating-hud-dock.dock-right {
    width: 300px;
  }
}

/* Desktop defaults for mobile-only HUD elements (CR-029 / TASK-201, TASK-202) */
.mobile-build-hint-bar,
.mobile-quick-train-btn,
.mobile-game-nav,
.mobile-close-sheet-btn {
  display: none;
}

/* Mobile Phone Browser Layout, Compact Canvas Toolbar & Bottom-Sheet HUD Drawers (CR-029) */
@media (max-width: 900px) {
  body {
    display: flex;
    flex-direction: column;
    height: 100dvh;
  }

  .workspace-container {
    flex: 1;
    height: auto;
    min-height: 0;
    width: 100vw;
  }

  .iso-viewport {
    width: 100vw;
    height: 100%;
    flex: 1;
    min-height: 0;
  }

  #isoCanvas {
    width: 100%;
    height: 100%;
    touch-action: none;
  }

  /* Compact horizontal-scroll toolbar on mobile */
  .iso-overlay-toolbar {
    top: 6px;
    left: 6px;
    right: 6px;
    transform: none;
    width: auto;
    max-width: calc(100vw - 12px);
    align-items: stretch;
    gap: 4px;
  }

  .iso-toolbar-group {
    flex-wrap: nowrap;
    overflow-x: auto;
    max-width: 100%;
    padding: 4px 6px;
    gap: 4px;
    -webkit-overflow-scrolling: touch;
  }

  .iso-toolbar-group .rct-btn {
    flex-shrink: 0;
    white-space: nowrap;
    font-size: 0.68rem;
    padding: 4px 8px;
  }

  .mobile-close-sheet-btn {
    display: inline-flex;
    color: var(--accent-gold);
    border-color: var(--accent-gold);
  }

  /* Bottom-Sheet Drawer Architecture for #leftHudDock & #rightHudDock on Mobile */
  body:not([data-mobile-panel]) #leftHudDock,
  body:not([data-mobile-panel]) #rightHudDock,
  body[data-mobile-panel="floor"] #leftHudDock,
  body[data-mobile-panel="floor"] #rightHudDock {
    display: none !important;
  }

  /* Floating Thumb Quick-Train Button in Floor mode */
  body:not([data-mobile-panel]) .mobile-quick-train-btn,
  body[data-mobile-panel="floor"] .mobile-quick-train-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    position: absolute;
    bottom: 12px;
    right: 12px;
    z-index: 35;
    padding: 8px 13px;
    border-radius: 999px;
    background: radial-gradient(circle at 30% 30%, #00f0ff 0%, #2563eb 55%, #0f172a 95%);
    border: 2px solid var(--accent-gold);
    color: #fff;
    box-shadow: 0 6px 22px rgba(0, 240, 255, 0.5);
    cursor: pointer;
    pointer-events: auto;
    transition: transform 0.08s ease;
  }

  .mobile-quick-train-btn:active {
    transform: scale(0.93);
  }

  .mobile-quick-train-btn .mq-icon {
    font-size: 1.35rem;
  }

  .mobile-quick-train-btn .mq-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    line-height: 1.15;
    font-family: var(--font-mono);
  }

  .mobile-quick-train-btn .mq-text strong {
    font-size: 0.72rem;
    color: #fff;
    letter-spacing: 0.5px;
  }

  .mobile-quick-train-btn .mq-text small {
    font-size: 0.62rem;
    color: var(--accent-green);
  }

  /* Left HUD Dock as Bottom Sheet when data-mobile-panel="lab" */
  body[data-mobile-panel="lab"] #leftHudDock {
    display: flex !important;
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    top: auto;
    width: 100%;
    max-height: 62vh;
    z-index: 45;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 6px;
    background: rgba(7, 12, 24, 0.98);
    border-top: 2px solid var(--accent-cyan);
    pointer-events: auto;
  }

  body[data-mobile-panel="lab"] #rightHudDock,
  body[data-mobile-panel="lab"] .mobile-quick-train-btn {
    display: none !important;
  }

  /* Right HUD Dock as Bottom Sheet when build/models/staff/tech/trophies active */
  body[data-mobile-panel="build"] #rightHudDock,
  body[data-mobile-panel="models"] #rightHudDock,
  body[data-mobile-panel="staff"] #rightHudDock,
  body[data-mobile-panel="tech"] #rightHudDock,
  body[data-mobile-panel="trophies"] #rightHudDock {
    display: flex !important;
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    top: auto;
    width: 100%;
    height: 62vh;
    max-height: 62vh;
    z-index: 45;
    pointer-events: auto;
  }

  body[data-mobile-panel="build"] #rightHudDock .floating-rct-win,
  body[data-mobile-panel="models"] #rightHudDock .floating-rct-win,
  body[data-mobile-panel="staff"] #rightHudDock .floating-rct-win,
  body[data-mobile-panel="tech"] #rightHudDock .floating-rct-win,
  body[data-mobile-panel="trophies"] #rightHudDock .floating-rct-win {
    height: 100%;
    max-height: 100%;
    border-radius: 10px 10px 0 0;
    border-top: 2px solid var(--accent-gold);
  }

  body[data-mobile-panel="build"] #leftHudDock,
  body[data-mobile-panel="models"] #leftHudDock,
  body[data-mobile-panel="staff"] #leftHudDock,
  body[data-mobile-panel="tech"] #leftHudDock,
  body[data-mobile-panel="trophies"] #leftHudDock,
  body[data-mobile-panel="build"] .mobile-quick-train-btn,
  body[data-mobile-panel="models"] .mobile-quick-train-btn,
  body[data-mobile-panel="staff"] .mobile-quick-train-btn,
  body[data-mobile-panel="tech"] .mobile-quick-train-btn,
  body[data-mobile-panel="trophies"] .mobile-quick-train-btn {
    display: none !important;
  }

  /* Mobile Active-Build Floating Hint Pill */
  .mobile-build-hint-bar {
    position: absolute;
    bottom: 12px;
    left: 10px;
    right: 162px;
    z-index: 36;
    background: rgba(11, 18, 34, 0.96);
    border: 1.5px solid var(--accent-gold);
    border-radius: 6px;
    padding: 6px 10px;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--accent-gold);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.78);
    pointer-events: auto;
  }

  .tile-inspector-card {
    bottom: 66px;
    width: calc(100vw - 20px);
    max-width: 360px;
    z-index: 48;
  }

  .dilemma-modal-card {
    top: 56px;
    width: calc(100vw - 16px);
    max-height: 72vh;
    overflow-y: auto;
    z-index: 55;
  }

  .iso-legend-bar,
  .news-ticker-bar {
    display: none;
  }

  /* 6-Tab Mobile Bottom Navigation Bar */
  .mobile-game-nav {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    height: 54px;
    background: linear-gradient(180deg, #111a2e 0%, #070b14 100%);
    border-top: 2px solid #2b3e63;
    z-index: 50;
    flex-shrink: 0;
  }

  .mobile-game-nav-btn {
    background: transparent;
    border: none;
    border-right: 1px solid rgba(43, 62, 99, 0.45);
    color: var(--text-muted);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    font-family: var(--font-ui);
    cursor: pointer;
    padding: 4px 2px;
  }

  .mobile-game-nav-btn:last-child {
    border-right: none;
  }

  .mobile-game-nav-btn .mgn-icon {
    font-size: 1.02rem;
    line-height: 1;
  }

  .mobile-game-nav-btn .mgn-label {
    font-size: 0.62rem;
    font-weight: 600;
    white-space: nowrap;
  }

  .mobile-game-nav-btn.active {
    background: rgba(0, 240, 255, 0.14);
    color: var(--accent-gold);
    border-top: 2px solid var(--accent-cyan);
    font-weight: 700;
  }
}

/* CRONOS V2 Player Account Header Pill & Multi-Player Authentication Modal (CR-030 / TASK-211) */
.btn-header-account {
  padding: 5px 10px;
  font-size: 0.75rem;
  border-color: var(--accent-gold);
  color: var(--accent-gold);
  background: linear-gradient(180deg, #2a2112 0%, #16120a 100%);
}

.btn-header-account.authenticated {
  border-color: var(--accent-green);
  color: var(--accent-green);
  background: linear-gradient(180deg, #0b2e25 0%, #071915 100%);
  box-shadow: 0 0 12px rgba(0, 255, 157, 0.25);
}

.auth-modal-window {
  width: 580px;
  max-width: 95vw;
  max-height: 88vh;
}

.auth-modal-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.auth-active-profile-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  padding: 10px 12px;
  background: linear-gradient(90deg, rgba(6, 78, 59, 0.38) 0%, rgba(15, 23, 42, 0.92) 100%);
  border: 1.5px solid var(--accent-green);
  border-radius: 6px;
}

.auth-profile-main {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.auth-profile-header {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.auth-profile-badge {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 800;
  color: var(--accent-green);
}

.auth-provider-pill {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(0, 240, 255, 0.12);
  border: 1px solid rgba(0, 240, 255, 0.4);
  color: var(--accent-cyan);
}

.auth-profile-details {
  font-size: 0.75rem;
  color: #e2e8f0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.auth-code-pill {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  background: #070b14;
  border: 1px solid #263859;
  padding: 1px 6px;
  border-radius: 3px;
  color: var(--accent-cyan);
}

.auth-feedback-msg {
  padding: 8px 11px;
  border-radius: 5px;
  font-size: 0.76rem;
  font-weight: 600;
}

.auth-feedback-msg.error {
  background: rgba(127, 29, 29, 0.45);
  border: 1px solid #ef4444;
  color: #fecaca;
}

.auth-feedback-msg.success {
  background: rgba(6, 78, 59, 0.45);
  border: 1px solid var(--accent-green);
  color: #a7f3d0;
}

.auth-mode-tabs {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.auth-mode-tabs .rct-btn {
  flex: 1 1 auto;
  justify-content: center;
  font-size: 0.74rem;
}

.auth-form-panel {
  display: flex;
  flex-direction: column;
  gap: 7px;
  background: rgba(9, 14, 26, 0.85);
  border: 1px solid #243554;
  border-radius: 6px;
  padding: 12px;
}

.auth-field-label {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-muted);
}

.auth-input {
  width: 100%;
  padding: 8px 10px;
  background: #070b14;
  border: 1.5px solid #2b3e63;
  border-radius: 4px;
  color: #fff;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  outline: none;
}

.auth-input:focus {
  border-color: var(--accent-cyan);
  box-shadow: 0 0 8px rgba(0, 240, 255, 0.25);
}

.auth-submit-btn {
  margin-top: 4px;
  justify-content: center;
  padding: 8px 14px;
  font-size: 0.8rem;
}

.auth-google-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-top: 4px;
  border-top: 1px dashed #263859;
}

.auth-google-btn {
  width: 100%;
  justify-content: center;
  padding: 8px 14px;
  font-size: 0.8rem;
  background: linear-gradient(180deg, #1e293b 0%, #0f172a 100%);
  border-color: #38bdf8;
  color: #e0f2fe;
}

.auth-google-quick-box {
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding: 10px;
  background: rgba(12, 20, 36, 0.95);
  border: 1px solid #38bdf8;
  border-radius: 6px;
}

.auth-setup-steps {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 8px 10px;
  background: #070b14;
  border: 1px solid #22324f;
  border-left: 3px solid var(--accent-gold);
  border-radius: 4px;
  font-size: 0.73rem;
  color: #cbd5e1;
  line-height: 1.45;
}

.auth-setup-steps code {
  font-family: var(--font-mono);
  font-size: 0.69rem;
  color: var(--accent-cyan);
  background: #0d1526;
  padding: 1px 5px;
  border-radius: 3px;
  user-select: all;
}

.badge-human-player {
  background: rgba(16, 185, 129, 0.18);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.4);
  padding: 1px 5px;
  border-radius: 4px;
  font-size: 0.64rem;
  font-family: var(--font-mono);
  font-weight: 700;
  margin-left: 4px;
}

/* CRONOS Start / Pause / Save & Load / 6-Step Tutorial Game Menu Overlay (CR-040 / TASK-274) */
body.start-menu-active header.top-header,
body.start-menu-active .iso-overlay-toolbar,
body.start-menu-active #leftHudDock,
body.start-menu-active #rightHudDock,
body.start-menu-active #dilemmaModalCard,
body.start-menu-active #tileInspectorCard,
body.start-menu-active .iso-legend-bar,
body.start-menu-active .news-ticker-bar,
body.start-menu-active #mobileGameNav,
body.start-menu-active #mobileQuickTrainBtn,
body.start-menu-active #mobileBuildHintBar {
  opacity: 0 !important;
  pointer-events: none !important;
  transition: opacity 0.25s ease;
}

body.start-menu-active .iso-viewport {
  height: 100vh !important;
}

.game-menu-overlay {
  z-index: 80;
  background: radial-gradient(circle at center, rgba(7, 12, 24, 0.72) 0%, rgba(4, 7, 15, 0.92) 100%);
  backdrop-filter: blur(4px);
}

.game-menu-window {
  width: 760px;
  max-width: 96vw;
  max-height: 92vh;
  border: 2px solid var(--accent-gold);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.9), 0 0 30px rgba(255, 204, 77, 0.18);
}

.game-menu-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 14px;
  overflow-y: auto;
}

.game-menu-hero {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px 14px;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.96) 0%, rgba(8, 13, 25, 0.98) 100%);
  border: 1px solid rgba(0, 240, 255, 0.35);
  border-left: 4px solid var(--accent-gold);
  border-radius: 6px;
}

.game-menu-hero-top {
  display: flex;
  align-items: center;
  gap: 12px;
}

.game-menu-logo {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  background: linear-gradient(180deg, #f59e0b 0%, #b45309 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  box-shadow: 0 0 14px rgba(245, 158, 11, 0.45);
  flex-shrink: 0;
}

.game-menu-title {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 900;
  letter-spacing: 0.8px;
  color: var(--accent-gold);
  font-family: var(--font-mono);
}

.game-menu-subtitle {
  font-size: 0.75rem;
  color: #cbd5e1;
  margin-top: 2px;
}

.game-menu-session-banner {
  padding: 6px 10px;
  border-radius: 5px;
  background: rgba(6, 78, 59, 0.28);
  border: 1px solid rgba(16, 185, 129, 0.45);
  color: #a7f3d0;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
}

.game-menu-primary-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.game-menu-primary-btn {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  padding: 10px 12px;
  text-align: left;
  border-radius: 6px;
  min-height: 54px;
}

.game-menu-primary-btn.start-btn {
  border-color: var(--accent-green);
  background: linear-gradient(180deg, #065f46 0%, #064e3b 100%);
  color: #ecfdf5;
  box-shadow: 0 0 16px rgba(16, 185, 129, 0.28);
}

.game-menu-primary-btn .gmp-icon {
  font-size: 1.35rem;
  flex-shrink: 0;
}

.game-menu-primary-btn .gmp-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.game-menu-primary-btn .gmp-text strong {
  font-size: 0.8rem;
  font-family: var(--font-mono);
  letter-spacing: 0.4px;
}

.game-menu-primary-btn .gmp-text small {
  font-size: 0.67rem;
  color: #cbd5e1;
  font-weight: 400;
}

.game-menu-subpanel {
  display: flex;
  flex-direction: column;
  gap: 9px;
  padding: 11px 12px;
  background: rgba(8, 13, 25, 0.94);
  border: 1px solid #263859;
  border-radius: 6px;
}

.game-menu-subpanel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  color: var(--accent-cyan);
  border-bottom: 1px solid rgba(38, 56, 89, 0.7);
  padding-bottom: 6px;
}

.game-menu-save-slots {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.save-slot-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  padding: 8px 10px;
  background: #070b14;
  border: 1px solid #22324f;
  border-radius: 5px;
}

.save-slot-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.save-slot-title {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--accent-gold);
}

.save-slot-meta {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: #94a3b8;
}

.tutorial-step-pills {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}

.tutorial-step-pill {
  padding: 3px 8px;
  font-size: 0.68rem;
  font-family: var(--font-mono);
}

.tutorial-step-card {
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding: 10px 12px;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.9) 0%, rgba(7, 11, 20, 0.95) 100%);
  border: 1px solid rgba(255, 204, 77, 0.35);
  border-radius: 5px;
}

.tutorial-step-title {
  font-family: var(--font-mono);
  font-size: 0.84rem;
  font-weight: 800;
  color: var(--accent-gold);
}

.tutorial-step-body {
  font-size: 0.76rem;
  color: #e2e8f0;
  line-height: 1.48;
}

.tutorial-step-tip {
  padding: 6px 9px;
  background: rgba(0, 240, 255, 0.08);
  border-left: 3px solid var(--accent-cyan);
  border-radius: 3px;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: #bae6fd;
}

.tutorial-nav-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 2px;
}

@media (max-width: 720px) {
  .game-menu-primary-grid {
    grid-template-columns: 1fr;
  }
}

/* CR-041 (TASK-287): Live 3D Isometric Model Previews in Build Palette & Tile Inspector */
.build-3d-preview-canvas,
.model-preview-canvas {
  width: 62px;
  height: 58px;
  flex-shrink: 0;
  background: radial-gradient(circle at 50% 65%, rgba(56, 189, 248, 0.16), rgba(9, 14, 26, 0.94));
  border: 1px solid #263554;
  border-radius: 5px;
  box-shadow: inset 0 0 8px rgba(0, 0, 0, 0.65);
}

.catalog-card.selected .build-3d-preview-canvas,
.catalog-card.selected .model-preview-canvas {
  border-color: var(--accent-gold);
  box-shadow: 0 0 10px rgba(255, 204, 77, 0.25);
}

.inspector-3d-preview-canvas {
  width: 84px;
  height: 76px;
  flex-shrink: 0;
  background: radial-gradient(circle at 50% 65%, rgba(255, 204, 77, 0.16), rgba(9, 14, 26, 0.95));
  border: 1px solid rgba(255, 204, 77, 0.45);
  border-radius: 6px;
  box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.7);
}




