/* =====================================================
   DICEKEEPER SPA – UNIFIED STYLESHEET
   Imports original CSS from existing pages for consistency
   ===================================================== */

/* ===== CSS VARIABLES (merged from all original pages) ===== */
:root {
  /* From Login.css */
  --green-600: #004c3685;
  --green-700: #256628;
  --green-300: #81c784;
  --white: #ffffff;
  --color-white: #ffffff;
  --color-black: #000000;

  /* From Campaign.css / Campaigns.css */
  --bg-card: #004c3685;
  --bg-container: #004c3685;
  --bg-input: #004c3670;
  --bg-input-focus: #004c36d2;
  --bg-hover-strong: #004c36dc;
  --bg-overlay-light: rgba(255, 255, 255, 0.1);
  --bg-overlay-dark: rgba(0, 0, 0, 0.25);
  --bg-overlay-dark-hover: rgba(0, 0, 0, 0.35);
  --green-primary: #4f8f7a;
  --green-primary-hover: #a1c5b9;
  --green-accent: #81c784;
  --green-accent-bg: rgba(var(--selected-rgb), 0.25);

  /* From Campaign.css */
  --accent-primary: #7708c7b8;
  --accent-focus: #38bdf8;
  --accent-glow: rgba(168, 85, 247, 0.4);
  --avatar-start: #6ee7b7;
  --avatar-end: #34d399;
  --avatar-text: #064e3b;

  /* Text */
  --text-primary: #ffffff;
  --text-secondary: rgba(255, 255, 255, 0.7);
  --text-muted: rgba(255, 255, 255, 0.6);
  --text-label: #e5e7eb;
  --text-info: #98a2b3;

  /* Borders */
  --border-soft: rgba(148, 163, 184, 0.3);
  --border-input: rgba(255, 255, 255, 0.903);
  --border-light: rgba(255, 255, 255, 0.5);
  --border-dashed: rgba(255, 255, 255, 0.826);
  --border-strong: rgba(148, 163, 184, 0.8);

  /* Overlays */
  --overlay-dark: rgba(0, 0, 0, 0.2);
  --overlay-darker: rgba(0, 0, 0, 0.25);
  --overlay-button-hover: rgba(15, 23, 42, 0.9);

  /* Shadows */
  --shadow-card: 0 24px 60px rgba(0, 0, 0, 0.65);
  --shadow-avatar: 0 4px 12px rgba(0,0,0,0.25);

  /* Blur */
  --blur-bg: blur(12px);

  /* From Spieler_Ui */
  --glass: rgba(20, 60, 45, 0.65);
  --glass-dark: rgba(0, 0, 0, 0.28);
  --glass-light: rgba(255, 255, 255, 0.06);
  --accent-green: #69f0ae;
  --accent-green-rgb: 105, 240, 174;
  --accent-green-dark: #00c853;
  --accent-purple: #ba68c8;
  --accent-purple-rgb: 186, 104, 200;
  --accent-purple-dark: #7b1fa2;
  --danger: #ff5252;
  --gold: #ffc107;
  --gold-rgb: 255, 193, 7;
  --fog-base: #0a1610;
  --fog-cloud-rgb: 100, 170, 140;
  --fog-cloud-dark-rgb: 40, 110, 80;
  --lp-footer-bg: #06170f;
  --text: #e8f5e9;

  /* GM Ui */
  --purple: #7708c7b8;
  --success: #4caf50;

  /* Profil.css */
  --green-card-bg: #004c3685;
  --green-card-bg-strong: #004c36d2;
  --green-input-bg: #004c3670;
  --green-avatar-start: #6ee7b7;
  --green-avatar-end: #34d399;
  --green-avatar-text: #064e3b;
  --green-success: #86efac;
  --status-error: #f97373;
  --danger-bg: rgba(239, 68, 68, 0.71);
  --danger-bg-hover: rgba(239, 68, 68, 0.89);
  --danger-border: rgba(239, 68, 68, 0.77);
  --danger-border-hover: rgba(239, 68, 68, 0.86);

  /* Refined visual tokens */
  --card-glow: 0 0 0 1px rgba(var(--accent-rgb),0.06), 0 8px 32px rgba(0,0,0,0.35);
  --glass-border: 1px solid rgba(255,255,255,0.07);
  --transition-smooth: 0.25s cubic-bezier(0.4, 0, 0.2, 1);

  /* Theme-aware tokens */
  --gradient-start: #0d9668;
  --gradient-end: #34d399;
  --header-bg: rgba(0, 76, 54, 0.92);
  --brand-color-1: #34d399;
  --brand-color-2: #6ee7b7;
  --brand-color-3: #a7f3d0;
  --hero-title-mid: #a7f3d0;
  --dice-result-light: #e8f5e9;
  --scrollbar-thumb: rgba(100,255,150,0.4);
  --select-option-bg: #1a4a3a;
  --glass-solid-rgb: 20, 60, 45;
  --glass-dark-rgb: 0, 60, 45;
  --lp-dark-rgb: 5, 25, 18;

  /* RGB components for rgba() usage */
  --primary-rgb: 52, 211, 153;
  --accent-rgb: 105, 240, 174;
  --success-rgb: 76, 175, 80;
  --selected-rgb: 129, 199, 132;
  --gradient-start-rgb: 13, 150, 104;
  --header-border-rgb: 105, 240, 174;
}

/* ===== ACCESSIBLE THEME (purple/blue, colorblind-friendly) ===== */
body.theme-accessible {
  --green-600: #2d1b6985;
  --green-700: #3b1880;
  --green-300: #a78bfa;

  --bg-card: #2d1b6985;
  --bg-container: #2d1b6985;
  --bg-input: #2d1b6970;
  --bg-input-focus: #2d1b69d2;
  --bg-hover-strong: #2d1b69dc;

  --green-primary: #7c6bc4;
  --green-primary-hover: #b8a9e8;
  --green-accent: #a78bfa;
  --green-accent-bg: rgba(167, 139, 250, 0.25);

  --accent-primary: #7c3aedb8;
  --accent-glow: rgba(124, 58, 237, 0.4);
  --avatar-start: #a78bfa;
  --avatar-end: #7c3aed;
  --avatar-text: #1e1145;

  --accent-green: #60a5fa;
  --accent-green-rgb: 96, 165, 250;
  --accent-green-dark: #2563eb;
  --accent-purple: #c084fc;
  --accent-purple-rgb: 192, 132, 252;
  --accent-purple-dark: #7c3aed;

  --glass: rgba(25, 15, 60, 0.65);
  --success: #60a5fa;
  --purple: #3b82f6b8;

  --green-card-bg: #2d1b6985;
  --green-card-bg-strong: #2d1b69d2;
  --green-input-bg: #2d1b6970;
  --green-avatar-start: #a78bfa;
  --green-avatar-end: #7c3aed;
  --green-avatar-text: #1e1145;
  --green-success: #93c5fd;
  --status-error: #fb923c;

  --danger: #fb923c;
  --danger-bg: rgba(251, 146, 60, 0.71);
  --danger-bg-hover: rgba(251, 146, 60, 0.89);
  --danger-border: rgba(251, 146, 60, 0.77);
  --danger-border-hover: rgba(251, 146, 60, 0.86);

  --gradient-start: #5b21b6;
  --gradient-end: #7c3aed;
  --header-bg: rgba(30, 10, 70, 0.92);
  --brand-color-1: #7c3aed;
  --brand-color-2: #a78bfa;
  --brand-color-3: #c4b5fd;
  --hero-title-mid: #c4b5fd;
  --dice-result-light: #ede9fe;
  --scrollbar-thumb: rgba(167,139,250,0.4);
  --select-option-bg: #2d1754;

  --primary-rgb: 124, 58, 237;
  --accent-rgb: 96, 165, 250;
  --success-rgb: 96, 165, 250;
  --selected-rgb: 167, 139, 250;
  --gradient-start-rgb: 91, 33, 182;
  --header-border-rgb: 167, 139, 250;
  --glass-solid-rgb: 25, 15, 60;
  --glass-dark-rgb: 20, 8, 50;
  --lp-dark-rgb: 12, 5, 30;
  --text: #ede9fe;

  --gold: #fbbf24;
  --gold-rgb: 251, 191, 36;
  --fog-base: #0d0820;
  --fog-cloud-rgb: 120, 100, 180;
  --fog-cloud-dark-rgb: 60, 40, 110;
  --lp-footer-bg: #140a28;

  --card-glow: 0 0 0 1px rgba(167,139,250,0.06), 0 8px 32px rgba(0,0,0,0.35);
  --glass-border: 1px solid rgba(167,139,250,0.07);

  background-image: url("images/Background-purple.png");
}

/* ===== RESET ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background-image: url("images/Background-green.png");
  background-size: cover;
  background-attachment: fixed;
  background-blend-mode: lighten;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.5;
}
body.has-header { padding-top: 70px; }

/* ===== APP HEADER (from common/header.css) ===== */
.app-header {
  position: fixed; top: 0; right: 0; left: 0; height: 60px; z-index: 1000;
  background: var(--header-bg); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  display: flex; justify-content: space-between; align-items: center;
  padding: 0 24px; border-bottom: 1px solid rgba(var(--header-border-rgb),0.1);
  box-shadow: 0 2px 20px rgba(0,0,0,0.25);
}
.header-left { display: flex; align-items: center; gap: 12px; }
.header-logo { font-size: 1.25rem; font-weight: 700; color: var(--green-accent); text-decoration: none; }
.header-right { display: flex; align-items: center; gap: 16px; }
.header-a11y-btn {
  background: transparent; border: 1px solid rgba(var(--accent-purple-rgb),0.2);
  color: rgba(255,255,255,0.45); font-size: 16px; cursor: pointer;
  padding: 6px 10px; border-radius: 10px; transition: all 0.2s ease;
  display: flex; align-items: center;
}
.header-a11y-btn:hover { background: rgba(var(--accent-purple-rgb),0.1); color: rgba(255,255,255,0.7); }
.header-a11y-btn.active {
  background: rgba(var(--accent-purple-rgb),0.18);
  border-color: rgba(var(--accent-purple-rgb),0.4);
  color: var(--accent-purple);
}
.header-a11y-icon { line-height: 1; }
.notification-btn {
  position: relative; background: transparent; border: none; color: white;
  font-size: 20px; cursor: pointer; padding: 8px; border-radius: 50%; transition: background 0.2s;
}
.notification-btn:hover { background: rgba(255,255,255,0.1); }
.notification-badge {
  position: absolute; top: 2px; right: 2px; background: #f44336; color: white;
  font-size: 10px; font-weight: 700; min-width: 16px; height: 16px; border-radius: 999px;
  display: flex; align-items: center; justify-content: center; padding: 0 4px;
}
.notification-badge.hidden { display: none; }
.user-profile {
  display: flex; align-items: center; gap: 10px; cursor: pointer;
  padding: 6px 12px; border-radius: 999px; transition: background 0.2s;
}
.user-profile:hover { background: rgba(255,255,255,0.1); }
.user-avatar {
  width: 36px; height: 36px; border-radius: 50%;
  background: linear-gradient(135deg, var(--avatar-start), var(--avatar-end));
  display: flex; align-items: center; justify-content: center;
  font-weight: 600; font-size: 14px; color: var(--avatar-text); overflow: hidden;
}
.user-avatar img { width: 100%; height: 100%; object-fit: cover; }
.user-name { color: white; font-size: 14px; font-weight: 500; }

/* ===== NOTIFICATION SIDEBAR (from common/header.css) ===== */
.notification-overlay {
  position: fixed; top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.5); z-index: 1000;
  opacity: 0; visibility: hidden; transition: opacity 0.3s, visibility 0.3s;
}
.notification-overlay.open { opacity: 1; visibility: visible; }
.notification-sidebar {
  position: fixed; top: 0; right: -400px; width: 380px; max-width: 100vw;
  height: 100vh; background: rgba(var(--glass-dark-rgb), 0.98); backdrop-filter: blur(12px);
  z-index: 1001; transition: right 0.3s ease; display: flex; flex-direction: column;
  box-shadow: -4px 0 20px rgba(0,0,0,0.3);
}
.notification-sidebar.open { right: 0; }
.notification-sidebar-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 20px; border-bottom: 1px solid rgba(255,255,255,0.1);
}
.notification-sidebar-title { color: white; font-size: 18px; font-weight: 600; }
.notification-close-btn {
  background: transparent; border: none; color: white; font-size: 24px;
  cursor: pointer; padding: 4px 8px; border-radius: 4px; transition: background 0.2s;
}
.notification-close-btn:hover { background: rgba(255,255,255,0.1); }
.notification-actions { padding: 12px 20px; border-bottom: 1px solid rgba(255,255,255,0.1); }
.mark-all-read-btn {
  background: transparent; border: 1px solid rgba(255,255,255,0.3); color: white;
  padding: 6px 12px; border-radius: 999px; font-size: 12px; cursor: pointer; transition: background 0.2s;
}
.mark-all-read-btn:hover { background: rgba(255,255,255,0.1); }
.notification-list { flex: 1; overflow-y: auto; padding: 12px; }
.notification-item {
  background: rgba(255,255,255,0.08); border-radius: 12px; padding: 14px;
  margin-bottom: 10px; cursor: pointer; transition: all var(--transition-smooth);
  border-left: 3px solid transparent;
}
.notification-item:hover { background: rgba(255,255,255,0.12); transform: translateX(-3px); box-shadow: 0 2px 8px rgba(0,0,0,0.15); }
.notification-item.unread { border-left-color: var(--green-accent); background: rgba(var(--selected-rgb),0.15); }
.notification-item-title { color: white; font-size: 14px; font-weight: 600; margin-bottom: 4px; }
.notification-item-message { color: rgba(255,255,255,0.7); font-size: 13px; line-height: 1.4; margin-bottom: 8px; }
.notification-item-time { color: rgba(255,255,255,0.5); font-size: 11px; }
.notification-empty { color: rgba(255,255,255,0.5); text-align: center; padding: 40px 20px; font-style: italic; }
.notification-icon { display: inline-block; width: 24px; height: 24px; border-radius: 50%; margin-right: 10px; vertical-align: middle; text-align: center; line-height: 24px; font-size: 12px; }
.notification-icon.submitted { background: rgba(33,150,243,0.3); color: #64b5f6; }
.notification-icon.approved { background: rgba(var(--success-rgb),0.3); color: var(--green-accent); }
.notification-icon.rejected { background: rgba(244,67,54,0.3); color: #ef5350; }

/* ===== LANDING PAGE ===== */
.lp {
  width: 100%;
  background: linear-gradient(180deg, transparent 0%, transparent 50%, var(--lp-footer-bg) 100%);
}

/* ===== LANDING WASH ZONE ===== */
/* This zone wraps the Features, Steps and CTA sections. A single pseudo-element
   creates a seamless linear gradient wash spanning the whole zone. It uses
   theme variables so the look is identical for the green and purple themes. */
.lp-wash-zone {
  position: relative;
  z-index: 1; /* content above the wash */
  overflow: visible;
}

.lp-wash-zone::before {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  /* place the gradient so it covers from the top of the features section
     down to the bottom of the CTA. We use top: 0; bottom: 0 to span the
     entire wrapper and let the wrapper's content define the height. */
  top: 0;
  bottom: 0;
  pointer-events: none;
  z-index: 0; /* sit behind the wrapper content */

  /* Seamless linear gradient that flows vertically. The first color stop is
     slightly offset to avoid a hard cut at the very top, and we keep very
     subtle blending so contrast is preserved. Uses theme RGB variables. */
  background: linear-gradient(180deg,
    rgba(var(--gradient-start-rgb), 0.14) 0%,
    rgba(var(--primary-rgb), 0.07) 35%,
    rgba(var(--primary-rgb), 0.06) 65%,
    rgba(0,0,0,0.0) 100%);

  mix-blend-mode: multiply; /* gentle tinting */
  transition: background 0.35s ease, opacity 0.25s ease;
}

/* Ensure feature cards remain above the wash and are readable */
.lp-feature-card, .lp-steps, .lp-cta-inner, .lp-feature-icon {
  position: relative; z-index: 1;
}

/* Fine-tune CTA contrast so the button remains clear on both themes */
.lp-cta-inner .lp-btn-primary {
  box-shadow: 0 6px 30px rgba(var(--gradient-start-rgb), 0.22);
}

/* Respect prefers-reduced-motion for washes that may animate on theme switch */
@media (prefers-reduced-motion: reduce) {
  .lp-wash-zone::before { transition: none !important; }
}

/* Add an explicit no-wash helper (if some section must not show tint) */
.no-lp-wash { z-index: 3; position: relative; }

/* ---- Navbar ---- */
.lp-nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: rgba(var(--lp-dark-rgb),0.85);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(var(--primary-rgb),0.08);
}
.lp-nav-inner {
  max-width: 1200px; margin: 0 auto;
  display: flex; justify-content: space-between; align-items: center;
  padding: 0 40px; height: 60px;
}
.lp-nav-brand {
  display: flex; align-items: center; gap: 10px;
  font-size: 18px; font-weight: 800; color: var(--brand-color-3); letter-spacing: 0.3px;
}
.lp-nav-dice { width: 28px; height: 28px; }
.lp-nav-login {
  padding: 8px 22px; border-radius: 10px; border: 1px solid rgba(var(--primary-rgb),0.35);
  background: transparent; color: var(--brand-color-2); font-weight: 600; font-size: 14px;
  cursor: pointer; transition: all 0.2s ease;
}
.lp-nav-login:hover { background: rgba(var(--primary-rgb),0.12); border-color: rgba(var(--primary-rgb),0.5); }
.lp-nav-right {
  display: flex; align-items: center; gap: 12px;
}
.lp-a11y-toggle {
  display: flex; align-items: center; gap: 6px;
  padding: 6px 14px; border-radius: 10px; border: 1px solid rgba(var(--accent-purple-rgb),0.25);
  background: transparent; color: rgba(255,255,255,0.5); font-size: 12px; font-weight: 600;
  cursor: pointer; transition: all 0.2s ease;
}
.lp-a11y-toggle:hover { background: rgba(var(--accent-purple-rgb),0.1); color: rgba(255,255,255,0.7); }
.lp-a11y-toggle.active {
  background: rgba(var(--accent-purple-rgb),0.18);
  border-color: rgba(var(--accent-purple-rgb),0.45);
  color: var(--accent-purple);
}
.lp-a11y-icon { font-size: 14px; }
.lp-a11y-label { white-space: nowrap; }

/* ---- Hero ---- */
.lp-hero {
  position: relative; min-height: 100vh;
  display: flex; flex-direction: column; justify-content: center; align-items: center;
  text-align: center; padding: 80px 40px 60px; overflow: hidden;
}
.lp-hero-bg {
  position: absolute; inset: 0; z-index: 0;
  /* Theme-aware linear gradient overlay first, then subtle radials and darken layer */
  background:
    linear-gradient(135deg, rgba(var(--gradient-start-rgb), 0.08), rgba(var(--gradient-start-rgb), 0.03) 40%, rgba(0,0,0,0) 70%),
    radial-gradient(ellipse 60% 50% at 50% 40%, rgba(var(--primary-rgb),0.08) 0%, transparent 70%),
    radial-gradient(ellipse 40% 60% at 20% 80%, rgba(119,8,199,0.05) 0%, transparent 70%),
    linear-gradient(180deg, transparent 0%, rgba(var(--lp-dark-rgb),0.6) 100%);
}
.lp-hero-content { position: relative; z-index: 1; max-width: 700px; }
.lp-hero-content h1 {
  font-size: clamp(40px, 7vw, 72px); font-weight: 800; line-height: 1.1; margin-bottom: 24px;
  background: linear-gradient(135deg, #ffffff 0%, var(--hero-title-mid) 50%, var(--gradient-end) 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.lp-hero-content p {
  font-size: clamp(16px, 2.2vw, 20px); color: rgba(255,255,255,0.6);
  line-height: 1.7; margin-bottom: 40px; max-width: 540px; margin-left: auto; margin-right: auto;
}
.lp-hero-actions { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }
.lp-hero-scroll {
  position: absolute; bottom: 32px; left: 50%; transform: translateX(-50%); z-index: 1;
  font-size: 24px; color: rgba(255,255,255,0.25);
  animation: lpScrollBounce 2s ease-in-out infinite;
}
@keyframes lpScrollBounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(8px); }
}

