/* =========================================================
   EL TABLERO DEL SQUAD - LIVING DIGITAL WHITEBOARD & GBA SP
   ========================================================= */

:root {
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-faint: #64748b;
  
  --hud-bg: rgba(18, 21, 28, 0.85);
  --hud-border: rgba(255, 255, 255, 0.1);
  --widget-bg: rgba(24, 28, 38, 0.88);
  --widget-border: rgba(255, 255, 255, 0.12);
  
  --cyan: #00f0ff;
  --cyan-glow: rgba(0, 240, 255, 0.3);
  --amber: #f59e0b;
  --purple: #a855f7;
  --emerald: #10b981;
  --rose: #f43f5e;

  /* Sticky Post-It Palettes */
  --note-yellow-bg: #fef08a;
  --note-yellow-tx: #713f12;
  --note-pink-bg: #fbcfe8;
  --note-pink-tx: #831843;
  --note-cyan-bg: #bae6fd;
  --note-cyan-tx: #075985;
  --note-green-bg: #bbf7d0;
  --note-green-tx: #14532d;
  --note-purple-bg: #e9d5ff;
  --note-purple-tx: #581c87;

  /* GBA SP Default Theme (Platinum Silver) */
  --gba-chassis: #bcc4ce;
  --gba-chassis-dark: #8c95a2;
  --gba-chassis-light: #e4e8ee;
  --gba-bezel: #1b2028;
  --gba-screen-bg: #0b1118;
  --gba-dpad: #2d333e;
}

/* GBA Themes */
body.gba-theme-platinum {
  --gba-chassis: #bcc4ce;
  --gba-chassis-dark: #8c95a2;
  --gba-chassis-light: #e4e8ee;
}
body.gba-theme-cobalt {
  --gba-chassis: #1e40af;
  --gba-chassis-dark: #172554;
  --gba-chassis-light: #3b82f6;
}
body.gba-theme-onyx {
  --gba-chassis: #22252a;
  --gba-chassis-dark: #121417;
  --gba-chassis-light: #383d45;
}
body.gba-theme-flame {
  --gba-chassis: #b91c1c;
  --gba-chassis-dark: #7f1d1d;
  --gba-chassis-light: #ef4444;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  font-family: 'Outfit', sans-serif;
  color: var(--text-main);
  user-select: none;
}

.hidden { display: none !important; }

/* =========================================================
   WALLPAPER BACKGROUND PRESETS (ATMOSPHERES WITH SOUL)
   ========================================================= */
body.bg-preset-corkboard {
  background-color: #2b1d14;
  background-image: 
    radial-gradient(circle at 50% 50%, rgba(0,0,0,0.2) 0%, rgba(0,0,0,0.65) 100%),
    repeating-linear-gradient(45deg, rgba(217, 119, 6, 0.04) 0px, rgba(217, 119, 6, 0.04) 2px, transparent 2px, transparent 4px),
    radial-gradient(#b45309 15%, transparent 16%);
  background-size: 100% 100%, 16px 16px, 12px 12px;
}

body.bg-preset-cyberpunk {
  background-color: #0b0716;
  background-image: 
    radial-gradient(circle at 20% 80%, rgba(244, 63, 94, 0.18) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(0, 240, 255, 0.15) 0%, transparent 50%),
    linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 100% 100%, 100% 100%, 40px 40px, 40px 40px;
}

body.bg-preset-arcade {
  background-color: #0d0a1a;
  background-image: 
    linear-gradient(180deg, #180d38 0%, #080314 100%),
    linear-gradient(rgba(168, 85, 247, 0.12) 1px, transparent 1px),
    linear-gradient(90deg, rgba(168, 85, 247, 0.12) 1px, transparent 1px);
  background-size: 100% 100%, 32px 32px, 32px 32px;
}

body.bg-preset-lofi {
  background-color: #171622;
  background-image: 
    radial-gradient(circle at 10% 20%, rgba(251, 146, 60, 0.12) 0%, transparent 40%),
    radial-gradient(circle at 90% 70%, rgba(139, 92, 246, 0.15) 0%, transparent 50%),
    radial-gradient(rgba(255, 255, 255, 0.06) 1.5px, transparent 1.5px);
  background-size: 100% 100%, 100% 100%, 24px 24px;
}

body.bg-preset-blueprint {
  background-color: #091e3a;
  background-image: 
    linear-gradient(rgba(56, 189, 248, 0.18) 1px, transparent 1px),
    linear-gradient(90deg, rgba(56, 189, 248, 0.18) 1px, transparent 1px),
    linear-gradient(rgba(56, 189, 248, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(56, 189, 248, 0.06) 1px, transparent 1px);
  background-size: 100px 100px, 100px 100px, 20px 20px, 20px 20px;
}

body.bg-preset-matrix {
  background-color: #0d1117;
  background-image: radial-gradient(rgba(34, 197, 94, 0.12) 1.5px, transparent 1.5px);
  background-size: 26px 26px;
}

body.bg-custom {
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
}

/* =========================================================
   AUTH OVERLAY (2FA POKE)
   ========================================================= */
.auth-fullscreen-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: radial-gradient(circle at center, #1b202c 0%, #090b10 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.auth-box-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  max-width: 420px;
  width: 100%;
}

.auth-brand-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  padding: 6px 14px;
  border-radius: 9999px;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-muted);
}

.auth-mini-gba {
  width: 100%;
  border-radius: 18px;
  background: linear-gradient(180deg, #bcc4ce 0%, #919aa6 100%);
  padding: 16px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7);
  border: 2px solid rgba(255, 255, 255, 0.3);
}

.auth-gba-lid {
  background: #191e26;
  border-radius: 12px;
  padding: 12px;
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.85);
}

.auth-screen-frame {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.auth-screen-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 4px;
}

