/* ==========================================================================
   Umbraen Tabletop VTT — Arcane Observatory Design System
   Dark Obsidian & Astral Brass (matches Campaign Master Studio aesthetic)
   ========================================================================== */
:root {
  --bg-void: #07090f;
  --bg-obsidian: #0b0e17;
  --bg-panel: #111521;
  --bg-elevated: #171c2b;
  --bg-hover: #1f2436;

  --brass: #dfc07a;
  --brass-bright: #f0d9a3;
  --brass-dim: #a8894a;
  --brass-glow: rgba(223, 192, 122, 0.32);
  --brass-hairline: rgba(212, 175, 99, 0.22);

  --amethyst: #8b5cf6;
  --amethyst-bright: #a78bfa;
  --amethyst-glow: rgba(139, 92, 246, 0.35);

  --cyan: #22d3ee;
  --cyan-glow: rgba(34, 211, 238, 0.32);

  --emerald: #34d399;
  --amber: #fbbf24;
  --crimson: #f43f5e;

  --text-primary: #f3efe6;
  --text-secondary: #cbc3b2;
  --text-muted: #9a9182;

  --font-display: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Palatino, Georgia, serif;
  --font-sans: "Inter", "Segoe UI", system-ui, -apple-system, Arial, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, Consolas, monospace;

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --shadow-panel: 0 22px 54px rgba(0, 0, 0, 0.65), 0 1px 0 rgba(255, 255, 255, 0.04) inset;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: var(--bg-void);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.5;
  color-scheme: dark;
  -webkit-font-smoothing: antialiased;
}

[hidden] {
  display: none !important;
}

h1, h2, h3 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 600;
}

/* --------------------------------------------------------------------------
   Shared Buttons & Inputs
   -------------------------------------------------------------------------- */
.vtt-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 6px 11px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--brass-hairline);
  background: var(--bg-elevated);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 12.5px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.14s ease, border-color 0.14s ease, transform 0.1s ease;
  white-space: nowrap;
}

.vtt-btn:hover {
  background: var(--bg-hover);
  border-color: var(--brass);
}

.vtt-btn:active {
  transform: translateY(1px);
}

.vtt-btn-sm {
  padding: 4px 8px;
  font-size: 12px;
}

.vtt-btn-primary {
  background: linear-gradient(180deg, rgba(223, 192, 122, 0.24), rgba(168, 137, 74, 0.16));
  border-color: var(--brass);
  color: var(--brass-bright);
}

.vtt-btn-primary:hover {
  background: linear-gradient(180deg, rgba(223, 192, 122, 0.34), rgba(168, 137, 74, 0.24));
}

.vtt-btn-accent {
  background: rgba(34, 211, 238, 0.12);
  border-color: rgba(34, 211, 238, 0.4);
  color: var(--cyan);
}

.vtt-btn-accent:hover {
  background: rgba(34, 211, 238, 0.22);
}

.vtt-btn-ghost {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.1);
  color: var(--text-secondary);
}

.vtt-btn.is-frozen {
  background: rgba(34, 211, 238, 0.18);
  border-color: var(--cyan);
  color: var(--cyan);
  box-shadow: 0 0 14px var(--cyan-glow);
}

.vtt-btn.is-following {
  background: rgba(223, 192, 122, 0.22);
  border-color: var(--brass-bright);
  color: var(--brass-bright);
  box-shadow: 0 0 14px var(--brass-glow);
}

.vtt-btn.is-dirty {
  border-color: var(--amber);
  box-shadow: 0 0 14px rgba(251, 191, 36, 0.35);
}

.vtt-select {
  padding: 5px 9px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--brass-hairline);
  background: var(--bg-elevated);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 12.5px;
}

/* --------------------------------------------------------------------------
   DM Shell Layout
   -------------------------------------------------------------------------- */
.dm-shell {
  display: flex;
  flex-direction: column;
  width: 100vw;
  height: 100vh;
}

.dm-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 14px;
  min-height: 54px;
  background: linear-gradient(180deg, #131826, #0d111b);
  border-bottom: 1px solid var(--brass-hairline);
  z-index: 30;
  flex-wrap: wrap;
}

.dm-toolbar-group {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
}

.dm-brand {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 600;
  color: var(--brass-bright);
  letter-spacing: 0.03em;
  padding-right: 6px;
}

.dm-pending-badge {
  display: inline-block;
  margin-left: 4px;
  padding: 1px 6px;
  border-radius: 999px;
  background: var(--amber);
  color: #090b10;
  font-size: 10.5px;
  font-weight: 700;
}

.vtt-sync-pill {
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 600;
  border: 1px solid transparent;
}

.vtt-sync-pill.is-connected {
  background: rgba(52, 211, 153, 0.14);
  border-color: rgba(52, 211, 153, 0.45);
  color: var(--emerald);
}

.vtt-sync-pill.is-waiting {
  background: rgba(251, 191, 36, 0.12);
  border-color: rgba(251, 191, 36, 0.35);
  color: var(--amber);
}

.dm-main {
  position: relative;
  flex: 1;
  display: flex;
  min-height: 0;
  overflow: hidden;
}