/* Animated hero line for landing page hero section */
.lp-hero-line {
  width: 220px; height: 6px; margin: 18px auto 22px; border-radius: 6px;
  background: linear-gradient(90deg, var(--gradient-start) 0%, var(--gradient-end) 60%, rgba(255,255,255,0.04) 100%);
  background-size: 200% 100%;
  background-position: 0 50%;
  box-shadow: 0 6px 18px rgba(var(--gradient-start-rgb),0.07) inset, 0 6px 18px rgba(var(--gradient-start-rgb),0.06);
  animation: line-gradient-run 6s linear infinite;
}

/* Generic helper so other elements can reuse the same animated-gradient behavior */
.animated-line {
  background-size: 200% 100%;
  background-position: 0 50%;
  animation: line-gradient-run 6s linear infinite;
}

@keyframes line-gradient-run {
  /* 0% shows a very short cut (invisible) then quickly becomes visible and moves continuously */
  0% {
    background-position: 0 50%;
    opacity: 0;
  }
  2% {
    background-position: 10% 50%;
    opacity: 1;
  }
  100% {
    background-position: 200% 50%;
    opacity: 1;
  }
}

/* Respect users who prefer reduced motion */
@media (prefers-reduced-motion: reduce) {
  .animated-line,
  .lp-hero-line { animation: none !important; }
}

@media (max-width: 768px) {
  .lp-hero-line { width: 140px; height: 4px; margin: 12px auto 16px; }
}

/* ---- Shared ---- */
.lp-container { max-width: 1100px; margin: 0 auto; padding: 0 40px; }
.lp-section { padding: 100px 0; }
.lp-heading {
  text-align: center; font-size: clamp(26px, 4vw, 38px); font-weight: 800;
  color: white; margin-bottom: 12px;
}
.lp-subheading {
  text-align: center; font-size: 16px; color: rgba(255,255,255,0.45);
  margin-bottom: 56px;
}

/* ---- Primary button ---- */
.lp-btn-primary {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 16px 44px; border: none; border-radius: 14px; cursor: pointer;
  background: linear-gradient(135deg, var(--gradient-start) 0%, var(--gradient-end) 100%);
  color: rgba(var(--lp-dark-rgb),1); font-weight: 700; font-size: 16px; letter-spacing: 0.3px;
  box-shadow: 0 4px 20px rgba(var(--gradient-start-rgb),0.3);
  transition: all 0.2s ease;
}
.lp-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(var(--gradient-start-rgb),0.4); filter: brightness(1.06);
}
.lp-btn-primary:active { transform: translateY(0); }

/* ---- Features ---- */
.lp-features-section, .lp-steps-section { background: rgba(var(--lp-dark-rgb),0.55); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.lp-features {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px;
}
.lp-feature-card {
  padding: 36px 28px; border-radius: 18px; text-align: center;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.06);
  transition: all 0.3s ease;
}
.lp-feature-card:hover {
  background: rgba(255,255,255,0.07);
  border-color: rgba(var(--primary-rgb),0.2);
  transform: translateY(-5px);
  box-shadow: 0 12px 32px rgba(0,0,0,0.25);
}
.lp-feature-icon { font-size: 40px; margin-bottom: 18px; display: block; }
.lp-feature-card h3 { font-size: 17px; font-weight: 700; color: var(--brand-color-3); margin-bottom: 10px; }
.lp-feature-card p { font-size: 14px; color: rgba(255,255,255,0.5); line-height: 1.65; }

/* ---- Steps ---- */
.lp-steps {
  display: flex; align-items: flex-start; justify-content: center;
}
.lp-step {
  display: flex; flex-direction: column; align-items: center; text-align: center;
  flex: 1; max-width: 200px; padding: 0 16px;
}
.lp-step-num {
  width: 52px; height: 52px; border-radius: 50%; margin-bottom: 18px;
  background: rgba(var(--primary-rgb),0.1); border: 2px solid rgba(var(--primary-rgb),0.3);
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; font-weight: 800; color: var(--brand-color-2);
  transition: all 0.2s ease;
}
.lp-step:hover .lp-step-num {
  background: rgba(var(--primary-rgb),0.18); border-color: rgba(var(--primary-rgb),0.5);
}
.lp-step strong { display: block; font-size: 15px; color: white; margin-bottom: 6px; }
.lp-step span { font-size: 13px; color: rgba(255,255,255,0.45); line-height: 1.5; }
.lp-step-line {
  flex-shrink: 0; width: 56px; height: 2px; margin-top: 26px;
  background: linear-gradient(90deg, rgba(var(--primary-rgb),0.3), rgba(var(--primary-rgb),0.05));
}

/* ---- Bottom CTA ---- */
.lp-cta-section { }
.lp-cta-inner { text-align: center; }
.lp-cta-inner h2 {
  font-size: clamp(24px, 4vw, 36px); font-weight: 800; color: white; margin-bottom: 14px;
}
.lp-cta-inner p {
  font-size: 16px; color: rgba(255,255,255,0.45); margin-bottom: 36px;
}

/* ---- Footer ---- */
.lp-footer {
  background: var(--lp-footer-bg);
  padding: 28px 0;
}
.lp-footer-inner {
  display: flex; justify-content: space-between; align-items: center;
  max-width: 1200px; margin: 0 auto; padding: 0 40px;
  font-size: 12px; color: rgba(255,255,255,0.3);
}

/* ---- Responsive ---- */
@media (max-width: 900px) {
  .lp-features { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
  .lp-nav-inner { padding: 0 20px; }
  .lp-container { padding: 0 20px; }
  .lp-hero { padding: 80px 20px 60px; }
  .lp-section { padding: 72px 0; }
  .lp-features { grid-template-columns: 1fr; max-width: 400px; margin: 0 auto; }
  .lp-steps { flex-direction: column; align-items: center; gap: 8px; }
  .lp-step { flex-direction: row; text-align: left; max-width: 100%; gap: 16px; padding: 0; }
  .lp-step-num { margin-bottom: 0; flex-shrink: 0; width: 42px; height: 42px; }
  .lp-step-line { width: 2px; height: 20px; margin-top: 0; align-self: center; }
  .lp-footer-inner { flex-direction: column; gap: 4px; text-align: center; }
  .lp-a11y-label { display: none; }
  .lp-a11y-toggle { padding: 6px 10px; }
}
@media (max-width: 480px) {
  .lp-hero-content h1 { font-size: 32px; }
}

/* ===== LOGIN PAGE (redesigned) ===== */
.login-page {
  display: flex; flex-direction: column; justify-content: center; align-items: center;
  min-height: 100vh; margin: 0; position: relative; overflow: hidden;
}
.login-ambient {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(ellipse 600px 400px at 20% 30%, rgba(var(--primary-rgb),0.07) 0%, transparent 70%),
    radial-gradient(ellipse 500px 500px at 80% 70%, rgba(139,92,246,0.05) 0%, transparent 70%),
    radial-gradient(ellipse 400px 300px at 60% 20%, rgba(var(--primary-rgb),0.04) 0%, transparent 60%);
  animation: loginAmbientDrift 12s ease-in-out infinite alternate;
}
@keyframes loginAmbientDrift {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(-20px, 15px) scale(1.05); }
}

.login-card {
  position: relative; z-index: 1; width: 400px; max-width: calc(100vw - 40px);
  background: rgba(var(--glass-solid-rgb),0.75);
  backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(var(--primary-rgb),0.12);
  border-radius: 24px; padding: 40px 36px 32px;
  box-shadow: 0 24px 80px rgba(0,0,0,0.4), 0 0 0 1px rgba(var(--primary-rgb),0.06), inset 0 1px 0 rgba(255,255,255,0.04);
}