.auth-screen-title {
  font-family: 'Press Start 2P', monospace;
  font-size: 0.65rem;
  color: #94a3b8;
}
.auth-screen-title i { color: #38bdf8; font-style: normal; }

.auth-pwr-led {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 6px #22c55e;
}

.auth-lcd {
  background: #090e14;
  border-radius: 6px;
  min-height: 230px;
  max-height: 440px;
  padding: 14px;
  position: relative;
  overflow-y: auto;
  border: 1px solid #1e293b;
}

.auth-step-pane {
  display: none;
  height: 100%;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}
.auth-step-pane.active { display: flex; }

.auth-logo-glitch {
  font-family: 'Press Start 2P', monospace;
  font-size: 1.15rem;
  color: #38bdf8;
  letter-spacing: 1px;
}

.auth-logo-sub {
  font-size: 0.75rem;
  font-weight: 800;
  color: #facc15;
  letter-spacing: 2px;
  margin-top: 4px;
  margin-bottom: 24px;
}

.pixel-start-btn {
  font-family: 'Press Start 2P', monospace;
  font-size: 0.65rem;
  background: #0284c7;
  color: #fff;
  border: none;
  padding: 10px 14px;
  border-radius: 4px;
  cursor: pointer;
}

.blink-anim { animation: blinkAnim 1.2s infinite; }
@keyframes blinkAnim {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

.auth-step-title {
  font-family: 'Press Start 2P', monospace;
  font-size: 0.62rem;
  color: #38bdf8;
  margin-bottom: 8px;
}

.auth-step-hint {
  font-size: 0.75rem;
  color: #94a3b8;
  margin-bottom: 12px;
}

.auth-input-group {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.input-line {
  display: flex;
  align-items: center;
  background: rgba(0, 0, 0, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 4px;
  padding: 6px 10px;
}
.input-line input {
  background: none;
  border: none;
  color: #ffffff;
  width: 100%;
  font-family: 'Press Start 2P', monospace;
  font-size: 0.72rem;
  padding-left: 6px;
}
.input-line input:focus { outline: none; }
.prompt-arrow { color: #38bdf8; font-weight: bold; }

.btn-action-poke, .btn-action-verify {
  background: #0284c7;
  color: #fff;
  border: none;
  padding: 8px;
  border-radius: 4px;
  font-weight: 700;
  font-size: 0.75rem;
  cursor: pointer;
}
.btn-action-poke:hover, .btn-action-verify:hover { background: #0ea5e9; }

.btn-action-cancel {
  background: #475569;
  color: #fff;
  border: none;
  padding: 8px;
  border-radius: 4px;
  font-weight: 700;
  font-size: 0.75rem;
  cursor: pointer;
}

.auth-btn-double {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.auth-qr-wrap {
  display: flex;
  justify-content: center;
  margin: 6px 0;
}

.auth-qr-code {
  width: 135px;
  height: 135px;
  background: #ffffff;
  padding: 6px;
  border-radius: 6px;
  border: 2px solid var(--cyan);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.7);
  display: block;
}

.auth-key-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(0, 0, 0, 0.5);
  border: 1px dashed rgba(56, 189, 248, 0.4);
  padding: 4px 8px;
  border-radius: 4px;
  margin: 4px 0;
  gap: 6px;
}

.auth-key-label {
  font-size: 0.58rem;
  color: #94a3b8;
  font-family: 'Press Start 2P', monospace;
}

.auth-key-box code {
  font-family: 'VT323', monospace;
  font-size: 1.15rem;
  color: #38bdf8;
  font-weight: 700;
  letter-spacing: 1px;
}

.auth-setup-container {
  width: 100%;
}

.auth-error-box {
  background: rgba(239, 68, 68, 0.2);
  border: 1px solid #ef4444;
  color: #fca5a5;
  font-size: 0.72rem;
  padding: 6px;
  border-radius: 4px;
  margin-top: 6px;
}

.auth-card-footer {
  font-size: 0.75rem;
  color: var(--text-faint);
}

/* =========================================================
   PERMISSIONS: NON-ADMIN LOCKDOWN
   ========================================================= */
body.user-is-not-admin #dock-add-container,
body.user-is-not-admin #dock-btn-wallpaper,
body.user-is-not-admin .widget-resizer,
body.user-is-not-admin .btn-w-action,
body.user-is-not-admin .image-controls-hover,
body.user-is-not-admin .btn-del-sticky,
body.user-is-not-admin .btn-sticker-ctrl,
body.user-is-not-admin .yt-url-switcher {
  display: none !important;
}

body.user-is-not-admin .board-widget,
body.user-is-not-admin .widget-sticky-note,
body.user-is-not-admin .board-sticker-item,
body.user-is-not-admin .board-image-item {
  cursor: default !important;
}

/* =========================================================
   CANVAS VIEWPORT & WORLD PLANE (INFINITE BOARD)
   ========================================================= */
.whiteboard-viewport {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
}

.canvas-viewport {
  position: absolute;
  inset: 0;
  cursor: grab;
}
.canvas-viewport.is-panning {
  cursor: grabbing;
}

.canvas-world {
  position: absolute;
  top: 0;
  left: 0;
  width: 4000px;
  height: 2800px;
  transform-origin: 0 0;
  pointer-events: auto;
}

/* =========================================================
   TOP HUD BAR
   ========================================================= */
.board-top-hud {
  position: absolute;
  top: 14px;
  left: 20px;
  right: 20px;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  pointer-events: none;
}
.board-top-hud > * { pointer-events: auto; }

.hud-left {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--hud-bg);
  backdrop-filter: blur(16px);
  border: 1px solid var(--hud-border);
  padding: 6px 14px;
  border-radius: 14px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.board-branding {
  display: flex;
  align-items: center;
  gap: 10px;
}

.hud-logo-icon { font-size: 1.25rem; }
.hud-title {
  font-weight: 800;
  font-size: 0.95rem;
  color: #fff;
  letter-spacing: 0.3px;
}
.hud-subtitle { font-size: 0.7rem; color: var(--text-muted); }

.hud-live-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.3);
  padding: 4px 10px;
  border-radius: 9999px;
  font-size: 0.75rem;
  color: #34d399;
  font-weight: 600;
}

.live-dot-pulse {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 6px #10b981;
}

.hud-center {
  background: var(--hud-bg);
  backdrop-filter: blur(16px);
  border: 1px solid var(--hud-border);
  padding: 6px 16px;
  border-radius: 9999px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.squad-meta-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  font-weight: 600;
  color: #e2e8f0;
}
.squad-meta-pill .sep { color: #475569; }

.hud-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.collaborators-tray {
  display: flex;
  align-items: center;
}

.collab-chip {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #2563eb;
  border: 2px solid #111317;
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-left: -6px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.4);
}
.collab-chip:first-child { margin-left: 0; }

.hud-user-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--hud-bg);
  backdrop-filter: blur(16px);
  border: 1px solid var(--hud-border);
  padding: 5px 12px;
  border-radius: 12px;
}
.user-ico { font-size: 1rem; }
.user-nick { font-weight: 700; font-size: 0.85rem; color: #fff; }
.user-role {
  background: #f59e0b;
  color: #000;
  font-size: 0.62rem;
  font-weight: 800;
  padding: 2px 5px;
  border-radius: 4px;
}

.hud-btn-logout {
  background: rgba(244, 63, 94, 0.12);
  border: 1px solid rgba(244, 63, 94, 0.3);
  color: #fb7185;
  padding: 7px 12px;
  border-radius: 8px;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
}
.hud-btn-logout:hover { background: rgba(244, 63, 94, 0.25); color: #fff; }

/* =========================================================
   BOARD WIDGETS (DRAGGABLE & TACTILE)
   ========================================================= */
.board-widget {
  position: absolute;
  background: var(--widget-bg);
  border: 1px solid var(--widget-border);
  border-radius: 16px;
  backdrop-filter: blur(16px);
  box-shadow: 
    0 16px 36px -6px rgba(0, 0, 0, 0.5),
    0 4px 12px rgba(0, 0, 0, 0.3);
  transition: box-shadow 0.15s;
  cursor: default;
}

.board-widget.is-dragging {
  box-shadow: 0 28px 60px rgba(0, 0, 0, 0.7);
  z-index: 1000 !important;
}

/* Draggable Header Handle */
.widget-titlebar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  cursor: grab;
}
.widget-titlebar:active { cursor: grabbing; }

.widget-title-left {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 0.82rem;
  color: #e2e8f0;
}

.widget-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.btn-w-action {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--text-muted);
  width: 24px;
  height: 24px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  cursor: pointer;
}
.btn-w-action:hover { color: #fff; background: rgba(255, 255, 255, 0.15); }
.btn-w-action.btn-del-widget:hover { color: #fb7185; background: rgba(244, 63, 94, 0.2); }

/* =========================================================
   WIDGET: YOUTUBE MEDIA PLAYER
   ========================================================= */
.widget-youtube {
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.yt-frame-container {
  flex: 1;
  width: 100%;
  height: 100%;
  min-height: 220px;
  background: #000;
  position: relative;
}

.yt-frame-container iframe {
  width: 100%;
  height: 100%;
  border: none;
}

.yt-url-switcher {
  display: flex;
  padding: 8px 10px;
  background: rgba(0, 0, 0, 0.4);
  gap: 6px;
}

.yt-url-switcher input {
  flex: 1;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #fff;
  padding: 5px 8px;
  border-radius: 6px;
  font-size: 0.75rem;
}
.yt-url-switcher input:focus { outline: none; border-color: var(--cyan); }

.btn-yt-change {
  background: #0284c7;
  color: #fff;
  border: none;
  padding: 5px 10px;
  border-radius: 6px;
  font-size: 0.72rem;
  font-weight: 700;
  cursor: pointer;
}

/* =========================================================
   WIDGET: SERVER STATUS CARD
   ========================================================= */
.widget-servers {
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.srv-card-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  padding: 10px 12px;
  border-radius: 10px;
}

.srv-row-left {
  display: flex;
  align-items: center;
  gap: 10px;
}
.srv-row-ico {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
}
.srv-row-ico.ts { background: rgba(0, 240, 255, 0.15); }
.srv-row-ico.mc { background: rgba(34, 197, 94, 0.15); }
.srv-row-ico.bot { background: rgba(245, 158, 11, 0.15); }

.srv-row-name { font-weight: 700; font-size: 0.85rem; color: #fff; }
.srv-row-addr { font-size: 0.72rem; color: var(--text-muted); }

.srv-status-tag {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 9999px;
}

/* =========================================================
   WIDGET: TACTILE STICKY NOTE (POST-IT)
   ========================================================= */
.widget-sticky-note {
  position: absolute;
  width: 250px;
  min-height: 150px;
  border-radius: 4px;
  padding: 24px 14px 12px;
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.35);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  cursor: grab;
  border: none;
  backdrop-filter: none;
}
.widget-sticky-note:active { cursor: grabbing; }

/* Washi Tape at top */
.widget-sticky-note::before {
  content: '';
  position: absolute;
  top: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 18px;
  background: rgba(255, 255, 255, 0.35);
  backdrop-filter: blur(2px);
  border-radius: 2px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.widget-sticky-note.color-yellow { background: var(--note-yellow-bg); color: var(--note-yellow-tx); }
.widget-sticky-note.color-pink { background: var(--note-pink-bg); color: var(--note-pink-tx); }
.widget-sticky-note.color-cyan { background: var(--note-cyan-bg); color: var(--note-cyan-tx); }
.widget-sticky-note.color-green { background: var(--note-green-bg); color: var(--note-green-tx); }
.widget-sticky-note.color-purple { background: var(--note-purple-bg); color: var(--note-purple-tx); }

.sticky-content {
  font-family: 'Caveat', cursive;
  font-size: 1.35rem;
  line-height: 1.25;
  word-break: break-word;
  pointer-events: none;
}

.sticky-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px dashed rgba(0, 0, 0, 0.15);
  padding-top: 6px;
  margin-top: 8px;
  font-size: 0.72rem;
  opacity: 0.85;
}
.sticky-author-tag { font-family: 'Outfit', sans-serif; font-weight: 700; }
.btn-del-sticky {
  background: none;
  border: none;
  font-size: 0.9rem;
  cursor: pointer;
  opacity: 0.5;
}
.btn-del-sticky:hover { opacity: 1; }

/* =========================================================
   WIDGET: STICKERS (SLAPPED FREELY ON CANVAS)
   ========================================================= */
.board-sticker-item {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: grab;
  filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.45));
  transition: transform 0.15s;
  user-select: none;
}
.board-sticker-item:active { cursor: grabbing; transform: scale(1.15) !important; z-index: 1000; }

.sticker-emoji-glyph {
  font-size: 3.5rem;
  pointer-events: none;
}

.sticker-controls-hover {
  position: absolute;
  top: -12px;
  right: -12px;
  display: none;
  gap: 4px;
}
.board-sticker-item:hover .sticker-controls-hover {
  display: flex;
}

.btn-sticker-ctrl {
  background: #111827;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.2);
  width: 22px;
  height: 22px;
  border-radius: 50%;
  font-size: 0.65rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* =========================================================
   WIDGET: GAME BOY ADVANCE SP CONSOLE
   ========================================================= */
.widget-gba-sp {
  width: 600px;
}

.gba-sp-device {
  width: 100%;
  display: flex;
  flex-direction: column;
}

/* Upper Lid */
.gba-top-lid {
  background: linear-gradient(180deg, var(--gba-chassis-light) 0%, var(--gba-chassis) 70%, var(--gba-chassis-dark) 100%);
  border-top-left-radius: 16px;
  border-top-right-radius: 16px;
  padding: 18px 20px 14px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-bottom: 4px solid var(--gba-chassis-dark);
}

.lid-bezel {
  background: var(--gba-bezel);
  border-radius: 10px;
  padding: 12px;
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.85);
}

.screen-frame {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.screen-header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 4px;
}

.screen-brand {
  font-family: 'Press Start 2P', monospace;
  font-size: 0.65rem;
  color: #94a3b8;
}
.screen-brand i { color: #38bdf8; font-style: normal; }

.hardware-leds {
  display: flex;
  align-items: center;
  gap: 6px;
}
.led-label { font-size: 0.55rem; color: #64748b; font-weight: 700; }
.led-indicator {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #334155;
}
.led-power.active {
  background: #22c55e;
  box-shadow: 0 0 6px #22c55e;
}

/* LCD Screen: 100% visible, roomy, scrollable */
.screen-lcd {
  position: relative;
  background-color: var(--gba-screen-bg);
  border-radius: 6px;
  height: 380px;
  overflow: hidden;
  box-shadow: inset 0 0 16px rgba(0, 0, 0, 0.9);
  border: 1px solid #1e293b;
}

.lcd-scanlines {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.25) 50%);
  background-size: 100% 3px;
  z-index: 5;
  opacity: 0.35;
}

.screen-content {
  position: relative;
  z-index: 2;
  height: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
}

.screen-content::-webkit-scrollbar { width: 6px; }
.screen-content::-webkit-scrollbar-track { background: rgba(0, 0, 0, 0.5); }
.screen-content::-webkit-scrollbar-thumb { background: #0284c7; border-radius: 3px; }

/* LCD Header */
.lcd-status-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 8px;
  margin-bottom: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.75rem;
}
.lcd-user-tag {
  font-family: 'Press Start 2P', monospace;
  font-size: 0.65rem;
  color: #38bdf8;
  margin-right: 6px;
}
.badge-tag {
  font-size: 0.6rem;
  background: #f59e0b;
  color: #000;
  font-weight: 800;
  padding: 2px 5px;
  border-radius: 3px;
}
.status-right {
  display: flex;
  align-items: center;
  gap: 5px;
  color: #34d399;
  font-weight: 700;
  font-size: 0.7rem;
}
.live-dot { font-size: 0.6rem; }

/* LCD Tabs */
.lcd-tab-nav {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
  gap: 4px;
  margin-bottom: 12px;
}

.lcd-tab {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #94a3b8;
  padding: 7px 4px;
  border-radius: 4px;
  font-size: 0.72rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s;
}

.lcd-tab.active {
  background: #0284c7;
  color: #ffffff;
  border-color: #38bdf8;
  box-shadow: 0 0 8px rgba(56, 189, 248, 0.4);
}

.tab-page {
  display: none;
  flex-direction: column;
  gap: 12px;
}
.tab-page.active { display: flex; }

.page-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.section-title {
  font-family: 'Press Start 2P', monospace;
  font-size: 0.65rem;
  color: #facc15;
}

.mini-pixel-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #94a3b8;
  padding: 3px 8px;
  font-size: 0.65rem;
  border-radius: 3px;
  cursor: pointer;
}
.mini-pixel-btn:hover { color: #fff; border-color: #fff; }

/* Rankings Podium */
.leaderboard-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.hall-podium-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 6px;
  padding: 8px 10px;
}

.card-tag {
  font-size: 0.68rem;
  font-weight: 800;
  margin-bottom: 6px;
  display: inline-block;
  letter-spacing: 0.5px;
}
.card-tag.gold { color: #fbbf24; }
.card-tag.purple { color: #c084fc; }
.card-tag.blue { color: #38bdf8; }

.rank-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.rank-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 5px 8px;
  background: rgba(0, 0, 0, 0.35);
  border-radius: 4px;
  font-size: 0.8rem;
}

.rank-row-left {
  display: flex;
  align-items: center;
  gap: 8px;
}
.rank-pos { font-size: 0.9rem; width: 22px; }
.rank-val {
  font-family: 'VT323', monospace;
  font-size: 1.15rem;
  color: #38bdf8;
  font-weight: 700;
}

/* Channel stats */
.channel-stats-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ch-bar-item {
  background: rgba(0, 0, 0, 0.35);
  padding: 8px 10px;
  border-radius: 6px;
}

.ch-bar-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.78rem;
  font-weight: 600;
  margin-bottom: 6px;
}

.ch-bar-track {
  height: 8px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 4px;
  overflow: hidden;
}

.ch-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #0284c7, #38bdf8);
  border-radius: 4px;
  transition: width 0.6s ease;
}

/* Trainer card */
.trainer-card {
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(56, 189, 248, 0.25);
  border-radius: 8px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.trainer-header {
  display: flex;
  align-items: center;
  gap: 12px;
}

.trainer-avatar {
  font-size: 2rem;
  background: rgba(56, 189, 248, 0.15);
  width: 48px;
  height: 48px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.tc-name {
  font-family: 'Press Start 2P', monospace;
  font-size: 0.85rem;
  color: #f8fafc;
}

.tc-sub {
  font-size: 0.65rem;
  color: #94a3b8;
}

.trainer-stats-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.tc-stat-box {
  background: rgba(255, 255, 255, 0.04);
  padding: 8px;
  border-radius: 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.tc-lbl {
  font-size: 0.6rem;
  color: #94a3b8;
  font-weight: 700;
}

.tc-val {
  font-family: 'VT323', monospace;
  font-size: 1.35rem;
  color: #38bdf8;
  font-weight: 700;
}

.badges-title {
  font-family: 'Press Start 2P', monospace;
  font-size: 0.6rem;
  color: #fbbf24;
  display: block;
  margin-bottom: 8px;
}

.badges-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 6px;
}

.badge-item {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 6px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.7rem;
}

/* Whitelist admin */
.admin-panel {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.admin-add-box {
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: rgba(255, 255, 255, 0.03);
  padding: 10px;
  border-radius: 6px;
}

.admin-add-box input[type="text"] {
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #fff;
  padding: 8px;
  border-radius: 4px;
  font-size: 0.8rem;
}

.admin-checkbox-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  color: #94a3b8;
  cursor: pointer;
}

.admin-table-title {
  font-size: 0.72rem;
  color: #94a3b8;
  font-weight: 700;
}

.admin-user-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.wl-user-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 10px;
  background: rgba(0, 0, 0, 0.35);
  border-radius: 4px;
  font-size: 0.8rem;
}

.btn-remove-wl {
  background: rgba(244, 63, 94, 0.2);
  border: 1px solid rgba(244, 63, 94, 0.4);
  color: #f43f5e;
  padding: 2px 8px;
  border-radius: 3px;
  font-size: 0.7rem;
  cursor: pointer;
}

/* Lower Deck */
.gba-bottom-deck {
  background: linear-gradient(180deg, var(--gba-chassis) 0%, var(--gba-chassis-dark) 100%);
  border-bottom-left-radius: 16px;
  border-bottom-right-radius: 16px;
  padding: 16px 20px 20px;
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-top: none;
}

.deck-surface {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* D-Pad */
.dpad-cross {
  position: relative;
  width: 80px;
  height: 80px;
}
.dpad-btn {
  position: absolute;
  background: var(--gba-dpad);
  border: none;
  cursor: pointer;
  box-shadow: inset 0 2px 2px rgba(255,255,255,0.2), 0 3px 5px rgba(0,0,0,0.5);
}
.dpad-btn:active { box-shadow: inset 0 1px 3px rgba(0,0,0,0.7); }
.dpad-up { top: 0; left: 26px; width: 28px; height: 32px; border-top-left-radius: 4px; border-top-right-radius: 4px; }
.dpad-down { bottom: 0; left: 26px; width: 28px; height: 32px; border-bottom-left-radius: 4px; border-bottom-right-radius: 4px; }
.dpad-left { top: 26px; left: 0; width: 32px; height: 28px; border-top-left-radius: 4px; border-bottom-left-radius: 4px; }
.dpad-right { top: 26px; right: 0; width: 32px; height: 28px; border-top-right-radius: 4px; border-bottom-right-radius: 4px; }
.dpad-center { position: absolute; top: 26px; left: 26px; width: 28px; height: 28px; background: var(--gba-dpad); }

/* Center Controls */
.deck-middle-controls {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}
.deck-btn-brightness {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #334155;
  border: 1px solid #475569;
  cursor: pointer;
}
.deck-speaker-grille {
  display: grid;
  grid-template-columns: repeat(3, 4px);
  gap: 4px;
}
.spk-hole {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #111827;
}

.deck-pill-buttons {
  display: flex;
  gap: 12px;
}
.pill-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
}
.pill-btn {
  width: 36px;
  height: 13px;
  background: #334155;
  border: 1px solid #475569;
  border-radius: 7px;
  color: transparent;
  cursor: pointer;
}
.pill-btn:active { transform: translateY(1px); }
.pill-label { font-size: 0.55rem; font-weight: 800; color: #475569; }

/* Action Buttons */
.action-buttons-group {
  display: flex;
  gap: 14px;
  transform: rotate(-25deg);
}
.btn-round-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
.btn-action-round {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  font-weight: 800;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.4);
  box-shadow: inset 0 2px 4px rgba(255,255,255,0.3), 0 4px 6px rgba(0,0,0,0.5);
}
.btn-a-wrap .btn-action-round { background: radial-gradient(circle at 35% 35%, #b91c1c, #831843); }
.btn-b-wrap .btn-action-round { background: radial-gradient(circle at 35% 35%, #831843, #500724); }
.action-btn-label { font-family: 'Press Start 2P', monospace; font-size: 0.6rem; color: #475569; }

/* =========================================================
   FLOATING ISLAND DOCK (BOTTOM CENTER)
   ========================================================= */
.canvas-floating-dock {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 200;
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(18, 22, 30, 0.88);
  backdrop-filter: blur(24px);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 9999px;
  padding: 6px 10px;
  box-shadow: 
    0 20px 40px -8px rgba(0, 0, 0, 0.6),
    0 0 20px rgba(0, 240, 255, 0.08);
}

.dock-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  border: none;
  color: var(--text-muted);
  padding: 8px 14px;
  border-radius: 9999px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}

.dock-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}
.dock-btn:active { transform: scale(0.95); }

.dock-divider {
  width: 1px;
  height: 20px;
  background: rgba(255, 255, 255, 0.12);
  margin: 0 4px;
}

/* Dock Dropdown & Primary Add Button */
.dock-dropdown-container {
  position: relative;
  display: flex;
  align-items: center;
}

.dock-btn.dock-btn-primary {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.28) 0%, rgba(99, 102, 241, 0.38) 100%);
  border: 1px solid rgba(99, 102, 241, 0.45);
  color: #fff;
  font-weight: 700;
  box-shadow: 0 0 14px rgba(99, 102, 241, 0.25);
  gap: 7px;
}

.dock-btn.dock-btn-primary:hover,
.dock-btn.dock-btn-primary.active {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.45) 0%, rgba(99, 102, 241, 0.6) 100%);
  border-color: #818cf8;
  box-shadow: 0 0 18px rgba(99, 102, 241, 0.45);
  color: #fff;
}

.dock-chevron {
  font-size: 0.75rem;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  opacity: 0.75;
}

.dock-btn.dock-btn-primary.active .dock-chevron {
  transform: rotate(180deg);
  opacity: 1;
}

.dock-dropdown-menu {
  position: absolute;
  bottom: calc(100% + 14px);
  left: 0;
  width: 290px;
  background: rgba(13, 19, 33, 0.96);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 16px;
  box-shadow: 0 20px 45px -8px rgba(0, 0, 0, 0.75), 0 0 0 1px rgba(255, 255, 255, 0.05);
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  z-index: 1000;
  animation: dockMenuPopup 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.dock-dropdown-menu.hidden {
  display: none !important;
}

@keyframes dockMenuPopup {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.dock-dropdown-menu .dropdown-header {
  padding: 6px 12px 6px 12px;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  text-transform: uppercase;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  margin-bottom: 4px;
}

.dock-dropdown-menu .add-menu-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 12px;
  border-radius: 10px;
  background: transparent;
  border: 1px solid transparent;
  color: #f1f5f9;
  text-align: left;
  cursor: pointer;
  width: 100%;
  transition: all 0.15s ease;
  font-family: inherit;
}

.dock-dropdown-menu .add-menu-item:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.12);
  transform: translateX(3px);
}