.vtt-stage-host {
  position: relative;
  flex: 1;
  min-width: 0;
  height: 100%;
  background: radial-gradient(circle at 50% 45%, #121726 0%, #07090f 75%);
}

.vtt-encounter-dock {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* --------------------------------------------------------------------------
   Charter Board Drawer (DM Sidebar)
   -------------------------------------------------------------------------- */
.dm-drawer {
  width: 356px;
  max-width: 92vw;
  display: flex;
  flex-direction: column;
  background: var(--bg-panel);
  border-left: 1px solid var(--brass-hairline);
  z-index: 25;
  overflow: hidden;
}

.dm-drawer.is-collapsed {
  display: none;
}

.dm-drawer-header {
  padding: 12px 14px;
  border-bottom: 1px solid var(--brass-hairline);
  background: var(--bg-obsidian);
}

.dm-drawer-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.dm-drawer-title-row h2 {
  font-size: 16px;
  color: var(--brass-bright);
}

.dm-counts {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.dm-count-chip {
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  background: var(--bg-elevated);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-secondary);
}

.dm-count-chip.is-g1 {
  border-color: rgba(139, 92, 246, 0.5);
  color: var(--amethyst-bright);
}

.dm-count-chip.is-g2 {
  border-color: rgba(34, 211, 238, 0.5);
  color: var(--cyan);
}

.dm-drawer-tools {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.dm-charter-list {
  flex: 1;
  overflow-y: auto;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.dm-charter-item {
  padding: 10px 11px;
  border-radius: var(--radius-md);
  background: var(--bg-elevated);
  border: 1px solid rgba(212, 175, 99, 0.14);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.dm-charter-item.is-on-table {
  border-color: var(--brass);
  box-shadow: 0 0 16px rgba(223, 192, 122, 0.22);
}

.dm-charter-item.status-group1 {
  border-left: 3px solid var(--amethyst);
}

.dm-charter-item.status-group2 {
  border-left: 3px solid var(--cyan);
}

.dm-charter-item.is-hub {
  background: linear-gradient(135deg, rgba(34, 211, 238, 0.08), rgba(223, 192, 122, 0.08));
  border-color: rgba(34, 211, 238, 0.3);
}

.dm-charter-item-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.dm-charter-item-title {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
}

.dm-charter-item-sub {
  font-size: 12px;
  color: var(--text-secondary);
}

.dm-charter-status-row select {
  width: 100%;
}

.dm-charter-item-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

/* --------------------------------------------------------------------------
   Canvas Stage & GPU World Layer
   -------------------------------------------------------------------------- */
.vtt-viewport {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  user-select: none;
}

.vtt-viewport.is-interactive {
  cursor: grab;
}

.vtt-viewport.is-interactive.is-dragging {
  cursor: grabbing;
}

.vtt-world {
  position: absolute;
  top: 0;
  left: 0;
  transform-origin: 0 0;
  will-change: transform;
}

.vtt-map-img {
  display: block;
  position: absolute;
  top: 0;
  left: 0;
  pointer-events: none;
}

.vtt-world-layers {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.vtt-screen-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 12;
}

/* --------------------------------------------------------------------------
   World Map Pins Layer
   -------------------------------------------------------------------------- */
.vtt-pins-layer {
  position: absolute;
  inset: 0;
}

.vtt-pins-layer.is-interactive {
  pointer-events: auto;
}

.vtt-pins-layer.is-display {
  pointer-events: none;
}

.vtt-pin {
  position: absolute;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0;
  border: none;
  background: transparent;
  color: var(--text-primary);
  transform-origin: 0 0;
  transform: rotate(calc(-1 * var(--vtt-rot, 0deg))) scale(var(--vtt-inv, 1)) translate(-50%, -50%);
  cursor: pointer;
  z-index: 5;
}

.vtt-pins-layer.is-display .vtt-pin {
  cursor: default;
  pointer-events: none;
}

.vtt-pin-beacon {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--brass);
  border: 2px solid #090b10;
  box-shadow: 0 0 0 3px rgba(223, 192, 122, 0.35), 0 4px 12px rgba(0, 0, 0, 0.7);
  flex-shrink: 0;
}

.vtt-pin-hub .vtt-pin-beacon {
  width: 18px;
  height: 18px;
  background: var(--cyan);
  box-shadow: 0 0 0 4px rgba(34, 211, 238, 0.38), 0 4px 14px rgba(0, 0, 0, 0.75);
}

.vtt-pin.status-group1 .vtt-pin-beacon {
  background: var(--amethyst-bright);
  box-shadow: 0 0 0 3px var(--amethyst-glow), 0 4px 12px rgba(0, 0, 0, 0.7);
}

.vtt-pin.status-group2 .vtt-pin-beacon {
  background: var(--cyan);
  box-shadow: 0 0 0 3px var(--cyan-glow), 0 4px 12px rgba(0, 0, 0, 0.7);
}

.vtt-pin.is-selected .vtt-pin-beacon {
  transform: scale(1.25);
  box-shadow: 0 0 0 5px rgba(251, 191, 36, 0.55), 0 4px 16px rgba(0, 0, 0, 0.85);
}

.vtt-pin-label {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  background: rgba(11, 14, 23, 0.9);
  border: 1px solid var(--brass-hairline);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.65);
  white-space: nowrap;
}

.vtt-pin-name {
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.2;
}

.vtt-pin-badge {
  font-size: 10px;
  font-weight: 600;
  color: var(--brass);
  line-height: 1.2;
}

.vtt-pin-hub .vtt-pin-badge {
  color: var(--cyan);
}

.vtt-pin.status-group1 .vtt-pin-badge {
  color: var(--amethyst-bright);
}

.vtt-pin.status-group2 .vtt-pin-badge {
  color: var(--cyan);
}

/* --------------------------------------------------------------------------
   Missing Asset Placeholder (Pending #91-#96 Hub Maps)
   -------------------------------------------------------------------------- */
.vtt-missing-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: radial-gradient(circle at center, rgba(23, 28, 43, 0.85), rgba(7, 9, 15, 0.96));
  z-index: 15;
}

.vtt-missing-card {
  max-width: 500px;
  padding: 26px 28px;
  border-radius: var(--radius-lg);
  background: var(--bg-panel);
  border: 1px solid var(--brass-hairline);
  box-shadow: var(--shadow-panel);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.vtt-missing-badge {
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(251, 191, 36, 0.14);
  border: 1px solid rgba(251, 191, 36, 0.45);
  color: var(--amber);
  font-size: 11.5px;
  font-weight: 600;
}

.vtt-missing-title {
  font-size: 22px;
  color: var(--brass-bright);
}

.vtt-missing-desc {
  margin: 0;
  color: var(--text-secondary);
  font-size: 13.5px;
}

.vtt-missing-path {
  display: block;
  max-width: 100%;
  overflow-wrap: anywhere;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  background: var(--bg-void);
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 11.5px;
}

/* --------------------------------------------------------------------------
   Player Charter Card Modal (DM Preview & Player Display)
   -------------------------------------------------------------------------- */
.vtt-modal-host {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 20;
}

.vtt-charter-modal {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(7, 9, 15, 0.58);
  backdrop-filter: blur(4px);
  pointer-events: auto;
}

.vtt-charter-card {
  width: min(640px, 94vw);
  max-height: 88vh;
  overflow-y: auto;
  padding: 24px 26px;
  border-radius: var(--radius-lg);
  background: linear-gradient(170deg, #161b29 0%, #0e121c 100%);
  border: 1px solid var(--brass);
  box-shadow: var(--shadow-panel), 0 0 36px rgba(223, 192, 122, 0.18);
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.vtt-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.vtt-card-loc {
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--brass);
}

.vtt-status-pill {
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 600;
  border: 1px solid var(--brass-hairline);
  background: rgba(223, 192, 122, 0.12);
  color: var(--brass-bright);
}

.vtt-status-pill.status-available {
  border-color: rgba(52, 211, 153, 0.45);
  background: rgba(52, 211, 153, 0.14);
  color: var(--emerald);
}

.vtt-status-pill.status-group1 {
  border-color: rgba(139, 92, 246, 0.55);
  background: rgba(139, 92, 246, 0.18);
  color: var(--amethyst-bright);
}

.vtt-status-pill.status-group2 {
  border-color: rgba(34, 211, 238, 0.55);
  background: rgba(34, 211, 238, 0.18);
  color: var(--cyan);
}

.vtt-status-pill.status-hub {
  border-color: rgba(34, 211, 238, 0.4);
  background: rgba(34, 211, 238, 0.12);
  color: var(--cyan);
}

.vtt-card-title {
  font-size: 24px;
  color: var(--text-primary);
  line-height: 1.25;
}

.vtt-card-meta {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.vtt-card-pillars {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.vtt-pillar-chip {
  padding: 2px 9px;
  border-radius: 999px;
  background: rgba(139, 92, 246, 0.16);
  border: 1px solid rgba(139, 92, 246, 0.35);
  color: var(--amethyst-bright);
  font-size: 11.5px;
  font-weight: 600;
}

.vtt-card-tone {
  font-size: 13px;
  color: var(--text-secondary);
}

.vtt-field-label {
  color: var(--brass);
  font-weight: 600;
}

.vtt-card-section {
  padding-top: 8px;
  border-top: 1px solid rgba(212, 175, 99, 0.14);
}

.vtt-section-heading {
  font-size: 12px;
  font-family: var(--font-sans);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--brass);
  margin-bottom: 5px;
}

.vtt-card-section p {
  margin: 0;
  color: var(--text-primary);
  font-size: 14px;
  line-height: 1.55;
}

.vtt-card-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  padding-top: 10px;
  border-top: 1px solid rgba(212, 175, 99, 0.18);
}

/* --------------------------------------------------------------------------
   Player Display Shell
   -------------------------------------------------------------------------- */
.player-shell {
  position: relative;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  background: var(--bg-void);
}

.player-map-badge {
  position: fixed;
  top: 14px;
  left: 14px;
  padding: 6px 13px;
  border-radius: 999px;
  background: rgba(11, 14, 23, 0.78);
  border: 1px solid var(--brass-hairline);
  color: var(--brass-bright);
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.02em;
  z-index: 18;
  pointer-events: none;
  backdrop-filter: blur(4px);
}

.player-waiting-overlay {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at 50% 45%, #151a2b 0%, #07090f 80%);
  z-index: 40;
}

.player-waiting-card {
  text-align: center;
  padding: 32px 38px;
  border-radius: var(--radius-lg);
  background: var(--bg-panel);
  border: 1px solid var(--brass-hairline);
  box-shadow: var(--shadow-panel);
  max-width: 440px;
}

.player-waiting-card h1 {
  font-size: 24px;
  color: var(--brass-bright);
  margin-bottom: 10px;
}

.player-waiting-card p {
  margin: 0;
  color: var(--text-secondary);
}

.vtt-turn-banner {
  position: fixed;
  top: 14px;
  right: 14px;
  z-index: 22;
  pointer-events: none;
}

.dm-toast {
  position: fixed;
  bottom: 18px;
  left: 50%;
  transform: translateX(-50%);
  padding: 8px 16px;
  border-radius: 999px;
  background: rgba(17, 21, 33, 0.95);
  border: 1px solid var(--brass);
  color: var(--brass-bright);
  font-size: 13px;
  box-shadow: var(--shadow-panel);
  z-index: 60;
  pointer-events: none;
}


/* ==========================================================================
   Tabletop VTT v0.2 — DM Encounter Runner & Shared Tactical Layers
   ========================================================================== */

.vtt-btn.is-active-tool {
  background: rgba(223, 192, 122, 0.24);
  border-color: var(--brass);
  color: var(--brass-bright);
  box-shadow: 0 0 12px rgba(223, 192, 122, 0.28);
}

.vtt-input {
  width: 100%;
  min-width: 0;
  padding: 5px 8px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--brass-hairline);
  background: var(--bg-obsidian);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 12.5px;
}

.vtt-input:focus {
  outline: none;
  border-color: var(--brass);
}

.vtt-color-input {
  width: 100%;
  height: 30px;
  padding: 2px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--brass-hairline);
  background: var(--bg-obsidian);
  cursor: pointer;
}

.vtt-viewport[data-tool="fog"],
.vtt-viewport[data-tool="ruler"] {
  cursor: crosshair;
}

/* 5-ft Grid Overlay (World Layer z-index 3: above map, below tokens & fog) */
.vtt-grid-layer {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
}

/* Tokens Layer (World Layer z-index 6) */
.vtt-tokens-layer {
  position: absolute;
  inset: 0;
  z-index: 6;
  pointer-events: none;
}

.vtt-token {
  position: absolute;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  pointer-events: none;
  user-select: none;
  transition: box-shadow 0.12s ease;
}

.vtt-tokens-layer.is-interactive .vtt-token {
  pointer-events: auto;
  cursor: grab;
}

.vtt-tokens-layer.is-interactive .vtt-token.is-dragging {
  cursor: grabbing;
  z-index: 20;
}

.vtt-token-disc {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 3px solid var(--token-color, var(--cyan));
  background: radial-gradient(circle at 32% 30%, #242b40 0%, #0b0f1a 82%);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.72), 0 0 0 2px rgba(7, 9, 15, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  transform: rotate(calc(-1 * var(--vtt-rot, 0deg)));
}

.vtt-token.is-selected .vtt-token-disc {
  box-shadow: 0 0 0 4px rgba(223, 192, 122, 0.72), 0 6px 20px rgba(0, 0, 0, 0.85);
}

.vtt-token.is-hidden {
  opacity: 0.48;
}

.vtt-token.is-hidden .vtt-token-disc {
  border-style: dashed;
}

.vtt-token-initials {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: 0.03em;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.85);
  line-height: 1;
}

.vtt-token-name {
  position: absolute;
  top: calc(100% + 4px);
  left: 50%;
  transform: translateX(-50%);
  padding: 1px 7px;
  border-radius: 999px;
  background: rgba(7, 9, 15, 0.88);
  border: 1px solid rgba(223, 192, 122, 0.28);
  color: var(--text-primary);
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
  pointer-events: none;
}

.vtt-token-hidden-tag {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  padding: 1px 6px;
  border-radius: 999px;
  background: rgba(139, 92, 246, 0.92);
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.06em;
  pointer-events: none;
}

.vtt-token-hp-pill {
  position: absolute;
  bottom: -6px;
  right: -6px;
  padding: 1px 5px;
  border-radius: 999px;
  background: rgba(11, 14, 23, 0.94);
  border: 1px solid rgba(244, 63, 94, 0.65);
  color: #fda4af;
  font-family: var(--font-mono);
  font-size: 9.5px;
  font-weight: 700;
  pointer-events: none;
}

/* Fog of War Layer (World Layer z-index 8: above map, grid & tokens) */
.vtt-fog-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 8;
  pointer-events: none;
}

.vtt-fog-preview-svg,
.vtt-ruler-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
}

