:root {
  --bg-deep: #070d14;
  --panel-bg: rgba(11, 18, 27, 0.76);
  --panel-border: rgba(130, 198, 214, 0.22);
  --text-primary: #eef5f9;
  --text-secondary: #98b1c4;
  --accent-aqua: #4dd4e8;
  --accent-brass: #d4a84f;
  --status-good: #4cd97b;
  --status-warn: #f2b438;
  --status-danger: #eb4d4b;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

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

html,
body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background-color: var(--bg-deep);
  color: var(--text-primary);
  font-family: var(--font-sans);
  user-select: none;
  -webkit-font-smoothing: antialiased;
}

#canvas-container {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: 1;
  cursor: pointer;
}

.hidden {
  display: none !important;
}

/* ============================================================================
   TOP & BOTTOM ARCHITECTURAL HUD BARS
   ============================================================================ */
.hud-bar {
  position: fixed;
  left: 16px;
  right: 16px;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 7px 12px;
  background: var(--panel-bg);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--panel-border);
  border-radius: 12px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
  transition: opacity 0.35s ease, transform 0.35s ease;
}

.top-bar {
  top: 12px;
  flex-wrap: nowrap;
}

.bottom-bar {
  bottom: 14px;
  right: 292px;
  flex-wrap: wrap;
}

body.ambient-mode .hud-bar,
body.ambient-mode .hud-sidebar,
body.ambient-mode .event-toast {
  display: none !important;
}

/* Brand Header */
.brand-block {
  display: flex;
  align-items: center;
  gap: 11px;
}

.brand-kanji {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(224, 62, 45, 0.9), rgba(168, 28, 20, 0.92));
  border: 1px solid rgba(255, 195, 160, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 1px;
  color: #fff8f0;
  box-shadow: 0 4px 12px rgba(224, 62, 45, 0.32);
}

.brand-title {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--text-primary);
}

/* Ecosystem Telemetry Chips */
.vitals-strip {
  display: flex;
  align-items: center;
  gap: 6px;
}

.vital-chip {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
}

.vital-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
}

.vital-value {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-primary);
}

.vital-value.good {
  color: var(--status-good);
}

.vital-value.warn {
  color: var(--status-warn);
}

/* Controls & Buttons */
.top-actions,
.dock-controls {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.btn-group {
  display: inline-flex;
  background: rgba(0, 0, 0, 0.32);
  padding: 2px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.hud-btn {
  appearance: none;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-primary);
  border: 1px solid rgba(255, 255, 255, 0.12);
  padding: 5px 9px;
  border-radius: 7px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.16s ease;
  white-space: nowrap;
}

.btn-group .hud-btn {
  border: none;
  background: transparent;
  padding: 4px 8px;
}

.hud-btn:hover {
  background: rgba(77, 212, 232, 0.16);
  border-color: rgba(77, 212, 232, 0.45);
}

.hud-btn.active {
  background: rgba(77, 212, 232, 0.24);
  color: #ffffff;
  border-color: var(--accent-aqua);
  box-shadow: 0 0 12px rgba(77, 212, 232, 0.22);
}

.hud-btn.primary-btn {
  background: linear-gradient(135deg, #1b8ca8, #146985);
  border-color: rgba(120, 228, 248, 0.5);
  color: #ffffff;
}

.hud-btn.primary-btn:hover {
  background: linear-gradient(135deg, #22a2c2, #187c9c);
}

.hud-btn.accent-outline {
  border-color: rgba(212, 168, 79, 0.55);
  color: #f5d487;
}

.hud-btn.love-outline {
  background: rgba(255, 118, 168, 0.14);
  border-color: rgba(255, 138, 184, 0.55);
  color: #ffb8d2;
}

.hud-btn.love-outline:hover {
  background: rgba(255, 118, 168, 0.26);
  border-color: rgba(255, 158, 198, 0.8);
}

.hud-btn.warn-outline {
  border-color: rgba(242, 180, 56, 0.5);
  color: #f7c665;
}

.hud-btn.success-outline {
  border-color: rgba(76, 217, 123, 0.5);
  color: #7ce89f;
}

.hud-btn.danger-btn {
  background: rgba(235, 77, 75, 0.22);
  border-color: var(--status-danger);
  color: #ffb8b8;
}

.hud-btn.small-btn {
  padding: 4px 9px;
  font-size: 11px;
}

.hud-select,
.hud-input {
  background: rgba(7, 14, 22, 0.82);
  color: var(--text-primary);
  border: 1px solid rgba(255, 255, 255, 0.15);
  padding: 5px 9px;
  border-radius: 7px;
  font-size: 12px;
  outline: none;
}

.hud-select:focus,
.hud-input:focus {
  border-color: var(--accent-aqua);
}

.full-width {
  width: 100%;
}

.dock-divider {
  width: 1px;
  height: 22px;
  background: rgba(255, 255, 255, 0.14);
  margin: 0 2px;
}

/* ============================================================================
   RIGHT SIDEBAR: KOI ROSTER & DOSSIER INSPECTOR
   ============================================================================ */
.hud-sidebar {
  position: fixed;
  top: 68px;
  bottom: 14px;
  right: 16px;
  width: 264px;
  z-index: 10;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 11px;
  background: var(--panel-bg);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--panel-border);
  border-radius: 12px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
  transition: opacity 0.35s ease, transform 0.35s ease;
}

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

.sidebar-header h2 {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-secondary);
}

.field-label {
  font-size: 10px;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.koi-roster-list {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-right: 3px;
}

.koi-roster-list::-webkit-scrollbar {
  width: 5px;
}

.koi-roster-list::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.16);
  border-radius: 4px;
}