.dock-dropdown-menu .add-menu-item:active {
  transform: scale(0.98);
}

.dock-dropdown-menu .menu-item-icon {
  font-size: 1.3rem;
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  flex-shrink: 0;
}

.dock-dropdown-menu .menu-item-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  overflow: hidden;
}

.dock-dropdown-menu .menu-item-title {
  font-size: 0.82rem;
  font-weight: 700;
  color: #fff;
  line-height: 1.2;
}

.dock-dropdown-menu .menu-item-desc {
  font-size: 0.68rem;
  color: var(--text-muted);
  line-height: 1.2;
}

/* =========================================================
   BOTTOM RIGHT ZOOM HUD
   ========================================================= */
.canvas-zoom-hud {
  position: absolute;
  bottom: 24px;
  right: 24px;
  z-index: 200;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  pointer-events: none;
}
.canvas-zoom-hud > * { pointer-events: auto; }

.zoom-box {
  display: flex;
  align-items: center;
  background: var(--hud-bg);
  backdrop-filter: blur(16px);
  border: 1px solid var(--hud-border);
  border-radius: 8px;
  padding: 4px;
}

.zoom-btn {
  width: 28px;
  height: 28px;
  background: transparent;
  border: none;
  color: #fff;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  border-radius: 4px;
}
.zoom-btn:hover { background: rgba(255, 255, 255, 0.1); }

.zoom-text {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-muted);
  padding: 0 8px;
  min-width: 48px;
  text-align: center;
}

.canvas-guide-hint {
  font-size: 0.7rem;
  color: var(--text-faint);
  background: rgba(0, 0, 0, 0.45);
  padding: 3px 8px;
  border-radius: 4px;
}

/* =========================================================
   FLYOUT DRAWERS (WALLPAPER & STICKERS)
   ========================================================= */
.flyout-drawer {
  position: absolute;
  bottom: 84px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 300;
  background: rgba(22, 26, 36, 0.94);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 16px;
  padding: 16px;
  box-shadow: 0 24px 50px rgba(0, 0, 0, 0.7);
  width: 580px;
  max-width: 95vw;
}

.drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-weight: 700;
  font-size: 0.9rem;
  margin-bottom: 12px;
}

.drawer-close {
  background: none;
  border: none;
  color: #94a3b8;
  font-size: 1.1rem;
  cursor: pointer;
}

.wallpaper-presets-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 16px;
}

.wp-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  padding: 6px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.75rem;
  font-weight: 600;
  transition: all 0.15s;
}
.wp-card:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--cyan);
}

.wp-preview {
  width: 100%;
  height: 60px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}