/* Brand section */
.login-brand { text-align: center; margin-bottom: 32px; }
.login-dice { display: inline-block; width: 64px; height: 64px; margin-bottom: 12px; animation: loginDiceSpin 20s linear infinite; }
@keyframes loginDiceSpin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }
.login-dice-svg { width: 100%; height: 100%; }
.login-app-name {
  margin: 0 0 6px; font-size: 28px; font-weight: 800; letter-spacing: 0.5px;
  background: linear-gradient(135deg, var(--brand-color-1) 0%, var(--brand-color-2) 40%, var(--brand-color-3) 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.login-tagline { margin: 0; font-size: 13px; color: rgba(255,255,255,0.45); letter-spacing: 0.2px; }

/* Form section */
.login-form-section { margin-bottom: 28px; }
.login-label {
  display: block; font-size: 12px; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.6px; color: rgba(255,255,255,0.5); margin-bottom: 8px;
}
.login-input-wrap {
  display: flex; align-items: center; gap: 10px;
  background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.1);
  border-radius: 14px; padding: 0 14px; margin-bottom: 16px;
  transition: all 0.2s ease;
}
.login-input-wrap:focus-within {
  border-color: rgba(var(--primary-rgb),0.4);
  background: rgba(255,255,255,0.09);
  box-shadow: 0 0 0 3px rgba(var(--primary-rgb),0.1);
}
.login-input-icon { font-size: 16px; color: rgba(255,255,255,0.3); flex-shrink: 0; }
.login-input {
  flex: 1; height: 48px; background: transparent !important; border: none !important; outline: none;
  color: white; font-size: 15px; font-weight: 500;
  border-radius: 0 !important; padding: 0 !important; box-shadow: none !important;
}
.login-input::placeholder { color: rgba(255,255,255,0.25); font-weight: 400; }
.login-input:focus { box-shadow: none !important; }

.login-submit {
  width: 100%; height: 50px; border: none; border-radius: 14px; cursor: pointer;
  background: linear-gradient(135deg, var(--gradient-start) 0%, var(--gradient-end) 100%);
  color: rgba(var(--lp-dark-rgb),1); font-weight: 700; font-size: 15px; letter-spacing: 0.3px;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  transition: all 0.2s ease; box-shadow: 0 4px 16px rgba(var(--gradient-start-rgb),0.25);
}
.login-submit:hover { transform: translateY(-2px); box-shadow: 0 8px 28px rgba(var(--gradient-start-rgb),0.35); filter: brightness(1.05); }
.login-submit:active { transform: translateY(0); box-shadow: 0 2px 8px rgba(var(--gradient-start-rgb),0.2); }
.login-submit:disabled { opacity: 0.6; cursor: not-allowed; transform: none; box-shadow: none; }
.login-submit-arrow { font-size: 18px; transition: transform 0.2s ease; }
.login-submit:hover .login-submit-arrow { transform: translateX(3px); }
.login-spinner {
  display: inline-block; width: 16px; height: 16px;
  border: 2px solid rgba(var(--glass-solid-rgb),0.3); border-top-color: rgba(var(--lp-dark-rgb),1);
  border-radius: 50%; animation: spin 0.6s linear infinite;
}

/* Status message */
.login-status { min-height: 20px; margin-top: 12px; font-size: 13px; text-align: center; color: rgba(255,255,255,0.4); transition: color 0.2s; }
.login-status.error { color: #f87171; }
.login-status.info { color: rgba(var(--primary-rgb),0.8); }


/* Footer */
.login-footer {
  position: relative; z-index: 1;
  margin-top: 24px; font-size: 11px; color: rgba(255,255,255,0.2); letter-spacing: 0.3px;
}

@media (max-width: 480px) {
  .login-card { padding: 28px 22px 24px; border-radius: 20px; }
  .login-app-name { font-size: 24px; }
  .login-features { gap: 6px; }
  .login-feature { font-size: 10px; padding: 3px 8px; }
}

/* ===== CAMPAIGNS PAGE (from Campaigns.css) ===== */
.campaigns-page { display: flex; justify-content: center; align-items: flex-start; min-height: calc(100vh - 70px); }
.campaigns-page .container {
  width: 720px; padding: 30px; border-radius: 14px; background: var(--bg-container);
  backdrop-filter: var(--blur-bg); color: var(--text-primary); max-height: 90vh; overflow-y: auto;
  margin-top: 20px;
}
.campaigns-page h1 { text-align: center; margin-bottom: 25px; color: white; }
.top-bar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.add-btn {
  width: 46px; height: 46px; border-radius: 50%; border: none;
  background-color: var(--green-primary); color: var(--text-primary);
  font-size: 26px; cursor: pointer; transition: background-color 0.2s;
}
.add-btn:hover { background-color: var(--green-primary-hover); }
.logout-btn {
  background: transparent; color: var(--text-primary); border: 1px solid var(--border-light);
  padding: 8px 16px; border-radius: 8px; cursor: pointer; font-size: 14px; transition: background-color 0.2s;
}
.logout-btn:hover { background-color: var(--bg-overlay-light); }
.campaign {
  background-color: var(--bg-overlay-dark); padding: 16px 20px; border-radius: 14px;
  margin-bottom: 12px; font-weight: bold; transition: all var(--transition-smooth);
  cursor: pointer; display: flex; justify-content: space-between; align-items: center;
  border: 1px solid rgba(255,255,255,0.04);
}
.campaign:hover { background-color: var(--bg-overlay-dark-hover); transform: translateY(-2px); box-shadow: 0 6px 20px rgba(0,0,0,0.25); border-color: rgba(var(--accent-rgb),0.1); }
.campaign-info { flex: 1; }
.campaign-title { font-weight: 700; margin-bottom: 4px; }
.campaign-meta { color: var(--text-secondary); font-size: 0.85rem; font-weight: normal; }
.campaign-actions { display: flex; align-items: center; gap: 8px; margin-left: 12px; flex-shrink: 0; }
.campaign-delete-btn {
  border: 1px solid var(--danger-border);
  background: rgba(239, 68, 68, 0.14);
  color: rgba(255,255,255,0.86);
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: background var(--transition-smooth), border-color var(--transition-smooth), transform var(--transition-smooth);
}
.campaign-delete-btn:hover { background: var(--danger-bg); border-color: var(--danger-border-hover); transform: translateY(-1px); }
.campaign-delete-btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }
.badge { font-size: 0.75rem; padding: 4px 10px; border-radius: 999px; background: var(--green-accent-bg); color: var(--green-accent); margin-left: 12px; font-weight: 600; }
.campaign-actions .badge { margin-left: 0; }
.divider { display: flex; align-items: center; margin: 30px 0 20px; }
.divider::before, .divider::after { content: ''; flex: 1; height: 1px; background-color: var(--border-light); }
.divider span { margin: 0 12px; font-size: 14px; opacity: 0.85; color: white; }
.empty { color: var(--text-muted); text-align: center; padding: 20px; font-style: italic; }

/* ===== CAMPAIGN CREATE PAGE (from Campaign.css) ===== */
.campaign-create-page {
  display: flex; justify-content: center; align-items: center; min-height: calc(100vh - 70px); padding: 20px;
}
.card {
  background: var(--bg-card); border-radius: 22px; padding: 24px 28px 20px;
  max-width: 720px; width: 100%; box-shadow: 0 20px 50px rgba(0,0,0,0.5), 0 0 0 1px rgba(var(--accent-rgb),0.06);
  border: 1px solid rgba(255,255,255,0.06); color: var(--text-primary);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
}
.card-header { margin-bottom: 20px; }
.card-title { font-size: 24px; font-weight: 600; letter-spacing: 0.04em; display: flex; align-items: center; gap: 10px; }
.card-subtitle { font-size: 14px; opacity: 0.7; }
.form-row { display: flex; gap: 16px; margin-bottom: 16px; }
.form-group { display: flex; flex-direction: column; gap: 4px; margin-bottom: 16px; flex: 1; }
label, .label { font-size: 13px; color: var(--text-label); letter-spacing: 0.06em; text-transform: uppercase; }
input[type="text"], input[type="number"], input[type="email"], textarea, select {
  background: var(--bg-input); border-radius: 999px; border: 1px solid var(--border-input);
  padding: 8px 14px; color: var(--text-primary); font-size: 14px; outline: none;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}
textarea { border-radius: 18px; min-height: 80px; resize: vertical; }
textarea.story { min-height: 200px; }
select {
  cursor: pointer; appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='white' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10l-5 5z'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; padding-right: 36px;
}
select option { background: var(--select-option-bg); color: white; }
input:focus, textarea:focus, select:focus { border-color: var(--accent-focus); box-shadow: 0 0 0 1px rgba(56,189,248,0.6); background: var(--bg-input-focus); }
input::placeholder, textarea::placeholder { color: var(--text-secondary); }
.char-info { text-align: right; font-size: 11px; color: var(--text-label); }
.image-upload, .map-upload {
  border-radius: 20px; border: 1px dashed var(--border-dashed); padding: 18px;
  display: flex; align-items: center; gap: 12px; cursor: pointer; margin-bottom: 18px;
  background: var(--bg-input); transition: background 0.2s, border-color 0.2s;
}
.image-upload:hover, .map-upload:hover { background: var(--bg-hover-strong); border-color: var(--accent-focus); }
.image-upload-icon, .map-upload-icon {
  width: 32px; height: 32px; border-radius: 999px; border: 1px solid var(--border-strong);
  display: flex; align-items: center; justify-content: center; font-size: 18px; color: var(--text-label);
}
.image-upload-text-main { font-size: 13px; color: var(--text-primary); }
.image-upload-text-sub, .map-upload-text { font-size: 11px; color: #9ca3af; }
.story-group textarea { min-height: 200px; }
.footer { display: flex; justify-content: space-between; align-items: center; margin-top: 18px; flex-wrap: wrap; gap: 12px; }
.switch-wrapper { display: flex; align-items: center; gap: 10px; font-size: 13px; font-weight: bold; color: var(--text-primary); }
.switch-label, .switch-label-text { letter-spacing: 0.12em; text-transform: uppercase; font-size: 11px; color: var(--text-primary); }
.switch {
  position: relative; width: 158px; height: 34px; background: var(--bg-input);
  border-radius: 999px; border: 1px solid var(--border-strong);
  display: flex; align-items: center; padding: 3px; cursor: pointer; user-select: none;
}
.switch-option { flex: 1; text-align: center; font-size: 11px; z-index: 2; color: var(--text-primary); text-transform: uppercase; letter-spacing: 0.06em; }
.switch-thumb { position: absolute; top: 3px; bottom: 3px; width: 50%; border-radius: 999px; background: var(--accent-primary); transition: transform 0.2s; z-index: 1; }
.switch.public .switch-thumb { transform: translateX(0%); }
.switch.private .switch-thumb { transform: translateX(93%); }
.button-row { display: flex; gap: 10px; }
.btn { border-radius: 999px; padding: 8px 18px; font-size: 13px; border: 1px solid transparent; background: transparent; color: var(--text-primary); cursor: pointer; transition: all var(--transition-smooth); }
.btn-secondary { border-color: var(--border-input); }
.btn-secondary:hover { background: var(--overlay-button-hover); transform: translateY(-1px); }
.btn-primary { background: var(--accent-primary); font-weight: 600; box-shadow: 0 0 20px var(--accent-glow); }
.btn-primary:hover:not(:disabled) { filter: brightness(1.1); transform: translateY(-1px); box-shadow: 0 4px 24px var(--accent-glow); }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; filter: grayscale(0.35); box-shadow: none; }
.btn-danger { background: var(--danger-bg); border-color: var(--danger-border); font-weight: 600; }
.btn-danger:hover { background: var(--danger-bg-hover); border-color: var(--danger-border-hover); }
.btn-success { background: rgba(var(--success-rgb),0.8); font-weight: 600; }
.btn-success:hover { background: rgba(var(--success-rgb),1); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

.dk-confirm-overlay {
  position: fixed; inset: 0; z-index: 2000;
  display: flex; align-items: center; justify-content: center; padding: 20px;
  background: rgba(0,0,0,0.55); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
.dk-confirm-dialog {
  width: 360px; max-width: 100%;
  background: rgba(var(--glass-solid-rgb),0.96);
  border: 1px solid rgba(var(--primary-rgb),0.16);
  border-radius: 18px; padding: 22px;
  box-shadow: 0 24px 80px rgba(0,0,0,0.45), 0 0 0 1px rgba(var(--primary-rgb),0.06);
  color: var(--text-primary);
}
.dk-confirm-title {
  font-size: 18px; font-weight: 700; margin-bottom: 8px;
}
.dk-confirm-copy {
  color: var(--text-secondary); font-size: 14px; line-height: 1.5; margin-bottom: 18px;
}
.dk-confirm-actions {
  display: flex; justify-content: flex-end; gap: 10px;
}

/* ===== CAMPAIGN DETAIL PAGE (from CampaignDetail.css) ===== */
.campaign-detail-page {
  display: flex; justify-content: center; align-items: center;
  min-height: calc(100vh - 70px); padding: 20px;
}
.campaign-detail-page .card { margin: 0.3vw; }
.preview { background: rgba(0,0,0,0.25); border-radius: 18px; padding: 20px; }
.preview-title { font-size: 22px; font-weight: 600; margin-bottom: 6px; }
.preview-desc { font-size: 14px; opacity: 0.9; line-height: 1.5; }
.preview-divider { height: 1px; background: rgba(255,255,255,0.4); margin: 16px 0; }
.preview-info { display: flex; gap: 20px; margin-bottom: 12px; font-size: 13px; opacity: 0.85; }
.preview-info-item { display: flex; align-items: center; gap: 6px; }
.preview-info-item strong { opacity: 0.7; }
.players-section { margin-top: 20px; }
.players-title { font-size: 13px; text-transform: uppercase; opacity: 0.8; margin-bottom: 10px; font-weight: 600; }
.players { display: flex; flex-direction: column; gap: 8px; }
.players-horizontal { display: flex; gap: 12px; flex-wrap: wrap; }
.player { display: flex; align-items: center; justify-content: space-between; background: rgba(255,255,255,0.15); padding: 8px 12px; border-radius: 999px; }
.player-compact { display: flex; align-items: center; gap: 8px; background: rgba(255,255,255,0.15); padding: 6px 10px; border-radius: 999px; font-size: 13px; }
.player-left { display: flex; align-items: center; gap: 10px; }
.player-avatar { width: 28px; height: 28px; border-radius: 50%; background: linear-gradient(135deg, var(--avatar-start), var(--avatar-end)); display: flex; align-items: center; justify-content: center; font-weight: 600; font-size: 11px; color: var(--avatar-text); flex-shrink: 0; }
.player-name { font-size: 14px; }
.player-role { font-size: 10px; padding: 3px 8px; border-radius: 999px; text-transform: uppercase; font-weight: 600; letter-spacing: 0.5px; }
.role-dm { background: rgba(255,193,7,0.3); color: #ffc107; }
.role-player { background: rgba(33,150,243,0.3); color: #64b5f6; }
.kick-btn { background: transparent; border: 1px solid rgba(255,255,255,0.6); color: white; font-size: 11px; padding: 4px 10px; border-radius: 999px; cursor: pointer; transition: background 0.2s; }
.kick-btn:hover { background: rgba(255,0,0,0.25); }
.player.clickable { cursor: pointer; transition: background 0.2s, transform 0.2s; }
.player.clickable:hover { background: rgba(255,255,255,0.2); transform: translateX(4px); }
.character-status { padding: 3px 10px; border-radius: 999px; font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; }
.status-pending { background: rgba(255,193,7,0.25); color: #ffc107; animation: pulse 2s infinite; }
.status-approved { background: rgba(var(--success-rgb),0.25); color: var(--green-accent); }
.status-rejected { background: rgba(244,67,54,0.25); color: #ef5350; }
.status-none { background: rgba(158,158,158,0.25); color: #9e9e9e; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.6; } }
.badge-public { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 11px; background: var(--green-accent-bg); color: var(--green-accent); font-weight: 600; }
.your-role { display: inline-flex; align-items: center; gap: 6px; margin-top: 8px; font-size: 12px; opacity: 0.9; }
.empty-players { color: rgba(255,255,255,0.6); font-style: italic; padding: 8px; }
.map-section { background: var(--overlay-dark); border-radius: 12px; padding: 12px; }

/* ===== STATUS / LOADING ===== */
.status { padding: 12px; border-radius: 12px; margin-bottom: 16px; display: none; font-size: 14px; }
.status.show { display: block; }
.status.error { background: rgba(244,67,54,0.2); color: #f97373; }
.status.success { background: rgba(var(--success-rgb),0.2); color: var(--green-accent); }
.status-message { padding: 12px 16px; border-radius: 12px; margin-bottom: 16px; font-size: 14px; display: none; }
.status-message.show { display: block; }
.status-message.error { background: rgba(244,67,54,0.2); border: 1px solid rgba(244,67,54,0.5); color: #ef5350; }
.status-message.success { background: rgba(var(--success-rgb),0.2); border: 1px solid rgba(var(--success-rgb),0.5); color: var(--green-accent); }
.status-message.info { background: rgba(33,150,243,0.2); border: 1px solid rgba(33,150,243,0.5); color: #64b5f6; }
.loading { text-align: center; padding: 40px; color: var(--text-muted); }
.loading-screen { display: flex; align-items: center; justify-content: center; min-height: calc(100vh - 100px); font-size: 16px; color: var(--text-muted); }
.loading-spinner { display: inline-block; width: 24px; height: 24px; border: 3px solid rgba(255,255,255,0.15); border-top-color: var(--accent-green); border-radius: 50%; animation: spin 0.8s linear infinite; margin-right: 10px; }
@keyframes spin { to { transform: rotate(360deg); } }
.back-link { display: inline-flex; align-items: center; gap: 6px; color: rgba(255,255,255,0.7); text-decoration: none; font-size: 14px; margin-bottom: 16px; transition: color 0.2s; }
.back-link:hover { color: white; }

/* ===== CHARACTER SELECT (from CharacterSelect.css) ===== */
.character-select-page .container { max-width: 600px; margin: 0 auto; padding: 20px; }
.character-select-page .card { background: var(--green-600); border-radius: 24px; padding: 26px; color: white; backdrop-filter: var(--blur-bg); }
.campaign-info-box { background: rgba(0,0,0,0.2); padding: 14px; border-radius: 12px; margin-bottom: 24px; text-align: center; }
.campaign-info-box .campaign-name { font-size: 18px; font-weight: 600; margin-bottom: 4px; }
.campaign-info-box .campaign-dm { font-size: 13px; opacity: 0.7; }
.section-title { font-size: 13px; text-transform: uppercase; opacity: 0.7; margin-bottom: 12px; letter-spacing: 0.5px; font-weight: 600; }
.character-list { display: flex; flex-direction: column; gap: 10px; margin-bottom: 24px; }
.character-item { background: rgba(0,0,0,0.2); padding: 14px 16px; border-radius: 12px; cursor: pointer; transition: all var(--transition-smooth); border: 2px solid transparent; }
.character-item:hover { background: rgba(0,0,0,0.3); transform: translateX(4px); box-shadow: 0 4px 12px rgba(0,0,0,0.15); }
.character-item.selected { border-color: var(--green-accent); background: rgba(var(--selected-rgb),0.15); }
.character-item-name { font-size: 16px; font-weight: 600; margin-bottom: 4px; }
.character-item-meta { font-size: 13px; opacity: 0.7; }
.create-new-btn { width: 100%; padding: 14px; background: transparent; border: 2px dashed rgba(255,255,255,0.4); border-radius: 12px; color: white; font-size: 14px; cursor: pointer; margin-bottom: 24px; transition: background 0.2s; }
.create-new-btn:hover { background: rgba(255,255,255,0.05); border-color: rgba(255,255,255,0.6); }
.actions { display: flex; gap: 12px; }
.empty-message { text-align: center; padding: 20px; opacity: 0.7; font-style: italic; }

/* ===== CHARACTER CREATE (from CharacterCreate.html inline) ===== */
.character-create-page .container { max-width: 800px; margin: 0 auto; padding: 20px; }
.character-create-page .card { background: var(--green-600); border-radius: 24px; padding: 26px; color: white; backdrop-filter: var(--blur-bg); margin-bottom: 20px; }
.steps { display: flex; justify-content: center; gap: 8px; margin-bottom: 24px; }
.step { width: 12px; height: 12px; border-radius: 50%; background: rgba(255,255,255,0.3); transition: background 0.3s, transform 0.3s; }
.step.active { background: var(--green-accent); transform: scale(1.2); }
.step.completed { background: var(--success); }
.step-content { display: none; }
.step-content.active { display: block; }
.selection-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; }
.selection-card { background: rgba(0,0,0,0.25); border: 2px solid transparent; border-radius: 16px; padding: 16px; text-align: center; cursor: pointer; transition: all 0.2s; }
.selection-card:hover { background: rgba(0,0,0,0.35); transform: translateY(-2px); }
.selection-card.selected { border-color: var(--green-accent); background: rgba(var(--selected-rgb),0.15); }
.selection-card-icon { width: 48px; height: 48px; margin: 0 auto 10px; border-radius: 50%; background: linear-gradient(135deg, var(--avatar-start), var(--avatar-end)); display: flex; align-items: center; justify-content: center; font-size: 24px; }
.selection-card-name { font-size: 14px; font-weight: 600; margin-bottom: 4px; }
.selection-card-desc { font-size: 11px; opacity: 0.7; line-height: 1.3; }
.ability-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
@media (max-width: 600px) { .ability-grid { grid-template-columns: repeat(2, 1fr); } }
.ability-box { background: rgba(0,0,0,0.25); border-radius: 16px; padding: 16px; text-align: center; }
.ability-label { font-size: 11px; text-transform: uppercase; opacity: 0.7; margin-bottom: 8px; letter-spacing: 0.5px; }
.ability-controls { display: flex; align-items: center; justify-content: center; gap: 8px; }
.ability-btn { width: 32px; height: 32px; border-radius: 50%; border: 1px solid rgba(255,255,255,0.5); background: transparent; color: white; font-size: 18px; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.ability-btn:hover:not(:disabled) { background: rgba(255,255,255,0.1); border-color: white; }
.ability-btn:disabled { opacity: 0.3; cursor: not-allowed; }
.ability-value { font-size: 24px; font-weight: 700; min-width: 40px; }
.ability-modifier { font-size: 12px; opacity: 0.7; margin-top: 4px; }
.points-remaining { text-align: center; padding: 12px; background: rgba(0,0,0,0.2); border-radius: 12px; margin-bottom: 16px; }
.points-remaining-value { font-size: 24px; font-weight: 700; color: var(--green-accent); }
.points-remaining-label { font-size: 12px; opacity: 0.7; }
.nav-buttons { display: flex; gap: 12px; margin-top: 24px; }
.nav-buttons .btn { flex: 1; padding: 14px 24px; font-weight: 600; }
.nav-buttons .btn-primary { background: linear-gradient(135deg, #7c3aed, #5b21b6); color: white; }
.nav-buttons .btn-success { background: linear-gradient(135deg, var(--success), var(--accent-green-dark)); color: white; }
.character-preview { background: rgba(0,0,0,0.2); border-radius: 16px; padding: 20px; margin-bottom: 20px; }
.preview-header { display: flex; align-items: center; gap: 16px; margin-bottom: 16px; }
.preview-avatar { width: 64px; height: 64px; border-radius: 50%; background: linear-gradient(135deg, var(--avatar-start), var(--avatar-end)); display: flex; align-items: center; justify-content: center; font-size: 28px; font-weight: 700; color: var(--avatar-text); }
.preview-stats { display: grid; grid-template-columns: repeat(6,1fr); gap: 8px; }
@media (max-width: 600px) { .preview-stats { grid-template-columns: repeat(3, 1fr); } }
.preview-stat { text-align: center; padding: 8px; background: rgba(0,0,0,0.2); border-radius: 8px; }
.preview-stat-label { font-size: 10px; text-transform: uppercase; opacity: 0.6; }
.preview-stat-value { font-size: 18px; font-weight: 700; }
.preview-meta { font-size: 13px; opacity: 0.7; }
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(100px, 1fr)); gap: 12px; }
.stat-box { background: rgba(0,0,0,0.2); padding: 14px; border-radius: 12px; text-align: center; }
.stat-label { font-size: 11px; text-transform: uppercase; opacity: 0.7; margin-bottom: 4px; }
.stat-value { font-size: 24px; font-weight: 700; }
.stat-modifier { font-size: 12px; opacity: 0.7; }

/* ===== PROFILE PAGE (from Profil.css) ===== */
.profile-page { display: flex; justify-content: center; align-items: center; min-height: calc(100vh - 70px); padding: 20px; }
.profile-page .card { max-width: 480px; border-radius: 24px; padding: 32px 36px; box-shadow: var(--shadow-card); }
.profile-page .form-group { margin-bottom: 20px; }
.profile-page input[type="text"] { background: var(--green-input-bg); border-radius: 999px; padding: 12px 18px; font-size: 15px; }
.profile-page .btn-primary { width: 100%; margin-bottom: 12px; background: var(--accent-primary); font-weight: 600; box-shadow: 0 0 20px var(--accent-glow); }
.profile-page .btn-secondary { width: 100%; margin-bottom: 12px; border-color: rgba(255,255,255,0.3); }
.profile-page .btn-danger { width: 100%; background: var(--danger-bg); border-color: var(--danger-border); }
.profile-page .btn-danger:hover { background: var(--danger-bg-hover); }
.profile-page .divider::before, .profile-page .divider::after { background: rgba(255,255,255,0.3); }
.profile-page .divider span { font-size: 12px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.1em; }
.profile-danger-copy {
  margin: -4px 0 12px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(239, 68, 68, 0.28);
  background: rgba(239, 68, 68, 0.1);
  color: rgba(255,255,255,0.78);
  font-size: 13px;
  line-height: 1.5;
}

/* Theme toggle switch */
.theme-toggle-btn {
  position: relative; width: 52px; height: 28px; border-radius: 999px; border: none;
  background: rgba(255,255,255,0.12); cursor: pointer; padding: 0; flex-shrink: 0;
  transition: background 0.25s ease;
}
.theme-toggle-btn.active { background: var(--accent-primary); }
.theme-toggle-knob {
  position: absolute; top: 3px; left: 3px; width: 22px; height: 22px;
  border-radius: 50%; background: white;
  transition: transform 0.25s ease;
  box-shadow: 0 1px 4px rgba(0,0,0,0.3);
}
.theme-toggle-btn.active .theme-toggle-knob { transform: translateX(24px); }

/* ===== COCKPIT PAGE (redesigned) ===== */
.cockpit-page { padding: 20px 20px 40px; }
.cockpit-layout { max-width: 960px; margin: 0 auto; }
.ck-loading { text-align: center; padding: 60px; color: var(--text-muted); display: flex; align-items: center; justify-content: center; gap: 12px; font-size: 15px; }

/* Hero section */
.ck-hero {
  position: relative; border-radius: 20px; overflow: hidden; margin-bottom: 20px;
  background: linear-gradient(135deg, rgba(var(--primary-rgb),0.35), rgba(var(--primary-rgb),0.3));
  border: var(--glass-border); box-shadow: var(--card-glow);
}
.ck-hero-bg {
  position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(var(--gradient-start-rgb),0.08), rgba(var(--accent-purple-rgb),0.06));
  pointer-events: none;
}
.ck-hero-content { position: relative; padding: 28px 32px 24px; }
.ck-hero-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.ck-back-btn {
  background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.12);
  color: rgba(255,255,255,0.8); padding: 7px 16px; border-radius: 10px;
  font-size: 13px; font-weight: 600; cursor: pointer; transition: all var(--transition-smooth);
}
.ck-back-btn:hover { background: rgba(255,255,255,0.14); color: white; }
.ck-hero-badges { display: flex; gap: 8px; }
.ck-badge {
  font-size: 11px; font-weight: 700; padding: 4px 12px; border-radius: 999px;
  text-transform: uppercase; letter-spacing: 0.5px;
}
.ck-badge-role { background: rgba(var(--accent-purple-rgb),0.18); color: var(--accent-purple); border: 1px solid rgba(var(--accent-purple-rgb),0.2); }
.ck-badge-public { background: rgba(var(--primary-rgb),0.12); color: var(--gradient-end); border: 1px solid rgba(var(--primary-rgb),0.15); }
.ck-badge-private { background: rgba(255,193,7,0.12); color: var(--gold); border: 1px solid rgba(255,193,7,0.15); }

.ck-title { font-size: 28px; font-weight: 800; color: white; margin-bottom: 6px; letter-spacing: -0.02em; line-height: 1.2; }
.ck-desc { font-size: 14px; color: rgba(255,255,255,0.6); line-height: 1.5; max-width: 600px; margin-bottom: 20px; }

.ck-stats-row { display: flex; gap: 12px; margin-bottom: 20px; }
.ck-stat {
  background: rgba(0,0,0,0.2); border-radius: 14px; padding: 12px 20px;
  display: flex; flex-direction: column; align-items: center; min-width: 80px;
  border: 1px solid rgba(255,255,255,0.05);
}
.ck-stat-value { font-size: 22px; font-weight: 800; color: white; }
.ck-stat-label { font-size: 10px; text-transform: uppercase; letter-spacing: 0.8px; color: rgba(255,255,255,0.45); margin-top: 2px; }

.ck-hero-actions { display: flex; gap: 10px; }
.ck-btn {
  padding: 10px 20px; border-radius: 12px; border: none; font-size: 13px; font-weight: 700;
  cursor: pointer; display: inline-flex; align-items: center; gap: 6px;
  transition: all var(--transition-smooth);
}
.ck-btn-edit {
  background: rgba(255,255,255,0.08); color: rgba(255,255,255,0.8);
  border: 1px solid rgba(255,255,255,0.12);
}
.ck-btn-edit:hover { background: rgba(255,255,255,0.14); color: white; }
.ck-btn-start {
  background: linear-gradient(135deg, var(--accent-purple-dark), var(--accent-purple));
  color: white; box-shadow: 0 4px 16px rgba(123,31,162,0.3);
}
.ck-btn-start:hover:not(:disabled) { transform: translateY(-1px); box-shadow: 0 6px 24px rgba(123,31,162,0.4); }
.ck-btn-start:disabled { opacity: 0.4; cursor: not-allowed; }
.ck-btn-icon { font-size: 15px; }

/* Grid cards */
.ck-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 768px) { .ck-grid { grid-template-columns: 1fr; } }

.ck-card {
  background: var(--glass); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border-radius: 18px; padding: 20px 22px;
  border: var(--glass-border); box-shadow: var(--card-glow);
}
.ck-card-header { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.ck-card-header h3 { font-size: 15px; font-weight: 700; color: white; margin: 0; display: flex; align-items: center; gap: 8px; }
.ck-card-icon { font-size: 20px; }
.ck-player-count {
  font-size: 11px; background: rgba(255,255,255,0.1); padding: 2px 8px;
  border-radius: 999px; color: var(--text-muted); font-weight: 600;
}

.ck-story-content {
  font-size: 13.5px; line-height: 1.7; color: rgba(255,255,255,0.7);
  white-space: pre-wrap; word-break: break-word;
  background: rgba(0,0,0,0.15); border-radius: 12px; padding: 14px 16px;
  max-height: 300px; overflow-y: auto;
}

.ck-warning {
  background: rgba(255,193,7,0.1); border: 1px solid rgba(255,193,7,0.15);
  border-radius: 12px; padding: 10px 14px; font-size: 12.5px; color: #ffd54f;
  margin-bottom: 14px;
}
.ck-empty { text-align: center; padding: 24px; color: var(--text-muted); font-size: 13px; font-style: italic; }

/* Player list */
.ck-player-list { display: flex; flex-direction: column; gap: 6px; }
.ck-player-item {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px; border-radius: 12px;
  background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.04);
  transition: all var(--transition-smooth);
}
.ck-player-item.clickable { cursor: pointer; }
.ck-player-item.clickable:hover { background: rgba(255,255,255,0.08); border-color: rgba(255,255,255,0.08); transform: translateX(3px); }
.ck-player-item:hover .ck-kick-btn { opacity: 1; }

.ck-player-avatar {
  width: 38px; height: 38px; border-radius: 50%;
  background: linear-gradient(135deg, var(--avatar-start), var(--avatar-end));
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 13px; color: var(--avatar-text); flex-shrink: 0;
}
.ck-player-avatar.dm { background: linear-gradient(135deg, var(--accent-purple), var(--accent-purple-dark)); color: white; font-size: 16px; }
.ck-player-info { flex: 1; min-width: 0; }
.ck-player-name { font-size: 14px; font-weight: 600; color: white; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ck-player-role-line { display: flex; align-items: center; gap: 8px; margin-top: 2px; }
.ck-role-tag {
  font-size: 9px; font-weight: 700; text-transform: uppercase; padding: 2px 7px;
  border-radius: 999px; letter-spacing: 0.3px;
}
.ck-role-tag.dm { background: rgba(var(--accent-purple-rgb),0.15); color: var(--accent-purple); }
.ck-role-tag.player { background: rgba(var(--primary-rgb),0.12); color: var(--gradient-end); }
.ck-char-status { font-size: 11px; font-weight: 600; }
.ck-status-pending { color: var(--gold); }
.ck-status-approved { color: var(--gradient-end); }
.ck-status-rejected { color: var(--danger); }
.ck-status-none { color: var(--text-muted); }

.ck-kick-btn {
  opacity: 0; width: 28px; height: 28px; border-radius: 50%; border: 1px solid rgba(255,82,82,0.3);
  background: transparent; color: #ff8a80; font-size: 12px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all var(--transition-smooth); flex-shrink: 0;
}
.ck-kick-btn:hover { background: rgba(255,82,82,0.15); border-color: rgba(255,82,82,0.5); color: var(--danger); }

/* Cockpit Map Card */
.ck-map-card { grid-column: 1 / -1; }
.ck-map-card .ck-card-header { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.ck-map-card .ck-card-header h3 { flex: 1; }
.ck-map-tools { display: flex; gap: 4px; }
.ck-map-btn {
  padding: 5px 10px; border-radius: 8px; font-size: 12px;
  background: rgba(255,255,255,0.06); color: rgba(255,255,255,0.7);
  border: 1px solid rgba(255,255,255,0.08); cursor: pointer;
  transition: all var(--transition-smooth);
}
.ck-map-btn:hover { background: rgba(255,255,255,0.12); color: white; }
.ck-map-btn.ck-map-add {
  background: rgba(var(--primary-rgb),0.1); color: var(--gradient-end); border-color: rgba(var(--primary-rgb),0.2);
}
.ck-map-btn.ck-map-add:hover { background: rgba(var(--primary-rgb),0.2); }
.ck-map-box { min-height: 320px; border-radius: 14px; overflow: hidden; background: rgba(0,0,0,0.2); }
.ck-map-marker-list {
  display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; padding-top: 12px;
  border-top: 1px solid rgba(255,255,255,0.06);
}
.ck-marker-item {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px 4px 8px; border-radius: 999px; font-size: 12px;
  background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.06);
  color: rgba(255,255,255,0.7);
}
.ck-marker-icon { font-size: 14px; }
.ck-marker-label { max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ck-marker-del {
  width: 18px; height: 18px; border-radius: 50%; border: none;
  background: rgba(255,82,82,0.15); color: #ff8a80; font-size: 10px;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: all var(--transition-smooth); padding: 0;
}
.ck-marker-del:hover { background: rgba(255,82,82,0.3); color: var(--danger); }

/* ===== GM PAGE (from GM_Ui.html inline) ===== */
.gm-page { height: calc(100vh - 70px); overflow: hidden; }
.gm-main {
  height: 100%; display: grid; grid-template-columns: 2fr 1.2fr 0.8fr;
  gap: 25px; padding: 30px 50px;
}
.gm-main > * { min-height: 0; }
.glass {
  background: var(--glass); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border-radius: 20px; padding: 15px; display: flex; flex-direction: column; min-height: 0;
  border: var(--glass-border); box-shadow: var(--card-glow);
  transition: box-shadow var(--transition-smooth);
}
.map-container { justify-content: center; align-items: center; }
.map-box { width: 100%; height: 100%; background: rgba(0,0,0,0.5); border-radius: 25px; display: flex; justify-content: center; align-items: center; color: var(--accent-green); }
.center-column { display: flex; flex-direction: column; gap: 25px; height: 100%; min-height: 0; }
.center-column .glass { flex: 1; min-height: 0; }
.center-column h3 { margin-top: 0; flex-shrink: 0; }
.right-column { display: flex; flex-direction: column; gap: 25px; min-height: 0; }
.player-container { overflow-y: auto; min-height: 0; }
.player-container::-webkit-scrollbar { width: 6px; }
.player-container::-webkit-scrollbar-thumb { background: var(--scrollbar-thumb); border-radius: 10px; }
.gm-page .player { padding: 15px; margin-bottom: 10px; border-radius: 16px; background: rgba(255,255,255,0.04); min-height: 70px; cursor: pointer; transition: all var(--transition-smooth); display: block; border: 1px solid rgba(255,255,255,0.05); }
.gm-page .player:hover { background: rgba(255,255,255,0.1); border-color: rgba(255,255,255,0.1); transform: translateY(-1px); box-shadow: 0 4px 12px rgba(0,0,0,0.2); }
.gm-page .player.active { background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end)); color: rgba(var(--lp-dark-rgb),1); font-weight: bold; border-color: transparent; box-shadow: 0 4px 20px rgba(var(--gradient-start-rgb),0.25); }
.hp-btn-gm { width: 28px; height: 28px; border-radius: 50%; padding: 0; margin: 0; font-size: 14px; cursor: pointer; border: 1px solid; display: inline-flex; align-items: center; justify-content: center; background: transparent; color: white; }
.hp-btn-gm.damage { border-color: rgba(255,82,82,0.4); color: #ff8a80; }
.hp-btn-gm.heal { border-color: rgba(var(--accent-rgb),0.4); color: var(--accent-green); }

/* GM Decisions */
.decisions-panel { position: relative; }
.decisions-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; flex-shrink: 0; }
.decisions-header h3 { margin: 0; font-size: 16px; }
.new-decision-btn { width: 34px; height: 34px; border-radius: 50%; border: none; background: linear-gradient(135deg,var(--accent-purple-dark),var(--accent-purple)); color: white; font-size: 20px; font-weight: 700; cursor: pointer; display: flex; align-items: center; justify-content: center; padding: 0; margin: 0; }
.decisions-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; flex: 1; opacity: 0.5; text-align: center; padding: 20px; }
.decisions-empty-icon { font-size: 38px; margin-bottom: 10px; }
.decisions-empty-text { font-size: 13px; line-height: 1.5; }
#gmDecisionList { flex: 1; overflow-y: auto; min-height: 0; }
.decision-card { background: rgba(0,0,0,0.3); padding: 14px 16px; border-radius: 14px; margin-bottom: 10px; border-left: 3px solid var(--accent-purple); transition: transform var(--transition-smooth), box-shadow var(--transition-smooth); }
.decision-card:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(0,0,0,0.2); }
.decision-card h4 { margin: 0 0 4px; font-size: 14px; font-weight: 700; word-break: break-word; }
.decision-desc { font-size: 12.5px; opacity: 0.8; margin-bottom: 12px; line-height: 1.4; white-space: pre-wrap; word-break: break-word; max-height: 60px; overflow-y: auto; }
.vote-bar-container { margin-top: 8px; }
.vote-bar-labels { display: flex; justify-content: space-between; font-size: 11px; margin-bottom: 4px; font-weight: 600; }
.vote-bar-labels .vote-yes { color: var(--accent-green); }
.vote-bar-labels .vote-no { color: var(--danger); }
.vote-bar { width: 100%; height: 6px; background: rgba(255,255,255,0.06); border-radius: 99px; overflow: hidden; display: flex; }
.vote-bar-yes { height: 100%; background: linear-gradient(90deg, var(--gradient-start), var(--gradient-end)); transition: width 0.5s ease-out; border-radius: 99px 0 0 99px; }
.vote-bar-no { height: 100%; background: linear-gradient(90deg,var(--danger),#ff8a80); transition: width 0.5s ease-out; border-radius: 0 99px 99px 0; }
.vote-buttons { margin-top: 10px; display: flex; gap: 8px; }
.vote-btn { flex: 1; padding: 7px 0; border: none; border-radius: 10px; font-weight: 700; font-size: 12px; cursor: pointer; margin: 0; }
.vote-btn-yes { background: rgba(var(--accent-rgb),0.15); color: var(--accent-green); border: 1px solid rgba(var(--accent-rgb),0.3); }
.vote-btn-no { background: rgba(255,82,82,0.15); color: #ff8a80; border: 1px solid rgba(255,82,82,0.3); }
.vote-btn.voted { opacity: 0.5; cursor: not-allowed; }

/* Chat */
.chat-box { display: flex; flex-direction: column; min-height: 0; }
.chat-messages { flex: 1; overflow-y: auto; min-height: 0; background: rgba(0,0,0,0.4); border-radius: 15px; padding: 10px; margin-bottom: 10px; font-size: 14px; }
.chat-messages div { word-wrap: break-word; overflow-wrap: break-word; }
.chat-messages::-webkit-scrollbar { width: 6px; }
.chat-messages::-webkit-scrollbar-thumb { background: var(--scrollbar-thumb); border-radius: 10px; }

/* GM buttons override – scoped to gm-main */
.gm-main button { border: none; border-radius: 15px; padding: 10px 14px; cursor: pointer; font-weight: 600; margin-top: 5px; background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end)); color: rgba(var(--lp-dark-rgb),1); }
.purple-btn { background: linear-gradient(90deg,var(--accent-purple-dark),var(--accent-purple)) !important; color: white !important; }
.gm-main select, .gm-main input, .gm-main textarea { width: 100%; padding: 10px; border-radius: 12px; border: none; margin-top: 6px; margin-bottom: 10px; background: rgba(255,255,255,0.1); color: white; }

/* Dice section */
.dice-section { gap: 0; display: flex; flex-direction: column; }
.dice-section h3 { margin: 0 0 14px; font-size: 16px; flex-shrink: 0; }
.dice-display { position: relative; width: 100%; aspect-ratio: 2.2/1; background: rgba(0,0,0,0.4); border-radius: 18px; display: flex; flex-direction: column; align-items: center; justify-content: center; margin-bottom: 14px; overflow: hidden; }
.dice-display::before { content: ''; position: absolute; inset: 0; border-radius: 18px; border: 1px solid rgba(var(--accent-rgb),0.12); pointer-events: none; background: radial-gradient(ellipse at center, rgba(var(--accent-rgb),0.03) 0%, transparent 70%); }
.dice-type-label { font-size: 12px; opacity: 0.5; letter-spacing: 1px; text-transform: uppercase; margin-bottom: 2px; }
.dice-result-value { font-size: 52px; font-weight: 800; background: linear-gradient(180deg, var(--dice-result-light), var(--accent-green)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; line-height: 1.1; transition: transform 0.3s; }
.dice-result-value.rolling { animation: diceRoll 0.5s ease-out; }
@keyframes diceRoll { 0% { transform: scale(0.5) rotate(-15deg); opacity: 0.3; } 50% { transform: scale(1.15) rotate(5deg); opacity: 1; } 100% { transform: scale(1) rotate(0deg); } }
.dice-feedback-text { font-size: 12px; min-height: 18px; margin-top: 4px; font-weight: 600; transition: opacity 0.3s; }
.dice-chip-row { display: flex; gap: 5px; flex-wrap: wrap; margin-bottom: 12px; flex-shrink: 0; justify-content: center; }
.dice-chip { padding: 5px 10px; border-radius: 99px; border: 1px solid rgba(var(--accent-rgb),0.2); background: rgba(var(--accent-rgb),0.06); color: rgba(255,255,255,0.7); font-size: 12px; font-weight: 600; cursor: pointer; margin: 0; transition: all 0.2s; }
.dice-chip.selected { background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end)); color: rgba(var(--lp-dark-rgb),1); border-color: transparent; box-shadow: 0 2px 10px rgba(var(--gradient-start-rgb),0.25); }
.roll-btn { width: 100%; padding: 12px; border: none; border-radius: 14px; background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end)); color: rgba(var(--lp-dark-rgb),1); font-weight: 800; font-size: 15px; cursor: pointer; margin: 0 0 10px; display: flex; align-items: center; justify-content: center; gap: 8px; flex-shrink: 0; transition: all var(--transition-smooth); box-shadow: 0 2px 12px rgba(var(--gradient-start-rgb),0.2); }
.roll-btn:hover:not(:disabled) { transform: translateY(-1px); box-shadow: 0 4px 20px rgba(var(--gradient-start-rgb),0.3); }
.roll-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.or-divider { display: flex; align-items: center; gap: 10px; margin: 8px 0; flex-shrink: 0; }
.or-divider::before, .or-divider::after { content: ''; flex: 1; height: 1px; background: rgba(255,255,255,0.1); }
.or-divider span { font-size: 11px; opacity: 0.4; font-weight: 600; text-transform: uppercase; letter-spacing: 1px; }
.manual-row { display: flex; gap: 8px; align-items: stretch; flex-shrink: 0; }
.manual-row input { flex: 1; margin: 0; padding: 10px 12px; border-radius: 12px; border: 1px solid rgba(255,255,255,0.1); background: rgba(255,255,255,0.07); color: white; font-size: 14px; }
.manual-row input:focus { outline: none; border-color: var(--accent-purple); }
.manual-set-btn { padding: 10px 16px; border: none; border-radius: 12px; background: linear-gradient(135deg,var(--accent-purple-dark),var(--accent-purple)); color: white; font-weight: 700; font-size: 13px; cursor: pointer; white-space: nowrap; margin: 0; }

/* Modal (legacy) */
.modal { position: fixed; inset: 0; background: rgba(0,0,0,0.65); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); display: none; justify-content: center; align-items: center; z-index: 3100; }
.modal-content { width: 440px; background: rgba(var(--primary-rgb),0.97); padding: 25px; border-radius: 20px; color: var(--text); box-shadow: 0 24px 64px rgba(0,0,0,0.5), 0 0 0 1px rgba(var(--accent-rgb),0.08); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); }
.decision-modal-header { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; }
.decision-modal-header span { font-size: 28px; }
.decision-modal-header h3 { margin: 0; font-size: 18px; }
.modal-label { font-size: 12px; font-weight: 600; opacity: 0.7; margin-bottom: 2px; display: block; }
.char-counter { float: right; font-weight: 400; opacity: 0.5; font-size: 11px; }
.char-counter.near-limit { color: var(--gold); opacity: 1; }
.char-counter.at-limit { color: var(--danger); opacity: 1; }
.decision-modal-actions { display: flex; gap: 10px; margin-top: 8px; }
.modal-cancel-btn { flex: 1; padding: 11px; border: 1px solid rgba(255,255,255,0.15); border-radius: 12px; background: transparent; color: rgba(255,255,255,0.7); font-weight: 600; cursor: pointer; transition: all var(--transition-smooth); }
.modal-cancel-btn:hover { background: rgba(255,255,255,0.06); border-color: rgba(255,255,255,0.25); }
.modal-save-btn { flex: 1; padding: 11px; border: none; border-radius: 12px; background: linear-gradient(135deg,var(--accent-purple-dark),var(--accent-purple)); color: white; font-weight: 700; cursor: pointer; transition: all var(--transition-smooth); box-shadow: 0 2px 10px rgba(119,8,199,0.2); }
.modal-save-btn:hover { transform: translateY(-1px); box-shadow: 0 4px 16px rgba(119,8,199,0.35); }

/* =====================================================
   DK-MODAL – Redesigned modal system
   ===================================================== */
.dk-modal {
  position: fixed;
  inset: 0;
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 3200;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  padding: 20px;
  animation: dkModalBgIn 0.25s ease;
}
@keyframes dkModalBgIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.dk-modal-card {
  position: relative;
  width: 100%;
  max-width: 420px;
  background: linear-gradient(165deg, rgba(var(--glass-solid-rgb), 0.98) 0%, rgba(var(--lp-dark-rgb), 0.98) 100%);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 24px;
  padding: 28px 24px 24px;
  color: var(--text);
  box-shadow:
    0 0 0 1px rgba(var(--accent-green-rgb), 0.04),
    0 24px 80px rgba(0, 0, 0, 0.55),
    0 8px 32px rgba(0, 0, 0, 0.3);
  animation: dkModalCardIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  overflow: hidden;
}
@keyframes dkModalCardIn {
  from { opacity: 0; transform: scale(0.92) translateY(12px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

/* Subtle top-edge glow */
.dk-modal-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 24px;
  right: 24px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(var(--accent-green-rgb), 0.2), transparent);
}

/* Close button */
.dk-modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.4);
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  -webkit-tap-highlight-color: transparent;
}
.dk-modal-close:hover {
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.8);
}