.koi-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 7px 9px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.koi-card:hover {
  background: rgba(77, 212, 232, 0.1);
  border-color: rgba(77, 212, 232, 0.3);
}

.koi-card.selected {
  background: rgba(77, 212, 232, 0.18);
  border-color: var(--accent-aqua);
}

.koi-card-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.koi-swatch {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.45);
  flex-shrink: 0;
}

.koi-card-name {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-primary);
}

.koi-card-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.koi-mood-emoji {
  font-size: 16px;
  line-height: 1;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.4));
}

.koi-mini-bars {
  display: flex;
  flex-direction: column;
  gap: 3px;
  width: 44px;
}

.mini-track {
  height: 4px;
  background: rgba(0, 0, 0, 0.45);
  border-radius: 2px;
  overflow: hidden;
}

.mini-fill {
  height: 100%;
  border-radius: 2px;
}

/* Pending Fish Creation Requests Panel */
.pending-requests-panel {
  background: rgba(18, 42, 62, 0.55);
  border: 1px solid rgba(108, 232, 255, 0.35);
  border-radius: 9px;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.pending-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent-aqua);
}

.pending-count-pill {
  background: rgba(108, 232, 255, 0.22);
  color: #b8f3ff;
  padding: 1px 7px;
  border-radius: 99px;
  font-size: 10px;
}

.pending-requests-list {
  display: flex;
  flex-direction: column;
  gap: 5px;
  max-height: 128px;
  overflow-y: auto;
}