.wp-cork { background: #b45309; }
.wp-cyber { background: linear-gradient(135deg, #0b0716, #f43f5e); }
.wp-arcade { background: linear-gradient(180deg, #180d38, #00f0ff); }
.wp-lofi { background: linear-gradient(135deg, #171622, #a855f7); }
.wp-blue { background: #091e3a; border-color: #38bdf8; }
.wp-matrix { background: #0d1117; }

.custom-url-section label {
  font-size: 0.75rem;
  color: var(--text-muted);
  display: block;
  margin-bottom: 6px;
}
.url-input-row {
  display: flex;
  gap: 8px;
}
.url-input-row input {
  flex: 1;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #fff;
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 0.8rem;
}
.btn-url-apply {
  background: var(--cyan);
  color: #030712;
  border: none;
  padding: 8px 14px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 0.8rem;
  cursor: pointer;
}

/* Sticker Drawer */
.sticker-drawer {
  width: 460px;
}
.drawer-hint {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 10px;
}
.stickers-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 8px;
  max-height: 240px;
  overflow-y: auto;
  padding: 4px;
}
.sticker-option-btn {
  font-size: 2rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
  cursor: pointer;
  transition: transform 0.15s;
}
.sticker-option-btn:hover {
  transform: scale(1.2);
  background: rgba(255, 255, 255, 0.12);
}

/* Dialogs */
.board-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
}
.dialog-card {
  width: 420px;
  max-width: 95vw;
  background: #1c212c;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 24px 50px rgba(0, 0, 0, 0.7);
}
.dialog-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-weight: 700;
  margin-bottom: 12px;
}
.dialog-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 12px;
}
.dialog-input {
  width: 100%;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #fff;
  padding: 10px;
  border-radius: 8px;
  font-size: 0.85rem;
  margin-bottom: 16px;
}
.dialog-input:focus { outline: none; border-color: var(--cyan); }

#dialog-note-text {
  width: 100%;
  height: 110px;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  padding: 12px;
  color: #fff;
  font-family: 'Caveat', cursive;
  font-size: 1.35rem;
  resize: none;
  margin-bottom: 16px;
}
#dialog-note-text:focus { outline: none; border-color: var(--cyan); }

.dialog-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.dialog-bottom-single {
  display: flex;
  justify-content: flex-end;
}

.color-picker-row {
  display: flex;
  align-items: center;
  gap: 8px;
}
.color-dot {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  cursor: pointer;
  display: inline-block;
  position: relative;
}
.color-dot input { opacity: 0; }
.color-dot.c-yellow { background: var(--note-yellow-bg); }
.color-dot.c-pink { background: var(--note-pink-bg); }
.color-dot.c-cyan { background: var(--note-cyan-bg); }
.color-dot.c-green { background: var(--note-green-bg); }
.color-dot.c-purple { background: var(--note-purple-bg); }
.color-dot.active { box-shadow: 0 0 0 2px #fff; }

.btn-create-item {
  background: var(--cyan);
  color: #030712;
  border: none;
  padding: 8px 18px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
}

/* =========================================================
   RESIZABLE WIDGETS & HANDLES
   ========================================================= */
.widget-resizer {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 22px;
  height: 22px;
  cursor: nwse-resize;
  z-index: 50;
  touch-action: none;
}
.widget-resizer::after {
  content: '';
  position: absolute;
  right: 4px;
  bottom: 4px;
  width: 9px;
  height: 9px;
  border-right: 2px solid rgba(255, 255, 255, 0.45);
  border-bottom: 2px solid rgba(255, 255, 255, 0.45);
}
.widget-resizer:hover::after {
  border-color: var(--cyan);
}

.board-widget.is-resizing,
.board-image-item.is-resizing,
.widget-sticky-note.is-resizing {
  user-select: none;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8) !important;
  z-index: 1000 !important;
}

/* Minimum dimensions */
.widget-youtube {
  min-width: 320px;
  min-height: 240px;
}
.widget-gba-sp {
  min-width: 440px;
}
.widget-sticky-note {
  min-width: 180px;
  min-height: 120px;
}

/* Maximize button */
.btn-w-action.btn-max-widget:hover {
  color: var(--cyan);
}

/* =========================================================
   WIDGET: BOARD IMAGE / MEME / PHOTO ITEM
   ========================================================= */
.board-image-item {
  position: absolute;
  display: flex;
  flex-direction: column;
  background: #11141c;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  box-shadow: 
    0 16px 36px -6px rgba(0, 0, 0, 0.6),
    0 4px 12px rgba(0, 0, 0, 0.4);
  overflow: hidden;
  min-width: 140px;
  min-height: 140px;
  cursor: grab;
}
.board-image-item:active {
  cursor: grabbing;
}

/* Washi tape at top of photos */
.board-image-item::before {
  content: '';
  position: absolute;
  top: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 70px;
  height: 18px;
  background: rgba(255, 255, 255, 0.35);
  backdrop-filter: blur(2px);
  border-radius: 2px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
  z-index: 10;
  pointer-events: none;
}

.board-image-item.is-dragging {
  box-shadow: 0 28px 60px rgba(0, 0, 0, 0.8);
  z-index: 1000 !important;
}

.board-image-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  pointer-events: none;
  user-select: none;
}

.image-controls-hover {
  position: absolute;
  top: 8px;
  right: 8px;
  display: none;
  gap: 6px;
  z-index: 20;
}
.board-image-item:hover .image-controls-hover {
  display: flex;
}

.btn-img-ctrl {
  background: rgba(17, 24, 39, 0.85);
  backdrop-filter: blur(8px);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.25);
  width: 26px;
  height: 26px;
  border-radius: 6px;
  font-size: 0.75rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
}
.btn-img-ctrl:hover {
  background: rgba(17, 24, 39, 1);
  border-color: #fff;
  transform: scale(1.08);
}
.btn-img-ctrl.btn-del-img:hover {
  background: rgba(239, 68, 68, 0.85);
  border-color: #ef4444;
}

/* Image Modal Tabs & Drop Zone */
.img-modal-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}
.img-tab-btn {
  flex: 1;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #94a3b8;
  padding: 8px;
  border-radius: 6px;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s;
}
.img-tab-btn.active {
  background: #0284c7;
  color: #fff;
  border-color: #38bdf8;
}

.img-modal-pane {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.img-modal-pane.hidden {
  display: none;
}

.file-drop-zone {
  border: 2px dashed rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  padding: 24px;
  text-align: center;
  color: #94a3b8;
  font-size: 0.8rem;
  cursor: pointer;
  background: rgba(0, 0, 0, 0.2);
  transition: all 0.15s;
}
.file-drop-zone:hover {
  border-color: var(--cyan);
  color: #fff;
  background: rgba(0, 240, 255, 0.05);
}

.file-chosen-text {
  font-size: 0.75rem;
  color: #38bdf8;
  font-weight: 600;
  margin-top: 4px;
}

/* =========================================================
   ADMIN PANEL HUD BUTTON & PERMISSIONS LOCKDOWN
   ========================================================= */
.hud-btn-admin {
  background: linear-gradient(135deg, #4f46e5, #06b6d4);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.3);
  padding: 6px 14px;
  border-radius: 10px;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 4px 14px rgba(79, 70, 229, 0.4);
  transition: all 0.2s ease;
}
.hud-btn-admin:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(6, 182, 212, 0.5);
}

/* Granular UI Lockdowns */
body.no-perm-add-notes #dock-btn-add-note,
body.no-perm-add-notes .add-menu-item[data-item="note"] { display: none !important; }

body.no-perm-add-stickers #dock-btn-stickers,
body.no-perm-add-stickers .add-menu-item[data-item="sticker"] { display: none !important; }

body.no-perm-add-media #dock-btn-image, 
body.no-perm-add-media #dock-btn-youtube,
body.no-perm-add-media .add-menu-item[data-item="image"],
body.no-perm-add-media .add-menu-item[data-item="youtube"] { display: none !important; }

body.no-perm-add-bookmarks #dock-btn-add-bookmark,
body.no-perm-add-bookmarks .add-menu-item[data-item="bookmark"] { display: none !important; }

body.no-perm-poll #dock-btn-add-poll,
body.no-perm-poll .add-menu-item[data-item="poll"] { display: none !important; }

body.no-perm-move-items .widget-resizer { display: none !important; }
body.no-perm-move-items .board-widget .widget-titlebar,
body.no-perm-move-items .board-sticky-item,
body.no-perm-move-items .board-sticker-item,
body.no-perm-move-items .board-image-item,
body.no-perm-move-items .widget-torn-paper { 
  cursor: default !important; 
}

body.no-perm-delete-notes .btn-del-widget,
body.no-perm-delete-notes .btn-del-sticky,
body.no-perm-delete-notes .btn-del-img,
body.no-perm-delete-notes .btn-sticker-ctrl { 
  display: none !important; 
}

/* =========================================================
   WIDGET: TORN NOTEBOOK PAPER (HOJA DE CUADERNO ROTA / MARCADOR)
   ========================================================= */
.widget-torn-paper {
  position: absolute;
  min-width: 250px;
  max-width: 320px;
  background: #fdfbf7;
  color: #1e293b;
  border-radius: 0 0 6px 6px;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.5), 0 4px 10px rgba(0, 0, 0, 0.25);
  transition: box-shadow 0.15s ease;
  user-select: none;
}
.widget-torn-paper.is-dragging {
  box-shadow: 0 28px 60px rgba(0, 0, 0, 0.7);
  z-index: 1000 !important;
}

/* Realistic jagged ripped top edge */
.torn-paper-tear {
  height: 16px;
  background: #fdfbf7;
  clip-path: polygon(
    0% 100%, 3% 30%, 6% 90%, 10% 20%, 14% 80%, 18% 30%, 22% 85%, 26% 25%, 
    30% 75%, 34% 15%, 38% 85%, 42% 35%, 46% 90%, 50% 20%, 54% 80%, 58% 40%, 
    62% 85%, 66% 30%, 70% 90%, 74% 20%, 78% 80%, 82% 35%, 86% 75%, 90% 25%, 
    94% 85%, 97% 40%, 100% 100%
  );
  margin-top: -15px;
}

/* Washi tape strip */
.washi-tape-strip {
  position: absolute;
  top: -18px;
  left: 50%;
  transform: translateX(-50%) rotate(-2deg);
  width: 90px;
  height: 24px;
  background: rgba(254, 243, 199, 0.75);
  border-left: 2px dashed rgba(180, 83, 9, 0.3);
  border-right: 2px dashed rgba(180, 83, 9, 0.3);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
  backdrop-filter: blur(2px);
  z-index: 5;
}

.torn-pushpin {
  position: absolute;
  top: -10px;
  right: 14px;
  font-size: 1.25rem;
  filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.35));
  z-index: 6;
}

/* 1. Lined Paper */
.widget-torn-paper.paper-lined {
  background: #fdfbf7 !important;
  color: #1e293b !important;
}
.widget-torn-paper.paper-lined .torn-paper-tear {
  background: #fdfbf7 !important;
}
.widget-torn-paper.paper-lined .torn-paper-body {
  background-image: repeating-linear-gradient(transparent, transparent 23px, #cbd5e1 24px) !important;
  line-height: 24px !important;
}

/* 2. Grid Paper */
.widget-torn-paper.paper-grid {
  background: #f8fafc !important;
  color: #0f172a !important;
}
.widget-torn-paper.paper-grid .torn-paper-tear {
  background: #f8fafc !important;
}
.widget-torn-paper.paper-grid .torn-paper-body {
  background-size: 16px 16px !important;
  background-image: 
    linear-gradient(to right, rgba(148, 163, 184, 0.35) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(148, 163, 184, 0.35) 1px, transparent 1px) !important;
  line-height: 22px !important;
}

/* 3. Vintage / Yellow Paper */
.widget-torn-paper.paper-vintage,
.widget-torn-paper.paper-yellow {
  background: #fef08a !important;
  color: #1e293b !important;
}
.widget-torn-paper.paper-vintage .torn-paper-tear,
.widget-torn-paper.paper-yellow .torn-paper-tear {
  background: #fef08a !important;
}
.widget-torn-paper.paper-vintage .torn-paper-body,
.widget-torn-paper.paper-yellow .torn-paper-body {
  background-image: repeating-linear-gradient(transparent, transparent 23px, rgba(202, 138, 4, 0.35) 24px) !important;
  line-height: 24px !important;
}

/* 4. Pink Paper */
.widget-torn-paper.paper-pink {
  background: #fce7f3 !important;
  color: #1e293b !important;
}
.widget-torn-paper.paper-pink .torn-paper-tear {
  background: #fce7f3 !important;
}
.widget-torn-paper.paper-pink .torn-paper-body {
  background-image: repeating-linear-gradient(transparent, transparent 23px, rgba(236, 72, 153, 0.3) 24px) !important;
  line-height: 24px !important;
}

/* 5. Dark / Obsidian Paper */
.widget-torn-paper.paper-dark,
.widget-torn-paper.paper-obsidian {
  background: #18181b !important;
  color: #f1f5f9 !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
}
.widget-torn-paper.paper-dark .torn-paper-tear,
.widget-torn-paper.paper-obsidian .torn-paper-tear {
  background: #18181b !important;
}
.widget-torn-paper.paper-dark .torn-paper-body,
.widget-torn-paper.paper-obsidian .torn-paper-body {
  background-image: repeating-linear-gradient(transparent, transparent 23px, rgba(255, 255, 255, 0.1) 24px) !important;
  line-height: 24px !important;
}
.widget-torn-paper.paper-dark .torn-paper-title,
.widget-torn-paper.paper-obsidian .torn-paper-title {
  color: #38bdf8 !important;
}
.widget-torn-paper.paper-dark .torn-paper-notes,
.widget-torn-paper.paper-obsidian .torn-paper-notes {
  color: #cbd5e1 !important;
}

.torn-paper-body {
  padding: 12px 16px 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  cursor: grab;
}
.widget-torn-paper:active .torn-paper-body {
  cursor: grabbing;
}

.torn-paper-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.torn-badge-tag {
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: #64748b;
}

.torn-paper-title {
  font-weight: 800;
  font-size: 1rem;
  color: #0f172a;
  word-break: break-word;
}

.torn-paper-notes {
  font-size: 0.82rem;
  color: #334155;
  font-style: italic;
  min-height: 30px;
  word-break: break-word;
}

.torn-paper-link-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: #0f172a;
  color: #38bdf8;
  border: 1px solid #334155;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 0.78rem;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.15s ease;
  margin-top: 4px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}
.torn-paper-link-btn:hover {
  background: #0284c7;
  color: #fff;
  border-color: #38bdf8;
  transform: translateY(-1px);
}

/* =========================================================
   IMAGE CLICKABLE LINK BADGE
   ========================================================= */
.image-link-badge {
  position: absolute;
  bottom: 8px;
  left: 8px;
  background: rgba(15, 23, 42, 0.9);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(56, 189, 248, 0.6);
  color: #38bdf8;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 6px;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 5px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
  transition: all 0.15s ease;
  z-index: 10;
}
.image-link-badge:hover {
  background: #0284c7;
  color: #fff;
  border-color: #fff;
  transform: scale(1.05);
}
.board-image-item.has-link {
  cursor: pointer;
}

/* =========================================================
   WIDGET: SQUAD QUICK POLL (VOTACIONES DEL SQUAD)
   ========================================================= */