/* Icon row */
.dk-modal-icon-row {
  text-align: center;
  margin-bottom: 6px;
}
.dk-modal-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: rgba(var(--accent-green-rgb), 0.06);
  border: 1px solid rgba(var(--accent-green-rgb), 0.08);
  font-size: 28px;
}

/* Title */
.dk-modal-title {
  text-align: center;
  font-size: 18px;
  font-weight: 700;
  margin: 0 0 4px;
  color: white;
}

/* Description */
.dk-modal-desc {
  text-align: center;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.45);
  margin: 0 0 18px;
  line-height: 1.5;
}

/* Form fields */
.dk-modal-field {
  margin-bottom: 14px;
}
.dk-modal-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.55);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}
.dk-char-counter {
  font-weight: 400;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.3);
  text-transform: none;
  letter-spacing: 0;
}
.dk-char-counter.near-limit { color: var(--gold); }
.dk-char-counter.at-limit { color: var(--danger); }

.dk-modal-input {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.25);
  color: white;
  font-size: 14px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  box-sizing: border-box;
}
.dk-modal-input::placeholder {
  color: rgba(255, 255, 255, 0.25);
}
.dk-modal-input:focus {
  border-color: rgba(var(--accent-green-rgb), 0.25);
  box-shadow: 0 0 0 3px rgba(var(--accent-green-rgb), 0.06);
}