.pending-req-card {
  background: rgba(6, 14, 22, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 7px;
  padding: 6px 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.pending-req-info {
  min-width: 0;
  flex: 1;
}

.pending-req-title {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pending-req-sub {
  font-size: 9.5px;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pending-req-actions {
  display: flex;
  align-items: center;
  gap: 4px;
}

.pending-req-btn {
  padding: 2px 6px;
  font-size: 10px;
  height: 22px;
  border-radius: 5px;
}

#btn-owner-mode.owner-active {
  background: rgba(242, 180, 56, 0.22);
  border-color: rgba(242, 180, 56, 0.65);
  color: #ffd470;
}

/* Selected Koi Inspector Card */
.koi-inspector {
  background: rgba(0, 0, 0, 0.34);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.inspector-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}

.insp-kanji {
  font-size: 10px;
  color: var(--accent-brass);
  letter-spacing: 0.1em;
}

.insp-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
}

.insp-variety {
  font-size: 11px;
  color: var(--text-secondary);
}

.status-badge {
  font-size: 16px;
  line-height: 1;
  padding: 4px 8px;
  border-radius: 99px;
}

.status-badge.healthy {
  background: rgba(76, 217, 123, 0.16);
  color: var(--status-good);
  border: 1px solid rgba(76, 217, 123, 0.4);
}

.status-badge.love {
  background: rgba(255, 118, 168, 0.2);
  color: #ff9ec6;
  border: 1px solid rgba(255, 138, 184, 0.55);
}

.status-badge.lonesome {
  background: rgba(77, 212, 232, 0.18);
  color: #7ee3f5;
  border: 1px solid rgba(77, 212, 232, 0.45);
}

.status-badge.hungry {
  background: rgba(242, 180, 56, 0.18);
  color: var(--status-warn);
  border: 1px solid rgba(242, 180, 56, 0.4);
}

.inspector-hat-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 5px 7px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 7px;
}

.inspector-hat-label {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-secondary);
}

.inspector-hat-controls {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 1;
  min-width: 0;
}

.insp-hat-select {
  flex: 1;
  min-width: 0;
  padding: 2px 4px;
  font-size: 10.5px;
  height: 24px;
}

.insp-hat-step {
  padding: 2px 6px;
  font-size: 10px;
  height: 24px;
  line-height: 1;
}

.meter-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.meter-row {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--text-secondary);
}

.meter-track {
  height: 6px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 4px;
  overflow: hidden;
}

.meter-fill {
  height: 100%;
  transition: width 0.25s ease;
}

.satiety-fill {
  background: linear-gradient(90deg, #d98a2b, #f5be58);
}

.inspector-actions {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
}

/* Floating Koi Hover Tooltip */
.koi-hover-tag {
  position: fixed;
  z-index: 25;
  pointer-events: none;
  padding: 5px 10px;
  background: rgba(8, 15, 24, 0.88);
  border: 1px solid rgba(108, 232, 255, 0.55);
  border-radius: 99px;
  font-size: 11px;
  font-weight: 500;
  color: #eef8ff;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.5);
  transform: translate(-50%, -135%);
  white-space: nowrap;
}

/* Pure Wordless Animal Crossing-Style Floating Emoji Thought Bubble */
.villager-bubble {
  position: fixed;
  z-index: 18;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  background: rgba(9, 17, 27, 0.84);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1.5px solid rgba(255, 168, 204, 0.55);
  border-radius: 50%;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.48);
  transform: translate(-50%, -135%);
  cursor: pointer;
  transition: opacity 0.35s ease, border-color 0.3s ease, transform 0.25s ease;
  animation: villagerFloat 2.6s ease-in-out infinite;
}

.villager-bubble::after {
  content: '';
  position: absolute;
  bottom: -7px;
  left: 50%;
  transform: translateX(-50%);
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(9, 17, 27, 0.84);
  border: 1px solid rgba(255, 255, 255, 0.28);
}

@keyframes villagerFloat {
  0%, 100% {
    margin-top: 0px;
  }
  50% {
    margin-top: -5px;
  }
}

.villager-bubble.sad {
  border-color: rgba(132, 188, 245, 0.58);
}

.villager-bubble.daydream,
.villager-bubble.cheered,
.villager-bubble.eating {
  border-color: rgba(242, 200, 108, 0.55);
}

.villager-bubble.sleep {
  border-color: rgba(158, 203, 255, 0.45);
}

.vb-icon {
  font-size: 21px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.35));
}

.spot-mood-emoji {
  font-size: 16px;
  line-height: 1;
}

/* Floating Koi Spotlight Banner during Auto-Orbit Tour & Koi Follow Mode */
.spotlight-banner {
  position: fixed;
  bottom: 138px;
  left: calc(50% - 140px);
  transform: translateX(-50%);
  z-index: 22;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 18px;
  background: rgba(8, 16, 26, 0.86);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(108, 232, 255, 0.45);
  border-radius: 999px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.55);
}