.widget-squad-poll {
  position: absolute;
  min-width: 280px;
  max-width: 380px;
  background: rgba(15, 23, 42, 0.94);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(139, 92, 246, 0.4);
  border-radius: 14px;
  padding: 14px;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.5);
  color: #f1f5f9;
}
.widget-squad-poll.is-dragging {
  box-shadow: 0 28px 60px rgba(0, 0, 0, 0.7);
  z-index: 1000 !important;
}
.poll-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  cursor: grab;
}
.widget-squad-poll:active .poll-top-row { cursor: grabbing; }
.poll-badge-tag {
  background: rgba(139, 92, 246, 0.2);
  color: #c084fc;
  font-size: 0.65rem;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 4px;
}
.poll-question {
  font-size: 0.95rem;
  font-weight: 800;
  color: #fff;
  margin-bottom: 12px;
}
.poll-options-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.poll-opt-btn {
  position: relative;
  background: rgba(30, 41, 59, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 8px 12px;
  color: #e2e8f0;
  cursor: pointer;
  overflow: hidden;
  transition: all 0.15s ease;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.poll-opt-btn:hover {
  border-color: #8b5cf6;
}
.poll-opt-btn.has-voted {
  border-color: #c084fc;
  box-shadow: 0 0 12px rgba(168, 85, 247, 0.35);
}
.poll-bar-fill {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  background: linear-gradient(90deg, rgba(139, 92, 246, 0.35), rgba(168, 85, 247, 0.5));
  z-index: 1;
  transition: width 0.3s ease;
}
.poll-opt-text {
  position: relative;
  z-index: 2;
  font-size: 0.8rem;
  font-weight: 600;
}
.poll-opt-pct {
  position: relative;
  z-index: 2;
  font-size: 0.75rem;
  font-weight: 700;
  color: #c084fc;
}

/* =========================================================
   ADMIN PANEL CONFIGURATION MODAL
   ========================================================= */
.admin-panel-modal-card {
  max-width: 1060px !important;
  width: 95% !important;
  max-height: 88vh;
  overflow-y: auto;
}
.admin-modal-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 1rem;
  color: #fff;
}
.admin-badge-icon { font-size: 1.25rem; }

.admin-modal-tabs {
  display: flex;
  gap: 8px;
  margin: 14px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding-bottom: 8px;
}
.adm-tab {
  background: transparent;
  border: none;
  color: #94a3b8;
  font-size: 0.82rem;
  font-weight: 700;
  padding: 8px 14px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
}
.adm-tab:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.05);
}
.adm-tab.active {
  color: #38bdf8;
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.3);
}
.adm-tab-pane { display: none; }
.adm-tab-pane.active { display: block; }

.admin-add-user-bar {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 16px;
  background: rgba(0, 0, 0, 0.3);
  padding: 10px 14px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.admin-add-user-bar input {
  flex: 1;
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #fff;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 0.82rem;
}
.adm-checkbox-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  color: #cbd5e1;
  cursor: pointer;
}
.btn-primary-admin {
  background: #2563eb;
  color: #fff;
  border: none;
  padding: 8px 14px;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s;
}
.btn-primary-admin:hover { background: #1d4ed8; }

.admin-users-table-wrap {
  overflow-x: auto;
  background: rgba(0, 0, 0, 0.25);
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.admin-users-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8rem;
}
.admin-users-table th {
  text-align: left;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.04);
  color: #94a3b8;
  font-weight: 700;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.admin-users-table td {
  padding: 10px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  color: #e2e8f0;
}

.perms-user-selector-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(0, 0, 0, 0.3);
  padding: 10px 14px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.82rem;
  color: #e2e8f0;
}
.dialog-select {
  background: #0f172a;
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #fff;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 0.82rem;
}

.perms-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 12px;
  margin-top: 14px;
}
.perm-card {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: rgba(30, 41, 59, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 12px;
  cursor: pointer;
  transition: all 0.15s ease;
}
.perm-card:hover {
  background: rgba(30, 41, 59, 0.85);
  border-color: rgba(56, 189, 248, 0.4);
}
.perm-card input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  accent-color: #38bdf8;
}
.perm-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.perm-title {
  font-size: 0.84rem;
  font-weight: 700;
  color: #fff;
}
.perm-desc {
  font-size: 0.72rem;
  color: #94a3b8;
  line-height: 1.3;
}

/* Roomy Dialog Cards */
.dialog-card-roomy {
  width: 620px !important;
  max-width: 95vw !important;
  background: #181d28;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 18px;
  padding: 24px;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.85);
}

/* Rich Editor Toolbar */
.editor-toolbar {
  display: flex;
  align-items: center;
  gap: 5px;
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-bottom: none;
  border-radius: 10px 10px 0 0;
  padding: 6px 10px;
}
.editor-toolbar.mini-toolbar {
  padding: 3px 6px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.35);
}
.btn-fmt {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #e2e8f0;
  min-width: 28px;
  height: 26px;
  border-radius: 5px;
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 6px;
  transition: all 0.15s ease;
}
.btn-fmt:hover {
  background: rgba(56, 189, 248, 0.25);
  border-color: #38bdf8;
  color: #fff;
  transform: translateY(-1px);
}
.fmt-spacer { flex: 1; }
.char-counter {
  font-size: 0.72rem;
  color: #94a3b8;
  font-weight: 600;
}
.rich-textarea {
  width: 100%;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 0 0 10px 10px;
  padding: 14px;
  color: #fff;
  font-family: 'Inter', -apple-system, sans-serif;
  font-size: 0.95rem;
  line-height: 1.5;
  resize: vertical;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
#dialog-note-text.rich-textarea {
  font-family: 'Caveat', cursive, sans-serif;
  font-size: 1.45rem;
  line-height: 1.4;
}
.rich-textarea:focus {
  outline: none;
  border-color: #38bdf8;
  box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.25);
}

/* Color Swatches Palette for Notes */
.color-palette-selection {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.color-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: rgba(255, 255, 255, 0.05);
  border: 1.5px solid rgba(255, 255, 255, 0.12);
  padding: 6px 12px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 600;
  color: #e2e8f0;
  transition: all 0.15s ease;
}
.color-pill:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.3);
}
.color-pill.active {
  background: rgba(56, 189, 248, 0.15);
  border-color: #38bdf8;
  color: #fff;
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.35);
}
.color-pill input[type="radio"] { display: none; }
.pill-swatch {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

/* Paper Style Palette for Bookmarks */
.paper-palette-selection {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 6px;
}
.paper-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.05);
  border: 1.5px solid rgba(255, 255, 255, 0.12);
  padding: 6px 12px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 600;
  color: #e2e8f0;
  transition: all 0.15s ease;
}
.paper-pill:hover {
  background: rgba(255, 255, 255, 0.1);
}
.paper-pill.active {
  background: rgba(56, 189, 248, 0.15);
  border-color: #38bdf8;
  color: #fff;
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.35);
}
.paper-pill input[type="radio"] { display: none; }
.paper-pill-icon { font-size: 1rem; }

/* Rotation Popover */
.rotation-popover {
  position: fixed;
  z-index: 10000;
  background: rgba(15, 23, 42, 0.96);
  backdrop-filter: blur(20px);
  border: 1.5px solid rgba(56, 189, 248, 0.5);
  border-radius: 14px;
  padding: 12px;
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.75), 0 0 15px rgba(56, 189, 248, 0.2);
  width: 250px;
}
.rot-popover-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.78rem;
  font-weight: 800;
  color: #fff;
  margin-bottom: 10px;
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.rot-close-btn {
  background: none;
  border: none;
  color: #94a3b8;
  cursor: pointer;
  font-size: 0.9rem;
}
.rot-close-btn:hover { color: #fff; }
.rot-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}
.rot-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(30, 41, 59, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #e2e8f0;
  padding: 6px 8px;
  border-radius: 6px;
  font-size: 0.72rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
}
.rot-btn:hover {
  background: rgba(56, 189, 248, 0.2);
  border-color: #38bdf8;
  color: #fff;
  transform: translateY(-1px);
}
.rot-glyph { font-size: 0.85rem; }

/* Admin Sections in Tab 3 */
.admin-section-block {
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 16px;
}
.admin-block-header {
  font-size: 0.92rem;
  font-weight: 800;
  color: #fff;
  margin-bottom: 4px;
}
.admin-block-desc {
  font-size: 0.74rem;
  color: #94a3b8;
  margin-bottom: 12px;
}
.admin-identity-grid {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.admin-sys-widgets-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 12px;
}
.sys-widget-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: rgba(30, 41, 59, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  padding: 12px;
}
.sys-w-icon { font-size: 1.6rem; }
.sys-w-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
}
.sys-w-name {
  font-size: 0.82rem;
  font-weight: 700;
  color: #fff;
}
.sys-w-desc {
  font-size: 0.7rem;
  color: #94a3b8;
}
.btn-sys-widget-action {
  background: #2563eb;
  color: #fff;
  border: none;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 0.74rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
}
.btn-sys-widget-action:hover {
  background: #1d4ed8;
  transform: translateY(-1px);
}

/* Extra note & bookmark colors and rich content formatting */
.widget-sticky-note.color-orange {
  background: #fed7aa;
  color: #7c2d12;
}
.widget-sticky-note.color-dark {
  background: #1e293b;
  color: #f8fafc;
  border: 1px solid rgba(255, 255, 255, 0.15);
}
.widget-sticky-note.color-dark .sticky-author-tag {
  color: #94a3b8;
}
.widget-torn-paper.paper-dark {
  background: #1e293b;
  color: #f8fafc;
}
.widget-torn-paper.paper-dark .torn-paper-tear {
  background: #1e293b;
}
.widget-torn-paper.paper-dark .torn-paper-title {
  color: #fff;
}
.widget-torn-paper.paper-dark .torn-paper-notes {
  color: #cbd5e1;
}

.sticky-content mark, .torn-paper-notes mark {
  background: #fde047;
  color: #0f172a;
  padding: 1px 4px;
  border-radius: 3px;
  font-weight: 700;
}
.sticky-content b, .sticky-content strong, .torn-paper-notes b, .torn-paper-notes strong {
  font-weight: 800;
}
.sticky-content i, .sticky-content em, .torn-paper-notes i, .torn-paper-notes em {
  font-style: italic;
}
.sticky-content s, .sticky-content del {
  text-decoration: line-through;
}
.sticky-content ul {
  padding-left: 18px;
  margin: 4px 0;
}
.sticky-content h2, .sticky-content h3 {
  font-size: 1.15rem;
  font-weight: 900;
  margin: 4px 0;
}

/* Master Board Save Button (Admin Only) */
.hud-btn-save {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
  color: #ffffff !important;
  border: 1px solid #34d399 !important;
  box-shadow: 0 0 12px rgba(16, 185, 129, 0.4) !important;
  font-weight: 700 !important;
  font-size: 0.76rem !important;
  letter-spacing: 0.5px !important;
  padding: 6px 14px !important;
  border-radius: 8px !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  cursor: pointer !important;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
}
.hud-btn-save:hover {
  background: linear-gradient(135deg, #059669 0%, #047857 100%) !important;
  box-shadow: 0 0 18px rgba(16, 185, 129, 0.65) !important;
  transform: translateY(-1px) scale(1.02) !important;
}
.hud-btn-save:active {
  transform: translateY(1px) scale(0.98) !important;
}
.hud-btn-save.saved-pulse {
  animation: pulseSave 0.6s ease-in-out infinite alternate;
}
@keyframes pulseSave {
  from {
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.5);
    border-color: #34d399;
  }
  to {
    box-shadow: 0 0 25px rgba(52, 211, 153, 0.9);
    border-color: #a7f3d0;
  }
}

/* =========================================================
   DOCK: VAULT BUTTON
   ========================================================= */
.dock-btn.dock-btn-vault {
  background: linear-gradient(135deg, rgba(217, 119, 6, 0.25) 0%, rgba(180, 83, 9, 0.35) 100%);
  border-color: rgba(245, 158, 11, 0.4);
}
.dock-btn.dock-btn-vault:hover {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.45) 0%, rgba(217, 119, 6, 0.55) 100%);
  border-color: #f59e0b;
  box-shadow: 0 0 16px rgba(245, 158, 11, 0.4);
}

/* =========================================================
   WIDGET: BAÚL DE ESPACIO PERSONAL (PERSONAL VAULT CHEST)
   ========================================================= */
.widget-personal-vault {
  position: absolute;
  width: 280px;
  min-height: 180px;
  background: linear-gradient(180deg, #5c2c0e 0%, #3d1c07 35%, #251004 80%, #160902 100%);
  border-radius: 16px;
  border: 3px solid #1c0b02;
  box-shadow: 
    0 18px 40px rgba(0, 0, 0, 0.75),
    inset 0 3px 6px rgba(254, 215, 170, 0.25),
    inset 0 -6px 12px rgba(0, 0, 0, 0.8);
  display: flex;
  flex-direction: column;
  user-select: none;
  cursor: grab;
  transition: box-shadow 0.2s, transform 0.2s;
  overflow: visible;
  z-index: 15;
}
.widget-personal-vault:active {
  cursor: grabbing;
}
.widget-personal-vault.is-dragging {
  box-shadow: 0 32px 70px rgba(0, 0, 0, 0.9);
  z-index: 1000 !important;
}

/* Wood Planks Lines Simulation */
.vault-wood-planks {
  position: absolute;
  inset: 0;
  border-radius: 13px;
  pointer-events: none;
  background: repeating-linear-gradient(
    0deg,
    transparent 0px,
    transparent 32px,
    rgba(10, 4, 1, 0.7) 32px,
    rgba(254, 215, 170, 0.08) 34px
  );
  opacity: 0.9;
}

/* Curved Arch Lid Separation Line */
.vault-lid-split {
  position: absolute;
  top: 48px;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.8) 0%, rgba(245, 158, 11, 0.25) 50%, rgba(0, 0, 0, 0.9) 100%);
  z-index: 3;
  pointer-events: none;
}