.dk-modal-textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.25);
  color: white;
  font-size: 14px;
  font-family: inherit;
  outline: none;
  resize: vertical;
  min-height: 80px;
  line-height: 1.5;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  box-sizing: border-box;
}
.dk-modal-textarea::placeholder {
  color: rgba(255, 255, 255, 0.25);
}
.dk-modal-textarea:focus {
  border-color: rgba(var(--accent-green-rgb), 0.25);
  box-shadow: 0 0 0 3px rgba(var(--accent-green-rgb), 0.06);
}

/* Actions */
.dk-modal-actions {
  display: flex;
  gap: 10px;
  margin-top: 20px;
}
.dk-btn-ghost {
  flex: 1;
  padding: 12px 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  background: transparent;
  color: rgba(255, 255, 255, 0.6);
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s ease;
}
.dk-btn-ghost:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.18);
  color: rgba(255, 255, 255, 0.85);
}
.dk-btn-primary {
  flex: 1;
  padding: 12px 16px;
  border: none;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(var(--accent-green-rgb), 0.9), rgba(52, 211, 153, 0.9));
  color: rgba(var(--lp-dark-rgb),1);
  font-size: 14px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 16px rgba(52, 211, 153, 0.15);
}
.dk-btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 24px rgba(52, 211, 153, 0.25);
}
.dk-btn-primary:active {
  transform: translateY(0);
}

/* Marker icon grid inside dk-modal */
.dk-modal-card .marker-icon-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 6px;
  margin-top: 4px;
}

/* Split player list inside dk-modal */
.dk-modal-card .split-player-list {
  max-height: 200px;
  overflow-y: auto;
  margin-bottom: 4px;
}

/* Mobile */
@media (max-width: 480px) {
  .dk-modal { padding: 12px; }
  .dk-modal-card {
    max-width: 100%;
    padding: 22px 18px 20px;
    border-radius: 20px;
  }
}
.char-modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.7); display: none; justify-content: center; align-items: center; z-index: 3100; }
.char-modal-overlay.visible { display: flex; }
.char-modal { width: 420px; max-height: 85vh; overflow-y: auto; background: rgba(var(--glass-solid-rgb),0.96); backdrop-filter: blur(18px); border-radius: 25px; padding: 28px 24px; color: var(--text); }
.char-modal h2 { margin: 0 0 4px; font-size: 22px; }
.char-meta { font-size: 14px; opacity: 0.85; margin-bottom: 18px; line-height: 1.6; }
.char-modal .stats-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 18px; }
.info-box { background: rgba(0,0,0,0.32); border-radius: 14px; padding: 14px; font-size: 14px; line-height: 1.5; white-space: pre-wrap; margin-top: 10px; }
.close-btn { margin-top: 16px; width: 100%; padding: 12px; border: none; border-radius: 14px; background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end)); color: rgba(var(--lp-dark-rgb),1); font-weight: 700; font-size: 15px; cursor: pointer; transition: all var(--transition-smooth); }
.close-btn:hover { box-shadow: 0 4px 16px rgba(var(--gradient-start-rgb),0.25); }

/* ===== PLAYER VIEW (from Spieler_Ui.html inline) ===== */
.player-view-desktop { display: grid; grid-template-columns: 340px 1fr; gap: 20px; padding: 20px; min-height: calc(100vh - 70px); }
.pv-sidebar { display: flex; flex-direction: column; gap: 14px; max-height: calc(100vh - 100px); overflow-y: auto; scrollbar-width: thin; scrollbar-color: rgba(var(--accent-rgb),0.3) transparent; }
.pv-sidebar::-webkit-scrollbar { width: 5px; }
.pv-sidebar::-webkit-scrollbar-thumb { background: rgba(var(--accent-rgb),0.3); border-radius: 10px; }
.pv-main { display: flex; flex-direction: column; gap: 14px; max-height: calc(100vh - 100px); overflow-y: auto; }
.pv-campaign-bar { display: flex; justify-content: space-between; align-items: center; padding: 12px 14px; gap: 8px; }
.bar-btn { border: 1px solid rgba(255,255,255,0.2); background: transparent; color: white; border-radius: 999px; padding: 8px 14px; font-size: 12px; font-weight: 600; cursor: pointer; flex-shrink: 0; margin: 0; }
.pv-tabs { display: flex; gap: 4px; border-bottom: 1px solid rgba(255,255,255,0.1); padding: 0 20px; overflow-x: auto; }
.pv-tab { padding: 12px 20px; font-size: 13px; font-weight: 600; color: var(--text-muted); cursor: pointer; border: none; background: transparent; border-bottom: 2px solid transparent; transition: all var(--transition-smooth); margin: 0; white-space: nowrap; position: relative; }
.pv-tab:hover { color: var(--text); background: rgba(255,255,255,0.03); }
.pv-tab.active { color: var(--accent-green); border-bottom-color: var(--accent-green); }
.pv-tab-panel { display: none; }
.pv-tab-panel.active { display: block; }
.pv-map-panel.active { display: flex; flex-direction: column; padding: 0; min-height: 400px; }