.vtt-ruler-label {
  position: absolute;
  transform: translate(-50%, -100%);
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(7, 9, 15, 0.92);
  border: 1px solid var(--cyan);
  color: var(--cyan);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.72);
  pointer-events: none;
}

/* DM Follow Pointer on Player Display */
.vtt-dm-pointer {
  position: absolute;
  left: 0;
  top: 0;
  width: 0;
  height: 0;
  z-index: 20;
  pointer-events: none;
  will-change: transform;
}

.vtt-dm-pointer-halo {
  position: absolute;
  left: 0;
  top: 0;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 2px solid var(--brass-bright);
  background: radial-gradient(circle, rgba(240, 217, 163, 0.32) 0%, rgba(223, 192, 122, 0) 70%);
  box-shadow: 0 0 14px var(--brass-glow);
  transform: translate(-50%, -50%);
  animation: vtt-pointer-pulse 1.5s ease-out infinite;
}

.vtt-dm-pointer-arrow {
  position: absolute;
  left: -2px;
  top: -2px;
  display: block;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.85)) drop-shadow(0 0 6px rgba(223, 192, 122, 0.55));
}

@keyframes vtt-pointer-pulse {
  0% {
    transform: translate(-50%, -50%) scale(0.7);
    opacity: 0.95;
  }
  70% {
    transform: translate(-50%, -50%) scale(1.35);
    opacity: 0.25;
  }
  100% {
    transform: translate(-50%, -50%) scale(1.55);
    opacity: 0;
  }
}