/* Reinforced Forged Iron Straps with Brass Rivets */
.vault-iron-strap {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 24px;
  background: linear-gradient(90deg, #18202c 0%, #374151 45%, #111827 100%);
  border-left: 1px solid rgba(255, 255, 255, 0.15);
  border-right: 1px solid rgba(0, 0, 0, 0.7);
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  align-items: center;
  padding: 6px 0;
  pointer-events: none;
}
.vault-strap-left { left: 38px; }
.vault-strap-right { right: 38px; }

.vault-rivet {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #fef08a, #b45309 65%, #1c1917 100%);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.9), inset 0 1px 1px rgba(255, 255, 255, 0.6);
}

/* Top bar with minimal utility buttons */
.vault-top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  position: relative;
  z-index: 5;
  border-radius: 13px 13px 0 0;
}
.vault-tag-pill {
  font-size: 0.6rem;
  font-weight: 900;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: #fef08a;
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(245, 158, 11, 0.35);
  padding: 2px 8px;
  border-radius: 9999px;
  display: flex;
  align-items: center;
  gap: 4px;
}
.vault-top-actions {
  display: flex;
  align-items: center;
  gap: 4px;
}
.btn-vault-ctrl {
  background: rgba(0, 0, 0, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #94a3b8;
  width: 20px;
  height: 20px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.68rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
}
.btn-vault-ctrl:hover {
  background: rgba(239, 68, 68, 0.85);
  color: #fff;
  border-color: #ef4444;
}

/* Chest Center Body */
.vault-body-content {
  position: relative;
  z-index: 4;
  padding: 6px 14px 20px 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  text-align: center;
  flex: 1;
}

/* Engraved Brass Nameplate */
.vault-nameplate {
  background: linear-gradient(180deg, #fef08a 0%, #d97706 55%, #78350f 100%);
  border: 1px solid #451a03;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.6), inset 0 1px 2px rgba(255, 255, 255, 0.8);
  border-radius: 5px;
  padding: 3px 16px;
  font-size: 0.76rem;
  font-weight: 900;
  color: #3b1402;
  letter-spacing: 0.5px;
  text-shadow: 0 1px 0 rgba(254, 240, 138, 0.5);
  max-width: 82%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* THE SINGLE CENTRAL OPENER BUTTON (El único botón central para abrir el baúl) */
.vault-central-latch {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  background: linear-gradient(180deg, #fef08a 0%, #f59e0b 45%, #b45309 85%, #78350f 100%);
  border: 2px solid #451a03;
  border-radius: 10px;
  padding: 8px 18px;
  color: #2e0f02;
  font-weight: 900;
  font-size: 0.78rem;
  letter-spacing: 0.5px;
  cursor: pointer;
  box-shadow: 
    0 4px 12px rgba(0, 0, 0, 0.55),
    inset 0 1px 2px rgba(255, 255, 255, 0.7),
    0 0 10px rgba(245, 158, 11, 0.3);
  transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
  position: relative;
  z-index: 10;
}
.vault-central-latch:hover {
  transform: translateY(-2px) scale(1.04);
  box-shadow: 
    0 6px 18px rgba(0, 0, 0, 0.7),
    inset 0 2px 3px rgba(255, 255, 255, 0.9),
    0 0 22px rgba(245, 158, 11, 0.75);
  border-color: #fef08a;
  color: #000;
}
.vault-central-latch:active {
  transform: translateY(1px) scale(0.98);
}
.latch-lock-icon {
  font-size: 0.9rem;
}
.latch-label {
  font-family: inherit;
  font-weight: 900;
}

/* =========================================================
   USER'S AVATAR ON THE BOTTOM LEFT OF THE TRUNK
   "Debajo a la izquierda del baul aparecerá el avatar que suba el usuario para su perfil."
   ========================================================= */
.vault-avatar-badge {
  position: absolute;
  bottom: -16px;
  left: -16px;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: #0f172a;
  border: 3.5px solid #f59e0b;
  box-shadow: 
    0 4px 14px rgba(0, 0, 0, 0.75),
    0 0 14px rgba(245, 158, 11, 0.4);
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: visible;
  cursor: pointer;
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.2s;
}
.vault-avatar-badge:hover {
  transform: scale(1.15);
  border-color: #fbbf24;
  box-shadow: 
    0 6px 18px rgba(0, 0, 0, 0.85),
    0 0 20px rgba(251, 191, 36, 0.7);
}
.vault-badge-img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}
.vault-badge-fallback {
  font-size: 1.6rem;
  user-select: none;
}
.vault-badge-status-dot {
  position: absolute;
  bottom: 1px;
  right: 1px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid #0f172a;
  background: #10b981;
  box-shadow: 0 0 8px #10b981;
}
.vault-badge-status-dot.offline {
  background: #64748b;
  box-shadow: none;
}

/* =========================================================
   VAULT MODAL STYLING (WIDE, LUXURIOUS VAULT INTERFACE)
   ========================================================= */
.vault-modal-card {
  width: 960px !important;
  max-width: 95vw !important;
  max-height: 90vh !important;
  background: #0f141f !important;
  border: 1px solid rgba(245, 158, 11, 0.35) !important;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.85), 0 0 30px rgba(245, 158, 11, 0.15) !important;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 24px !important;
}

.vault-modal-title {
  display: flex;
  align-items: center;
  gap: 16px;
}
.vault-modal-avatar-frame {
  position: relative;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: #1e293b;
  border: 2px solid #f59e0b;
  box-shadow: 0 0 12px rgba(245, 158, 11, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
}
.vault-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.vault-avatar-fallback {
  font-size: 1.6rem;
}
.vault-online-dot {
  position: absolute;
  bottom: 2px;
  right: 2px;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  border: 2px solid #0f172a;
  background: #10b981;
}

.vault-title-text {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.vault-badge-tag {
  font-size: 0.65rem;
  font-weight: 800;
  color: #f59e0b;
  letter-spacing: 0.8px;
}
#vault-modal-owner-title {
  font-size: 1.25rem;
  font-weight: 800;
  color: #fff;
}

/* Tabs */
.vault-modal-tabs {
  display: flex;
  gap: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding-bottom: 10px;
  margin-top: 14px;
  margin-bottom: 18px;
}
.v-tab {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #94a3b8;
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
}
.v-tab:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}
.v-tab.active {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.25) 0%, rgba(217, 119, 6, 0.35) 100%);
  border-color: #f59e0b;
  color: #fef08a;
  box-shadow: 0 0 12px rgba(245, 158, 11, 0.25);
}

.v-tab-pane {
  display: none;
  flex-direction: column;
  overflow-y: auto;
  max-height: 60vh;
  padding-right: 4px;
}
.v-tab-pane.active {
  display: flex;
}

.vault-pane-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}
.vault-pane-desc {
  font-size: 0.8rem;
  color: #94a3b8;
  line-height: 1.4;
}

/* Dropzone */
.vault-dropzone {
  border: 2px dashed rgba(245, 158, 11, 0.4);
  background: rgba(245, 158, 11, 0.03);
  border-radius: 12px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: #cbd5e1;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s;
  margin-bottom: 16px;
}
.vault-dropzone:hover, .vault-dropzone.dragover {
  border-color: #fbbf24;
  background: rgba(245, 158, 11, 0.1);
  color: #fff;
}
.vault-drop-icon {
  font-size: 2.2rem;
}

/* Files List */
.vault-items-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.vault-file-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(30, 41, 59, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 10px 14px;
  transition: all 0.15s;
}
.vault-file-item:hover {
  background: rgba(30, 41, 59, 0.8);
  border-color: rgba(245, 158, 11, 0.3);
}
.vf-left {
  display: flex;
  align-items: center;
  gap: 12px;
  overflow: hidden;
}
.vf-icon { font-size: 1.5rem; }
.vf-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
  overflow: hidden;
}
.vf-name {
  font-size: 0.85rem;
  font-weight: 700;
  color: #f1f5f9;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
}
.vf-sub {
  font-size: 0.72rem;
  color: #94a3b8;
}
.vf-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.btn-vf-action {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #e2e8f0;
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all 0.15s;
}
.btn-vf-action:hover {
  background: #0284c7;
  color: #fff;
  border-color: #38bdf8;
}
.btn-vf-action.btn-vf-share:hover {
  background: #10b981;
  border-color: #34d399;
}
.btn-vf-action.btn-vf-del:hover {
  background: #ef4444;
  border-color: #f87171;
}

/* Gallery Grid */
.vault-gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 14px;
}
.vault-img-card {
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  background: #1e293b;
  border: 1px solid rgba(255, 255, 255, 0.1);
  aspect-ratio: 16/10;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}
.vault-img-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.vault-img-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  opacity: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: opacity 0.2s;
  padding: 8px;
}
.vault-img-card:hover .vault-img-overlay {
  opacity: 1;
}

/* Notes Textarea */
.vault-textarea {
  min-height: 220px !important;
  font-family: 'Inter', sans-serif !important;
  font-size: 0.9rem !important;
  line-height: 1.6 !important;
  background: rgba(15, 23, 42, 0.8) !important;
  border: 1px solid rgba(245, 158, 11, 0.3) !important;
  border-radius: 8px !important;
  color: #f8fafc !important;
  padding: 14px !important;
}

/* Profile Tab Layout */
.vault-profile-layout {
  display: flex;
  gap: 28px;
  align-items: flex-start;
  padding: 10px 0;
}
.vault-avatar-editor {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  width: 180px;
  flex-shrink: 0;
}
.profile-avatar-big {
  width: 130px;
  height: 130px;
  border-radius: 50%;
  background: #1e293b;
  border: 3px solid #f59e0b;
  box-shadow: 0 0 24px rgba(245, 158, 11, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
}
.big-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.big-avatar-fallback {
  font-size: 4rem;
}
.vault-profile-details {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.profile-stats-card {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  background: rgba(30, 41, 59, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 16px;
  margin-top: 6px;
}
.profile-stat-box {
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-items: center;
  text-align: center;
}
.ps-label {
  font-size: 0.72rem;
  font-weight: 700;
  color: #94a3b8;
  text-transform: uppercase;
}
.ps-val {
  font-size: 1.15rem;
  font-weight: 900;
  color: #f59e0b;
}

/* =========================================================
   MODAL EXCLUSIVO: AVATAR & FOTO DE PERFIL CON RECORTADOR
   ========================================================= */
.avatar-cropper-card {
  width: 440px !important;
  max-width: 95vw !important;
  background: #0f1422 !important;
  border: 1px solid rgba(0, 240, 255, 0.3) !important;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.8), 0 0 30px rgba(0, 240, 255, 0.15) !important;
  border-radius: 18px !important;
  padding: 22px !important;
}

.cropper-modal-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.1rem;
  font-weight: 800;
  color: #fff;
}
.cropper-badge-icon {
  font-size: 1.4rem;
}

.cropper-view-pane {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 10px;
}

/* View 1: Display Mode */
.avatar-display-layout {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 16px 0;
  text-align: center;
}
.avatar-display-frame {
  position: relative;
  width: 130px;
  height: 130px;
  border-radius: 50%;
  background: #1e293b;
  border: 4px solid #f59e0b;
  box-shadow: 0 0 24px rgba(245, 158, 11, 0.4), 0 8px 20px rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: visible;
}
.avatar-display-img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}
.avatar-display-fallback {
  font-size: 4rem;
}
.avatar-display-frame .vault-online-dot {
  width: 18px;
  height: 18px;
  bottom: 4px;
  right: 4px;
  border-width: 3px;
}
.avatar-display-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.avatar-display-nick {
  font-size: 1.25rem;
  font-weight: 900;
  color: #fff;
  letter-spacing: 0.5px;
}
.avatar-display-role {
  font-size: 0.82rem;
  color: #f59e0b;
  font-weight: 700;
}
.avatar-display-email {
  font-size: 0.75rem;
  color: #64748b;
}

.cropper-owner-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.avatar-drop-hint {
  border: 2px dashed rgba(255, 255, 255, 0.15);
  border-radius: 10px;
  padding: 14px;
  text-align: center;
  font-size: 0.78rem;
  color: #94a3b8;
  cursor: pointer;
  transition: all 0.2s;
}
.avatar-drop-hint:hover, .avatar-drop-hint.dragover {
  border-color: var(--cyan);
  background: rgba(0, 240, 255, 0.05);
  color: #fff;
}

/* View 2: Cropper Canvas (Discord / X Style) */
.cropper-instruction-bar {
  font-size: 0.74rem;
  color: #94a3b8;
  text-align: center;
  background: rgba(255, 255, 255, 0.04);
  padding: 6px 10px;
  border-radius: 6px;
}