/* Player sidebar */
.char-avatar { width: 80px; height: 80px; border-radius: 50%; margin: 0 auto 10px; background: linear-gradient(135deg, var(--avatar-start), var(--avatar-end)); display: flex; align-items: center; justify-content: center; font-size: 26px; font-weight: 700; color: var(--avatar-text); overflow: hidden; box-shadow: 0 4px 16px rgba(var(--primary-rgb),0.3); }
.char-name { font-size: 20px; font-weight: 700; margin-bottom: 2px; }
.char-meta-line { font-size: 12px; color: var(--text-muted); line-height: 1.5; }
.level-badge { display: inline-block; background: linear-gradient(135deg, var(--gold), #ffca28); color: #1a1a2e; font-size: 11px; font-weight: 700; padding: 3px 10px; border-radius: 999px; margin-top: 6px; }
.core-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; padding: 10px; }
.core-stat { background: var(--glass-dark); border-radius: 14px; padding: 10px 4px; text-align: center; }
.core-stat-icon { font-size: 16px; margin-bottom: 1px; }
.core-stat-value { font-size: 20px; font-weight: 700; }
.core-stat-label { font-size: 9px; text-transform: uppercase; letter-spacing: 0.4px; color: var(--text-muted); margin-top: 1px; }
.abilities-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 8px; }
.ability-score { font-size: 22px; font-weight: 700; }
.ability-mod { font-size: 12px; font-weight: 600; color: var(--accent-green); margin-top: 1px; }
.ability-mod.negative { color: #ff8a80; }
.save-row, .skill-row { display: flex; justify-content: space-between; align-items: center; padding: 8px 10px; border-radius: 10px; font-size: 13px; min-height: 40px; }
.save-name { color: var(--text-muted); }
.save-value, .skill-bonus { font-weight: 600; }
.save-value.positive, .skill-bonus.positive { color: var(--accent-green); }
.save-value.negative, .skill-bonus.negative { color: #ff8a80; }
.skill-name { display: flex; align-items: center; gap: 6px; }
.skill-proficient { width: 8px; height: 8px; border-radius: 50%; background: var(--accent-green); flex-shrink: 0; }
.skill-not-proficient { width: 8px; height: 8px; border-radius: 50%; border: 1px solid rgba(255,255,255,0.3); flex-shrink: 0; }

/* Info cards */
.info-card { background: var(--glass-dark); border-radius: 16px; padding: 14px; margin-bottom: 12px; border: 1px solid rgba(255,255,255,0.04); transition: border-color var(--transition-smooth); }
.info-card:hover { border-color: rgba(255,255,255,0.08); }
.info-card-title { font-size: 14px; font-weight: 700; margin-bottom: 6px; display: flex; align-items: center; gap: 8px; }
.info-card-body { font-size: 13px; line-height: 1.6; color: var(--text-muted); white-space: pre-wrap; word-break: break-word; }
.info-tag { display: inline-block; background: rgba(var(--accent-rgb),0.12); color: var(--accent-green); font-size: 11px; font-weight: 600; padding: 4px 10px; border-radius: 999px; margin: 3px 4px 3px 0; }
.info-tag.purple { background: rgba(var(--accent-purple-rgb),0.15); color: var(--accent-purple); }
.prof-group { margin-bottom: 16px; }
.prof-group-title { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.8px; color: var(--text-muted); margin-bottom: 6px; }
.party-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.party-card { background: var(--glass-dark); border-radius: 16px; padding: 14px; display: flex; gap: 12px; align-items: center; border: 1px solid rgba(255,255,255,0.04); transition: all var(--transition-smooth); }
.party-card:hover { border-color: rgba(255,255,255,0.08); background: rgba(0,0,0,0.32); }
.party-avatar { width: 44px; height: 44px; border-radius: 50%; background: linear-gradient(135deg, var(--avatar-start), var(--avatar-end)); display: flex; align-items: center; justify-content: center; font-size: 15px; font-weight: 700; color: var(--avatar-text); flex-shrink: 0; }
.party-avatar.dm { background: linear-gradient(135deg,var(--accent-purple),var(--accent-purple-dark)); color: white; }
.party-info { flex: 1; min-width: 0; }
.party-name { font-size: 14px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.party-detail { font-size: 12px; color: var(--text-muted); }
.party-role-badge { font-size: 10px; font-weight: 700; text-transform: uppercase; padding: 3px 8px; border-radius: 999px; }
.party-role-badge.dm { background: rgba(var(--accent-purple-rgb),0.2); color: var(--accent-purple); }
.party-role-badge.player { background: rgba(var(--accent-rgb),0.12); color: var(--accent-green); }
.notes-area { width: 100%; min-height: 250px; background: var(--glass-dark); border: 1px solid rgba(255,255,255,0.1); border-radius: 14px; padding: 14px; color: white; font-size: 15px; line-height: 1.6; resize: vertical; outline: none; font-family: inherit; }
.notes-area:focus { border-color: var(--accent-green); }
.notes-hint { font-size: 11px; color: var(--text-muted); margin-top: 6px; }

/* Turn banner */
.turn-banner { position: fixed; top: 60px; left: 0; right: 0; z-index: 800; text-align: center; padding: 10px 16px; font-weight: 700; font-size: 14px; transition: transform 0.3s ease, opacity 0.3s ease; transform: translateY(-100%); opacity: 0; pointer-events: none; }
.turn-banner.visible { transform: translateY(0); opacity: 1; pointer-events: auto; }
.turn-banner.my-turn { background: linear-gradient(90deg, var(--gradient-start), var(--gradient-end)); color: rgba(var(--lp-dark-rgb),1); box-shadow: 0 4px 20px rgba(var(--gradient-start-rgb),0.3); }
.turn-banner.other-turn { background: rgba(var(--glass-solid-rgb),0.9); color: var(--text-muted); backdrop-filter: blur(12px); border-bottom: 1px solid rgba(255,255,255,0.08); }
.dice-toast { position: fixed; top: 120px; right: 20px; z-index: 1500; background: rgba(var(--glass-solid-rgb),0.95); backdrop-filter: blur(18px); border-radius: 16px; padding: 14px 20px; color: var(--text); box-shadow: 0 6px 24px rgba(0,0,0,0.5); border-left: 3px solid var(--accent-purple); transform: translateX(120%); transition: transform 0.3s ease; max-width: 280px; }
.dice-toast.visible { transform: translateX(0); }
.toast-title { font-weight: 700; font-size: 12px; color: var(--accent-purple); margin-bottom: 4px; text-transform: uppercase; letter-spacing: 0.5px; }
.toast-result { font-size: 28px; font-weight: 800; color: var(--accent-green); }
.decision-card-player { background: var(--glass-dark); padding: 14px 16px; border-radius: 16px; margin-bottom: 10px; border-left: 3px solid var(--accent-purple); }
.decision-card-player h4 { margin: 0 0 4px; font-size: 14px; font-weight: 700; }
.decision-card-player .decision-desc { font-size: 12.5px; opacity: 0.8; margin-bottom: 10px; line-height: 1.4; white-space: pre-wrap; }
.pv-status-message { position: fixed; top: 70px; left: 50%; transform: translateX(-50%); padding: 10px 20px; border-radius: 12px; font-size: 13px; font-weight: 600; z-index: 3000; opacity: 0; transition: opacity 0.3s; pointer-events: none; max-width: 90vw; text-align: center; }
.pv-status-message.show { opacity: 1; }
.pv-status-message.success { background: rgba(var(--success-rgb),0.95); color: white; }
.pv-status-message.error { background: rgba(244,67,54,0.95); color: white; }
.dice-history { max-height: 150px; overflow-y: auto; margin-top: 4px; }
.dice-history-entry { display: flex; justify-content: space-between; padding: 6px 10px; font-size: 12px; color: var(--text-muted); border-radius: 8px; min-height: 32px; align-items: center; }
.dice-history-entry:nth-child(odd) { background: var(--glass-light); }

/* ===== CHARACTER REVIEW (from CharacterReview.html inline) ===== */
.character-review-page .container { max-width: 800px; margin: 0 auto; padding: 20px; }
.character-review-page .card { background: var(--green-600); border-radius: 24px; padding: 26px; color: white; backdrop-filter: var(--blur-bg); }

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
  .gm-main { grid-template-columns: 1fr; padding: 10px; }
  .player-view-desktop { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .form-row { flex-direction: column; }
  .footer { flex-direction: column; align-items: flex-start; gap: 12px; }
  .button-row { width: 100%; justify-content: flex-end; }
  .preview-stats { grid-template-columns: repeat(3, 1fr); }
  .ability-grid { grid-template-columns: repeat(2, 1fr); }
  .campaigns-page .container { width: 95%; padding: 20px; }
}

/* ===== MAP CROP MODAL ===== */
.map-crop-overlay {
  position: fixed; inset: 0; z-index: 3000;
  background: rgba(0,0,0,0.8); backdrop-filter: blur(6px);
  display: flex; justify-content: center; align-items: center;
}
.map-crop-modal {
  background: rgba(var(--glass-solid-rgb),0.97); border-radius: 20px; padding: 24px;
  max-width: 680px; width: 95vw; color: var(--text); box-shadow: 0 20px 60px rgba(0,0,0,0.6);
}
.map-crop-header { margin-bottom: 14px; }
.map-crop-header h3 { margin: 0 0 4px; font-size: 18px; }
.map-crop-header p { margin: 0; font-size: 13px; opacity: 0.7; }
.map-crop-canvas-wrap {
  display: flex; justify-content: center; align-items: center;
  background: rgba(0,0,0,0.4); border-radius: 14px; padding: 10px; margin-bottom: 14px;
}
.map-crop-canvas { cursor: move; border-radius: 8px; max-width: 100%; }
.map-crop-controls {
  display: flex; align-items: center; gap: 12px; margin-bottom: 14px;
  font-size: 13px; color: var(--text-muted);
}
.map-crop-controls input[type="range"] {
  flex: 1; accent-color: var(--accent-green);
  background: transparent; -webkit-appearance: auto; border: none; padding: 0; margin: 0;
}
.map-crop-actions { display: flex; gap: 10px; }

/* ===== MAP TOOLBAR ===== */
.map-toolbar {
  display: flex; gap: 6px; padding: 0 0 8px; flex-shrink: 0;
}
.map-tb-btn {
  padding: 6px 10px !important; border-radius: 10px !important; font-size: 13px !important;
  background: rgba(255,255,255,0.08) !important; color: white !important;
  border: 1px solid rgba(255,255,255,0.15) !important; cursor: pointer !important;
  transition: background 0.2s !important; margin: 0 !important;
  display: inline-flex !important; align-items: center !important; gap: 4px !important;
  white-space: nowrap !important;
}
.map-tb-btn:hover { background: rgba(255,255,255,0.18) !important; }
.map-tb-popout {
  margin-left: auto !important;
  background: rgba(var(--accent-rgb),0.12) !important; color: var(--accent-green) !important;
  border-color: rgba(var(--accent-rgb),0.3) !important;
}
.map-tb-popout:hover { background: rgba(var(--accent-rgb),0.25) !important; }
.map-tb-separator {
  width: 1px; height: 24px; background: rgba(255,255,255,0.15); margin: 0 4px; flex-shrink: 0;
}
.map-tb-add { color: var(--accent-purple) !important; border-color: rgba(var(--accent-purple-rgb),0.3) !important; }
.map-tb-group { color: var(--accent-green) !important; }
.map-tb-split { color: var(--gold) !important; }
.map-tb-delete { color: var(--danger) !important; border-color: rgba(255,82,82,0.3) !important; }

/* ===== MAP CANVAS ===== */
.map-canvas-wrap {
  width: 100%; height: 100%; min-height: 200px; position: relative;
  border-radius: 18px; overflow: hidden;
}
.map-canvas-wrap.maximized { border-radius: 12px; }
.map-interactive-canvas {
  width: 100%; height: 100%; display: block; border-radius: 18px;
}

/* ===== MAP FULLSCREEN OVERLAY ===== */
.map-fullscreen-overlay {
  position: fixed; inset: 0; z-index: 2500;
  background: rgba(var(--lp-dark-rgb),0.97); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  display: none; flex-direction: column;
}
.map-fullscreen-overlay.visible { display: flex; }
.map-fullscreen-header {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 20px; border-bottom: 1px solid rgba(var(--accent-rgb),0.08);
  flex-shrink: 0; background: rgba(0,0,0,0.15);
}
.map-fullscreen-header h3 { margin: 0; font-size: 16px; color: white; white-space: nowrap; }
.map-fullscreen-toolbar {
  display: flex; gap: 6px; flex: 1; flex-wrap: wrap; align-items: center;
  margin-left: 12px;
}
.map-close-btn {
  font-size: 18px !important; width: 36px !important; height: 36px !important;
  padding: 0 !important; display: flex !important; align-items: center !important;
  justify-content: center !important; border-radius: 50% !important;
  margin-left: auto !important; flex-shrink: 0 !important;
}
.map-fullscreen-body {
  flex: 1; display: flex; overflow: hidden; min-height: 0;
}
.map-fullscreen-canvas {
  flex: 1; min-width: 0; padding: 12px; display: flex;
}
.map-fullscreen-sidebar {
  width: 280px; flex-shrink: 0; padding: 14px;
  border-left: 1px solid rgba(255,255,255,0.1);
  overflow-y: auto; color: var(--text);
}
.map-fullscreen-sidebar h4 {
  font-size: 13px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.5px; opacity: 0.7; margin: 0 0 8px;
}

/* ===== MAP MARKER LIST (sidebar) ===== */
.map-marker-list { display: flex; flex-direction: column; gap: 4px; }
.map-marker-item {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 10px; border-radius: 10px;
  background: rgba(255,255,255,0.05); cursor: pointer;
  transition: all var(--transition-smooth); font-size: 13px;
  border: 1px solid transparent;
}
.map-marker-item:hover { background: rgba(255,255,255,0.1); border-color: rgba(255,255,255,0.08); }
.map-marker-item.selected { background: rgba(var(--gold-rgb),0.12); border: 1px solid rgba(var(--gold-rgb),0.35); box-shadow: 0 0 8px rgba(var(--gold-rgb),0.1); }
.map-marker-icon { font-size: 16px; flex-shrink: 0; }
.map-marker-label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.map-marker-type {
  font-size: 10px; padding: 2px 6px; border-radius: 999px;
  background: rgba(255,255,255,0.08); color: var(--text-muted);
  text-transform: uppercase; letter-spacing: 0.3px; flex-shrink: 0;
}

/* ===== MAP GROUP PANEL ===== */
.map-group-panel { display: flex; flex-direction: column; gap: 6px; }
.map-group-item {
  background: rgba(var(--accent-rgb),0.08); border-radius: 12px; padding: 10px;
  border: 1px solid rgba(var(--accent-rgb),0.15);
}
.map-group-title { font-size: 12px; font-weight: 700; margin-bottom: 6px; color: var(--accent-green); }
.map-group-members { display: flex; flex-wrap: wrap; gap: 4px; }
.map-group-member {
  display: inline-block; padding: 3px 8px; border-radius: 999px;
  background: rgba(var(--accent-rgb),0.12); color: var(--accent-green);
  font-size: 11px; font-weight: 600;
}

/* ===== MARKER ICON GRID (add marker modal) ===== */
.marker-icon-grid {
  display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px;
}
.marker-icon-btn {
  width: 40px !important; height: 40px !important; border-radius: 10px !important;
  border: 2px solid rgba(255,255,255,0.15) !important;
  background: rgba(255,255,255,0.05) !important;
  font-size: 20px !important; cursor: pointer !important;
  display: flex !important; align-items: center !important; justify-content: center !important;
  padding: 0 !important; margin: 0 !important; transition: all 0.2s !important;
}
.marker-icon-btn:hover { border-color: rgba(255,255,255,0.4) !important; background: rgba(255,255,255,0.1) !important; }
.marker-icon-btn.selected { border-color: var(--accent-green) !important; background: rgba(var(--accent-rgb),0.15) !important; box-shadow: 0 0 8px rgba(var(--accent-rgb),0.3) !important; }

/* ===== SPLIT PLAYER LIST ===== */
.split-player-list { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.split-player-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border-radius: 12px;
  background: rgba(255,255,255,0.06); cursor: pointer;
  transition: background 0.2s; font-size: 14px;
}
.split-player-item:hover { background: rgba(255,255,255,0.1); }
.split-player-item input[type="checkbox"] {
  width: 18px; height: 18px; accent-color: var(--accent-green);
  cursor: pointer; flex-shrink: 0;
}

/* ===== PLAYER VIEW MAP TAB ===== */
.pv-map-toolbar {
  display: flex; gap: 6px; padding: 10px 14px 6px; flex-shrink: 0;
}
.pv-map-canvas-box {
  flex: 1; min-height: 350px; padding: 0 14px 14px;
}

/* ===== MAP CONTAINER ADJUSTMENTS ===== */
.map-container {
  flex-direction: column !important;
  align-items: stretch !important;
}
.map-container .map-toolbar {
  flex-shrink: 0;
}
.map-container .map-box {
  flex: 1;
  min-height: 0;
}

/* ===== TOAST NOTIFICATION SYSTEM ===== */
.toast-container {
  position: fixed; top: 72px; right: 20px; z-index: 4000;
  display: flex; flex-direction: column; gap: 8px;
  pointer-events: none; max-width: 380px; width: 100%;
}
.app-toast {
  pointer-events: auto; cursor: pointer;
  display: flex; align-items: center; gap: 10px;
  padding: 12px 18px; border-radius: 14px;
  font-size: 13px; font-weight: 600; color: white;
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 8px 32px rgba(0,0,0,0.35), 0 0 0 1px rgba(255,255,255,0.06);
  transform: translateX(120%); opacity: 0;
  transition: transform 0.35s cubic-bezier(0.4,0,0.2,1), opacity 0.35s ease;
  overflow: hidden;
}
.app-toast.visible { transform: translateX(0); opacity: 1; }
.app-toast.exiting { transform: translateX(120%); opacity: 0; }
.app-toast-icon {
  width: 28px; height: 28px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 700;
}
.app-toast-msg { flex: 1; line-height: 1.3; }

.app-toast-success {
  background: rgba(var(--glass-solid-rgb),0.92);
  border-left: 3px solid var(--accent-green);
}
.app-toast-success .app-toast-icon { background: rgba(var(--accent-rgb),0.15); color: var(--accent-green); }

.app-toast-error {
  background: rgba(60,20,20,0.92);
  border-left: 3px solid var(--danger);
}
.app-toast-error .app-toast-icon { background: rgba(255,82,82,0.15); color: var(--danger); }

.app-toast-info {
  background: rgba(20,40,60,0.92);
  border-left: 3px solid #64b5f6;
}
.app-toast-info .app-toast-icon { background: rgba(100,181,246,0.15); color: #64b5f6; }

.app-toast-warning {
  background: rgba(60,50,20,0.92);
  border-left: 3px solid var(--gold);
}
.app-toast-warning .app-toast-icon { background: rgba(255,193,7,0.15); color: var(--gold); }

/* =====================================================
   PLAYER VIEW v2 – Redesigned immersive layout
   ===================================================== */
.pv2-loading {
  display: flex; align-items: center; justify-content: center;
  min-height: calc(100vh - 100px); font-size: 16px; color: var(--text-muted); gap: 10px;
}
.pv2-turn-banner {
  position: fixed; top: 60px; left: 0; right: 0; z-index: 800;
  text-align: center; padding: 10px 16px; font-weight: 700; font-size: 14px;
  transition: transform 0.35s ease, opacity 0.35s ease;
  transform: translateY(-100%); opacity: 0; pointer-events: none;
}
.pv2-turn-banner.visible { transform: translateY(0); opacity: 1; pointer-events: auto; }
.pv2-turn-banner.my-turn {
  background: linear-gradient(90deg, rgba(var(--gradient-start-rgb),0.95), rgba(var(--primary-rgb),0.95));
  color: rgba(var(--lp-dark-rgb),1); box-shadow: 0 4px 20px rgba(var(--gradient-start-rgb),0.3);
}
.pv2-turn-banner.other-turn {
  background: rgba(var(--glass-solid-rgb),0.92); color: var(--text-muted);
  backdrop-filter: blur(12px); border-bottom: 1px solid rgba(255,255,255,0.06);
}
.pv2-turn-dot {
  display: inline-block; width: 10px; height: 10px; border-radius: 50%;
  background: rgba(var(--lp-dark-rgb),1); margin-right: 6px; vertical-align: middle;
  animation: pv2-pulse 1.5s ease-in-out infinite;
}
@keyframes pv2-pulse { 0%,100% { opacity: 0.6; } 50% { opacity: 1; } }

/* Shell: 3-column grid */
.pv2-shell {
  display: grid;
  grid-template-columns: 300px 1fr 280px;
  gap: 16px;
  padding: 16px;
  height: calc(100vh - 70px);
  overflow: hidden;
}
@media (max-width: 1100px) {
  .pv2-shell { grid-template-columns: 260px 1fr 240px; gap: 12px; padding: 12px; }
}
@media (max-width: 900px) {
  .pv2-shell { grid-template-columns: 1fr; grid-template-rows: auto 1fr auto; height: auto; overflow: auto; }
}

/* ===== LEFT RAIL ===== */
.pv2-rail {
  display: flex; flex-direction: column; gap: 12px;
  overflow-y: auto; scrollbar-width: thin; scrollbar-color: rgba(var(--accent-rgb),0.2) transparent;
  padding-right: 4px;
}
.pv2-rail::-webkit-scrollbar { width: 4px; }
.pv2-rail::-webkit-scrollbar-thumb { background: rgba(var(--accent-rgb),0.2); border-radius: 10px; }

.pv2-identity {
  text-align: center; padding: 20px 14px 16px;
  background: rgba(var(--glass-solid-rgb),0.6); border-radius: 18px;
  border: 1px solid rgba(255,255,255,0.05);
  backdrop-filter: blur(16px);
}
.pv2-avatar {
  width: 72px; height: 72px; border-radius: 50%; margin: 0 auto 10px;
  background: linear-gradient(135deg, var(--avatar-start), var(--avatar-end));
  display: flex; align-items: center; justify-content: center;
  font-size: 24px; font-weight: 700; color: var(--avatar-text);
  box-shadow: 0 4px 20px rgba(var(--primary-rgb),0.25);
  overflow: hidden;
}
.pv2-avatar img { width: 100%; height: 100%; object-fit: cover; }
.pv2-char-name { font-size: 18px; font-weight: 700; color: white; margin-bottom: 2px; }
.pv2-char-meta { font-size: 12px; color: rgba(255,255,255,0.5); }
.pv2-level-badge {
  display: inline-block; margin-top: 8px; padding: 4px 12px;
  border-radius: 999px; font-size: 11px; font-weight: 700;
  background: linear-gradient(135deg, rgba(255,193,7,0.15), rgba(255,202,40,0.1));
  color: #ffd54f; border: 1px solid rgba(255,193,7,0.15);
}

.pv2-core-stats {
  background: rgba(var(--glass-solid-rgb),0.6); border-radius: 16px; padding: 14px;
  border: 1px solid rgba(255,255,255,0.05);
}
.pv2-core-stat { text-align: center; margin-bottom: 8px; }
.pv2-core-icon { font-size: 18px; margin-bottom: 2px; }
.pv2-core-val { font-size: 28px; font-weight: 800; line-height: 1.1; }
.pv2-core-max { font-size: 14px; font-weight: 500; opacity: 0.5; }
.pv2-core-label { font-size: 10px; text-transform: uppercase; letter-spacing: 0.8px; color: rgba(255,255,255,0.4); margin-top: 2px; }
.pv2-hp-bar {
  height: 6px; border-radius: 3px; background: rgba(255,255,255,0.08);
  overflow: hidden; margin-top: 8px;
}
.pv2-hp-fill { height: 100%; border-radius: 3px; transition: width 0.6s ease, background 0.4s ease; }
.pv2-core-row {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-top: 10px;
}
.pv2-core-mini {
  text-align: center; padding: 8px 4px; border-radius: 10px;
  background: rgba(0,0,0,0.2); border: 1px solid rgba(255,255,255,0.04);
}
.pv2-core-mini span { font-size: 14px; display: block; margin-bottom: 1px; }
.pv2-core-mini strong { font-size: 16px; color: white; display: block; }
.pv2-core-mini small { font-size: 9px; text-transform: uppercase; letter-spacing: 0.5px; color: rgba(255,255,255,0.35); }

.pv2-section {
  background: rgba(var(--glass-solid-rgb),0.6); border-radius: 16px; padding: 14px;
  border: 1px solid rgba(255,255,255,0.05);
}
.pv2-section.pv2-scrollable { max-height: 300px; overflow-y: auto; scrollbar-width: thin; }
.pv2-section-title {
  font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.8px;
  color: rgba(255,255,255,0.4); margin-bottom: 10px;
}

.pv2-abilities-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.pv2-ability {
  text-align: center; padding: 8px 4px; border-radius: 12px;
  background: rgba(0,0,0,0.2); border: 1px solid rgba(255,255,255,0.04);
  transition: border-color var(--transition-smooth);
}
.pv2-ability:hover { border-color: rgba(255,255,255,0.1); }
.pv2-ability-icon { font-size: 16px; margin-bottom: 2px; }
.pv2-ability-abbr { font-size: 9px; text-transform: uppercase; letter-spacing: 0.5px; color: rgba(255,255,255,0.4); }
.pv2-ability-score { font-size: 20px; font-weight: 800; color: white; line-height: 1.1; }
.pv2-ability-mod { font-size: 12px; font-weight: 600; color: var(--accent-green); }
.pv2-ability-mod.neg { color: #ff8a80; }

.pv2-skill-row {
  display: flex; align-items: center; gap: 8px;
  padding: 5px 6px; border-radius: 8px; font-size: 13px;
  transition: background var(--transition-smooth);
}
.pv2-skill-row:hover { background: rgba(255,255,255,0.04); }
.pv2-skill-dot {
  width: 7px; height: 7px; border-radius: 50%;
  border: 1.5px solid rgba(255,255,255,0.2); flex-shrink: 0;
}
.pv2-skill-dot.prof { background: var(--accent-green); border-color: var(--accent-green); }
.pv2-skill-name { flex: 1; color: rgba(255,255,255,0.6); }
.pv2-skill-bonus { font-weight: 700; min-width: 28px; text-align: right; }
.pv2-skill-bonus.pos { color: var(--accent-green); }
.pv2-skill-bonus.neg { color: #ff8a80; }

/* ===== CENTRE COLUMN ===== */
.pv2-centre {
  display: flex; flex-direction: column; gap: 14px;
  min-height: 0; overflow: hidden;
}

.pv2-map-card {
  flex: 1; min-height: 0;
  background: rgba(var(--glass-solid-rgb),0.6); border-radius: 18px;
  border: 1px solid rgba(255,255,255,0.05);
  display: flex; flex-direction: column; overflow: hidden;
}
.pv2-map-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 14px; flex-shrink: 0;
  border-bottom: 1px solid rgba(255,255,255,0.04);
}
.pv2-map-header h3 { margin: 0; font-size: 14px; font-weight: 700; color: white; }
.pv2-map-tools { display: flex; gap: 4px; }
.pv2-icon-btn {
  padding: 5px 9px; border-radius: 8px; font-size: 12px;
  background: rgba(255,255,255,0.06); color: rgba(255,255,255,0.7);
  border: 1px solid rgba(255,255,255,0.08); cursor: pointer;
  transition: all var(--transition-smooth);
}
.pv2-icon-btn:hover { background: rgba(255,255,255,0.12); color: white; }
.pv2-map-canvas { flex: 1; min-height: 200px; }
.pv2-no-map {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  height: 100%; color: rgba(255,255,255,0.25); gap: 8px;
}
.pv2-no-map span { font-size: 40px; }
.pv2-no-map p { margin: 0; font-size: 14px; }

/* Bottom row: decisions + dice */
.pv2-bottom-row {
  display: grid; grid-template-columns: 1fr 1fr; gap: 14px;
  flex-shrink: 0; max-height: 280px; min-height: 180px;
}
@media (max-width: 900px) { .pv2-bottom-row { grid-template-columns: 1fr; max-height: none; } }

.pv2-decisions-card, .pv2-dice-card {
  background: rgba(var(--glass-solid-rgb),0.6); border-radius: 16px;
  border: 1px solid rgba(255,255,255,0.05);
  display: flex; flex-direction: column; overflow: hidden;
}
.pv2-card-header {
  display: flex; align-items: center; gap: 8px; padding: 10px 14px;
  border-bottom: 1px solid rgba(255,255,255,0.04); flex-shrink: 0;
}
.pv2-card-header span { font-size: 16px; }
.pv2-card-header h3 { margin: 0; font-size: 14px; font-weight: 700; color: white; }

.pv2-decisions-body { flex: 1; overflow-y: auto; padding: 10px; scrollbar-width: thin; }
.pv2-empty { text-align: center; padding: 20px; color: rgba(255,255,255,0.3); font-size: 13px; font-style: italic; }

.pv2-decision {
  background: rgba(0,0,0,0.2); border-radius: 12px; padding: 10px 12px;
  margin-bottom: 8px; border-left: 3px solid var(--accent-purple);
  transition: all var(--transition-smooth);
}
.pv2-decision.resolved { opacity: 0.65; border-left-color: var(--accent-green); }
.pv2-decision-title { font-size: 13px; font-weight: 700; margin-bottom: 3px; word-break: break-word; }
.pv2-decision-desc { font-size: 12px; color: rgba(255,255,255,0.6); line-height: 1.4; margin-bottom: 8px; }
.pv2-decision-result { text-align: center; font-weight: 700; color: var(--accent-green); font-size: 13px; padding: 4px; }
.pv2-vote-row { display: flex; gap: 6px; margin-bottom: 6px; }
.pv2-vote-btn {
  flex: 1; padding: 6px 0; border: none; border-radius: 8px; font-weight: 700;
  font-size: 12px; cursor: pointer; transition: all var(--transition-smooth);
}
.pv2-vote-btn.yes { background: rgba(var(--accent-rgb),0.12); color: var(--accent-green); border: 1px solid rgba(var(--accent-rgb),0.2); }
.pv2-vote-btn.no { background: rgba(255,82,82,0.12); color: #ff8a80; border: 1px solid rgba(255,82,82,0.2); }
.pv2-vote-btn.yes:hover:not(:disabled) { background: rgba(var(--accent-rgb),0.2); }
.pv2-vote-btn.no:hover:not(:disabled) { background: rgba(255,82,82,0.2); }
.pv2-vote-btn.voted { opacity: 0.5; cursor: default; }
.pv2-vote-bar { height: 4px; border-radius: 2px; background: rgba(255,82,82,0.3); overflow: hidden; margin-top: 4px; }
.pv2-vote-yes { height: 100%; background: linear-gradient(90deg, var(--gradient-start), var(--gradient-end)); border-radius: 2px; transition: width 0.5s; }
.pv2-vote-labels { display: flex; justify-content: space-between; font-size: 10px; font-weight: 600; margin-top: 2px; }
.pv2-vote-labels .yes { color: var(--accent-green); }
.pv2-vote-labels .no { color: #ff8a80; }

/* Dice */
.pv2-dice-body { flex: 1; padding: 10px; overflow-y: auto; scrollbar-width: thin; display: flex; flex-direction: column; gap: 8px; }
.pv2-dice-display {
  text-align: center; padding: 10px; border-radius: 14px;
  background: rgba(0,0,0,0.3); border: 1px solid rgba(255,255,255,0.04);
}
.pv2-dice-type { font-size: 10px; text-transform: uppercase; letter-spacing: 1px; color: rgba(255,255,255,0.4); }
.pv2-dice-value {
  font-size: 40px; font-weight: 800; line-height: 1.1;
  background: linear-gradient(180deg, var(--dice-result-light), var(--accent-green));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.pv2-dice-value.rolling { animation: diceRoll 0.5s ease-out; }
.pv2-dice-fb { font-size: 11px; min-height: 16px; font-weight: 600; transition: opacity 0.3s; }
.pv2-dice-chips { display: flex; gap: 4px; flex-wrap: wrap; justify-content: center; }
.pv2-dice-chip {
  padding: 4px 9px; border-radius: 999px; font-size: 11px; font-weight: 600;
  border: 1px solid rgba(var(--accent-rgb),0.15); background: rgba(var(--accent-rgb),0.05);
  color: rgba(255,255,255,0.6); cursor: pointer; transition: all 0.2s;
}
.pv2-dice-chip.active {
  background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end)); color: rgba(var(--lp-dark-rgb),1);
  border-color: transparent; box-shadow: 0 2px 8px rgba(var(--gradient-start-rgb),0.2);
}
.pv2-roll-btn {
  width: 100%; padding: 9px; border: none; border-radius: 12px;
  background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end)); color: rgba(var(--lp-dark-rgb),1);
  font-weight: 800; font-size: 14px; cursor: pointer; transition: all var(--transition-smooth);
}
.pv2-roll-btn:hover:not(:disabled) { transform: translateY(-1px); box-shadow: 0 4px 16px rgba(var(--gradient-start-rgb),0.25); }
.pv2-roll-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.pv2-dice-manual { display: flex; gap: 6px; }
.pv2-dice-manual input {
  flex: 1; padding: 7px 10px; border-radius: 10px; border: 1px solid rgba(255,255,255,0.1);
  background: rgba(255,255,255,0.06); color: white; font-size: 13px; outline: none;
}
.pv2-dice-manual input:focus { border-color: var(--accent-purple); }
.pv2-manual-btn {
  padding: 7px 14px; border: none; border-radius: 10px;
  background: linear-gradient(135deg, var(--accent-purple-dark), var(--accent-purple));
  color: white; font-weight: 700; font-size: 12px; cursor: pointer;
}
.pv2-dice-history { max-height: 80px; overflow-y: auto; scrollbar-width: thin; }
.pv2-hist-empty { text-align: center; font-size: 12px; color: rgba(255,255,255,0.3); padding: 8px; }
.pv2-hist-row {
  display: flex; justify-content: space-between; padding: 4px 6px; font-size: 11px;
  color: rgba(255,255,255,0.5); border-radius: 6px;
}
.pv2-hist-row:nth-child(odd) { background: rgba(255,255,255,0.03); }
.pv2-hist-dice { color: rgba(255,255,255,0.4); }
.pv2-hist-result { font-weight: 700; color: var(--accent-green); }
.pv2-hist-time { font-size: 10px; color: rgba(255,255,255,0.3); }

/* ===== RIGHT RAIL ===== */
.pv2-right-rail {
  display: flex; flex-direction: column; gap: 12px;
  overflow: hidden;
}

.pv2-party-card, .pv2-notes-card {
  background: rgba(var(--glass-solid-rgb),0.6); border-radius: 16px;
  border: 1px solid rgba(255,255,255,0.05);
  display: flex; flex-direction: column; overflow: hidden;
}
.pv2-party-card { flex: 1; min-height: 0; }
.pv2-notes-card { flex: 1; min-height: 0; }
.pv2-party-list { flex: 1; overflow-y: auto; padding: 8px; scrollbar-width: thin; display: flex; flex-direction: column; gap: 4px; }

.pv2-party-member {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px; border-radius: 10px;
  background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.03);
  transition: all var(--transition-smooth);
}
.pv2-party-member.on-turn {
  background: rgba(var(--accent-rgb),0.06); border-color: rgba(var(--accent-rgb),0.12);
  box-shadow: 0 0 12px rgba(var(--accent-rgb),0.06);
}
.pv2-party-member.is-me { border-color: rgba(var(--accent-purple-rgb),0.15); }
.pv2-party-avatar {
  width: 34px; height: 34px; border-radius: 50%;
  background: linear-gradient(135deg, var(--avatar-start), var(--avatar-end));
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700; color: var(--avatar-text); flex-shrink: 0;
}
.pv2-party-avatar.dm { background: linear-gradient(135deg, var(--accent-purple), var(--accent-purple-dark)); color: white; font-size: 14px; }
.pv2-party-info { flex: 1; min-width: 0; }
.pv2-party-name {
  font-size: 13px; font-weight: 600; color: white;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.pv2-party-detail { font-size: 11px; color: rgba(255,255,255,0.4); }
.pv2-party-role {
  font-size: 9px; font-weight: 700; text-transform: uppercase; padding: 2px 7px;
  border-radius: 999px; letter-spacing: 0.3px; flex-shrink: 0;
}
.pv2-party-role.dm { background: rgba(var(--accent-purple-rgb),0.12); color: var(--accent-purple); }
.pv2-party-role.player { background: rgba(var(--primary-rgb),0.1); color: var(--gradient-end); }

.pv2-notes-area {
  flex: 1; margin: 0 10px; padding: 10px; border: 1px solid rgba(255,255,255,0.06);
  background: rgba(0,0,0,0.15); border-radius: 12px; color: white;
  font-size: 13px; line-height: 1.5; resize: none; outline: none; font-family: inherit;
  min-height: 80px;
}
.pv2-notes-area:focus { border-color: rgba(var(--accent-rgb),0.2); }
.pv2-notes-hint { font-size: 10px; color: rgba(255,255,255,0.25); padding: 4px 14px 10px; }

/* =====================================================
   PLAYER VIEW – MOBILE REDESIGN
   Bottom tab bar, compact hero, full-screen panels
   ===================================================== */

/* Hide mobile wrapper on desktop, desktop shell on mobile */
.pv2-mobile-wrapper { display: none !important; }
@media (max-width: 768px) {
  .pv2-shell { display: none !important; }
  .pv2-mobile-wrapper {
    display: flex !important;
    flex-direction: column;
    position: fixed;
    top: 60px;
    left: 0;
    right: 0;
    bottom: 0;
    overflow: hidden;
    z-index: 50;
  }
}

/* ===== MOBILE HERO BAR ===== */
.pv2-mob-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: rgba(var(--lp-dark-rgb), 0.92);
  border-bottom: 1px solid rgba(255,255,255,0.06);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  flex-shrink: 0;
  gap: 10px;
  margin-bottom: 6px;
}
.pv2-mob-hero-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 1;
}
.pv2-mob-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--avatar-start), var(--avatar-end));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  font-weight: 700;
  color: var(--avatar-text);
  flex-shrink: 0;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(var(--primary-rgb),0.2);
}
.pv2-mob-avatar img { width: 100%; height: 100%; object-fit: cover; }
.pv2-mob-hero-info { min-width: 0; }
.pv2-mob-hero-name {
  font-size: 14px;
  font-weight: 700;
  color: white;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pv2-mob-hero-meta {
  font-size: 11px;
  color: rgba(255,255,255,0.45);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pv2-mob-hero-stats {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  flex-shrink: 0;
}
.pv2-mob-hp {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 3px;
}
.pv2-mob-hp-text {
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}
.pv2-mob-hp-bar {
  width: 80px;
  height: 4px;
  border-radius: 2px;
  background: rgba(255,255,255,0.08);
  overflow: hidden;
}
.pv2-mob-hp-fill {
  height: 100%;
  border-radius: 2px;
  transition: width 0.5s ease, background 0.4s ease;
}
.pv2-mob-mini-stats {
  display: flex;
  gap: 8px;
  font-size: 11px;
  color: rgba(255,255,255,0.5);
  font-weight: 600;
}
.pv2-mob-mini-stats span {
  white-space: nowrap;
}

/* ===== MOBILE TAB PANELS ===== */
.pv2-mob-tabs-content {
  flex: 1;
  min-height: 0;
  overflow: hidden;
  position: relative;
}
.pv2-mob-panel {
  display: none;
  flex-direction: column;
  height: 100%;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.pv2-mob-panel.active {
  display: flex;
}

/* ===== MOBILE BOTTOM TAB BAR ===== */
.pv2-mob-tab-bar {
  display: flex;
  justify-content: space-around;
  align-items: stretch;
  background: rgba(var(--lp-dark-rgb), 0.96);
  border-top: 1px solid rgba(255,255,255,0.06);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  flex-shrink: 0;
  padding: 4px 0;
  padding-bottom: max(4px, env(safe-area-inset-bottom));
}
.pv2-mob-tab {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 6px 4px;
  border: none;
  background: transparent;
  cursor: pointer;
  color: rgba(255,255,255,0.35);
  transition: color 0.2s ease;
  position: relative;
  -webkit-tap-highlight-color: transparent;
}
.pv2-mob-tab.active {
  color: var(--accent-green);
}
.pv2-mob-tab.active::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 24px;
  height: 2px;
  border-radius: 1px;
  background: var(--accent-green);
}
.pv2-mob-tab-icon {
  font-size: 20px;
  line-height: 1;
}
.pv2-mob-tab-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.2px;
}

/* ===== MOBILE MAP TAB – Immersive full-bleed ===== */
.pv2-mob-map-screen {
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: rgba(var(--lp-dark-rgb), 1);
}
.pv2-mob-map-screen .pv2-mob-map-canvas {
  flex: 1;
  min-height: 0;
}

/* Floating zoom pill */
.pv2-mob-zoom-pill {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 20;
  display: flex;
  flex-direction: column;
  align-items: center;
  background: rgba(var(--lp-dark-rgb), 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.08);
  box-shadow: 0 4px 16px rgba(0,0,0,0.4);
  overflow: hidden;
}
.pv2-mob-zoom-btn {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: transparent;
  color: rgba(255,255,255,0.8);
  font-size: 18px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
  -webkit-tap-highlight-color: transparent;
}
.pv2-mob-zoom-btn:active {
  background: rgba(var(--accent-rgb),0.15);
  color: var(--accent-green);
}
.pv2-mob-zoom-reset {
  font-size: 16px;
  font-weight: 400;
}
.pv2-mob-zoom-divider {
  width: 22px;
  height: 1px;
  background: rgba(255,255,255,0.08);
}

/* Decisions drawer */
.pv2-mob-drawer {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 25;
  display: flex;
  flex-direction: column;
  max-height: 60%;
  transform: translateY(calc(100% - 44px));
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}
.pv2-mob-drawer.open {
  transform: translateY(0);
}
.pv2-mob-drawer-handle {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 8px 16px 10px;
  border: none;
  background: rgba(var(--lp-dark-rgb), 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid rgba(255,255,255,0.08);
  border-radius: 18px 18px 0 0;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  width: 100%;
}
.pv2-mob-drawer-pill {
  width: 36px;
  height: 4px;
  border-radius: 2px;
  background: rgba(255,255,255,0.2);
  flex-shrink: 0;
}
.pv2-mob-drawer-label {
  font-size: 12px;
  font-weight: 700;
  color: rgba(255,255,255,0.7);
  letter-spacing: 0.3px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.pv2-mob-drawer-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 9px;
  background: linear-gradient(135deg, var(--accent-purple-dark), var(--accent-purple));
  color: white;
  font-size: 10px;
  font-weight: 800;
}
.pv2-mob-drawer-body {
  background: rgba(var(--lp-dark-rgb), 0.95);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  flex: 1;
  min-height: 0;
}
.pv2-mob-drawer-content {
  padding: 8px 14px 16px;
}
.pv2-mob-drawer-empty {
  text-align: center;
  padding: 20px 16px;
  color: rgba(255,255,255,0.3);
  font-size: 13px;
  font-style: italic;
}

/* No-map empty state */
.pv2-mob-no-map {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  gap: 8px;
  padding: 40px 20px;
}
.pv2-mob-no-map-icon {
  font-size: 56px;
  opacity: 0.35;
  filter: grayscale(0.5);
}
.pv2-mob-no-map-title {
  font-size: 18px;
  font-weight: 700;
  color: rgba(255,255,255,0.35);
}
.pv2-mob-no-map-sub {
  font-size: 13px;
  color: rgba(255,255,255,0.2);
  text-align: center;
  max-width: 240px;
  line-height: 1.5;
}

/* ===== MOBILE CHARACTER TAB ===== */
.pv2-mob-char-full {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.pv2-mob-char-identity {
  text-align: center;
  padding: 20px 14px 16px;
  background: rgba(var(--glass-solid-rgb),0.6);
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,0.05);
}
.pv2-mob-char-hp {
  background: rgba(var(--glass-solid-rgb),0.6);
  border-radius: 16px;
  padding: 14px;
  border: 1px solid rgba(255,255,255,0.05);
}
.pv2-mob-char-section {
  background: rgba(var(--glass-solid-rgb),0.6);
  border-radius: 16px;
  padding: 14px;
  border: 1px solid rgba(255,255,255,0.05);
}
.pv2-mob-abilities-grid {
  grid-template-columns: repeat(3, 1fr) !important;
}
.pv2-mob-skills-list {
  max-height: none;
}

/* ===== MOBILE DICE TAB ===== */
.pv2-mob-dice-card {
  margin: 16px;
  flex: 1;
  border-radius: 18px !important;
}
.pv2-mob-dice-card .pv2-dice-body {
  padding: 16px;
}
.pv2-mob-dice-card .pv2-dice-display {
  padding: 20px 10px;
}
.pv2-mob-dice-card .pv2-dice-value {
  font-size: 52px;
}
.pv2-mob-dice-card .pv2-roll-btn {
  padding: 14px;
  font-size: 16px;
  border-radius: 14px;
}
.pv2-mob-dice-card .pv2-dice-chips {
  gap: 6px;
}
.pv2-mob-dice-card .pv2-dice-chip {
  padding: 6px 12px;
  font-size: 13px;
}

/* ===== MOBILE PARTY TAB ===== */
.pv2-mob-party-card {
  margin: 16px 16px 8px;
  border-radius: 18px !important;
  flex: 0 0 auto;
}
.pv2-mob-party-card .pv2-party-list {
  padding: 10px;
}
.pv2-mob-notes-card {
  margin: 8px 16px 16px;
  border-radius: 18px !important;
  flex: 1;
  min-height: 120px;
}
.pv2-mob-notes-card .pv2-notes-area {
  min-height: 100px;
}

/* ===== MOBILE TURN BANNER ADJUSTMENT ===== */
@media (max-width: 768px) {
  .pv2-turn-banner {
    top: auto;
    bottom: 70px;
    left: 50%;
    right: auto;
    transform: translateX(-50%) translateY(100%);
    opacity: 0;
    width: auto;
    max-width: 85vw;
    padding: 8px 18px;
    font-size: 12px;
    border-radius: 999px;
    pointer-events: none;
    box-shadow: 0 4px 20px rgba(0,0,0,0.4);
  }
  .pv2-turn-banner.visible {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
    pointer-events: auto;
  }
  .dice-toast {
    top: auto;
    bottom: 70px;
    left: 50%;
    right: auto;
    transform: translateX(-50%) translateY(20px);
    opacity: 0;
    max-width: 80vw;
    border-radius: 14px;
    pointer-events: none;
    transition: transform 0.3s ease, opacity 0.3s ease;
  }
  .dice-toast.visible {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
    pointer-events: auto;
  }
}

/* =====================================================
   TABLE VIEW – Full-screen projected display
   ===================================================== */
body.table-view-active {
  overflow: hidden;
  cursor: default;
}
.table-view {
  position: fixed;
  inset: 0;
  display: grid;
  grid-template-columns: 320px 1fr;
  background: linear-gradient(135deg, rgba(var(--glass-dark-rgb),1) 0%, rgba(var(--glass-solid-rgb),1) 50%, rgba(var(--glass-dark-rgb),1) 100%);
  color: var(--text);
  font-family: 'Segoe UI', 'Inter', sans-serif;
  z-index: 100;
}

/* ===== SIDEBAR ===== */
.table-sidebar {
  display: flex;
  flex-direction: column;
  background: rgba(var(--lp-dark-rgb), 0.85);
  border-right: 1px solid rgba(var(--accent-green-rgb), 0.08);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  overflow-y: auto;
  padding: 0;
}

.table-sidebar-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 24px 20px 16px;
  border-bottom: 1px solid rgba(var(--accent-green-rgb), 0.06);
}
.table-sidebar-icon {
  font-size: 28px;
  filter: drop-shadow(0 0 8px rgba(var(--accent-green-rgb), 0.3));
}
.table-sidebar-title {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.table-turn-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 16px 20px 8px;
}
.table-section-icon {
  font-size: 16px;
  opacity: 0.8;
}
.table-turn-header h3 {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: rgba(255, 255, 255, 0.5);
}

/* ===== PLAYER LIST ===== */
.table-player-list {
  flex: 1;
  padding: 8px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.table-player-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.04);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}