/* Spoiler-Free Player Turn Banner */
.vtt-turn-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 15px;
  border-radius: var(--radius-md);
  background: rgba(11, 14, 23, 0.9);
  border: 1px solid var(--brass);
  box-shadow: var(--shadow-panel);
  backdrop-filter: blur(6px);
}

.vtt-turn-round {
  padding: 4px 9px;
  border-radius: 999px;
  background: rgba(223, 192, 122, 0.16);
  border: 1px solid var(--brass-hairline);
  color: var(--brass-bright);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.vtt-turn-body {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.vtt-turn-active-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.vtt-turn-kicker {
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  font-weight: 600;
}

.vtt-turn-name {
  font-family: var(--font-display);
  font-size: 16px;
  color: var(--text-primary);
}

.vtt-turn-kind {
  padding: 1px 7px;
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 700;
  border: 1px solid transparent;
}

.vtt-turn-kind.kind-pc {
  background: rgba(34, 211, 238, 0.16);
  border-color: rgba(34, 211, 238, 0.45);
  color: var(--cyan);
}

.vtt-turn-kind.kind-npc {
  background: rgba(223, 192, 122, 0.16);
  border-color: rgba(223, 192, 122, 0.45);
  color: var(--brass-bright);
}

.vtt-turn-kind.kind-monster {
  background: rgba(244, 63, 94, 0.16);
  border-color: rgba(244, 63, 94, 0.45);
  color: #fda4af;
}

.vtt-turn-next {
  font-size: 11.5px;
  color: var(--text-secondary);
}

/* DM Drawer Tabs & v0.2 Panels */
.dm-drawer-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  background: var(--bg-void);
  border-bottom: 1px solid var(--brass-hairline);
}

.dm-drawer-tab {
  padding: 9px 6px;
  border: none;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: var(--text-secondary);
  font-family: var(--font-sans);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: color 0.14s ease, border-color 0.14s ease, background 0.14s ease;
}

.dm-drawer-tab:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.03);
}