body.ambient-mode .spotlight-banner {
  bottom: 22px;
  left: 50%;
}

.spot-swatch {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.7);
  flex-shrink: 0;
}

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

.spot-title-line {
  display: flex;
  align-items: baseline;
  gap: 8px;
  font-size: 14px;
  color: #ffffff;
}

.spot-meta {
  font-size: 11px;
  color: var(--accent-brass);
}

.spot-actions {
  display: flex;
  gap: 6px;
}

/* ============================================================================
   3D MMO-STYLE "MAKE A FISH" CHARACTER CREATOR MODAL
   ============================================================================ */
.creator-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 40;
  background: rgba(3, 8, 14, 0.76);
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
}

.creator-modal {
  width: 100%;
  max-width: 960px;
  background: rgba(10, 18, 29, 0.97);
  border: 1px solid rgba(108, 232, 255, 0.42);
  border-radius: 16px;
  padding: 18px 22px;
  box-shadow: 0 28px 72px rgba(0, 0, 0, 0.8);
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.creator-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 10px;
}

.creator-header h2 {
  font-size: 19px;
  font-weight: 700;
  color: #ffffff;
  margin-top: 2px;
}

.creator-body {
  display: grid;
  grid-template-columns: 440px 1fr;
  gap: 20px;
  align-items: start;
}

.creator-preview-col {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 9px;
}

.stage-3d-wrapper {
  position: relative;
  width: 440px;
  height: 310px;
  border-radius: 14px;
  border: 1px solid rgba(108, 232, 255, 0.38);
  background: radial-gradient(circle at 50% 42%, #0e283d 0%, #05101a 100%);
  box-shadow: inset 0 0 36px rgba(0, 0, 0, 0.72), 0 8px 24px rgba(0, 0, 0, 0.45);
  overflow: hidden;
}

#koi-preview-canvas {
  width: 440px;
  height: 310px;
  display: block;
  cursor: grab;
}

#koi-preview-canvas:active {
  cursor: grabbing;
}

.stage-top-overlay {
  position: absolute;
  top: 9px;
  left: 10px;
  right: 10px;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: space-between;
  pointer-events: none;
}

.stage-summary-badge {
  padding: 4px 10px;
  max-width: 295px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  background: rgba(6, 13, 22, 0.78);
  border: 1px solid rgba(108, 232, 255, 0.35);
  border-radius: 99px;
  font-size: 11px;
  font-weight: 600;
  color: #dff7ff;
  backdrop-filter: blur(6px);
}

.stage-dna-cycler {
  pointer-events: auto;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 5px;
  background: rgba(6, 13, 22, 0.82);
  border: 1px solid rgba(212, 168, 79, 0.45);
  border-radius: 99px;
  flex-shrink: 0;
}