.table-player-card.inactive {
  opacity: 0.35;
  filter: grayscale(0.6);
}
.table-player-card.active-turn {
  background: rgba(var(--accent-green-rgb), 0.08);
  border-color: rgba(var(--accent-green-rgb), 0.2);
  box-shadow: 0 0 24px rgba(var(--accent-green-rgb), 0.08), inset 0 0 20px rgba(var(--accent-green-rgb), 0.03);
}
.table-player-card.active-turn::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 12px;
  border: 1.5px solid rgba(var(--accent-green-rgb), 0.25);
  animation: table-glow-pulse 2.5s ease-in-out infinite;
  pointer-events: none;
}
@keyframes table-glow-pulse {
  0%, 100% { opacity: 0.4; box-shadow: 0 0 8px rgba(var(--accent-green-rgb), 0.1); }
  50% { opacity: 1; box-shadow: 0 0 20px rgba(var(--accent-green-rgb), 0.15); }
}

.table-player-order {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.4);
  flex-shrink: 0;
}
.table-player-card.active-turn .table-player-order {
  background: rgba(var(--accent-green-rgb), 0.15);
  color: var(--accent-green);
}

.table-player-avatar {
  font-size: 24px;
  flex-shrink: 0;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
}

.table-player-info {
  flex: 1;
  min-width: 0;
}
.table-player-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.table-player-card.active-turn .table-player-name {
  color: var(--accent-green);
}