.dm-drawer-tab.is-active {
  color: var(--brass-bright);
  border-bottom-color: var(--brass);
  background: rgba(223, 192, 122, 0.08);
}

.dm-enc-panel {
  flex: 1;
  overflow-y: auto;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.dm-enc-card {
  padding: 10px 11px;
  border-radius: var(--radius-md);
  background: var(--bg-elevated);
  border: 1px solid rgba(212, 175, 99, 0.16);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.dm-enc-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.dm-enc-card-head h3 {
  font-size: 14px;
  color: var(--brass-bright);
}

.dm-enc-row {
  display: flex;
  gap: 6px;
}

.dm-enc-btn-row {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
  align-items: center;
}

.dm-enc-rot-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.dm-enc-rot-btns {
  display: flex;
  gap: 4px;
}

.dm-enc-label {
  font-size: 12px;
  color: var(--text-secondary);
}

.dm-enc-grid2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

.dm-enc-grid3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}

.dm-enc-grid4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 5px;
}

.dm-enc-field {
  display: flex;
  flex-direction: column;
  gap: 3px;
  font-size: 11px;
  color: var(--text-secondary);
}

.dm-enc-check {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  color: var(--text-primary);
  cursor: pointer;
}

.dm-enc-check-inline {
  font-size: 11.5px;
  color: var(--text-secondary);
}

.dm-enc-hint {
  font-size: 11px;
  color: var(--text-muted);
}

.dm-enc-empty {
  padding: 8px;
  text-align: center;
  font-size: 12px;
  color: var(--text-muted);
}

.dm-enc-list,
.dm-init-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.dm-tok-row {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 6px 8px;
  border-radius: var(--radius-sm);
  background: var(--bg-obsidian);
  border: 1px solid rgba(255, 255, 255, 0.07);
}

.dm-tok-row.is-selected {
  border-color: var(--brass);
}

.dm-tok-row.is-hidden {
  border-style: dashed;
  opacity: 0.85;
}

.dm-tok-dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  flex-shrink: 0;
}

.dm-tok-info {
  flex: 1;
  min-width: 0;
}