.stage-mini-btn {
  appearance: none;
  background: rgba(255, 255, 255, 0.08);
  color: #f5d487;
  border: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  font-size: 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.stage-mini-btn:hover {
  background: rgba(212, 168, 79, 0.28);
  color: #ffffff;
}

.stage-mini-text-btn {
  appearance: none;
  background: rgba(255, 255, 255, 0.07);
  color: var(--text-secondary);
  border: 1px solid rgba(255, 255, 255, 0.14);
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 10px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.14s ease;
}

.stage-mini-text-btn:hover {
  background: rgba(77, 212, 232, 0.2);
  border-color: var(--accent-aqua);
  color: #ffffff;
}

.stage-seed-label {
  font-size: 10px;
  font-weight: 600;
  color: #f5d487;
  padding: 0 3px;
  white-space: nowrap;
}

.stage-bottom-overlay {
  position: absolute;
  bottom: 9px;
  left: 10px;
  right: 10px;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  pointer-events: none;
}

.stage-pose-btn {
  pointer-events: auto;
  appearance: none;
  background: linear-gradient(135deg, rgba(212, 168, 79, 0.28), rgba(224, 62, 45, 0.28));
  color: #ffe8a3;
  border: 1px solid rgba(242, 195, 95, 0.55);
  border-radius: 99px;
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.stage-pose-btn:hover {
  background: linear-gradient(135deg, rgba(212, 168, 79, 0.45), rgba(224, 62, 45, 0.45));
  color: #ffffff;
}

.stage-turntable-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.creator-form-col {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.form-row-two {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
}

.input-with-btn {
  display: flex;
  gap: 5px;
}

/* MMO-Style Left/Right Option Cycler Rows */
.mmo-cycler-row {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 10px;
  padding: 7px 10px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

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

.mmo-cycler-controls {
  display: flex;
  align-items: center;
  gap: 7px;
}

.mmo-arrow-btn {
  appearance: none;
  width: 34px;
  height: 34px;
  flex-shrink: 0;
  border-radius: 8px;
  background: rgba(77, 212, 232, 0.12);
  border: 1px solid rgba(77, 212, 232, 0.35);
  color: #dff8ff;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.14s ease;
}

.mmo-arrow-btn:hover {
  background: rgba(77, 212, 232, 0.28);
  border-color: var(--accent-aqua);
  color: #ffffff;
  transform: scale(1.04);
}

.mmo-arrow-btn:active {
  transform: scale(0.96);
}

.mmo-value-box {
  flex: 1;
  min-width: 0;
  text-align: center;
  background: rgba(5, 11, 18, 0.68);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 5px 8px;
}

.mmo-value-main {
  font-size: 13px;
  font-weight: 700;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.color-studio-box {
  background: rgba(0, 0, 0, 0.34);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.color-studio-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.color-studio-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  color: var(--text-primary);
  cursor: pointer;
}

.btn-reset-colors {
  appearance: none;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: var(--text-secondary);
  font-size: 10px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 5px;
  cursor: pointer;
  transition: all 0.14s ease;
}

.btn-reset-colors:hover {
  border-color: var(--accent-aqua);
  color: var(--text-primary);
}

/* Instant Color Palette Swatches (4x2 Grid) */
#color-palette-strip,
.palette-swatches-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 5px;
}

.palette-chip {
  appearance: none;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 5px;
  height: 25px;
  padding: 2px 6px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 6px;
  color: var(--text-secondary);
  font-size: 10px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.14s ease;
  overflow: hidden;
  white-space: nowrap;
}

.palette-chip:hover {
  border-color: var(--accent-aqua);
  color: var(--text-primary);
  background: rgba(77, 212, 232, 0.09);
}

.palette-chip.active {
  border-color: var(--accent-aqua);
  color: var(--text-primary);
  box-shadow: 0 0 8px rgba(77, 212, 232, 0.35);
  background: rgba(77, 212, 232, 0.18);
}

.palette-dots {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  flex-shrink: 0;
}

.palette-dots i {
  display: block;
  width: 6px;
  height: 12px;
  border-radius: 2px;
  border: 1px solid rgba(255, 255, 255, 0.28);
}

.palette-name {
  overflow: hidden;
  text-overflow: ellipsis;
}

.color-pickers-row {
  display: flex;
  justify-content: space-between;
  gap: 8px;
}

.color-swatch-group {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 4px 8px;
  border-radius: 7px;
  font-size: 11px;
  color: var(--text-secondary);
  cursor: pointer;
}

.color-swatch-group:hover {
  border-color: rgba(77, 212, 232, 0.4);
}

.color-swatch-group input[type='color'] {
  width: 28px;
  height: 22px;
  border: none;
  background: none;
  cursor: pointer;
}

.creator-footer-btns {
  display: flex;
  justify-content: flex-end;
  margin-top: 2px;
}

.review-request-btns {
  display: flex;
  gap: 8px;
  width: 100%;
}

.insp-hat-readonly {
  font-size: 11px;
  font-weight: 600;
  color: #dff7ff;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  padding: 3px 9px;
}

.hud-btn.large-btn {
  width: 100%;
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 700;
}

/* ============================================================================
   EVENT TOAST & AMBIENT PILL
   ============================================================================ */
.event-toast {
  position: fixed;
  top: 84px;
  left: 16px;
  z-index: 9;
  max-width: 560px;
  padding: 7px 13px;
  background: rgba(9, 17, 26, 0.78);
  border-left: 3px solid var(--accent-aqua);
  border-radius: 6px;
  font-size: 12px;
  color: var(--text-secondary);
  backdrop-filter: blur(8px);
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.ambient-pill {
  position: fixed;
  bottom: 16px;
  left: 16px;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 13px;
  background: rgba(8, 14, 22, 0.58);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  font-size: 12px;
  color: rgba(238, 245, 249, 0.85);
}

.ambient-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--status-good);
  box-shadow: 0 0 8px var(--status-good);
}

.pill-action {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 99px;
  padding: 3px 9px;
  font-size: 11px;
  cursor: pointer;
}

/* ============================================================================
   LIVE TANK ACTIVITY & CHAT PANEL (BOTTOM-LEFT)
   ============================================================================ */
.tank-chat-panel {
  position: fixed;
  left: 16px;
  bottom: 72px;
  width: 300px;
  z-index: 15;
  background: rgba(9, 16, 25, 0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--panel-border);
  border-radius: 12px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.58);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

body.ambient-mode .tank-chat-panel {
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
}

.tank-chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 7px 10px;
  background: rgba(255, 255, 255, 0.03);
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.tank-chat-title-group {
  display: flex;
  align-items: center;
  gap: 6px;
}

.tank-live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #25d386;
  box-shadow: 0 0 6px #25d386;
}

.tank-chat-title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-primary);
}