.table-player-hp {
  display: flex;
  align-items: center;
  gap: 8px;
}
.table-hp-bar {
  flex: 1;
  height: 6px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}
.table-hp-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.6s ease, background 0.4s ease;
}
.table-hp-text {
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  min-width: 48px;
  text-align: right;
}

.table-turn-indicator {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
}
.table-turn-pulse {
  display: block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent-green);
  box-shadow: 0 0 8px rgba(var(--accent-green-rgb), 0.5);
  animation: table-pulse-dot 2s ease-in-out infinite;
}
@keyframes table-pulse-dot {
  0%, 100% { transform: scale(1); opacity: 0.8; }
  50% { transform: scale(1.3); opacity: 1; }
}

/* ===== DICE DISPLAY ===== */
.table-dice-display {
  border-top: 1px solid rgba(var(--accent-green-rgb), 0.06);
  padding: 12px 12px 16px;
}
.table-dice-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 8px 8px;
}
.table-dice-header h3 {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: rgba(255, 255, 255, 0.5);
}
.table-dice-roll {
  background: rgba(var(--accent-purple-rgb), 0.08);
  border: 1px solid rgba(var(--accent-purple-rgb), 0.15);
  border-radius: 12px;
  padding: 14px;
  text-align: center;
  animation: table-dice-appear 0.4s ease-out;
}
.table-dice-roll.crit {
  background: rgba(var(--accent-green-rgb), 0.08);
  border-color: rgba(var(--accent-green-rgb), 0.2);
}
.table-dice-roll.fail {
  background: rgba(255, 82, 82, 0.08);
  border-color: rgba(255, 82, 82, 0.2);
}
@keyframes table-dice-appear {
  from { transform: scale(0.9); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}
.table-dice-player {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.5);
  margin-bottom: 4px;
}
.table-dice-type {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--accent-purple);
  margin-bottom: 6px;
}
.table-dice-value {
  font-size: 36px;
  font-weight: 800;
  color: white;
  line-height: 1;
  margin-bottom: 4px;
  text-shadow: 0 0 16px rgba(var(--accent-purple-rgb), 0.4);
}
.table-dice-roll.crit .table-dice-value {
  color: var(--accent-green);
  text-shadow: 0 0 20px rgba(var(--accent-green-rgb), 0.5);
}
.table-dice-roll.fail .table-dice-value {
  color: var(--danger);
  text-shadow: 0 0 20px rgba(255, 82, 82, 0.5);
}
.table-dice-label {
  font-size: 12px;
  font-weight: 600;
  margin-top: 4px;
}
.table-dice-label.crit { color: var(--accent-green); }
.table-dice-label.fail { color: var(--danger); }

/* ===== MAP AREA ===== */
.table-map-area {
  display: flex;
  align-items: stretch;
  justify-content: stretch;
  padding: 16px;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
}
.table-map-container {
  flex: 1;
  border-radius: 16px;
  overflow: hidden;
  position: relative;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(var(--accent-green-rgb), 0.06);
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.4);
}

.table-no-map {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: rgba(255, 255, 255, 0.3);
  gap: 12px;
}
.table-no-map span {
  font-size: 48px;
  opacity: 0.5;
}
.table-no-map p {
  margin: 0;
  font-size: 16px;
}

.table-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 40px;
  color: rgba(255, 255, 255, 0.4);
  font-size: 14px;
}
.table-empty {
  padding: 20px;
  text-align: center;
  color: rgba(255, 255, 255, 0.3);
  font-size: 14px;
}

/* Responsive: stack on narrow screens */
@media (max-width: 768px) {
  .table-view {
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr;
  }
  .table-sidebar {
    border-right: none;
    border-bottom: 1px solid rgba(var(--accent-green-rgb),0.08);
    max-height: 35vh;
  }
}