.dm-tok-title {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-primary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dm-tok-meta {
  font-size: 10.5px;
  color: var(--text-muted);
}

.dm-init-card {
  padding: 8px 9px;
  border-radius: var(--radius-md);
  background: var(--bg-elevated);
  border: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.dm-init-card.is-active-turn {
  border-color: var(--brass);
  background: linear-gradient(135deg, rgba(223, 192, 122, 0.14), rgba(23, 28, 43, 0.96));
  box-shadow: 0 0 14px rgba(223, 192, 122, 0.24);
}

.dm-init-card.is-hidden {
  border-style: dashed;
}

.dm-init-top {
  display: flex;
  align-items: center;
  gap: 6px;
}

.dm-init-score-input {
  width: 50px;
  text-align: center;
  font-family: var(--font-mono);
  font-weight: 700;
}

.dm-init-name-wrap {
  flex: 1;
  min-width: 0;
}

.dm-init-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dm-init-kind-badge {
  font-size: 10px;
  font-weight: 600;
  color: var(--text-muted);
}

.dm-init-hp-row {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}

.dm-init-hp-val {
  padding: 2px 7px;
  border-radius: var(--radius-sm);
  background: rgba(244, 63, 94, 0.14);
  border: 1px solid rgba(244, 63, 94, 0.35);
  color: #fda4af;
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 700;
}

.dm-init-ac-chip {
  margin-left: auto;
  padding: 2px 7px;
  border-radius: var(--radius-sm);
  background: rgba(34, 211, 238, 0.12);
  border: 1px solid rgba(34, 211, 238, 0.3);
  color: var(--cyan);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
}

.dm-init-notes-input {
  font-size: 11.5px;
}

/* --------------------------------------------------------------------------
   Battlemaps Multi-Layer Switcher, DM-Only Footprints & Off-Floor Tokens
   -------------------------------------------------------------------------- */
.dm-layer-switcher {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 2px;
  border-radius: var(--radius-sm);
  background: var(--bg-obsidian);
  border: 1px solid var(--brass-hairline);
}

.dm-layer-btn {
  border-color: transparent;
  background: transparent;
  color: var(--text-secondary);
}

.dm-layer-btn.is-active-tool {
  background: rgba(34, 211, 238, 0.18);
  border-color: rgba(34, 211, 238, 0.55);
  color: var(--cyan);
}

.vtt-bm-footprints-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 25;
}

.vtt-bm-footprint {
  position: absolute;
  border: calc(3px * var(--vtt-inv, 1)) dashed rgba(34, 211, 238, 0.92);
  background: rgba(34, 211, 238, 0.11);
  box-shadow: 0 0 calc(20px * var(--vtt-inv, 1)) rgba(34, 211, 238, 0.28) inset;
  border-radius: calc(6px * var(--vtt-inv, 1));
  pointer-events: auto;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.vtt-bm-footprint:hover {
  background: rgba(34, 211, 238, 0.22);
  border-color: var(--brass-bright);
}

.vtt-bm-drill-pin {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%) scale(var(--vtt-inv, 1)) rotate(calc(-1 * var(--vtt-rot, 0deg)));
  transform-origin: center center;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  border-radius: 999px;
  border: 1.5px solid rgba(34, 211, 238, 0.85);
  background: rgba(11, 14, 23, 0.92);
  color: var(--text-primary);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.7), 0 0 16px rgba(34, 211, 238, 0.35);
  cursor: pointer;
  pointer-events: auto;
  white-space: nowrap;
  font-family: var(--font-sans);
}

.vtt-bm-drill-pin:hover {
  border-color: var(--brass-bright);
  background: rgba(17, 21, 33, 0.98);
}

.vtt-bm-drill-icon {
  font-size: 14px;
  color: var(--cyan);
}

.vtt-bm-drill-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  line-height: 1.2;
}

.vtt-bm-drill-title {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--brass-bright);
}

.vtt-bm-drill-meta {
  font-size: 10.5px;
  color: var(--cyan);
}

.vtt-token.is-off-layer {
  opacity: 0.32;
  filter: grayscale(0.45);
}

.vtt-token-floor-tag {
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%);
  padding: 1px 5px;
  border-radius: 999px;
  background: rgba(11, 14, 23, 0.92);
  border: 1px solid rgba(34, 211, 238, 0.55);
  color: var(--cyan);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.04em;
  white-space: nowrap;
  pointer-events: none;
}

/* --------------------------------------------------------------------------
   Per-Building Cutout Overlay System (World Layer z-index 1 + DM Popover)
   -------------------------------------------------------------------------- */
.vtt-building-cutouts-layer {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}

.vtt-building-cutouts-imgs {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.vtt-building-cutout-img {
  position: absolute;
  display: block;
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
}

.vtt-buildings-hit-svg {
  position: absolute;
  top: 0;
  left: 0;
  overflow: visible;
  pointer-events: none;
}

.vtt-buildings-hit-svg.is-hidden {
  display: none;
}

.vtt-building-hit-poly {
  fill: rgba(223, 192, 122, 0.001);
  stroke: rgba(223, 192, 122, 0.22);
  stroke-width: 1.5px;
  vector-effect: non-scaling-stroke;
  pointer-events: none;
  transition: fill 0.14s ease, stroke 0.14s ease, stroke-width 0.14s ease;
}

.vtt-buildings-hit-svg.is-interactive .vtt-building-hit-poly {
  pointer-events: auto;
  cursor: pointer;
}

.vtt-buildings-hit-svg.is-tool-blocking .vtt-building-hit-poly {
  pointer-events: none !important;
  cursor: default;
}

.vtt-buildings-hit-svg.is-interactive .vtt-building-hit-poly:hover {
  fill: rgba(223, 192, 122, 0.16);
  stroke: var(--brass-bright);
  stroke-width: 2.25px;
}

.vtt-building-hit-poly.is-open {
  fill: rgba(223, 192, 122, 0.04);
  stroke: rgba(223, 192, 122, 0.82);
  stroke-width: 2px;
  stroke-dasharray: 7 4;
}

.vtt-buildings-hit-svg.is-interactive .vtt-building-hit-poly.is-open:hover {
  fill: rgba(223, 192, 122, 0.18);
  stroke: var(--brass-bright);
  stroke-width: 2.5px;
}

.vtt-building-tooltip {
  position: absolute;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 10px;
  border-radius: var(--radius-sm);
  background: rgba(11, 14, 23, 0.94);
  border: 1px solid var(--brass);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.72), 0 0 12px rgba(223, 192, 122, 0.18);
  pointer-events: none;
  white-space: nowrap;
  z-index: 26;
}