.cropper-viewport-container {
  position: relative;
  width: 340px;
  height: 340px;
  margin: 0 auto;
  border-radius: 12px;
  overflow: hidden;
  background: #090d16;
  border: 1px solid rgba(255, 255, 255, 0.12);
  cursor: grab;
  user-select: none;
  touch-action: none;
}
.cropper-viewport-container:active {
  cursor: grabbing;
}
#cropper-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 340px;
  height: 340px;
}

/* Circular Mask Overlay (Circular hole centered in 340x340 viewport: diameter 240px, radius 120px) */
.cropper-circular-overlay {
  position: absolute;
  top: 50px;
  left: 50px;
  width: 240px;
  height: 240px;
  border-radius: 50%;
  border: 2.5px solid #00f0ff;
  box-shadow: 0 0 0 9999px rgba(10, 14, 23, 0.75), 0 0 15px rgba(0, 240, 255, 0.4);
  pointer-events: none;
}

/* Controls */
.cropper-controls-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 6px;
}
.cropper-zoom-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #fff;
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s;
}
.cropper-zoom-btn:hover {
  background: rgba(255, 255, 255, 0.18);
  border-color: #fff;
}
.cropper-slider {
  flex: 1;
  accent-color: #00f0ff;
  height: 6px;
  border-radius: 3px;
  cursor: pointer;
}

.cropper-preview-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding-top: 6px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.cropper-mini-preview-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}
.cropper-mini-preview {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 2.5px solid #f59e0b;
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.4);
  background: #0f172a;
}
.cropper-preview-lbl {
  font-size: 0.72rem;
  color: #94a3b8;
  font-weight: 700;
}
.cropper-action-buttons {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* =========================================================
   FEATURE 5: REAL-TIME FLOATING REACTIONS BAR & PARTICLES
   ========================================================= */
.floating-reactions-bar {
  position: absolute;
  bottom: 24px;
  left: 24px;
  display: flex;
  align-items: center;
  gap: 4px;
  background: rgba(15, 23, 42, 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 9999px;
  padding: 4px 10px;
  z-index: 200;
  box-shadow: 0 16px 36px -6px rgba(0, 0, 0, 0.6), 0 0 16px rgba(245, 158, 11, 0.1);
}

.reaction-bar-label {
  font-family: 'Press Start 2P', monospace;
  font-size: 0.55rem;
  color: #ef4444;
  margin-right: 6px;
  padding: 3px 6px;
  background: rgba(239, 68, 68, 0.15);
  border-radius: 6px;
  letter-spacing: 0.05em;
  display: flex;
  align-items: center;
  gap: 4px;
}

.reaction-bar-label::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #ef4444;
  box-shadow: 0 0 8px #ef4444;
  animation: liveDotPulse 1.2s infinite alternate;
}

@keyframes liveDotPulse {
  from { opacity: 0.4; transform: scale(0.8); }
  to { opacity: 1; transform: scale(1.2); }
}

.btn-live-react {
  background: transparent;
  border: none;
  font-size: 1.35rem;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.15s cubic-bezier(0.175, 0.885, 0.32, 1.275), background 0.15s;
}

.btn-live-react:hover {
  transform: scale(1.3) translateY(-4px);
  background: rgba(255, 255, 255, 0.12);
}

.btn-live-react:active {
  transform: scale(0.9);
}

.reaction-particles-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 99999;
  overflow: hidden;
}

.floating-particle-item {
  position: absolute;
  bottom: 80px;
  display: flex;
  flex-direction: column;
  align-items: center;
  animation: floatParticleUp 4s cubic-bezier(0.2, 0.8, 0.3, 1) forwards;
  pointer-events: none;
  user-select: none;
}

.floating-particle-emoji {
  font-size: 3rem;
  filter: drop-shadow(0 6px 16px rgba(0,0,0,0.5));
}

.floating-particle-sender {
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 9999px;
  margin-top: -4px;
  white-space: nowrap;
  box-shadow: 0 4px 10px rgba(0,0,0,0.4);
}

@keyframes floatParticleUp {
  0% {
    opacity: 0;
    transform: translateY(20px) scale(0.3) rotate(0deg);
  }
  12% {
    opacity: 1;
    transform: translateY(-40px) scale(1.25) rotate(-8deg);
  }
  30% {
    transform: translateY(-160px) scale(1) rotate(6deg) translateX(-15px);
  }
  60% {
    transform: translateY(-380px) scale(1.05) rotate(-10deg) translateX(20px);
  }
  100% {
    bottom: 95vh;
    opacity: 0;
    transform: translateY(-550px) scale(1.3) rotate(15deg) translateX(-10px);
  }
}

/* =========================================================
   FEATURE 2: RULETA DE LA SUERTE (LUCKY WHEEL WIDGET)
   ========================================================= */
.widget-lucky-wheel {
  position: absolute;
  width: 360px;
  background: linear-gradient(145deg, #1e1b4b 0%, #0f172a 100%);
  border-radius: 20px;
  border: 2px solid #818cf8;
  box-shadow: 0 20px 45px -8px rgba(0, 0, 0, 0.8), 0 0 24px rgba(129, 140, 248, 0.25);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  user-select: none;
}

.wheel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.05);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  cursor: grab;
}

.wheel-header:active { cursor: grabbing; }

.wheel-title {
  font-size: 0.82rem;
  font-weight: 800;
  color: #fbbf24;
  letter-spacing: 0.04em;
  display: flex;
  align-items: center;
  gap: 6px;
}

.wheel-body {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 18px 14px 14px 14px;
}

.wheel-canvas-container {
  position: relative;
  width: 280px;
  height: 280px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.wheel-canvas {
  width: 280px;
  height: 280px;
  border-radius: 50%;
  box-shadow: 0 0 0 8px #312e81, 0 0 0 12px #fbbf24, 0 10px 30px rgba(0, 0, 0, 0.7);
  transition: transform 4s cubic-bezier(0.15, 0.9, 0.2, 1);
}

.wheel-pointer {
  position: absolute;
  top: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 14px solid transparent;
  border-right: 14px solid transparent;
  border-top: 26px solid #fbbf24;
  filter: drop-shadow(0 4px 6px rgba(0,0,0,0.6));
  z-index: 10;
  transition: transform 0.1s ease;
}

.wheel-center-button {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 68px;
  height: 68px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #fde047 0%, #ca8a04 70%, #854d0e 100%);
  border: 3px solid #fff;
  box-shadow: 0 6px 16px rgba(0,0,0,0.6), inset 0 2px 4px rgba(255,255,255,0.7);
  font-family: 'Press Start 2P', monospace;
  font-size: 0.58rem;
  font-weight: 900;
  color: #451a03;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  z-index: 12;
  transition: transform 0.15s, box-shadow 0.15s;
}

.wheel-center-button:hover {
  transform: translate(-50%, -50%) scale(1.08);
  box-shadow: 0 8px 22px rgba(251, 191, 36, 0.6);
}

.wheel-center-button:active {
  transform: translate(-50%, -50%) scale(0.95);
}

.wheel-winner-banner {
  margin-top: 14px;
  width: 100%;
  background: rgba(251, 191, 36, 0.15);
  border: 1px solid rgba(251, 191, 36, 0.4);
  border-radius: 10px;
  padding: 8px 12px;
  text-align: center;
  animation: winnerGlow 1.5s infinite alternate;
}

@keyframes winnerGlow {
  from { box-shadow: 0 0 6px rgba(251, 191, 36, 0.2); }
  to { box-shadow: 0 0 16px rgba(251, 191, 36, 0.6); }
}

.wheel-winner-lbl {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  color: #fbbf24;
  letter-spacing: 0.08em;
}

.wheel-winner-text {
  font-size: 1.05rem;
  font-weight: 800;
  color: #fff;
  margin-top: 2px;
  text-shadow: 0 2px 8px rgba(0,0,0,0.8);
}

.wheel-bottom-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  margin-top: 10px;
}

/* =========================================================
   FEATURE 3: BOTONERA / SOUNDBOARD MEMES
   ========================================================= */
.widget-soundboard {
  position: absolute;
  width: 330px;
  background: linear-gradient(160deg, #1e293b 0%, #0f172a 100%);
  border-radius: 16px;
  border: 2px solid #38bdf8;
  box-shadow: 0 20px 45px -8px rgba(0, 0, 0, 0.8), 0 0 20px rgba(56, 189, 248, 0.2);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  user-select: none;
}

.soundboard-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.05);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  cursor: grab;
}

.soundboard-header:active { cursor: grabbing; }

.soundboard-title {
  font-size: 0.82rem;
  font-weight: 800;
  color: #38bdf8;
  display: flex;
  align-items: center;
  gap: 6px;
}

.soundboard-vu-meter {
  display: flex;
  gap: 3px;
  align-items: flex-end;
  height: 14px;
}

.vu-bar {
  width: 4px;
  height: 6px;
  background: #38bdf8;
  border-radius: 2px;
  transition: height 0.1s ease;
}

.widget-soundboard.playing .vu-bar:nth-child(1) { animation: vuAnim 0.3s infinite alternate; }
.widget-soundboard.playing .vu-bar:nth-child(2) { animation: vuAnim 0.25s infinite alternate 0.05s; }
.widget-soundboard.playing .vu-bar:nth-child(3) { animation: vuAnim 0.35s infinite alternate 0.1s; }
.widget-soundboard.playing .vu-bar:nth-child(4) { animation: vuAnim 0.2s infinite alternate 0.15s; }

@keyframes vuAnim {
  0% { height: 4px; background: #38bdf8; }
  50% { height: 12px; background: #a855f7; }
  100% { height: 16px; background: #ec4899; }
}

.soundboard-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  padding: 14px;
}

.sb-pad-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  background: linear-gradient(180deg, rgba(30, 41, 59, 0.8) 0%, rgba(15, 23, 42, 0.95) 100%);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.1);
  transition: all 0.12s ease;
  position: relative;
  overflow: hidden;
  text-align: left;
}

.sb-pad-btn:hover {
  background: linear-gradient(180deg, rgba(56, 189, 248, 0.15) 0%, rgba(30, 41, 59, 0.9) 100%);
  border-color: rgba(56, 189, 248, 0.4);
  transform: translateY(-2px);
  box-shadow: 0 6px 14px rgba(56, 189, 248, 0.2);
}

.sb-pad-btn:active,
.sb-pad-btn.active {
  transform: translateY(2px) scale(0.98);
  box-shadow: 0 0 14px rgba(56, 189, 248, 0.6);
  border-color: #38bdf8;
}

.sb-pad-led {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #475569;
  flex-shrink: 0;
  transition: all 0.1s;
}

.sb-pad-btn.active .sb-pad-led {
  background: #38bdf8;
  box-shadow: 0 0 8px #38bdf8;
}

.sb-pad-icon { font-size: 1.15rem; flex-shrink: 0; }
.sb-pad-title {
  font-size: 0.75rem;
  font-weight: 700;
  color: #f1f5f9;
  line-height: 1.2;
}

/* =========================================================
   FEATURE 4: AMERICAN DINER RETRO RADIO JUKEBOX (ROCK-OLA)
   ========================================================= */