.tank-viewer-pill {
  font-size: 10px;
  font-weight: 600;
  color: #9be8ff;
  background: rgba(77, 212, 232, 0.14);
  border: 1px solid rgba(77, 212, 232, 0.28);
  padding: 1px 6px;
  border-radius: 99px;
}

.tank-chat-header-actions {
  display: flex;
  align-items: center;
  gap: 4px;
}

.tank-chat-body {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 8px 10px;
}

.tank-chat-panel.collapsed .tank-chat-body {
  display: none;
}

.tank-moniker-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.tank-moniker-label {
  font-size: 10px;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.tank-moniker-input {
  flex: 1;
  background: rgba(5, 11, 18, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 6px;
  color: #f5d487;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 7px;
  outline: none;
}

.tank-moniker-input:focus {
  border-color: var(--accent-aqua);
}

.tank-activity-list {
  max-height: 138px;
  min-height: 78px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-right: 2px;
  font-size: 11.5px;
  line-height: 1.35;
}

.tank-feed-item {
  word-break: break-word;
  padding: 3px 6px;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.025);
  color: var(--text-secondary);
}

.tank-feed-item.is-action {
  color: #9ec0d8;
  font-size: 11px;
  background: rgba(77, 212, 232, 0.05);
  border-left: 2px solid rgba(77, 212, 232, 0.45);
}

.tank-feed-item.is-chat {
  color: #eef6fb;
  background: rgba(255, 255, 255, 0.045);
  border-left: 2px solid rgba(245, 212, 135, 0.6);
}

.tank-feed-actor {
  font-weight: 700;
  color: #7ce8ff;
}

.tank-feed-actor.owner {
  color: #ffd670;
}

.tank-chat-form {
  display: flex;
  gap: 5px;
  margin-top: 2px;
}

.tank-chat-input {
  flex: 1;
  background: rgba(5, 11, 18, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 6px;
  color: #ffffff;
  font-size: 11.5px;
  padding: 5px 8px;
  outline: none;
}

.tank-chat-input:focus {
  border-color: var(--accent-aqua);
}

@media (max-width: 1100px) {
  .bottom-bar {
    right: 16px;
  }
  .hud-sidebar {
    display: none;
  }
  .tank-chat-panel {
    width: 260px;
  }
}
