:root {
  font-family: system-ui, Avenir, Helvetica, Arial, sans-serif;
  line-height: 1.5;
  font-weight: 400;

  color-scheme: light dark;
  color: rgba(255, 255, 255, 0.87);
  background-color: #242424;

  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  font-weight: 500;
  color: #646cff;
  text-decoration: inherit;
}
a:hover {
  color: #535bf2;
}

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  overflow-x: hidden;
  overflow-y: auto;
  /* Smooth scrolling */
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
}

body {
  display: flex;
  place-items: center;
  min-width: 320px;
  height: 100vh;
}

#root {
  width: 100%;
  height: 100vh;
}

h1 {
  font-size: 3.2em;
  line-height: 1.1;
}

button {
  border-radius: 8px;
  border: 1px solid transparent;
  padding: 0.6em 1.2em;
  font-size: 1em;
  font-weight: 500;
  font-family: inherit;
  background-color: #1a1a1a;
  cursor: pointer;
  transition: border-color 0.25s;
}
button:hover {
  border-color: #646cff;
}
button:focus,
button:focus-visible {
  outline: 4px auto -webkit-focus-ring-color;
}

@media (prefers-color-scheme: light) {
  :root {
    color: #213547;
    background-color: #ffffff;
  }
  a:hover {
    color: #747bff;
  }
  button {
    background-color: #f9f9f9;
  }
}
/* #root styles moved to index.css for full viewport layout */

.logo {
  height: 6em;
  padding: 1.5em;
  will-change: filter;
  transition: filter 300ms;
}
.logo:hover {
  filter: drop-shadow(0 0 2em #646cffaa);
}
.logo.react:hover {
  filter: drop-shadow(0 0 2em #61dafbaa);
}

@keyframes logo-spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

@media (prefers-reduced-motion: no-preference) {
  a:nth-of-type(2) .logo {
    animation: logo-spin infinite 20s linear;
  }
}

.card {
  padding: 2em;
}

.read-the-docs {
  color: #888;
}
.index-title {
  color: #ffffff;
  font-size: 4rem;
  font-weight: bold;
  margin: 0;
  text-align: center;
}

/* User Dropdown */
.user-dropdown-container {
  position: fixed;
  top: 110px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
  pointer-events: auto;
}

.user-dropdown {
  background: rgba(20, 20, 30, 0.95);
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  min-width: 220px;
  overflow: hidden;
  box-shadow: 
    0 4px 20px rgba(0, 0, 0, 0.5),
    0 0 40px rgba(0, 255, 0, 0.1);
  animation: dropdown-appear 0.2s ease-out;
}

@keyframes dropdown-appear {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.user-dropdown-header {
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.user-dropdown-name {
  color: #ffffff;
  font-size: 1rem;
  font-weight: 600;
}

.user-dropdown-email {
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.85rem;
}

.user-dropdown-divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.1);
}

.user-dropdown-item {
  width: 100%;
  padding: 0.875rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: left;
}

.user-dropdown-item:hover {
  background: rgba(255, 255, 255, 0.05);
}

.user-dropdown-item.logout {
  color: #ffa500;
}

.user-dropdown-item.logout:hover {
  background: rgba(255, 165, 0, 0.1);
}

.user-dropdown-icon {
  font-size: 1.1rem;
}

/* Spline Background */
.spline-background {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: auto;
}

/* Index View Container */
.index-view {
  width: 100%;
  height: 100vh;
  height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

/* Visitor Overlay - allows Spline interaction while keeping UI clickable */
.index-view.visitor-overlay {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 2;
  pointer-events: none; /* Let clicks pass through to Spline */
  flex-direction: column;
  gap: 2rem;
}

/* Visitor message */
.visitor-message {
  position: fixed;
  bottom: 3rem;
  bottom: max(3rem, env(safe-area-inset-bottom));
  left: 1rem;
  right: 1rem;
  color: rgba(255, 255, 255, 0.9);
  font-size: clamp(1.4rem, 5vw, 1.75rem);
  font-weight: 500;
  text-align: center;
  margin: 0;
  padding: 0;
  line-height: 1.4;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.6);
  pointer-events: none; /* Text should not block Spline interaction */
}

/* White Metal Buttons for Index Player State */
.index-metal-btn {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  width: 55px;
  height: 55px;
  border-radius: 50%;
  background: linear-gradient(to bottom, #f7f7f7, #e7e7e7);
  border: solid 1px transparent;
  box-shadow: 
    0px 3px 8px rgba(170, 170, 170, 0.6),
    inset 0px 2px 3px rgba(255, 255, 255, 0.8);
  cursor: pointer;
  padding: 0;
  outline: none;
  -webkit-tap-highlight-color: transparent;
  -webkit-user-select: none;
  user-select: none;
  display: flex;
  align-items: center;
  justify-content: center;
  touch-action: manipulation;
  transition: all 0.3s ease;
  z-index: 10;
  pointer-events: auto;
  color: #a7a7a7;
  font-size: 1.2rem;
  font-weight: 600;
}

.index-metal-btn:before {
  content: "";
  display: block;
  background: #fff;
  border-top: 2px solid rgba(221, 221, 221, 1);
  position: absolute;
  top: -8px;
  left: -8px;
  bottom: -8px;
  right: -8px;
  z-index: -1;
  border-radius: 50%;
  box-shadow: inset 0px 8px 48px rgba(221, 221, 221, 0.8);
}

/* Ensure bot button icon is visible */
.index-bot-btn:before {
  z-index: -2; /* Behind the background image */
}

.index-metal-btn:hover {
  filter: brightness(1.05);
  transform: translateX(-50%) scale(1.05);
  color: #555;
}

.index-top-btn:hover {
  background: linear-gradient(to bottom, #f5f5f5, #e5e5e5);
}

.index-bot-btn:hover {
  /* Keep icon and update gradient on hover */
  background-image: 
    url('/assets/icons/games.png'),
    linear-gradient(to bottom, #f5f5f5, #e5e5e5);
}

.index-metal-btn:active {
  box-shadow: none;
  border: solid 1px rgba(167, 167, 167, 1);
  transform: translateX(-50%) scale(0.98);
  outline: none;
}

.index-metal-btn:focus {
  outline: none;
}

.index-metal-btn:focus-visible {
  outline: none;
}

.index-top-btn {
  top: 2rem;
  top: max(2rem, env(safe-area-inset-top));
}

.index-bot-btn {
  bottom: 2rem;
  bottom: max(2rem, env(safe-area-inset-bottom));
  /* Hide text content */
  color: transparent;
  font-size: 0;
}

/* Add icon using ::after pseudo-element on top of everything */
.index-bot-btn::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 85%;
  height: 85%;
  background-image: url('/assets/icons/games.png');
  background-size: contain;
  background-position: center;
  background-repeat: no-repeat;
  z-index: 2;
  pointer-events: none;
}

.index-btn-icon {
  font-family: 'Material Icons';
  font-size: 1.5rem;
  font-style: normal;
  font-weight: normal;
  line-height: 1;
  letter-spacing: normal;
  text-transform: none;
  display: inline-block;
  white-space: nowrap;
  word-wrap: normal;
  direction: ltr;
  -webkit-font-feature-settings: 'liga';
  -webkit-font-smoothing: antialiased;
}

/* Games Modal Styles */
.games-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
}

.games-modal {
  background: #1a1a1a;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  width: 100%;
  max-width: 500px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

.games-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.games-modal-header h2 {
  margin: 0;
  font-size: 1.5rem;
  color: #ffffff;
}

.games-modal-close {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.6);
  font-size: 2rem;
  cursor: pointer;
  line-height: 1;
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s ease;
}

.games-modal-close:hover {
  color: #ffffff;
}

.games-modal-content {
  padding: 1.5rem;
}

.games-modal-loading,
.games-modal-empty {
  text-align: center;
  color: rgba(255, 255, 255, 0.6);
  padding: 2rem;
}

.games-modal-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.games-modal-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  transition: all 0.2s ease;
}

.games-modal-item:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
}

.games-modal-item .game-emoji {
  font-size: 1.5rem;
  line-height: 1;
}

.games-modal-item .game-title {
  font-size: 1rem;
  font-weight: 500;
  color: #ffffff;
}/* AdminBoard styles - comprehensive CSS for admin interface */

.admin-board {
  width: 100%;
  min-height: 100vh;
  background: #0a0a0a;
  color: #ffffff;
  padding: 0;
  margin: 0;
  box-sizing: border-box;
  overflow-x: hidden;
  /* Smooth scrolling */
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  display: flex;
  flex-direction: column;
  position: relative;
  padding-top: calc(var(--admin-nav-height, 72px) + var(--admin-nav-spacing, 20px));
}

.admin-board-container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  padding-bottom: 2rem;
  box-sizing: border-box;
  /* Prevent layout shifts */
  contain: style;
}

@media (max-width: 768px) {
  .admin-board-container {
    padding: 0 1.5rem;
    padding-bottom: 2rem;
  }
}

@media (max-width: 480px) {
  .admin-board-container {
    padding: 0 1rem;
    padding-bottom: 2rem;
  }
}

/* Counter Cards */
.admin-counter-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
  width: 100%;
  box-sizing: border-box;
  /* Optimize grid rendering */
  contain: layout;
  /* Prevent layout shifts */
  will-change: contents;
}

.admin-counter-card {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 1.25rem;
  cursor: pointer;
  transition: background-color 0.2s ease, border-color 0.2s ease;
  text-align: center;
  box-sizing: border-box;
  /* Prevent layout shifts */
  contain: layout style;
  transform: translateZ(0);
  backface-visibility: hidden;
}

.admin-counter-card:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(0, 255, 136, 0.3);
}

.admin-counter-label {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.6);
  margin-bottom: 0.5rem;
  font-weight: 500;
}

.admin-counter-value {
  font-size: 2rem;
  font-weight: 700;
  color: #00ff88;
  line-height: 1;
  /* Prevent layout shifts when loading */
  min-height: 2rem;
  display: inline-block;
  contain: layout style;
}

/* Content - single column, compact section spacing */
.admin-content {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
  padding-bottom: 3rem;
  contain: style;
}

.admin-section {
  margin-bottom: 0;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 1rem 1.25rem;
  display: flex;
  flex-direction: column;
  contain: style;
  transform: translateZ(0);
  backface-visibility: hidden;
  position: relative;
}

.admin-section-title {
  font-size: 0.95rem;
  font-weight: 600;
  margin: 0 0 0.75rem 0;
  color: #00ff88;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* 2-col layout: titles fully readable, count on the right */
.admin-cards-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem 1.25rem;
  width: 100%;
  box-sizing: border-box;
  contain: layout;
}

.admin-card {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  padding: 0.75rem 1rem;
  cursor: pointer;
  transition: background-color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  position: relative;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 1rem;
  min-height: 0;
  contain: layout style paint;
  transform: translateZ(0);
  backface-visibility: hidden;
}

.admin-card:hover:not(.admin-card-disabled) {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(0, 255, 136, 0.3);
  transform: translateZ(0) translateY(-1px);
}

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

.admin-card-title {
  font-size: 1rem;
  font-weight: 600;
  margin: 0;
  color: #ffffff;
  line-height: 1.35;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

/* Count prominent on the right - quick scan */
.admin-card-count {
  flex-shrink: 0;
  font-size: 1.25rem;
  font-weight: 700;
  color: #00ff88;
  line-height: 1;
  min-width: 2.5em;
  text-align: right;
}

.admin-card-has-count .admin-card-count {
  color: #00ff88;
}

.admin-card:not(.admin-card-has-count) .admin-card-count {
  color: rgba(255, 255, 255, 0.35);
  font-weight: 500;
  font-size: 1rem;
}

.admin-card-disabled {
  opacity: 0.4;
  filter: grayscale(0.6);
  cursor: default;
  padding: 0.5rem 0.75rem;
  min-height: 0;
}

.admin-card-disabled .admin-card-title {
  font-size: 0.95rem;
}

.admin-card-support {
  border-color: rgba(255, 68, 68, 0.3);
}

.admin-card-nexus {
  background: linear-gradient(135deg, rgba(0, 255, 136, 0.15) 0%, rgba(0, 200, 100, 0.1) 100%);
  border: 2px solid rgba(0, 255, 136, 0.5);
  box-shadow: 
    0 0 20px rgba(0, 255, 136, 0.3),
    0 0 40px rgba(0, 255, 136, 0.15),
    inset 0 0 20px rgba(0, 255, 136, 0.1);
  position: relative;
  overflow: hidden;
}

.admin-card-nexus::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(
    45deg,
    transparent 30%,
    rgba(255, 255, 255, 0.1) 50%,
    transparent 70%
  );
  animation: shine 3s infinite;
  pointer-events: none;
}

@keyframes shine {
  0% {
    transform: translateX(-100%) translateY(-100%) rotate(45deg);
  }
  100% {
    transform: translateX(100%) translateY(100%) rotate(45deg);
  }
}

.admin-card-nexus:hover {
  background: linear-gradient(135deg, rgba(0, 255, 136, 0.25) 0%, rgba(0, 200, 100, 0.2) 100%);
  border-color: rgba(0, 255, 136, 0.8);
  box-shadow: 
    0 0 30px rgba(0, 255, 136, 0.5),
    0 0 60px rgba(0, 255, 136, 0.25),
    inset 0 0 30px rgba(0, 255, 136, 0.15);
  transform: translateZ(0) translateY(-1px);
}

.admin-card-nexus .admin-card-title {
  color: #00ff88;
  text-shadow: 0 0 10px rgba(0, 255, 136, 0.5);
}


/* Map Selector Modal */
.map-selector-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
}

.map-selector-content {
  background: #1a1a1a;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  padding: 2rem;
  max-width: 500px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
}

.map-selector-content h2 {
  margin: 0 0 1.5rem 0;
  color: #ffffff;
  font-size: 1.5rem;
  font-weight: 600;
}

.maps-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  max-height: 300px;
  overflow-y: auto;
}

.map-selector-item {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  padding: 1rem;
  cursor: pointer;
  transition: all 0.2s ease;
  color: #ffffff;
  text-decoration: none;
  display: block;
}

.map-selector-item:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(0, 255, 136, 0.3);
}

.map-selector-name {
  font-weight: 500;
  margin-bottom: 0.25rem;
  display: block;
}

.map-selector-date {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.6);
}

.map-selector-hint {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.6);
  margin-top: 0.5rem;
}

.map-selector-actions {
  display: flex;
  justify-content: flex-end;
  gap: 1rem;
}

.map-selector-cancel {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 6px;
  color: rgba(255, 255, 255, 0.8);
  padding: 0.75rem 1.5rem;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.map-selector-cancel:hover {
  border-color: rgba(255, 255, 255, 0.6);
  color: #ffffff;
}

/* Responsive Styles */
@media (max-width: 768px) {
  .admin-board {
    padding-top: calc(var(--admin-nav-height, 70px) + var(--admin-nav-spacing, 16px));
    padding-left: 0;
    padding-right: 0;
    padding-bottom: 0;
  }

  .admin-board-container {
    width: 100%;
    max-width: 100%;
    padding: 0 1.25rem 2rem;
    box-sizing: border-box;
  }

  .admin-counter-cards {
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
  }

  .admin-content {
    gap: 1.5rem;
    padding-bottom: 2rem;
  }

  .admin-section {
    padding: 0.875rem 1rem;
  }

  .admin-section-title {
    font-size: 0.9rem;
  }

  .admin-cards-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.65rem 1rem;
  }

  .admin-card {
    padding: 0.65rem 0.9rem;
  }

  .admin-card-title {
    font-size: 0.95rem;
  }

  .admin-card-count {
    font-size: 1.1rem;
    min-width: 2.2em;
  }

  .map-selector-content {
    padding: 1.5rem;
    width: 95%;
  }

  .map-selector-content h2 {
    font-size: 1.25rem;
  }
}

@media (max-width: 480px) {
  .admin-board {
    padding-top: calc(var(--admin-nav-height, 60px) + var(--admin-nav-spacing, 12px));
    padding-left: 0;
    padding-right: 0;
    padding-bottom: 0;
  }

  .admin-board-container {
    padding: 0.75rem 1rem 1.75rem;
  }

  .admin-content {
    gap: 1.25rem;
    padding-bottom: 1.5rem;
  }

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

  .admin-section {
    padding: 0.75rem 0.875rem;
  }

  .admin-section-title {
    font-size: 0.85rem;
  }

  .admin-cards-grid {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }

  .admin-card {
    padding: 0.6rem 0.8rem;
  }

  .admin-card-title {
    font-size: 0.95rem;
  }

  .admin-card-count {
    font-size: 1rem;
    min-width: 2em;
  }

  .admin-counter-card {
    padding: 1rem;
  }

  .admin-counter-label {
    font-size: 0.8rem;
  }

  .admin-counter-value {
    font-size: 1.75rem;
  }
}

/* Desktop styles - ensure base styles apply for screens > 480px */
@media (min-width: 481px) {
  .admin-board {
    padding-top: calc(var(--admin-nav-height, 72px) + var(--admin-nav-spacing, 20px)) !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    padding-bottom: 0 !important;
  }

  .admin-board-container {
    max-width: 1200px !important;
    padding: 0 2rem !important;
    padding-bottom: 2rem !important;
  }

  .admin-counter-value {
    font-size: 2rem !important;
  }
}

/* Desktop: keep 2-col card grid */
@media (min-width: 769px) {
  .admin-content {
    gap: 2.5rem !important;
  }

  .admin-cards-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 0.75rem 1.25rem !important;
  }
}:root {
  --admin-nav-height: 72px; /* Desktop: 0.75rem top + content (~40px) + 0.75rem bottom */
  --admin-nav-spacing: 20px; /* Additional spacing after nav */
}

@media (max-width: 768px) {
  :root {
    --admin-nav-height: 70px; /* Tablet: 0.875rem top + content + 0.875rem bottom */
    --admin-nav-spacing: 16px; /* Additional spacing after nav */
  }
}

@media (max-width: 480px) {
  :root {
    --admin-nav-height: 60px; /* Mobile: 0.75rem top + content + 0.75rem bottom */
    --admin-nav-spacing: 12px; /* Additional spacing after nav */
  }
}

.admin-nav {
  width: 100%;
  padding: 0.75rem 0;
  background: #0a0a0a;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  margin: 0;
  margin-bottom: 0;
  flex-shrink: 0;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: var(--admin-nav-height);
  box-sizing: border-box;
  display: flex;
  align-items: center;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.admin-nav-hidden {
  opacity: 0;
  pointer-events: none;
  transform: translateY(-100%);
}

.admin-nav-hidden .admin-nav-content {
  opacity: 0;
  pointer-events: none;
}

.admin-nav-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem;
  width: 100%;
  max-width: 100%;
  padding: 0 2rem;
  box-sizing: border-box;
  margin: 0 auto;
  transition: opacity 0.3s ease;
}

.admin-nav-breadcrumbs {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  flex: 1;
  min-width: 0; /* Allow shrinking */
}

.breadcrumb-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  position: relative;
}

.breadcrumb-dropdown-container {
  position: relative;
  display: inline-block;
}

.breadcrumb-separator {
  color: rgba(255, 255, 255, 0.3);
  font-size: 0.9rem;
}

.breadcrumb-link {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #00ff88;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  padding: 0.4rem 0.75rem;
  border-radius: 6px;
  transition: all 0.2s ease;
  outline: none;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  position: relative;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.breadcrumb-link:focus {
  outline: none;
}

.breadcrumb-link:hover {
  background: rgba(0, 255, 136, 0.08);
  border-color: rgba(0, 255, 136, 0.2);
  box-shadow: 0 2px 4px rgba(0, 255, 136, 0.15);
  transform: translateY(-1px);
}

.breadcrumb-link.has-dropdown {
  padding-right: 0.6rem;
}

.breadcrumb-label {
  display: inline-block;
}

.breadcrumb-arrow {
  font-size: 0.65rem;
  color: rgba(0, 255, 136, 0.6);
  transition: transform 0.2s ease;
  display: inline-block;
  line-height: 1;
  flex-shrink: 0;
}

.breadcrumb-dropdown {
  position: fixed;
  background: #1a1a1a;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 0.5rem;
  min-width: 180px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(0, 255, 136, 0.1);
  z-index: 10001;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  backdrop-filter: blur(10px);
}

.breadcrumb-dropdown-item-wrapper {
  position: relative;
  width: 100%;
}

.breadcrumb-dropdown-item {
  width: 100%;
  padding: 0.5rem 0.75rem;
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  border-radius: 4px;
  text-align: left;
  transition: all 0.2s ease;
  outline: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.breadcrumb-dropdown-item:focus {
  outline: none;
}

.breadcrumb-dropdown-item:hover {
  background: rgba(0, 255, 136, 0.1);
  color: #00ff88;
}

.breadcrumb-dropdown-item.has-children {
  padding-right: 0.5rem;
}

.breadcrumb-dropdown-item--nexus {
  color: #00ff88;
}

.breadcrumb-dropdown-item--nexus:hover {
  color: #00ff88;
}

.dropdown-item-arrow {
  font-size: 0.7rem;
  color: rgba(0, 255, 136, 0.6);
  flex-shrink: 0;
  transition: transform 0.2s ease;
}

.breadcrumb-dropdown-item:hover .dropdown-item-arrow {
  color: #00ff88;
}

.nested-dropdown {
  position: absolute;
  top: 0;
  left: calc(100% + 0.5rem);
  min-width: 180px;
  z-index: 10002;
}

.breadcrumb-current {
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.9rem;
  font-weight: 500;
  padding: 0.25rem 0.5rem;
}

.breadcrumb-current-link {
  color: rgba(255, 255, 255, 0.8) !important;
}

/* User Dropdown Styles */
.admin-nav-user-dropdown-container {
  position: relative;
  z-index: 1001; /* Higher than nav z-index to ensure dropdown appears above */
  isolation: isolate; /* Create new stacking context */
}

.admin-nav-user-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.9rem;
  font-weight: 500;
  padding: 0.5rem 1rem;
  cursor: pointer;
  transition: all 0.2s ease;
  outline: none;
}

.admin-nav-user-btn:focus {
  outline: none;
}

.admin-nav-user-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(0, 255, 136, 0.3);
  color: #ffffff;
}

.admin-nav-user-dropdown {
  position: fixed;
  background: #1a1a1a;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 0.5rem;
  min-width: 160px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  z-index: 10001; /* Very high to ensure it's above all content */
  display: flex;
  flex-direction: column;
}

.admin-nav-dropdown-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  border-radius: 6px;
  transition: all 0.2s ease;
  text-align: left;
  outline: none;
}

.admin-nav-dropdown-item:focus {
  outline: none;
}

.admin-nav-dropdown-item:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
}

.admin-nav-dropdown-item.logout:hover {
  background: rgba(255, 68, 68, 0.1);
  color: #ff4444;
}

.admin-nav-dropdown-icon {
  font-size: 1rem;
  width: 1.2rem;
  display: inline-block;
  text-align: center;
}

.admin-nav-dropdown-divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.1);
  margin: 0.25rem 0;
}

/* Responsive Styles */
@media (max-width: 768px) {
  .admin-nav {
    padding: 0.875rem 0;
    width: 100%;
    overflow-x: auto;
    overflow-y: visible;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE and Edge */
  }

  .admin-nav::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
  }

  .admin-nav-content {
    padding: 0 1.5rem;
    gap: 1rem;
    min-width: max-content; /* Allow horizontal scrolling */
  }

  .admin-nav-breadcrumbs {
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
    flex-wrap: nowrap; /* Prevent wrapping on mobile */
  }

  .admin-nav-breadcrumbs::-webkit-scrollbar {
    display: none;
  }

  .breadcrumb-link,
  .breadcrumb-current {
    font-size: 0.85rem;
    white-space: nowrap; /* Prevent text wrapping */
  }

  .breadcrumb-dropdown {
    min-width: 140px;
    font-size: 0.8rem;
  }

  .breadcrumb-dropdown-item {
    padding: 0.45rem 0.65rem;
    font-size: 0.8rem;
  }

  .admin-nav-user-btn {
    font-size: 0.85rem;
    padding: 0.45rem 0.85rem;
    flex-shrink: 0; /* Prevent user button from shrinking */
  }
}

@media (max-width: 480px) {
  .admin-nav {
    padding: 0.75rem 0;
  }

  .admin-nav-content {
    padding: 0 1rem;
    gap: 0.75rem;
  }

  .breadcrumb-link,
  .breadcrumb-current {
    font-size: 0.8rem;
    padding: 0.2rem 0.4rem;
  }

  .admin-nav-breadcrumbs {
    gap: 0.375rem;
  }

  .breadcrumb-dropdown {
    min-width: 120px;
    padding: 0.4rem;
  }

  .breadcrumb-dropdown-item {
    padding: 0.4rem 0.5rem;
    font-size: 0.75rem;
  }

  .breadcrumb-dropdown-toggle {
    padding: 0.2rem;
  }
}
.welcome-view {
  width: 100%;
  min-height: 100vh;
  background: transparent;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  box-sizing: border-box;
  position: relative;
  z-index: 2;
  pointer-events: none; /* Allow clicks to pass through to Spline scene */
}

/* Allow scrolling when content overflows, but stay centered when it doesn't */
@supports (height: 100dvh) {
  .welcome-view {
    min-height: 100dvh;
  }
}

/* Spline Background */
.spline-background {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: auto;
  touch-action: pan-x pan-y pinch-zoom; /* Allow touch interactions for Spline */
}

.welcome-container {
  width: 100%;
  max-width: 500px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
  position: relative;
  z-index: 2;
  pointer-events: auto; /* Make container and its children clickable */
}

.welcome-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  width: 100%;
}

.welcome-title {
  font-size: clamp(2.5rem, 8vw, 4rem);
  font-weight: 700;
  margin: 0;
  color: #00ff88;
  line-height: 1.2;
}

.welcome-title.error {
  color: #ff4444;
}

.welcome-title.signup-title {
  font-size: clamp(2rem, 6vw, 3rem);
}

.welcome-message {
  font-size: clamp(1.1rem, 3vw, 1.5rem);
  color: rgba(255, 255, 255, 0.8);
  margin: 0;
  line-height: 1.5;
}

.welcome-loading {
  font-size: 1.2rem;
  color: rgba(255, 255, 255, 0.6);
}

.welcome-error {
  font-size: 1.1rem;
  color: rgba(255, 255, 255, 0.7);
  margin: 0;
}

.welcome-card {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(0, 255, 136, 0.3);
  border-radius: 12px;
  padding: 1.5rem 2rem;
  width: 100%;
  max-width: 350px;
}

.welcome-card-content {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.welcome-name {
  font-size: 1.5rem;
  font-weight: 600;
  color: #ffffff;
  margin: 0;
}

.welcome-email {
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.6);
  margin: 0;
}

.welcome-status {
  margin-top: 0.5rem;
}

.status-badge {
  display: inline-block;
  padding: 0.5rem 1.25rem;
  font-size: 0.85rem;
  font-weight: 600;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.status-badge.status-pending {
  background: rgba(255, 165, 0, 0.2);
  color: #ffa500;
  border: 1px solid rgba(255, 165, 0, 0.4);
}

.status-badge.status-accepted {
  background: rgba(0, 255, 136, 0.2);
  color: #00ff88;
  border: 1px solid rgba(0, 255, 136, 0.4);
}

.welcome-home-btn {
  padding: 1rem 2.5rem;
  font-size: 1.1rem;
  font-weight: 600;
  background: #00ff88;
  border: none;
  border-radius: 8px;
  color: #000000;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-top: 1rem;
  pointer-events: auto; /* Ensure button is clickable */
}

.welcome-home-btn:hover {
  background: #00dd77;
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(0, 255, 136, 0.3);
}

/* Wizard Progress */
.wizard-progress {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.wizard-step {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.1);
  border: 2px solid rgba(255, 255, 255, 0.2);
  color: rgba(255, 255, 255, 0.4);
  transition: all 0.3s ease;
}

.wizard-step.active {
  background: rgba(0, 255, 136, 0.2);
  border-color: #00ff88;
  color: #00ff88;
}

.wizard-step.completed {
  background: #00ff88;
  border-color: #00ff88;
  color: #000;
}

.wizard-line {
  width: 60px;
  height: 2px;
  background: rgba(255, 255, 255, 0.2);
}

/* Signup Form */
.signup-form {
  width: 100%;
  max-width: 400px;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  text-align: left;
  pointer-events: auto; /* Ensure form is interactive */
}

/* Compact user info section (email, first name, last name) */
.user-info-compact {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.user-info-compact .form-field {
  gap: 0;
}

.user-info-compact .form-input {
  padding: 0.625rem 0.875rem;
  font-size: 0.9rem;
}

.name-row {
  display: flex;
  gap: 0.5rem;
  width: 100%;
}

.name-row .form-field {
  flex: 1;
  min-width: 0; /* Allows flex items to shrink below their content size */
}

.name-row .form-input {
  width: 100%;
  box-sizing: border-box;
  /* Override compact styles to match other inputs */
  padding: 0.875rem 1rem;
  font-size: 1rem;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-field label {
  font-size: 0.9rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.8);
}

.form-input {
  padding: 0.875rem 1rem;
  font-size: 1rem;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  color: #ffffff;
  outline: none;
  transition: all 0.2s ease;
  pointer-events: auto; /* Ensure inputs are interactive */
}

.form-input:focus {
  border-color: #00ff88;
  background: rgba(255, 255, 255, 0.1);
}

.form-input.disabled {
  background: rgba(255, 255, 255, 0.03);
  color: rgba(255, 255, 255, 0.5);
  cursor: not-allowed;
}

.form-input::placeholder {
  color: rgba(255, 255, 255, 0.3);
}

.field-hint {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.4);
}

.field-error {
  font-size: 0.8rem;
  color: #ff4444;
}

.form-divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.1);
  margin: 0.5rem 0;
}

.form-error-message {
  padding: 0.75rem 1rem;
  background: rgba(255, 68, 68, 0.1);
  border: 1px solid rgba(255, 68, 68, 0.3);
  border-radius: 8px;
  color: #ff4444;
  font-size: 0.9rem;
  text-align: center;
}

.signup-actions {
  display: flex;
  gap: 1rem;
  margin-top: 0.5rem;
}

.back-btn {
  flex: 1;
  padding: 0.875rem 1.5rem;
  font-size: 1rem;
  font-weight: 600;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.8);
  cursor: pointer;
  transition: all 0.2s ease;
  pointer-events: auto; /* Ensure button is clickable */
}

.back-btn:hover {
  border-color: rgba(255, 255, 255, 0.6);
  color: #ffffff;
}

.signup-btn {
  flex: 2;
  padding: 0.875rem 1.5rem;
  font-size: 1rem;
  font-weight: 600;
  background: #00ff88;
  border: none;
  border-radius: 8px;
  color: #000000;
  cursor: pointer;
  transition: all 0.2s ease;
  pointer-events: auto; /* Ensure button is clickable */
}

.signup-btn:hover:not(:disabled) {
  background: #00dd77;
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(0, 255, 136, 0.3);
}

.signup-btn:disabled {
  background: rgba(0, 255, 136, 0.3);
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* Email Confirmation Step */
.email-icon {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: rgba(0, 136, 255, 0.15);
  border: 3px solid #0088ff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  color: #0088ff;
  margin-bottom: 1rem;
}

.welcome-title.confirmation-title {
  font-size: clamp(1.8rem, 5vw, 2.5rem);
  color: #ffffff;
}

.email-highlight {
  font-size: 1.2rem;
  font-weight: 600;
  color: #0088ff;
  background: rgba(0, 136, 255, 0.1);
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  border: 1px solid rgba(0, 136, 255, 0.3);
  margin: 0.5rem 0;
}

.confirmation-instructions {
  max-width: 350px;
  margin-top: 1rem;
}

.confirmation-instructions p {
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.7);
  line-height: 1.6;
  margin: 0 0 0.75rem 0;
}

.confirmation-instructions .hint {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.5);
  font-style: italic;
}

.wizard-line.completed {
  background: #00ff88;
}

/* Expired Link State */
.email-icon.expired {
  background: rgba(255, 165, 0, 0.15);
  border-color: #ffa500;
  color: #ffa500;
}

.email-icon.success {
  background: rgba(0, 255, 136, 0.15);
  border-color: #00ff88;
  color: #00ff88;
}

.resend-message {
  padding: 0.75rem 1.25rem;
  border-radius: 8px;
  font-size: 0.9rem;
  margin-top: 0.5rem;
}

.resend-message.success {
  background: rgba(0, 255, 136, 0.1);
  border: 1px solid rgba(0, 255, 136, 0.3);
  color: #00ff88;
}

.resend-message.error {
  background: rgba(255, 68, 68, 0.1);
  border: 1px solid rgba(255, 68, 68, 0.3);
  color: #ff4444;
}

.welcome-home-btn.resend-btn {
  background: #ffa500;
  color: #000;
}

.welcome-home-btn.resend-btn:hover:not(:disabled) {
  background: #ff8c00;
  box-shadow: 0 4px 20px rgba(255, 165, 0, 0.3);
}

.welcome-home-btn.resend-btn:disabled {
  background: rgba(255, 165, 0, 0.5);
  cursor: not-allowed;
  transform: none;
}

.resend-link-btn {
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.9rem;
  cursor: pointer;
  text-decoration: underline;
  padding: 0.5rem;
  transition: color 0.2s ease;
  pointer-events: auto; /* Ensure button is clickable */
}

.resend-link-btn:hover:not(:disabled) {
  color: rgba(255, 255, 255, 0.8);
}

.resend-link-btn:disabled {
  color: rgba(255, 255, 255, 0.3);
  cursor: not-allowed;
}

.welcome-home-btn.secondary {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: rgba(255, 255, 255, 0.8);
}

.welcome-home-btn.secondary:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.5);
  color: #ffffff;
  box-shadow: none;
}

/* Responsive */
@media (max-width: 600px) {
  .welcome-view {
    padding: 1.5rem 1rem;
    box-sizing: border-box;
    /* Keep centered, but allow scroll when needed */
    align-items: safe center;
    padding-top: 2rem;
    padding-bottom: 2rem;
  }
  
  /* Fallback for browsers that don't support 'safe center' */
  @supports not (align-items: safe center) {
    .welcome-view {
      align-items: flex-start;
    }
  }

  .welcome-container {
    gap: 1.25rem;
    max-width: 100%;
    padding: 0;
    box-sizing: border-box;
  }

  .welcome-content {
    gap: 1rem;
  }

  .welcome-card {
    padding: 1.25rem 1.5rem;
    max-width: calc(100% - 1rem);
    box-sizing: border-box;
  }

  .welcome-name {
    font-size: 1.25rem;
  }

  .welcome-email {
    font-size: 0.9rem;
    word-break: break-all;
  }

  .wizard-progress {
    gap: 0.25rem;
  }

  .wizard-step {
    width: 32px;
    height: 32px;
    font-size: 0.8rem;
  }

  .wizard-line {
    width: 40px;
  }

  .signup-form {
    max-width: 100%;
    gap: 0.875rem;
  }

  /* Make user info fields more compact on mobile */
  .user-info-compact {
    gap: 0.5rem;
  }

  .user-info-compact .form-input {
    padding: 0.5rem 0.75rem;
    font-size: 0.85rem;
  }

  .name-row {
    gap: 0.5rem;
  }

  .form-input {
    padding: 0.75rem 0.875rem;
    font-size: 16px; /* Prevents iOS zoom on focus */
  }

  .signup-actions {
    flex-direction: column;
    gap: 0.75rem;
  }

  .back-btn,
  .signup-btn {
    flex: none;
    width: 100%;
  }

  .welcome-home-btn {
    padding: 0.875rem 2rem;
    font-size: 1rem;
    width: 100%;
    max-width: 300px;
  }

  .email-icon {
    width: 80px;
    height: 80px;
    font-size: 2.5rem;
  }

  .email-highlight {
    font-size: 1rem;
    padding: 0.625rem 1rem;
    word-break: break-all;
  }

  .confirmation-instructions {
    max-width: 100%;
  }

  .confirmation-instructions p {
    font-size: 0.9rem;
  }

  .status-badge {
    padding: 0.4rem 1rem;
    font-size: 0.75rem;
  }

  .welcome-title.signup-title {
    font-size: clamp(1.5rem, 6vw, 2rem);
  }

  .welcome-message {
    font-size: 1rem;
  }
}

@media (max-width: 360px) {
  .welcome-view {
    padding: 1rem;
  }

  .welcome-title {
    font-size: clamp(1.8rem, 10vw, 2.5rem);
  }

  .welcome-title.signup-title {
    font-size: clamp(1.5rem, 8vw, 2rem);
  }

  .welcome-message {
    font-size: 1rem;
  }

  .wizard-step {
    width: 28px;
    height: 28px;
    font-size: 0.75rem;
  }

  .wizard-line {
    width: 30px;
  }

  .welcome-card {
    padding: 1rem;
  }

  .form-field label {
    font-size: 0.85rem;
  }

  .email-icon {
    width: 70px;
    height: 70px;
    font-size: 2rem;
  }
}
.profile-detail-view {
  width: 100%;
  min-height: 100vh;
  background: #0a0a0a;
  color: #ffffff;
  display: flex;
  flex-direction: column;
  padding: 0;
  box-sizing: border-box;
  padding-top: calc(var(--admin-nav-height, 72px) + var(--admin-nav-spacing, 20px));
}

.profile-detail-container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  box-sizing: border-box;
}

.profile-detail-loading,
.profile-detail-error {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 50vh;
  gap: 1rem;
}

.profile-detail-error .error-title {
  font-size: 1.5rem;
  font-weight: 600;
  color: #ff4444;
  margin: 0;
}

.profile-detail-error .error-message {
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.7);
  margin: 0;
}

.profile-detail-error .back-button {
  padding: 0.75rem 1.5rem;
  background: #00ff88;
  border: none;
  border-radius: 8px;
  color: #000000;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-top: 1rem;
}

.profile-detail-error .back-button:hover {
  background: #00dd77;
}

.profile-detail-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 3rem 0;
  gap: 2rem;
}

.profile-detail-avatar-wrapper {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.profile-detail-avatar {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  overflow: hidden;
  border: 3px solid rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.05);
  position: relative;
}

.profile-detail-avatar-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-detail-avatar-initial {
  font-size: 5rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.8);
}

.profile-detail-edit-character-btn {
  padding: 0.5rem 1.5rem;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 4px;
  color: #ffffff;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.profile-detail-edit-character-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.3);
}

.profile-detail-name {
  font-size: 3rem;
  font-weight: 600;
  margin: 0;
  text-align: center;
  color: #ffffff;
}

.profile-detail-role {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.role-badge {
  padding: 0.5rem 1rem;
  background: rgba(0, 255, 136, 0.2);
  border: 1px solid rgba(0, 255, 136, 0.4);
  border-radius: 20px;
  color: #00ff88;
  font-size: 0.9rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.characters-list {
  width: 100%;
  max-width: 800px;
  margin-top: 2rem;
}

.characters-list-title {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  color: #ffffff;
}

.characters-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1.5rem;
}

.character-card {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 1.5rem;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.character-card:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
}

.character-card-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(255, 255, 255, 0.2);
}

.character-card-name {
  font-size: 1.1rem;
  font-weight: 600;
  text-align: center;
  color: #ffffff;
  margin: 0;
}

.character-card-creature {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.6);
  text-align: center;
  margin: 0;
}

@media (max-width: 768px) {
  .profile-detail-content {
    padding: 2rem 0;
  }

  .profile-detail-avatar {
    width: 150px;
    height: 150px;
  }

  .profile-detail-avatar-initial {
    font-size: 4rem;
  }

  .profile-detail-name {
    font-size: 2rem;
  }

  .characters-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 1rem;
  }
}
.profile-editor-view {
  width: 100%;
  min-height: 100vh;
  background: #0a0a0a;
  color: #ffffff;
  padding: 2rem;
  box-sizing: border-box;
}

.profile-editor-loading,
.profile-editor-error {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 50vh;
  gap: 1rem;
}

.profile-editor-error button {
  padding: 0.75rem 1.5rem;
  background: #00ff88;
  border: none;
  border-radius: 8px;
  color: #000000;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.profile-editor-error button:hover {
  background: #00dd77;
}

.profile-editor-content {
  max-width: 800px;
  margin: 0 auto;
}

.profile-editor-form {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 2rem;
}

.profile-editor-form h1 {
  margin: 0 0 2rem 0;
  font-size: 2rem;
  font-weight: 600;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.7);
  font-weight: 500;
}

.title-input {
  width: 100%;
  padding: 0.75rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  color: #ffffff;
  font-size: 1rem;
  font-family: inherit;
  box-sizing: border-box;
}

.title-input:focus {
  outline: none;
  border-color: #00ff88;
  background: rgba(255, 255, 255, 0.08);
}

.avatar-preview-section {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.avatar-preview,
.avatar-placeholder {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(255, 255, 255, 0.2);
}

.avatar-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.1);
  font-size: 2rem;
  font-weight: 600;
}

.btn-select-media,
.btn-remove-media {
  padding: 0.5rem 1rem;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 4px;
  color: #ffffff;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-select-media:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.3);
}

.btn-remove-media {
  background: rgba(255, 68, 68, 0.2);
  border-color: rgba(255, 68, 68, 0.4);
}

.btn-remove-media:hover {
  background: rgba(255, 68, 68, 0.3);
}

.error-message {
  padding: 1rem;
  background: rgba(255, 68, 68, 0.2);
  border: 1px solid rgba(255, 68, 68, 0.4);
  border-radius: 4px;
  color: #ff4444;
  margin-bottom: 1.5rem;
}

.form-actions {
  display: flex;
  gap: 1rem;
  justify-content: flex-end;
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-cancel,
.btn-save {
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 4px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-cancel {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-cancel:hover {
  background: rgba(255, 255, 255, 0.15);
}

.btn-save {
  background: #00ff88;
  color: #000000;
}

.btn-save:hover:not(:disabled) {
  background: #00dd77;
}

.btn-save:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.login-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10001;
  padding: 1rem;
  box-sizing: border-box;
}

.login-modal {
  background: rgba(20, 20, 30, 0.95);
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-radius: 16px;
  padding: 2rem;
  width: 100%;
  max-width: 380px;
  position: relative;
  box-shadow: 
    0 0 40px rgba(0, 0, 0, 0.5),
    0 0 80px rgba(0, 255, 0, 0.1);
}

.login-modal-close {
  position: absolute;
  top: -18px;
  left: 50%;
  transform: translateX(-50%);
  width: 36px;
  height: 36px;
  min-width: 36px;
  min-height: 36px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  background: rgba(20, 20, 30, 0.95);
  color: rgba(255, 255, 255, 0.7);
  font-size: 1.25rem;
  cursor: pointer;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  line-height: 0;
  padding: 0;
  padding-bottom: 2px;
  aspect-ratio: 1 / 1;
  box-sizing: border-box;
}

.login-modal-close:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.5);
  color: white;
  transform: translateX(-50%) scale(1.1);
}

.login-modal-header {
  text-align: center;
  margin-bottom: 1.5rem;
}

.login-modal-header h2 {
  color: white;
  font-size: 1.5rem;
  font-weight: 600;
  margin: 0 0 0.5rem 0;
}

.login-modal-header p {
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.9rem;
  margin: 0;
}

.login-error {
  background: rgba(255, 80, 80, 0.15);
  border: 1px solid rgba(255, 80, 80, 0.3);
  border-radius: 8px;
  padding: 0.75rem 1rem;
  margin-bottom: 1rem;
  color: #ff8a8a;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.login-error-icon {
  font-size: 1rem;
}

.login-message {
  background: rgba(80, 200, 80, 0.15);
  border: 1px solid rgba(80, 200, 80, 0.3);
  border-radius: 8px;
  padding: 0.75rem 1rem;
  margin-bottom: 1rem;
  color: #8f8;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.login-message-icon {
  font-size: 1rem;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.login-field {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.login-field label {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.85rem;
  font-weight: 500;
}

.login-field input {
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  padding: 0.75rem 1rem;
  color: white;
  font-size: 1rem;
  outline: none;
  transition: all 0.2s ease;
}

.login-field input:focus {
  border-color: rgba(0, 255, 0, 0.5);
  box-shadow: 0 0 0 3px rgba(0, 255, 0, 0.1);
}

.login-field input::placeholder {
  color: rgba(255, 255, 255, 0.3);
}

.login-submit {
  background: rgba(0, 255, 0, 0.2);
  border: 2px solid rgba(0, 255, 0, 0.5);
  border-radius: 8px;
  padding: 0.85rem 1.5rem;
  color: rgba(0, 255, 0, 0.9);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-top: 0.5rem;
}

.login-submit:hover:not(:disabled) {
  background: rgba(0, 255, 0, 0.3);
  border-color: rgba(0, 255, 0, 0.7);
  box-shadow: 0 0 20px rgba(0, 255, 0, 0.3);
}

.login-submit:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.login-invite-notice {
  text-align: center;
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.login-invite-notice p {
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.85rem;
  font-style: italic;
  margin: 0;
}
.logout-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10001;
  padding: 1rem;
  pointer-events: auto;
}

.logout-modal-content {
  background: rgba(20, 20, 30, 0.95);
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-radius: 16px;
  padding: 2rem;
  max-width: 360px;
  width: 100%;
  text-align: center;
  box-shadow: 
    0 0 40px rgba(0, 0, 0, 0.5),
    0 0 80px rgba(255, 165, 0, 0.1);
}

.logout-modal-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.logout-modal-title {
  color: #ffffff;
  font-size: 1.5rem;
  font-weight: 600;
  margin: 0 0 1rem 0;
}

.logout-modal-message {
  color: rgba(255, 255, 255, 0.7);
  font-size: 1rem;
  line-height: 1.5;
  margin: 0 0 1.5rem 0;
}

.logout-modal-actions {
  display: flex;
  gap: 1rem;
}

.btn-cancel-logout {
  flex: 1;
  padding: 0.875rem 1.5rem;
  font-size: 1rem;
  font-weight: 500;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.8);
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-cancel-logout:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.5);
  color: #ffffff;
}

.btn-confirm-logout {
  flex: 1;
  padding: 0.875rem 1.5rem;
  font-size: 1rem;
  font-weight: 600;
  background: rgba(255, 165, 0, 0.2);
  border: 2px solid rgba(255, 165, 0, 0.5);
  border-radius: 8px;
  color: #ffa500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-confirm-logout:hover {
  background: rgba(255, 165, 0, 0.3);
  border-color: rgba(255, 165, 0, 0.7);
  box-shadow: 0 0 20px rgba(255, 165, 0, 0.3);
}
/* Responsive Design System - Mobile First */
.places-view {
  width: 100%;
  min-height: 100vh;
  background: #0a0a0a;
  color: #ffffff;
  display: flex;
  flex-direction: column;
  padding: 0;
  box-sizing: border-box;
  padding-top: calc(var(--admin-nav-height, 72px) + var(--admin-nav-spacing, 20px));
}

.places-nav-wrapper {
  width: 100%;
  padding: 0 1rem;
  background: #0a0a0a;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.places-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  min-height: 0;
}

.center-zone {
  width: 100%;
  max-width: 1200px;
  flex: 1;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  overflow: hidden;
  padding: 0;
  box-sizing: border-box;
  min-width: 0;
}

/* Pagination: dots + prev/next (shown when more than one page) */
.page-list-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 1rem 0 0;
  flex-shrink: 0;
}

.page-list-pagination-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.9);
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}

.page-list-pagination-btn:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.35);
}

.page-list-pagination-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.page-list-pagination-btn .material-icons {
  font-size: 24px;
}

.page-list-pagination-dots {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.page-list-pagination-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.25);
  cursor: pointer;
  padding: 0;
  transition: background 0.2s, transform 0.2s;
}

.page-list-pagination-dot:hover {
  background: rgba(255, 255, 255, 0.5);
}

.page-list-pagination-dot.active {
  background: rgba(255, 255, 255, 0.95);
  transform: scale(1.2);
}

.cards-container {
  display: flex;
  flex-direction: row;
  align-items: center;
  width: 100%;
  height: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE and Edge */
  scroll-padding: 0;
}

.cards-container::-webkit-scrollbar {
  display: none; /* Chrome, Safari, Opera */
}

.cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem 0.5rem;
  width: 100%;
  min-width: 100%;
  max-width: 100%;
  height: fit-content;
  max-height: 100%;
  margin: 0;
  padding: 0.75rem;
  box-sizing: border-box;
  align-content: center;
  scroll-snap-align: center;
  scroll-snap-stop: always;
  flex-shrink: 0;
  min-height: 0;
}

.card-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  padding: 0;
  box-sizing: border-box;
  overflow: visible;
  cursor: pointer;
}

.card {
  width: 32px;
  height: 32px;
  max-width: 100%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  transition: all 0.3s ease;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-bottom: 0.3125rem;
  position: relative;
  overflow: hidden;
}

.card-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  display: block;
}

.card-emoji {
  font-size: 0.875rem;
  line-height: 1;
}

.card-title {
  font-size: 0.5rem;
  line-height: 1.2;
  word-break: normal;
  overflow-wrap: break-word;
  text-align: center;
  padding: 0 0.125rem;
  max-width: 100%;
  hyphens: none;
  width: 100%;
  word-spacing: normal;
  box-sizing: border-box;
}

.add-card .card {
  background: rgba(255, 255, 255, 0.1);
  border-style: dashed;
}

.add-card .card-emoji {
  opacity: 0.8;
  font-weight: 300;
}


.card:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* Mobile: Full width center-zone */
@media (max-width: 768px) {
  .places-content {
    padding: 1rem;
  }
}

/* Small phones (320px - 375px) */
@media (min-width: 360px) {
  .center-zone {
    padding: 0.875rem;
  }
  
  .cards-grid {
    gap: 0.875rem 0.625rem;
    width: 100%;
  }
  
  .card {
    width: 36px;
    height: 36px;
    margin-bottom: 0.375rem;
  }
  
  .card-emoji {
    font-size: 1rem;
  }
  
  .card-title {
    font-size: 0.5625rem;
  }
}

/* Standard phones (375px - 480px) */
@media (min-width: 375px) {
  .center-zone {
    padding: 1rem;
  }
  
  .cards-grid {
    gap: 1rem 0.75rem;
    width: 100%;
  }
  
  .card {
    width: 40px;
    height: 40px;
    margin-bottom: 0.4375rem;
  }
  
  .card-emoji {
    font-size: 1.125rem;
  }
  
  .card-title {
    font-size: 0.625rem;
  }
}

/* Large phones (481px - 768px) */
@media (min-width: 481px) {
  .center-zone {
    padding: 1.25rem;
  }
  
  .cards-grid {
    gap: 1.25rem 1rem;
    width: 100%;
  }
  
  .card {
    width: 48px;
    height: 48px;
    margin-bottom: 0.5rem;
  }
  
  .card-emoji {
    font-size: 1.375rem;
  }
  
  .card-title {
    font-size: 0.6875rem;
  }
}

/* Tablets (769px - 1024px) */
@media (min-width: 769px) {
  .center-zone {
    padding: 1.5rem;
    overflow: hidden;
  }
  
  .cards-container {
    overflow-x: auto;
    overflow-y: hidden;
  }
  
  .cards-grid {
    gap: 1.5rem 1.25rem;
    width: 100%;
    min-width: 100%;
    max-width: 100%;
  }
  
  .card {
    width: 64px;
    height: 64px;
    margin-bottom: 0.625rem;
  }
  
  .card-emoji {
    font-size: 1.75rem;
  }
  
  .card-title {
    font-size: 0.75rem;
  }
  
  .card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
  }
}

/* Desktop (1025px+) */
@media (min-width: 1025px) {
  .center-zone {
    overflow: hidden;
  }
  
  .cards-container {
    overflow-x: auto;
    overflow-y: hidden;
  }
  
  .cards-grid {
    gap: 2rem 1.5rem;
    width: 100%;
    min-width: 100%;
    max-width: 100%;
  }
  
  .card {
    width: 80px;
    height: 80px;
    margin-bottom: 0.75rem;
  }
  
  .card-emoji {
    font-size: 2rem;
  }
  
  .card-title {
    font-size: 0.875rem;
  }
}

/* Landscape orientation adjustments for mobile */
@media (orientation: landscape) and (max-height: 600px) {
  .center-zone {
    padding: 0.5rem;
  }
  
  .cards-grid {
    gap: 1rem 0.75rem;
  }
  
  .card {
    width: 50px;
    height: 50px;
    margin-bottom: 0.375rem;
  }
  
  .card-emoji {
    font-size: 1.25rem;
  }
  
  .card-title {
    font-size: 0.625rem;
  }
}

/* Large landscape tablets */
@media (orientation: landscape) and (min-height: 600px) and (min-width: 769px) {
  .cards-grid {
    gap: 1.5rem 1.25rem;
  }
  
  .card-emoji {
    font-size: 2.25rem;
  }
  
  .card-title {
    font-size: 0.9375rem;
  }
}
/* Full screen modal overlay */
.place-view-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  background: rgba(0, 50, 25, 0.5);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start; /* Start from top, not center */
  z-index: 1000;
  overflow: hidden;
  box-sizing: border-box;
  /* Padding with iOS safe areas */
  padding-top: max(1rem, env(safe-area-inset-top));
  padding-left: max(0.75rem, env(safe-area-inset-left));
  padding-right: max(0.75rem, env(safe-area-inset-right));
  padding-bottom: 0; /* Buttons are fixed, no need for bottom padding on overlay */
}

/* Modal wrapper */
.place-view-modal-wrapper,
.modal-content.place-view-modal-wrapper {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-width: 100%;
  height: 100%;
  background: none;
  border: none;
  box-sizing: border-box;
}

/* Close button - hidden */
.place-view-modal-wrapper .modal-close {
  display: none;
}

/* 9:16 Card - sized based on available height */
.place-card {
  aspect-ratio: 9 / 16;
  width: auto;
  /* Height = viewport - top-padding - gap - action-btns - gap - back-btn - bottom-safe-area */
  /* Desktop: 100dvh - 1rem - 1rem - 44px - 1rem - 50px - 1rem = 100dvh - 142px */
  max-height: calc(100dvh - max(1rem, env(safe-area-inset-top)) - 1rem - 44px - 1rem - 50px - max(1rem, env(safe-area-inset-bottom)));
  max-height: calc(100vh - 160px); /* Fallback */
  max-width: min(400px, calc(100vw - 1.5rem));
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(0, 255, 136, 0.2);
  border-radius: 1rem;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  box-sizing: border-box;
  flex-shrink: 0;
}

/* Image Cover - 50% height */
.place-card-cover {
  position: relative;
  width: 100%;
  height: 50%;
  min-height: 0;
  flex-shrink: 0;
  overflow: visible;
  cursor: pointer;
  background: rgba(0, 0, 0, 0.2);
}

.place-cover-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  position: absolute;
  top: 0;
  left: 0;
  z-index: 1;
}

.place-cover-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.875rem;
  position: relative;
}

.place-cover-hint {
  color: rgba(255, 255, 255, 0.3);
  font-size: 0.75rem;
  font-weight: 400;
  text-align: center;
  pointer-events: none;
  user-select: none;
  transition: opacity 0.2s ease;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: none;
}

.place-cover-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 2;
  pointer-events: none;
}

.place-cover-buttons {
  display: flex;
  gap: 1rem;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 10;
  pointer-events: auto;
}

.place-cover-btn {
  padding: 0.75rem 1.5rem;
  border: 2px solid rgba(0, 255, 136, 0.5);
  background: rgba(0, 255, 136, 0.1);
  color: #00ff88;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.875rem;
  font-weight: 500;
  transition: all 0.2s;
  min-width: 120px;
}

.place-cover-btn:hover:not(:disabled) {
  background: rgba(0, 255, 136, 0.2);
  border-color: rgba(0, 255, 136, 0.8);
  transform: translateY(-2px);
}

.place-cover-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.place-cover-btn-choose {
  border-color: rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.9);
}

.place-cover-btn-choose:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.5);
}

/* Overlapping Emoji */
.place-cover-emoji-wrapper {
  position: absolute;
  bottom: -25px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  pointer-events: auto;
}

.place-cover-emoji {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  font-size: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
  padding: 0;
  border: none;
}

.place-cover-emoji:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 24px rgba(0, 255, 136, 0.3);
}

/* Fields Section */
.place-card-fields {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 2rem 1rem 0.75rem;
  align-items: stretch;
  min-height: 0;
  width: 100%;
  box-sizing: border-box;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: thin;
  scrollbar-color: rgba(0, 255, 136, 0.3) rgba(0, 0, 0, 0.2);
}

.place-card-fields::-webkit-scrollbar {
  width: 6px;
}

.place-card-fields::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 3px;
}

.place-card-fields::-webkit-scrollbar-thumb {
  background: rgba(0, 255, 136, 0.3);
  border-radius: 3px;
}

/* Action buttons - fixed, ALWAYS side by side */
.place-view-modal-wrapper .modal-actions-below {
  position: fixed !important;
  /* Position: bottom safe-area + back-btn(50px) + gap(1rem) */
  bottom: calc(max(1rem, env(safe-area-inset-bottom)) + 50px + 1rem);
  left: 50%;
  transform: translateX(-50%);
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  gap: 0.75rem;
  justify-content: center;
  align-items: center;
  z-index: 1001;
  width: auto !important;
  max-width: none !important;
}

/* Back button - fixed at bottom */
.modal-back-btn {
  position: fixed;
  bottom: max(1rem, env(safe-area-inset-bottom));
  left: 50%;
  transform: translateX(-50%);
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 2px solid rgba(0, 255, 136, 0.3);
  color: rgba(255, 255, 255, 0.9);
  font-size: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
  z-index: 1001;
  padding: 0;
}

.modal-back-btn:hover {
  background: rgba(0, 0, 0, 0.8);
  border-color: rgba(0, 255, 136, 0.5);
  transform: translateX(-50%) scale(1.1);
}

/* View Mode Styles */
.place-view {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  padding: 0.5rem 0;
}

.place-emoji-large {
  font-size: 2.5rem;
  line-height: 1;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.place-emoji-large:hover {
  transform: scale(1.1);
}

.place-title-large {
  font-size: 1.125rem;
  color: rgba(255, 255, 255, 0.9);
  font-weight: 500;
  cursor: pointer;
}

.place-description {
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.65);
  line-height: 1.5;
  text-align: center;
  cursor: pointer;
}

.place-edit-form {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  width: 100%;
  align-items: center;
}

.place-edit-form .form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  width: 100%;
  align-items: center;
  margin-bottom: 0;
}

.emoji-picker-wrapper {
  position: relative;
  display: flex;
  justify-content: center;
}

.emoji-picker-trigger-large {
  padding: 0.75rem;
  font-size: 2.5rem;
  text-align: center;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 0.75rem;
  color: rgba(255, 255, 255, 0.9);
  cursor: pointer;
  min-width: 70px;
  min-height: 70px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Emoji picker container */
.emoji-picker-container {
  position: fixed;
  z-index: 2001;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 420px;
  max-width: calc(100vw - 40px);
  height: calc(100vh - 80px);
  max-height: 600px;
  pointer-events: auto;
}

.emoji-picker-container .emoji-picker-search-wrapper {
  display: none;
}

.emoji-picker-close-btn {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  width: 100%;
  padding: 1rem;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(10px);
  border: none;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.9375rem;
  font-weight: 500;
  cursor: pointer;
  text-align: center;
  z-index: 10;
}

.place-view-modal {
  position: relative;
  z-index: 1001;
}

.title-input-large {
  font-size: 16px;
  font-weight: 500;
  padding: 0.5rem 0.75rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 0.5rem;
  color: rgba(255, 255, 255, 0.9);
  font-family: inherit;
  box-sizing: border-box;
  text-align: center;
  width: 100%;
}

.title-input-large.inline-edit {
  background: rgba(30, 30, 30, 0.6);
  cursor: text;
}

.title-input-large.inline-edit:focus {
  outline: none;
  border-color: rgba(0, 255, 136, 0.3);
  background: rgba(50, 50, 50, 0.8);
}

.description-textarea {
  font-size: 16px;
  line-height: 1.5;
  padding: 0.5rem 0.75rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 0.5rem;
  color: rgba(255, 255, 255, 0.9);
  font-family: inherit;
  box-sizing: border-box;
  resize: none;
  overflow: hidden;
  text-align: center;
  width: 100%;
  min-height: 2.5rem;
  max-height: 6rem;
}

.description-textarea.inline-edit {
  background: rgba(30, 30, 30, 0.6);
  cursor: text;
}

.description-textarea.inline-edit:focus {
  outline: none;
  border-color: rgba(0, 255, 136, 0.3);
  background: rgba(50, 50, 50, 0.8);
}

.description-textarea::placeholder {
  color: rgba(255, 255, 255, 0.5);
  text-align: center;
}

/* Select dropdown styling */
.select-dropdown {
  font-size: 16px;
  font-weight: 500;
  padding: 0.625rem 2.5rem 0.625rem 0.75rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 0.5rem;
  color: rgba(255, 255, 255, 0.9);
  font-family: inherit;
  box-sizing: border-box;
  text-align: left;
  width: 100%;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23ffffff' fill-opacity='0.7' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  background-size: 12px;
  transition: all 0.2s ease;
}

.select-dropdown.inline-edit {
  background-color: rgba(30, 30, 30, 0.6);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23ffffff' fill-opacity='0.7' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
}

.select-dropdown.inline-edit:hover {
  background-color: rgba(40, 40, 40, 0.7);
  border-color: rgba(255, 255, 255, 0.15);
}

.select-dropdown.inline-edit:focus {
  outline: none;
  border-color: rgba(0, 255, 136, 0.3);
  background-color: rgba(50, 50, 50, 0.8);
  box-shadow: 0 0 0 2px rgba(0, 255, 136, 0.1);
}

.select-dropdown option {
  background: rgba(20, 20, 20, 0.95);
  color: rgba(255, 255, 255, 0.9);
  padding: 0.5rem;
}

.select-dropdown:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Button styles - scoped to view modal */
.place-view-modal-wrapper .btn-text {
  background: rgba(255, 255, 255, 0.05) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  border-radius: 0.5rem !important;
  color: rgba(255, 255, 255, 0.8) !important;
  font-size: 0.875rem !important;
  font-weight: 500 !important;
  cursor: pointer;
  padding: 0.625rem 1.25rem !important;
  transition: all 0.2s ease;
  min-width: 90px !important;
  width: auto !important;
  flex: 0 0 auto !important;
}

.place-view-modal-wrapper .btn-text:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
  color: rgba(255, 255, 255, 1);
}

.place-view-modal-wrapper .btn-text.btn-primary {
  background: rgba(0, 255, 136, 0.2);
  border-color: rgba(0, 255, 136, 0.4);
  color: rgba(255, 255, 255, 1);
}

.place-view-modal-wrapper .btn-text.btn-primary:hover {
  background: rgba(0, 255, 136, 0.3);
  border-color: rgba(0, 255, 136, 0.5);
}

.place-view-modal-wrapper .btn-text.btn-danger {
  background: rgba(255, 100, 100, 0.1);
  border-color: rgba(255, 100, 100, 0.3);
  color: rgba(255, 150, 150, 1);
}

.place-view-modal-wrapper .btn-text.btn-danger:hover {
  background: rgba(255, 100, 100, 0.2);
  border-color: rgba(255, 100, 100, 0.4);
}

.place-view-modal-wrapper .btn-text:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ============ RESPONSIVE ============ */

/* Small phones (iPhone SE, etc) */
@media (max-height: 700px) {
  .place-view-modal-overlay {
    padding-top: max(0.5rem, env(safe-area-inset-top));
  }

  .place-card {
    /* Smaller screens need more aggressive height limit */
    max-height: calc(100dvh - max(0.5rem, env(safe-area-inset-top)) - 0.75rem - 40px - 0.75rem - 45px - max(0.75rem, env(safe-area-inset-bottom)));
    max-height: calc(100vh - 140px);
  }

  .place-cover-emoji-wrapper {
    bottom: -20px;
  }

  .place-cover-emoji {
    width: 40px;
    height: 40px;
    font-size: 1.25rem;
  }

  .place-card-fields {
    padding: 1.5rem 0.75rem 0.5rem;
  }

  .place-view-modal-wrapper .modal-actions-below {
    bottom: calc(max(0.75rem, env(safe-area-inset-bottom)) + 45px + 0.75rem);
    gap: 0.5rem;
  }

  .place-view-modal-wrapper .modal-back-btn {
    width: 45px;
    height: 45px;
    font-size: 1.125rem;
    bottom: max(0.75rem, env(safe-area-inset-bottom));
  }

  .place-view-modal-wrapper .btn-text {
    min-width: 80px !important;
    padding: 0.5rem 1rem !important;
    font-size: 0.8125rem !important;
  }
}

/* Very small phones */
@media (max-height: 600px) {
  .place-card {
    max-height: calc(100dvh - max(0.5rem, env(safe-area-inset-top)) - 0.5rem - 36px - 0.5rem - 40px - max(0.5rem, env(safe-area-inset-bottom)));
    max-height: calc(100vh - 120px);
  }

  .place-cover-emoji-wrapper {
    bottom: -18px;
  }

  .place-cover-emoji {
    width: 36px;
    height: 36px;
    font-size: 1.125rem;
  }

  .place-card-fields {
    padding: 1.25rem 0.5rem 0.5rem;
  }

  .place-view-modal-wrapper .modal-actions-below {
    bottom: calc(max(0.5rem, env(safe-area-inset-bottom)) + 40px + 0.5rem);
    gap: 0.5rem;
  }

  .place-view-modal-wrapper .modal-back-btn {
    width: 40px;
    height: 40px;
    font-size: 1rem;
    bottom: max(0.5rem, env(safe-area-inset-bottom));
  }

  .place-view-modal-wrapper .btn-text {
    min-width: 70px !important;
    padding: 0.4rem 0.75rem !important;
    font-size: 0.75rem !important;
  }
}

/* Tablets and larger */
@media (min-height: 800px) {
  .place-view-modal-overlay {
    padding-top: max(2rem, env(safe-area-inset-top));
  }

  .place-card {
    max-height: calc(100dvh - max(2rem, env(safe-area-inset-top)) - 1.5rem - 44px - 1.5rem - 50px - max(1.5rem, env(safe-area-inset-bottom)));
    max-height: calc(100vh - 200px);
  }

  .place-view-modal-wrapper .modal-actions-below {
    bottom: calc(max(1.5rem, env(safe-area-inset-bottom)) + 50px + 1.5rem);
    gap: 1rem;
  }

  .place-view-modal-wrapper .modal-back-btn {
    bottom: max(1.5rem, env(safe-area-inset-bottom));
  }
}
/* Full screen modal overlay */
.place-creation-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 50, 25, 0.5);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  overflow: hidden;
  padding: 2rem;
  box-sizing: border-box;
}

/* Modal wrapper */
.place-creation-modal-wrapper,
.modal-content.place-creation-modal-wrapper {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  max-width: 400px;
  height: 100%;
  max-height: 100%;
  background: none;
  border: none;
  overflow-x: hidden;
  overflow-y: visible;
  box-sizing: border-box;
  justify-content: center;
}

/* Close button */
.place-creation-modal-wrapper .modal-close {
  position: absolute;
  top: -2.5rem;
  right: 0;
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.7);
  font-size: 2rem;
  cursor: pointer;
  padding: 0;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s ease, background 0.2s ease;
  border-radius: 50%;
  z-index: 10;
}

.place-creation-modal-wrapper .modal-close:hover {
  color: rgba(255, 255, 255, 1);
  background: rgba(255, 255, 255, 0.1);
}

/* 9:16 Card */
.place-card {
  width: 100%;
  aspect-ratio: 9 / 16;
  max-width: 400px;
  height: auto;
  max-height: calc(100% - 100px);
  min-height: 0;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(0, 255, 136, 0.2);
  border-radius: 1rem;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  overflow-y: visible;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  box-sizing: border-box;
  flex-shrink: 1;
  flex-grow: 0;
}

/* Image Cover - 50% height */
.place-card-cover {
  position: relative;
  width: 100%;
  height: 50%;
  min-height: 0;
  overflow: visible;
  cursor: pointer;
  background: rgba(0, 0, 0, 0.2);
}

.place-cover-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  top: 0;
  left: 0;
  display: block;
}

.place-cover-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.875rem;
  background: rgba(128, 128, 128, 0.5);
  position: absolute;
  top: 0;
  left: 0;
}

/* Overlapping Emoji at bottom center of cover */
.place-cover-emoji-wrapper {
  position: absolute;
  bottom: -40px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  pointer-events: auto;
}

.place-cover-emoji {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 3px solid rgba(0, 255, 136, 0.3);
  font-size: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
  padding: 0;
  border: none;
  transform: translateX(0);
}

.place-cover-emoji:hover {
  transform: scale(1.1);
  border-color: rgba(0, 255, 136, 0.5);
  box-shadow: 0 6px 24px rgba(0, 255, 136, 0.3);
}

/* Fields Section - 50% height, allow scroll if overflow */
.place-card-fields {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 3.5rem 1.5rem 0.5rem;
  align-items: stretch;
  min-height: 0;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: thin;
  scrollbar-color: rgba(0, 255, 136, 0.3) rgba(0, 0, 0, 0.2);
}

.place-card-fields::-webkit-scrollbar {
  width: 8px;
}

.place-card-fields::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 4px;
}

.place-card-fields::-webkit-scrollbar-thumb {
  background: rgba(0, 255, 136, 0.3);
  border-radius: 4px;
  transition: background 0.2s ease;
}

.place-card-fields::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 255, 136, 0.5);
}

/* Actions below card */
.modal-actions-below {
  display: flex;
  gap: 1rem;
  justify-content: center;
  width: 100%;
  max-width: 400px;
  flex-shrink: 0;
}

/* Edit Form Styles */
.place-edit-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  width: 100%;
  align-items: center;
  justify-content: flex-start;
}

.place-edit-form .form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  width: 100%;
  align-items: center;
}


.title-input-large {
  font-size: 1.25rem;
  font-weight: 500;
  padding: 0.75rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 0.5rem;
  color: rgba(255, 255, 255, 0.9);
  font-family: inherit;
  box-sizing: border-box;
  text-align: center;
  transition: border-color 0.2s ease, background 0.2s ease;
  width: 100%;
}

/* Prevent iOS Safari zoom on focus - minimum 16px */
@media screen and (max-width: 768px) {
  .title-input-large {
    font-size: 16px;
  }
}

.title-input-large.inline-edit {
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(30, 30, 30, 0.6);
  cursor: text;
}

.title-input-large.inline-edit:hover {
  background: rgba(40, 40, 40, 0.7);
  border-color: rgba(255, 255, 255, 0.15);
}

.title-input-large.inline-edit:focus {
  outline: none;
  border-color: rgba(0, 255, 136, 0.3);
  background: rgba(50, 50, 50, 0.8);
}

.title-input-large::placeholder {
  color: rgba(255, 255, 255, 0.5);
}

/* Description Textarea - Elastic Height */
.description-textarea {
  font-size: 1rem;
  line-height: 1.6;
  padding: 0.875rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 0.5rem;
  color: rgba(255, 255, 255, 0.9);
  font-family: inherit;
  box-sizing: border-box;
  resize: none;
  overflow: hidden;
  text-align: center;
  transition: border-color 0.2s ease, background 0.2s ease;
  width: 100%;
  min-height: 3.5rem;
  max-height: 12rem;
  word-wrap: break-word;
  white-space: pre-wrap;
}

/* Prevent iOS Safari zoom on focus - minimum 16px */
@media screen and (max-width: 768px) {
  .description-textarea {
    font-size: 16px;
    padding: 0.75rem;
    min-height: 3rem;
    max-height: 10rem;
  }
}

.description-textarea.inline-edit {
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(30, 30, 30, 0.6);
  cursor: text;
  text-align: center;
}

.place-edit-form .form-group:last-child .description-textarea.inline-edit {
  margin-bottom: 20px;
}

.description-textarea.inline-edit:hover {
  background: rgba(40, 40, 40, 0.7);
  border-color: rgba(255, 255, 255, 0.15);
}

.description-textarea.inline-edit:focus {
  outline: none;
  border-color: rgba(0, 255, 136, 0.3);
  background: rgba(50, 50, 50, 0.8);
}

.description-textarea::placeholder {
  color: rgba(255, 255, 255, 0.5);
  text-align: center;
}

.btn-text {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 0.5rem;
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.9375rem;
  font-weight: 500;
  cursor: pointer;
  padding: 0.75rem 1.5rem;
  transition: all 0.2s ease;
  min-width: 100px;
}

.btn-text:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
  color: rgba(255, 255, 255, 1);
}

.btn-text.btn-primary {
  background: rgba(0, 255, 136, 0.2);
  border-color: rgba(0, 255, 136, 0.4);
  color: rgba(255, 255, 255, 1);
}

.btn-text.btn-primary:hover {
  background: rgba(0, 255, 136, 0.3);
  border-color: rgba(0, 255, 136, 0.5);
}

.btn-text.btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Responsive */
@media (max-width: 768px) {
  .place-creation-modal-overlay {
    padding: 1rem;
  }

  .place-creation-modal-wrapper {
    max-width: 100%;
    height: 100%;
    max-height: 100%;
    gap: 0.75rem;
    justify-content: center;
  }

  .place-card {
    max-height: calc(100% - 100px);
  }

  .place-card-fields {
    padding: 3rem 1rem 0.5rem;
  }

  .place-cover-emoji {
    width: 70px;
    height: 70px;
    font-size: 2rem;
  }

  .modal-actions-below {
    gap: 0.75rem;
  }
}

@media (max-width: 480px) {
  .place-creation-modal-overlay {
    padding: 0.5rem;
  }

  .place-creation-modal-wrapper {
    gap: 0.75rem;
    justify-content: center;
  }

  .place-card {
    max-height: calc(100% - 90px);
  }

  .place-card-fields {
    padding: 3rem 0.75rem 0.5rem;
  }

  .place-cover-emoji {
    width: 60px;
    height: 60px;
    font-size: 1.75rem;
  }

  .modal-actions-below {
    flex-direction: column;
    gap: 0.75rem;
  }

  .btn-text {
    width: 100%;
  }
}

/* Simple emoji picker container - just centering */
.emoji-picker-container {
  position: fixed;
  z-index: 2001;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 420px;
  max-width: calc(100vw - 40px);
  height: calc(100vh - 80px);
  max-height: 600px;
  pointer-events: auto;
}

/* Hide the separate search wrapper */
.emoji-picker-container .emoji-picker-search-wrapper {
  display: none;
}

/* Close button at bottom */
.emoji-picker-close-btn {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  width: 100%;
  padding: 1rem;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(10px);
  border: none;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.9375rem;
  font-weight: 500;
  cursor: pointer;
  text-align: center;
  z-index: 10;
  flex-shrink: 0;
  transition: background 0.2s ease, color 0.2s ease;
}

.emoji-picker-close-btn:hover {
  background: rgba(0, 0, 0, 0.5);
  color: rgba(255, 255, 255, 1);
}
.map-editor-view {
  width: 100%;
  min-height: 100vh;
  background: #0a0a0a;
  color: #ffffff;
  display: flex;
  flex-direction: column;
  position: relative;
  padding-top: calc(var(--admin-nav-height, 72px) + var(--admin-nav-spacing, 20px) + 1rem);
  box-sizing: border-box;
}

/* Responsive spacing for AdminNav */
@media (max-width: 768px) {
  .map-editor-view {
    padding-top: calc(var(--admin-nav-height, 70px) + var(--admin-nav-spacing, 16px) + 0.75rem);
  }
}

@media (max-width: 480px) {
  .map-editor-view {
    padding-top: calc(var(--admin-nav-height, 60px) + var(--admin-nav-spacing, 12px) + 0.75rem);
  }
}

.map-editor-loading,
.map-editor-error {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  gap: 1rem;
}

.map-editor-error button {
  padding: 0.75rem 1.5rem;
  background: #00ff88;
  border: none;
  border-radius: 8px;
  color: #000000;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.map-editor-error button:hover {
  background: #00dd77;
}

.map-editor-nav-wrapper {
  width: 100%;
  background: rgba(10, 10, 10, 0.95);
  backdrop-filter: blur(8px);
  padding: 0 2rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.map-editor-nav-wrapper .admin-nav {
  margin-bottom: 0;
  padding: 0.75rem 0;
  border-bottom: none;
}

.map-editor-toolbar {
  padding: 1rem 2rem;
  background: rgba(10, 10, 10, 0.9);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  width: 100%;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.map-editor-toolbar h2 {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 600;
  color: #00ff88;
}

.toolbar-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  align-items: center;
}

.status-selector {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.status-selector label {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.7);
  font-weight: 500;
}

.status-selector select {
  padding: 0.5rem 1rem;
  font-size: 0.9rem;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  cursor: pointer;
  transition: all 0.2s ease;
}

.status-selector select:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(0, 255, 136, 0.3);
}

.status-selector select:focus {
  outline: none;
  border-color: #00ff88;
  background: rgba(255, 255, 255, 0.15);
}

.status-selector select option {
  background: #1a1a1a;
  color: #ffffff;
}

.toolbar-actions button {
  padding: 0.5rem 1rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  color: #ffffff;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.toolbar-actions button:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: #00ff88;
}

.map-editor-canvas-wrapper {
  position: fixed;
  top: 120px;
  left: 0;
  right: 0;
  bottom: 80px;
  width: 100vw;
  height: calc(100vh - 200px);
  overflow: hidden;
  z-index: 1;
}

.map-editor-canvas {
  width: 100%;
  height: 100%;
  display: block;
  outline: none;
  touch-action: none;
}

.scene-loading-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(10, 10, 10, 0.95);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #00ff88;
  font-size: 1.2rem;
  z-index: 10;
}

.place-selector-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
}

.place-selector-content {
  background: #1a1a1a;
  border: 1px solid #333;
  border-radius: 12px;
  padding: 2rem;
  width: 100%;
  max-width: 800px;
  max-height: 80vh;
  overflow-y: auto;
}

.place-selector-content h3 {
  margin: 0 0 1.5rem 0;
  font-size: 1.5rem;
  font-weight: 600;
  color: #00ff88;
}

.places-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.places-list button {
  padding: 0.75rem 1rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  color: #ffffff;
  font-size: 1rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.places-list button:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: #00ff88;
}

.place-selector-content > button:last-child {
  width: 100%;
  padding: 0.75rem 1.5rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  color: #ffffff;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.place-selector-content > button:last-child:hover {
  background: rgba(255, 255, 255, 0.1);
}

.map-editor-footer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  width: 100%;
  height: 80px;
  background: rgba(10, 10, 10, 0.95);
  backdrop-filter: blur(8px);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: 1rem 2rem;
  z-index: 100;
  box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.3);
}

.add-slot-btn {
  padding: 0.75rem 2rem;
  background: #00ff88;
  border: none;
  border-radius: 8px;
  color: #000000;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.add-slot-btn:hover {
  background: #00dd77;
}

.add-slot-btn.active {
  background: #ff44ff;
  color: #ffffff;
  animation: pulse 2s infinite;
}

.add-slot-btn.active:hover {
  background: #dd33dd;
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.8;
  }
}

.cancel-slot-btn {
  padding: 0.75rem 1.5rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  color: #ffffff;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.cancel-slot-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 68, 68, 0.3);
}

/* Responsive */
@media (max-width: 768px) {
  .map-editor-toolbar {
    padding: 1rem;
  }

  .map-editor-toolbar h2 {
    font-size: 1.25rem;
  }

  .toolbar-actions {
    width: 100%;
  }

  .toolbar-actions button {
    flex: 1;
  }

  .map-editor-footer {
    height: 70px;
    padding: 0.75rem 1rem;
    flex-direction: column;
    gap: 0.5rem;
  }

  .map-editor-canvas-wrapper {
    bottom: 70px;
    height: calc(100vh - 70px);
  }

  .add-slot-btn,
  .cancel-slot-btn {
    width: 100%;
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
  }
}
.place-editor-view {
  width: 100%;
  min-height: 100vh;
  background: #0a0a0a;
  color: #ffffff;
  display: flex;
  flex-direction: column;
  padding-top: calc(var(--admin-nav-height, 72px) + var(--admin-nav-spacing, 20px) + 2rem);
  box-sizing: border-box;
}

/* Responsive spacing for AdminNav */
@media (max-width: 768px) {
  .place-editor-view {
    padding-top: calc(var(--admin-nav-height, 70px) + var(--admin-nav-spacing, 16px) + 1rem);
  }
}

@media (max-width: 480px) {
  .place-editor-view {
    padding-top: calc(var(--admin-nav-height, 60px) + var(--admin-nav-spacing, 12px) + 1rem);
  }
}

.place-editor-loading,
.place-editor-error {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  gap: 1rem;
}

.place-editor-error button {
  padding: 0.75rem 1.5rem;
  background: #00ff88;
  border: none;
  border-radius: 8px;
  color: #000000;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.place-editor-error button:hover {
  background: #00dd77;
}

.place-editor-content {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.place-editor-form {
  width: 100%;
  max-width: 600px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 2rem;
}

.place-editor-form h1 {
  font-size: 2rem;
  font-weight: 700;
  margin: 0 0 2rem 0;
  color: #00ff88;
}

.error-message {
  padding: 1rem;
  background: rgba(255, 68, 68, 0.1);
  border: 1px solid rgba(255, 68, 68, 0.3);
  border-radius: 8px;
  color: #ff4444;
  margin-bottom: 1.5rem;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 0.5rem;
}

.emoji-picker-wrapper {
  position: relative;
  display: inline-block;
}

.emoji-picker-trigger-large {
  width: 80px;
  height: 80px;
  font-size: 2.5rem;
  background: rgba(255, 255, 255, 0.05);
  border: 2px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.emoji-picker-trigger-large:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(0, 255, 136, 0.3);
}

.emoji-picker-container {
  position: fixed;
  z-index: 1000;
  background: #1a1a1a;
  border: 1px solid #333;
  border-radius: 12px;
  padding: 1rem;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
  width: 400px;
  max-width: calc(100vw - 40px);
  max-height: calc(100vh - 40px);
  pointer-events: auto;
}

.title-input,
.description-input {
  width: 100%;
  padding: 0.75rem;
  font-size: 1rem;
  background: #0a0a0a;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  color: #ffffff;
  outline: none;
  box-sizing: border-box;
  font-family: inherit;
}

.title-input:focus,
.description-input:focus {
  border-color: #00ff88;
}

.description-input {
  resize: vertical;
  min-height: 100px;
}

.file-upload-section {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.file-input {
  display: none;
}

.file-upload-btn {
  padding: 0.75rem 1.5rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  color: #ffffff;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  align-self: flex-start;
}

.file-upload-btn:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.1);
  border-color: #00ff88;
}

.file-upload-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.upload-progress {
  width: 100%;
  height: 4px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 2px;
  overflow: hidden;
}

.upload-progress-bar {
  height: 100%;
  background: #00ff88;
  transition: width 0.3s ease;
}

.asset-url-display {
  padding: 0.75rem;
  background: rgba(0, 255, 136, 0.1);
  border: 1px solid rgba(0, 255, 136, 0.3);
  border-radius: 8px;
}

.asset-url-display p {
  margin: 0;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.8);
}

.asset-url-display a {
  color: #00ff88;
  text-decoration: none;
}

.asset-url-display a:hover {
  text-decoration: underline;
}

.form-actions {
  display: flex;
  gap: 1rem;
  justify-content: flex-end;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-cancel,
.btn-save {
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-cancel {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #ffffff;
}

.btn-cancel:hover {
  background: rgba(255, 255, 255, 0.1);
}

.btn-save {
  background: #00ff88;
  border: none;
  color: #000000;
}

.btn-save:hover:not(:disabled) {
  background: #00dd77;
}

.btn-save:disabled {
  background: rgba(0, 255, 136, 0.3);
  color: rgba(0, 0, 0, 0.5);
  cursor: not-allowed;
}

/* Responsive */
@media (max-width: 768px) {
  .place-editor-content {
    padding: 1rem;
  }

  .place-editor-form {
    padding: 1.5rem;
  }

  .place-editor-form h1 {
    font-size: 1.5rem;
  }
}
.creature-editor-view {
  width: 100%;
  min-height: 100vh;
  background: #0a0a0a;
  color: #ffffff;
  display: flex;
  flex-direction: column;
  padding-top: calc(var(--admin-nav-height, 72px) + var(--admin-nav-spacing, 20px) + 2rem);
  box-sizing: border-box;
}

/* Responsive spacing for AdminNav */
@media (max-width: 768px) {
  .creature-editor-view {
    padding-top: calc(var(--admin-nav-height, 70px) + var(--admin-nav-spacing, 16px) + 1rem);
  }
}

@media (max-width: 480px) {
  .creature-editor-view {
    padding-top: calc(var(--admin-nav-height, 60px) + var(--admin-nav-spacing, 12px) + 1rem);
  }
}

.creature-editor-loading,
.creature-editor-error {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  gap: 1rem;
}

.creature-editor-error button {
  padding: 0.75rem 1.5rem;
  background: #00ff88;
  border: none;
  border-radius: 8px;
  color: #000000;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.creature-editor-error button:hover {
  background: #00dd77;
}

.creature-editor-content {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.creature-editor-form {
  width: 100%;
  max-width: 600px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 2rem;
}

.creature-editor-form h1 {
  font-size: 2rem;
  font-weight: 700;
  margin: 0 0 2rem 0;
  color: #00ff88;
}

.error-message {
  padding: 1rem;
  background: rgba(255, 68, 68, 0.1);
  border: 1px solid rgba(255, 68, 68, 0.3);
  border-radius: 8px;
  color: #ff4444;
  margin-bottom: 1.5rem;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 0.5rem;
}

.emoji-picker-wrapper {
  position: relative;
  display: inline-block;
}

.emoji-picker-trigger-large {
  width: 80px;
  height: 80px;
  font-size: 2.5rem;
  background: rgba(255, 255, 255, 0.05);
  border: 2px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.emoji-picker-trigger-large:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(0, 255, 136, 0.3);
}

.emoji-picker-container {
  position: fixed;
  z-index: 1000;
  background: #1a1a1a;
  border: 1px solid #333;
  border-radius: 12px;
  padding: 1rem;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
  width: 400px;
  max-width: calc(100vw - 40px);
  max-height: calc(100vh - 40px);
  pointer-events: auto;
}

.title-input,
.description-input {
  width: 100%;
  padding: 0.75rem;
  font-size: 1rem;
  background: #0a0a0a;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  color: #ffffff;
  outline: none;
  box-sizing: border-box;
  font-family: inherit;
}

.title-input:focus,
.description-input:focus {
  border-color: #00ff88;
}

.description-input {
  resize: vertical;
  min-height: 100px;
}

.media-loading {
  padding: 0.75rem;
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.9rem;
}

.file-upload-section {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.file-input {
  display: none;
}

.file-upload-btn {
  padding: 0.75rem 1.5rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  color: #ffffff;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  align-self: flex-start;
}

.file-upload-btn:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.1);
  border-color: #00ff88;
}

.file-upload-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.upload-progress {
  width: 100%;
  height: 4px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 2px;
  overflow: hidden;
}

.upload-progress-bar {
  height: 100%;
  background: #00ff88;
  transition: width 0.3s ease;
}

.asset-url-display {
  padding: 0.75rem;
  background: rgba(0, 255, 136, 0.1);
  border: 1px solid rgba(0, 255, 136, 0.3);
  border-radius: 8px;
}

.asset-url-display p {
  margin: 0;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.8);
}

.asset-url-display a {
  color: #00ff88;
  text-decoration: none;
}

.asset-url-display a:hover {
  text-decoration: underline;
}

.form-actions {
  display: flex;
  gap: 1rem;
  justify-content: flex-end;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-cancel,
.btn-save {
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-cancel {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #ffffff;
}

.btn-cancel:hover {
  background: rgba(255, 255, 255, 0.1);
}

.btn-save {
  background: #00ff88;
  border: none;
  color: #000000;
}

.btn-save:hover:not(:disabled) {
  background: #00dd77;
}

.btn-save:disabled {
  background: rgba(0, 255, 136, 0.3);
  color: rgba(0, 0, 0, 0.5);
  cursor: not-allowed;
}

/* Responsive */
@media (max-width: 768px) {
  .creature-editor-content {
    padding: 1rem;
  }

  .creature-editor-form {
    padding: 1.5rem;
  }

  .creature-editor-form h1 {
    font-size: 1.5rem;
  }
}
.character-editor-view {
  width: 100%;
  min-height: 100vh;
  background: #0a0a0a;
  color: #ffffff;
  display: flex;
  flex-direction: column;
  padding-top: calc(var(--admin-nav-height, 72px) + var(--admin-nav-spacing, 20px) + 2rem);
  box-sizing: border-box;
}

/* Responsive spacing for AdminNav */
@media (max-width: 768px) {
  .character-editor-view {
    padding-top: calc(var(--admin-nav-height, 70px) + var(--admin-nav-spacing, 16px) + 1rem);
  }
}

@media (max-width: 480px) {
  .character-editor-view {
    padding-top: calc(var(--admin-nav-height, 60px) + var(--admin-nav-spacing, 12px) + 1rem);
  }
}

.character-editor-loading,
.character-editor-error {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  gap: 1rem;
}

.character-editor-error button {
  padding: 0.75rem 1.5rem;
  background: #00ff88;
  border: none;
  border-radius: 8px;
  color: #000000;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.character-editor-error button:hover {
  background: #00dd77;
}

.character-editor-content {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.character-editor-form {
  width: 100%;
  max-width: 600px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 2rem;
}

.character-editor-form h1 {
  font-size: 2rem;
  font-weight: 700;
  margin: 0 0 2rem 0;
  color: #00ff88;
}

.error-message {
  padding: 1rem;
  background: rgba(255, 68, 68, 0.1);
  border: 1px solid rgba(255, 68, 68, 0.3);
  border-radius: 8px;
  color: #ff4444;
  margin-bottom: 1.5rem;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 0.5rem;
}

.emoji-picker-wrapper {
  position: relative;
  display: inline-block;
}

.emoji-picker-trigger-large {
  width: 80px;
  height: 80px;
  font-size: 2.5rem;
  background: rgba(255, 255, 255, 0.05);
  border: 2px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.emoji-picker-trigger-large:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(0, 255, 136, 0.3);
}

.emoji-picker-container {
  position: fixed;
  z-index: 1000;
  background: #1a1a1a;
  border: 1px solid #333;
  border-radius: 12px;
  padding: 1rem;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
  width: 400px;
  max-width: calc(100vw - 40px);
  max-height: calc(100vh - 40px);
  pointer-events: auto;
}

.title-input,
.description-input {
  width: 100%;
  padding: 0.75rem;
  font-size: 1rem;
  background: #0a0a0a;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  color: #ffffff;
  outline: none;
  box-sizing: border-box;
  font-family: inherit;
}

.title-input:focus,
.description-input:focus {
  border-color: #00ff88;
}

.description-input {
  resize: vertical;
  min-height: 100px;
}

.media-loading {
  padding: 0.75rem;
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.9rem;
}

.file-upload-section {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.file-input {
  display: none;
}

.file-upload-btn {
  padding: 0.75rem 1.5rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  color: #ffffff;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  align-self: flex-start;
}

.file-upload-btn:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.1);
  border-color: #00ff88;
}

.file-upload-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.upload-progress {
  width: 100%;
  height: 4px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 2px;
  overflow: hidden;
}

.upload-progress-bar {
  height: 100%;
  background: #00ff88;
  transition: width 0.3s ease;
}

.asset-url-display {
  padding: 0.75rem;
  background: rgba(0, 255, 136, 0.1);
  border: 1px solid rgba(0, 255, 136, 0.3);
  border-radius: 8px;
}

.asset-url-display p {
  margin: 0;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.8);
}

.asset-url-display a {
  color: #00ff88;
  text-decoration: none;
}

.asset-url-display a:hover {
  text-decoration: underline;
}

.form-actions {
  display: flex;
  gap: 1rem;
  justify-content: flex-end;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-cancel,
.btn-save {
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-cancel {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #ffffff;
}

.btn-cancel:hover {
  background: rgba(255, 255, 255, 0.1);
}

.btn-save {
  background: #00ff88;
  border: none;
  color: #000000;
}

.btn-save:hover:not(:disabled) {
  background: #00dd77;
}

.btn-save:disabled {
  background: rgba(0, 255, 136, 0.3);
  color: rgba(0, 0, 0, 0.5);
  cursor: not-allowed;
}

/* Responsive */
@media (max-width: 768px) {
  .character-editor-content {
    padding: 1rem;
  }

  .character-editor-form {
    padding: 1.5rem;
  }

  .character-editor-form h1 {
    font-size: 1.5rem;
  }
}
.game-edit-view {
  width: 100%;
  min-height: 100vh;
  background: #0a0a0a;
  color: #ffffff;
  display: flex;
  flex-direction: column;
  padding-top: calc(var(--admin-nav-height, 72px) + var(--admin-nav-spacing, 20px) + 2rem);
  box-sizing: border-box;
}

.game-edit-content {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem;
  box-sizing: border-box;
}

/* Responsive spacing for AdminNav */
@media (max-width: 768px) {
  .game-edit-view {
    padding-top: calc(var(--admin-nav-height, 70px) + var(--admin-nav-spacing, 16px) + 1rem);
  }

  .game-edit-content {
    padding: 1rem;
  }
}

@media (max-width: 480px) {
  .game-edit-view {
    padding-top: calc(var(--admin-nav-height, 60px) + var(--admin-nav-spacing, 12px) + 1rem);
  }
}

.game-edit-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  flex-wrap: wrap;
  gap: 1rem;
}

.game-edit-title {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.game-edit-title .game-emoji {
  font-size: 2.5rem;
  line-height: 1;
}

.game-edit-title h1 {
  font-size: 2.5rem;
  font-weight: 700;
  margin: 0;
  color: #00ff88;
}

.game-edit-actions {
  display: flex;
  gap: 1rem;
}

.game-edit-btn {
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.game-edit-btn-build {
  background: rgba(0, 255, 136, 0.1);
  color: #00ff88;
  border: 1px solid rgba(0, 255, 136, 0.3);
}

.game-edit-btn-build:hover {
  background: rgba(0, 255, 136, 0.2);
  border-color: rgba(0, 255, 136, 0.5);
}

.game-edit-btn-cancel {
  background: rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.game-edit-btn-cancel:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
}

.game-edit-btn-save {
  background: #00ff88;
  color: #000000;
}

.game-edit-btn-save:hover:not(:disabled) {
  background: #00dd77;
}

.game-edit-btn-save:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.game-edit-save-status {
  display: flex;
  align-items: center;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 500;
}

.game-edit-save-status.saving {
  color: #ffa500;
  background: rgba(255, 165, 0, 0.1);
  border: 1px solid rgba(255, 165, 0, 0.3);
}

.game-edit-save-status.saved {
  color: #00ff88;
  background: rgba(0, 255, 136, 0.1);
  border: 1px solid rgba(0, 255, 136, 0.3);
}

.game-edit-save-status.pending {
  color: rgba(255, 255, 255, 0.6);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.game-edit-sections {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
}

.game-edit-column {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.game-edit-section {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 1.5rem;
}

.game-edit-section h2 {
  font-size: 1.5rem;
  font-weight: 600;
  margin: 0 0 1rem 0;
  color: #00ff88;
}

.game-edit-items {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.game-edit-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.game-edit-item:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.1);
}

.game-edit-item input[type="checkbox"] {
  width: 20px;
  height: 20px;
  cursor: pointer;
  accent-color: #00ff88;
}

.game-edit-item span {
  flex: 1;
  color: rgba(255, 255, 255, 0.8);
  font-size: 1rem;
}

.game-edit-item .item-emoji {
  margin-right: 0.5rem;
  font-size: 1.2rem;
}

.game-edit-empty {
  color: rgba(255, 255, 255, 0.4);
  font-style: italic;
  margin: 0;
  padding: 1rem;
  text-align: center;
}

.game-edit-loading,
.game-edit-error {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem;
  text-align: center;
  color: rgba(255, 255, 255, 0.6);
}

.game-edit-error {
  color: #ff4444;
}

/* Responsive */
@media (max-width: 768px) {
  .game-edit-content {
    padding: 1rem;
  }

  .game-edit-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .game-edit-title h1 {
    font-size: 2rem;
  }

  .game-edit-actions {
    width: 100%;
  }

  .game-edit-btn {
    flex: 1;
  }

  .game-edit-sections {
    grid-template-columns: 1fr;
  }
}
.game-building-view {
  width: 100%;
  min-height: 100vh;
  background: #0a0a0a;
  color: #ffffff;
  display: flex;
  flex-direction: column;
  position: relative;
  box-sizing: border-box;
}

/* Success notice: small bar from top, hides after 3s or on click */
.game-building-success-notice {
  position: fixed;
  top: 0;
  left: 50%;
  transform: translateX(-50%) translateY(0);
  z-index: 2000;
  padding: 0.6rem 1.25rem;
  background: #0d7a4a;
  color: #fff;
  font-size: 0.9rem;
  font-weight: 500;
  border-radius: 0 0 8px 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  cursor: pointer;
  user-select: none;
  animation: game-building-success-notice-in 0.25s ease-out;
  white-space: nowrap;
  max-width: 90vw;
  overflow: hidden;
  text-overflow: ellipsis;
}
.game-building-success-notice:hover {
  background: #0e8b54;
}
@keyframes game-building-success-notice-in {
  from {
    transform: translateX(-50%) translateY(-100%);
    opacity: 0;
  }
  to {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
  }
}

.game-building-loading,
.game-building-error {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  gap: 1rem;
}

.game-building-error button {
  padding: 0.75rem 1.5rem;
  background: #00ff88;
  border: none;
  border-radius: 8px;
  color: #000000;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.game-building-error button:hover {
  background: #00dd77;
}

.game-building-nav-wrapper {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  background: rgba(10, 10, 10, 0.95);
  backdrop-filter: blur(8px);
  padding: 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  z-index: 1000;
  box-sizing: border-box;
  overflow-x: hidden;
  overflow-y: visible;
}

.game-building-nav-wrapper .admin-nav {
  position: relative !important;
  margin-bottom: 0;
  padding: 0.75rem 0;
  border-bottom: none;
  top: auto !important;
  left: auto !important;
  right: auto !important;
  width: 100% !important;
}

.game-building-toolbar {
  position: fixed;
  top: var(--admin-nav-height, 72px);
  left: 0;
  right: 0;
  padding: 1rem 2rem;
  background: rgba(10, 10, 10, 0.9);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  width: 100%;
  max-width: 100vw;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  z-index: 999;
  box-sizing: border-box;
  overflow-x: hidden;
}

.toolbar-title-section {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex: 1;
}

.game-building-toolbar h2 {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 600;
  color: #00ff88;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.game-title-editable {
  cursor: pointer;
  transition: all 0.2s ease;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  margin: -0.25rem -0.5rem;
}

.game-title-editable:hover {
  background: rgba(0, 255, 136, 0.1);
  color: #00ff88;
}

.game-building-autosave-icon {
  display: inline-flex;
  align-items: center;
  margin-left: 0.35rem;
  vertical-align: middle;
}

.game-building-autosave-icon .material-icons {
  font-size: 1.15rem;
}

.game-building-autosave-icon .autosave-check {
  color: #00ff88;
}

.game-building-autosave-icon .autosave-error {
  color: #f87171;
}

.game-building-autosave-icon .autosave-idle {
  color: rgba(255, 255, 255, 0.4);
}

.game-building-autosave-icon .autosave-spin {
  color: #ffa500;
  animation: game-building-autosave-spin 1s linear infinite;
}

@keyframes game-building-autosave-spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.game-title-input {
  font-size: 1.5rem;
  font-weight: 600;
  color: #00ff88;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(0, 255, 136, 0.3);
  border-radius: 4px;
  padding: 0.25rem 0.5rem;
  outline: none;
  font-family: inherit;
  min-width: 200px;
}

.game-title-input:focus {
  border-color: #00ff88;
  background: rgba(255, 255, 255, 0.15);
}

.autosave-notice {
  font-size: 0.85rem;
  font-weight: 500;
  white-space: nowrap;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  opacity: 0.7;
}

.autosave-notice.saving {
  color: #ffa500;
}

.autosave-notice.saved {
  color: #00ff88;
}

.autosave-notice.error {
  color: #ff4444;
}

.autosave-icon {
  font-size: 0.9rem;
  line-height: 1;
}

.toolbar-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  align-items: center;
}

.status-selector {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.status-selector label {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.7);
  font-weight: 500;
}

.status-selector select {
  padding: 0.5rem 1rem;
  font-size: 0.9rem;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  cursor: pointer;
  transition: all 0.2s ease;
}

.status-selector select:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(0, 255, 136, 0.3);
}

.status-selector select:focus {
  outline: none;
  border-color: #00ff88;
  background: rgba(255, 255, 255, 0.15);
}

.status-selector select option {
  background: #1a1a1a;
  color: #ffffff;
}

.toolbar-actions button {
  padding: 0.5rem 1rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  color: #ffffff;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.toolbar-actions button:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: #00ff88;
}

.toolbar-actions .play-btn {
  background: rgba(255, 68, 255, 0.2);
  border-color: #ff44ff;
  color: #ff44ff;
}

.toolbar-actions .play-btn:hover {
  background: rgba(255, 68, 255, 0.3);
}

.toolbar-actions .game-building-restart-btn {
  background: rgba(255, 170, 0, 0.2);
  border-color: #ffaa00;
  color: #ffaa00;
}

.toolbar-actions .game-building-restart-btn:hover {
  background: rgba(255, 170, 0, 0.3);
}

.toolbar-actions .game-building-recenter-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.toolbar-actions .game-building-recenter-btn .material-icons {
  font-size: 1.1rem;
}

.toolbar-actions .back-btn {
  background: rgba(255, 68, 68, 0.2);
  border-color: #ff4444;
  color: #ff4444;
}

.toolbar-actions .back-btn:hover {
  background: rgba(255, 68, 68, 0.3);
}

.game-building-content-wrapper {
  position: fixed;
  top: calc(var(--admin-nav-height, 72px) + var(--toolbar-height, 60px));
  left: 0;
  right: 0;
  bottom: 80px;
  width: 100vw;
  height: calc(100vh - var(--admin-nav-height, 72px) - var(--toolbar-height, 60px) - 80px);
  overflow: hidden;
  z-index: 1;
}

.game-building-footer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  width: 100%;
  height: 80px;
  background: rgba(10, 10, 10, 0.95);
  backdrop-filter: blur(8px);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 1rem 2rem;
  z-index: 100;
  box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.3);
  flex-wrap: wrap;
  overflow-x: auto;
}

.game-building-footer button.game-building-footer-btn {
  width: 64px;
  height: 64px;
  min-width: 64px;
  min-height: 64px;
  padding: 0.25rem;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.2rem;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.65rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
  line-height: 1.15;
  text-align: center;
}

.game-building-footer-btn-icon.material-icons {
  font-size: 1.25rem;
  line-height: 1;
}

.game-building-footer-btn-label {
  text-transform: capitalize;
  word-break: break-word;
  max-width: 100%;
}

.game-building-footer button.game-building-footer-btn:hover:not(:disabled) {
  transform: scale(1.05);
}

.game-building-footer button.game-building-footer-btn:disabled {
  cursor: not-allowed;
  opacity: 0.7;
}

/* Responsive */
@media (max-width: 768px) {
  .game-building-toolbar {
    top: var(--admin-nav-height, 70px);
    padding: 1rem;
  }

  .game-building-toolbar h2 {
    font-size: 1.25rem;
  }

  .toolbar-actions {
    width: 100%;
  }

  .toolbar-actions button {
    flex: 1;
  }

  .game-building-footer {
    height: 70px;
    padding: 0.75rem 1rem;
    flex-direction: row;
    gap: 0.5rem;
  }

  .game-building-content-wrapper {
    top: calc(var(--admin-nav-height, 70px) + var(--toolbar-height, 60px));
    bottom: 70px;
    height: calc(100vh - var(--admin-nav-height, 70px) - var(--toolbar-height, 60px) - 70px);
  }

  .game-building-footer button.game-building-footer-btn {
    width: 56px;
    height: 56px;
    min-width: 56px;
    min-height: 56px;
    font-size: 0.6rem;
  }

  .game-building-footer-btn-icon.material-icons {
    font-size: 1.1rem;
  }
}

@media (max-width: 480px) {
  .game-building-toolbar {
    top: var(--admin-nav-height, 60px);
  }

  .game-building-content-wrapper {
    top: calc(var(--admin-nav-height, 60px) + var(--toolbar-height, 60px));
    height: calc(100vh - var(--admin-nav-height, 60px) - var(--toolbar-height, 60px) - 70px);
  }
}
.story-building-view {
  width: 100%;
  min-height: 100vh;
  background: #0a0a0a;
  color: #ffffff;
  display: flex;
  flex-direction: column;
  position: relative;
  box-sizing: border-box;
}

.story-building-loading,
.story-building-error {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  gap: 1rem;
}

.story-building-error button {
  padding: 0.75rem 1.5rem;
  background: #00ff88;
  border: none;
  border-radius: 8px;
  color: #000000;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.story-building-error button:hover {
  background: #00dd77;
}

.story-building-nav-wrapper {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  background: rgba(10, 10, 10, 0.95);
  backdrop-filter: blur(8px);
  padding: 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  z-index: 1000;
  box-sizing: border-box;
  overflow-x: hidden;
  overflow-y: visible;
}

.story-building-nav-wrapper .admin-nav {
  position: relative !important;
  margin-bottom: 0;
  padding: 0.75rem 0;
  border-bottom: none;
  top: auto !important;
  left: auto !important;
  right: auto !important;
  width: 100% !important;
}

.story-building-toolbar {
  position: fixed;
  top: var(--admin-nav-height, 72px);
  left: 0;
  right: 0;
  padding: 1rem 2rem;
  background: rgba(10, 10, 10, 0.9);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  width: 100%;
  max-width: 100vw;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  z-index: 999;
  box-sizing: border-box;
  overflow-x: hidden;
}

.toolbar-title-section {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex: 1;
}

.story-building-toolbar h2 {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 600;
  color: #00ff88;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.story-title-editable {
  cursor: pointer;
  transition: all 0.2s ease;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  margin: -0.25rem -0.5rem;
}

.story-title-editable:hover {
  background: rgba(0, 255, 136, 0.1);
  color: #00ff88;
}

.story-title-input {
  font-size: 1.5rem;
  font-weight: 600;
  color: #00ff88;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(0, 255, 136, 0.3);
  border-radius: 4px;
  padding: 0.25rem 0.5rem;
  outline: none;
  font-family: inherit;
  min-width: 200px;
}

.story-title-input:focus {
  border-color: #00ff88;
  background: rgba(255, 255, 255, 0.15);
}

.autosave-notice {
  font-size: 0.85rem;
  font-weight: 500;
  white-space: nowrap;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  opacity: 0.7;
}

.autosave-notice.saving {
  color: #ffa500;
}

.autosave-notice.saved {
  color: #00ff88;
}

.autosave-notice.error {
  color: #ff4444;
}

.autosave-icon {
  font-size: 0.9rem;
  line-height: 1;
}

.toolbar-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  align-items: center;
}

.toolbar-actions button {
  padding: 0.5rem 1rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  color: #ffffff;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.toolbar-actions button:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: #00ff88;
}

.toolbar-actions .play-btn {
  background: rgba(255, 68, 255, 0.2);
  border-color: #ff44ff;
  color: #ff44ff;
}

.toolbar-actions .play-btn:hover {
  background: rgba(255, 68, 255, 0.3);
}

.story-building-content-wrapper {
  position: fixed;
  top: calc(var(--admin-nav-height, 72px) + var(--toolbar-height, 60px));
  left: 0;
  right: 0;
  bottom: 80px;
  width: 100vw;
  height: calc(100vh - var(--admin-nav-height, 72px) - var(--toolbar-height, 60px) - 80px);
  overflow: hidden;
  z-index: 1;
}

.story-building-footer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  width: 100%;
  height: 80px;
  background: rgba(10, 10, 10, 0.95);
  backdrop-filter: blur(8px);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 1rem 2rem;
  z-index: 100;
  box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.3);
  flex-wrap: wrap;
  overflow-x: auto;
}

.story-building-footer button {
  padding: 0.5rem 1rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  color: #ffffff;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.story-building-footer button:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: scale(1.05);
}

/* Responsive */
@media (max-width: 768px) {
  .story-building-toolbar {
    top: var(--admin-nav-height, 70px);
    padding: 1rem;
  }

  .story-building-toolbar h2 {
    font-size: 1.25rem;
  }

  .toolbar-actions {
    width: 100%;
  }

  .toolbar-actions button {
    flex: 1;
  }

  .story-building-footer {
    height: 70px;
    padding: 0.75rem 1rem;
    flex-direction: row;
    gap: 0.5rem;
  }

  .story-building-content-wrapper {
    top: calc(var(--admin-nav-height, 70px) + var(--toolbar-height, 60px));
    bottom: 70px;
    height: calc(100vh - var(--admin-nav-height, 70px) - var(--toolbar-height, 60px) - 70px);
  }

  .story-building-footer button {
    padding: 0.5rem 0.75rem;
    font-size: 0.85rem;
  }
}

@media (max-width: 480px) {
  .story-building-toolbar {
    top: var(--admin-nav-height, 60px);
  }

  .story-building-content-wrapper {
    top: calc(var(--admin-nav-height, 60px) + var(--toolbar-height, 60px));
    height: calc(100vh - var(--admin-nav-height, 60px) - var(--toolbar-height, 60px) - 70px);
  }
}
.work-view {
  width: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  background: #0a0a0a;
  color: #ffffff;
  box-sizing: border-box;
  padding-top: calc(var(--admin-nav-height, 72px) + var(--admin-nav-spacing, 20px));
}

.work-main {
  width: 100%;
  max-width: 100%;
  padding: 0 2rem 2rem;
  padding-left: max(2rem, env(safe-area-inset-left, 0px));
  padding-right: max(2rem, env(safe-area-inset-right, 0px));
  padding-bottom: max(2rem, env(safe-area-inset-bottom, 0px));
  box-sizing: border-box;
}

.work-container {
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
}

@media (max-width: 768px) {
  .work-view {
    padding-top: calc(var(--admin-nav-height, 70px) + var(--admin-nav-spacing, 16px));
  }

  .work-main {
    padding: 0 1.5rem 1.5rem;
    padding-left: max(1.5rem, env(safe-area-inset-left, 0px));
    padding-right: max(1.5rem, env(safe-area-inset-right, 0px));
    padding-bottom: max(1.5rem, env(safe-area-inset-bottom, 0px));
  }
}

@media (max-width: 480px) {
  .work-view {
    padding-top: calc(var(--admin-nav-height, 60px) + var(--admin-nav-spacing, 12px));
  }

  .work-main {
    padding: 0 1rem 1.5rem;
    padding-left: max(1rem, env(safe-area-inset-left, 0px));
    padding-right: max(1rem, env(safe-area-inset-right, 0px));
    padding-bottom: max(1.5rem, env(safe-area-inset-bottom, 0px));
  }
}

.work-heading {
  font-size: 1.75rem;
  font-weight: 700;
  margin: 0 0 0.5rem 0;
  color: #00ff88;
}

.work-subtitle {
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.6);
  margin: 0;
  line-height: 1.5;
}

/* ========== Geod Prototype project mockup ========== */

.work-container--geod {
  max-width: 1000px;
  margin-top: 4rem;
}

.geod-header {
  margin-bottom: 2rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

/* Cover Image - Full Width */
.geod-cover-container {
  position: relative;
  width: 100vw;
  left: 50%;
  transform: translateX(-50%);
  margin-bottom: 2rem;
  overflow: visible;
}

.geod-cover-wrapper {
  position: relative;
  width: 100%;
  height: 300px;
  border-radius: 0;
  overflow: hidden;
  cursor: pointer;
}

.geod-cover-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.geod-cover-placeholder {
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.05);
  background-color: #2a2a2a;
  display: block;
}

.geod-cover-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.2s ease;
  pointer-events: none;
  z-index: 2;
  border-radius: 0;
}

.geod-cover-wrapper:hover .geod-cover-overlay {
  opacity: 1;
  pointer-events: auto;
}

.geod-cover-buttons {
  display: flex;
  gap: 1rem;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 10;
  pointer-events: auto;
}

.geod-cover-btn {
  padding: 0.75rem 1.5rem;
  border: 2px solid rgba(0, 255, 136, 0.5);
  background: rgba(0, 255, 136, 0.1);
  color: #00ff88;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.875rem;
  font-weight: 500;
  transition: all 0.2s;
  min-width: 120px;
}

.geod-cover-btn:hover:not(:disabled) {
  background: rgba(0, 255, 136, 0.2);
  border-color: rgba(0, 255, 136, 0.8);
  transform: translateY(-2px);
}

.geod-cover-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.geod-cover-btn-choose {
  border-color: rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.9);
}

.geod-cover-btn-choose:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.5);
}

/* Overlapping Emoji - Aligned left with page content */
.geod-cover-emoji-wrapper {
  position: absolute;
  bottom: -25px;
  left: 0;
  z-index: 20;
  pointer-events: auto;
  /* Position will be set via JavaScript to align with work-container */
}

.geod-cover-emoji {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  font-size: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
  padding: 0;
  border: none;
  color: inherit;
}

.geod-cover-emoji:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 24px rgba(0, 255, 136, 0.3);
}

.geod-header-badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(0, 255, 136, 0.9);
  background: rgba(0, 255, 136, 0.12);
  border: 1px solid rgba(0, 255, 136, 0.3);
  padding: 0.35rem 0.65rem;
  border-radius: 6px;
  margin-bottom: 0.75rem;
}

.geod-project-title {
  font-size: 1.85rem;
  font-weight: 700;
  margin: 0 0 0.5rem 0;
  color: #ffffff;
  letter-spacing: -0.02em;
}

.geod-project-tagline {
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.65);
  line-height: 1.55;
  margin: 0 0 1rem 0;
  max-width: 720px;
}

.geod-header-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.geod-status {
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
}

.geod-status--active {
  color: #00ff88;
  background: rgba(0, 255, 136, 0.15);
  border: 1px solid rgba(0, 255, 136, 0.35);
}

.geod-meta-item {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.5);
}

.geod-team {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1.25rem;
  margin-bottom: 1.25rem;
}

.geod-team-label {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: rgba(255, 255, 255, 0.5);
}

.geod-team-avatars {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.geod-team-member {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.25rem 0.5rem 0.25rem 0.25rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
  font: inherit;
  color: inherit;
  position: relative;
}

.geod-team-member:hover:not(.geod-team-member--placeholder) {
  background: rgba(0, 255, 136, 0.1);
  border-color: rgba(0, 255, 136, 0.3);
}

.geod-team-remove {
  position: absolute;
  top: -6px;
  right: -6px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: rgba(255, 68, 68, 0.9);
  border: 2px solid rgba(0, 0, 0, 0.3);
  color: #ffffff;
  font-size: 14px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  line-height: 1;
  transition: background 0.2s, transform 0.2s;
  z-index: 10;
}

.geod-team-remove:hover {
  background: rgba(255, 68, 68, 1);
  transform: scale(1.1);
}

.geod-team-add {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.25rem 0.75rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px dashed rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
  font: inherit;
  color: rgba(255, 255, 255, 0.6);
}

.geod-team-add:hover {
  background: rgba(0, 255, 136, 0.1);
  border-color: rgba(0, 255, 136, 0.4);
  border-style: solid;
  color: rgba(255, 255, 255, 0.9);
}

.geod-team-add-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(0, 255, 136, 0.2);
  border: 2px solid rgba(0, 255, 136, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  font-weight: 600;
  color: #00ff88;
  flex-shrink: 0;
}

.geod-team-add-label {
  font-size: 0.9rem;
  font-weight: 500;
}

.geod-team-member--placeholder {
  cursor: default;
}

.geod-team-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  background: linear-gradient(135deg, rgba(0, 255, 136, 0.2), rgba(0, 255, 136, 0.08));
  border: 2px solid rgba(0, 255, 136, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
}

.geod-team-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.geod-team-avatar-initial {
  font-size: 0.9rem;
  font-weight: 700;
  color: #00ff88;
}

.geod-team-name {
  font-size: 0.9rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.9);
}

.geod-quick-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.geod-stat {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.6);
}

.geod-stat-value {
  color: #00ff88;
  font-weight: 700;
  margin-right: 0.25rem;
}

/* Tabs */
.geod-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  padding: 0.25rem 0;
}

.geod-tab {
  font-size: 0.9rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.55);
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.12);
  padding: 0.5rem 1rem;
  border-radius: 8px;
  cursor: pointer;
  transition: color 0.2s, background 0.2s, border-color 0.2s;
  outline: none;
}

.geod-tab:hover {
  color: rgba(255, 255, 255, 0.85);
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.2);
}

.geod-tab--active {
  color: #00ff88;
  background: rgba(0, 255, 136, 0.1);
  border-color: rgba(0, 255, 136, 0.35);
}

.geod-tab--active:hover {
  background: rgba(0, 255, 136, 0.15);
  border-color: rgba(0, 255, 136, 0.45);
}

@media (max-width: 768px) {
  .geod-tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    margin-left: -0.5rem;
    margin-right: -0.5rem;
    padding-left: 0.5rem;
    padding-right: 0.5rem;
    margin-bottom: 1.5rem;
    scrollbar-width: thin;
  }

  .geod-tab {
    flex-shrink: 0;
  }
}

/* Panels */
.geod-panel {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 1.5rem 1.75rem;
  margin-bottom: 1rem;
}

.geod-panel-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: #00ff88;
  margin: 0 0 1.25rem 0;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* Overview */
.geod-overview-body {
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
}

.geod-overview-main {
  flex: 1;
  min-width: 0;
}

.geod-overview-media-col {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  flex-shrink: 0;
  width: 200px;
}

.geod-media-item--overview {
  aspect-ratio: 1;
  min-height: 0;
}

@media (max-width: 768px) {
  .geod-overview-body {
    flex-direction: column;
  }

  .geod-overview-media-col {
    flex-direction: row;
    width: 100%;
    max-width: 420px;
  }

  .geod-media-item--overview {
    flex: 1;
    min-width: 0;
  }
}

.geod-overview-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.geod-overview-gallery-below {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 1rem;
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.geod-overview-gallery-below .geod-media-item {
  width: 100%;
}

.geod-media-item--gallery {
  padding: 0;
  font: inherit;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  text-align: inherit;
}

@media (max-width: 640px) {
  .geod-overview-grid {
    grid-template-columns: 1fr;
  }

  .geod-overview-gallery-below {
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  }
}

.geod-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 1.25rem;
}

.geod-card--wide {
  grid-column: 1 / -1;
}

.geod-card-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.9);
  margin: 0 0 0.75rem 0;
}

.geod-list {
  margin: 0;
  padding-left: 1.25rem;
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.9rem;
  line-height: 1.7;
}

.geod-card-desc {
  margin: 0;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.65);
  line-height: 1.5;
}

/* Docs */
.geod-doc-block {
  margin-bottom: 1.5rem;
}

.geod-doc-block:last-child {
  margin-bottom: 0;
}

.geod-doc-heading {
  font-size: 0.95rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.9);
  margin: 0 0 0.75rem 0;
}

.geod-doc-content {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.7);
  line-height: 1.6;
}

.geod-doc-content p {
  margin: 0 0 0.75rem 0;
}

.geod-doc-content p:last-child {
  margin-bottom: 0;
}

.geod-ascii {
  font-family: ui-monospace, 'Cascadia Code', 'Source Code Pro', Menlo, Consolas, monospace;
  font-size: 0.8rem;
  line-height: 1.4;
  color: rgba(0, 255, 136, 0.85);
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 1rem 1.25rem;
  margin: 1rem 0;
  overflow-x: auto;
  white-space: pre;
}

/* Conversations */
.geod-thread {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 1.25rem;
  margin-bottom: 1rem;
}

.geod-thread:last-child {
  margin-bottom: 0;
}

.geod-thread-header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.geod-thread-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.9);
}

.geod-thread-meta {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.45);
}

.geod-thread-preview {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.geod-msg {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.5rem 0.75rem;
  align-items: baseline;
  font-size: 0.88rem;
  color: rgba(255, 255, 255, 0.75);
  line-height: 1.45;
}

.geod-msg--reply {
  margin-left: 1.5rem;
  padding-left: 0.75rem;
  border-left: 2px solid rgba(0, 255, 136, 0.25);
}

.geod-msg-author {
  font-weight: 600;
  color: #00ff88;
  font-size: 0.8rem;
}

.geod-msg-text {
  min-width: 0;
}

.geod-msg-time {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.4);
  white-space: nowrap;
}

/* Calendar */
.geod-calendar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
}

.geod-cal-month {
  font-size: 1rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.9);
}

.geod-cal-btn {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  color: rgba(255, 255, 255, 0.6);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  cursor: pointer;
  transition: color 0.2s, background 0.2s;
}

.geod-cal-btn:hover {
  color: #00ff88;
  background: rgba(0, 255, 136, 0.1);
}

.geod-cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
  margin-bottom: 1.25rem;
}

.geod-cal-dow {
  font-size: 0.75rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.5);
  text-align: center;
  padding: 0.5rem 0;
}

.geod-cal-day {
  min-height: 52px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 6px;
  padding: 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 0.85rem;
}

.geod-cal-day--empty {
  background: transparent;
  border-color: transparent;
  min-height: 0;
}

.geod-cal-day--event {
  border-color: rgba(0, 255, 136, 0.3);
  background: rgba(0, 255, 136, 0.06);
}

.geod-cal-num {
  color: rgba(255, 255, 255, 0.5);
  font-weight: 500;
}

.geod-cal-day--event .geod-cal-num {
  color: rgba(255, 255, 255, 0.8);
}

.geod-cal-event {
  font-size: 0.7rem;
  color: #00ff88;
  font-weight: 500;
}

.geod-cal-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.5);
}

.geod-cal-legend-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #00ff88;
  margin-right: 0.35rem;
  vertical-align: middle;
}

/* Tasklists */
.geod-tasklist-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
}

@media (max-width: 700px) {
  .geod-tasklist-grid {
    grid-template-columns: 1fr;
  }
}

.geod-tasklist {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 1.25rem;
}

.geod-tasklist-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.9);
  margin: 0 0 1rem 0;
}

.geod-tasklist-items {
  margin: 0;
  padding: 0;
  list-style: none;
}

.geod-task {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.75);
  line-height: 1.5;
  padding: 0.4rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.geod-task:last-child {
  border-bottom: none;
}

.geod-task-check {
  flex-shrink: 0;
  color: rgba(0, 255, 136, 0.7);
  font-size: 0.85rem;
}

.geod-task--done {
  color: rgba(255, 255, 255, 0.5);
  text-decoration: line-through;
}

.geod-task--done .geod-task-check {
  color: #00ff88;
}

/* Fund */
.geod-fund-intro {
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.7);
  line-height: 1.5;
  margin: 0 0 1.5rem 0;
}

.geod-fund-goal {
  margin-bottom: 1.75rem;
}

.geod-fund-stats {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.35rem 0.5rem;
  margin-bottom: 0.5rem;
}

.geod-fund-raised {
  font-size: 1.5rem;
  font-weight: 700;
  color: #00ff88;
}

.geod-fund-sep {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.5);
}

.geod-fund-target {
  font-size: 1rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.8);
}

.geod-fund-bar {
  height: 8px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 0.5rem;
}

.geod-fund-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #00ff88, rgba(0, 255, 136, 0.6));
  border-radius: 999px;
  transition: width 0.4s ease;
}

.geod-fund-backers {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.5);
  margin: 0;
}

.geod-fund-actions {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.geod-fund-label {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: rgba(255, 255, 255, 0.5);
}

.geod-fund-amounts {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.geod-fund-amount-btn {
  font-size: 0.9rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.9);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.15);
  padding: 0.5rem 1rem;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}

.geod-fund-amount-btn:hover {
  background: rgba(0, 255, 136, 0.12);
  border-color: rgba(0, 255, 136, 0.35);
}

.geod-fund-amount-btn--custom {
  color: rgba(255, 255, 255, 0.6);
}

.geod-fund-cta {
  align-self: flex-start;
  font-size: 1rem;
  font-weight: 600;
  color: #0a0a0a;
  background: #00ff88;
  border: none;
  padding: 0.65rem 1.5rem;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.2s, transform 0.2s;
}

.geod-fund-cta:hover {
  background: #00dd74;
  transform: translateY(-1px);
}

/* Financial Model */
.geod-financial-intro,
.geod-financial-hook {
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.7);
  line-height: 1.55;
  margin: 0 0 1rem 0;
}

.geod-financial-hook {
  margin-bottom: 1.5rem;
}

.geod-financial-block {
  margin-bottom: 2rem;
}

.geod-financial-heading {
  font-size: 1rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.95);
  margin: 0 0 0.5rem 0;
}

.geod-financial-desc {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.6);
  line-height: 1.5;
  margin: 0 0 1rem 0;
}

.geod-financial-table-wrap {
  overflow-x: auto;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.03);
}

.geod-financial-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.geod-financial-table th,
.geod-financial-table td {
  padding: 0.75rem 1rem;
  text-align: left;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.geod-financial-table th {
  font-weight: 600;
  color: rgba(255, 255, 255, 0.9);
  background: rgba(255, 255, 255, 0.04);
}

.geod-financial-table td {
  color: rgba(255, 255, 255, 0.75);
}

.geod-financial-table tbody tr:last-child td {
  border-bottom: none;
}

.geod-financial-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.04);
}

.geod-financial-list {
  margin: 0;
  padding-left: 1.25rem;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.7);
  line-height: 1.6;
}

.geod-financial-list li {
  margin-bottom: 0.5rem;
}

.geod-financial-list li:last-child {
  margin-bottom: 0;
}

.geod-financial-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.geod-financial-cta {
  font-size: 0.95rem;
  font-weight: 600;
  color: #0a0a0a;
  background: #00ff88;
  border: none;
  border-radius: 8px;
  padding: 0.6rem 1.25rem;
  cursor: pointer;
  transition: background 0.2s, transform 0.2s;
}

.geod-financial-cta:hover {
  background: #00dd74;
  transform: translateY(-1px);
}

.geod-financial-cta--secondary {
  color: #00ff88;
  background: transparent;
  border: 1px solid rgba(0, 255, 136, 0.4);
}

.geod-financial-cta--secondary:hover {
  background: rgba(0, 255, 136, 0.12);
  color: #00ff88;
}

/* Apply */
.geod-apply-intro {
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.7);
  line-height: 1.5;
  margin: 0 0 1.5rem 0;
}

.geod-roles {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.geod-role {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 1.25rem;
}

.geod-role-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.geod-role-title {
  font-size: 1rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.95);
  margin: 0;
}

.geod-role-status {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
}

.geod-role-status--open {
  color: #00ff88;
  background: rgba(0, 255, 136, 0.12);
  border: 1px solid rgba(0, 255, 136, 0.3);
}

.geod-role-status--filled {
  color: rgba(255, 255, 255, 0.5);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.geod-role-desc {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.65);
  line-height: 1.5;
  margin: 0 0 1rem 0;
}

.geod-role-apply {
  font-size: 0.9rem;
  font-weight: 600;
  color: #00ff88;
  background: transparent;
  border: 1px solid rgba(0, 255, 136, 0.4);
  padding: 0.45rem 1rem;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}

.geod-role-apply:hover {
  background: rgba(0, 255, 136, 0.12);
  border-color: rgba(0, 255, 136, 0.6);
}

.geod-status--paused {
  color: rgba(255, 180, 0, 0.95);
  background: rgba(255, 180, 0, 0.15);
  border: 1px solid rgba(255, 180, 0, 0.35);
}

.geod-status--archived {
  color: rgba(255, 255, 255, 0.5);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

/* Media tab */
.geod-media-intro {
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.7);
  line-height: 1.5;
  margin: 0 0 1rem 0;
}

.geod-media-error {
  font-size: 0.9rem;
  color: #ff6b6b;
  margin-bottom: 1rem;
  padding: 0.5rem 0.75rem;
  background: rgba(255, 107, 107, 0.1);
  border-radius: 8px;
}

.geod-media-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.geod-media-url-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.geod-media-url-input {
  flex: 1;
  min-width: 200px;
  font-size: 0.9rem;
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  padding: 0.5rem 0.75rem;
  outline: none;
  transition: border-color 0.2s;
}

.geod-media-url-input::placeholder {
  color: rgba(255, 255, 255, 0.4);
}

.geod-media-url-input:focus {
  border-color: rgba(0, 255, 136, 0.5);
}

.geod-media-url-input:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.geod-media-btn {
  font-size: 0.9rem;
  font-weight: 600;
  color: #00ff88;
  background: transparent;
  border: 1px solid rgba(0, 255, 136, 0.4);
  padding: 0.5rem 1rem;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}

.geod-media-btn:hover:not(:disabled) {
  background: rgba(0, 255, 136, 0.12);
  border-color: rgba(0, 255, 136, 0.6);
}

.geod-media-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.geod-media-btn--upload {
  cursor: pointer;
}

.geod-media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 1rem;
}

.geod-media-item {
  position: relative;
  aspect-ratio: 1;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.geod-media-item--clickable {
  cursor: pointer;
}

.geod-media-item--clickable:hover {
  border-color: rgba(0, 255, 136, 0.4);
}

.geod-media-item.geod-media-item--overview {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 0;
  font: inherit;
  background: rgba(255, 255, 255, 0.06);
  text-align: inherit;
}

.geod-media-item img,
.geod-media-item video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.geod-media-placeholder {
  font-size: 2rem;
  color: rgba(255, 255, 255, 0.4);
}

.geod-media-remove {
  position: absolute;
  top: 0.25rem;
  right: 0.25rem;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  line-height: 1;
  color: rgba(255, 255, 255, 0.8);
  background: rgba(0, 0, 0, 0.6);
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.geod-media-remove:hover {
  background: rgba(255, 68, 68, 0.8);
  color: #fff;
}

.geod-media-empty {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.5);
  margin: 0;
}

/* Media view modal */
.geod-media-view-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(0, 0, 0, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  cursor: pointer;
}

.geod-media-view-content {
  position: relative;
  max-width: 90vw;
  max-height: 90vh;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: default;
}

.geod-media-view-content img,
.geod-media-view-content video {
  max-width: 90vw;
  max-height: 90vh;
  width: auto;
  height: auto;
  object-fit: contain;
}

/* Player Picker Modal */
.geod-player-picker-content {
  max-width: 600px;
  max-height: 80vh;
  overflow-y: auto;
  padding: 2rem;
}

.geod-player-picker-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: #00ff88;
  margin: 0 0 1.5rem 0;
}

.geod-player-picker-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

.geod-player-picker-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
  text-align: center;
  aspect-ratio: 1;
  font: inherit;
  color: inherit;
}

.geod-player-picker-item:hover {
  background: rgba(0, 255, 136, 0.1);
  border-color: rgba(0, 255, 136, 0.3);
}

.geod-player-picker-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  background: linear-gradient(135deg, rgba(0, 255, 136, 0.2), rgba(0, 255, 136, 0.08));
  border: 2px solid rgba(0, 255, 136, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
}

.geod-player-picker-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.geod-player-picker-avatar-initial {
  font-size: 1.5rem;
  font-weight: 700;
  color: #00ff88;
}

.geod-player-picker-name {
  font-size: 0.9rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.9);
  text-align: center;
  word-break: break-word;
}

.geod-player-picker-empty {
  grid-column: 1 / -1;
  text-align: center;
  color: rgba(255, 255, 255, 0.5);
  padding: 2rem 1rem;
  font-size: 0.9rem;
}

.geod-media-view-close {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  line-height: 1;
  color: #fff;
  background: rgba(0, 0, 0, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
  z-index: 1;
}

.geod-media-view-close:hover {
  background: rgba(0, 0, 0, 0.8);
  border-color: rgba(255, 255, 255, 0.5);
}

.geod-media-view-link {
  display: inline-block;
  padding: 0.75rem 1.25rem;
  color: #00ff88;
  background: rgba(0, 255, 136, 0.1);
  border: 1px solid rgba(0, 255, 136, 0.3);
  border-radius: 8px;
  text-decoration: none;
  font-weight: 500;
}

.geod-media-view-link:hover {
  background: rgba(0, 255, 136, 0.2);
  border-color: rgba(0, 255, 136, 0.5);
}

/* Emoji Picker */
.emoji-picker-container {
  position: fixed;
  z-index: 2001;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 420px;
  max-width: calc(100vw - 40px);
  height: calc(100vh - 80px);
  max-height: 600px;
  pointer-events: auto;
  overflow: visible;
}

.emoji-picker-container--aligned {
  /* Position is set via inline styles from JavaScript */
  transform: none !important;
}

.emoji-picker-container .emoji-picker-search-wrapper {
  display: none;
}

.emoji-picker-close-btn {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  width: 100%;
  padding: 1rem;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(10px);
  border: none;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.9375rem;
  font-weight: 500;
  cursor: pointer;
  text-align: center;
  z-index: 10;
}

.emoji-picker-close-btn:hover {
  background: rgba(0, 0, 0, 0.6);
}
.storage-space-view {
  width: 100%;
  min-height: 100vh;
  background: #0a0a0a;
  color: #ffffff;
  padding-top: calc(var(--admin-nav-height, 72px) + var(--admin-nav-spacing, 20px));
}

.storage-space-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem;
}

.storage-space-container h1 {
  font-size: 2rem;
  font-weight: 700;
  margin: 0 0 2rem 0;
  color: #00ff88;
}

.storage-space-loading,
.storage-space-error {
  text-align: center;
  padding: 3rem;
  color: rgba(255, 255, 255, 0.5);
}

.storage-space-error {
  background: rgba(255, 68, 68, 0.1);
  border: 1px solid rgba(255, 68, 68, 0.3);
  border-radius: 8px;
  color: #ff4444;
  margin-bottom: 2rem;
}

.storage-space-main {
  margin-bottom: 3rem;
}

.storage-space-card {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 2rem;
}

.storage-space-card h2 {
  font-size: 1.5rem;
  font-weight: 600;
  margin: 0 0 1.5rem 0;
  color: #ffffff;
}

.storage-space-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.storage-space-stat {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.stat-label {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.6);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.stat-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: #00ff88;
}

.storage-space-progress {
  margin-bottom: 1.5rem;
}

.storage-space-progress-bar-container {
  width: 100%;
  height: 24px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 0.5rem;
}

.storage-space-progress-bar {
  height: 100%;
  transition: width 0.3s ease, background-color 0.3s ease;
  border-radius: 12px;
}

.storage-space-progress-text {
  text-align: right;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.7);
}

.storage-space-remaining {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.remaining-label {
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.7);
}

.remaining-value {
  font-size: 1.25rem;
  font-weight: 600;
  color: #00ff88;
}

.storage-space-buckets {
  margin-top: 3rem;
}

.storage-space-buckets h2 {
  font-size: 1.5rem;
  font-weight: 600;
  margin: 0 0 1.5rem 0;
  color: #ffffff;
}

.storage-space-buckets-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
}

.storage-space-bucket-card {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 1.5rem;
  transition: all 0.2s ease;
}

.storage-space-bucket-card:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
}

.bucket-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.bucket-header h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin: 0;
  color: #ffffff;
}

.bucket-status {
  padding: 0.25rem 0.75rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.bucket-status.public {
  background: rgba(0, 255, 136, 0.2);
  color: #00ff88;
  border: 1px solid rgba(0, 255, 136, 0.3);
}

.bucket-status.private {
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.bucket-info {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.bucket-stat {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.bucket-stat-label {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.6);
}

.bucket-stat-value {
  font-size: 1rem;
  font-weight: 600;
  color: #00ff88;
}

.bucket-date {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.4);
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

@media (max-width: 768px) {
  .storage-space-container {
    padding: 1rem;
  }

  .storage-space-stats {
    grid-template-columns: 1fr;
  }

  .storage-space-buckets-grid {
    grid-template-columns: 1fr;
  }
}
.media-gallery-view {
  width: 100%;
  min-height: 100vh;
  background: #0a0a0a;
  color: #ffffff;
  display: flex;
  flex-direction: column;
  padding: 0;
  box-sizing: border-box;
  padding-top: calc(var(--admin-nav-height, 72px) + var(--admin-nav-spacing, 20px));
}

.media-gallery-container {
  width: 100%;
  margin: 0 auto;
  padding: 0 2rem;
  box-sizing: border-box;
}

@media (max-width: 768px) {
  .media-gallery-container {
    padding: 0 1.5rem;
  }
}

@media (max-width: 480px) {
  .media-gallery-container {
    padding: 0 1rem;
  }
}

.media-gallery-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.media-gallery-header h1 {
  font-size: 2rem;
  font-weight: 700;
  margin: 0;
  color: #00ff88;
}

.media-gallery-filters {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.media-gallery-filters button {
  padding: 0.5rem 1rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  color: rgba(255, 255, 255, 0.7);
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 0.9rem;
}

.media-gallery-filters button:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
}

.media-gallery-filters button.active {
  background: #00ff88;
  color: #000000;
  border-color: #00ff88;
}

.media-gallery-error {
  padding: 1rem;
  background: rgba(255, 68, 68, 0.1);
  border: 1px solid rgba(255, 68, 68, 0.3);
  border-radius: 6px;
  color: #ff4444;
  margin-bottom: 2rem;
}

.media-gallery-upload-area {
  padding: 3rem;
  border: 2px dashed rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  text-align: center;
  margin-bottom: 2rem;
  transition: all 0.2s ease;
  background: rgba(255, 255, 255, 0.02);
}

.media-gallery-upload-area.dragging {
  border-color: #00ff88;
  background: rgba(0, 255, 136, 0.05);
}

.media-gallery-upload-btn {
  padding: 0.75rem 2rem;
  background: #00ff88;
  border: none;
  border-radius: 6px;
  color: #000000;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 1rem;
  margin-bottom: 1rem;
}

.media-gallery-upload-btn:hover:not(:disabled) {
  background: #00cc6a;
  transform: translateY(-2px);
}

.media-gallery-upload-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.media-gallery-upload-hint {
  color: rgba(255, 255, 255, 0.6);
  margin: 0.5rem 0;
  font-size: 0.9rem;
}

.media-gallery-upload-types {
  color: rgba(255, 255, 255, 0.4);
  margin: 0.5rem 0 0 0;
  font-size: 0.85rem;
}

.media-gallery-upload-progress {
  width: 100%;
  max-width: 400px;
  height: 4px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 2px;
  margin: 1rem auto 0;
  overflow: hidden;
}

.media-gallery-upload-progress-bar {
  height: 100%;
  background: #00ff88;
  transition: width 0.3s ease;
}

.media-gallery-loading,
.media-gallery-empty {
  text-align: center;
  padding: 3rem;
  color: rgba(255, 255, 255, 0.5);
}

.media-gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1.5rem;
  width: 100%;
}

.media-gallery-item {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  overflow: hidden;
  transition: all 0.2s ease;
}

.media-gallery-item:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
}

.media-gallery-item img,
.media-gallery-item video {
  width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
}

.media-gallery-audio-preview {
  width: 100%;
  height: 200px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(0, 255, 136, 0.1) 0%, rgba(0, 255, 136, 0.05) 100%);
  position: relative;
  overflow: hidden;
}

.media-gallery-audio-preview::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at center, rgba(0, 255, 136, 0.15) 0%, transparent 70%);
  opacity: 0.5;
}

.media-gallery-audio-preview .audio-icon {
  font-size: 4rem;
  margin-bottom: 1rem;
  position: relative;
  z-index: 1;
  filter: drop-shadow(0 2px 8px rgba(0, 255, 136, 0.3));
}

.media-gallery-audio-preview audio {
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  position: relative;
  z-index: 1;
  padding: 0;
  box-sizing: border-box;
  border-radius: 0;
}

.media-gallery-audio-preview audio::-webkit-media-controls-panel {
  background-color: rgba(0, 0, 0, 0.3);
  border-radius: 0;
  height: 100%;
}

.media-gallery-audio-preview audio::-webkit-media-controls-play-button {
  background-color: rgba(0, 255, 136, 0.2);
  border-radius: 50%;
}

.media-gallery-audio-preview audio::-webkit-media-controls-current-time-display,
.media-gallery-audio-preview audio::-webkit-media-controls-time-remaining-display {
  color: rgba(255, 255, 255, 0.9);
}

.media-gallery-audio-preview audio::-webkit-media-controls-enclosure {
  border-radius: 0;
  height: 100%;
}

.media-gallery-model-preview,
.media-gallery-other-preview {
  width: 100%;
  height: 200px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.03);
  gap: 0.5rem;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.6);
}

.model-icon,
.file-icon {
  font-size: 3rem;
}

.media-gallery-item-info {
  padding: 1rem;
}

.media-gallery-item-name {
  font-weight: 600;
  margin-bottom: 0.5rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.9rem;
}

.media-gallery-item-meta {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.5);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.media-gallery-item-source {
  font-size: 0.75rem;
  padding: 0.125rem 0.5rem;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  color: rgba(255, 255, 255, 0.7);
}

.media-gallery-item-actions {
  display: flex;
  gap: 0.5rem;
  padding: 0 1rem 1rem;
}

.media-gallery-item-link,
.media-gallery-item-delete {
  flex: 1;
  padding: 0.5rem;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.85rem;
  transition: all 0.2s ease;
  text-decoration: none;
  text-align: center;
  display: inline-block;
}

.media-gallery-item-link {
  background: rgba(0, 255, 136, 0.1);
  color: #00ff88;
  border: 1px solid rgba(0, 255, 136, 0.3);
}

.media-gallery-item-link:hover {
  background: rgba(0, 255, 136, 0.2);
}

.media-gallery-item-delete {
  background: rgba(255, 68, 68, 0.1);
  color: #ff4444;
  border: 1px solid rgba(255, 68, 68, 0.3);
}

.media-gallery-item-delete:hover {
  background: rgba(255, 68, 68, 0.2);
}

/* Storage Card */
.media-gallery-storage-card {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 1.25rem;
  margin-bottom: 2rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.media-gallery-storage-card:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(0, 255, 136, 0.3);
  transform: translateY(-2px);
}

.media-gallery-storage-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1.5rem;
  margin-bottom: 1rem;
}

.media-gallery-storage-stat {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.media-gallery-storage-stat .stat-label {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.6);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.media-gallery-storage-stat .stat-value {
  font-size: 1.25rem;
  font-weight: 700;
  color: #00ff88;
}

.media-gallery-storage-progress {
  margin-bottom: 0;
}

.media-gallery-storage-progress-bar-container {
  width: 100%;
  height: 20px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 0.25rem;
}

.media-gallery-storage-progress-bar {
  height: 100%;
  transition: width 0.3s ease, background-color 0.3s ease;
  border-radius: 10px;
}

.media-gallery-storage-progress-text {
  text-align: right;
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.7);
}

/* Media Counts */
.media-gallery-counts {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 2rem;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 8px;
}

.media-gallery-count-item {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 0.75rem 1rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  min-width: 80px;
}

.count-label {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.6);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.count-value {
  font-size: 1.25rem;
  font-weight: 700;
  color: #00ff88;
}

@media (max-width: 768px) {
  .media-gallery-view {
    padding-top: calc(var(--admin-nav-height, 70px) + var(--admin-nav-spacing, 16px));
  }

  .media-gallery-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }

  .media-gallery-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .media-gallery-upload-area {
    padding: 2rem 1rem;
  }

  .media-gallery-storage-card {
    padding: 1rem;
  }

  .media-gallery-storage-stats {
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
    margin-bottom: 0.75rem;
  }

  .media-gallery-storage-stat {
    gap: 0.125rem;
  }

  .media-gallery-storage-stat .stat-label {
    font-size: 0.7rem;
  }

  .media-gallery-storage-stat .stat-value {
    font-size: 1rem;
  }

  .media-gallery-storage-progress-bar-container {
    height: 16px;
    margin-bottom: 0.25rem;
  }

  .media-gallery-storage-progress-text {
    font-size: 0.75rem;
  }

  .media-gallery-counts {
    gap: 0.75rem;
    padding: 0.75rem;
  }

  .media-gallery-count-item {
    flex: 1;
    min-width: 0;
    padding: 0.5rem 0.75rem;
  }
}

@media (max-width: 480px) {
  .media-gallery-view {
    padding-top: calc(var(--admin-nav-height, 60px) + var(--admin-nav-spacing, 12px));
  }

  .media-gallery-storage-card {
    padding: 0.75rem;
  }

  .media-gallery-storage-stats {
    gap: 0.5rem;
    margin-bottom: 0.5rem;
  }

  .media-gallery-storage-stat .stat-label {
    font-size: 0.65rem;
  }

  .media-gallery-storage-stat .stat-value {
    font-size: 0.9rem;
  }

  .media-gallery-storage-progress-bar-container {
    height: 14px;
  }

  .media-gallery-storage-progress-text {
    font-size: 0.7rem;
  }
}

/* Fixed bottom button (FAB) */
.media-gallery-fab {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  width: 64px;
  height: 64px;
  min-width: 64px;
  min-height: 64px;
  border-radius: 50%;
  background: transparent;
  border: 2px solid #00ff88;
  color: #00ff88;
  font-size: 2rem;
  cursor: pointer;
  transition: all 0.3s ease;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  padding: 0;
  box-sizing: border-box;
}

.media-gallery-fab:hover {
  border-color: #00cc6a;
  transform: translateX(-50%) scale(1.1);
  background: transparent;
}

.media-gallery-fab:active {
  transform: translateX(-50%) scale(0.95);
}

/* Modal overlay */
.media-gallery-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 40, 20, 0.5);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  padding: 0;
  animation: fadeIn 0.2s ease;
}

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

.media-gallery-modal-content {
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 2rem;
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100vh;
  overflow-x: hidden;
  overflow-y: auto;
  animation: fadeIn 0.3s ease;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  position: relative;
  box-sizing: border-box;
}

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

.media-gallery-modal-header {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 1.5rem;
  position: relative;
  flex-shrink: 0;
}

.media-gallery-modal-title {
  font-size: 2rem;
  font-weight: 700;
  margin: 0;
  color: #00ff88;
  text-align: center;
  letter-spacing: 0.05em;
}

.media-gallery-modal-back-btn {
  position: absolute;
  left: 0;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  padding: 0.5rem 1rem;
  transition: all 0.2s ease;
  outline: none;
  -webkit-tap-highlight-color: transparent;
}

.media-gallery-modal-back-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
  color: #ffffff;
}

.media-gallery-modal-back-btn:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(0, 255, 136, 0.2);
}

/* Bottom close button */
.media-gallery-modal-close-bottom {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  width: 64px;
  height: 64px;
  min-width: 64px;
  min-height: 64px;
  border-radius: 50%;
  background: transparent;
  border: 2px solid #00ff88;
  color: #00ff88;
  font-size: 2rem;
  cursor: pointer;
  transition: all 0.3s ease;
  z-index: 2001;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  padding: 0;
  box-sizing: border-box;
  outline: none;
  -webkit-tap-highlight-color: transparent;
}

.media-gallery-modal-close-bottom:focus {
  outline: none;
  box-shadow: none;
}

.media-gallery-modal-close-bottom:hover {
  border-color: #00cc6a;
  transform: translateX(-50%) scale(1.1);
  background: transparent;
}

.media-gallery-modal-close-bottom:active {
  transform: translateX(-50%) scale(0.95);
}

.media-gallery-modal-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  width: 100%;
  max-width: 800px;
  box-sizing: border-box;
}

.media-gallery-modal-card {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 2.5rem 2rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.media-gallery-modal-card:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(0, 255, 136, 0.3);
  transform: translateY(-2px);
}

.media-gallery-modal-card-emoji {
  font-size: 3rem;
  line-height: 1;
}

.media-gallery-modal-card-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: #ffffff;
}

/* Wizard Steps */
.media-gallery-wizard-step {
  min-height: 300px;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.3s ease;
  width: 100%;
}

.media-gallery-wizard-content {
  text-align: center;
  max-width: 400px;
  width: 100%;
}

.media-gallery-wizard-icon {
  font-size: 4rem;
  margin-bottom: 1.5rem;
  line-height: 1;
}

.media-gallery-wizard-content h3 {
  font-size: 1.5rem;
  font-weight: 600;
  margin: 0 0 1rem 0;
  color: #ffffff;
}

.media-gallery-wizard-content p {
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.6);
  margin: 0;
  line-height: 1.6;
}

/* Modal Action Buttons */
.media-gallery-modal-actions {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
  flex-shrink: 0;
}

.media-gallery-action-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  padding: 2rem 2.5rem;
  background: rgba(255, 255, 255, 0.05);
  border: 2px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  color: #ffffff;
  cursor: pointer;
  transition: all 0.2s ease;
  min-width: 140px;
  outline: none;
  -webkit-tap-highlight-color: transparent;
}

.media-gallery-action-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(0, 255, 136, 0.3);
  transform: translateY(-2px);
}

.media-gallery-action-btn:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(0, 255, 136, 0.2);
}

.media-gallery-action-icon {
  font-size: 3rem;
  line-height: 1;
}

.media-gallery-action-label {
  font-size: 1rem;
  font-weight: 600;
}

/* Modal Upload Area */
.media-gallery-modal-upload-area {
  padding: 4rem 2rem;
  border: 2px dashed rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  text-align: center;
  margin-bottom: 1.5rem;
  transition: all 0.2s ease;
  background: rgba(255, 255, 255, 0.02);
  cursor: pointer;
  flex-shrink: 0;
}

.media-gallery-modal-upload-area.dragging {
  border-color: #00ff88;
  background: rgba(0, 255, 136, 0.05);
}

.media-gallery-modal-upload-icon {
  font-size: 4rem;
  margin-bottom: 1rem;
  line-height: 1;
}

.media-gallery-modal-upload-text {
  color: rgba(255, 255, 255, 0.7);
  margin: 0 0 1.5rem 0;
  font-size: 1.1rem;
}

.media-gallery-modal-upload-btn {
  padding: 1rem 2.5rem;
  background: rgba(0, 255, 136, 0.1);
  border: 2px solid #00ff88;
  border-radius: 8px;
  color: #00ff88;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  outline: none;
  -webkit-tap-highlight-color: transparent;
}

.media-gallery-modal-upload-btn:hover:not(:disabled) {
  background: rgba(0, 255, 136, 0.2);
  border-color: #00cc6a;
  color: #00cc6a;
}

.media-gallery-modal-upload-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Modal URL Section */
.media-gallery-modal-url-section {
  width: 100%;
  max-width: 600px;
  margin: 0 auto;
  flex-shrink: 0;
}

/* URL Paste Step */
.media-gallery-url-paste {
  width: 100%;
  max-width: 600px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}

.media-gallery-url-input-container {
  width: 100%;
  display: flex;
  gap: 1rem;
  align-items: stretch;
}

.media-gallery-url-input {
  flex: 1;
  padding: 1rem 1.5rem;
  background: rgba(255, 255, 255, 0.05);
  border: 2px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  color: #ffffff;
  font-size: 1rem;
  font-family: inherit;
  transition: all 0.2s ease;
  outline: none;
}

.media-gallery-url-input:focus {
  border-color: #00ff88;
  background: rgba(255, 255, 255, 0.08);
}

.media-gallery-url-input::placeholder {
  color: rgba(255, 255, 255, 0.4);
}

.media-gallery-url-paste-btn {
  padding: 1rem 2rem;
  background: rgba(0, 255, 136, 0.1);
  border: 2px solid #00ff88;
  border-radius: 8px;
  color: #00ff88;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  outline: none;
  -webkit-tap-highlight-color: transparent;
}

.media-gallery-url-paste-btn:hover {
  background: rgba(0, 255, 136, 0.2);
  border-color: #00cc6a;
  color: #00cc6a;
}

.media-gallery-url-paste-btn:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(0, 255, 136, 0.2);
}

.media-gallery-url-paste-btn:active {
  transform: scale(0.98);
}

.media-gallery-url-submit-btn {
  padding: 1rem 2rem;
  background: #00ff88;
  border: 2px solid #00ff88;
  border-radius: 8px;
  color: #000000;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  outline: none;
  -webkit-tap-highlight-color: transparent;
}

.media-gallery-url-submit-btn:hover:not(:disabled) {
  background: #00cc6a;
  border-color: #00cc6a;
}

.media-gallery-url-submit-btn:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(0, 255, 136, 0.2);
}

.media-gallery-url-submit-btn:active {
  transform: scale(0.98);
}

.media-gallery-url-submit-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

@media (max-width: 768px) {
  .media-gallery-url-input-container {
    flex-direction: column;
  }

  .media-gallery-url-paste-btn,
  .media-gallery-url-submit-btn {
    width: 100%;
  }
}

@media (max-width: 768px) {
  .media-gallery-fab {
    bottom: 1.5rem;
    width: 56px;
    height: 56px;
    min-width: 56px;
    min-height: 56px;
    font-size: 1.75rem;
  }

  .media-gallery-modal-close-bottom {
    bottom: 1rem;
    width: 52px;
    height: 52px;
    min-width: 52px;
    min-height: 52px;
    font-size: 1.5rem;
  }

  .media-gallery-modal-content {
    padding: 1rem;
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
    justify-content: center;
    padding-bottom: 80px; /* Space for close button */
  }

  .media-gallery-modal-header {
    margin-bottom: 1rem;
  }

  .media-gallery-modal-title {
    font-size: 1.5rem;
  }

  .media-gallery-modal-actions {
    flex-direction: row;
    gap: 0.75rem;
    margin-bottom: 1rem;
    width: 100%;
  }

  .media-gallery-action-btn {
    flex: 1;
    padding: 1rem 0.75rem;
    min-width: 0;
  }

  .media-gallery-action-icon {
    font-size: 2rem;
  }

  .media-gallery-action-label {
    font-size: 0.85rem;
  }

  .media-gallery-modal-upload-area {
    padding: 2rem 1rem;
    margin-bottom: 1rem;
  }

  .media-gallery-modal-upload-icon {
    font-size: 2.5rem;
    margin-bottom: 0.75rem;
  }

  .media-gallery-modal-upload-text {
    font-size: 0.9rem;
    margin-bottom: 1rem;
  }

  .media-gallery-modal-upload-btn {
    padding: 0.75rem 1.5rem;
    font-size: 0.9rem;
  }

  .media-gallery-modal-url-section {
    max-width: 100%;
    margin-bottom: 0;
  }

  .media-gallery-url-input-container {
    flex-direction: column;
  }

  .media-gallery-url-paste-btn {
    width: 100%;
  }
}

@media (max-width: 480px) {
  .media-gallery-fab {
    bottom: 0.75rem;
    width: 48px;
    height: 48px;
    min-width: 48px;
    min-height: 48px;
    font-size: 1.25rem;
  }

  .media-gallery-modal-close-bottom {
    bottom: 0.75rem;
    width: 48px;
    height: 48px;
    min-width: 48px;
    min-height: 48px;
    font-size: 1.25rem;
  }

  .media-gallery-modal-content {
    padding: 0.75rem;
    padding-bottom: 70px;
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
    justify-content: center;
  }

  .media-gallery-modal-header {
    margin-bottom: 0.5rem;
    width: 100%;
    max-width: 100%;
  }

  .media-gallery-modal-title {
    font-size: 1.25rem;
  }

  .media-gallery-modal-actions {
    gap: 0.5rem;
    margin-bottom: 0.75rem;
  }

  .media-gallery-action-btn {
    padding: 0.75rem 0.5rem;
  }

  .media-gallery-action-icon {
    font-size: 1.75rem;
  }

  .media-gallery-action-label {
    font-size: 0.75rem;
  }

  .media-gallery-modal-upload-area {
    padding: 1.5rem 0.75rem;
    margin-bottom: 0.75rem;
  }

  .media-gallery-modal-upload-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
  }

  .media-gallery-modal-upload-text {
    font-size: 0.85rem;
    margin-bottom: 0.75rem;
  }

  .media-gallery-modal-upload-btn {
    padding: 0.65rem 1.25rem;
    font-size: 0.85rem;
  }

  .media-gallery-modal-url-section {
    max-width: 100%;
  }

  .media-gallery-url-input {
    padding: 0.75rem 1rem;
    font-size: 0.9rem;
  }

  .media-gallery-url-paste-btn {
    padding: 0.75rem 1.25rem;
    font-size: 0.85rem;
  }
}

/* Recording Steps */
.media-gallery-record-step {
  width: 100%;
  max-width: 800px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
  padding: 2rem 0;
  flex-shrink: 0;
}

.media-gallery-record-controls {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}

.media-gallery-record-btn {
  padding: 1rem 2.5rem;
  background: #00ff88;
  border: 2px solid #00ff88;
  border-radius: 8px;
  color: #000000;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  outline: none;
  -webkit-tap-highlight-color: transparent;
  min-width: 200px;
}

.media-gallery-record-btn.start {
  background: #00ff88;
  color: #000000;
}

.media-gallery-record-btn.start:hover {
  background: #00cc6a;
  border-color: #00cc6a;
  transform: translateY(-2px);
}

.media-gallery-record-btn.stop {
  background: #ff4444;
  border-color: #ff4444;
  color: #ffffff;
}

.media-gallery-record-btn.stop:hover {
  background: #cc3333;
  border-color: #cc3333;
  transform: translateY(-2px);
}

.media-gallery-record-btn.secondary {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.2);
  color: #ffffff;
}

.media-gallery-record-btn.secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.3);
}

.media-gallery-record-btn:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(0, 255, 136, 0.2);
}

.media-gallery-record-btn:active {
  transform: scale(0.98);
}

.media-gallery-recording-indicator {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: #ff4444;
  font-size: 1.1rem;
  font-weight: 600;
}

.recording-dot {
  width: 12px;
  height: 12px;
  background: #ff4444;
  border-radius: 50%;
  animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.5;
    transform: scale(0.8);
  }
}

.media-gallery-record-preview {
  width: 100%;
  max-width: 600px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.media-gallery-record-preview audio,
.media-gallery-record-preview video {
  width: 100%;
  border-radius: 8px;
}

.media-gallery-record-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: center;
}

.media-gallery-webcam-preview {
  width: 100%;
  max-width: 600px;
  height: auto;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  object-fit: contain;
}

.media-gallery-captured-photo {
  width: 100%;
  max-width: 600px;
  height: auto;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  object-fit: contain;
}

@media (max-width: 768px) {
  .media-gallery-record-step {
    padding: 1rem 0;
    gap: 1.5rem;
  }

  .media-gallery-record-btn {
    padding: 0.875rem 2rem;
    font-size: 1rem;
    min-width: 180px;
  }

  .media-gallery-recording-indicator {
    font-size: 1rem;
  }

  .media-gallery-record-actions {
    flex-direction: column;
    width: 100%;
  }

  .media-gallery-record-actions .media-gallery-record-btn {
    width: 100%;
  }

  .media-gallery-webcam-preview,
  .media-gallery-captured-photo {
    max-width: 100%;
  }

  .media-gallery-modal-back-btn {
    font-size: 0.85rem;
    padding: 0.4rem 0.8rem;
  }
}

@media (max-width: 480px) {
  .media-gallery-record-step {
    padding: 0.75rem 0;
    gap: 1rem;
  }

  .media-gallery-record-btn {
    padding: 0.75rem 1.5rem;
    font-size: 0.9rem;
    min-width: 160px;
  }

  .media-gallery-recording-indicator {
    font-size: 0.9rem;
  }

  .media-gallery-webcam-preview,
  .media-gallery-captured-photo {
    max-width: 100%;
  }
}
.delete-modal-overlay {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  background: rgba(0, 0, 0, 0.85) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  z-index: 9999 !important;
  animation: fadeIn 0.2s ease;
  padding: 1rem;
  box-sizing: border-box;
}

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

.delete-modal-content {
  background: linear-gradient(135deg, rgba(220, 38, 38, 0.15) 0%, rgba(185, 28, 28, 0.2) 100%) !important;
  backdrop-filter: blur(20px) !important;
  border: 1px solid rgba(220, 38, 38, 0.3) !important;
  border-radius: 0 !important;
  padding: 3rem 2rem !important;
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  max-height: none !important;
  animation: slideUp 0.3s ease;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  text-align: center !important;
  box-sizing: border-box !important;
  position: relative !important;
}

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

.delete-modal-icon {
  font-size: 4rem;
  margin-bottom: 1.5rem;
  line-height: 1;
  animation: shake 0.5s ease;
}

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

.delete-modal-title {
  font-size: 2rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.95);
  margin: 0 0 0.75rem 0;
  line-height: 1.2;
}

.delete-modal-subtitle {
  font-size: 1.25rem;
  color: rgba(255, 200, 200, 0.9);
  margin: 0 0 1.5rem 0;
  font-weight: 500;
}

.delete-modal-message {
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.7);
  margin: 0 0 2.5rem 0;
  line-height: 1.6;
  max-width: 500px;
}

.delete-modal-actions {
  display: flex;
  gap: 1rem;
  width: 100%;
  max-width: 400px;
  flex-direction: column;
}

@media (min-width: 768px) {
  .delete-modal-content {
    padding: 4rem 3rem;
  }

  .delete-modal-icon {
    font-size: 5rem;
    margin-bottom: 2rem;
  }

  .delete-modal-title {
    font-size: 2.5rem;
  }

  .delete-modal-subtitle {
    font-size: 1.5rem;
  }

  .delete-modal-message {
    font-size: 1.125rem;
    margin-bottom: 3rem;
  }

  .delete-modal-actions {
    flex-direction: row;
    max-width: 500px;
  }
}

.btn-cancel-delete,
.btn-confirm-delete {
  padding: 1rem 2rem;
  border: none;
  border-radius: 0.5rem;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  flex: 1;
  min-width: 120px;
}

.btn-cancel-delete {
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-cancel-delete:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.3);
  transform: translateY(-1px);
}

.btn-confirm-delete {
  background: rgba(220, 38, 38, 0.8);
  color: rgba(255, 255, 255, 0.95);
  border: 1px solid rgba(220, 38, 38, 0.9);
  font-weight: 600;
}

.btn-confirm-delete:hover {
  background: rgba(220, 38, 38, 0.95);
  border-color: rgba(220, 38, 38, 1);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(220, 38, 38, 0.4);
}

.btn-confirm-delete:active {
  transform: translateY(0);
}

@media (min-width: 768px) {
  .btn-cancel-delete,
  .btn-confirm-delete {
    padding: 1.125rem 2.5rem;
    font-size: 1.125rem;
  }
}
.maggrid-container {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  touch-action: none;
  overscroll-behavior-x: none;
  overscroll-behavior-y: none;
  overscroll-behavior: none;
}

.maggrid-card {
  position: absolute;
  pointer-events: auto;
  user-select: none;
}

.maggrid-card:not(:active):hover {
  filter: brightness(1.1);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4), 0 3px 6px rgba(0, 0, 0, 0.3) !important;
}

/* Snap-preview shadow: where the card will land on release */
.maggrid-card-snap-shadow {
  transition: transform 0.05s ease-out;
}

/* Connect mode notice - adjust position on mobile to account for header */
@media (max-width: 768px) {
  .maggrid-connect-notice {
    top: 70px !important; /* Account for AdminNav header on mobile */
  }
  
  .maggrid-connect-notice.has-validation {
    top: 100px !important; /* Push down more when validation errors are present */
  }
}
.chatroom-container {
  display: flex;
  flex-direction: column;
  height: calc(100vh - var(--admin-nav-height, 72px) - var(--admin-nav-spacing, 20px));
  width: 100%;
  background: linear-gradient(135deg, #0a0a0a 0%, #1a1a2e 50%, #0a0a0a 100%);
  color: #ffffff;
  font-family: 'Rubik', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  overflow: hidden;
  padding: 0;
  box-sizing: border-box;
  padding-top: calc(var(--admin-nav-height, 72px) + var(--admin-nav-spacing, 20px));
}

/* Header */
.chatroom-header {
  display: flex;
  align-items: center;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.05);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  gap: 1rem;
  flex-shrink: 0;
}

.chatroom-exit-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  font-size: 1.5rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.chatroom-exit-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.5);
  transform: scale(1.05);
}

.chatroom-title {
  font-size: 1.25rem;
  font-weight: 600;
  flex: 1;
}

.chatroom-online-users {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.chatroom-user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 2px solid;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.875rem;
  font-weight: 600;
  flex-shrink: 0;
}

.chatroom-more-users {
  background: rgba(100, 100, 100, 0.3) !important;
  border-color: rgba(100, 100, 100, 0.5) !important;
  font-size: 0.75rem;
  box-shadow: none !important;
}

/* Messages wrapper */
.chatroom-messages-wrapper {
  flex: 1;
  position: relative;
  overflow: hidden;
  min-height: 0;
}

.chatroom-scroll-gradient {
  position: absolute;
  left: 0;
  right: 0;
  height: 40px;
  pointer-events: none;
  z-index: 10;
}

.chatroom-scroll-gradient-top {
  top: 0;
  background: linear-gradient(to bottom, rgba(10, 10, 10, 1), transparent);
}

.chatroom-scroll-gradient-bottom {
  bottom: 0;
  background: linear-gradient(to top, rgba(10, 10, 10, 1), transparent);
}

/* Messages container */
.chatroom-messages {
  height: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  -webkit-overflow-scrolling: touch;
}

.chatroom-messages::-webkit-scrollbar {
  width: 8px;
}

.chatroom-messages::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 4px;
}

.chatroom-messages::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 4px;
}

.chatroom-messages::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.3);
}

/* Loading & empty states */
.chatroom-loading,
.chatroom-empty {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100%;
  color: #999999;
  font-size: 0.875rem;
}

.chatroom-spinner {
  font-size: 2rem;
  animation: spin 1s linear infinite;
}

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

/* Message bubble */
.chatroom-message {
  padding: 0.75rem 1rem;
  border-radius: 0.75rem;
  border: 1px solid;
  max-width: 75%;
  word-wrap: break-word;
  align-self: flex-start;
  animation: messageIn 0.2s ease-out;
}

.chatroom-message-own {
  align-self: flex-end;
}

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

.chatroom-message-header {
  margin-bottom: 0.25rem;
}

.chatroom-message-sender {
  font-size: 0.75rem;
  font-weight: 600;
}

.chatroom-message-content {
  font-size: 0.875rem;
  line-height: 1.4;
  color: #ffffff;
}

.chatroom-message-time {
  font-size: 0.625rem;
  color: #999999;
  margin-top: 0.25rem;
  text-align: right;
}

/* Typing area */
.chatroom-typing-area {
  padding: 0 1rem;
  min-height: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}

.chatroom-typing {
  font-size: 0.75rem;
  color: #999999;
  font-style: italic;
}

.chatroom-unread-badge {
  background: #ffd700;
  color: #000000;
  padding: 0.5rem 1rem;
  border-radius: 1rem;
  font-size: 0.875rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(255, 215, 0, 0.5);
  transition: all 0.2s ease;
  font-family: inherit;
}

.chatroom-unread-badge:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(255, 215, 0, 0.6);
}

/* Input form */
.chatroom-input-form {
  display: flex;
  gap: 0.5rem;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.05);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  flex-shrink: 0;
}

.chatroom-input {
  flex: 1;
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  border: 2px solid rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  font-family: inherit;
  font-size: 16px; /* Prevents zoom on mobile */
  outline: none;
  transition: all 0.2s ease;
}

.chatroom-input::placeholder {
  color: rgba(255, 255, 255, 0.5);
}

.chatroom-input:focus {
  border-color: rgba(255, 255, 255, 0.6);
  box-shadow: 0 0 20px rgba(255, 255, 255, 0.1);
}

.chatroom-input:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.chatroom-send-btn {
  padding: 0.75rem 1.5rem;
  border-radius: 0.5rem;
  border: 2px solid rgba(255, 255, 255, 0.4);
  background: rgba(255, 255, 255, 0.15);
  color: #ffffff;
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.chatroom-send-btn:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.25);
  border-color: rgba(255, 255, 255, 0.6);
}

.chatroom-send-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Responsive adjustments */
@media (max-width: 480px) {
  .chatroom-header {
    padding: 0.75rem;
  }
  
  .chatroom-title {
    font-size: 1rem;
  }
  
  .chatroom-user-avatar {
    width: 30px;
    height: 30px;
    font-size: 0.75rem;
  }
  
  .chatroom-message {
    max-width: 85%;
  }
  
  .chatroom-input-form {
    padding: 0.75rem;
  }
  
  .chatroom-send-btn {
    padding: 0.75rem 1rem;
  }
}
/* Radial wheel: supports centered (full circle) or bottom (half circle) positioning */
.wheel-menu {
  --wheel-radius: 160px;
  --wheel-inset: 44px;
  --bottom-gap: 20px;
  pointer-events: auto;
  touch-action: none;
  z-index: 5;
}

/* Center variant: full circle visible, centered in viewport (placementStyle overrides when provided) */
.wheel-menu--center {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: calc(2 * var(--wheel-radius));
  height: calc(2 * var(--wheel-radius));
}

/* Anchor to parent: position relative to container (e.g. OniFrame frame), center badge and expand accurate */
.wheel-menu--anchor-parent.wheel-menu--center {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

/* anchor-parent top/bottom: center the hub on the anchor (track button) */
.wheel-menu--anchor-parent.wheel-menu--top,
.wheel-menu--anchor-parent.wheel-menu--bottom {
  position: absolute;
  top: 50%;
  left: 50%;
  bottom: auto;
  right: auto;
  transform: translate(-50%, -50%);
  width: calc(2 * var(--wheel-radius));
  height: calc(2 * var(--wheel-radius));
}

.wheel-menu--anchor-parent.wheel-menu--top .wheel-menu__hub,
.wheel-menu--anchor-parent.wheel-menu--bottom .wheel-menu__hub {
  position: absolute;
  top: 50%;
  left: 50%;
  bottom: auto;
  transform: translate(-50%, -50%);
}

.wheel-menu--anchor-parent.wheel-menu--top .wheel-menu__wheel,
.wheel-menu--anchor-parent.wheel-menu--bottom .wheel-menu__wheel {
  position: absolute;
  top: 0;
  left: 0;
  bottom: auto;
  margin-left: 0;
  width: 100%;
  height: 100%;
}

.wheel-menu--center .wheel-menu__hub {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: auto;
  z-index: 1; /* above wheel so slots appear to expand from behind the center badge */
}

.wheel-menu--center .wheel-menu__wheel {
  position: absolute;
  top: 0;
  left: 0;
  width: calc(2 * var(--wheel-radius));
  height: calc(2 * var(--wheel-radius));
  border-radius: 50%;
  will-change: transform;
  z-index: 0;
}

/* Bottom variant: only top half visible, bottom-fixed like BottomWheelMenu */
.wheel-menu--bottom {
  position: fixed;
  bottom: calc(var(--bottom-gap) + env(safe-area-inset-bottom, 0px));
  left: env(safe-area-inset-left, 0);
  right: env(safe-area-inset-right, 0);
  height: var(--wheel-radius);
}

.wheel-menu--bottom .wheel-menu__hub {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translate(-50%, 50%);
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: auto;
  z-index: 1; /* above wheel so slots appear to expand from behind the center badge */
}

.wheel-menu--bottom .wheel-menu__wheel {
  position: absolute;
  left: 50%;
  bottom: calc(-1 * var(--wheel-radius));
  width: calc(2 * var(--wheel-radius));
  height: calc(2 * var(--wheel-radius));
  margin-left: calc(-1 * var(--wheel-radius));
  border-radius: 50%;
  z-index: 0;
  will-change: transform;
}

/* Top variant: hub at top center, only bottom half of wheel visible (expands downward) */
.wheel-menu--top {
  position: fixed;
  top: calc(1.5rem + env(safe-area-inset-top, 0px));
  left: 50%;
  transform: translateX(-50%);
  width: calc(2 * var(--wheel-radius));
  height: var(--wheel-radius);
}

.wheel-menu--top .wheel-menu__hub {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translate(-50%, 0);
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: auto;
  z-index: 1; /* above wheel so slots appear to expand from behind the center badge */
}

.wheel-menu--top .wheel-menu__wheel {
  position: absolute;
  top: 0;
  left: 50%;
  width: calc(2 * var(--wheel-radius));
  height: calc(2 * var(--wheel-radius));
  margin-left: calc(-1 * var(--wheel-radius));
  border-radius: 50%;
  will-change: transform;
  z-index: 0;
}

.wheel-menu__wheel--snap {
  transition: transform 0.18s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* Collapsed: only hub visible; wheel hidden; only hub receives clicks when stacked */
.wheel-menu--collapsed {
  pointer-events: none;
}

.wheel-menu--collapsed .wheel-menu__hub {
  pointer-events: auto;
}

.wheel-menu--collapsed .wheel-menu__wheel {
  pointer-events: none;
  /* No opacity/visibility fade – badges animate to center via slot-wrap transform */
}

.wheel-menu:not(.wheel-menu--collapsed) .wheel-menu__wheel {
  pointer-events: auto;
}

.wheel-menu__slot-wrap--empty {
  display: none;
  pointer-events: none;
}

.wheel-menu__slot-wrap {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  top: 0;
  left: 0;
  transform-origin: center center;
  /* Explicit translate(0,0) scale(1) so transition can interpolate to/from collapsed state */
  transform: translate(0, 0) scale(1) rotate(var(--slot-rotation, 0deg));
  transition: transform 0.28s ease-out;
}

.wheel-menu__slot-wrap--snap {
  transition: transform 0.18s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* Collapse: badges move to center and scale down (grow from center when expanding) */
.wheel-menu--collapsed .wheel-menu__slot-wrap {
  transform: translate(var(--slot-dx, 0), var(--slot-dy, 0)) scale(0) rotate(var(--slot-rotation, 0deg));
}

.wheel-menu__slot {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: none;
  background: #ffffff;
  color: #1a1a1a;
  font-size: 1.875rem;
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
  transition: background 0.15s ease, box-shadow 0.15s ease, transform 0.1s ease;
  -webkit-tap-highlight-color: transparent;
  touch-action: none;
  transform-origin: center center;
  outline: none;
  /* Outer golden lining: white, shiny gold, glow (same style as lobby frame) */
  box-shadow:
    0 0 0 2px #fff,
    0 0 0 5px #f5d76e,
    0 0 12px 4px rgba(245, 215, 110, 0.35);
}

.wheel-menu__slot:focus,
.wheel-menu__slot:focus-visible,
.wheel-menu__slot:active {
  outline: none;
}

/* Override global button:hover { border-color: #646cff } for wheel badges */
.wheel-menu__slot,
.wheel-menu__slot:hover,
.wheel-menu__slot:focus,
.wheel-menu__slot:focus-visible,
.wheel-menu__slot:active {
  border-color: transparent !important;
}

/* Center badge (hub): no outline/border change on hover/focus – override global button styles */
.wheel-menu__hub button,
.wheel-menu__hub [role="button"] {
  outline: none !important;
  outline-offset: 0 !important;
  -webkit-tap-highlight-color: transparent;
  border-color: transparent !important;
}

.wheel-menu__hub button:hover,
.wheel-menu__hub button:focus,
.wheel-menu__hub button:focus-visible,
.wheel-menu__hub button:active,
.wheel-menu__hub [role="button"]:hover,
.wheel-menu__hub [role="button"]:focus,
.wheel-menu__hub [role="button"]:focus-visible,
.wheel-menu__hub [role="button"]:active {
  outline: none !important;
  outline-offset: 0 !important;
  border-color: transparent !important;
}

/* Restore hub content's own shadow when it has class wheel-menu-view-hub-content */
.wheel-menu__hub .wheel-menu-view-hub-content:focus,
.wheel-menu__hub .wheel-menu-view-hub-content:focus-visible,
.wheel-menu__hub .wheel-menu-view-hub-content:active {
  box-shadow:
    0px 3px 8px rgba(170, 170, 170, 0.6),
    inset 0px 2px 3px rgba(255, 255, 255, 0.8) !important;
}

.wheel-menu__slot .wheel-menu__slot-icon {
  display: block;
  line-height: 1;
  text-align: center;
}

.wheel-menu__slot:hover:not(.wheel-menu__slot--disabled):not(.wheel-menu__slot--empty) {
  background: #f5f5f5;
  transform: scale(1.05);
  box-shadow:
    0 0 0 2px #fff,
    0 0 0 5px #f5d76e,
    0 0 14px 5px rgba(245, 215, 110, 0.4);
}

.wheel-menu__slot:active:not(.wheel-menu__slot--disabled):not(.wheel-menu__slot--empty) {
  transform: scale(0.98);
}

.wheel-menu__slot--disabled,
.wheel-menu__slot--disabled:hover,
.wheel-menu__slot--disabled:focus,
.wheel-menu__slot--disabled:focus-visible,
.wheel-menu__slot--disabled:active {
  outline: none;
  -webkit-tap-highlight-color: transparent;
}

.wheel-menu__slot--disabled {
  opacity: 0.5;
  cursor: not-allowed;
  box-shadow:
    0 0 0 2px #fff,
    0 0 0 5px rgba(245, 215, 110, 0.5),
    0 0 8px 3px rgba(245, 215, 110, 0.2);
  pointer-events: none;
}

.wheel-menu__slot--empty,
.wheel-menu__slot--empty:hover,
.wheel-menu__slot--empty:focus,
.wheel-menu__slot--empty:focus-visible {
  outline: none;
}

.wheel-menu__slot--empty {
  opacity: 0.4;
  cursor: default;
  box-shadow:
    0 0 0 2px rgba(255, 255, 255, 0.9),
    0 0 0 5px rgba(245, 215, 110, 0.5),
    0 0 8px 3px rgba(245, 215, 110, 0.2);
}
.oniframe {
  width: 100%;
  height: 100%;
  min-height: 100dvh;
  background: transparent;
  color: #fff;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  box-sizing: border-box;
  box-shadow: inset 0 0 0 10px #fff;
  z-index: 2;
  pointer-events: none;
}

.oniframe-frame-fill {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0.5;
}
.oniframe-frame-fill-corner {
  position: absolute;
  width: 70px;
  height: 70px;
  background: #fff;
}
.oniframe-frame-fill-corner--tl { top: 0; left: 0; mask: radial-gradient(circle at 70px 70px, transparent 60px, #fff 60px); -webkit-mask: radial-gradient(circle at 70px 70px, transparent 60px, #fff 60px); }
.oniframe-frame-fill-corner--tr { top: 0; right: 0; left: auto; mask: radial-gradient(circle at 0 70px, transparent 60px, #fff 60px); -webkit-mask: radial-gradient(circle at 0 70px, transparent 60px, #fff 60px); }
.oniframe-frame-fill-corner--br { bottom: 0; right: 0; left: auto; top: auto; mask: radial-gradient(circle at 0 0, transparent 60px, #fff 60px); -webkit-mask: radial-gradient(circle at 0 0, transparent 60px, #fff 60px); }
.oniframe-frame-fill-corner--bl { bottom: 0; left: 0; top: auto; mask: radial-gradient(circle at 70px 0, transparent 60px, #fff 60px); -webkit-mask: radial-gradient(circle at 70px 0, transparent 60px, #fff 60px); }

.oniframe-goo {
  position: absolute;
  inset: 0;
  border-radius: 0;
  isolation: isolate;
  pointer-events: none;
  z-index: 0;
}

.oniframe-frame-blob {
  position: absolute;
  inset: 0;
  border-radius: 60px;
  background: transparent;
  border: 24px solid #fff;
  pointer-events: none;
}

.oniframe-button-blob {
  position: absolute;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 0 8px #fff;
  pointer-events: none;
  transition: box-shadow 0.2s ease;
}
.oniframe-button-blob--snapped {
  box-shadow: 0 0 0 20px #fff;
}
.oniframe-button-blob--goo {
  box-shadow: 0 0 0 12px #fff;
}
.oniframe-button-blob--delete-intent {
  background: #ff6464;
  box-shadow: 0 0 0 10px #ff6464;
}
.oniframe-button-blob--open {
  box-shadow: 0 0 0 6px #fff;
}

.oniframe::before {
  content: "";
  position: absolute;
  inset: 20px;
  border-radius: 60px;
  background: rgba(0, 0, 0, 0.3);
  pointer-events: none;
  z-index: 1;
}

.oniframe::after {
  content: "";
  position: absolute;
  inset: 9px;
  border-radius: 60px;
  box-shadow: inset 0 0 0 10px #fff;
  pointer-events: none;
  z-index: 2;
}

.oniframe-zones {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 4;
}
.oniframe-zones svg {
  width: 100%;
  height: 100%;
  display: block;
}

.oniframe-content {
  position: relative;
  flex: 1;
  min-height: 0;
  pointer-events: none;
  z-index: 3;
}

.oniframe-center {
  position: absolute;
  inset: 0;
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
}
.oniframe-center > * {
  pointer-events: auto;
}

.oniframe-center-badge {
  pointer-events: auto;
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  min-width: 200px;
  max-width: 90%;
  max-height: 80%;
  padding: 1.5rem;
  background: rgba(255, 255, 255, 0.95);
  color: #111;
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  z-index: 50;
  overflow: auto;
}
.oniframe-center-badge-placeholder {
  margin: 0 0 2rem;
  font-size: 1rem;
}
.oniframe-center-badge-close {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.08);
  color: #333;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.oniframe-center-badge-close:hover {
  background: rgba(0, 0, 0, 0.12);
}
.oniframe-center-badge-close .material-icons {
  font-size: 20px;
}

.oniframe-track-btn {
  pointer-events: auto;
  position: fixed;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: #fff;
  border: none;
  cursor: grab;
  padding: 0;
  touch-action: none;
  box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.2);
  z-index: 10000; /* above wheel anchor (9999) so badges remain clickable when menus are open */
  display: flex;
  align-items: center;
  justify-content: center;
  outline: none;
  outline-offset: 0;
  -webkit-tap-highlight-color: transparent;
}
.oniframe-track-btn:focus,
.oniframe-track-btn:focus-visible,
.oniframe-track-btn:active {
  outline: none;
  outline-offset: 0;
}
.oniframe-track-btn:active {
  cursor: grabbing;
}
.oniframe-track-btn:hover {
  background: #f5f5f5;
}
.oniframe-track-btn .material-icons {
  font-size: 32px;
  color: #333;
}
.oniframe-track-btn--delete-intent,
.oniframe-track-btn--snapped,
.oniframe-track-btn--goo {
  background: #fff;
  box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.2);
}
.oniframe-track-btn--delete-intent .material-icons,
.oniframe-track-btn--snapped .material-icons,
.oniframe-track-btn--goo .material-icons {
  color: #333;
}
.oniframe-track-btn--delete-intent:hover,
.oniframe-track-btn--snapped:hover,
.oniframe-track-btn--goo:hover {
  background: #f5f5f5;
}
.oniframe-track-btn--open {
  box-shadow: 0 0 0 4px #fff;
  z-index: 10001; /* above other badges (10000) and wheel anchor (9999) so clicking badge when menu is open closes it */
}

/* Anchor for WheelMenu: center at track button; wheel uses anchor="parent" to position inside this box. Above all other OniFrame/view UI so menu is clickable. */
.oniframe-wheel-anchor {
  position: fixed;
  pointer-events: none;
  z-index: 9999;
  /* Containing block for WheelMenu (anchor=parent): wheel centers with position: absolute; top/left 50%; translate(-50%, -50%) */
}
.oniframe-wheel-anchor .wheel-menu {
  pointer-events: auto;
}

/* Hub close button when wheel is open (center badge to close menu) */
.oniframe-wheel-hub-close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 72px;
  height: 72px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: #fff;
  color: #333;
  cursor: pointer;
  box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.2);
  -webkit-tap-highlight-color: transparent;
}
.oniframe-wheel-hub-close:hover {
  background: #f5f5f5;
}
.oniframe-wheel-hub-close .material-icons {
  font-size: 32px;
}
/* packages/widgets/Source/shared.css */
.cesium-svgPath-svg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
}
.cesium-button {
  display: inline-block;
  position: relative;
  background: #303336;
  border: 1px solid #444;
  color: #edffff;
  fill: #edffff;
  border-radius: 4px;
  padding: 5px 12px;
  margin: 2px 3px;
  cursor: pointer;
  overflow: hidden;
  -moz-user-select: none;
  -webkit-user-select: none;
  -ms-user-select: none;
  user-select: none;
}
.cesium-button:focus {
  color: #fff;
  fill: #fff;
  border-color: #ea4;
  outline: none;
}
.cesium-button:hover {
  color: #fff;
  fill: #fff;
  background: #48b;
  border-color: #aef;
  box-shadow: 0 0 8px #fff;
}
.cesium-button:active {
  color: #000;
  fill: #000;
  background: #adf;
  border-color: #fff;
  box-shadow: 0 0 8px #fff;
}
.cesium-button:disabled,
.cesium-button-disabled,
.cesium-button-disabled:focus,
.cesium-button-disabled:hover,
.cesium-button-disabled:active {
  background: #303336;
  border-color: #444;
  color: #646464;
  fill: #646464;
  box-shadow: none;
  cursor: default;
}
.cesium-button option {
  background-color: #000;
  color: #eee;
}
.cesium-button option:disabled {
  color: #777;
}
.cesium-button input,
.cesium-button label {
  cursor: pointer;
}
.cesium-button input {
  vertical-align: sub;
}
.cesium-toolbar-button {
  box-sizing: border-box;
  width: 32px;
  height: 32px;
  border-radius: 14%;
  padding: 0;
  vertical-align: middle;
  z-index: 0;
}
.cesium-performanceDisplay-defaultContainer {
  position: absolute;
  top: 50px;
  right: 10px;
  text-align: right;
}
.cesium-performanceDisplay {
  background-color: rgba(40, 40, 40, 0.7);
  padding: 7px;
  border-radius: 5px;
  border: 1px solid #444;
  font: bold 12px sans-serif;
}
.cesium-performanceDisplay-fps {
  color: #e52;
}
.cesium-performanceDisplay-throttled {
  color: #a42;
}
.cesium-performanceDisplay-ms {
  color: #de3;
}

/* packages/widgets/Source/Animation/Animation.css */
.cesium-animation-theme {
  visibility: hidden;
  display: block;
  position: absolute;
  z-index: -100;
}
.cesium-animation-themeNormal {
  color: #222;
}
.cesium-animation-themeHover {
  color: #4488b0;
}
.cesium-animation-themeSelect {
  color: #242;
}
.cesium-animation-themeDisabled {
  color: #333;
}
.cesium-animation-themeKnob {
  color: #222;
}
.cesium-animation-themePointer {
  color: #2e2;
}
.cesium-animation-themeSwoosh {
  color: #8ac;
}
.cesium-animation-themeSwooshHover {
  color: #aef;
}
.cesium-animation-svgText {
  fill: #edffff;
  font-family: Sans-Serif;
  font-size: 15px;
  text-anchor: middle;
}
.cesium-animation-blank {
  fill: #000;
  fill-opacity: 0.01;
  stroke: none;
}
.cesium-animation-rectButton {
  cursor: pointer;
  -moz-user-select: none;
  -webkit-user-select: none;
  -ms-user-select: none;
  user-select: none;
}
.cesium-animation-rectButton .cesium-animation-buttonGlow {
  fill: #fff;
  stroke: none;
  display: none;
}
.cesium-animation-rectButton:hover .cesium-animation-buttonGlow {
  display: block;
}
.cesium-animation-rectButton .cesium-animation-buttonPath {
  fill: #edffff;
}
.cesium-animation-rectButton .cesium-animation-buttonMain {
  stroke: #444;
  stroke-width: 1.2;
}
.cesium-animation-rectButton:hover .cesium-animation-buttonMain {
  stroke: #aef;
}
.cesium-animation-rectButton:active .cesium-animation-buttonMain {
  fill: #abd6ff;
}
.cesium-animation-buttonDisabled {
  -moz-user-select: none;
  -webkit-user-select: none;
  -ms-user-select: none;
  user-select: none;
}
.cesium-animation-buttonDisabled .cesium-animation-buttonMain {
  stroke: #555;
}
.cesium-animation-buttonDisabled .cesium-animation-buttonPath {
  fill: #818181;
}
.cesium-animation-buttonDisabled .cesium-animation-buttonGlow {
  display: none;
}
.cesium-animation-buttonToggled .cesium-animation-buttonGlow {
  display: block;
  fill: #2e2;
}
.cesium-animation-buttonToggled .cesium-animation-buttonMain {
  stroke: #2e2;
}
.cesium-animation-buttonToggled:hover .cesium-animation-buttonGlow {
  fill: #fff;
}
.cesium-animation-buttonToggled:hover .cesium-animation-buttonMain {
  stroke: #2e2;
}
.cesium-animation-shuttleRingG {
  cursor: pointer;
}
.cesium-animation-shuttleRingPointer {
  cursor: pointer;
}
.cesium-animation-shuttleRingPausePointer {
  cursor: pointer;
}
.cesium-animation-shuttleRingBack {
  fill: #181818;
  fill-opacity: 0.8;
  stroke: #333;
  stroke-width: 1.2;
}
.cesium-animation-shuttleRingSwoosh line {
  stroke: #8ac;
  stroke-width: 3;
  stroke-opacity: 0.2;
  stroke-linecap: round;
}
.cesium-animation-knobOuter {
  cursor: pointer;
  stroke: #444;
  stroke-width: 1.2;
}
.cesium-animation-knobInner {
  cursor: pointer;
}

/* packages/widgets/Source/BaseLayerPicker/BaseLayerPicker.css */
.cesium-baseLayerPicker-selected {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}
.cesium-baseLayerPicker-dropDown {
  display: block;
  position: absolute;
  box-sizing: content-box;
  top: auto;
  right: 0;
  width: 320px;
  max-height: 500px;
  margin-top: 5px;
  background-color: rgba(38, 38, 38, 0.75);
  border: 1px solid #444;
  padding: 6px;
  overflow: auto;
  border-radius: 10px;
  -moz-user-select: none;
  -webkit-user-select: none;
  -ms-user-select: none;
  user-select: none;
  transform: translate(0, -20%);
  visibility: hidden;
  opacity: 0;
  transition:
    visibility 0s 0.2s,
    opacity 0.2s ease-in,
    transform 0.2s ease-in;
}
.cesium-baseLayerPicker-dropDown-visible {
  transform: translate(0, 0);
  visibility: visible;
  opacity: 1;
  transition: opacity 0.2s ease-out, transform 0.2s ease-out;
}
.cesium-baseLayerPicker-sectionTitle {
  display: block;
  font-family: sans-serif;
  font-size: 16pt;
  text-align: left;
  color: #edffff;
  margin-bottom: 4px;
}
.cesium-baseLayerPicker-choices {
  margin-bottom: 5px;
}
.cesium-baseLayerPicker-categoryTitle {
  color: #edffff;
  font-size: 11pt;
}
.cesium-baseLayerPicker-choices {
  display: block;
  border: 1px solid #888;
  border-radius: 5px;
  padding: 5px 0;
}
.cesium-baseLayerPicker-item {
  display: inline-block;
  vertical-align: top;
  margin: 2px 5px;
  width: 64px;
  text-align: center;
  cursor: pointer;
}
.cesium-baseLayerPicker-itemLabel {
  display: block;
  font-family: sans-serif;
  font-size: 8pt;
  text-align: center;
  vertical-align: middle;
  color: #edffff;
  cursor: pointer;
  word-wrap: break-word;
}
.cesium-baseLayerPicker-item:hover .cesium-baseLayerPicker-itemLabel,
.cesium-baseLayerPicker-item:focus .cesium-baseLayerPicker-itemLabel {
  text-decoration: underline;
}
.cesium-baseLayerPicker-itemIcon {
  display: inline-block;
  position: relative;
  width: inherit;
  height: auto;
  background-size: 100% 100%;
  border: solid 1px #444;
  border-radius: 9px;
  color: #edffff;
  margin: 0;
  padding: 0;
  cursor: pointer;
  box-sizing: border-box;
}
.cesium-baseLayerPicker-item:hover .cesium-baseLayerPicker-itemIcon {
  border-color: #fff;
  box-shadow: 0 0 8px #fff, 0 0 8px #fff;
}
.cesium-baseLayerPicker-selectedItem .cesium-baseLayerPicker-itemLabel {
  color: rgb(189, 236, 248);
}
.cesium-baseLayerPicker-selectedItem .cesium-baseLayerPicker-itemIcon {
  border: double 4px rgb(189, 236, 248);
}

/* packages/engine/Source/Widget/CesiumWidget.css */
.cesium-widget {
  font-family: sans-serif;
  font-size: 16px;
  overflow: hidden;
  display: block;
  position: relative;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}
.cesium-widget,
.cesium-widget canvas {
  width: 100%;
  height: 100%;
  touch-action: none;
}
.cesium-widget-credits {
  display: block;
  position: absolute;
  bottom: 0;
  left: 0;
  color: #fff;
  font-size: 10px;
  text-shadow: 0px 0px 2px #000000;
  padding-right: 5px;
}
.cesium-widget-errorPanel {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  text-align: center;
  background: rgba(0, 0, 0, 0.7);
  z-index: 99999;
}
.cesium-widget-errorPanel:before {
  display: inline-block;
  vertical-align: middle;
  height: 100%;
  content: "";
}
.cesium-widget-errorPanel-content {
  width: 75%;
  max-width: 500px;
  display: inline-block;
  text-align: left;
  vertical-align: middle;
  border: 1px solid #510c00;
  border-radius: 7px;
  background-color: #f0d9d5;
  font-size: 14px;
  color: #510c00;
}
.cesium-widget-errorPanel-content.expanded {
  max-width: 75%;
}
.cesium-widget-errorPanel-header {
  font-size: 18px;
  font-family:
    "Open Sans",
    Verdana,
    Geneva,
    sans-serif;
  background: #d69d93;
  border-bottom: 2px solid #510c00;
  padding-bottom: 10px;
  border-radius: 3px 3px 0 0;
  padding: 15px;
}
.cesium-widget-errorPanel-scroll {
  overflow: auto;
  font-family:
    "Open Sans",
    Verdana,
    Geneva,
    sans-serif;
  white-space: pre-wrap;
  padding: 0 15px;
  margin: 10px 0 20px 0;
}
.cesium-widget-errorPanel-buttonPanel {
  padding: 0 15px;
  margin: 10px 0 20px 0;
  text-align: right;
}
.cesium-widget-errorPanel-buttonPanel button {
  border-color: #510c00;
  background: #d69d93;
  color: #202020;
  margin: 0;
}
.cesium-widget-errorPanel-buttonPanel button:focus {
  border-color: #510c00;
  background: #f0d9d5;
  color: #510c00;
}
.cesium-widget-errorPanel-buttonPanel button:hover {
  border-color: #510c00;
  background: #f0d9d5;
  color: #510c00;
}
.cesium-widget-errorPanel-buttonPanel button:active {
  border-color: #510c00;
  background: #b17b72;
  color: #510c00;
}
.cesium-widget-errorPanel-more-details {
  text-decoration: underline;
  cursor: pointer;
}
.cesium-widget-errorPanel-more-details:hover {
  color: #2b0700;
}

/* packages/widgets/Source/CesiumInspector/CesiumInspector.css */
.cesium-cesiumInspector {
  border-radius: 5px;
  transition: width ease-in-out 0.25s;
  background: rgba(48, 51, 54, 0.8);
  border: 1px solid #444;
  color: #edffff;
  display: inline-block;
  position: relative;
  padding: 4px 12px;
  -moz-user-select: none;
  -webkit-user-select: none;
  -ms-user-select: none;
  user-select: none;
  overflow: hidden;
}
.cesium-cesiumInspector-button {
  text-align: center;
  font-size: 11pt;
}
.cesium-cesiumInspector-visible .cesium-cesiumInspector-button {
  border-bottom: 1px solid #aaa;
  padding-bottom: 3px;
}
.cesium-cesiumInspector input:enabled,
.cesium-cesiumInspector-button {
  cursor: pointer;
}
.cesium-cesiumInspector-visible {
  width: 185px;
  height: auto;
}
.cesium-cesiumInspector-hidden {
  width: 122px;
  height: 17px;
}
.cesium-cesiumInspector-sectionContent {
  max-height: 600px;
}
.cesium-cesiumInspector-section-collapsed .cesium-cesiumInspector-sectionContent {
  max-height: 0;
  padding: 0 !important;
  overflow: hidden;
}
.cesium-cesiumInspector-dropDown {
  margin: 5px 0;
  font-family: sans-serif;
  font-size: 10pt;
  width: 185px;
}
.cesium-cesiumInspector-frustumStatistics {
  padding-left: 10px;
  padding: 5px;
  background-color: rgba(80, 80, 80, 0.75);
}
.cesium-cesiumInspector-pickButton {
  background-color: rgba(0, 0, 0, 0.3);
  border: 1px solid #444;
  color: #edffff;
  border-radius: 5px;
  padding: 3px 7px;
  cursor: pointer;
  -moz-user-select: none;
  -webkit-user-select: none;
  -ms-user-select: none;
  user-select: none;
  margin: 0 auto;
}
.cesium-cesiumInspector-pickButton:focus {
  outline: none;
}
.cesium-cesiumInspector-pickButton:active,
.cesium-cesiumInspector-pickButtonHighlight {
  color: #000;
  background: #adf;
  border-color: #fff;
  box-shadow: 0 0 8px #fff;
}
.cesium-cesiumInspector-center {
  text-align: center;
}
.cesium-cesiumInspector-sectionHeader {
  font-weight: bold;
  font-size: 10pt;
  margin: 0;
  cursor: pointer;
}
.cesium-cesiumInspector-pickSection {
  border: 1px solid #aaa;
  border-radius: 5px;
  padding: 3px;
  margin-bottom: 5px;
}
.cesium-cesiumInspector-sectionContent {
  margin-bottom: 10px;
  transition: max-height 0.25s;
}
.cesium-cesiumInspector-tileText {
  padding-bottom: 10px;
  border-bottom: 1px solid #aaa;
}
.cesium-cesiumInspector-relativeText {
  padding-top: 10px;
}
.cesium-cesiumInspector-sectionHeader::before {
  margin-right: 5px;
  content: "-";
  width: 1ch;
  display: inline-block;
}
.cesium-cesiumInspector-section-collapsed .cesium-cesiumInspector-sectionHeader::before {
  content: "+";
}

/* packages/widgets/Source/Cesium3DTilesInspector/Cesium3DTilesInspector.css */
ul.cesium-cesiumInspector-statistics {
  margin: 0;
  padding-top: 3px;
  padding-bottom: 3px;
}
ul.cesium-cesiumInspector-statistics + ul.cesium-cesiumInspector-statistics {
  border-top: 1px solid #aaa;
}
.cesium-cesiumInspector-slider {
  margin-top: 5px;
}
.cesium-cesiumInspector-slider input[type=number] {
  text-align: left;
  background-color: #222;
  outline: none;
  border: 1px solid #444;
  color: #edffff;
  width: 100px;
  border-radius: 3px;
  padding: 1px;
  margin-left: 10px;
  cursor: auto;
}
.cesium-cesiumInspector-slider input[type=number]::-webkit-outer-spin-button,
.cesium-cesiumInspector-slider input[type=number]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.cesium-cesiumInspector-slider input[type=range] {
  margin-left: 5px;
  vertical-align: middle;
}
.cesium-cesiumInspector-hide .cesium-cesiumInspector-styleEditor {
  display: none;
}
.cesium-cesiumInspector-styleEditor {
  padding: 10px;
  border-radius: 5px;
  background: rgba(48, 51, 54, 0.8);
  border: 1px solid #444;
}
.cesium-cesiumInspector-styleEditor textarea {
  width: 100%;
  height: 300px;
  background: transparent;
  color: #edffff;
  border: none;
  padding: 0;
  white-space: pre;
  overflow-wrap: normal;
  overflow-x: auto;
}
.cesium-3DTilesInspector {
  width: 300px;
  pointer-events: all;
}
.cesium-3DTilesInspector-statistics {
  font-size: 11px;
}
.cesium-3DTilesInspector-disabledElementsInfo {
  margin: 5px 0 0 0;
  padding: 0 0 0 20px;
  color: #eed202;
}
.cesium-3DTilesInspector div,
.cesium-3DTilesInspector input[type=range] {
  width: 100%;
  box-sizing: border-box;
}
.cesium-cesiumInspector-error {
  color: #ff9e9e;
  overflow: auto;
}
.cesium-3DTilesInspector .cesium-cesiumInspector-section {
  margin-top: 3px;
}
.cesium-3DTilesInspector .cesium-cesiumInspector-sectionHeader + .cesium-cesiumInspector-show {
  border-top: 1px solid white;
}
input.cesium-cesiumInspector-url {
  overflow: hidden;
  white-space: nowrap;
  overflow-x: scroll;
  background-color: transparent;
  color: white;
  outline: none;
  border: none;
  height: 1em;
  width: 100%;
}
.cesium-cesiumInspector .field-group {
  display: table;
}
.cesium-cesiumInspector .field-group > label {
  display: table-cell;
  font-weight: bold;
}
.cesium-cesiumInspector .field-group > .field {
  display: table-cell;
  width: 100%;
}

/* packages/widgets/Source/VoxelInspector/VoxelInspector.css */
.cesium-VoxelInspector {
  width: 300px;
  pointer-events: all;
}
.cesium-VoxelInspector div,
.cesium-VoxelInspector input[type=range] {
  width: 100%;
  box-sizing: border-box;
}
.cesium-VoxelInspector .cesium-cesiumInspector-section {
  margin-top: 3px;
}
.cesium-VoxelInspector .cesium-cesiumInspector-sectionHeader + .cesium-cesiumInspector-show {
  border-top: 1px solid white;
}

/* packages/widgets/Source/FullscreenButton/FullscreenButton.css */
.cesium-button.cesium-fullscreenButton {
  display: block;
  width: 100%;
  height: 100%;
  margin: 0;
  border-radius: 0;
}

/* packages/widgets/Source/VRButton/VRButton.css */
.cesium-button.cesium-vrButton {
  display: block;
  width: 100%;
  height: 100%;
  margin: 0;
  border-radius: 0;
}

/* packages/widgets/Source/Geocoder/Geocoder.css */
.cesium-viewer-geocoderContainer .cesium-geocoder-input {
  border: solid 1px #444;
  background-color: rgba(40, 40, 40, 0.7);
  color: white;
  display: inline-block;
  vertical-align: middle;
  width: 0;
  height: 32px;
  margin: 0;
  padding: 0 32px 0 0;
  border-radius: 0;
  box-sizing: border-box;
  transition: width ease-in-out 0.25s, background-color 0.2s ease-in-out;
  -webkit-appearance: none;
}
.cesium-viewer-geocoderContainer:hover .cesium-geocoder-input {
  border-color: #aef;
  box-shadow: 0 0 8px #fff;
}
.cesium-viewer-geocoderContainer .cesium-geocoder-input:focus {
  border-color: #ea4;
  background-color: rgba(15, 15, 15, 0.9);
  box-shadow: none;
  outline: none;
}
.cesium-viewer-geocoderContainer:hover .cesium-geocoder-input,
.cesium-viewer-geocoderContainer .cesium-geocoder-input:focus,
.cesium-viewer-geocoderContainer .cesium-geocoder-input-wide {
  padding-left: 4px;
  width: 250px;
}
.cesium-viewer-geocoderContainer .search-results {
  position: absolute;
  background-color: #000;
  color: #eee;
  overflow-y: auto;
  opacity: 0.8;
  width: 100%;
}
.cesium-viewer-geocoderContainer .search-results ul {
  list-style-type: none;
  margin: 0;
  padding: 0;
}
.cesium-viewer-geocoderContainer .search-results ul li {
  font-size: 14px;
  padding: 3px 10px;
}
.cesium-viewer-geocoderContainer .search-results ul li:hover {
  cursor: pointer;
}
.cesium-viewer-geocoderContainer .search-results ul li.active {
  background: #48b;
}
.cesium-geocoder-searchButton {
  background-color: #303336;
  display: inline-block;
  position: absolute;
  cursor: pointer;
  width: 32px;
  top: 1px;
  right: 1px;
  height: 30px;
  vertical-align: middle;
  fill: #edffff;
}
.cesium-geocoder-searchButton:hover {
  background-color: #48b;
}

/* packages/widgets/Source/InfoBox/InfoBox.css */
.cesium-infoBox {
  display: block;
  position: absolute;
  top: 50px;
  right: 0;
  width: 40%;
  max-width: 480px;
  background: rgba(38, 38, 38, 0.95);
  color: #edffff;
  border: 1px solid #444;
  border-right: none;
  border-top-left-radius: 7px;
  border-bottom-left-radius: 7px;
  box-shadow: 0 0 10px 1px #000;
  transform: translate(100%, 0);
  visibility: hidden;
  opacity: 0;
  transition:
    visibility 0s 0.2s,
    opacity 0.2s ease-in,
    transform 0.2s ease-in;
}
.cesium-infoBox-visible {
  transform: translate(0, 0);
  visibility: visible;
  opacity: 1;
  transition: opacity 0.2s ease-out, transform 0.2s ease-out;
}
.cesium-infoBox-title {
  display: block;
  height: 20px;
  padding: 5px 30px 5px 25px;
  background: rgba(84, 84, 84, 1);
  border-top-left-radius: 7px;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
  overflow: hidden;
  box-sizing: content-box;
}
.cesium-infoBox-bodyless .cesium-infoBox-title {
  border-bottom-left-radius: 7px;
}
button.cesium-infoBox-camera {
  display: block;
  position: absolute;
  top: 4px;
  left: 4px;
  width: 22px;
  height: 22px;
  background: transparent;
  border-color: transparent;
  border-radius: 3px;
  padding: 0 5px;
  margin: 0;
}
button.cesium-infoBox-close {
  display: block;
  position: absolute;
  top: 5px;
  right: 5px;
  height: 20px;
  background: transparent;
  border: none;
  border-radius: 2px;
  font-weight: bold;
  font-size: 16px;
  padding: 0 5px;
  margin: 0;
  color: #edffff;
}
button.cesium-infoBox-close:focus {
  background: rgba(238, 136, 0, 0.44);
  outline: none;
}
button.cesium-infoBox-close:hover {
  background: #888;
  color: #000;
}
button.cesium-infoBox-close:active {
  background: #a00;
  color: #000;
}
.cesium-infoBox-bodyless .cesium-infoBox-iframe {
  display: none;
}
.cesium-infoBox-iframe {
  border: none;
  width: 100%;
  width: calc(100% - 2px);
}

/* packages/widgets/Source/SceneModePicker/SceneModePicker.css */
span.cesium-sceneModePicker-wrapper {
  display: inline-block;
  position: relative;
  margin: 0 3px;
}
.cesium-sceneModePicker-visible {
  visibility: visible;
  opacity: 1;
  transition: opacity 0.25s linear;
}
.cesium-sceneModePicker-hidden {
  visibility: hidden;
  opacity: 0;
  transition: visibility 0s 0.25s, opacity 0.25s linear;
}
.cesium-sceneModePicker-wrapper .cesium-sceneModePicker-none {
  display: none;
}
.cesium-sceneModePicker-slide-svg {
  transition: left 2s;
  top: 0;
  left: 0;
}
.cesium-sceneModePicker-wrapper .cesium-sceneModePicker-dropDown-icon {
  box-sizing: border-box;
  padding: 0;
  margin: 3px 0;
}
.cesium-sceneModePicker-wrapper .cesium-sceneModePicker-button3D,
.cesium-sceneModePicker-wrapper .cesium-sceneModePicker-buttonColumbusView,
.cesium-sceneModePicker-wrapper .cesium-sceneModePicker-button2D {
  margin: 0 0 3px 0;
}
.cesium-sceneModePicker-wrapper .cesium-sceneModePicker-button3D .cesium-sceneModePicker-icon2D {
  left: 100%;
}
.cesium-sceneModePicker-wrapper .cesium-sceneModePicker-button3D .cesium-sceneModePicker-iconColumbusView {
  left: 200%;
}
.cesium-sceneModePicker-wrapper .cesium-sceneModePicker-buttonColumbusView .cesium-sceneModePicker-icon3D {
  left: -200%;
}
.cesium-sceneModePicker-wrapper .cesium-sceneModePicker-buttonColumbusView .cesium-sceneModePicker-icon2D {
  left: -100%;
}
.cesium-sceneModePicker-wrapper .cesium-sceneModePicker-button2D .cesium-sceneModePicker-icon3D {
  left: -100%;
}
.cesium-sceneModePicker-wrapper .cesium-sceneModePicker-button2D .cesium-sceneModePicker-iconColumbusView {
  left: 100%;
}
.cesium-sceneModePicker-wrapper .cesium-sceneModePicker-selected {
  border-color: #2e2;
  box-shadow: 0 0 8px #fff, 0 0 8px #fff;
}

/* packages/widgets/Source/ProjectionPicker/ProjectionPicker.css */
span.cesium-projectionPicker-wrapper {
  display: inline-block;
  position: relative;
  margin: 0 3px;
}
.cesium-projectionPicker-visible {
  visibility: visible;
  opacity: 1;
  transition: opacity 0.25s linear;
}
.cesium-projectionPicker-hidden {
  visibility: hidden;
  opacity: 0;
  transition: visibility 0s 0.25s, opacity 0.25s linear;
}
.cesium-projectionPicker-wrapper .cesium-projectionPicker-none {
  display: none;
}
.cesium-projectionPicker-wrapper .cesium-projectionPicker-dropDown-icon {
  box-sizing: border-box;
  padding: 0;
  margin: 3px 0;
}
.cesium-projectionPicker-wrapper .cesium-projectionPicker-buttonPerspective,
.cesium-projectionPicker-wrapper .cesium-projectionPicker-buttonOrthographic {
  margin: 0 0 3px 0;
}
.cesium-projectionPicker-wrapper .cesium-projectionPicker-buttonPerspective .cesium-projectionPicker-iconOrthographic {
  left: 100%;
}
.cesium-projectionPicker-wrapper .cesium-projectionPicker-buttonOrthographic .cesium-projectionPicker-iconPerspective {
  left: -100%;
}
.cesium-projectionPicker-wrapper .cesium-projectionPicker-selected {
  border-color: #2e2;
  box-shadow: 0 0 8px #fff, 0 0 8px #fff;
}

/* packages/widgets/Source/PerformanceWatchdog/PerformanceWatchdog.css */
.cesium-performance-watchdog-message-area {
  position: relative;
  background-color: yellow;
  color: black;
  padding: 10px;
}
.cesium-performance-watchdog-message {
  margin-right: 30px;
}
.cesium-performance-watchdog-message-dismiss {
  position: absolute;
  right: 0;
  margin: 0 10px 0 0;
}

/* packages/widgets/Source/NavigationHelpButton/NavigationHelpButton.css */
.cesium-navigationHelpButton-wrapper {
  position: relative;
  display: inline-block;
}
.cesium-navigation-help {
  visibility: hidden;
  position: absolute;
  top: 38px;
  right: 2px;
  width: 250px;
  border-radius: 10px;
  transform: scale(0.01);
  transform-origin: 234px -10px;
  transition: visibility 0s 0.25s, transform 0.25s ease-in;
}
.cesium-navigation-help-visible {
  visibility: visible;
  transform: scale(1);
  transition: transform 0.25s ease-out;
}
.cesium-navigation-help-instructions {
  border: 1px solid #444;
  background-color: rgba(38, 38, 38, 0.75);
  padding-bottom: 5px;
  border-radius: 0 0 10px 10px;
}
.cesium-click-navigation-help {
  display: none;
}
.cesium-touch-navigation-help {
  display: none;
  padding-top: 5px;
}
.cesium-click-navigation-help-visible {
  display: block;
}
.cesium-touch-navigation-help-visible {
  display: block;
}
.cesium-navigation-help-pan {
  color: #66ccff;
  font-weight: bold;
}
.cesium-navigation-help-zoom {
  color: #65fd00;
  font-weight: bold;
}
.cesium-navigation-help-rotate {
  color: #ffd800;
  font-weight: bold;
}
.cesium-navigation-help-tilt {
  color: #d800d8;
  font-weight: bold;
}
.cesium-navigation-help-details {
  color: #ffffff;
}
.cesium-navigation-button {
  color: #fff;
  background-color: transparent;
  border-bottom: none;
  border-top: 1px solid #444;
  border-right: 1px solid #444;
  margin: 0;
  width: 50%;
  cursor: pointer;
}
.cesium-navigation-button-icon {
  vertical-align: middle;
  padding: 5px 1px;
}
.cesium-navigation-button:focus {
  outline: none;
}
.cesium-navigation-button-left {
  border-radius: 10px 0 0 0;
  border-left: 1px solid #444;
}
.cesium-navigation-button-right {
  border-radius: 0 10px 0 0;
  border-left: none;
}
.cesium-navigation-button-selected {
  background-color: rgba(38, 38, 38, 0.75);
}
.cesium-navigation-button-unselected {
  background-color: rgba(0, 0, 0, 0.75);
}
.cesium-navigation-button-unselected:hover {
  background-color: rgba(76, 76, 76, 0.75);
}

/* packages/widgets/Source/SelectionIndicator/SelectionIndicator.css */
.cesium-selection-wrapper {
  position: absolute;
  width: 160px;
  height: 160px;
  pointer-events: none;
  visibility: hidden;
  opacity: 0;
  transition: visibility 0s 0.2s, opacity 0.2s ease-in;
}
.cesium-selection-wrapper-visible {
  visibility: visible;
  opacity: 1;
  transition: opacity 0.2s ease-out;
}
.cesium-selection-wrapper svg {
  fill: #2e2;
  stroke: #000;
  stroke-width: 1.1px;
}

/* packages/widgets/Source/Timeline/Timeline.css */
.cesium-timeline-main {
  position: relative;
  left: 0;
  bottom: 0;
  overflow: hidden;
  border: solid 1px #888;
  -moz-user-select: none;
  -webkit-user-select: none;
  -ms-user-select: none;
  user-select: none;
}
.cesium-timeline-trackContainer {
  width: 100%;
  overflow: auto;
  border-top: solid 1px #888;
  position: relative;
  top: 0;
  left: 0;
}
.cesium-timeline-tracks {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
}
.cesium-timeline-needle {
  position: absolute;
  left: 0;
  top: 1.7em;
  bottom: 0;
  width: 1px;
  background: #f00;
}
.cesium-timeline-bar {
  position: relative;
  left: 0;
  top: 0;
  overflow: hidden;
  cursor: pointer;
  width: 100%;
  height: 1.7em;
  background:
    linear-gradient(
      to bottom,
      rgba(116, 117, 119, 0.8) 0%,
      rgba(58, 68, 82, 0.8) 11%,
      rgba(46, 50, 56, 0.8) 46%,
      rgba(53, 53, 53, 0.8) 81%,
      rgba(53, 53, 53, 0.8) 100%);
}
.cesium-timeline-ruler {
  visibility: hidden;
  white-space: nowrap;
  font-size: 80%;
  z-index: -200;
}
.cesium-timeline-highlight {
  position: absolute;
  bottom: 0;
  left: 0;
  background: #08f;
}
.cesium-timeline-ticLabel {
  position: absolute;
  top: 0;
  left: 0;
  white-space: nowrap;
  font-size: 80%;
  color: #eee;
}
.cesium-timeline-ticMain {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 1px;
  height: 50%;
  background: #eee;
}
.cesium-timeline-ticSub {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 1px;
  height: 33%;
  background: #aaa;
}
.cesium-timeline-ticTiny {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 1px;
  height: 25%;
  background: #888;
}
.cesium-timeline-icon16 {
  display: block;
  position: absolute;
  width: 16px;
  height: 16px;
  background-image: url(data:text/plain;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAQCAYAAAB3AH1ZAAAAAXNSR0IArs4c6QAAAAZiS0dEAP8A/wD/oL2nkwAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB9sIDBITKIVzLEMAAAKNSURBVEjHxdXNSxRhHAfw7zzrqhuoWJnSkrippUVSEKsHI9BTUYdAJA/RoYMREV26rAdn6tAfUARi16hQqkOBQRgUEYFWEC3OwczMjdZd92VmdWfmeelgTjO7q7gb0VzmmZnn85vvPPPMM8B/3qTcE2PPpuTZKB1eWuUQACgXYACYwVFbCTTVeZXB/i55o4LFelcAZfStYD4vpAoPGAGo4GBcQEgSOAUMQyAezwK6iQfDPXnhS/FkHZ+/8VLMWxxqWkfH3gbMRNOYi2roavbja0zHQmoFPYf8ED4Ko4aivm9MOG/u9I8mwrafeK7a/tVrNc/bARYN5noadeq7q0342vXw9CIMU6BmW8rVP9cPBPe52uu+v3O/y9sB4gkTWs6Qsk0mj5ExXMelejvA8WafYmkmGPHanTijdtvif8rx5RiCjdWKs2Cp3jWRDl96KhrbqlBeJqBOLyLQXg0IgbkZDS0dO8EZxZfPSTA9jvDDK3mT0OmP1FXh3XwEEAKdTX5MRWLgjCK4pwH3xt/YnjgLHAv4lHTCAKMMu/wV+KZGob6PoKyMQ0+sgBpZVJZn0NterxQaVqef/DRn+/EXYds/mZx2eVeAW9d65dhCEsaKCb7K8HH0gqTevyh9GDkn0VULRiaLzJKGBu9swfdaiie5RVo9ESURN8E8BE0n7ggACJy8KzghSCzp6DmwWxkaCm24EBXr8wI8Hrkq06QBiRC0t24HALS11IBTCyJl4vb1AXmzpbVYTwoVOXN0h7L8Mwtm8bXPybIQ/5FCX3dA2cr6XowvGCA02CvztAnz9+JiZk1AMxG6fEreSoBiPNmoyNnuWiWVzAIAtISO08E6pZi/3N96AIDn4E3h3P8L/wshP+txtEs4JAAAAABJRU5ErkJggg==);
  background-repeat: no-repeat;
}

/* packages/widgets/Source/Viewer/Viewer.css */
.cesium-viewer {
  font-family: sans-serif;
  font-size: 16px;
  overflow: hidden;
  display: block;
  position: relative;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}
.cesium-viewer-cesiumWidgetContainer {
  width: 100%;
  height: 100%;
}
.cesium-viewer-bottom {
  display: block;
  position: absolute;
  bottom: 0;
  left: 0;
  padding-right: 5px;
}
.cesium-viewer .cesium-widget-credits {
  display: inline;
  position: static;
  bottom: auto;
  left: auto;
  padding-right: 0;
  color: #ffffff;
  font-size: 10px;
  text-shadow: 0 0 2px #000000;
}
.cesium-viewer-timelineContainer {
  position: absolute;
  bottom: 0;
  left: 169px;
  right: 29px;
  height: 27px;
  padding: 0;
  margin: 0;
  overflow: hidden;
  font-size: 14px;
}
.cesium-viewer-animationContainer {
  position: absolute;
  bottom: 0;
  left: 0;
  padding: 0;
  width: 169px;
  height: 112px;
}
.cesium-viewer-fullscreenContainer {
  position: absolute;
  bottom: 0;
  right: 0;
  padding: 0;
  width: 29px;
  height: 29px;
  overflow: hidden;
}
.cesium-viewer-vrContainer {
  position: absolute;
  bottom: 0;
  right: 0;
  padding: 0;
  width: 29px;
  height: 29px;
  overflow: hidden;
}
.cesium-viewer-toolbar {
  display: block;
  position: absolute;
  top: 5px;
  right: 5px;
}
.cesium-viewer-cesiumInspectorContainer {
  display: block;
  position: absolute;
  top: 50px;
  right: 10px;
}
.cesium-viewer-geocoderContainer {
  position: relative;
  display: inline-block;
  margin: 0 3px;
}
.cesium-viewer-cesium3DTilesInspectorContainer {
  display: block;
  position: absolute;
  top: 50px;
  right: 10px;
  max-height: calc(100% - 120px);
  box-sizing: border-box;
  overflow-y: auto;
  overflow-x: hidden;
}
.cesium-viewer-voxelInspectorContainer {
  display: block;
  position: absolute;
  top: 50px;
  right: 10px;
  max-height: calc(100% - 120px);
  box-sizing: border-box;
  overflow-y: auto;
  overflow-x: hidden;
}

/* packages/widgets/Source/I3SBuildingSceneLayerExplorer/I3SBuildingSceneLayerExplorer.css */
.cesium-viewer-i3s-explorer ul {
  list-style-type: none;
}
.cesium-viewer-i3s-explorer .layersList {
  padding: 0;
}
.cesium-viewer-i3s-explorer input {
  margin: 0 3px 0 0;
}
.cesium-viewer-i3s-explorer .expandItem {
  cursor: pointer;
  user-select: none;
  width: 20px;
}
.cesium-viewer-i3s-explorer .nested,
.cesium-viewer-i3s-explorer #bsl-wrapper {
  display: none;
}
.cesium-viewer-i3s-explorer .active {
  display: block;
}
.cesium-viewer-i3s-explorer .li-wrapper {
  display: flex;
  flex-direction: row;
  align-content: center;
}

/* packages/widgets/Source/widgets.css */
/* EarthMap – reusable globe container (touch-friendly for mobile/tablet) */

.earth-map {
  width: 100%;
  height: 100%;
  position: relative;
  min-width: 1px;
  min-height: 1px;
  overflow: hidden;
  background: transparent;
  -webkit-tap-highlight-color: transparent;
}

.earth-map-cesium {
  width: 100%;
  height: 100%;
  min-width: 1px;
  min-height: 1px;
  position: absolute;
  top: 0;
  left: 0;
  opacity: 0;
  transition: opacity 0.4s ease;
  box-sizing: border-box;
  overflow: hidden;
  z-index: 0;
  -webkit-tap-highlight-color: transparent;
}

.earth-map-cesium.earth-map-cesium-visible {
  opacity: 1;
  z-index: 0;
}

.earth-map-cesium .cesium-viewer-toolbar,
.earth-map-cesium .cesium-viewer-animationContainer,
.earth-map-cesium .cesium-viewer-timelineContainer,
.earth-map-cesium .cesium-viewer-bottom,
.earth-map-cesium .cesium-viewer-fullscreenContainer,
.earth-map-cesium .cesium-viewer-vrContainer,
.earth-map-cesium .cesium-credit-logoContainer,
.earth-map-cesium .cesium-credit-expand-link {
  display: none !important;
}

.earth-map-loading {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  background: transparent;
  color: #e0e0e0;
  font-size: 1rem;
  z-index: 10;
}

.earth-map-loading-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid rgba(255, 255, 255, 0.2);
  border-top-color: #4fc3f7;
  border-radius: 50%;
  animation: earth-map-spin 1s linear infinite;
}

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

.earth-map .cesium-widget {
  width: 100% !important;
  height: 100% !important;
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  box-sizing: border-box !important;
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
}

/* Canvas: capture touch gestures – single-drag rotate, pinch zoom, two-finger tilt */
.earth-map .cesium-widget canvas {
  outline: none;
  position: relative;
  touch-action: none;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  width: 100% !important;
  height: 100% !important;
  box-sizing: border-box !important;
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
}
/* EarthMap background - interactive globe behind OniFrame */
.lobby-earth-background {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: 1;
  pointer-events: auto;
  overflow: visible;
  background: transparent;
}

.lobby-earth-background .earth-map,
.lobby-earth-background .earth-map-cesium,
.lobby-earth-background .cesium-viewer,
.lobby-earth-background .cesium-widget {
  width: 100% !important;
  height: 100% !important;
  position: absolute !important;
  inset: 0 !important;
}

.lobby-title {
  color: #ffffff;
  font-size: 4rem;
  font-weight: bold;
  margin: 0;
  text-align: center;
}

/* User Dropdown */
.user-dropdown-container {
  position: fixed;
  bottom: calc(20px + env(safe-area-inset-bottom, 0px) + 55px + 8px);
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
  pointer-events: auto;
}

.user-dropdown {
  background: rgba(20, 20, 30, 0.95);
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  min-width: 220px;
  overflow: hidden;
  box-shadow: 
    0 4px 20px rgba(0, 0, 0, 0.5),
    0 0 40px rgba(0, 255, 0, 0.1);
  animation: dropdown-appear 0.2s ease-out;
}

@keyframes dropdown-appear {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.user-dropdown-header {
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.user-dropdown-name {
  color: #ffffff;
  font-size: 1rem;
  font-weight: 600;
}

.user-dropdown-email {
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.85rem;
}

.user-dropdown-divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.1);
}

.user-dropdown-item {
  width: 100%;
  padding: 0.875rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: left;
}

.user-dropdown-item:hover {
  background: rgba(255, 255, 255, 0.05);
}

.user-dropdown-item.logout {
  color: #ffa500;
}

.user-dropdown-item.logout:hover {
  background: rgba(255, 165, 0, 0.1);
}

.user-dropdown-icon {
  font-size: 1.1rem;
}

/* Lobby View Container — black background only */
.lobby-view {
  width: 100%;
  height: 100vh;
  height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 1;
  background: #000;
  pointer-events: none;
}

/* When lobby is inside OniFrame centerContent: fill the frame content area.
   pointer-events: none on wrapper so track badges (profile, hands, center) receive taps;
   re-enable pointer-events on interactive children only. */
.lobby-view--in-oniframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background: transparent;
  pointer-events: none;
}
.lobby-view--in-oniframe .lobby-nav,
.lobby-view--in-oniframe .lobby-left-hud {
  pointer-events: auto;
}

/* Nav: wrapper for L.I.F.E HUB row + other cards row */
.lobby-nav {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  max-width: 90vw;
  pointer-events: auto;
  z-index: 2;
}

.lobby-nav-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
}

.lobby-nav-row--life-hub {
  margin-bottom: 0.25rem;
}

.lobby-nav-row--wonder-arcide {
  margin-top: 0.25rem;
}

.lobby-nav-row--selenia {
  margin-top: 0.25rem;
}

/* Disabled nav cards — basic styling */
.lobby-nav-cards {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
}

.lobby-nav-card {
  padding: 0.6rem 1rem;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.lobby-nav-card--disabled {
  opacity: 0.7;
  cursor: default;
}

.lobby-nav-card-title {
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.95rem;
  font-weight: 500;
  white-space: nowrap;
}

/* Left area: wrapper for Ideas panel when open (toggled from left wheel top-left slot) */
.lobby-left-area {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 10;
  pointer-events: none;
}
.lobby-left-area > * {
  pointer-events: auto;
}

.lobby-left-area .lobby-left-hud {
  top: 0.75rem;
  left: 0.75rem;
  transform: none;
  width: min(280px, calc(100vw - 4rem));
  max-height: calc(100% - 120px);
}

/* Left HUD: ideas linked to player profile (inside OniFrame content area, below top badge) */
.lobby-left-hud {
  position: absolute;
  top: 100px;
  left: 50%;
  transform: translateX(-50%);
  width: min(280px, calc(100% - 4rem));
  max-height: calc(100% - 200px);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  z-index: 10;
  pointer-events: auto;
  padding: 1rem;
  background: rgba(0, 0, 0, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  box-shadow:
    0 0 0 2px rgba(255, 255, 255, 0.5),
    0 0 0 4px rgba(245, 215, 110, 0.25),
    0 4px 20px rgba(0, 0, 0, 0.4);
}

.lobby-left-hud__label {
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.lobby-left-hud__input {
  flex: 1;
  min-height: 120px;
  padding: 0.75rem;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  color: #fff;
  font-size: 0.9rem;
  line-height: 1.5;
  resize: vertical;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.lobby-left-hud__input::placeholder {
  color: rgba(255, 255, 255, 0.35);
}

.lobby-left-hud__input:focus {
  border-color: rgba(245, 215, 110, 0.5);
  box-shadow: 0 0 0 2px rgba(245, 215, 110, 0.15);
}

/* Full-screen inner border frame: disabled when using OniFrame (which has its own frame) */
.lobby-view::before {
  display: none;
}

/* Keep border only on standalone .lobby-view (not inside OniFrame) */
.lobby-view:not(.lobby-view--in-oniframe)::before {
  content: "";
  position: fixed;
  inset: 0;
  border-radius: 20px;
  /* White 10px frame, 5px shiny gold lining inside, soft inner glow */
  box-shadow:
    inset 0 0 0 10px #fff,
    inset 0 0 30px 12px rgba(245, 215, 110, 0.35),
    inset 0 0 0 15px #f5d76e;
  pointer-events: none;
  z-index: 5000;
  display: block;
}

/* Lobby: wheel menu above screen frame */
.lobby-view .wheel-menu {
  z-index: 5001;
}

/* Lobby: move bottom WheelMenu up 20px */
.lobby-view .wheel-menu--bottom {
  bottom: calc(40px + env(safe-area-inset-bottom, 0px));
}

/* Three bottom buttons: flex row, one button-width (60px) apart, each column clickable */
.lobby-three-buttons {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 5001;
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: 60px;
  padding-bottom: calc(40px + env(safe-area-inset-bottom, 0px));
  pointer-events: none;
}

.lobby-three-buttons .lobby-wheel-outer {
  width: 60px;
  flex-shrink: 0;
  position: relative;
  pointer-events: auto;
}

.lobby-three-buttons .lobby-wheel-outer .wheel-menu {
  pointer-events: auto;
}

/* Each wheel fixed in its column: 60px wide, one button-width (60px) gap between buttons */
.lobby-three-buttons .lobby-wheel-outer .wheel-menu--bottom {
  left: 50%;
  right: auto;
  width: 60px;
  margin-left: -30px;
}

.lobby-three-buttons .lobby-wheel-outer--left .wheel-menu--bottom {
  margin-left: -150px; /* left button center at 50% - 120px */
}

.lobby-three-buttons .lobby-wheel-outer--right .wheel-menu--bottom {
  margin-left: 90px; /* right button center at 50% + 120px */
}

/* White Metal Buttons for Lobby Player State */
.lobby-metal-btn {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  width: 55px;
  height: 55px;
  border-radius: 50%;
  background: linear-gradient(to bottom, #f7f7f7, #e7e7e7);
  border: solid 1px transparent;
  box-shadow: 
    0px 3px 8px rgba(170, 170, 170, 0.6),
    inset 0px 2px 3px rgba(255, 255, 255, 0.8);
  cursor: pointer;
  padding: 0;
  outline: none;
  -webkit-tap-highlight-color: transparent;
  -webkit-user-select: none;
  user-select: none;
  display: flex;
  align-items: center;
  justify-content: center;
  touch-action: manipulation;
  transition: all 0.3s ease;
  z-index: 10;
  pointer-events: auto;
  color: #a7a7a7;
  font-size: 1.2rem;
  font-weight: 600;
}

.lobby-metal-btn:before {
  content: "";
  display: block;
  background: #fff;
  border-top: 2px solid rgba(221, 221, 221, 1);
  position: absolute;
  top: -8px;
  left: -8px;
  bottom: -8px;
  right: -8px;
  z-index: -1;
  border-radius: 50%;
  box-shadow: inset 0px 8px 48px rgba(221, 221, 221, 0.8);
}

.lobby-metal-btn:hover {
  filter: brightness(1.05);
  transform: translateX(-50%) scale(1.05);
  color: #555;
}

.lobby-bot-btn:hover {
  transform: translateX(-50%) scale(1.05);
}

.lobby-top-btn:hover {
  background: linear-gradient(to bottom, #f5f5f5, #e5e5e5);
}

.lobby-metal-btn:active {
  box-shadow: none;
  border: solid 1px rgba(167, 167, 167, 1);
  transform: translateX(-50%) scale(0.98);
  outline: none;
}

.lobby-bot-btn:active {
  transform: translateX(-50%) scale(0.98);
}

.lobby-metal-btn:focus {
  outline: none;
}

.lobby-metal-btn:focus-visible {
  outline: none;
}

.lobby-top-btn {
  top: 2rem;
  top: max(2rem, env(safe-area-inset-top));
}

/* Account button when placed at center of radial menu (no fixed position) */
.lobby-center-account-btn,
.lobby-account-btn-in-hub {
  position: relative;
  top: auto;
  left: auto;
  right: auto;
  bottom: auto;
  transform: none;
}

/* Profile (hub) button: hide metal :before ring so golden lining is visible */
.lobby-view .wheel-menu .wheel-menu__hub .lobby-account-btn-in-hub::before {
  display: none;
}

/* Profile (hub) button: same size as wheel slot badges (60px) and golden lining */
.lobby-view .wheel-menu .wheel-menu__hub .lobby-account-btn-in-hub {
  width: 60px;
  height: 60px;
  box-shadow:
    0 0 0 2px #fff,
    0 0 0 5px #f5d76e,
    0 0 12px 4px rgba(245, 215, 110, 0.35),
    0px 3px 8px rgba(170, 170, 170, 0.6),
    inset 0px 2px 3px rgba(255, 255, 255, 0.8);
}

.lobby-view .wheel-menu .wheel-menu__hub .lobby-account-btn-in-hub:hover {
  box-shadow:
    0 0 0 2px #fff,
    0 0 0 5px #f5d76e,
    0 0 14px 5px rgba(245, 215, 110, 0.4),
    0px 3px 8px rgba(170, 170, 170, 0.6),
    inset 0px 2px 3px rgba(255, 255, 255, 0.8);
}

.lobby-view .wheel-menu .wheel-menu__hub .lobby-account-btn-in-hub:active {
  box-shadow:
    0 0 0 2px #fff,
    0 0 0 5px #f5d76e,
    0 0 12px 4px rgba(245, 215, 110, 0.35),
    0px 3px 8px rgba(170, 170, 170, 0.6),
    inset 0px 2px 3px rgba(255, 255, 255, 0.8);
}

.lobby-center-account-btn:hover,
.lobby-account-btn-in-hub:hover {
  transform: scale(1.05);
}

.lobby-center-account-btn:active,
.lobby-account-btn-in-hub:active {
  transform: scale(0.98);
}

/* Profile badge in OniFrame track button */
.lobby-profile-badge {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  overflow: hidden;
  box-shadow: 0 0 0 2px #fff;
}

.lobby-profile-badge-avatar {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.lobby-profile-badge-initial {
  font-size: 1.5rem;
  font-weight: 600;
  color: #555;
  line-height: 1;
}

.lobby-top-btn-avatar {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  display: block;
}

/* Download Progress Panel - positioned under account button */
.lobby-download-panel {
  position: fixed;
  /* Button is 55px + 8px pseudo-element padding = 71px total, plus top position */
  top: calc(2rem + 71px + 16px + 1rem);
  top: calc(max(2rem, env(safe-area-inset-top)) + 71px + 16px + 1rem);
  left: 50%;
  transform: translateX(-50%);
  text-align: center;
  z-index: 100;
  pointer-events: none;
  background: rgba(0, 0, 0, 0.7);
  padding: 1rem 1.5rem;
  border-radius: 12px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.lobby-download-text {
  color: #ffffff;
  font-size: 0.9rem;
  font-weight: 500;
  margin-bottom: 0.25rem;
  letter-spacing: 0.05em;
}

.lobby-download-percentage {
  color: #00ff88;
  font-size: 1.5rem;
  font-weight: 600;
  font-family: 'Courier New', monospace;
}

.lobby-bot-btn {
  bottom: 2rem;
  bottom: max(2rem, env(safe-area-inset-bottom));
  top: auto;
  right: auto;
  font-size: 1.5rem;
  transform: translateX(-50%);
}

.lobby-btn-icon {
  font-family: 'Material Icons';
  font-size: 1.5rem;
  font-style: normal;
  font-weight: normal;
  line-height: 1;
  letter-spacing: normal;
  text-transform: none;
  display: inline-block;
  white-space: nowrap;
  word-wrap: normal;
  direction: ltr;
  -webkit-font-feature-settings: 'liga';
  -webkit-font-smoothing: antialiased;
}

/* Shared modal overlay: center on screen, blur backdrop */
.lobby-places-modal-overlay,
.lobby-ideas-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 1.5rem;
  box-sizing: border-box;
}

/* Places Modal – centered, toggled from right hand wheel (🗺️) */
.lobby-places-modal {
  background: #1a1a1a;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  width: 100%;
  max-width: 440px;
  max-height: 85vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(255, 255, 255, 0.06);
}

.lobby-places-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  flex-shrink: 0;
}

.lobby-places-modal-header h2 {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 600;
  color: #fff;
  letter-spacing: 0.02em;
}

.lobby-places-modal-close {
  background: rgba(255, 255, 255, 0.08);
  border: none;
  color: rgba(255, 255, 255, 0.7);
  font-size: 1.5rem;
  cursor: pointer;
  line-height: 1;
  padding: 0;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease, color 0.2s ease;
}

.lobby-places-modal-close:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.lobby-places-modal-content {
  padding: 1.5rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
}

.lobby-places-modal-content .lobby-nav-row {
  margin: 0;
}

.lobby-places-modal-content .lobby-nav-cards {
  margin: 0;
}

/* Ideas Modal – centered, toggled from left hand wheel top-left slot (📒) */
.lobby-ideas-modal {
  background: #1a1a1a;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  width: 100%;
  max-width: 440px;
  max-height: 85vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(255, 255, 255, 0.06);
}

.lobby-ideas-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  flex-shrink: 0;
}

.lobby-ideas-modal-header h2 {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 600;
  color: #fff;
  letter-spacing: 0.02em;
}

.lobby-ideas-modal-close {
  background: rgba(255, 255, 255, 0.08);
  border: none;
  color: rgba(255, 255, 255, 0.7);
  font-size: 1.5rem;
  cursor: pointer;
  line-height: 1;
  padding: 0;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease, color 0.2s ease;
}

.lobby-ideas-modal-close:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.lobby-ideas-modal-content {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  flex: 1;
  min-height: 0;
}

.lobby-ideas-modal-label {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.02em;
}

.lobby-ideas-modal-input {
  flex: 1;
  min-height: 160px;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  color: #fff;
  font-size: 0.9375rem;
  line-height: 1.5;
  resize: vertical;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  font-family: inherit;
}

.lobby-ideas-modal-input::placeholder {
  color: rgba(255, 255, 255, 0.35);
}

.lobby-ideas-modal-input:focus {
  border-color: rgba(245, 215, 110, 0.5);
  box-shadow: 0 0 0 2px rgba(245, 215, 110, 0.15);
}

/* Games Modal Styles */
.games-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
}

.games-modal {
  background: #1a1a1a;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  width: 100%;
  max-width: 500px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

.games-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.games-modal-header h2 {
  margin: 0;
  font-size: 1.5rem;
  color: #ffffff;
}

.games-modal-close {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.6);
  font-size: 2rem;
  cursor: pointer;
  line-height: 1;
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s ease;
}

.games-modal-close:hover {
  color: #ffffff;
}

.games-modal-content {
  padding: 1.5rem;
}

.games-modal-loading,
.games-modal-empty {
  text-align: center;
  color: rgba(255, 255, 255, 0.6);
  padding: 2rem;
}

.games-modal-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.games-modal-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  transition: all 0.2s ease;
}

.games-modal-item:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
}

.games-modal-item .game-emoji {
  font-size: 1.5rem;
  line-height: 1;
}

.games-modal-item .game-title {
  font-size: 1rem;
  font-weight: 500;
  color: #ffffff;
}

/* Media Library Modal */
.lobby-media-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 255, 136, 0.5);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  padding: 0;
}

.lobby-media-modal-content {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(10, 10, 10, 0.95);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  z-index: 10001;
}

/* Close button - fixed bottom center */
.lobby-media-modal-close {
  position: fixed;
  bottom: 2rem;
  bottom: max(2rem, env(safe-area-inset-bottom));
  left: 50%;
  transform: translateX(-50%);
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  color: #ffffff;
  font-size: 1.5rem;
  cursor: pointer;
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  padding: 0;
  line-height: 1;
  z-index: 10002;
}

.lobby-media-modal-close:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateX(-50%) scale(1.1);
}

/* Paginated grid container */
.lobby-media-grid-container {
  display: flex;
  flex-direction: row;
  width: 100%;
  height: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.lobby-media-grid-container::-webkit-scrollbar {
  display: none;
}

/* Each page of 2x3 grid */
.lobby-media-page {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-template-rows: repeat(3, 1fr);
  gap: 1rem;
  width: 100%;
  min-width: 100%;
  height: calc(100% - 100px);
  padding: 2rem;
  box-sizing: border-box;
  scroll-snap-align: center;
  scroll-snap-stop: always;
  flex-shrink: 0;
  align-content: center;
  justify-content: center;
}

.lobby-media-loading,
.lobby-media-empty {
  text-align: center;
  color: rgba(255, 255, 255, 0.6);
  padding: 3rem;
  font-size: 1.1rem;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

/* Media item in paginated grid */
.lobby-media-item {
  width: 100%;
  height: 100%;
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  cursor: pointer;
}

.lobby-media-item:hover {
  transform: scale(1.03);
  box-shadow: 0 4px 16px rgba(0, 255, 136, 0.3);
  border-color: rgba(0, 255, 136, 0.5);
}

.lobby-media-item img,
.lobby-media-item video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  pointer-events: none;
  border: none;
  margin: 0;
  padding: 0;
}

.lobby-media-audio-preview,
.lobby-media-other-preview {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  background: rgba(255, 255, 255, 0.05);
}

.lobby-media-audio-icon,
.lobby-media-file-icon {
  font-size: 2.5rem;
}

.lobby-media-item-clickable {
  cursor: pointer;
}

/* Media Preview Gallery */
.lobby-media-preview-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 20000;
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow: hidden;
  animation: fadeInOverlay 0.2s ease;
}

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

/* Close button centered at top */
.lobby-media-preview-close {
  position: fixed;
  top: 2rem;
  top: max(2rem, env(safe-area-inset-top));
  left: 50%;
  transform: translateX(-50%);
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  color: #ffffff;
  font-size: 2rem;
  cursor: pointer;
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  padding: 0;
  line-height: 1;
  z-index: 20001;
  pointer-events: auto;
}

.lobby-media-preview-close:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateX(-50%) scale(1.1);
}

/* Native scroll container */
.lobby-media-preview-scroll {
  display: flex;
  width: 100%;
  height: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.lobby-media-preview-scroll::-webkit-scrollbar {
  display: none;
}

.lobby-media-preview-slide {
  flex: 0 0 100%;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  scroll-snap-align: center;
  scroll-snap-stop: always;
}

.lobby-media-preview-download {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  z-index: 20002;
  pointer-events: none;
  background: rgba(0, 0, 0, 0.7);
  padding: 1.5rem 2.5rem;
  border-radius: 12px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.lobby-media-preview-download-text {
  color: #ffffff;
  font-size: 1.2rem;
  font-weight: 500;
  margin-bottom: 0.5rem;
  letter-spacing: 0.05em;
}

.lobby-media-preview-download-percentage {
  color: #00ff88;
  font-size: 2rem;
  font-weight: 600;
  font-family: 'Courier New', monospace;
}

.lobby-media-preview-image {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  user-select: none;
  -webkit-user-drag: none;
  pointer-events: auto;
  display: block;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  transform: translateZ(0);
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.lobby-media-preview-counter {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.7);
  color: #ffffff;
  padding: 0.75rem 1.5rem;
  border-radius: 20px;
  font-size: 1rem;
  font-weight: 500;
  z-index: 20001;
  pointer-events: none;
}

/* Mobile adjustments */
@media (max-width: 600px) {
  .lobby-media-preview-close {
    top: 1rem;
    width: 40px;
    height: 40px;
    font-size: 1.5rem;
  }

  .lobby-media-preview-counter {
    bottom: 1rem;
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
  }

  .lobby-media-page {
    gap: 0.75rem;
    padding: 1.5rem;
    height: calc(100% - 80px);
  }

  .lobby-media-modal-close {
    bottom: 1.5rem;
    width: 45px;
    height: 45px;
  }

  .lobby-download-panel {
    top: calc(1rem + 71px + 16px + 0.75rem);
    top: calc(max(1rem, env(safe-area-inset-top)) + 71px + 16px + 0.75rem);
    padding: 0.75rem 1.25rem;
  }

  .lobby-download-text {
    font-size: 0.85rem;
  }

  .lobby-download-percentage {
    font-size: 1.25rem;
  }
}
.nexus-view {
  width: 100vw;
  height: 100vh;
  height: 100dvh; /* Safari iOS: avoid address-bar jump; fallback above */
  background: #000000;
  color: #ffffff;
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  overflow: hidden;
  box-sizing: border-box;
}

/* Admin bar - fixed overlay, safe on Safari iOS (notch) */
.nexus-admin-bar-wrapper {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1100;
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, max-height 0.25s ease;
  padding-top: env(safe-area-inset-top, 0px);
  padding-left: env(safe-area-inset-left, 0px);
  padding-right: env(safe-area-inset-right, 0px);
}

.nexus-admin-bar-wrapper.nexus-admin-bar-wrapper--visible {
  max-height: 200px;
  opacity: 1;
  pointer-events: auto;
}

.nexus-container {
  position: relative;
  width: 100%;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  min-height: 0;
}

/* Top HUDs - safe on Safari iOS (notch, Dynamic Island) */
.nexus-top-huds {
  position: absolute;
  top: max(20px, env(safe-area-inset-top, 0px));
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: row;
  align-items: stretch;
  gap: 12px;
  z-index: 1000;
  padding-left: env(safe-area-inset-left, 0px);
  padding-right: env(safe-area-inset-right, 0px);
}

.nexus-area-hud {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 12px 20px;
  background: rgba(0, 0, 0, 0.8);
  border: 1px solid rgba(0, 255, 136, 0.3);
  border-radius: 8px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  pointer-events: none;
}

.nexus-area-label {
  font-size: 0.7rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(0, 255, 136, 0.7);
}

.nexus-area-tiles,
.nexus-area-px {
  font-size: 0.85rem;
  font-weight: 600;
  color: #00ff88;
  font-family: 'Courier New', monospace;
}

.nexus-area-px {
  font-size: 0.75rem;
  color: rgba(0, 255, 136, 0.85);
}

.nexus-opening-level-hud {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 12px 16px;
  background: rgba(0, 0, 0, 0.8);
  border: 1px solid rgba(0, 255, 136, 0.3);
  border-radius: 8px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.nexus-opening-level-control {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
}

.nexus-opening-level-btn {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  font-weight: 600;
  line-height: 1;
  color: #00ff88;
  background: rgba(0, 255, 136, 0.1);
  border: 1px solid rgba(0, 255, 136, 0.4);
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease;
  outline: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
}

.nexus-opening-level-btn:hover:not(:disabled) {
  background: rgba(0, 255, 136, 0.2);
  border-color: rgba(0, 255, 136, 0.6);
}

.nexus-opening-level-btn:focus {
  outline: none;
}

.nexus-opening-level-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

/* Sizing HUD */
.nexus-sizing-hud {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 12px 16px;
  background: rgba(0, 0, 0, 0.8);
  border: 1px solid rgba(0, 255, 136, 0.3);
  border-radius: 8px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.nexus-sizing-label {
  font-size: 0.7rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(0, 255, 136, 0.7);
}

.nexus-sizing-control {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
}

.nexus-sizing-value-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.nexus-sizing-value {
  font-size: 0.95rem;
  font-weight: 600;
  color: #00ff88;
  font-family: 'Courier New', monospace;
  min-width: 2ch;
  text-align: center;
}

.nexus-sizing-unit {
  font-size: 0.6rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: rgba(0, 255, 136, 0.6);
}

.nexus-sizing-btn {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  font-weight: 600;
  line-height: 1;
  color: #00ff88;
  background: rgba(0, 255, 136, 0.1);
  border: 1px solid rgba(0, 255, 136, 0.4);
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease;
  outline: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
}

.nexus-sizing-btn:hover:not(:disabled) {
  background: rgba(0, 255, 136, 0.2);
  border-color: rgba(0, 255, 136, 0.6);
}

.nexus-sizing-btn:focus {
  outline: none;
}

.nexus-sizing-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.nexus-opening-level-label {
  font-size: 0.7rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(0, 255, 136, 0.7);
}

.nexus-opening-level-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: #00ff88;
  font-family: 'Courier New', monospace;
  text-shadow: 0 0 10px rgba(0, 255, 136, 0.5);
}

/* Bottom HUD - safe on Safari iOS (home indicator) */
.nexus-bottom-hud {
  position: absolute;
  bottom: max(20px, env(safe-area-inset-bottom, 0px));
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px 16px;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
  background: rgba(0, 0, 0, 0.8);
  border: 1px solid rgba(0, 255, 136, 0.3);
  border-radius: 8px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 1000;
}

.nexus-reset-center-btn {
  padding: 8px 20px;
  font-size: 0.8rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #00ff88;
  background: rgba(0, 255, 136, 0.1);
  border: 1px solid rgba(0, 255, 136, 0.4);
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  outline: none;
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
}

.nexus-reset-center-btn:focus {
  outline: none;
}

.nexus-reset-center-btn:hover {
  background: rgba(0, 255, 136, 0.2);
  border-color: rgba(0, 255, 136, 0.6);
  box-shadow: 0 0 12px rgba(0, 255, 136, 0.3);
}

/* X/Y size labels next to top and right of square */
.nexus-size-label {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  font-size: 0.65rem;
  font-weight: 500;
  color: rgba(0, 255, 136, 0.7);
  font-family: 'Courier New', monospace;
  white-space: nowrap;
}

.nexus-size-label .nexus-size-px {
  font-weight: 600;
  color: #00ff88;
}

.nexus-size-label .nexus-size-tiles {
  font-size: 0.55rem;
  color: rgba(0, 255, 136, 0.5);
}

.nexus-size-x {
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  margin-bottom: 6px;
}

.nexus-size-y {
  left: 100%;
  top: 50%;
  transform: translateY(-50%);
  margin-left: 8px;
}

.nexus-square-container {
  position: relative;
  background: #000000;
  overflow: hidden;
  cursor: grab;
  touch-action: none;
}

.nexus-square-container:active {
  cursor: grabbing;
}

.nexus-grid {
  pointer-events: none;
}

.nexus-square {
  pointer-events: auto;
  user-select: none;
  border-radius: 2px;
}

.nexus-square:not(.disabled):not(:active):hover {
  filter: brightness(1.3);
  transform: translate(-50%, -50%) scale(1.1);
  box-shadow: 0 0 12px rgba(255, 255, 255, 0.4) !important;
}

.nexus-square.disabled {
  opacity: 0.4;
  filter: grayscale(0.6);
}

.nexus-square.nexus-highlight {
  animation: nexus-pulse 2s ease-in-out infinite;
}

@keyframes nexus-pulse {
  0%, 100% {
    box-shadow: 0 0 8px rgba(0, 255, 136, 0.5);
  }
  50% {
    box-shadow: 0 0 16px rgba(0, 255, 136, 0.8), 0 0 24px rgba(0, 255, 136, 0.4);
  }
}

.nexus-tooltip {
  background: rgba(20, 20, 20, 0.95);
  color: #ffffff;
  padding: 6px 10px;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 500;
  white-space: nowrap;
  box-shadow: 
    0 2px 8px rgba(0, 0, 0, 0.6),
    0 0 0 1px rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.15);
  pointer-events: none;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  animation: tooltip-fade-in 0.15s ease-out;
}

.nexus-tooltip--has-subtitle {
  white-space: normal;
}

.nexus-tooltip-subtitle {
  font-size: 0.7rem;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.65);
  margin-top: 2px;
}

@keyframes tooltip-fade-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
.map-draft-experiment-view {
  width: 100vw;
  height: 100vh;
  height: 100dvh; /* Safari iOS: avoid address-bar jump; fallback above */
  background: #000000;
  color: #ffffff;
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  overflow: hidden;
  box-sizing: border-box;
}

/* Admin bar - fixed overlay, safe on Safari iOS (notch) */
.map-draft-experiment-admin-bar-wrapper {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1100;
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, max-height 0.25s ease;
  padding-top: env(safe-area-inset-top, 0px);
  padding-left: env(safe-area-inset-left, 0px);
  padding-right: env(safe-area-inset-right, 0px);
}

.map-draft-experiment-admin-bar-wrapper.map-draft-experiment-admin-bar-wrapper--visible {
  max-height: 200px;
  opacity: 1;
  pointer-events: auto;
}

.map-draft-experiment-container {
  position: relative;
  width: 100%;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  min-height: 0;
}

/* Empty State */
.map-draft-experiment-empty-state {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.9);
  z-index: 500;
  pointer-events: auto;
}

.map-draft-experiment-empty-state-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  padding: 40px;
  text-align: center;
  max-width: 500px;
}

.map-draft-experiment-empty-state-icon {
  font-family: 'Material Icons';
  font-size: 4rem;
  color: rgba(0, 255, 136, 0.5);
  margin-bottom: 8px;
}

.map-draft-experiment-empty-state-title {
  font-size: 1.5rem;
  font-weight: 600;
  color: #ffffff;
  margin: 0;
}

.map-draft-experiment-empty-state-description {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.7);
  margin: 0;
}

.map-draft-experiment-empty-state-actions {
  display: flex;
  flex-direction: row;
  gap: 12px;
  margin-top: 8px;
}

.map-draft-experiment-empty-state-btn {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  font-size: 0.9rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #00ff88;
  background: rgba(0, 255, 136, 0.1);
  border: 1px solid rgba(0, 255, 136, 0.4);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  outline: none;
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
}

.map-draft-experiment-empty-state-btn:hover {
  background: rgba(0, 255, 136, 0.2);
  border-color: rgba(0, 255, 136, 0.6);
  box-shadow: 0 0 12px rgba(0, 255, 136, 0.3);
}

.map-draft-experiment-empty-state-btn:focus,
.map-draft-experiment-empty-state-btn:active {
  outline: none;
}

.map-draft-experiment-empty-state-btn-primary {
  background: rgba(0, 255, 136, 0.2);
  border-color: rgba(0, 255, 136, 0.6);
}

.map-draft-experiment-empty-state-btn-primary:hover {
  background: rgba(0, 255, 136, 0.3);
  border-color: rgba(0, 255, 136, 0.8);
}

.map-draft-experiment-empty-state-btn .material-icons {
  font-family: 'Material Icons';
  font-size: 1.2rem;
}

/* Top Left HUD - Maps */
/* Left HUD - Places */
.map-draft-experiment-places-hud {
  position: absolute;
  left: max(20px, env(safe-area-inset-left, 0px));
  top: 50%;
  transform: translateY(-50%);
  z-index: 1001;
  display: flex;
  flex-direction: column;
}

.map-draft-experiment-places-toggle {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background: rgba(0, 0, 0, 0.8);
  border: 1px solid rgba(0, 255, 136, 0.3);
  border-radius: 8px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  cursor: pointer;
  transition: all 0.2s ease;
  outline: none;
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
}

.map-draft-experiment-places-toggle:hover {
  background: rgba(0, 0, 0, 0.9);
  border-color: rgba(0, 255, 136, 0.5);
}

.map-draft-experiment-places-toggle:focus,
.map-draft-experiment-places-toggle:active {
  outline: none;
}

.map-draft-experiment-places-toggle .material-icons {
  font-family: 'Material Icons';
  font-size: 1.2rem;
  color: #00ff88;
}

.map-draft-experiment-places-label {
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #00ff88;
}

.map-draft-experiment-places-menu {
  width: 280px;
  max-height: 70vh;
  background: rgba(0, 0, 0, 0.95);
  border: 1px solid rgba(0, 255, 136, 0.3);
  border-radius: 8px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.map-draft-experiment-places-menu-header {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(0, 255, 136, 0.2);
}

.map-draft-experiment-places-menu-title {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #00ff88;
}

.map-draft-experiment-places-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  padding: 16px;
  overflow-y: auto;
  overflow-x: hidden;
  max-height: calc(70vh - 60px); /* Account for header */
  overscroll-behavior: contain;
  align-items: start;
  grid-auto-rows: min-content;
}

/* Custom scrollbar for places grid */
.map-draft-experiment-places-grid::-webkit-scrollbar {
  width: 8px;
}

.map-draft-experiment-places-grid::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 4px;
}

.map-draft-experiment-places-grid::-webkit-scrollbar-thumb {
  background: rgba(0, 255, 136, 0.3);
  border-radius: 4px;
  transition: background 0.2s ease;
}

.map-draft-experiment-places-grid::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 255, 136, 0.5);
}

/* Firefox scrollbar */
.map-draft-experiment-places-grid {
  scrollbar-width: thin;
  scrollbar-color: rgba(0, 255, 136, 0.3) rgba(0, 0, 0, 0.2);
}

.map-draft-experiment-place-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s ease;
  padding: 8px;
  position: relative;
  overflow: hidden;
  width: 100%;
  box-sizing: border-box;
  min-width: 0;
}

.map-draft-experiment-place-card:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.3);
  transform: translateY(-2px);
}

.map-draft-experiment-place-card.active {
  background: rgba(0, 255, 136, 0.2);
  border-color: rgba(0, 255, 136, 0.6);
  box-shadow: 0 0 8px rgba(0, 255, 136, 0.3);
}

.map-draft-experiment-place-card:active {
  transform: translateY(0);
}

.map-draft-experiment-place-image {
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 2px;
  margin-bottom: 4px;
  flex-shrink: 0;
  display: block;
}

.map-draft-experiment-place-emoji {
  font-size: 2rem;
  line-height: 1;
  margin-bottom: 4px;
  flex-shrink: 0;
}

.map-draft-experiment-place-name {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.9);
  text-align: center;
  line-height: 1.2;
  word-break: break-word;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  width: 100%;
  flex-shrink: 0;
}

.map-draft-experiment-place-tooltip {
  background: rgba(0, 0, 0, 0.9);
  color: #ffffff;
  padding: 6px 10px;
  border-radius: 4px;
  font-size: 0.85rem;
  white-space: nowrap;
  pointer-events: none;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
  animation: tooltip-fade-in 0.15s ease;
}

.map-draft-experiment-maps-hud {
  position: absolute;
  top: max(20px, env(safe-area-inset-top, 0px));
  left: max(20px, env(safe-area-inset-left, 0px));
  z-index: 1001;
}

.map-draft-experiment-maps-toggle {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background: rgba(0, 0, 0, 0.8);
  border: 1px solid rgba(0, 255, 136, 0.3);
  border-radius: 8px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  cursor: pointer;
  transition: all 0.2s ease;
  outline: none;
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
}

.map-draft-experiment-maps-toggle:hover {
  background: rgba(0, 0, 0, 0.9);
  border-color: rgba(0, 255, 136, 0.5);
}

.map-draft-experiment-maps-toggle:focus,
.map-draft-experiment-maps-toggle:active {
  outline: none;
}

.map-draft-experiment-maps-toggle .material-icons {
  font-family: 'Material Icons';
  font-size: 1.2rem;
  color: #00ff88;
}

.map-draft-experiment-maps-label {
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #00ff88;
}

.map-draft-experiment-maps-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  min-width: 280px;
  max-width: 400px;
  max-height: 60vh;
  background: rgba(0, 0, 0, 0.95);
  border: 1px solid rgba(0, 255, 136, 0.3);
  border-radius: 8px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.map-draft-experiment-maps-menu-header {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(0, 255, 136, 0.2);
}

.map-draft-experiment-maps-menu-title {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #00ff88;
}

.map-draft-experiment-maps-create-header-btn {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 255, 136, 0.2);
  border: 1px solid rgba(0, 255, 136, 0.4);
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s ease;
  outline: none;
  -webkit-tap-highlight-color: transparent;
  padding: 0;
}

.map-draft-experiment-maps-create-header-btn:hover {
  background: rgba(0, 255, 136, 0.3);
  border-color: rgba(0, 255, 136, 0.6);
}

.map-draft-experiment-maps-create-header-btn:focus,
.map-draft-experiment-maps-create-header-btn:active {
  outline: none;
}

.map-draft-experiment-maps-create-header-btn .material-icons {
  font-family: 'Material Icons';
  font-size: 1.2rem;
  color: #00ff88;
}

.map-draft-experiment-maps-list {
  flex: 1;
  overflow-y: auto;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.map-draft-experiment-maps-empty {
  padding: 20px;
  text-align: center;
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.5);
}

.map-draft-experiment-map-item {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
  padding: 8px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: all 0.2s ease;
  position: relative;
}

.map-draft-experiment-map-item:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
}

.map-draft-experiment-map-item.active {
  background: rgba(0, 255, 136, 0.15);
  border-color: rgba(0, 255, 136, 0.4);
}

.map-draft-experiment-map-load {
  flex: 1;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
  background: transparent;
  border: none;
  padding: 4px 8px;
  cursor: pointer;
  text-align: left;
  outline: none;
  -webkit-tap-highlight-color: transparent;
}

.map-draft-experiment-map-load:focus,
.map-draft-experiment-map-load:active {
  outline: none;
}

.map-draft-experiment-map-load .material-icons {
  font-family: 'Material Icons';
  font-size: 1rem;
  color: #00ff88;
  flex-shrink: 0;
}

.map-draft-experiment-map-name {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.9);
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.map-draft-experiment-map-actions {
  display: flex;
  flex-direction: row;
  gap: 4px;
  flex-shrink: 0;
}

.map-draft-experiment-map-action {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s ease;
  outline: none;
  -webkit-tap-highlight-color: transparent;
  padding: 0;
}

.map-draft-experiment-map-action:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
}

.map-draft-experiment-map-action:focus,
.map-draft-experiment-map-action:active {
  outline: none;
}

.map-draft-experiment-map-action .material-icons {
  font-family: 'Material Icons';
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.7);
}

.map-draft-experiment-map-action:last-child .material-icons {
  color: #ff4444;
}

.map-draft-experiment-map-action.saved {
  background: rgba(0, 255, 136, 0.2);
  border-color: rgba(0, 255, 136, 0.6);
  animation: map-draft-experiment-save-feedback 0.3s ease;
}

.map-draft-experiment-map-action.saved .material-icons {
  color: #00ff88;
}


.map-draft-experiment-map-name-input-inline {
  width: 100%;
  padding: 6px 8px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(0, 255, 136, 0.4);
  border-radius: 4px;
  color: #ffffff;
  font-size: 0.8rem;
  outline: none;
  -webkit-tap-highlight-color: transparent;
  box-sizing: border-box;
}

.map-draft-experiment-map-name-input-inline:focus {
  border-color: rgba(0, 255, 136, 0.6);
  background: rgba(255, 255, 255, 0.15);
}


/* Top Right HUD - Layers */
.map-draft-experiment-layers-hud {
  position: absolute;
  top: max(20px, env(safe-area-inset-top, 0px));
  right: max(20px, env(safe-area-inset-right, 0px));
  z-index: 1001;
}

.map-draft-experiment-layers-toggle {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background: rgba(0, 0, 0, 0.8);
  border: 1px solid rgba(0, 255, 136, 0.3);
  border-radius: 8px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  cursor: pointer;
  transition: all 0.2s ease;
  outline: none;
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
}

.map-draft-experiment-layers-toggle:hover {
  background: rgba(0, 0, 0, 0.9);
  border-color: rgba(0, 255, 136, 0.5);
}

.map-draft-experiment-layers-toggle:focus,
.map-draft-experiment-layers-toggle:active {
  outline: none;
}

.map-draft-experiment-layers-toggle .material-icons {
  font-family: 'Material Icons';
  font-size: 1.2rem;
  color: #00ff88;
}

.map-draft-experiment-layers-label {
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #00ff88;
}

.map-draft-experiment-layers-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 280px;
  max-width: 400px;
  max-height: 60vh;
  background: rgba(0, 0, 0, 0.95);
  border: 1px solid rgba(0, 255, 136, 0.3);
  border-radius: 8px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.map-draft-experiment-layers-menu-header {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(0, 255, 136, 0.2);
}

.map-draft-experiment-layers-menu-title {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #00ff88;
}

.map-draft-experiment-layers-create-header-btn {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 255, 136, 0.2);
  border: 1px solid rgba(0, 255, 136, 0.4);
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s ease;
  outline: none;
  -webkit-tap-highlight-color: transparent;
  padding: 0;
}

.map-draft-experiment-layers-create-header-btn:hover {
  background: rgba(0, 255, 136, 0.3);
  border-color: rgba(0, 255, 136, 0.6);
}

.map-draft-experiment-layers-create-header-btn:focus,
.map-draft-experiment-layers-create-header-btn:active {
  outline: none;
}

.map-draft-experiment-layers-create-header-btn .material-icons {
  font-family: 'Material Icons';
  font-size: 1.2rem;
  color: #00ff88;
}

.map-draft-experiment-layers-list {
  flex: 1;
  overflow-y: auto;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.map-draft-experiment-layers-empty {
  padding: 20px;
  text-align: center;
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.5);
}

.map-draft-experiment-layer-item {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
  padding: 8px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: all 0.2s ease;
  position: relative;
}

.map-draft-experiment-layer-item:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
}

.map-draft-experiment-layer-item.active {
  background: rgba(0, 255, 136, 0.15);
  border-color: rgba(0, 255, 136, 0.4);
}

.map-draft-experiment-layer-visibility {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  padding: 0;
  cursor: pointer;
  outline: none;
  -webkit-tap-highlight-color: transparent;
  flex-shrink: 0;
}

.map-draft-experiment-layer-visibility:focus,
.map-draft-experiment-layer-visibility:active {
  outline: none;
}

.map-draft-experiment-layer-visibility .material-icons {
  font-family: 'Material Icons';
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.7);
}

.map-draft-experiment-layer-load {
  flex: 1;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
  background: transparent;
  border: none;
  padding: 4px 8px;
  cursor: pointer;
  text-align: left;
  outline: none;
  -webkit-tap-highlight-color: transparent;
}

.map-draft-experiment-layer-load:focus,
.map-draft-experiment-layer-load:active {
  outline: none;
}

.map-draft-experiment-layer-load .material-icons {
  font-family: 'Material Icons';
  font-size: 1rem;
  color: #00ff88;
  flex-shrink: 0;
}

.map-draft-experiment-layer-name {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.9);
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 6px;
}

.map-draft-experiment-layer-base-badge {
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: rgba(0, 255, 136, 0.7);
  background: rgba(0, 255, 136, 0.1);
  padding: 2px 6px;
  border-radius: 3px;
  border: 1px solid rgba(0, 255, 136, 0.3);
}

.map-draft-experiment-layer-actions {
  display: flex;
  flex-direction: row;
  gap: 4px;
  flex-shrink: 0;
}

.map-draft-experiment-layer-action {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s ease;
  outline: none;
  -webkit-tap-highlight-color: transparent;
  padding: 0;
}

.map-draft-experiment-layer-action:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
}

.map-draft-experiment-layer-action:focus,
.map-draft-experiment-layer-action:active {
  outline: none;
}

.map-draft-experiment-layer-action .material-icons {
  font-family: 'Material Icons';
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.7);
}

.map-draft-experiment-layer-action:last-child .material-icons {
  color: #ff4444;
}

.map-draft-experiment-layer-action.saved {
  background: rgba(0, 255, 136, 0.2);
  border-color: rgba(0, 255, 136, 0.6);
  animation: map-draft-experiment-save-feedback 0.3s ease;
}

.map-draft-experiment-layer-action.saved .material-icons {
  color: #00ff88;
}

@keyframes map-draft-experiment-save-feedback {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.15);
  }
  100% {
    transform: scale(1);
  }
}


.map-draft-experiment-layer-name-input-inline {
  width: 100%;
  padding: 6px 8px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(0, 255, 136, 0.4);
  border-radius: 4px;
  color: #ffffff;
  font-size: 0.8rem;
  outline: none;
  -webkit-tap-highlight-color: transparent;
  box-sizing: border-box;
}

.map-draft-experiment-layer-name-input-inline:focus {
  border-color: rgba(0, 255, 136, 0.6);
  background: rgba(255, 255, 255, 0.15);
}

.map-draft-experiment-layer-name-input-inline:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  background: rgba(255, 255, 255, 0.05);
}


/* Top HUDs - safe on Safari iOS (notch, Dynamic Island) */
.map-draft-experiment-top-huds {
  position: absolute;
  top: max(20px, env(safe-area-inset-top, 0px));
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: row;
  align-items: stretch;
  gap: 12px;
  z-index: 1000;
  padding-left: env(safe-area-inset-left, 0px);
  padding-right: env(safe-area-inset-right, 0px);
}

.map-draft-experiment-area-hud {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 12px 20px;
  background: rgba(0, 0, 0, 0.8);
  border: 1px solid rgba(0, 255, 136, 0.3);
  border-radius: 8px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  pointer-events: none;
}

.map-draft-experiment-area-label {
  font-size: 0.7rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(0, 255, 136, 0.7);
}

.map-draft-experiment-area-tiles,
.map-draft-experiment-area-px {
  font-size: 0.85rem;
  font-weight: 600;
  color: #00ff88;
  font-family: 'Courier New', monospace;
}

.map-draft-experiment-area-px {
  font-size: 0.75rem;
  color: rgba(0, 255, 136, 0.85);
}

.map-draft-experiment-opening-level-hud {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 12px 16px;
  background: rgba(0, 0, 0, 0.8);
  border: 1px solid rgba(0, 255, 136, 0.3);
  border-radius: 8px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.map-draft-experiment-opening-level-control {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
}

.map-draft-experiment-opening-level-btn {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  font-weight: 600;
  line-height: 1;
  color: #00ff88;
  background: rgba(0, 255, 136, 0.1);
  border: 1px solid rgba(0, 255, 136, 0.4);
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease;
  outline: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
}

.map-draft-experiment-opening-level-btn:hover:not(:disabled) {
  background: rgba(0, 255, 136, 0.2);
  border-color: rgba(0, 255, 136, 0.6);
}

.map-draft-experiment-opening-level-btn:focus,
.map-draft-experiment-opening-level-btn:active {
  outline: none;
}

.map-draft-experiment-opening-level-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

/* Sizing HUD */
.map-draft-experiment-sizing-hud {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 12px 16px;
  background: rgba(0, 0, 0, 0.8);
  border: 1px solid rgba(0, 255, 136, 0.3);
  border-radius: 8px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.map-draft-experiment-sizing-label {
  font-size: 0.7rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(0, 255, 136, 0.7);
}

.map-draft-experiment-sizing-control {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
}

.map-draft-experiment-sizing-value-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.map-draft-experiment-sizing-value {
  font-size: 0.95rem;
  font-weight: 600;
  color: #00ff88;
  font-family: 'Courier New', monospace;
  min-width: 2ch;
  text-align: center;
}

.map-draft-experiment-sizing-unit {
  font-size: 0.6rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: rgba(0, 255, 136, 0.6);
}

.map-draft-experiment-sizing-btn {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  font-weight: 600;
  line-height: 1;
  color: #00ff88;
  background: rgba(0, 255, 136, 0.1);
  border: 1px solid rgba(0, 255, 136, 0.4);
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease;
  outline: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
}

.map-draft-experiment-sizing-btn:hover:not(:disabled) {
  background: rgba(0, 255, 136, 0.2);
  border-color: rgba(0, 255, 136, 0.6);
}

.map-draft-experiment-sizing-btn:focus,
.map-draft-experiment-sizing-btn:active {
  outline: none;
}

.map-draft-experiment-sizing-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.map-draft-experiment-opening-level-label {
  font-size: 0.7rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(0, 255, 136, 0.7);
}

.map-draft-experiment-opening-level-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: #00ff88;
  font-family: 'Courier New', monospace;
  text-shadow: 0 0 10px rgba(0, 255, 136, 0.5);
}

/* Bottom HUD - safe on Safari iOS (home indicator) */
.map-draft-experiment-bottom-hud {
  position: absolute;
  bottom: max(20px, env(safe-area-inset-bottom, 0px));
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 8px 16px;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
  background: rgba(0, 0, 0, 0.8);
  border: 1px solid rgba(0, 255, 136, 0.3);
  border-radius: 8px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 1000;
  flex-wrap: wrap;
}

.map-draft-experiment-reset-center-btn {
  padding: 8px 20px;
  font-size: 0.8rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #00ff88;
  background: rgba(0, 255, 136, 0.1);
  border: 1px solid rgba(0, 255, 136, 0.4);
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  outline: none;
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
}

.map-draft-experiment-reset-center-btn:focus,
.map-draft-experiment-reset-center-btn:active {
  outline: none;
}

.map-draft-experiment-reset-center-btn:hover {
  background: rgba(0, 255, 136, 0.2);
  border-color: rgba(0, 255, 136, 0.6);
  box-shadow: 0 0 12px rgba(0, 255, 136, 0.3);
}

/* Right HUD - safe on Safari iOS */
.map-draft-experiment-right-hud {
  position: absolute;
  right: max(20px, env(safe-area-inset-right, 0px));
  top: 50%;
  transform: translateY(-50%);
  z-index: 1000;
  padding-right: env(safe-area-inset-right, 0px);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Mode selector */
.map-draft-experiment-mode-selector {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: rgba(0, 0, 0, 0.8);
  border: 1px solid rgba(0, 255, 136, 0.3);
  border-radius: 8px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  min-width: 140px; /* Consistent width for 4 mode cards */
}

.map-draft-experiment-mode-selector-label {
  font-size: 0.7rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: rgba(0, 255, 136, 0.7);
}

.map-draft-experiment-mode-cards-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 4px;
  width: 100%;
}

.map-draft-experiment-mode-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 6px 4px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  outline: none;
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
}

.map-draft-experiment-mode-card:focus,
.map-draft-experiment-mode-card:active {
  outline: none;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.map-draft-experiment-mode-card:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.3);
  transform: translateY(-1px);
}

.map-draft-experiment-mode-card.active {
  background: rgba(0, 255, 136, 0.15);
  border-color: rgba(0, 255, 136, 0.6);
  box-shadow: 0 0 12px rgba(0, 255, 136, 0.3);
}

.map-draft-experiment-mode-card:not(.active) {
  opacity: 0.5;
}

.map-draft-experiment-mode-card:not(.active):hover {
  opacity: 0.8;
}

.map-draft-experiment-mode-icon {
  font-size: 1.1rem;
  line-height: 1;
}

.map-draft-experiment-mode-icon.material-icons {
  font-family: 'Material Icons';
  font-weight: normal;
  font-style: normal;
  font-size: 1.1rem;
  line-height: 1;
  letter-spacing: normal;
  text-transform: none;
  display: inline-block;
  white-space: nowrap;
  word-wrap: normal;
  direction: ltr;
  -webkit-font-feature-settings: 'liga';
  -webkit-font-smoothing: antialiased;
}

.map-draft-experiment-mode-label {
  font-size: 0.55rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: rgba(255, 255, 255, 0.8);
  white-space: nowrap;
}

.map-draft-experiment-mode-card.active .map-draft-experiment-mode-label {
  color: #00ff88;
  font-weight: 600;
}

/* Eraser controls */
.map-draft-experiment-eraser-controls {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: rgba(0, 0, 0, 0.8);
  border: 1px solid rgba(0, 255, 136, 0.3);
  border-radius: 8px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  min-width: 140px; /* Match mode selector width for consistency */
}

.map-draft-experiment-erase-all-btn {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 16px;
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #ff4444;
  background: rgba(255, 68, 68, 0.1);
  border: 1px solid rgba(255, 68, 68, 0.4);
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  outline: none;
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
  width: 100%;
}

.map-draft-experiment-erase-all-btn:focus,
.map-draft-experiment-erase-all-btn:active {
  outline: none;
  border: 1px solid rgba(255, 68, 68, 0.4);
}

.map-draft-experiment-erase-all-btn:hover {
  background: rgba(255, 68, 68, 0.2);
  border-color: rgba(255, 68, 68, 0.6);
  box-shadow: 0 0 12px rgba(255, 68, 68, 0.3);
}

.map-draft-experiment-erase-all-btn .material-icons {
  font-family: 'Material Icons';
  font-weight: normal;
  font-style: normal;
  font-size: 1.1rem;
  line-height: 1;
  letter-spacing: normal;
  text-transform: none;
  display: inline-block;
  white-space: nowrap;
  word-wrap: normal;
  direction: ltr;
  -webkit-font-feature-settings: 'liga';
  -webkit-font-smoothing: antialiased;
}

/* Color picker */
.map-draft-experiment-color-picker {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: rgba(0, 0, 0, 0.8);
  border: 1px solid rgba(0, 255, 136, 0.3);
  border-radius: 8px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  min-width: 140px; /* Match mode selector width for consistency */
}

.map-draft-experiment-color-picker-label {
  font-size: 0.7rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: rgba(0, 255, 136, 0.7);
}

.map-draft-experiment-color-buttons {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  align-items: center;
}

.map-draft-experiment-color-btn {
  width: 28px;
  height: 28px;
  border-radius: 4px;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  outline: none;
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
}

.map-draft-experiment-color-btn:focus,
.map-draft-experiment-color-btn:active {
  outline: none;
}

.map-draft-experiment-color-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 0 8px rgba(255, 255, 255, 0.5);
}

.map-draft-experiment-color-btn.selected {
  transform: scale(1.15);
  box-shadow: 0 0 12px rgba(255, 255, 255, 0.8);
}

.map-draft-experiment-eraser-btn {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  border-radius: 4px;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, border-color 0.2s ease;
  outline: none;
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.map-draft-experiment-eraser-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 0 8px rgba(255, 255, 255, 0.5);
  background: rgba(255, 255, 255, 0.15);
}

.map-draft-experiment-eraser-btn.selected {
  transform: scale(1.15);
  box-shadow: 0 0 12px rgba(0, 255, 136, 0.8);
  background: rgba(0, 255, 136, 0.2);
  border-color: rgba(0, 255, 136, 0.6);
}

.map-draft-experiment-clear-color-btn {
  padding: 6px 12px;
  font-size: 0.7rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: rgba(255, 255, 255, 0.7);
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease;
  outline: none;
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
  width: 100%;
}

.map-draft-experiment-clear-color-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.5);
}

/* X/Y size labels next to top and right of square */
.map-draft-experiment-size-label {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  font-size: 0.65rem;
  font-weight: 500;
  color: rgba(0, 255, 136, 0.7);
  font-family: 'Courier New', monospace;
  white-space: nowrap;
}

.map-draft-experiment-size-label .map-draft-experiment-size-px {
  font-weight: 600;
  color: #00ff88;
}

.map-draft-experiment-size-label .map-draft-experiment-size-tiles {
  font-size: 0.55rem;
  color: rgba(0, 255, 136, 0.5);
}

.map-draft-experiment-size-x {
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  margin-bottom: 6px;
}

.map-draft-experiment-size-y {
  left: 100%;
  top: 50%;
  transform: translateY(-50%);
  margin-left: 8px;
}

.map-draft-experiment-square-container {
  position: relative;
  background: #000000;
  overflow: hidden;
  touch-action: none;
}

/* Only show grabbing cursor when panning (not painting/erasing) */
.map-draft-experiment-square-container:active {
  /* Cursor is controlled by inline style based on tool mode */
}

.map-draft-experiment-grid {
  pointer-events: none;
}

.map-draft-experiment-square {
  pointer-events: auto;
  user-select: none;
  border-radius: 2px;
}

.map-draft-experiment-square:not(.disabled):not(:active):hover {
  filter: brightness(1.3);
  transform: translate(-50%, -50%) scale(1.1);
  box-shadow: 0 0 12px rgba(255, 255, 255, 0.4) !important;
}

.map-draft-experiment-square.disabled {
  opacity: 0.4;
  filter: grayscale(0.6);
}

.map-draft-experiment-square.map-draft-experiment-highlight {
  animation: map-draft-experiment-pulse 2s ease-in-out infinite;
}

@keyframes map-draft-experiment-pulse {
  0%, 100% {
    box-shadow: 0 0 8px rgba(0, 255, 136, 0.5);
  }
  50% {
    box-shadow: 0 0 16px rgba(0, 255, 136, 0.8), 0 0 24px rgba(0, 255, 136, 0.4);
  }
}

.map-draft-experiment-tooltip {
  background: rgba(20, 20, 20, 0.95);
  color: #ffffff;
  padding: 6px 10px;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 500;
  white-space: nowrap;
  box-shadow: 
    0 2px 8px rgba(0, 0, 0, 0.6),
    0 0 0 1px rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.15);
  pointer-events: none;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  animation: tooltip-fade-in 0.15s ease-out;
}

.map-draft-experiment-tooltip--has-subtitle {
  white-space: normal;
}

.map-draft-experiment-tooltip-subtitle {
  font-size: 0.7rem;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.65);
  margin-top: 2px;
}

@keyframes tooltip-fade-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
.worldart-view {
  width: 100%;
  height: 100vh;
  height: 100dvh;
  background: #0a0a0a;
  color: #ffffff;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  /* Prevent page scroll on mobile */
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  touch-action: none; /* Prevent default touch behaviors like scrolling */
}

.worldart-content {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  position: relative;
  overflow: hidden;
}

.worldart-canvas-container {
  width: 90vw;
  height: 90vh;
  position: relative;
  overflow: hidden;
}

/* Placeholder when no map is loaded */
.worldart-placeholder {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(10, 10, 10, 0.95);
  backdrop-filter: blur(10px);
  z-index: 5; /* Below HUD elements (z-index: 10) but above canvas */
  pointer-events: all;
}

.worldart-placeholder-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  padding: 3rem;
  text-align: center;
  max-width: 500px;
}

.worldart-placeholder-icon {
  width: 120px;
  height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(60, 120, 90, 0.1);
  border: 2px solid rgba(60, 120, 90, 0.3);
  border-radius: 50%;
  margin-bottom: 0.5rem;
}

.worldart-placeholder-icon .material-icons {
  font-size: 64px;
  color: rgba(100, 200, 140, 0.6);
}

.worldart-placeholder-title {
  font-size: 1.75rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.95);
  margin: 0;
}

.worldart-placeholder-description {
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.7);
  margin: 0;
  line-height: 1.5;
}

.worldart-placeholder-actions {
  display: flex;
  gap: 1rem;
  margin-top: 0.5rem;
  flex-wrap: wrap;
  justify-content: center;
}

.worldart-placeholder-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  font-weight: 500;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  background: rgba(60, 120, 90, 0.2);
  color: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(60, 120, 90, 0.3);
}

.worldart-placeholder-btn:hover {
  background: rgba(60, 120, 90, 0.3);
  border-color: rgba(100, 200, 140, 0.5);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.worldart-placeholder-btn:active {
  transform: translateY(0);
}

.worldart-placeholder-btn .material-icons {
  font-size: 20px;
}

.worldart-placeholder-btn-load {
  background: rgba(60, 120, 90, 0.2);
  border-color: rgba(60, 120, 90, 0.3);
}

.worldart-placeholder-btn-load:hover {
  background: rgba(60, 120, 90, 0.35);
  border-color: rgba(100, 200, 140, 0.6);
}

.worldart-placeholder-btn-create {
  background: rgba(100, 200, 140, 0.2);
  border-color: rgba(100, 200, 140, 0.4);
  color: rgba(255, 255, 255, 0.95);
}

.worldart-placeholder-btn-create:hover {
  background: rgba(100, 200, 140, 0.35);
  border-color: rgba(120, 240, 160, 0.6);
}

@media (max-width: 768px) {
  .worldart-placeholder-content {
    padding: 2rem;
    gap: 1.25rem;
  }
  
  .worldart-placeholder-icon {
    width: 100px;
    height: 100px;
  }
  
  .worldart-placeholder-icon .material-icons {
    font-size: 56px;
  }
  
  .worldart-placeholder-title {
    font-size: 1.5rem;
  }
  
  .worldart-placeholder-description {
    font-size: 0.9rem;
  }
  
  .worldart-placeholder-actions {
    flex-direction: column;
    width: 100%;
  }
  
  .worldart-placeholder-btn {
    width: 100%;
    justify-content: center;
  }
}

.worldart-canvas {
  width: 100%;
  height: 100%;
  display: block;
  outline: none;
  /* Touch-friendly: prevent default touch behaviors */
  touch-action: none;
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
  user-select: none;
}

.worldart-canvas:focus {
  outline: none;
}

.worldart-controls {
  position: fixed;
  left: 2rem;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(20, 40, 30, 0.95);
  border: 1px solid rgba(60, 120, 90, 0.3);
  border-radius: 12px;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  min-width: 180px;
  z-index: 10;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

/* Bottom Right HUD - Toolbox */
.worldart-toolbox-hud {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 10;
  display: flex;
  flex-direction: column;
}

.worldart-toolbox-toggle {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background: rgba(20, 40, 30, 0.95);
  border: 1px solid rgba(60, 120, 90, 0.3);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  outline: none;
}

.worldart-toolbox-toggle:hover {
  background: rgba(30, 50, 40, 0.95);
  border-color: rgba(80, 160, 120, 0.5);
  outline: none;
}

.worldart-toolbox-toggle:focus {
  outline: none;
}

.worldart-toolbox-toggle:active {
  outline: none;
}

.worldart-toolbox-toggle .material-icons {
  font-size: 1.2rem;
  color: rgba(255, 255, 255, 0.9);
}

.worldart-toolbox-label {
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: rgba(255, 255, 255, 0.9);
}

.worldart-toolbox-menu {
  position: absolute;
  bottom: calc(100% + 8px);
  right: 0;
  min-width: 200px;
  background: rgba(20, 40, 30, 0.98);
  border: 1px solid rgba(60, 120, 90, 0.3);
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  z-index: 25; /* Above time cycle HUD (z-index: 20) */
}

.worldart-toolbox-palette {
  padding: 12px;
  border-bottom: 1px solid rgba(60, 120, 90, 0.2);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.worldart-toolbox-palette .worldart-color-picker-container {
  display: flex;
  justify-content: center;
  align-items: center;
}

.worldart-toolbox-palette .worldart-color-picker {
  width: 60px;
  height: 60px;
  border: 2px solid rgba(60, 120, 90, 0.4);
  border-radius: 8px;
  cursor: pointer;
  background: transparent;
  padding: 0;
  overflow: hidden;
  transition: all 0.2s;
  outline: none;
}

.worldart-toolbox-palette .worldart-color-picker:focus {
  outline: none;
  border-color: rgba(80, 160, 120, 0.6);
}

.worldart-toolbox-palette .worldart-color-picker:hover {
  border-color: rgba(80, 160, 120, 0.6);
  transform: scale(1.05);
}

.worldart-toolbox-palette .worldart-color-picker::-webkit-color-swatch-wrapper {
  padding: 0;
}

.worldart-toolbox-palette .worldart-color-picker::-webkit-color-swatch {
  border: none;
  border-radius: 6px;
}

.worldart-toolbox-palette .worldart-recent-colors {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  grid-template-rows: repeat(2, 1fr);
  gap: 0.25rem;
  width: 100%;
}

.worldart-toolbox-palette .worldart-palette {
  margin: 0;
}

.worldart-toolbox-menu-header {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(60, 120, 90, 0.2);
}

.worldart-toolbox-menu-title {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: rgba(255, 255, 255, 0.9);
}

.worldart-tool-buttons {
  display: flex;
  gap: 0.5rem;
  padding: 12px;
  flex-wrap: wrap;
}

.worldart-tool-button {
  flex: 1;
  padding: 0.75rem;
  background: rgba(40, 80, 60, 0.6);
  border: 1px solid rgba(60, 120, 90, 0.4);
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.9);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  min-width: 48px;
  height: 48px;
  outline: none;
}

.worldart-tool-button:focus {
  outline: none;
}

.worldart-tool-button:active {
  outline: none;
}

.worldart-tool-button:hover {
  background: rgba(50, 100, 75, 0.7);
  border-color: rgba(80, 160, 120, 0.5);
  transform: translateY(-1px);
  outline: none;
}

.worldart-tool-button.selected {
  background: rgba(50, 100, 75, 0.8);
  border-color: rgba(80, 160, 120, 0.6);
}

.worldart-tool-button.active {
  background: rgba(60, 140, 90, 0.8);
  border-color: rgba(100, 200, 140, 0.6);
  box-shadow: 0 0 12px rgba(60, 140, 90, 0.4);
}

.worldart-tool-button .material-icons {
  font-size: 1.5rem;
}

.worldart-color-picker-container {
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
}

.worldart-color-preview {
  width: 60px;
  height: 60px;
  border: 2px solid rgba(60, 120, 90, 0.4);
  border-radius: 8px;
  cursor: pointer;
  padding: 0;
  transition: all 0.2s;
  outline: none;
}

.worldart-color-preview:focus {
  outline: none;
}

.worldart-color-preview:hover {
  border-color: rgba(80, 160, 120, 0.6);
  transform: scale(1.05);
}

.worldart-color-picker-wrapper {
  position: absolute;
  top: calc(100% + 0.5rem);
  left: 50%;
  transform: translateX(-50%);
  z-index: 20;
}

.worldart-color-picker {
  width: 60px;
  height: 60px;
  border: 2px solid rgba(60, 120, 90, 0.4);
  border-radius: 8px;
  cursor: pointer;
  background: transparent;
  padding: 0;
  overflow: hidden;
  transition: all 0.2s;
  outline: none;
}

.worldart-color-picker:focus {
  outline: none;
  border-color: rgba(80, 160, 120, 0.6);
}

.worldart-color-picker:hover {
  border-color: rgba(80, 160, 120, 0.6);
  transform: scale(1.05);
}

.worldart-color-picker::-webkit-color-swatch-wrapper {
  padding: 0;
}

.worldart-color-picker::-webkit-color-swatch {
  border: none;
  border-radius: 6px;
}

.worldart-recent-colors {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  grid-template-rows: repeat(2, 1fr);
  gap: 0.25rem;
  width: 100%;
}

.worldart-color-tile {
  width: 100%;
  aspect-ratio: 1;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  padding: 0;
  transition: transform 0.2s;
  outline: none;
  background: transparent;
}

.worldart-color-tile:not(:disabled):hover {
  transform: scale(1.1);
  z-index: 1;
  position: relative;
}

.worldart-color-tile:disabled {
  cursor: default;
  opacity: 0.3;
}

.worldart-palette {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  width: 100%;
}

.worldart-palette-title {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.7);
  text-align: center;
  font-weight: 500;
}

.worldart-palette-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  grid-template-rows: repeat(5, 1fr);
  gap: 0.25rem;
  width: 100%;
}

.worldart-palette-tile {
  width: 100%;
  aspect-ratio: 1;
  border: 1px solid rgba(60, 120, 90, 0.3);
  border-radius: 4px;
  cursor: pointer;
  padding: 0;
  transition: all 0.2s;
  outline: none;
  background: transparent;
}

.worldart-palette-tile:hover {
  border-color: rgba(80, 160, 120, 0.6);
  transform: scale(1.1);
  z-index: 1;
  position: relative;
}

.worldart-instructions {
  margin-top: 0.5rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.worldart-instructions p {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.5);
  margin: 0.25rem 0;
}

/* Bottom Left HUD - Debug */
.worldart-debug-hud {
  position: fixed;
  bottom: 2rem;
  left: 2rem;
  z-index: 10;
  display: flex;
  flex-direction: column;
}

.worldart-debug-toggle {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background: rgba(20, 40, 30, 0.95);
  border: 1px solid rgba(60, 120, 90, 0.3);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  outline: none;
}

.worldart-debug-toggle:hover {
  background: rgba(30, 50, 40, 0.95);
  border-color: rgba(80, 160, 120, 0.5);
  outline: none;
}

.worldart-debug-toggle:focus {
  outline: none;
}

.worldart-debug-toggle:active {
  outline: none;
}

.worldart-debug-toggle .material-icons {
  font-size: 1.2rem;
  color: rgba(255, 255, 255, 0.9);
}

.worldart-debug-label {
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: rgba(255, 255, 255, 0.9);
}

.worldart-debug-menu {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 0;
  min-width: 280px;
  max-width: 400px;
  background: rgba(20, 40, 30, 0.98);
  border: 1px solid rgba(60, 120, 90, 0.3);
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  z-index: 25; /* Above time cycle HUD (z-index: 20) */
}

.worldart-debug-menu-header {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(60, 120, 90, 0.2);
}

.worldart-debug-menu-title {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: rgba(255, 255, 255, 0.9);
}

.worldart-debug-content {
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 120px; /* Fixed height to prevent resizing */
  font-family: 'Courier New', monospace;
}

.worldart-debug-item {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.8rem;
  min-height: 1.5rem; /* Fixed height per item */
}

.worldart-debug-item .worldart-debug-label {
  color: rgba(255, 255, 255, 0.6);
  font-weight: bold;
  text-transform: none;
  letter-spacing: normal;
}

.worldart-debug-value {
  color: rgba(255, 255, 255, 0.9);
  text-align: right;
  font-family: 'Courier New', monospace;
  min-width: 180px; /* Fixed width to prevent layout shift */
}

.worldart-debug-button {
  margin-top: 4px;
  padding: 8px 12px;
  background: rgba(60, 120, 90, 0.3);
  border: 1px solid rgba(60, 120, 90, 0.4);
  border-radius: 4px;
  color: rgba(255, 255, 255, 0.9);
  cursor: pointer;
  font-size: 0.8rem;
  font-family: 'Courier New', monospace;
  transition: all 0.2s ease;
  outline: none;
  text-align: center;
}

.worldart-debug-button:focus {
  outline: none;
}

.worldart-debug-button:active {
  outline: none;
}

.worldart-debug-button:hover {
  background: rgba(80, 160, 120, 0.4);
  border-color: rgba(100, 200, 140, 0.6);
  outline: none;
}

/* Top Left HUD - MapsNav */
.worldart-mapsnav-hud {
  position: fixed;
  top: 2rem;
  left: 2rem;
  z-index: 10;
  display: flex;
  flex-direction: column;
}

.worldart-mapsnav-toggle {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background: rgba(20, 40, 30, 0.95);
  border: 1px solid rgba(60, 120, 90, 0.3);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  outline: none;
}

.worldart-mapsnav-toggle:hover {
  background: rgba(30, 50, 40, 0.95);
  border-color: rgba(80, 160, 120, 0.5);
  outline: none;
}

.worldart-mapsnav-toggle:focus {
  outline: none;
}

.worldart-mapsnav-toggle:active {
  outline: none;
}

.worldart-mapsnav-toggle .material-icons {
  font-size: 1.2rem;
  color: rgba(255, 255, 255, 0.9);
}

.worldart-mapsnav-label {
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: rgba(255, 255, 255, 0.9);
}

.worldart-mapsnav-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  min-width: 280px;
  max-width: 400px;
  max-height: 60vh;
  background: rgba(20, 40, 30, 0.98);
  border: 1px solid rgba(60, 120, 90, 0.3);
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.worldart-mapsnav-menu-header {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  padding: 12px 8px;
  border-bottom: 1px solid rgba(60, 120, 90, 0.2);
}

.worldart-mapsnav-menu-title {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: rgba(255, 255, 255, 0.9);
}

.worldart-mapsnav-create-header-btn {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(60, 120, 90, 0.3);
  border: 1px solid rgba(60, 120, 90, 0.4);
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s ease;
  outline: none;
  padding: 0;
}

.worldart-mapsnav-create-header-btn:focus {
  outline: none;
}

.worldart-mapsnav-create-header-btn:active {
  outline: none;
}

.worldart-mapsnav-create-header-btn:hover {
  background: rgba(80, 160, 120, 0.4);
  border-color: rgba(100, 200, 140, 0.6);
  outline: none;
}

.worldart-mapsnav-create-header-btn .material-icons {
  font-size: 1.2rem;
  color: rgba(255, 255, 255, 0.9);
}

.worldart-mapsnav-list {
  flex: 1;
  overflow-y: auto;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.worldart-mapsnav-empty {
  padding: 20px;
  text-align: center;
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.5);
}

.worldart-mapsnav-item {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 4px;
  padding: 8px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: all 0.2s ease;
  position: relative;
  outline: none;
}

.worldart-mapsnav-item:focus {
  outline: none;
}

.worldart-mapsnav-item:active {
  outline: none;
}

.worldart-mapsnav-item:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
}

.worldart-mapsnav-item.active {
  background: rgba(60, 140, 90, 0.3);
  border-color: rgba(100, 200, 140, 0.5);
}

.worldart-mapsnav-load {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0;
  padding: 0;
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.9);
  cursor: pointer;
  text-align: left;
  outline: none;
  flex-shrink: 0;
}

.worldart-mapsnav-load:focus {
  outline: none;
}

.worldart-mapsnav-load:active {
  outline: none;
}

.worldart-mapsnav-load .material-icons {
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.7);
}

.worldart-mapsnav-name {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.9);
  text-align: left;
  margin-left: 0;
}

.worldart-mapsnav-name-input-inline {
  flex: 1;
  padding: 4px 8px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(60, 120, 90, 0.4);
  border-radius: 4px;
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.85rem;
  outline: none;
}

.worldart-mapsnav-actions {
  display: flex;
  flex-direction: row;
  gap: 4px;
}

.worldart-mapsnav-action {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.6);
  cursor: pointer;
  border-radius: 4px;
  transition: all 0.2s ease;
  outline: none;
  padding: 0;
}

.worldart-mapsnav-action:hover {
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.9);
}

.worldart-mapsnav-action .material-icons {
  font-size: 1rem;
}

/* Right HUD - Layers */
.worldart-layers-hud {
  position: fixed;
  top: 2rem;
  right: 2rem;
  z-index: 10;
  display: flex;
  flex-direction: column;
}

.worldart-layers-toggle {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background: rgba(20, 40, 30, 0.95);
  border: 1px solid rgba(60, 120, 90, 0.3);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  outline: none;
}

.worldart-layers-toggle:hover {
  background: rgba(30, 50, 40, 0.95);
  border-color: rgba(80, 160, 120, 0.5);
  outline: none;
}

.worldart-layers-toggle:focus {
  outline: none;
}

.worldart-layers-toggle:active {
  outline: none;
}

.worldart-layers-toggle .material-icons {
  font-size: 1.2rem;
  color: rgba(255, 255, 255, 0.9);
}

.worldart-layers-label {
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: rgba(255, 255, 255, 0.9);
}

.worldart-layers-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 280px;
  max-width: 400px;
  max-height: 60vh;
  background: rgba(20, 40, 30, 0.98);
  border: 1px solid rgba(60, 120, 90, 0.3);
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.worldart-layers-menu-header {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(60, 120, 90, 0.2);
}

.worldart-layers-menu-title {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: rgba(255, 255, 255, 0.9);
}

.worldart-layers-create-header-btn {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(60, 120, 90, 0.3);
  border: 1px solid rgba(60, 120, 90, 0.4);
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s ease;
  outline: none;
  padding: 0;
}

.worldart-layers-create-header-btn:focus {
  outline: none;
}

.worldart-layers-create-header-btn:active {
  outline: none;
}

.worldart-layers-create-header-btn:hover {
  background: rgba(80, 160, 120, 0.4);
  border-color: rgba(100, 200, 140, 0.6);
  outline: none;
}

.worldart-layers-create-header-btn .material-icons {
  font-size: 1.2rem;
  color: rgba(255, 255, 255, 0.9);
}

.worldart-layers-list {
  flex: 1;
  overflow-y: auto;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.worldart-layers-empty {
  padding: 20px;
  text-align: center;
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.5);
}

.worldart-layer-item {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
  padding: 8px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: all 0.2s ease;
  position: relative;
  outline: none;
}

.worldart-layer-item:focus {
  outline: none;
}

.worldart-layer-item:active {
  outline: none;
}

.worldart-layer-item:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
}

.worldart-layer-item.active {
  background: rgba(60, 140, 90, 0.3);
  border-color: rgba(100, 200, 140, 0.5);
}

.worldart-layer-visibility {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.6);
  cursor: pointer;
  border-radius: 4px;
  transition: all 0.2s ease;
  outline: none;
  padding: 0;
}

.worldart-layer-visibility:hover {
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.9);
}

.worldart-layer-visibility .material-icons {
  font-size: 1rem;
}

.worldart-layer-load {
  flex: 1;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
  padding: 0;
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.9);
  cursor: pointer;
  text-align: left;
  outline: none;
}

.worldart-layer-load:focus {
  outline: none;
}

.worldart-layer-load:active {
  outline: none;
}

.worldart-layer-load .material-icons {
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.7);
}

.worldart-layer-name {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.9);
  display: flex;
  align-items: center;
  gap: 6px;
}

.worldart-layer-base-badge {
  font-size: 0.7rem;
  padding: 2px 6px;
  background: rgba(60, 120, 90, 0.3);
  border: 1px solid rgba(60, 120, 90, 0.5);
  border-radius: 3px;
  color: rgba(255, 255, 255, 0.7);
}

.worldart-layer-name-input-inline {
  flex: 1;
  padding: 4px 8px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(60, 120, 90, 0.4);
  border-radius: 4px;
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.85rem;
  outline: none;
}

.worldart-layer-actions {
  display: flex;
  flex-direction: row;
  gap: 4px;
}

.worldart-layer-action {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.6);
  cursor: pointer;
  border-radius: 4px;
  transition: all 0.2s ease;
  outline: none;
  padding: 0;
}

.worldart-layer-action:hover {
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.9);
}

.worldart-layer-action .material-icons {
  font-size: 1rem;
}

/* Bottom Center HUD - Day/Night Cycle Ring Slider */
.worldart-timecycle-hud {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  display: flex;
  flex-direction: column;
}

.worldart-timecycle-ring-container {
  display: flex;
  align-items: center;
  justify-content: center;
}

.worldart-timecycle-ring {
  position: relative;
  width: 100px;
  height: 100px;
  cursor: pointer;
  user-select: none;
  /* Touch-friendly: larger touch target */
  touch-action: none; /* Prevent scrolling when dragging */
  -webkit-tap-highlight-color: transparent; /* Remove tap highlight on mobile */
}

.worldart-timecycle-ring-svg {
  width: 100%;
  height: 100%;
  transform: rotate(0deg);
}

.worldart-timecycle-ring-marker {
  position: absolute;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.worldart-timecycle-ring-marker .material-icons {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.8);
  filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.6));
}

.worldart-timecycle-ring-thumb {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 14px;
  height: 14px;
  margin-left: -7px;
  margin-top: -7px;
  background: rgba(255, 220, 100, 0.95);
  border: 2px solid rgba(255, 255, 255, 0.9);
  border-radius: 50%;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4), 0 0 12px rgba(255, 220, 100, 0.5);
  transform-origin: center center;
  pointer-events: none;
  transition: box-shadow 0.2s ease;
  /* Touch-friendly: larger visual target */
  width: 18px;
  height: 18px;
  margin-left: -9px;
  margin-top: -9px;
}

.worldart-timecycle-ring:hover .worldart-timecycle-ring-thumb {
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5), 0 0 20px rgba(255, 220, 100, 0.7);
}

.worldart-timecycle-ring-center {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.worldart-timecycle-ring-time {
  font-size: 0.9rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.95);
  font-family: 'Courier New', monospace;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}
.console-view {
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  background: #0a0a0a;
  color: #fff;
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  overflow: hidden;
  box-sizing: border-box;
}

/* Spline scene: full-screen, we handle orbit/pan/zoom — touch-action: none so the browser
   doesn’t start a scroll (which makes touchend non-cancelable and triggers [Intervention]) */
.console-view-spline {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  width: 100% !important;
  height: 100% !important;
  z-index: 0 !important;
  pointer-events: auto !important;
  touch-action: none;
}

.console-view-content {
  position: relative;
  flex: 1;
  min-height: 0;
  pointer-events: none;
  z-index: 10;
}

.console-view-nav-toggle {
  pointer-events: auto;
  position: fixed;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 100;
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 8px;
  background: rgba(10, 10, 10, 0.85);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  transition: background 0.2s ease;
  outline: none;
  -webkit-tap-highlight-color: transparent;
}

.console-view-nav-toggle:hover,
.console-view-nav-toggle:focus,
.console-view-nav-toggle:active {
  background: rgba(30, 30, 30, 0.9);
  outline: none;
}

.console-view-nav-toggle .material-icons {
  font-size: 24px;
}

/* Gyro orbit: move phone to look (Safari iOS) */
.console-view-gyro-toggle {
  pointer-events: auto;
  position: fixed;
  top: 0.75rem;
  right: 0.75rem;
  z-index: 100;
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 8px;
  background: rgba(10, 10, 10, 0.85);
  color: rgba(255, 255, 255, 0.8);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  transition: background 0.2s ease, color 0.2s ease;
  outline: none;
  -webkit-tap-highlight-color: transparent;
}

.console-view-gyro-toggle:hover,
.console-view-gyro-toggle:focus,
.console-view-gyro-toggle:active {
  background: rgba(30, 30, 30, 0.9);
  color: #fff;
  outline: none;
}

.console-view-gyro-toggle.is-active,
.console-view-gyro-toggle.is-active:hover,
.console-view-gyro-toggle.is-active:focus,
.console-view-gyro-toggle.is-active:active {
  background: rgba(40, 80, 120, 0.9);
  color: #fff;
  outline: none;
}

.console-view-gyro-toggle .material-icons {
  font-size: 24px;
}

/* Center bottom: reset camera / gyro base */
.console-view-reset-camera {
  pointer-events: auto;
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 100;
  width: 52px;
  height: 52px;
  border: none;
  border-radius: 50%;
  background: rgba(10, 10, 10, 0.9);
  color: rgba(255, 255, 255, 0.9);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.4);
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
  outline: none;
  -webkit-tap-highlight-color: transparent;
}

.console-view-reset-camera:hover,
.console-view-reset-camera:focus,
.console-view-reset-camera:active {
  background: rgba(30, 30, 30, 0.95);
  color: #fff;
  outline: none;
}

.console-view-reset-camera.just-pressed {
  background: rgba(60, 100, 140, 0.95);
  transform: translateX(-50%) scale(0.95);
}

.console-view-reset-camera .material-icons {
  font-size: 28px;
}
.filmmaker-view {
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  background: #0a0a0a;
  color: #fff;
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  overflow: hidden;
  box-sizing: border-box;
}

/* Spline scene as interactive background (mouse + touch) */
.filmmaker-view-spline {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  width: 100% !important;
  height: 100% !important;
  z-index: 0 !important;
  pointer-events: auto !important;
  touch-action: pan-x pan-y pinch-zoom;
}

.filmmaker-view-content {
  position: relative;
  flex: 1;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: calc(var(--admin-nav-height, 72px) + var(--admin-nav-spacing, 20px)) 1.5rem 1.5rem;
  pointer-events: none;
}

.filmmaker-view-nav-toggle {
  pointer-events: auto;
  position: fixed;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 100;
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 8px;
  background: rgba(10, 10, 10, 0.85);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  transition: background 0.2s ease;
}

.filmmaker-view-nav-toggle:hover {
  background: rgba(30, 30, 30, 0.9);
}

.filmmaker-view-nav-toggle .material-icons {
  font-size: 24px;
}

.filmmaker-view-hero {
  text-align: center;
  max-width: 32rem;
}

.filmmaker-view-title {
  margin: 0 0 1.5rem;
  font-size: clamp(2rem, 6vw, 3rem);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.filmmaker-view-bullets {
  margin: 0;
  padding: 0 0 0 1.25rem;
  list-style: disc;
  text-align: left;
  font-size: clamp(1rem, 2.5vw, 1.25rem);
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.9);
}

.filmmaker-view-bullets li {
  margin-bottom: 0.5rem;
}

.filmmaker-view-bullets li:last-child {
  margin-bottom: 0;
}

/* Notes panel – collapsible from bottom, autosaved to localStorage */
.filmmaker-view-notes-panel {
  pointer-events: auto;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 50;
  display: flex;
  flex-direction: column;
  background: rgba(10, 10, 10, 0.95);
  backdrop-filter: blur(12px);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.4);
  transition: transform 0.25s ease-out, box-shadow 0.25s ease-out;
}

.filmmaker-view-notes-panel:not(.is-open) {
  height: 44px;
  min-height: 44px;
  box-shadow: none;
}

.filmmaker-view-notes-panel:not(.is-open) .filmmaker-view-notes-header,
.filmmaker-view-notes-panel:not(.is-open) .filmmaker-view-notes-body {
  display: none;
}

.filmmaker-view-notes-tab {
  display: none;
  width: 100%;
  height: 44px;
  padding: 0 1rem;
  gap: 0.35rem;
  border: none;
  background: transparent;
  color: rgba(255, 255, 255, 0.9);
  font: inherit;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease;
}

.filmmaker-view-notes-tab:hover {
  background: rgba(255, 255, 255, 0.06);
}

.filmmaker-view-notes-tab .material-icons {
  font-size: 20px;
}

.filmmaker-view-notes-panel:not(.is-open) .filmmaker-view-notes-tab {
  display: flex;
}

.filmmaker-view-notes-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 1rem;
  min-height: 44px;
  flex-shrink: 0;
}

.filmmaker-view-notes-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.9);
}

.filmmaker-view-notes-toggle {
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease;
}

.filmmaker-view-notes-toggle:hover {
  background: rgba(255, 255, 255, 0.1);
}

.filmmaker-view-notes-toggle .material-icons {
  font-size: 24px;
}

.filmmaker-view-notes-body {
  flex: 1;
  min-height: 0;
  padding: 0 1rem 1rem;
}

.filmmaker-view-notes-textarea {
  width: 100%;
  height: 160px;
  min-height: 80px;
  max-height: 40vh;
  padding: 0.75rem 1rem;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.4);
  color: #fff;
  font: inherit;
  font-size: 0.95rem;
  line-height: 1.5;
  resize: vertical;
  box-sizing: border-box;
}

.filmmaker-view-notes-textarea::placeholder {
  color: rgba(255, 255, 255, 0.4);
}

.filmmaker-view-notes-textarea:focus {
  outline: none;
  border-color: rgba(255, 255, 255, 0.3);
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.08);
}
.homelife-network-view {
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  background: #0a0a0a;
  color: #fff;
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  overflow: hidden;
  box-sizing: border-box;
}

/* Spline scene as interactive background (mouse + touch) */
.homelife-network-view-spline {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  width: 100% !important;
  height: 100% !important;
  z-index: 0 !important;
  pointer-events: auto !important;
  touch-action: pan-x pan-y pinch-zoom;
}

.homelife-network-view-content {
  position: relative;
  flex: 1;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: calc(var(--admin-nav-height, 72px) + var(--admin-nav-spacing, 20px)) 1.5rem 1.5rem;
  pointer-events: none;
}

.homelife-network-view-nav-toggle {
  pointer-events: auto;
  position: fixed;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 100;
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 8px;
  background: rgba(10, 10, 10, 0.85);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  transition: background 0.2s ease;
}

.homelife-network-view-nav-toggle:hover {
  background: rgba(30, 30, 30, 0.9);
}

.homelife-network-view-nav-toggle .material-icons {
  font-size: 24px;
}

.homelife-network-view-hero {
  text-align: center;
  max-width: 32rem;
}

.homelife-network-view-title {
  margin: 0 0 1.5rem;
  font-size: clamp(2rem, 6vw, 3rem);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.homelife-network-view-bullets {
  margin: 0;
  padding: 0 0 0 1.25rem;
  list-style: disc;
  text-align: left;
  font-size: clamp(1rem, 2.5vw, 1.25rem);
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.9);
}

.homelife-network-view-bullets li {
  margin-bottom: 0.5rem;
}

.homelife-network-view-bullets li:last-child {
  margin-bottom: 0;
}

/* --- Notes panel (bottom drawer) --- */

.homelife-network-notes-fab {
  pointer-events: auto;
  position: fixed;
  bottom: max(1.25rem, env(safe-area-inset-bottom));
  left: 50%;
  transform: translateX(-50%);
  z-index: 90;
  width: 48px;
  height: 48px;
  border: none;
  border-radius: 50%;
  background: rgba(10, 10, 10, 0.9);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.4);
  transition: transform 0.2s ease, background 0.2s ease;
}

.homelife-network-notes-fab:hover {
  background: rgba(30, 30, 30, 0.95);
  transform: translateX(-50%) scale(1.05);
}

.homelife-network-notes-fab .material-icons {
  font-size: 24px;
}

.homelife-network-notes-panel {
  pointer-events: auto;
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 85;
  max-height: 45vh;
  background: rgba(10, 10, 10, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.3);
  display: flex;
  flex-direction: column;
  transition: transform 0.35s cubic-bezier(0.32, 0.72, 0, 1), opacity 0.25s ease;
  transform: translateY(100%);
  opacity: 0;
  visibility: hidden;
}

.homelife-network-notes-panel.is-open {
  transform: translateY(0);
  opacity: 1;
  visibility: visible;
}

.homelife-network-notes-drag {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 0.6rem 1rem;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.homelife-network-notes-drag-handle {
  width: 36px;
  height: 4px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.35);
}

.homelife-network-notes-status {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.5);
}

.homelife-network-notes-inner {
  flex: 1;
  min-height: 0;
  padding: 0 1rem 1rem;
  padding-bottom: max(1rem, env(safe-area-inset-bottom));
}

.homelife-network-notes-textarea {
  width: 100%;
  height: 160px;
  min-height: 120px;
  padding: 0.75rem 1rem;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  color: #fff;
  font: inherit;
  font-size: 0.95rem;
  line-height: 1.5;
  resize: vertical;
  outline: none;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.homelife-network-notes-textarea::placeholder {
  color: rgba(255, 255, 255, 0.4);
}

.homelife-network-notes-textarea:focus {
  border-color: rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.08);
}
.vals-team-view {
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  background: #0a0a0a;
  color: #fff;
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  overflow: hidden;
  box-sizing: border-box;
}

.vals-team-view-content {
  position: relative;
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: row;
  align-items: stretch;
  padding: calc(var(--admin-nav-height, 72px) + var(--admin-nav-spacing, 20px)) 0 0 0;
  pointer-events: none;
}

.vals-team-view-content > * {
  pointer-events: auto;
}

/* HUD panels */
.vt-hud {
  flex-shrink: 0;
  width: 200px;
  display: flex;
  flex-direction: column;
  background: rgba(18, 18, 18, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.1);
  overflow: hidden;
}

.vt-hud-left {
  border-left: none;
  border-radius: 0 12px 12px 0;
}

.vt-hud-right {
  border-right: none;
  border-radius: 12px 0 0 12px;
}

.vt-hud-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.6rem 0.75rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.vt-hud-title {
  margin: 0;
  padding: 0.6rem 0.75rem;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.6);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.vt-hud-header .vt-hud-title {
  padding: 0;
  border-bottom: none;
}

.vt-hud-add {
  width: 22px;
  height: 22px;
  border: none;
  border-radius: 50%;
  background: rgba(147, 51, 234, 0.3);
  color: #a855f7;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}

.vt-hud-add:hover {
  background: rgba(147, 51, 234, 0.5);
  transform: scale(1.1);
}

.vt-hud-scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 0.5rem;
}

/* Sections */
.vt-section {
  margin-bottom: 0.75rem;
}

.vt-section:last-child {
  margin-bottom: 0;
}

.vt-section-title {
  margin: 0 0 0.4rem;
  padding: 0 0.25rem;
  font-size: 0.6rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: rgba(255, 255, 255, 0.35);
}

/* Unit cards - 2-col grid, circular */
.vt-unit-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.vt-unit-card {
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--unit-bg);
  border: 2px solid var(--unit-border);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 6px;
  cursor: grab;
  transition: all 0.15s ease;
  position: relative;
  overflow: hidden;
  text-align: center;
}

.vt-unit-card:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}

.vt-unit-card.is-highlighted {
  box-shadow: 0 0 0 2px #fff, 0 0 20px var(--unit-border);
  transform: scale(1.08);
}

.vt-unit-card:active {
  cursor: grabbing;
  transform: scale(0.95);
}

.vt-unit-name {
  font-size: 0.6rem;
  font-weight: 700;
  color: #fff;
  line-height: 1.15;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
}

.vt-unit-type {
  font-size: 0.5rem;
  color: var(--unit-text);
  line-height: 1.1;
  opacity: 0.9;
}

.vt-unit-team {
  font-size: 0.45rem;
  color: rgba(255, 255, 255, 0.5);
  line-height: 1.1;
}

.vt-unit-badge {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: rgba(34, 197, 94, 0.9);
  color: #fff;
  font-size: 0.5rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Operation cards - square */
.vt-op-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.vt-op-card {
  padding: 0.6rem 0.7rem;
  border-radius: 8px;
  background: var(--op-bg);
  border: 1px solid var(--op-border);
  cursor: grab;
  transition: all 0.15s ease;
  position: relative;
}

.vt-op-card:hover {
  background: rgba(251, 191, 36, 0.3);
  border-color: rgba(251, 191, 36, 0.8);
  transform: translateX(-2px);
}

.vt-op-card.is-highlighted {
  box-shadow: 0 0 0 2px #fff, 0 0 16px rgba(251, 191, 36, 0.5);
}

.vt-op-card:active {
  cursor: grabbing;
  transform: scale(0.98);
}

.vt-op-name {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  color: #fff;
  line-height: 1.2;
  margin-bottom: 2px;
}

.vt-op-type {
  display: block;
  font-size: 0.6rem;
  color: var(--op-text);
}

.vt-op-badge {
  display: block;
  margin-top: 4px;
  font-size: 0.55rem;
  color: rgba(34, 197, 94, 0.9);
  font-weight: 600;
}

.vt-loading,
.vt-empty {
  padding: 1rem;
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.4);
  text-align: center;
}

/* Grid wrapper */
.vt-grid-wrap {
  flex: 1;
  min-height: 0;
  min-width: 0;
  position: relative;
  margin: 0 0.5rem;
}

.vt-grid-wrap .vt-maggrid {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
}

/* Drag ghost */
.vt-drag-ghost {
  position: fixed;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  padding: 8px 12px;
  border-radius: 8px;
  background: var(--ghost-bg);
  border: 2px solid var(--ghost-border);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 600;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
  opacity: 0.9;
}

.vt-drag-ghost.is-unit {
  border-radius: 50%;
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-size: 0.6rem;
  padding: 6px;
}

/* Modal */
.vt-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(0, 0, 0, 0.75);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.vt-modal {
  background: #1a1a1a;
  border-radius: 16px;
  padding: 1.25rem;
  max-width: 360px;
  width: 100%;
  box-shadow: 0 12px 48px rgba(0, 0, 0, 0.6);
}

.vt-modal-title {
  margin: 0 0 1rem;
  font-size: 1rem;
  font-weight: 600;
}

.vt-modal-label {
  display: block;
  margin-bottom: 0.75rem;
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.6);
}

.vt-modal-input {
  width: 100%;
  margin-top: 0.25rem;
  padding: 0.5rem 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  background: #0a0a0a;
  color: #fff;
  font: inherit;
  font-size: 0.85rem;
  box-sizing: border-box;
}

.vt-modal-input:focus {
  outline: none;
  border-color: #a855f7;
}

.vt-modal-actions {
  display: flex;
  gap: 0.5rem;
  justify-content: flex-end;
  margin-top: 1rem;
}

.vt-modal-btn {
  padding: 0.5rem 0.9rem;
  border: none;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
}

.vt-modal-btn.secondary {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.vt-modal-btn.secondary:hover {
  background: rgba(255, 255, 255, 0.15);
}

.vt-modal-btn.primary {
  background: #a855f7;
  color: #fff;
}

.vt-modal-btn.primary:hover {
  background: #9333ea;
}

.vt-modal-btn.danger {
  background: rgba(239, 68, 68, 0.2);
  color: #ef4444;
  margin-right: auto;
}

.vt-modal-btn.danger:hover {
  background: rgba(239, 68, 68, 0.3);
}

/* Info Modal */
.vt-info-modal {
  max-width: 400px;
}

.vt-info-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.vt-info-icon {
  width: 48px;
  height: 48px;
  flex-shrink: 0;
  background: var(--info-bg);
  border: 2px solid var(--info-border);
}

.vt-info-icon.is-unit {
  border-radius: 50%;
}

.vt-info-icon.is-op {
  border-radius: 8px;
}

.vt-info-title-wrap {
  flex: 1;
  min-width: 0;
}

.vt-info-title {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--info-color);
  line-height: 1.2;
}

.vt-info-title-editable {
  cursor: pointer;
  transition: opacity 0.15s ease;
  position: relative;
}

.vt-info-title-editable:hover {
  opacity: 0.8;
}

.vt-info-title-editable::after {
  content: '✎';
  margin-left: 0.5rem;
  font-size: 0.85rem;
  opacity: 0;
  transition: opacity 0.15s ease;
}

.vt-info-title-editable:hover::after {
  opacity: 0.5;
}

.vt-info-title-edit {
  width: 100%;
}

.vt-info-title-input {
  width: 100%;
  padding: 0.25rem 0.5rem;
  border: 2px solid var(--info-color);
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.3);
  color: #fff;
  font: inherit;
  font-size: 1.1rem;
  font-weight: 700;
  line-height: 1.2;
  box-sizing: border-box;
}

.vt-info-title-input:focus {
  outline: none;
  border-color: var(--info-color);
  background: rgba(0, 0, 0, 0.5);
}

.vt-info-type {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.5);
}

.vt-info-desc {
  margin: 0 0 1rem;
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.7);
  line-height: 1.4;
}

.vt-info-relations {
  background: rgba(255, 255, 255, 0.03);
  border-radius: 10px;
  padding: 0.75rem;
  margin-bottom: 1rem;
}

.vt-info-relations-title {
  margin: 0 0 0.5rem;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: rgba(255, 255, 255, 0.5);
}

.vt-info-none {
  margin: 0;
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.4);
  font-style: italic;
}

.vt-info-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.vt-info-list-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0;
  font-size: 0.8rem;
  color: #fff;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.vt-info-list-item:last-child {
  border-bottom: none;
}

.vt-info-dot {
  width: 8px;
  height: 8px;
  flex-shrink: 0;
}

.vt-info-dot.is-unit {
  border-radius: 50%;
  background: rgba(147, 51, 234, 0.8);
}

.vt-info-dot.is-op {
  border-radius: 2px;
  background: rgba(251, 191, 36, 0.8);
}
/* Hold indicator: relaxed reveal, slow bounce. Shiny divine gold. */

.hold-indicator {
  position: fixed;
  width: 0;
  height: 0;
  transform: translate(-50%, -50%);
  z-index: 140;
  pointer-events: none;
  animation: hold-reveal var(--hold-reveal-duration, 0.12s) ease-out forwards;
}

@keyframes hold-reveal {
  from {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.9);
  }
  to {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
}

.hold-loader {
  position: absolute;
  width: 200px;
  height: 200px;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  margin: 0;
}

.hold-sphere {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 56px;
  height: 56px;
  margin: -28px 0 0 -28px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, #fff9e6 0%, #ffec8b 25%, #ffd700 50%, #daa520 85%, #b8860b 100%);
  box-shadow:
    0 0 30px rgba(255, 215, 0, 0.7),
    0 0 60px rgba(255, 235, 150, 0.4),
    inset 0 -4px 12px rgba(0, 0, 0, 0.15),
    inset 0 4px 12px rgba(255, 255, 255, 0.4);
  animation: hold-pump var(--hold-bounce-duration, 0.9s) ease-in-out infinite;
}

.hold-ray {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 20px;
  margin: -10px 0 0 -10px;
  border-radius: 50%;
  border: 4px solid rgba(255, 235, 180, 0.85);
  box-shadow: 0 0 24px rgba(255, 215, 0, 0.5), 0 0 40px rgba(255, 235, 150, 0.25);
  animation: hold-ray var(--hold-bounce-duration, 0.9s) ease-out 0.25s infinite;
}

.hold-particles {
  position: absolute;
  width: 200px;
  height: 200px;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.hold-spark {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  transform-origin: 50% 50%;
}

.hold-particle {
  position: absolute;
  left: 0;
  top: 0;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: radial-gradient(circle, #fffacd 0%, #ffd700 60%, #daa520 100%);
  box-shadow: 0 0 12px rgba(255, 215, 0, 0.8), 0 0 4px rgba(255, 255, 255, 0.6);
  opacity: 0;
  animation: hold-particle var(--hold-bounce-duration, 0.9s) ease-in-out infinite;
}

@keyframes hold-pump {
  0% { width: 56px; height: 56px; margin: -28px 0 0 -28px; }
  50% { width: 72px; height: 72px; margin: -36px 0 0 -36px; }
  100% { width: 56px; height: 56px; margin: -28px 0 0 -28px; }
}

@keyframes hold-ray {
  0% { width: 20px; height: 20px; margin: -10px 0 0 -10px; opacity: 1; border-width: 2px; }
  100% { width: 160px; height: 160px; margin: -80px 0 0 -80px; opacity: 0; border-width: 4px; }
}

@keyframes hold-particle {
  0% { left: 0; top: 0; opacity: 0; }
  60% { opacity: 1; }
  100% { left: 47.5%; top: 47.5%; opacity: 1; }
}
/* Radial menu: center + items in a circle (CodePen-inspired). Bouncy organic open. */

.radial-menu-vars {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 200;
}

.radial-menu-vars > * {
  pointer-events: auto;
}

.radial-menu-backdrop {
  position: fixed;
  inset: 0;
  z-index: 150;
  cursor: default;
  animation: radial-menu-backdrop-in var(--radial-backdrop-in-duration, 0.35s) ease-out;
}

.radial-menu-backdrop.closing {
  animation: radial-menu-backdrop-out var(--radial-backdrop-out-duration, 0.5s) ease-in forwards;
}

@keyframes radial-menu-backdrop-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes radial-menu-backdrop-out {
  from { opacity: 1; }
  to { opacity: 0; }
}

.radial-menu {
  position: fixed;
  width: 5em;
  height: 5em;
  transform: translate(-50%, -50%);
  z-index: 160;
  pointer-events: none;
  animation: radial-menu-open var(--radial-menu-open-duration, 0.6s) cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
  transition: left 0.5s cubic-bezier(0.22, 1, 0.36, 1), top 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

.radial-menu.closing {
  animation: radial-menu-close var(--radial-menu-close-duration, 0.5s) ease-in forwards;
}

@keyframes radial-menu-open {
  from { opacity: 0; transform: translate(-50%, -50%) scale(0.5); }
  to { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}

@keyframes radial-menu-close {
  from {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
    filter: brightness(1);
  }
  to {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0);
    filter: brightness(0);
  }
}

.radial-menu .radial-menu-btn {
  pointer-events: auto;
}

.radial-menu-center-wrap {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  transform: translateZ(0);
  backface-visibility: hidden;
}

.radial-menu-btn {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
  border-radius: 50%;
  /* Bubble: highlight top-left, darker bottom-right */
  background: radial-gradient(
    circle at 35% 35%,
    rgba(255, 255, 255, 0.35) 0%,
    rgba(255, 255, 255, 0.12) 45%,
    rgba(200, 200, 220, 0.08) 70%,
    rgba(120, 120, 140, 0.15) 100%
  );
  box-shadow: inset 0 2px 8px rgba(255, 255, 255, 0.25), inset 0 -2px 6px rgba(0, 0, 0, 0.15);
  cursor: default;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.3s ease, background 0.2s ease;
  outline: none;
}

.radial-menu-btn:focus {
  outline: none;
}

.radial-menu-btn:focus-visible {
  outline: none;
}

.radial-menu-btn:disabled {
  cursor: default;
  opacity: 0.9;
}

/* Center: two-layer morph — opaque black base + gold layer that fades out. No transparency glitch. */
.radial-menu-trigger {
  z-index: 100;
  overflow: hidden;
  border-radius: 50%;
  background: transparent;
  cursor: default;
}

.radial-menu.center-morphed .radial-menu-trigger {
  cursor: pointer;
}

/* Black bubble base — always present */
.radial-menu-trigger-base {
  position: absolute;
  inset: 0;
  z-index: 0;
  border-radius: 50%;
  background: radial-gradient(
    circle at 35% 35%,
    rgba(60, 60, 65, 0.95) 0%,
    rgba(30, 30, 32, 0.98) 50%,
    rgba(18, 18, 20, 1) 100%
  );
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5), inset 0 2px 6px rgba(255, 255, 255, 0.08), inset 0 -2px 8px rgba(0, 0, 0, 0.4);
  pointer-events: none;
}

/* Opaque gold layer — fades out to reveal black; no alpha so no glitch */
.radial-menu-trigger-gold {
  position: absolute;
  inset: 0;
  z-index: 1;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, #fff9e6 0%, #ffec8b 25%, #ffd700 50%, #daa520 85%, #b8860b 100%);
  box-shadow:
    0 0 28px rgba(255, 215, 0, 0.6),
    0 0 50px rgba(255, 235, 150, 0.3),
    inset 0 -2px 8px rgba(0, 0, 0, 0.2),
    inset 0 2px 8px rgba(255, 255, 255, 0.3);
  pointer-events: none;
  opacity: 1;
  transition: opacity var(--radial-close-icon-duration, 0.35s) ease-out;
}

.radial-menu.center-morphed .radial-menu-trigger-gold {
  opacity: 0;
}

.radial-menu-close-icon {
  position: relative;
  z-index: 2;
  font-size: 28px !important;
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--radial-close-icon-duration, 0.35s) ease-out var(--radial-close-icon-delay, 0.2s), visibility 0s linear var(--radial-close-icon-duration, 0.35s);
  color: transparent;
  background: linear-gradient(135deg, #ffd700 0%, #ffec8b 25%, #ffd700 50%, #daa520 75%, #ffd700 100%);
  background-size: 200% 200%;
  -webkit-background-clip: text;
  background-clip: text;
  filter: drop-shadow(0 0 6px rgba(255, 215, 0, 0.8)) drop-shadow(0 0 12px rgba(255, 215, 0, 0.4)) drop-shadow(0 1px 2px rgba(0, 0, 0, 0.5));
}

.radial-menu.center-morphed .radial-menu-close-icon {
  opacity: 1;
  visibility: visible;
  transition-delay: var(--radial-close-icon-delay, 0.2s), 0s;
}

/* Jewelry dots: bubble gradient, golden lining, glow */
.radial-menu-btn-icon {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 50;
  opacity: 0;
  transform: translateY(0) scale(0.3) rotate(var(--radial-item-rotate, 0deg));
  animation: radial-menu-item-pop 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
  border: none;
  border-radius: 50%;
  background: radial-gradient(
    circle at 32% 32%,
    rgba(255, 255, 255, 0.5) 0%,
    rgba(255, 255, 255, 0.2) 35%,
    rgba(255, 235, 200, 0.12) 60%,
    rgba(200, 180, 160, 0.18) 100%
  );
  box-shadow:
    inset 0 2px 8px rgba(255, 255, 255, 0.4),
    inset 0 -2px 8px rgba(0, 0, 0, 0.2),
    0 0 0 1px rgba(255, 215, 0, 0.5),
    0 0 12px rgba(255, 215, 0, 0.25),
    0 4px 16px rgba(0, 0, 0, 0.35);
}

/* Golden shiny light bulb icon (add-idea button) */
.radial-menu-btn-icon-symbol {
  position: relative;
  z-index: 2;
  font-size: 1.4em !important;
  color: #ffd700;
  filter: drop-shadow(0 0 4px rgba(255, 215, 0, 0.8)) drop-shadow(0 0 8px rgba(255, 235, 150, 0.5));
  pointer-events: none;
}

.radial-menu-btn-icon::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: 50%;
  padding: 1px;
  background: linear-gradient(145deg, rgba(255, 235, 150, 0.9) 0%, rgba(218, 165, 32, 0.6) 40%, rgba(255, 215, 0, 0.8) 100%);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  box-shadow: 0 0 10px rgba(255, 215, 0, 0.3);
}

.radial-menu-icons {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.radial-menu-rotater {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  transform-origin: 50% 50%;
}

@keyframes radial-menu-item-pop {
  from {
    opacity: 0;
    transform: translateY(0) scale(0.2) rotate(var(--radial-item-rotate, 0deg));
  }
  to {
    opacity: 1;
    transform: translateY(-6em) scale(1) rotate(var(--radial-item-rotate, 0deg));
  }
}
/* Golden ripple: expands and fades out. More visible, randomized size via CSS vars. */

.tap-ripple {
  position: fixed;
  width: 0;
  height: 0;
  transform: translate(-50%, -50%);
  z-index: 135;
  pointer-events: none;
}

.tap-ripple::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 64px;
  height: 64px;
  margin: -32px 0 0 -32px;
  border-radius: 50%;
  border: 2px solid rgba(255, 215, 0, 0.65);
  box-shadow: 0 0 28px rgba(255, 215, 0, 0.35), 0 0 12px rgba(255, 235, 150, 0.25);
  animation: tap-ripple-out 0.6s ease-out forwards;
  transform-origin: center center;
}

@keyframes tap-ripple-out {
  from {
    transform: scale(var(--ripple-scale-start, 0.2));
    opacity: 0.85;
  }
  to {
    transform: scale(var(--ripple-scale-end, 2.2));
    opacity: 0;
  }
}
.aqua-thoughts-view {
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  background: #000;
  color: #fff;
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  overflow: hidden;
  box-sizing: border-box;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  /* Claim all touch so browser doesn’t zoom, pan, double-tap, or show context/3D touch */
  touch-action: none;
  -ms-touch-action: none;
}

/* Static water background */
.aqua-thoughts-water-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  background: url(/assets/aqua-thoughts-bg.png) center / cover no-repeat;
  pointer-events: none;
}

.aqua-thoughts-view.is-holding {
  cursor: none;
}

.aqua-thoughts-view-content {
  position: relative;
  z-index: 1;
  flex: 1;
  min-height: 0;
  pointer-events: none;
}

.aqua-thoughts-view-longpress-area {
  position: absolute;
  inset: 0;
  pointer-events: auto;
  cursor: default;
  touch-action: none;
  -ms-touch-action: none;
}

.aqua-thoughts-view-nav-toggle {
  pointer-events: auto;
  position: fixed;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 100;
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.85);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
  transition: background 0.2s ease;
}

.aqua-thoughts-view-nav-toggle:hover {
  background: rgba(30, 30, 30, 0.95);
}

.aqua-thoughts-view-nav-toggle .material-icons {
  font-size: 24px;
}

/* Circular settings button: bottom of screen */
.aqua-thoughts-view-settings-btn {
  pointer-events: auto;
  position: fixed;
  bottom: 1.25rem;
  right: 1.25rem;
  z-index: 100;
  width: 52px;
  height: 52px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 215, 0, 0.2);
  color: #ffd700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(255, 215, 0, 0.3);
  transition: background 0.2s ease, transform 0.2s ease;
}

.aqua-thoughts-view-settings-btn:hover {
  background: rgba(255, 215, 0, 0.35);
  transform: scale(1.05);
}

.aqua-thoughts-view-settings-btn .material-icons {
  font-size: 26px;
}

/* Bottom sheet modal */
.aqua-thoughts-settings-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  animation: aqua-settings-overlay-in 0.25s ease-out;
}

@keyframes aqua-settings-overlay-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

.aqua-thoughts-settings-sheet {
  width: 100%;
  max-width: 480px;
  max-height: 85vh;
  background: linear-gradient(180deg, #0a1628 0%, #0d1f33 100%);
  border-radius: 20px 20px 0 0;
  box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.5);
  display: flex;
  flex-direction: column;
  animation: aqua-settings-sheet-in 0.35s cubic-bezier(0.32, 0.72, 0, 1);
  overflow: hidden;
}

@keyframes aqua-settings-sheet-in {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

.aqua-thoughts-settings-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  flex-shrink: 0;
}

.aqua-thoughts-settings-title {
  margin: 0;
  font-size: 1.125rem;
  font-weight: 600;
  color: #fff;
}

.aqua-thoughts-settings-close {
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 50%;
  background: transparent;
  color: rgba(255, 255, 255, 0.7);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, color 0.2s;
}

.aqua-thoughts-settings-close:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.aqua-thoughts-settings-close .material-icons {
  font-size: 24px;
}

.aqua-thoughts-settings-body {
  padding: 1rem 1.25rem 1.5rem;
  overflow-y: auto;
  flex: 1;
  min-height: 0;
}

.aqua-thoughts-settings-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
  cursor: default;
}

.aqua-thoughts-settings-label {
  flex: 0 0 180px;
  font-size: 0.8125rem;
  color: rgba(255, 255, 255, 0.85);
}

.aqua-thoughts-settings-value {
  flex: 0 0 44px;
  font-size: 0.8125rem;
  font-variant-numeric: tabular-nums;
  color: #ffd700;
  text-align: right;
}

.aqua-thoughts-settings-slider {
  flex: 1;
  min-width: 0;
  height: 8px;
  -webkit-appearance: none;
  appearance: none;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 4px;
}

.aqua-thoughts-settings-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #ffd700;
  box-shadow: 0 0 8px rgba(255, 215, 0, 0.5);
  cursor: pointer;
  transition: transform 0.15s ease;
}

.aqua-thoughts-settings-slider::-webkit-slider-thumb:hover {
  transform: scale(1.1);
}

.aqua-thoughts-settings-slider::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border: none;
  border-radius: 50%;
  background: #ffd700;
  box-shadow: 0 0 8px rgba(255, 215, 0, 0.5);
  cursor: pointer;
}

.aqua-thoughts-settings-reset {
  margin-top: 1rem;
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.8);
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.aqua-thoughts-settings-reset:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
}

/* Ideas layer: Goo-wrapped draggable blobs */
.aqua-thoughts-ideas-layer {
  position: fixed;
  inset: 0;
  z-index: 10;
  pointer-events: none;
}

.aqua-thoughts-ideas-layer .aqua-thoughts-goo {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.aqua-thoughts-idea-blob {
  position: absolute;
  transform: translate(-50%, -50%);
  pointer-events: auto;
  min-width: 80px;
  max-width: 220px;
  padding: 0.75rem 1rem;
  border-radius: 20px;
  background: rgba(255, 215, 0, 0.35);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2), 0 0 0 1px rgba(255, 215, 0, 0.4);
  cursor: grab;
  touch-action: none;
  animation: aqua-idea-float 4s ease-in-out infinite;
}

.aqua-thoughts-idea-blob:active {
  cursor: grabbing;
}

.aqua-thoughts-idea-blob-text {
  display: block;
  font-size: 0.9375rem;
  line-height: 1.35;
  color: rgba(0, 0, 0, 0.85);
  word-break: break-word;
}

@keyframes aqua-idea-float {
  0%, 100% { transform: translate(-50%, -50%) translateY(0); }
  50% { transform: translate(-50%, -50%) translateY(-4px); }
}

/* Idea modal (bottom sheet) */
.aqua-thoughts-idea-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  animation: aqua-idea-overlay-in 0.25s ease-out;
}

@keyframes aqua-idea-overlay-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes aqua-idea-overlay-out {
  from { opacity: 1; }
  to { opacity: 0; }
}

.aqua-thoughts-idea-overlay.closing {
  animation: aqua-idea-overlay-out 0.35s ease-in forwards;
}

.aqua-thoughts-idea-sheet {
  width: 100%;
  max-width: 480px;
  max-height: 70vh;
  background: linear-gradient(180deg, #0a1628 0%, #0d1f33 100%);
  border-radius: 20px 20px 0 0;
  box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.5);
  display: flex;
  flex-direction: column;
  animation: aqua-idea-sheet-in 0.35s cubic-bezier(0.32, 0.72, 0, 1);
  overflow: hidden;
}

.aqua-thoughts-idea-sheet.closing {
  animation: aqua-idea-sheet-out 0.35s cubic-bezier(0.32, 0.72, 0, 1) forwards;
}

@keyframes aqua-idea-sheet-in {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

@keyframes aqua-idea-sheet-out {
  from { transform: translateY(0); }
  to { transform: translateY(100%); }
}

.aqua-thoughts-idea-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  flex-shrink: 0;
}

.aqua-thoughts-idea-title {
  margin: 0;
  font-size: 1.125rem;
  font-weight: 600;
  color: #fff;
}

.aqua-thoughts-idea-close {
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 50%;
  background: transparent;
  color: rgba(255, 255, 255, 0.7);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, color 0.2s;
}

.aqua-thoughts-idea-close:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.aqua-thoughts-idea-close .material-icons {
  font-size: 24px;
}

.aqua-thoughts-idea-body {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  overflow-x: hidden;
  overflow-y: auto;
  flex: 1;
  min-height: 0;
  min-width: 0;
}

.aqua-thoughts-idea-textarea {
  width: 100%;
  min-width: 0;
  min-height: 120px;
  padding: 1rem 1.25rem;
  box-sizing: border-box;
  font-size: 1.0625rem;
  line-height: 1.5;
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  resize: vertical;
  font-family: inherit;
  transition: border-color 0.2s, background 0.2s;
}

.aqua-thoughts-idea-textarea::placeholder {
  color: rgba(255, 255, 255, 0.4);
}

.aqua-thoughts-idea-textarea:focus {
  outline: none;
  border-color: rgba(255, 215, 0, 0.5);
  background: rgba(255, 255, 255, 0.08);
}

.aqua-thoughts-idea-submit {
  align-self: center;
  width: 56px;
  height: 56px;
  padding: 0;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #0a1628;
  background: linear-gradient(145deg, #ffd700 0%, #ffb700 50%, #e6a800 100%);
  border: none;
  cursor: pointer;
  box-shadow:
    0 0 0 1px rgba(255, 215, 0, 0.5),
    0 4px 16px rgba(255, 215, 0, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.4);
  transition: transform 0.2s, box-shadow 0.2s;
}

.aqua-thoughts-idea-submit .material-icons {
  font-size: 28px;
}

.aqua-thoughts-idea-submit:hover:not(:disabled) {
  transform: scale(1.08);
  box-shadow:
    0 0 0 1px rgba(255, 215, 0, 0.6),
    0 6px 24px rgba(255, 215, 0, 0.5),
    0 0 32px rgba(255, 215, 0, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

.aqua-thoughts-idea-submit:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.dream-builder-view {
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  background: linear-gradient(160deg, #0d0d1a 0%, #1a0d2e 35%, #0d1a2e 100%);
  color: #e8e0f0;
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  overflow: hidden;
  box-sizing: border-box;
}

.dream-builder-view-content {
  position: relative;
  flex: 1;
  min-height: 0;
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
}

.dream-builder-view-nav-toggle {
  pointer-events: auto;
  position: fixed;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 100;
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 8px;
  background: rgba(26, 13, 46, 0.85);
  color: #e8e0f0;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  transition: background 0.2s ease;
}

.dream-builder-view-nav-toggle:hover {
  background: rgba(60, 30, 90, 0.9);
}

.dream-builder-view-nav-toggle .material-icons {
  font-size: 24px;
}

.dream-builder-view-canvas {
  text-align: center;
  max-width: 32rem;
  padding: 2rem;
}

.dream-builder-view-title {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 600;
  letter-spacing: 0.02em;
  margin: 0 0 0.5rem;
  background: linear-gradient(135deg, #e8e0f0 0%, #c0a8e0 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.dream-builder-view-tagline {
  font-size: 1rem;
  opacity: 0.85;
  margin: 0 0 2rem;
}

.dream-builder-view-placeholder {
  font-size: 0.9rem;
  opacity: 0.5;
  padding: 1.5rem;
  border: 1px dashed rgba(192, 168, 224, 0.4);
  border-radius: 12px;
}

/* List view: projects + Create */
.dream-builder-view-list {
  text-align: left;
  max-width: 28rem;
}

.dream-builder-projects-list {
  list-style: none;
  margin: 0 0 1.5rem;
  padding: 0;
  border: 1px solid rgba(192, 168, 224, 0.25);
  border-radius: 12px;
  overflow: hidden;
}

.dream-builder-project-item {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid rgba(192, 168, 224, 0.15);
  background: rgba(0, 0, 0, 0.2);
}

.dream-builder-project-item:last-child {
  border-bottom: none;
}

.dream-builder-project-name {
  font-size: 1rem;
  color: #e8e0f0;
}

.dream-builder-create-btn {
  pointer-events: auto;
  padding: 0.6rem 1.25rem;
  font-size: 1rem;
  font-weight: 500;
  color: #0d0d1a;
  background: linear-gradient(135deg, #c0a8e0 0%, #a080d0 100%);
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: opacity 0.2s ease, transform 0.1s ease;
}

.dream-builder-create-btn:hover {
  opacity: 0.95;
  transform: translateY(-1px);
}

/* Wizard view state */
.dream-builder-wizard {
  text-align: center;
  max-width: 42rem;
}

.dream-builder-wizard-question {
  font-size: 1.35rem;
  font-weight: 600;
  color: #e8e0f0;
  margin-bottom: 1.75rem;
  letter-spacing: 0.02em;
}

.dream-builder-wizard-cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin-bottom: 2rem;
  list-style: none;
  padding: 0;
  margin-left: 0;
  margin-right: 0;
}

@media (min-width: 480px) {
  .dream-builder-wizard-cards {
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
  }
}

.dream-builder-wizard-card {
  pointer-events: auto;
  aspect-ratio: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 1rem;
  background: rgba(40, 25, 60, 0.6);
  border: 2px solid rgba(192, 168, 224, 0.35);
  border-radius: 20px;
  color: #e8e0f0;
  cursor: pointer;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.dream-builder-wizard-card:hover {
  transform: scale(1.03);
  border-color: rgba(192, 168, 224, 0.7);
  box-shadow: 0 8px 24px rgba(100, 60, 160, 0.3);
  background: rgba(60, 35, 90, 0.7);
}

.dream-builder-wizard-card:focus-visible {
  outline: 2px solid #c0a8e0;
  outline-offset: 2px;
}

.dream-builder-wizard-card-icon {
  font-size: 2.5rem;
  opacity: 0.9;
}

.dream-builder-wizard-card-label {
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-align: center;
  line-height: 1.2;
}

.dream-builder-wizard-heading {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  color: rgba(232, 224, 240, 0.9);
}

.dream-builder-wizard-step {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  color: #c0a8e0;
  margin-bottom: 2rem;
  padding: 1.5rem;
  border: 2px solid rgba(192, 168, 224, 0.5);
  border-radius: 12px;
}

.dream-builder-wizard-selected {
  font-size: 1rem;
  color: rgba(232, 224, 240, 0.9);
  margin-bottom: 2rem;
}

.dream-builder-wizard-selected strong {
  color: #c0a8e0;
}

.dream-builder-wizard-back {
  pointer-events: auto;
  padding: 0.5rem 1rem;
  font-size: 0.9rem;
  color: #e8e0f0;
  background: transparent;
  border: 1px solid rgba(192, 168, 224, 0.4);
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.2s ease;
}

.dream-builder-wizard-back:hover {
  background: rgba(192, 168, 224, 0.2);
}
.force-graph-view {
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  background: #0a1628;
  color: #fff;
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  overflow: hidden;
  box-sizing: border-box;
}

.force-graph-view-content {
  position: relative;
  flex: 1;
  min-height: 0;
  pointer-events: none;
}

.force-graph-view-nav-toggle {
  pointer-events: auto;
  position: fixed;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 100;
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 8px;
  background: rgba(10, 22, 40, 0.85);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  transition: background 0.2s ease;
}

.force-graph-view-nav-toggle:hover {
  background: rgba(20, 50, 80, 0.9);
}

.force-graph-view-nav-toggle .material-icons {
  font-size: 24px;
}

/* Graph canvas: fill content area and receive pointer events */
.force-graph-view-canvas {
  position: absolute;
  inset: 0;
  pointer-events: auto;
  min-height: 0;
}
/* EarthView - CesiumJS 3D Earth */

.earth-view {
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  position: fixed;
  top: 0;
  left: 0;
  overflow: hidden;
  background: #000;
}

/* Map fills the view; EarthMap component handles its own inner layout.
   Child canvas uses touch-action: none so Cesium gets single-drag, pinch, two-finger tilt. */
.earth-view-map {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  -webkit-tap-highlight-color: transparent;
}

.earth-view-map .cesium-viewer-toolbar,
.earth-view-map .cesium-viewer-animationContainer,
.earth-view-map .cesium-viewer-timelineContainer,
.earth-view-map .cesium-viewer-bottom,
.earth-view-map .cesium-viewer-fullscreenContainer,
.earth-view-map .cesium-viewer-vrContainer,
.earth-view-map .cesium-credit-logoContainer,
.earth-view-map .cesium-credit-expand-link {
  display: none !important;
}

.earth-view-loading {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  background: rgba(0, 0, 0, 0.85);
  color: #e0e0e0;
  font-size: 1rem;
  z-index: 100;
}

.earth-view-loading-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid rgba(255, 255, 255, 0.2);
  border-top-color: #4fc3f7;
  border-radius: 50%;
  animation: earth-view-spin 1s linear infinite;
}

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

.earth-view-controls {
  position: fixed;
  top: 80px;
  right: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 50;
}

.earth-view-btn {
  min-width: 44px;
  min-height: 44px;
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 8px;
  background: rgba(30, 30, 40, 0.85);
  color: #e0e0e0;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
  transition: background 0.2s ease, transform 0.15s ease;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.earth-view-btn:hover {
  background: rgba(50, 50, 70, 0.9);
  transform: scale(1.05);
}

.earth-view-btn:active {
  transform: scale(0.95);
}

.earth-view-btn .material-icons {
  font-size: 22px;
}

.earth-view-btn.active {
  background: rgba(79, 195, 247, 0.3);
  border: 2px solid rgba(79, 195, 247, 0.6);
}

.earth-view-btn.active:hover {
  background: rgba(79, 195, 247, 0.4);
}

.earth-view-location-picker {
  position: fixed;
  top: 80px;
  right: 70px;
  width: 200px;
  background: rgba(30, 30, 40, 0.95);
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
  overflow: hidden;
  z-index: 60;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.earth-view-location-picker-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  color: #e0e0e0;
  font-size: 0.9rem;
  font-weight: 500;
}

.earth-view-location-picker-close {
  width: 28px;
  height: 28px;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: #a0a0a0;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease, color 0.15s ease;
}

.earth-view-location-picker-close:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #e0e0e0;
}

.earth-view-location-picker-close .material-icons {
  font-size: 18px;
}

.earth-view-location-picker-list {
  max-height: 300px;
  overflow-y: auto;
}

.earth-view-location-picker-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border: none;
  background: transparent;
  color: #d0d0d0;
  font-size: 0.9rem;
  text-align: left;
  cursor: pointer;
  transition: background 0.15s ease;
}

.earth-view-location-picker-item:hover {
  background: rgba(255, 255, 255, 0.08);
}

.earth-view-location-picker-item .material-icons {
  font-size: 18px;
  color: #4fc3f7;
}

.earth-view-current-location {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 10px 20px;
  background: rgba(30, 30, 40, 0.85);
  border-radius: 10px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.4);
  z-index: 50;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.earth-view-current-location-name {
  color: #4fc3f7;
  font-size: 0.95rem;
  font-weight: 500;
}

.earth-view-current-location-coords {
  color: #a0a0a0;
  font-size: 0.8rem;
  font-family: 'SF Mono', 'Consolas', monospace;
}

.earth-view-instructions {
  position: fixed;
  bottom: 20px;
  right: 16px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  z-index: 40;
  pointer-events: none;
}

.earth-view-instructions span {
  color: rgba(255, 255, 255, 0.4);
  font-size: 0.75rem;
}

/* Mobile/tablet: minimum 44px touch targets, no hover-dependent instructions */
@media (max-width: 600px) {
  .earth-view-controls {
    top: 70px;
    right: 12px;
  }
  .earth-view-btn {
    min-width: 44px;
    min-height: 44px;
    width: 44px;
    height: 44px;
  }
  .earth-view-btn .material-icons {
    font-size: 22px;
  }
  .earth-view-location-picker {
    top: 70px;
    right: 60px;
    width: 180px;
  }
  .earth-view-location-picker-item {
    min-height: 44px;
    padding: 12px 16px;
  }
  .earth-view-current-location {
    bottom: 16px;
    padding: 10px 18px;
    min-height: 44px;
  }
  .earth-view-instructions {
    display: none;
  }
  .earth-view-instructions-touch {
    display: flex;
    position: fixed;
    bottom: 20px;
    right: 16px;
    z-index: 40;
    pointer-events: none;
  }
  .earth-view-instructions-touch span {
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.75rem;
  }
}

/* Touch hint: hidden on desktop, shown on mobile/tablet */
.earth-view-instructions-touch {
  display: none;
}

/* Map canvas: capture all touch gestures (rotate, pinch zoom, two-finger tilt) */
.earth-view .cesium-widget canvas {
  outline: none;
  position: relative;
  touch-action: none;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  cursor: grab;
}
.earth-view .cesium-widget canvas:active {
  cursor: grabbing;
}

.earth-view .cesium-widget,
.earth-view .cesium-widget canvas {
  width: 100%;
  height: 100%;
  box-sizing: border-box;
}
.chatshop-view {
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  background: #0a0a0a;
  color: #fff;
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  overflow: hidden;
  box-sizing: border-box;
}

/* Spline scene: full-screen interactive background */
.chatshop-view-spline {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  width: 100% !important;
  height: 100% !important;
  z-index: 0 !important;
  pointer-events: auto !important;
  touch-action: none;
}

.chatshop-view-content {
  position: relative;
  flex: 1;
  min-height: 0;
  pointer-events: none;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
}

.chatshop-view-nav-toggle {
  pointer-events: auto;
  position: fixed;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 100;
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 8px;
  background: rgba(26, 26, 26, 0.9);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
  transition: background 0.2s ease;
}

.chatshop-view-nav-toggle:hover {
  background: rgba(50, 50, 50, 0.95);
}

.chatshop-view-nav-toggle .material-icons {
  font-size: 24px;
}

/* Product modal (Tap → product1/product2/product3) */
.chatshop-view-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.6);
  pointer-events: auto;
}

.chatshop-view-modal {
  position: relative;
  min-width: 280px;
  padding: 1.5rem 3rem 1.5rem 1.5rem;
  background: rgba(26, 26, 26, 0.98);
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.chatshop-view-modal-title {
  margin: 0 0 0.5rem 0;
  font-size: 1.25rem;
  font-weight: 600;
  color: #fff;
}

.chatshop-view-modal-price {
  margin: 0 0 0.75rem 0;
  font-size: 1.125rem;
  font-weight: 600;
  color: #b8e986;
}

.chatshop-view-modal-description {
  margin: 0 0 1.25rem 0;
  font-size: 0.9375rem;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.85);
}

.chatshop-view-modal-buy {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  font-weight: 600;
  color: #0a0a0a;
  background: linear-gradient(
    135deg,
    #b8e986 0%,
    #9fd85a 25%,
    #c8f09e 50%,
    #9fd85a 75%,
    #b8e986 100%
  );
  background-size: 200% 200%;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  box-shadow:
    0 2px 8px rgba(184, 233, 134, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.5);
  transition: transform 0.15s ease, box-shadow 0.2s ease;
  animation: chatshop-buy-shine 3s ease-in-out infinite;
}

.chatshop-view-modal-buy:hover {
  transform: translateY(-1px);
  box-shadow:
    0 4px 12px rgba(184, 233, 134, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

@keyframes chatshop-buy-shine {
  0%,
  100% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
}

.chatshop-view-modal-close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  width: 36px;
  height: 36px;
  padding: 0;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: rgba(255, 255, 255, 0.8);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease, color 0.2s ease;
}

.chatshop-view-modal-close:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.chatshop-view-modal-close .material-icons {
  font-size: 22px;
}
.gamegrid-view {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--admin-bg, #0f172a);
  overflow: hidden;
}

.gamegrid-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem 1rem;
  background: rgba(15, 23, 42, 0.95);
  border-bottom: 1px solid rgba(148, 163, 184, 0.2);
  flex-shrink: 0;
}

.gamegrid-hint {
  margin: 0;
  font-size: 0.875rem;
  color: rgba(148, 163, 184, 0.9);
}

.gamegrid-reset {
  padding: 0.4rem 0.75rem;
  font-size: 0.8125rem;
  color: #94a3b8;
  background: rgba(51, 65, 85, 0.6);
  border: 1px solid rgba(148, 163, 184, 0.3);
  border-radius: 6px;
  cursor: pointer;
}

.gamegrid-reset:hover {
  background: rgba(51, 65, 85, 0.9);
  color: #e2e8f0;
}

.gamegrid-maggrid-wrap {
  flex: 1;
  min-height: 0;
  position: relative;
  width: 100%;
}

.gamegrid-maggrid {
  position: absolute;
  inset: 0;
}
.oniframe-view {
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  position: fixed;
  top: 0;
  left: 0;
  overflow: hidden;
}

.oniframe-view .oniframe {
  width: 100%;
  height: 100%;
}

.oniframe-view-nav-toggle {
  pointer-events: auto;
  position: fixed;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 100;
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 8px;
  background: rgba(10, 10, 10, 0.85);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  transition: background 0.2s ease;
}

.oniframe-view-nav-toggle:hover {
  background: rgba(30, 30, 30, 0.9);
}

.oniframe-view-nav-toggle .material-icons {
  font-size: 24px;
}

.oniframe-view-center-btn {
  pointer-events: auto;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.5);
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease, border-color 0.2s ease;
  z-index: 40;
}

.oniframe-view-center-btn:hover {
  background: rgba(255, 255, 255, 0.25);
  border-color: rgba(255, 255, 255, 0.8);
}

.oniframe-view-center-btn .material-icons {
  font-size: 28px;
}
.wheel-menu-view {
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  background: #0a0a0a;
  color: #fff;
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  overflow: hidden;
  box-sizing: border-box;
}

.wheel-menu-view-hub-content {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 55px;
  height: 55px;
  padding: 0;
  border-radius: 50%;
  background: linear-gradient(to bottom, #f7f7f7, #e7e7e7);
  border: solid 1px transparent;
  box-shadow:
    0px 3px 8px rgba(170, 170, 170, 0.6),
    inset 0px 2px 3px rgba(255, 255, 255, 0.8);
  color: #a7a7a7;
  font-size: 1.2rem;
  cursor: pointer;
  outline: none !important;
  outline-offset: 0 !important;
  -webkit-tap-highlight-color: transparent;
}

/* Override global button:hover / button:focus outline (index.css) – high specificity */
.wheel-menu-view .wheel-menu__hub button.wheel-menu-view-hub-content:hover,
.wheel-menu-view .wheel-menu__hub button.wheel-menu-view-hub-content:focus,
.wheel-menu-view .wheel-menu__hub button.wheel-menu-view-hub-content:focus-visible,
.wheel-menu-view .wheel-menu__hub button.wheel-menu-view-hub-content:active,
.wheel-menu .wheel-menu__hub button.wheel-menu-view-hub-content:hover,
.wheel-menu .wheel-menu__hub button.wheel-menu-view-hub-content:focus,
.wheel-menu .wheel-menu__hub button.wheel-menu-view-hub-content:focus-visible,
.wheel-menu .wheel-menu__hub button.wheel-menu-view-hub-content:active {
  outline: none !important;
  outline-offset: 0 !important;
  box-shadow:
    0px 3px 8px rgba(170, 170, 170, 0.6),
    inset 0px 2px 3px rgba(255, 255, 255, 0.8) !important;
}

/* Prevent browser focus ring from showing through or on ::before */
.wheel-menu-view-hub-content:focus::before,
.wheel-menu-view-hub-content:focus-visible::before,
.wheel-menu-view-hub-content:active::before {
  outline: none !important;
  box-shadow: inset 0px 8px 48px rgba(221, 221, 221, 0.8) !important;
}

.wheel-menu-view-hub-content::before {
  content: "";
  display: block;
  background: #fff;
  border-top: 2px solid rgba(221, 221, 221, 1);
  position: absolute;
  top: -8px;
  left: -8px;
  bottom: -8px;
  right: -8px;
  z-index: -1;
  border-radius: 50%;
  box-shadow: inset 0px 8px 48px rgba(221, 221, 221, 0.8);
}

.wheel-menu-view-hub-content .material-icons {
  font-size: 1.5rem;
}

.wheel-menu-view-nav-toggle {
  pointer-events: auto;
  position: fixed;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 100;
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 8px;
  background: rgba(26, 26, 26, 0.9);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
  transition: background 0.2s ease;
}

.wheel-menu-view-nav-toggle:hover {
  background: rgba(50, 50, 50, 0.95);
}

.wheel-menu-view-nav-toggle .material-icons {
  font-size: 24px;
}

/* Admin button: top right, same style as nav toggle */
.wheel-menu-view-admin-btn {
  pointer-events: auto;
  position: fixed;
  top: 0.75rem;
  right: 0.75rem;
  z-index: 100;
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 8px;
  background: rgba(26, 26, 26, 0.9);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
  transition: background 0.2s ease;
  outline: none;
}

.wheel-menu-view-admin-btn:hover,
.wheel-menu-view-admin-btn:focus,
.wheel-menu-view-admin-btn:active {
  background: rgba(50, 50, 50, 0.95);
  outline: none;
}

.wheel-menu-view-admin-btn .material-icons {
  font-size: 24px;
}

/* Settings modal: full screen overlay, 0.5 opacity bg + blur; content centered */
.wheel-menu-settings-modal-overlay {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10001;
  padding: 1rem;
  padding-bottom: calc(4rem + env(safe-area-inset-bottom, 0px));
  pointer-events: auto;
  box-sizing: border-box;
}

.wheel-menu-settings-modal {
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 1.5rem;
  max-width: 360px;
  width: 100%;
  box-shadow: none;
  margin: auto;
  text-align: center;
  box-sizing: border-box;
}

.wheel-menu-settings-modal-title,
.wheel-menu-settings-modal-field-label,
.wheel-menu-settings-modal-field label {
  text-align: center;
}

/* Collapsible drawers */
.wheel-menu-settings-drawer {
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 10px;
  margin-bottom: 0.5rem;
  overflow: hidden;
}

.wheel-menu-settings-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 0.6rem 0.75rem;
  font-size: 0.95rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.95);
  background: rgba(255, 255, 255, 0.06);
  border: none;
  cursor: pointer;
  text-align: left;
  outline: none;
  transition: background 0.2s ease;
  -webkit-tap-highlight-color: transparent;
}

.wheel-menu-settings-drawer-header:hover {
  background: rgba(255, 255, 255, 0.1);
}

.wheel-menu-settings-drawer-header:focus,
.wheel-menu-settings-drawer-header:focus-visible,
.wheel-menu-settings-drawer-header:active {
  outline: none;
}

.wheel-menu-settings-drawer-label {
  flex: 1;
}

.wheel-menu-settings-drawer-icon {
  font-size: 1.25rem;
  color: rgba(255, 255, 255, 0.7);
  flex-shrink: 0;
}

.wheel-menu-settings-drawer-content {
  padding: 0.75rem 0.75rem 1rem;
  background: rgba(0, 0, 0, 0.2);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.wheel-menu-settings-drawer-content[hidden] {
  display: none;
}

/* Menu position: 3x3 grid with center in middle */
.wheel-menu-settings-position-grid {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.375rem;
}

.wheel-menu-settings-position-row {
  display: flex;
  gap: 0.375rem;
  justify-content: center;
}

.wheel-menu-settings-position-btn {
  width: 2.5rem;
  height: 2rem;
  box-sizing: border-box;
  padding: 0;
  font-size: 0.9rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.8);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
  outline: none;
  display: flex;
  align-items: center;
  justify-content: center;
}

.wheel-menu-settings-position-btn:hover {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.4);
  color: #fff;
}

.wheel-menu-settings-position-btn--active {
  color: #1a1a1a;
  background: rgba(245, 215, 110, 0.9);
  border-color: rgba(245, 215, 110, 0.95);
}

.wheel-menu-settings-position-btn--active:hover {
  background: rgba(245, 215, 110, 1);
  color: #1a1a1a;
}

/* Circular close button fixed at bottom center */
.wheel-menu-settings-modal-close-btn {
  position: fixed;
  bottom: calc(1rem + env(safe-area-inset-bottom, 0px));
  left: 50%;
  transform: translateX(-50%);
  z-index: 10002;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: none;
  background: rgba(26, 26, 36, 0.95);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.4);
  transition: background 0.2s ease, transform 0.2s ease;
  outline: none;
}

.wheel-menu-settings-modal-close-btn:hover {
  background: rgba(50, 50, 60, 0.95);
  transform: translateX(-50%) scale(1.05);
}

.wheel-menu-settings-modal-close-btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px rgba(245, 215, 110, 0.5);
}

.wheel-menu-settings-modal-close-btn .material-icons {
  font-size: 28px;
}

.wheel-menu-settings-modal-title {
  color: #fff;
  font-size: 1.25rem;
  font-weight: 600;
  margin: 0 0 1rem 0;
}

.wheel-menu-settings-modal-field {
  margin-bottom: 1rem;
}

.wheel-menu-settings-modal-field label,
.wheel-menu-settings-modal-field-label {
  display: block;
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.9rem;
  font-weight: 500;
  margin-bottom: 0.5rem;
}

/* One row of square number toggles */
.wheel-menu-settings-badge-row {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.5rem;
  margin-bottom: 0.25rem;
  justify-content: center;
}

.wheel-menu-settings-badge-btn {
  flex: 1;
  aspect-ratio: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  font-size: 1rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.7);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
  outline: none;
}

.wheel-menu-settings-badge-btn:hover {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.4);
  color: #fff;
}

.wheel-menu-settings-badge-btn:focus {
  outline: none;
}

.wheel-menu-settings-badge-btn:focus-visible {
  border-color: rgba(245, 215, 110, 0.5);
  box-shadow: 0 0 0 2px rgba(245, 215, 110, 0.2);
}

.wheel-menu-settings-badge-btn--selected {
  color: #1a1a1a;
  background: rgba(245, 215, 110, 0.9);
  border-color: rgba(245, 215, 110, 0.95);
  box-shadow: 0 0 0 1px rgba(245, 215, 110, 0.5);
}

.wheel-menu-settings-badge-btn--selected:hover {
  background: rgba(245, 215, 110, 1);
  border-color: #f5d76e;
  color: #1a1a1a;
}

/* Wheel structure preview */
.wheel-menu-settings-preview-wrap {
  display: flex;
  justify-content: center;
  margin: 0.5rem 0;
}

.wheel-menu-settings-preview {
  display: block;
}

.wheel-menu-settings-preview-ring {
  fill: none;
  stroke: rgba(255, 255, 255, 0.25);
  stroke-width: 2;
}

.wheel-menu-settings-preview-hub {
  fill: rgba(245, 215, 110, 0.4);
  stroke: rgba(245, 215, 110, 0.6);
  stroke-width: 1;
}

.wheel-menu-settings-preview-badge {
  fill: rgba(255, 255, 255, 0.15);
  stroke: rgba(255, 255, 255, 0.4);
  stroke-width: 1;
}

.wheel-menu-settings-preview-badge-num {
  fill: rgba(255, 255, 255, 0.9);
  font-size: 12px;
  font-weight: 600;
  font-family: system-ui, sans-serif;
  pointer-events: none;
}

/* Start angle: where badge 1 is placed */
.wheel-menu-settings-start-angle-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.wheel-menu-settings-start-angle-row input[type="range"] {
  flex: 1;
  min-width: 0;
  height: 8px;
  -webkit-appearance: none;
  appearance: none;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 4px;
  outline: none;
}

.wheel-menu-settings-start-angle-row input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: rgba(245, 215, 110, 0.9);
  border: 1px solid rgba(245, 215, 110, 0.95);
  cursor: pointer;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.2);
}

.wheel-menu-settings-start-angle-row input[type="range"]::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: rgba(245, 215, 110, 0.9);
  border: 1px solid rgba(245, 215, 110, 0.95);
  cursor: pointer;
}

.wheel-menu-settings-start-angle-value {
  flex-shrink: 0;
  min-width: 2.5rem;
  font-size: 0.95rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.9);
}

/* Shortcut angle buttons: 3x3 grid with empty center */
.wheel-menu-settings-angle-shortcuts {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.375rem;
  margin-top: 0.5rem;
}

.wheel-menu-settings-angle-shortcuts-row {
  display: flex;
  gap: 0.375rem;
  justify-content: center;
}

.wheel-menu-settings-angle-btn,
.wheel-menu-settings-angle-shortcuts-empty {
  width: 2.5rem;
  height: 2rem;
  box-sizing: border-box;
}

.wheel-menu-settings-angle-shortcuts-empty {
  flex-shrink: 0;
}

.wheel-menu-settings-angle-btn {
  padding: 0;
  font-size: 0.8rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.8);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
  outline: none;
  display: flex;
  align-items: center;
  justify-content: center;
}

.wheel-menu-settings-angle-btn:hover {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.4);
  color: #fff;
}

.wheel-menu-settings-angle-btn:focus-visible {
  border-color: rgba(245, 215, 110, 0.5);
  box-shadow: 0 0 0 2px rgba(245, 215, 110, 0.2);
}

.wheel-menu-settings-angle-btn--active {
  color: #1a1a1a;
  background: rgba(245, 215, 110, 0.9);
  border-color: rgba(245, 215, 110, 0.95);
}

.wheel-menu-settings-angle-btn--active:hover {
  background: rgba(245, 215, 110, 1);
  color: #1a1a1a;
}

.wheel-menu-settings-modal-hint {
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.8rem;
  margin: 0.5rem 0 0 0;
}

/* Emoji for each button */
.wheel-menu-settings-emoji-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
  margin-top: 0.5rem;
}

.wheel-menu-settings-emoji-cell {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
}

.wheel-menu-settings-emoji-index {
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.5);
}

.wheel-menu-settings-emoji-btn {
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
  font-size: 1.25rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 8px;
  color: #fff;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease;
  outline: none;
}

.wheel-menu-settings-emoji-btn:hover {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.4);
}

.wheel-menu-settings-emoji-btn[aria-expanded="true"] {
  border-color: rgba(245, 215, 110, 0.6);
  box-shadow: 0 0 0 2px rgba(245, 215, 110, 0.2);
}

/* Emoji picker popover (portal) */
.wheel-menu-settings-emoji-picker-wrap {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 10003;
  background: rgba(20, 20, 30, 0.98);
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  padding: 0.75rem;
  box-shadow: 0 0 40px rgba(0, 0, 0, 0.6);
  max-width: 90vw;
  max-height: 90vh;
  overflow: auto;
}

.wheel-menu-settings-emoji-picker-close {
  display: block;
  width: 100%;
  margin-top: 0.5rem;
  padding: 0.5rem;
  font-size: 0.9rem;
  font-weight: 500;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 8px;
  color: #fff;
  cursor: pointer;
  outline: none;
}

.wheel-menu-settings-emoji-picker-close:hover {
  background: rgba(255, 255, 255, 0.15);
}

.media-selection-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  padding: 1rem;
}

@media (min-width: 600px) {
  .media-selection-modal-overlay {
    padding: 2rem;
  }
}

.media-selection-modal-content {
  background: #1a1a1a;
  border-radius: 12px;
  width: 95%;
  max-width: 900px;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

@media (min-width: 600px) {
  .media-selection-modal-content {
    width: 90%;
    max-height: 80vh;
  }
}

.media-selection-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

@media (min-width: 600px) {
  .media-selection-modal-header {
    padding: 1.5rem;
  }
}

.media-selection-modal-header h2 {
  margin: 0;
  color: #fff;
  font-size: 1.25rem;
}

@media (min-width: 600px) {
  .media-selection-modal-header h2 {
    font-size: 1.5rem;
  }
}

.media-selection-modal-close {
  background: none;
  border: none;
  color: #fff;
  font-size: 2rem;
  cursor: pointer;
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: background 0.2s;
}

.media-selection-modal-close:hover {
  background: rgba(255, 255, 255, 0.1);
}

.media-selection-modal-error {
  padding: 1rem;
  color: #ff4444;
  text-align: center;
}

.media-selection-modal-loading,
.media-selection-modal-empty {
  padding: 3rem;
  text-align: center;
  color: rgba(255, 255, 255, 0.5);
}

.media-selection-modal-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
  padding: 1rem;
  overflow-y: auto;
  overflow-x: hidden;
  flex: 1;
  min-height: 0;
  width: 100%;
  box-sizing: border-box;
  align-content: start;
  /* Prevent grid items from overlapping on iOS Safari */
  grid-auto-rows: min-content;
  /* Ensure proper grid behavior on iOS */
  -webkit-overflow-scrolling: touch;
}

/* Tablet and up - 3 columns */
@media (min-width: 600px) {
  .media-selection-modal-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    padding: 1.25rem;
  }
}

/* Desktop - 4 columns */
@media (min-width: 900px) {
  .media-selection-modal-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 1.25rem;
    padding: 1.5rem;
  }
}

/* Large desktop - 5 columns */
@media (min-width: 1200px) {
  .media-selection-modal-grid {
    grid-template-columns: repeat(5, 1fr);
    gap: 1.5rem;
  }
}

.media-selection-modal-item {
  width: 100%;
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.05);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  border: 2px solid transparent;
  box-sizing: border-box;
  /* Create square using padding-bottom trick - works on all browsers including iOS Safari */
  height: 0;
  padding-bottom: 100%;
  /* Ensure proper stacking context */
  isolation: isolate;
}

/* Modern browsers can use aspect-ratio, but keep padding-bottom as fallback for iOS */
@supports (aspect-ratio: 1 / 1) {
  .media-selection-modal-item {
    aspect-ratio: 1 / 1;
    /* Still keep padding-bottom for iOS Safari which sometimes has issues with aspect-ratio in grids */
    padding-bottom: 100%;
  }
}

.media-selection-modal-item:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 16px rgba(0, 255, 136, 0.3);
  border-color: rgba(0, 255, 136, 0.5);
  z-index: 10;
}

.media-selection-modal-item > * {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  pointer-events: none;
  /* Ensure content doesn't overflow on iOS */
  max-width: 100%;
  max-height: 100%;
  /* Prevent images from breaking layout on iOS Safari */
  border: none;
  margin: 0;
  padding: 0;
}

.media-selection-modal-item img,
.media-selection-modal-item video {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  pointer-events: none;
  border: none;
  margin: 0;
  padding: 0;
}

.media-selection-audio-preview,
.media-selection-other-preview {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  background: rgba(255, 255, 255, 0.05);
}

.audio-icon,
.file-icon {
  font-size: 2.5rem;
}
.entity-list-demo-view {
  min-height: 100vh;
  background: #000000;
  color: #ffffff;
  display: flex;
  flex-direction: column;
  overflow: auto;
}

.entity-list-demo-controls {
  position: fixed;
  top: max(1rem, env(safe-area-inset-top));
  left: 50%;
  transform: translateX(-50%);
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: rgba(0, 0, 0, 0.9);
  border: 1px solid rgba(255, 68, 68, 0.3);
  border-radius: 6px;
  padding: 0.5rem 1rem;
  backdrop-filter: blur(10px);
}

.entity-list-demo-controls label {
  font-size: 0.9rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.8);
}

.entity-list-demo-select {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  padding: 0.4rem 0.75rem;
  color: #ffffff;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.entity-list-demo-select:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 68, 68, 0.3);
}

.entity-list-demo-select:focus {
  outline: none;
  border-color: rgba(255, 68, 68, 0.5);
  box-shadow: 0 0 0 2px rgba(255, 68, 68, 0.1);
}

.entity-list-demo-content {
  flex: 1;
  padding-top: 4rem;
  width: 100%;
}
.me-view {
  min-height: 100vh;
  background: #0a0a0a;
  color: #fff;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

/* Center-top account button (same style as LobbyView account btn: metal, profile pic or initial) */
.me-account-wrap {
  position: fixed;
  top: 2rem;
  top: max(2rem, env(safe-area-inset-top));
  left: 50%;
  transform: translateX(-50%);
  z-index: 100;
}

.me-account-btn {
  position: relative;
  width: 55px;
  height: 55px;
  border-radius: 50%;
  background: linear-gradient(to bottom, #f7f7f7, #e7e7e7);
  border: solid 1px transparent;
  box-shadow:
    0px 3px 8px rgba(170, 170, 170, 0.6),
    inset 0px 2px 3px rgba(255, 255, 255, 0.8);
  cursor: pointer;
  padding: 0;
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #a7a7a7;
  font-size: 1.2rem;
  font-weight: 600;
  transition: all 0.3s ease;
  -webkit-tap-highlight-color: transparent;
}

.me-account-btn::before {
  content: "";
  display: block;
  background: #fff;
  border-top: 2px solid rgba(221, 221, 221, 1);
  position: absolute;
  top: -8px;
  left: -8px;
  bottom: -8px;
  right: -8px;
  z-index: -1;
  border-radius: 50%;
  box-shadow: inset 0px 8px 48px rgba(221, 221, 221, 0.8);
}

.me-account-btn:hover {
  filter: brightness(1.05);
  transform: scale(1.05);
  color: #555;
}

.me-account-btn:active {
  box-shadow: none;
  border: solid 1px rgba(167, 167, 167, 1);
  transform: scale(0.98);
}

.me-account-avatar {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.me-account-icon {
  font-family: 'Material Icons';
  font-size: 1.5rem;
  font-style: normal;
  font-weight: normal;
  line-height: 1;
  letter-spacing: normal;
  text-transform: none;
  display: inline-block;
  white-space: nowrap;
  -webkit-font-smoothing: antialiased;
}

.me-account-initial {
  font-family: inherit;
  font-size: 1.2rem;
  font-weight: 600;
  line-height: 1;
}

/* Center bottom Home button (navigates to LobbyView /) */
.me-home-btn {
  position: fixed;
  bottom: max(2rem, env(safe-area-inset-bottom));
  left: 50%;
  transform: translateX(-50%);
  width: 55px;
  height: 55px;
  border-radius: 50%;
  background: linear-gradient(to bottom, #f7f7f7, #e7e7e7);
  border: solid 1px transparent;
  box-shadow:
    0px 3px 8px rgba(170, 170, 170, 0.6),
    inset 0px 2px 3px rgba(255, 255, 255, 0.8);
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #a7a7a7;
  transition: all 0.3s ease;
  -webkit-tap-highlight-color: transparent;
  z-index: 100;
}

.me-home-btn::before {
  content: "";
  display: block;
  background: #fff;
  border-top: 2px solid rgba(221, 221, 221, 1);
  position: absolute;
  top: -8px;
  left: -8px;
  bottom: -8px;
  right: -8px;
  z-index: -1;
  border-radius: 50%;
  box-shadow: inset 0px 8px 48px rgba(221, 221, 221, 0.8);
}

.me-home-btn:hover {
  filter: brightness(1.05);
  transform: translateX(-50%) scale(1.05);
  color: #555;
}

.me-home-btn:active {
  box-shadow: none;
  border: solid 1px rgba(167, 167, 167, 1);
  transform: translateX(-50%) scale(0.98);
}

.me-home-btn .material-icons {
  font-size: 1.5rem;
}

.me-loading {
  text-align: center;
  color: rgba(255, 255, 255, 0.6);
  margin-top: 2rem;
}

.me-saves {
  max-width: 32rem;
  margin: 0 auto;
}

.me-saves-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin: 0 0 1rem;
  color: rgba(255, 255, 255, 0.9);
}

.me-saves-empty {
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.95rem;
  margin: 0;
}

.me-saves-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.me-save-item {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.me-save-row {
  display: flex;
  align-items: stretch;
  gap: 0.5rem;
}

.me-save-link {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem 0.75rem;
  padding: 0.875rem 1rem;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.95rem;
  text-align: left;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.me-save-link:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
}

.me-save-emoji {
  font-size: 1.25rem;
  flex-shrink: 0;
}

.me-save-title {
  flex: 1;
  font-weight: 500;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.me-save-progress {
  flex-shrink: 0;
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.55);
  font-weight: 500;
}

.me-save-meta {
  flex-shrink: 0;
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.45);
}

.me-save-details-btn {
  flex-shrink: 0;
  padding: 0.5rem 0.75rem;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.75);
  font-size: 0.8rem;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}

.me-save-details-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.9);
}

.me-save-data {
  margin: 0;
  padding: 1rem;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  font-size: 0.85rem;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.25rem 1.5rem;
  align-items: baseline;
}

.me-save-data dt {
  margin: 0;
  color: rgba(255, 255, 255, 0.5);
  font-weight: 500;
}

.me-save-data dd {
  margin: 0;
  color: rgba(255, 255, 255, 0.85);
  word-break: break-all;
}

.me-save-data dd code {
  font-size: 0.8em;
  background: rgba(255, 255, 255, 0.08);
  padding: 0.1em 0.35em;
  border-radius: 4px;
}

.me-save-json {
  display: block;
  white-space: pre-wrap;
  word-break: break-all;
  margin-top: 0.25rem;
  padding: 0.5rem !important;
  max-height: 12rem;
  overflow: auto;
}