.vtt-building-tooltip-title {
  font-family: var(--font-display);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--brass-bright);
}

.vtt-building-tooltip-floor {
  padding: 1px 6px;
  border-radius: 999px;
  background: rgba(223, 192, 122, 0.14);
  border: 1px solid var(--brass-hairline);
  color: var(--text-secondary);
  font-size: 10.5px;
  font-weight: 600;
}

.vtt-building-popover {
  position: absolute;
  min-width: 210px;
  max-width: 280px;
  padding: 10px;
  border-radius: var(--radius-md);
  background: linear-gradient(175deg, rgba(22, 27, 41, 0.98) 0%, rgba(11, 14, 23, 0.98) 100%);
  border: 1px solid var(--brass);
  box-shadow: var(--shadow-panel), 0 0 24px rgba(223, 192, 122, 0.22);
  backdrop-filter: blur(8px);
  pointer-events: auto;
  z-index: 30;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.vtt-building-popover-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--brass-hairline);
}

.vtt-building-popover-title-wrap {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.vtt-building-popover-title {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 600;
  color: var(--brass-bright);
  line-height: 1.25;
}

.vtt-building-popover-cat {
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}

.vtt-building-popover-close {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-secondary);
  font-size: 15px;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.vtt-building-popover-close:hover {
  border-color: var(--brass);
  color: var(--brass-bright);
  background: rgba(223, 192, 122, 0.12);
}

.vtt-building-popover-layers {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.vtt-building-layer-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 6px 9px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(212, 175, 99, 0.16);
  background: var(--bg-obsidian);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 12.5px;
  font-weight: 500;
  cursor: pointer;
  text-align: left;
  transition: background 0.12s ease, border-color 0.12s ease;
}

.vtt-building-layer-btn:hover {
  background: var(--bg-hover);
  border-color: var(--brass);
}

.vtt-building-layer-btn.is-active {
  background: linear-gradient(90deg, rgba(223, 192, 122, 0.24), rgba(168, 137, 74, 0.14));
  border-color: var(--brass);
  color: var(--brass-bright);
  box-shadow: 0 0 12px rgba(223, 192, 122, 0.22);
}

.vtt-building-layer-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.22);
  flex-shrink: 0;
}

.vtt-building-layer-btn.is-active .vtt-building-layer-dot {
  background: var(--brass-bright);
  box-shadow: 0 0 8px var(--brass-glow);
}

.vtt-building-layer-label {
  flex: 1;
  min-width: 0;
}

.vtt-building-layer-elev {
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--text-muted);
}

.vtt-building-layer-btn.is-active .vtt-building-layer-elev {
  color: var(--brass);
}

.dm-layer-divider {
  display: inline-block;
  width: 1px;
  height: 18px;
  margin: 0 3px;
  background: var(--brass-hairline);
}

.dm-building-ctrl-btn {
  border-color: transparent;
  background: transparent;
  color: var(--text-secondary);
}

.dm-building-ctrl-btn:hover {
  color: var(--text-primary);
}

.dm-building-ctrl-btn.is-active-tool {
  background: rgba(223, 192, 122, 0.2);
  border-color: var(--brass);
  color: var(--brass-bright);
}


/* --------------------------------------------------------------------------
   v0.3 Session Access — Public /join Page, Seat Badges & DM Session Panel
   -------------------------------------------------------------------------- */