.widget-jukebox-80s {
  position: absolute;
  width: 430px;
  background: radial-gradient(circle at 50% 0%, #351322 0%, #1e0914 60%, #0d0408 100%);
  border-radius: 36px 36px 18px 18px;
  border: 4px solid #cbd5e1;
  box-shadow: 
    0 25px 60px rgba(0, 0, 0, 0.9),
    0 0 35px rgba(236, 72, 153, 0.4),
    inset 0 2px 4px rgba(255, 255, 255, 0.8),
    inset 0 -2px 10px rgba(0, 0, 0, 0.8);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  user-select: none;
  font-family: 'Outfit', sans-serif;
  transition: box-shadow 0.25s ease;
}

.widget-jukebox-80s:hover {
  box-shadow: 
    0 30px 70px rgba(0, 0, 0, 0.95),
    0 0 45px rgba(236, 72, 153, 0.55),
    inset 0 2px 5px rgba(255, 255, 255, 0.9);
}

/* Chrome Arched Header */
.diner-arch-header {
  position: relative;
  height: 64px;
  background: linear-gradient(180deg, #e2e8f0 0%, #94a3b8 40%, #475569 85%, #1e293b 100%);
  border-bottom: 3px solid #ff007f;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  cursor: grab;
  box-shadow: inset 0 2px 3px #ffffff, 0 4px 12px rgba(0,0,0,0.5);
}

.diner-arch-header:active { cursor: grabbing; }

/* Glowing neon sound tubes in the arch */
.diner-neon-tubes {
  position: absolute;
  top: 6px;
  left: 20px;
  right: 20px;
  height: 9px;
  border-radius: 9999px;
  background: linear-gradient(90deg, #00f0ff 0%, #ff007f 48%, #ffb703 52%, #00f0ff 100%);
  box-shadow: 0 0 14px #ff007f, 0 0 22px #00f0ff;
  animation: dinerNeonPulse 2s infinite alternate ease-in-out;
}

@keyframes dinerNeonPulse {
  0% { filter: brightness(0.9) drop-shadow(0 0 4px #ff007f); }
  50% { filter: brightness(1.25) drop-shadow(0 0 16px #00f0ff); }
  100% { filter: brightness(1.1) drop-shadow(0 0 12px #ffb703); }
}

.diner-brand-emblem {
  display: flex;
  align-items: center;
  gap: 8px;
  z-index: 2;
  margin-top: 10px;
}

.diner-brand-badge {
  background: linear-gradient(180deg, #991b1b 0%, #7f1d1d 100%);
  border: 2px solid #f8fafc;
  color: #fff;
  font-family: 'Press Start 2P', monospace;
  font-size: 0.65rem;
  letter-spacing: 0.12em;
  padding: 4px 12px;
  border-radius: 9999px;
  box-shadow: 0 0 10px rgba(255, 0, 127, 0.7), inset 0 1px 2px #fff;
  text-shadow: 0 0 6px rgba(255,255,255,0.9);
}

/* Analog Backlit Radio Tuning Dial */
.diner-tuning-glass {
  position: relative;
  margin: 10px 14px 6px 14px;
  padding: 8px 12px;
  background: linear-gradient(180deg, rgba(245, 158, 11, 0.22) 0%, rgba(180, 83, 9, 0.35) 100%);
  border: 2px solid rgba(245, 158, 11, 0.4);
  border-radius: 10px;
  box-shadow: inset 0 0 16px rgba(245, 158, 11, 0.3), 0 0 10px rgba(0,0,0,0.5);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.diner-scale-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: 'Press Start 2P', monospace;
  font-size: 0.52rem;
  color: #fef08a;
  text-shadow: 0 0 4px #eab308;
  letter-spacing: 0.05em;
}

.diner-needle-track {
  position: relative;
  height: 6px;
  background: rgba(0, 0, 0, 0.5);
  border-radius: 3px;
  margin: 2px 0;
  overflow: hidden;
}

.diner-needle-cursor {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 4px;
  background: #ef4444;
  box-shadow: 0 0 8px #ef4444, 0 0 2px #fff;
  border-radius: 2px;
  transition: left 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
  left: 35%;
}

.diner-jewels-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.65rem;
  font-weight: 800;
  text-transform: uppercase;
}

.diner-jewel {
  display: flex;
  align-items: center;
  gap: 5px;
  color: #e2e8f0;
}

.jewel-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}

.jewel-stereo {
  background: #10b981;
  box-shadow: 0 0 10px #10b981, 0 0 4px #fff;
}

.jewel-onair {
  background: #ef4444;
  box-shadow: 0 0 10px #ef4444, 0 0 4px #fff;
  animation: blinkOnAir 1.5s infinite;
}

@keyframes blinkOnAir {
  0%, 100% { opacity: 1; filter: brightness(1.2); }
  50% { opacity: 0.4; filter: brightness(0.6); }
}

/* Wallbox Selector Keypad & Knobs */
.diner-wallbox-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 14px 6px 14px;
  background: linear-gradient(180deg, #1e0915 0%, #12040c 100%);
  border-top: 1px solid rgba(255,255,255,0.08);
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.diner-knob-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.diner-metal-knob {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: conic-gradient(#cbd5e1, #64748b, #cbd5e1, #475569, #cbd5e1);
  border: 2px solid #94a3b8;
  box-shadow: 0 3px 6px rgba(0,0,0,0.6), inset 0 0 3px #fff;
  cursor: pointer;
  transition: transform 0.2s;
}

.diner-metal-knob:active { transform: rotate(45deg); }

.diner-knob-label {
  font-size: 0.55rem;
  font-weight: 800;
  color: #94a3b8;
  letter-spacing: 0.05em;
}

.diner-selector-keys {
  display: flex;
  gap: 4px;
  align-items: center;
}

.diner-key-btn {
  background: linear-gradient(180deg, #f8fafc 0%, #cbd5e1 100%);
  color: #1e293b;
  font-weight: 900;
  font-size: 0.68rem;
  border: 1px solid #64748b;
  border-radius: 4px;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 4px rgba(0,0,0,0.5), inset 0 1px 1px #fff;
  cursor: pointer;
  transition: all 0.1s ease;
}

.diner-key-btn:hover {
  background: #fef08a;
  border-color: #eab308;
  box-shadow: 0 0 8px #facc15;
}

.diner-key-btn:active, .diner-key-btn.active {
  transform: translateY(2px);
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.4);
  background: #38bdf8;
  color: #fff;
}

/* Playlist Title Strips Bar (Jukebox Song Cards) */
.diner-playlist-strips-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  overflow-x: auto;
  scrollbar-width: thin;
  background: linear-gradient(180deg, #150917 0%, #0d040f 100%);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  min-height: 48px;
}

.diner-playlist-strips-bar::-webkit-scrollbar {
  height: 5px;
}
.diner-playlist-strips-bar::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.5);
}
.diner-playlist-strips-bar::-webkit-scrollbar-thumb {
  background: #ff007f;
  border-radius: 4px;
}

.diner-strip-pill {
  flex-shrink: 0;
  background: linear-gradient(180deg, #fdf6e2 0%, #faecd0 100%);
  border: 1.5px solid #d97706;
  color: #1c1917;
  font-size: 0.72rem;
  font-weight: 800;
  padding: 6px 12px;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  transition: all 0.15s ease;
  box-shadow: 0 2px 5px rgba(0,0,0,0.5), inset 0 1px 0 #fff;
  letter-spacing: 0.02em;
}

.diner-strip-pill:hover {
  background: #fff;
  border-color: #f59e0b;
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(245, 158, 11, 0.35);
}

.diner-strip-pill.active {
  background: linear-gradient(180deg, #ff007f 0%, #be185d 100%);
  border-color: #ffb703;
  color: #fff;
  box-shadow: 0 0 14px rgba(255, 0, 127, 0.7), inset 0 1px 0 rgba(255,255,255,0.4);
}

.diner-strip-del {
  margin-left: 4px;
  font-size: 0.7rem;
  color: rgba(0,0,0,0.5);
  cursor: pointer;
  padding: 0 3px;
  border-radius: 3px;
  transition: all 0.1s;
}

.diner-strip-pill.active .diner-strip-del {
  color: rgba(255,255,255,0.7);
}

.diner-strip-del:hover {
  background: #ef4444;
  color: #fff !important;
}

.diner-btn-add-playlist {
  flex-shrink: 0;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  border: 1.5px solid #34d399;
  color: #fff;
  font-size: 0.72rem;
  font-weight: 900;
  padding: 6px 12px;
  border-radius: 6px;
  cursor: pointer;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 4px;
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.4), inset 0 1px 0 rgba(255,255,255,0.3);
  transition: all 0.15s ease;
}

.diner-btn-add-playlist:hover {
  transform: translateY(-1px);
  filter: brightness(1.15);
  box-shadow: 0 0 16px rgba(16, 185, 129, 0.7);
}

/* Chrome Player Viewport Frame */
.diner-player-frame {
  margin: 6px 14px;
  height: 380px;
  min-height: 352px;
  flex: 1;
  background: #000;
  border-radius: 12px;
  overflow: hidden;
  border: 3px solid #64748b;
  box-shadow: 
    inset 0 0 15px rgba(0,0,0,0.8),
    0 4px 12px rgba(0,0,0,0.6),
    0 0 10px rgba(255, 0, 127, 0.2);
  display: flex;
  flex-direction: column;
}

.diner-player-frame iframe {
  width: 100%;
  height: 100%;
  border: none;
  background: #121212;
}

/* Bottom Diner Speaker Grille & Station Status */
.diner-bottom-grille {
  margin: 4px 14px 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.diner-status-readout {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 10px;
  background: rgba(0, 0, 0, 0.6);
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.68rem;
  color: #94a3b8;
}

.diner-now-playing-label {
  color: #38bdf8;
  font-weight: 800;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 230px;
}

.diner-platform-badge {
  font-size: 0.65rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.4);
}

.diner-grille-slats {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 4px 0;
}

.diner-slat {
  height: 3px;
  background: linear-gradient(90deg, #475569 0%, #cbd5e1 50%, #475569 100%);
  border-radius: 2px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.5);
}

/* =========================================================
   FEATURE 1 & 6: VAULT BADGES & INVENTORY GRIDS
   ========================================================= */
.badges-tab-header, .inventory-tab-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 12px;
  margin-bottom: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  flex-wrap: wrap;
  gap: 8px;
}

.badges-header-title, .inventory-header-title {
  font-size: 0.95rem;
  font-weight: 800;
  color: #fff;
}

.badges-header-subtitle, .inventory-header-subtitle {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.vault-badges-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 12px;
  max-height: 480px;
  overflow-y: auto;
  padding-right: 4px;
}

.badge-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.6);
  border: 1.5px solid rgba(255, 255, 255, 0.1);
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}

.badge-card.unlocked {
  background: linear-gradient(145deg, rgba(30, 41, 59, 0.7) 0%, rgba(15, 23, 42, 0.9) 100%);
  border-color: rgba(245, 158, 11, 0.4);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4);
}

.badge-card.unlocked:hover {
  transform: translateY(-2px);
  border-color: #f59e0b;
  box-shadow: 0 8px 20px rgba(245, 158, 11, 0.25);
}

.badge-card.locked {
  opacity: 0.45;
  filter: grayscale(1);
}

.badge-icon-box {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.7rem;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  flex-shrink: 0;
}

.badge-info-box {
  display: flex;
  flex-direction: column;
  gap: 2px;
  overflow: hidden;
}

.badge-title-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.badge-name {
  font-size: 0.82rem;
  font-weight: 800;
  color: #fff;
}

.badge-rarity-pill {
  font-size: 0.58rem;
  font-weight: 800;
  text-transform: uppercase;
  padding: 2px 6px;
  border-radius: 9999px;
  letter-spacing: 0.05em;
}

.rarity-legendary { background: rgba(245, 158, 11, 0.25); color: #fbbf24; border: 1px solid rgba(245, 158, 11, 0.4); }
.rarity-epic { background: rgba(168, 85, 247, 0.25); color: #c084fc; border: 1px solid rgba(168, 85, 247, 0.4); }
.rarity-rare { background: rgba(6, 182, 212, 0.25); color: #22d3ee; border: 1px solid rgba(6, 182, 212, 0.4); }
.rarity-common { background: rgba(148, 163, 184, 0.2); color: #94a3b8; border: 1px solid rgba(148, 163, 184, 0.3); }

.badge-desc {
  font-size: 0.7rem;
  color: var(--text-muted);
  line-height: 1.3;
}

/* Inventory Cards */
.vault-inventory-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
  max-height: 480px;
  overflow-y: auto;
  padding-right: 4px;
}

.inventory-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 14px;
  border-radius: 14px;
  background: linear-gradient(145deg, rgba(30, 41, 59, 0.7) 0%, rgba(15, 23, 42, 0.9) 100%);
  border: 1.5px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
  transition: all 0.2s ease;
  gap: 10px;
}

.inventory-card:hover {
  transform: translateY(-3px);
  border-color: #8b5cf6;
  box-shadow: 0 10px 24px rgba(139, 92, 246, 0.25);
}

.inv-card-top {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.inv-icon-box {
  width: 50px;
  height: 50px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  flex-shrink: 0;
  box-shadow: inset 0 2px 4px rgba(255, 255, 255, 0.1);
}

.inv-card-meta {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.inv-item-name {
  font-size: 0.88rem;
  font-weight: 800;
  color: #fff;
}

.inv-item-desc {
  font-size: 0.72rem;
  color: var(--text-muted);
  line-height: 1.35;
}

.inv-gift-tag {
  background: rgba(236, 72, 153, 0.15);
  border: 1px solid rgba(236, 72, 153, 0.3);
  color: #f472b6;
  font-size: 0.65rem;
  padding: 3px 8px;
  border-radius: 6px;
  margin-top: 4px;
}

.btn-gift-item {
  width: 100%;
  padding: 8px 12px;
  background: linear-gradient(135deg, rgba(236, 72, 153, 0.2) 0%, rgba(139, 92, 246, 0.3) 100%);
  border: 1px solid rgba(236, 72, 153, 0.4);
  color: #fff;
  border-radius: 8px;
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.15s;
}

.btn-gift-item:hover {
  background: linear-gradient(135deg, rgba(236, 72, 153, 0.4) 0%, rgba(139, 92, 246, 0.5) 100%);
  border-color: #ec4899;
  box-shadow: 0 0 12px rgba(236, 72, 153, 0.3);
}