.join-shell {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  background: radial-gradient(circle at top, rgba(223, 192, 122, 0.08), transparent 55%), var(--bg-obsidian, #0b0e17);
  color: var(--text-primary, #f1ece1);
}

.join-card {
  width: 100%;
  max-width: 520px;
  background: var(--bg-surface, #131826);
  border: 1px solid var(--brass-hairline, rgba(223, 192, 122, 0.25));
  border-radius: 14px;
  padding: 24px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.65);
}

.join-header h1 {
  margin: 4px 0 6px;
  font-size: 24px;
  color: var(--brass-bright, #f3d796);
}

.join-eyebrow {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--cyan, #22d3ee);
  font-weight: 600;
}

.join-subtitle,
.join-hint {
  margin: 0 0 12px;
  font-size: 13px;
  color: var(--text-secondary, #a8b0c2);
  line-height: 1.45;
}

.join-section {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.join-section h2 {
  margin: 0 0 6px;
  font-size: 15px;
  color: var(--brass-bright, #f3d796);
}

.join-label,
.join-subhead {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary, #a8b0c2);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.join-code-row {
  display: flex;
  gap: 8px;
}

.join-code-input {
  flex: 1;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 18px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-align: center;
}

.join-error {
  margin-top: 10px;
  padding: 8px 12px;
  border-radius: 8px;
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.45);
  color: #fca5a5;
  font-size: 13px;
}

.join-table-banner {
  margin-top: 16px;
  padding: 10px 14px;
  border-radius: 8px;
  background: rgba(34, 211, 238, 0.1);
  border: 1px solid rgba(34, 211, 238, 0.35);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 14px;
}

.join-seat-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 14px;
}

.join-seat-row,
.join-reconnect-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.join-seat-ident,
.join-reconnect-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.join-seat-fields {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 10px;
}

.join-seat-fields .vtt-input {
  flex: 1;
}

.join-color-picker {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-secondary, #a8b0c2);
}

.join-btn-row {
  display: flex;
  gap: 6px;
}

.seat-color-dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
  border: 1px solid rgba(255, 255, 255, 0.35);
}

.player-seat-badge {
  position: fixed;
  top: 12px;
  right: 12px;
  z-index: 40;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(11, 14, 23, 0.88);
  border: 1px solid var(--brass-hairline, rgba(223, 192, 122, 0.32));
  color: var(--text-primary, #f1ece1);
  font-size: 12.5px;
  backdrop-filter: blur(8px);
}

.player-seat-switch {
  color: var(--cyan, #22d3ee);
  text-decoration: none;
  font-weight: 600;
  margin-left: 4px;
}

.player-seat-switch:hover {
  text-decoration: underline;
}

.dm-join-code-badge {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.14em;
  padding: 3px 9px;
  border-radius: 6px;
  background: rgba(223, 192, 122, 0.16);
  border: 1px solid rgba(223, 192, 122, 0.45);
  color: var(--brass-bright, #f3d796);
}

.dm-session-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 8px;
}

.dm-session-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 8px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.07);
}

.dm-tok-seat-select {
  max-width: 108px;
  font-size: 11px;
  padding: 3px 5px;
}

.dm-tok-meta.is-online {
  color: #4ade80;
}

/* ==========================================================================
   Tabletop VTT v0.3 — Player Client HUD, Owned Tokens, Lock Badge & Pings
   ========================================================================== */

.vtt-viewport.is-interactive {
  touch-action: none;
}

.player-hud {
  position: fixed;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  z-index: 35;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(11, 14, 22, 0.92);
  border: 1px solid rgba(223, 192, 122, 0.34);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(8px);
  max-width: calc(100vw - 24px);
  overflow-x: auto;
}

.player-hud-group {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.player-hud-divider {
  width: 1px;
  height: 20px;
  background: rgba(223, 192, 122, 0.25);
}

.player-hud-btn {
  white-space: nowrap;
}

.player-lock-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(244, 63, 94, 0.2);
  border: 1px solid rgba(244, 63, 94, 0.55);
  color: #fda4af;
  font-size: 0.72rem;
  font-weight: 600;
}

.player-toast {
  position: fixed;
  left: 50%;
  bottom: 72px;
  transform: translateX(-50%);
  z-index: 45;
  padding: 8px 14px;
  border-radius: 10px;
  background: rgba(14, 18, 30, 0.96);
  border: 1px solid rgba(223, 192, 122, 0.45);
  color: #f3e6c8;
  font-size: 0.84rem;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.55);
  pointer-events: none;
}

#dm-lock-movement-btn.is-locked {
  background: rgba(244, 63, 94, 0.24);
  border-color: rgba(244, 63, 94, 0.65);
  color: #fecdd3;
}

.vtt-tokens-layer.is-play.is-interactive .vtt-token.is-draggable {
  pointer-events: auto;
  cursor: grab;
}

.vtt-tokens-layer.is-play.is-interactive .vtt-token.is-draggable.is-dragging {
  cursor: grabbing;
}

.vtt-token.is-owned .vtt-token-disc {
  box-shadow: 0 0 0 3px rgba(79, 156, 249, 0.42), 0 0 18px rgba(79, 156, 249, 0.45);
}

/* Seat-Colored Expanding Map Pings */
.vtt-ping-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 28;
}

.vtt-map-ping {
  position: absolute;
  left: 0;
  top: 0;
  width: 0;
  height: 0;
  pointer-events: none;
  will-change: transform;
}

.vtt-ping-ring {
  position: absolute;
  left: -28px;
  top: -28px;
  width: 56px;
  height: 56px;
  border-radius: 999px;
  border: 3px solid var(--ping-color, #4f9cf9);
  box-shadow: 0 0 14px var(--ping-color, #4f9cf9);
  opacity: 0;
  animation: vtt-ping-expand 1.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.vtt-ping-ring-2 {
  animation-delay: 0.35s;
}

.vtt-ping-core {
  position: absolute;
  left: -6px;
  top: -6px;
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: var(--ping-color, #4f9cf9);
  border: 2px solid #07090f;
  animation: vtt-ping-fade 2.3s ease-out forwards;
}

.vtt-ping-label {
  position: absolute;
  left: 0;
  top: -34px;
  transform: translateX(-50%);
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(7, 9, 15, 0.88);
  border: 1px solid var(--ping-color, #4f9cf9);
  color: #f8fafc;
  font-size: 0.72rem;
  font-weight: 600;
  white-space: nowrap;
  animation: vtt-ping-fade 2.3s ease-out forwards;
}

@keyframes vtt-ping-expand {
  0% {
    transform: scale(0.25);
    opacity: 0.95;
  }
  100% {
    transform: scale(2.1);
    opacity: 0;
  }
}

@keyframes vtt-ping-fade {
  0%, 70% {
    opacity: 1;
  }
  100% {
    opacity: 0;
  }
}
