/**
 * styles/scrying-pool.less — Entry point (@imports only)
 *
 * Build: npm run build  →  styles/scrying-pool.css
 * Watch: npm run watch  (chokidar detects changes in @import-ed partials)
 *
 * Import order: tokens (base → states → motion → focus) → components
 */
/**
 * styles/tokens/_base.less
 *
 * Layer 1 — SP Semantic Alias Tokens
 *
 * Thin alias layer mapping to Foundry CSS tokens in one place.
 * If Foundry renames or shifts token semantics between versions,
 * only this layer needs updating.
 *
 * RULE: All Foundry --color-* / --font-* / --border-* tokens are FORBIDDEN
 * inside .scrying-pool CSS. Always use --sp-* aliases. This is the sole
 * enforcement point for the semantic layer.
 *
 * Every token includes a hardcoded fallback for environments where the
 * upstream Foundry token is absent.
 */
:root {
  /* Surface & structure */
  --sp-bg: var(--sp-theme-bg, var(--color-bg, hsl(220, 15%, 12%)));
  --sp-surface: var(--sp-theme-surface, var(--color-bg-option, #141618));
  --sp-surface-raised: var(--sp-theme-surface-raised, #1c1f22);
  --sp-surface-elevated: var(--sp-theme-surface-elevated, var(--sp-surface-raised, #1c1f22));
  --sp-surface-subtle: var(--sp-theme-surface-subtle, rgba(255, 255, 255, 0.05));
  --sp-surface-hover: var(--sp-theme-surface-hover, rgba(255, 255, 255, 0.08));
  --sp-border: var(--sp-theme-border, var(--color-border, #282c30));
  --sp-border-subtle: var(--sp-theme-border-subtle, rgba(255, 255, 255, 0.07));
  /* Typography */
  --sp-text-primary: var(--sp-theme-text-primary, var(--color-text-primary, #dde2e8));
  --sp-text-secondary: var(--sp-theme-text-secondary, var(--color-text-secondary, #7a8390));
  --sp-text-muted: var(--sp-theme-text-muted, #555d66);
  --sp-font-size-sm: 11px;
  /* Accent & interaction */
  --sp-accent: var(--sp-theme-accent, var(--color-warm-2, #4a9e6b));
  --sp-accent-hover: var(--sp-theme-accent-hover, #3d8f5e);
  --sp-accent-active: var(--sp-theme-accent-active, #2d7a4f);
  --sp-accent-text: #fff;
  --sp-surface-interactive: var(--sp-theme-interactive, #242830);
  --sp-control-bg: var(--sp-theme-control, #1a1d20);
  /* Semantic colours */
  --sp-color-red: hsl(0, 65%, 55%);
  --sp-color-red-dark: hsl(0, 65%, 42%);
  --sp-color-red-rgb: 204, 77, 77;
  --sp-color-red-subtle: hsla(0, 65%, 55%, 0.12);
  --sp-color-green: hsl(140, 55%, 50%);
  --sp-color-green-subtle: hsla(140, 55%, 50%, 0.12);
  --sp-color-yellow: hsl(48, 88%, 55%);
  --sp-color-yellow-subtle: hsla(48, 88%, 55%, 0.12);
  /* Shape & motion */
  --sp-radius-sm: 3px;
  --sp-radius-md: 4px;
  /* Dialog surface */
  --sp-dialog-bg: linear-gradient(175deg, hsl(220, 18%, 13%) 0%, hsl(220, 15%, 10%) 100%);
  --sp-dialog-border: 1px solid rgba(255, 255, 255, 0.08);
  --sp-dialog-shadow: 0 8px 32px rgba(0, 0, 0, 0.55), 0 2px 8px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.04);
  --sp-dialog-radius: 8px;
  --sp-dialog-grip-color: rgba(255, 255, 255, 0.07);
  /* Buttons */
  --sp-btn-font-size: 12px;
  --sp-btn-font-size-sm: 11px;
  --sp-btn-font-size-lg: 13px;
  --sp-btn-padding: 7px 14px;
  --sp-btn-padding-sm: 4px 10px;
  --sp-btn-padding-lg: 9px 18px;
  --sp-btn-radius: 5px;
  --sp-btn-gap: 6px;
  --sp-btn-primary-bg: var(--sp-accent);
  --sp-btn-primary-text: #fff;
  --sp-btn-primary-hover: var(--sp-accent-hover);
  --sp-btn-primary-active: var(--sp-accent-active);
  --sp-btn-secondary-bg: rgba(255, 255, 255, 0.05);
  --sp-btn-secondary-text: var(--sp-text-secondary);
  --sp-btn-secondary-border: rgba(255, 255, 255, 0.12);
  --sp-btn-secondary-hover-bg: rgba(255, 255, 255, 0.1);
  --sp-btn-secondary-hover-text: var(--sp-text-primary);
  --sp-btn-danger-bg: var(--sp-color-red);
  --sp-btn-danger-text: #fff;
  --sp-btn-danger-hover: var(--sp-color-red-dark);
  /* Focus ring — module-wide keyboard navigation anchor */
  --sp-focus: var(--sp-theme-focus, var(--color-focus-outline, #63c287));
  --sp-focus-ring: 0 0 0 2px var(--sp-focus);
  /* Badge */
  --sp-badge-bg: rgba(0, 0, 0, 0.72);
  --sp-badge-text: var(--sp-text-primary);
  /* Background operations = no toast ever (silent by design) */
}
/* Theme overrides — dark theme defaults */
.scrying-pool,
:root[data-color-scheme="dark"] {
  --sp-theme-bg: hsl(220, 15%, 12%);
  --sp-theme-surface: #141618;
  --sp-theme-surface-raised: #1c1f22;
  --sp-theme-surface-elevated: #1c1f22;
  --sp-theme-surface-subtle: rgba(255, 255, 255, 0.05);
  --sp-theme-surface-hover: rgba(255, 255, 255, 0.08);
  --sp-theme-border: #282c30;
  --sp-theme-border-subtle: rgba(255, 255, 255, 0.07);
  --sp-theme-text-primary: #dde2e8;
  --sp-theme-text-secondary: #7a8390;
  --sp-theme-text-muted: #555d66;
  --sp-theme-accent: #4a9e6b;
  --sp-theme-accent-hover: #3d8f5e;
  --sp-theme-accent-active: #2d7a4f;
  --sp-theme-interactive: #242830;
  --sp-theme-control: #1a1d20;
  --sp-theme-focus: #63c287;
  --sp-theme-urgency: #c8982a;
  --sp-btn-primary-bg: var(--sp-theme-accent, #4a9e6b);
  --sp-btn-primary-text: #fff;
  --sp-btn-primary-hover: var(--sp-theme-accent-hover, #3d8f5e);
  --sp-btn-primary-active: var(--sp-theme-accent-active, #2d7a4f);
}
/**
 * styles/tokens/_spacing.less
 *
 * Layer 1 — SP Spacing Tokens
 *
 * Semantic spacing tokens for consistent layout.
 * Maps to Foundry's spacing scale where available.
 */
:root {
  --sp-spacing-xxs: 2px;
  --sp-spacing-xs: 4px;
  --sp-spacing-sm: 8px;
  --sp-spacing-md: 12px;
  --sp-spacing-lg: 16px;
  --sp-spacing-xl: 24px;
  --sp-spacing-2xl: 32px;
  /* Border radius */
  --sp-border-radius: 4px;
  --sp-border-radius-lg: 8px;
  /* Legacy aliases for preset-import-export.less */
  --sp-space-xs: var(--sp-spacing-xs, 4px);
  --sp-space-sm: var(--sp-spacing-sm, 8px);
  --sp-space-m: var(--sp-spacing-md, 12px);
  --sp-space-l: var(--sp-spacing-lg, 16px);
  --sp-space-xl: var(--sp-spacing-xl, 24px);
}
/**
 * styles/tokens/_states.less
 *
 * Layer 2 — SP Participant State Tokens
 *
 * All 8 participant states + 1 pending state (9 total).
 * Each state provides three CSS custom properties:
 *   --sp-state-{name}-text    — foreground / icon colour
 *   --sp-state-{name}-border  — ring / border colour
 *   --sp-state-{name}-bg      — background tint colour
 *
 * SECOND-SIGNAL RULE (WCAG):
 *   Every state conveys meaning via THREE independent channels:
 *   colour + icon (Font Awesome codepoint) + shape (ring variant).
 *   States marked ⚠️ below have low contrast ratios and MUST NOT
 *   appear as text or small-pill foreground — icon + shape carry the signal.
 *
 * State precedence (VisibilityManager/RoleRenderer resolves; CSS never handles multi-state):
 *   pending > cam-lost > reconnecting > offline > never-connected > self-muted > hidden > ghost > active
 *
 * LESS state map — single source of truth for loop-generated component CSS.
 */
/* ─── State colour variables ─────────────────────────────────────────────── */
:root {
  /* active — Intentional / positive */
  /* ✅ WCAG AA safe */
  --sp-state-active-text: #4a9e6b;
  --sp-state-active-border: #4a9e6b;
  --sp-state-active-bg: rgba(74, 158, 107, 0.12);
  /* hidden — Intentional / deliberate (GM action) */
  /* ⚠️ Low contrast (~3.75:1) — icon + dashed ring carry the signal */
  --sp-state-hidden-text: #6b7280;
  --sp-state-hidden-border: #6b7280;
  --sp-state-hidden-bg: rgba(107, 114, 128, 0.1);
  /* self-muted — Self / player's own choice */
  /* ✅ WCAG AA safe */
  --sp-state-self-muted-text: #8b92a5;
  --sp-state-self-muted-border: #8b92a5;
  --sp-state-self-muted-bg: rgba(139, 146, 165, 0.1);
  /* offline — Technical / disconnected */
  /* ⚠️ Low contrast (~2.4:1) — icon + no-ring shape carry the signal */
  --sp-state-offline-text: #4b5563;
  --sp-state-offline-border: #4b5563;
  --sp-state-offline-bg: rgba(75, 85, 99, 0.08);
  /* cam-lost — Technical / camera failure */
  /* ✅ WCAG AA safe */
  --sp-state-cam-lost-text: #9ca3af;
  --sp-state-cam-lost-border: #9ca3af;
  --sp-state-cam-lost-bg: rgba(156, 163, 175, 0.1);
  /* reconnecting — Technical / in-progress */
  /* ✅ WCAG AA safe */
  --sp-state-reconnecting-text: #c8982a;
  --sp-state-reconnecting-border: #c8982a;
  --sp-state-reconnecting-bg: rgba(200, 152, 42, 0.12);
  /* never-connected — Passive / never joined */
  /* ⚠️ Low contrast (~1.76:1) — empty circle + no icon carries the signal */
  --sp-state-never-connected-text: #374151;
  --sp-state-never-connected-border: #374151;
  --sp-state-never-connected-bg: rgba(55, 65, 81, 0.06);
  /* ghost — Passive / placeholder slot */
  /* ⚠️ Very low contrast (~1.24:1) — ghost icon + dotted ring, lowest opacity */
  --sp-state-ghost-text: #1f2937;
  --sp-state-ghost-border: #1f2937;
  --sp-state-ghost-bg: rgba(31, 41, 55, 0.04);
  /* pending — Optimistic UI in-flight (transient; never persisted) */
  --sp-state-pending-text: #7a8390;
  --sp-state-pending-border: #7a8390;
  --sp-state-pending-bg: rgba(122, 131, 144, 0.1);
}
/* ─── Font Awesome icon codepoints (used in component CSS via content: "\f...") ── */
/*
  active:          '\f06e'  (eye)
  hidden:          '\f070'  (eye-slash)
  self-muted:      '\f131'  (microphone-slash)
  offline:         '\f00d'  (times / user-slash)
  cam-lost:        '\f03d'  (video-slash / film)
  reconnecting:    '\f021'  (sync/spinner)
  never-connected: '\f068'  (minus / em-dash)
  ghost:           '\f2be'  (ghost / user-secret)
  pending:         '\f110'  (spinner)
*/
/* ─── State ring shape variants (applied via sp-state-ring--* modifier) ──── */
/*
  solid   → active, self-muted
  dashed  → hidden, cam-lost
  pulse   → reconnecting, pending   (animation in _motion.less)
  dotted  → ghost
  none    → offline, never-connected
*/
/**
 * styles/tokens/_motion.less
 *
 * Layer 3/4 — SP Urgency Tier & Motion Tokens
 *
 * ALL animated token usages MUST be inside:
 *   @media (prefers-reduced-motion: no-preference) { ... }
 *
 * Fallback (reduced motion): instant state change with icon/state signal only.
 * No layout/size animations — only opacity, background-color, border-color.
 *
 * Motion tokens:
 *   --sp-fade-hide          : Player client opacity fade on hide (300–500ms ease-out)
 *   --sp-pulse-reconnecting : StateRing pulse for reconnecting state (lighthouse rhythm)
 *   --sp-shimmer-degraded   : cam-lost shimmer (single blink, not looping)
 *   --sp-toast-delay        : Director-cue toast delay after hide action
 */
/* ─── Motion token values ─────────────────────────────────────────────────── */
:root {
  --sp-fade-hide: 300ms ease-out;
  /* Player only — GM sees instant state change */
  --sp-pulse-reconnecting: 1.5s ease-in-out infinite;
  --sp-shimmer-degraded: 800ms ease-in-out 1;
  /* single blink, not looping */
  --sp-toast-delay: 1s;
  /* Director-cue toast delay */
  --sp-transition-state: 200ms ease-out;
  /* Generic state token transition */
  /* Urgency tokens (Layer 3 per AC7) — NEVER inherit Foundry error/warn colours */
  /*   Director cues = deliberate stage direction, not a failure. */
  --sp-urgency-director: var(--sp-theme-urgency, #c8982a);
  --sp-urgency-awareness: var(--sp-text-secondary);
}
/* ─── Keyframe animations ─────────────────────────────────────────────────── */
@media (prefers-reduced-motion: no-preference) {
  @keyframes sp-pulse {
    0%,
    100% {
      opacity: 1;
    }
    50% {
      opacity: 0.45;
    }
  }
  @keyframes sp-shimmer {
    0% {
      opacity: 1;
    }
    50% {
      opacity: 0.3;
    }
    100% {
      opacity: 1;
    }
  }
  @keyframes sp-fade-out {
    from {
      opacity: 1;
    }
    to {
      opacity: 0;
    }
  }
  /* Reconnecting ring pulse — applied via .sp-state-ring--pulse */
  .sp-state-ring--pulse {
    animation: sp-pulse var(--sp-pulse-reconnecting);
  }
  /* cam-lost shimmer — applied via .sp-state-cam-lost */
  .sp-state-cam-lost .sp-state-ring--dashed {
    animation: sp-shimmer var(--sp-shimmer-degraded);
  }
}
/* ─── Reduced motion overrides (global) ──────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  /* Target specific animated elements instead of universal selector */
  .sp-state-ring--pulse,
  .sp-state-cam-lost .sp-state-ring--dashed {
    animation: none;
    transition: none;
  }
}
/* ─── Allowed transitions (opacity, background-color, border-color only) ─── */
/*
  Transitions on layout properties (width, height, max-height, transform) are
  forbidden except for the ScryingPoolStrip collapsed ↔ expanded toggle which
  uses max-width exclusively (never width animation).
*/
/**
 * styles/tokens/_focus.less
 *
 * Module-wide focus ring pattern.
 *
 * High-contrast outer ring + inner offset that must survive all 9 state
 * background combinations and both Foundry dark/light themes.
 * Never rely on browser default focus outline alone.
 *
 * Applied via: .scrying-pool *:focus-visible
 */
.scrying-pool {
  /* Elevated contrast for interactive elements with state backgrounds */
}
.scrying-pool *:focus-visible {
  outline: none;
  /* suppress browser default - visible fallback via box-shadow */
  box-shadow: var(--sp-focus-ring), 0 0 0 4px var(--sp-surface);
  /* Inner offset (--sp-surface) creates separation so the ring is visible
       against any state background. The outer ring uses --sp-focus (#63c287).
       NOTE: Parent containers must NOT have overflow:hidden to avoid clipping. */
}
.scrying-pool [role="button"]:focus-visible,
.scrying-pool button:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px var(--sp-surface), /* inner offset */ 0 0 0 4px var(--sp-focus);
  /* outer ring */
}
/**
 * styles/components/_buttons.less
 *
 * Shared SP button component — single source of truth for all dialog buttons.
 * Imported by each dialog that needs buttons; all selectors scoped under
 * the dialog's own namespace.
 */
.sp-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-btn-gap, 6px);
  padding: var(--sp-btn-padding, 7px 14px);
  font-family: var(--font-primary, ui-sans-serif, system-ui, sans-serif);
  font-size: var(--sp-btn-font-size, 12px);
  font-weight: 600;
  border: 1px solid transparent;
  border-radius: var(--sp-btn-radius, 5px);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s, opacity 0.15s;
  line-height: 1.2;
  user-select: none;
}
.sp-btn i {
  font-size: 0.9em;
  pointer-events: none;
}
.sp-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
}
.sp-btn--primary {
  background: var(--sp-btn-primary-bg, var(--sp-accent));
  color: var(--sp-btn-primary-text, #fff);
  letter-spacing: 0.02em;
}
.sp-btn--primary:hover:not(:disabled) {
  background: var(--sp-btn-primary-hover, var(--sp-accent-hover));
  color: var(--sp-btn-primary-text, #fff);
}
.sp-btn--primary:active:not(:disabled) {
  background: var(--sp-btn-primary-active, var(--sp-accent-active));
}
.sp-btn--secondary {
  background: var(--sp-btn-secondary-bg, rgba(255, 255, 255, 0.05));
  color: var(--sp-btn-secondary-text, var(--sp-text-secondary));
  border-color: var(--sp-btn-secondary-border, rgba(255, 255, 255, 0.12));
  font-weight: 500;
}
.sp-btn--secondary:hover:not(:disabled) {
  background: var(--sp-btn-secondary-hover-bg, rgba(255, 255, 255, 0.1));
  color: var(--sp-btn-secondary-hover-text, var(--sp-text-primary));
}
.sp-btn--danger {
  background: var(--sp-btn-danger-bg, var(--sp-color-red));
  color: var(--sp-btn-danger-text, #fff);
}
.sp-btn--danger:hover:not(:disabled) {
  background: var(--sp-btn-danger-hover, var(--sp-color-red-dark));
}
.sp-btn--sm {
  padding: var(--sp-btn-padding-sm, 4px 10px);
  font-size: var(--sp-btn-font-size-sm, 11px);
}
.sp-btn--lg {
  padding: var(--sp-btn-padding-lg, 9px 18px);
  font-size: var(--sp-btn-font-size-lg, 13px);
}
.sp-btn--icon {
  width: 28px;
  height: 28px;
  padding: 0;
  font-size: 13px;
  justify-content: center;
}
/**
 * styles/components/_participant-card.less
 *
 * 80×100px card tile used in the Director's Board grid.
 * All selectors scoped under .scrying-pool.
 * Uses --sp-* tokens only — no Foundry --color-* / --font-* / --border-* tokens.
 */
.scrying-pool .participant-card {
  width: 80px;
  height: 100px;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  border: 2px solid var(--sp-border);
  border-radius: 4px;
  background: var(--sp-surface);
  cursor: pointer;
  overflow: hidden;
  transition: border-color var(--sp-transition-state), background-color var(--sp-transition-state);
}
.scrying-pool .participant-card.sp-state-active {
  border-color: var(--sp-state-active-border);
  border-style: solid;
  background: var(--sp-state-active-bg);
}
.scrying-pool .participant-card.sp-state-hidden {
  border-color: var(--sp-state-hidden-border);
  border-style: dashed;
  background: var(--sp-state-hidden-bg);
}
.scrying-pool .participant-card.sp-state-self-muted {
  border-color: var(--sp-state-self-muted-border);
  border-style: solid;
  background: var(--sp-state-self-muted-bg);
}
.scrying-pool .participant-card.sp-state-offline {
  border-color: var(--sp-state-offline-border);
  border-style: none;
  background: var(--sp-state-offline-bg);
}
.scrying-pool .participant-card.sp-state-cam-lost {
  border-color: var(--sp-state-cam-lost-border);
  border-style: dashed;
  background: var(--sp-state-cam-lost-bg);
}
.scrying-pool .participant-card.sp-state-reconnecting {
  border-color: var(--sp-state-reconnecting-border);
  border-style: solid;
  background: var(--sp-state-reconnecting-bg);
}
.scrying-pool .participant-card.sp-state-never-connected {
  border-color: var(--sp-state-never-connected-border);
  border-style: none;
  background: var(--sp-state-never-connected-bg);
}
.scrying-pool .participant-card.sp-state-ghost {
  border-color: var(--sp-state-ghost-border);
  border-style: dotted;
  background: var(--sp-state-ghost-bg);
}
.scrying-pool .participant-card.sp-state-pending {
  border-color: var(--sp-state-pending-border);
  border-style: solid;
  background: var(--sp-state-pending-bg);
}
.scrying-pool .participant-card__avatar {
  width: 48px;
  height: 48px;
  margin: 8px auto 4px;
  flex-shrink: 0;
  position: relative;
}
.scrying-pool .participant-card__avatar img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}
.scrying-pool .participant-card__avatar-badge {
  position: absolute;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 8px;
  border: 1px solid var(--sp-surface);
  box-shadow: 0 0 0 2px var(--sp-surface);
}
.scrying-pool .participant-card__avatar-badge i {
  font-size: 10px;
  color: var(--sp-text-primary);
}
.scrying-pool .participant-card__avatar-badge--reaction-cam {
  background: var(--sp-accent);
  bottom: 0;
  right: 0;
  cursor: help;
}
.scrying-pool .participant-card__name {
  font-size: 12px;
  line-height: 1.2;
  text-align: center;
  color: var(--sp-text-primary);
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  padding: 0 4px;
  margin: 0;
  width: 100%;
  word-break: break-word;
}
.scrying-pool .participant-card__toggle {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--sp-badge-bg);
  color: var(--sp-badge-text);
  border: none;
  border-radius: 2px;
  cursor: pointer;
  opacity: 0;
  transition: opacity var(--sp-transition-state);
  font-size: 18px;
  padding: 0;
}
.scrying-pool .participant-card__toggle:focus-visible {
  opacity: 1;
}
.scrying-pool .participant-card:hover .scrying-pool .participant-card__toggle,
.scrying-pool .participant-card:focus-within .scrying-pool .participant-card__toggle {
  opacity: 1;
}
.scrying-pool .participant-card:focus-visible {
  outline: none;
  box-shadow: var(--sp-focus-ring), 0 0 0 4px var(--sp-surface);
}
.scrying-pool .participant-card.sp-shape-rounded {
  --sp-shape-clip: inset(0 round 6px);
}
.scrying-pool .participant-card.sp-shape-circle {
  --sp-shape-clip: circle(50%);
}
.scrying-pool .participant-card.sp-shape-hexagon {
  --sp-shape-clip: polygon(25% 0%, 75% 0%, 100% 50%, 75% 100%, 25% 100%, 0% 50%);
}
.scrying-pool .participant-card.sp-shape-octagon {
  --sp-shape-clip: polygon(29% 0%, 71% 0%, 100% 29%, 100% 71%, 71% 100%, 29% 100%, 0% 71%, 0% 29%);
}
.scrying-pool .participant-card .participant-card__avatar img {
  clip-path: var(--sp-shape-clip, none);
}
@media (prefers-reduced-motion: reduce) {
  .scrying-pool .participant-card {
    transition: none;
  }
  .scrying-pool .participant-card__toggle {
    transition: none;
  }
}
:root {
  --sp-state-active: hsl(140, 60%, 55%);
  --sp-state-hidden: hsl(0, 0%, 50%);
  --sp-state-self-muted: hsl(200, 60%, 55%);
  --sp-state-cam-lost: hsl(30, 80%, 55%);
  --sp-state-pending: hsl(50, 90%, 55%);
  --sp-urgency-director: hsl(38, 90%, 55%);
  --sp-state-color: hsl(140, 60%, 55%);
}
.scrying-pool-strip {
  background: rgba(0, 0, 0, 0.01);
  border-radius: 8px;
  transition: background 0.25s ease;
  /* Override FoundryVTT v14's .application min-width: 200px — strip sizing is controlled by JS */
  min-width: unset;
  /* Ensure strip appears below Director's Board (z-index: 100) */
  z-index: 50;
}
.scrying-pool-strip:hover {
  background: rgba(0, 0, 0, 0.3);
}
.scrying-pool-strip header.window-header {
  display: none;
}
.scrying-pool-strip .window-content {
  padding: 0;
  overflow: hidden;
}
.scrying-pool.scrying-pool-strip {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: calc(var(--sp-widget-width, 83px) + 11px);
  overflow: hidden;
  transition: max-width 200ms ease-in-out;
}
.scrying-pool.scrying-pool-strip.sp-layout-horizontal-sm,
.scrying-pool.scrying-pool-strip.sp-layout-horizontal-md,
.scrying-pool.scrying-pool-strip.sp-layout-mosaic-sm,
.scrying-pool.scrying-pool-strip.sp-layout-mosaic-md {
  max-width: none;
  align-items: flex-start;
}
.scrying-pool.scrying-pool-strip.sp-layout-horizontal-sm .sp-strip__participants,
.scrying-pool.scrying-pool-strip.sp-layout-horizontal-md .sp-strip__participants {
  flex-direction: row;
  flex-wrap: wrap;
  padding: 4px;
  gap: 4px;
  justify-content: flex-start;
  width: auto;
}
.scrying-pool.scrying-pool-strip.sp-layout-mosaic-sm .sp-strip__participants,
.scrying-pool.scrying-pool-strip.sp-layout-mosaic-md .sp-strip__participants {
  display: grid;
  padding: 4px;
  gap: 4px;
}
.scrying-pool.scrying-pool-strip.sp-layout-mosaic-sm .sp-strip__participants {
  grid-template-columns: repeat(auto-fill, var(--sp-widget-width, 83px));
}
.scrying-pool.scrying-pool-strip.sp-layout-mosaic-md .sp-strip__participants {
  grid-template-columns: repeat(auto-fill, var(--sp-widget-width, 150px));
}
.scrying-pool.scrying-pool-strip.sp-layout-horizontal-md .sp-participant-avatar,
.scrying-pool.scrying-pool-strip.sp-layout-mosaic-md .sp-participant-avatar {
  width: var(--sp-widget-width, 150px);
  height: var(--sp-widget-width, 150px);
  flex-direction: column;
  align-items: center;
  padding: 8px 4px 4px;
  gap: 4px;
}
.scrying-pool.scrying-pool-strip.sp-layout-horizontal-md .sp-participant-avatar .sp-avatar__shell,
.scrying-pool.scrying-pool-strip.sp-layout-mosaic-md .sp-participant-avatar .sp-avatar__shell {
  width: calc(var(--sp-widget-width, 150px) - 59px);
  height: calc(var(--sp-widget-width, 150px) - 59px);
}
.scrying-pool.scrying-pool-strip.sp-layout-horizontal-md .sp-participant-avatar .sp-avatar__name,
.scrying-pool.scrying-pool-strip.sp-layout-mosaic-md .sp-participant-avatar .sp-avatar__name {
  display: block;
  font-size: 0.65rem;
  text-align: center;
  width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.scrying-pool.scrying-pool-strip.sp-layout-horizontal-md .sp-participant-avatar .sp-avatar__corner-badge,
.scrying-pool.scrying-pool-strip.sp-layout-mosaic-md .sp-participant-avatar .sp-avatar__corner-badge {
  bottom: 4px;
  right: 4px;
}
.scrying-pool.scrying-pool-strip.sp-layout-horizontal-md .sp-participant-avatar::after,
.scrying-pool.scrying-pool-strip.sp-layout-mosaic-md .sp-participant-avatar::after {
  display: none;
}
.scrying-pool.scrying-pool-strip.sp-layout-vertical-sm .sp-participant-avatar .sp-avatar__shell,
.scrying-pool.scrying-pool-strip.sp-layout-horizontal-sm .sp-participant-avatar .sp-avatar__shell,
.scrying-pool.scrying-pool-strip.sp-layout-mosaic-sm .sp-participant-avatar .sp-avatar__shell {
  width: calc(var(--sp-widget-width) - 12px);
  height: calc(var(--sp-widget-width) - 12px);
}
.sp-strip__toolbar {
  display: flex;
  flex-direction: row;
  align-items: center;
  width: 100%;
  height: 24px;
  flex-shrink: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}
.scrying-pool-strip:hover .sp-strip__toolbar {
  opacity: 1;
  pointer-events: auto;
}
.sp-strip__grip {
  width: 20px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: grab;
  color: var(--sp-text, hsl(0, 0%, 80%));
  font-size: 10px;
  flex-shrink: 0;
  user-select: none;
}
.sp-strip__grip:active {
  cursor: grabbing;
}
.scrying-pool-strip:hover .sp-strip__grip {
  opacity: 0.45;
}
.scrying-pool-strip:hover .sp-strip__grip:hover {
  opacity: 0.75;
}
.scrying-pool-strip:hover .sp-strip__grip:active {
  opacity: 1;
}
.sp-strip__toggle {
  height: 24px;
  min-width: 22px;
  width: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--sp-text, hsl(0, 0%, 80%));
  font-size: 10px;
  flex-shrink: 0;
  opacity: 0.6;
}
.sp-strip__toggle:hover {
  opacity: 1;
}
.sp-strip__directors-board-cta {
  width: 22px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--sp-text-secondary, #7a8390);
  font-size: 11px;
  transition: background 0.15s, color 0.15s;
}
.sp-strip__directors-board-cta:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--sp-text-primary, #dde2e8);
}
.sp-strip__toolbar-spacer {
  flex: 1;
}
.sp-strip__close-btn {
  width: 20px;
  height: 24px;
  padding: 0;
  line-height: 24px;
  text-align: center;
  font-size: 13px;
  font-weight: 400;
  background: transparent;
  color: var(--sp-text, hsl(0, 0%, 80%));
  border: none;
  cursor: pointer;
  flex-shrink: 0;
  opacity: 0.45;
  transition: opacity 0.2s, background 0.15s;
}
.sp-strip__close-btn:hover {
  opacity: 1;
  background: rgba(255, 255, 255, 0.1);
}
.sp-strip__close-btn:active {
  opacity: 0.75;
}
.sp-strip__participants {
  list-style: none;
  margin: 0;
  padding: 0;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.sp-strip__participant-item {
  margin: 0;
}
.sp-strip__first-tip {
  font-size: 0.75rem;
  color: var(--sp-text-muted, hsl(0, 0%, 60%));
  padding: 4px 8px;
  margin: 0;
  opacity: 0;
  transition: opacity 0.2s;
}
.scrying-pool-strip:hover .sp-strip__first-tip {
  opacity: 1;
}
.sp-participant-avatar {
  position: relative;
  width: 83px;
  height: var(--sp-widget-width, 83px);
  display: flex;
  align-items: center;
  justify-content: flex-start;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  border-radius: 4px;
  gap: 8px;
  overflow: hidden;
}
.sp-participant-avatar:focus-visible {
  outline: 2px solid var(--sp-focus-ring, hsl(200, 80%, 60%));
  outline-offset: 2px;
}
.is-expanded .sp-participant-avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: auto;
  padding: 5px;
  background: transparent;
}
.is-expanded .sp-participant-avatar:hover {
  background: hsl(220, 15%, 14%);
}
.is-expanded .sp-participant-avatar::after {
  display: none;
}
.is-expanded .sp-participant-avatar .sp-avatar__shell {
  width: calc(var(--sp-widget-width) - 59px);
  height: calc(var(--sp-widget-width) - 59px);
}
.is-expanded .sp-participant-avatar .sp-avatar__name,
.is-expanded .sp-participant-avatar .sp-avatar__state-label {
  display: none;
}
.is-expanded .sp-participant-avatar .sp-avatar__corner-badge {
  bottom: 6px;
  right: 6px;
  z-index: 4;
  width: 10px;
  height: 10px;
}
.sp-avatar__shell {
  position: relative;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 60px;
  height: 60px;
}
.sp-avatar__shell::before {
  content: '';
  position: absolute;
  inset: calc(var(--sp-tile-border-width, 0px) * -1);
  background: var(--sp-tile-border-color, transparent);
  clip-path: var(--sp-shape-clip, none);
  opacity: var(--sp-tile-border-active, 1);
  z-index: -3;
  pointer-events: none;
}
.sp-avatar__shell::after {
  content: '';
  position: absolute;
  inset: calc(var(--sp-tile-border-width, 0px) * -1);
  background: transparent;
  box-shadow: inset 0 0 0 2px transparent;
  clip-path: var(--sp-shape-clip, none);
  opacity: var(--sp-tile-border-active, 1);
  z-index: 1;
  pointer-events: none;
  transition: box-shadow 200ms ease, opacity 200ms ease;
}
.sp-avatar__shape {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  clip-path: var(--sp-shape-clip, none);
}
.sp-avatar__shape .sp-avatar__img,
.sp-avatar__shape .sp-participant-video {
  width: 100%;
  height: 100%;
}
.sp-participant-video {
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.sp-avatar__img {
  width: 60px;
  height: 60px;
  object-fit: cover;
  flex-shrink: 0;
}
.sp-participant-video__element {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: hsl(220, 15%, 18%);
}
.is-expanded .sp-participant-video__element {
  border-radius: 4px;
}
.sp-participant-video:not(:empty) ~ .sp-avatar__img {
  display: none;
}
.sp-avatar__corner-badge {
  position: absolute;
  bottom: 2px;
  right: 2px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--sp-state-color);
  font-size: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.sp-avatar__name {
  font-size: 0.85rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--sp-text, hsl(0, 0%, 85%));
  opacity: 0;
  transition: opacity 0.2s;
}
.sp-participant-avatar:hover .sp-avatar__name {
  opacity: 1;
}
.sp-avatar__state-label {
  font-size: 0.7rem;
  color: var(--sp-text-muted, hsl(0, 0%, 60%));
  opacity: 0;
  transition: opacity 0.2s;
}
.sp-participant-avatar:hover .sp-avatar__state-label {
  opacity: 1;
}
.sp-participant-avatar.sp-state-active,
.sp-participant-avatar.sp-state-self-muted {
  --sp-state-color: var(--sp-state-active);
}
.sp-participant-avatar.sp-state-active .sp-avatar__shell::after,
.sp-participant-avatar.sp-state-self-muted .sp-avatar__shell::after {
  box-shadow: inset 0 0 0 2px var(--sp-state-color);
}
.sp-participant-avatar.sp-state-hidden,
.sp-participant-avatar.sp-state-cam-lost {
  --sp-state-color: var(--sp-state-hidden);
}
.sp-participant-avatar.sp-state-pending {
  --sp-state-color: var(--sp-state-pending);
}
.sp-participant-avatar.sp-state-pending .sp-avatar__shell::after {
  box-shadow: inset 0 0 0 2px var(--sp-state-color);
}
.sp-participant-avatar.sp-state-focused .sp-avatar__shell::after {
  box-shadow: inset 0 0 0 2px var(--sp-urgency-director);
}
.sp-strip__participant-item.sp-dragging {
  opacity: 0.3;
}
.sp-strip__participant-item.sp-drag-over {
  box-shadow: inset 0 0 0 2px var(--sp-urgency-director);
  border-radius: 4px;
}
@media (prefers-reduced-motion: no-preference) {
  .sp-participant-avatar.sp-state-pending .sp-avatar__shell::after {
    animation: sp-pulse 2s ease-in-out infinite;
  }
  @keyframes sp-pulse {
    0%,
    100% {
      opacity: 1;
    }
    50% {
      opacity: 0.4;
    }
  }
  .sp-participant-avatar.sp-state-revert .sp-avatar__shell::after {
    animation: sp-revert-flash 200ms ease-out forwards;
  }
  @keyframes sp-revert-flash {
    0% {
      box-shadow: inset 0 0 0 3px var(--sp-urgency-director);
    }
    100% {
      box-shadow: inset 0 0 0 2px var(--sp-state-color);
    }
  }
}
.sp-strip__empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 16px 8px;
  gap: 8px;
  color: var(--sp-text-muted, hsl(0, 0%, 60%));
}
.sp-empty__icon {
  font-size: 1.5rem;
  display: block;
}
.sp-empty__text {
  font-size: 0.75rem;
  text-align: center;
}
@media (prefers-reduced-motion: no-preference) {
  .sp-empty__icon {
    animation: sp-breathe 3s ease-in-out infinite;
  }
  @keyframes sp-breathe {
    0%,
    100% {
      opacity: 0.6;
      transform: scale(1);
    }
    50% {
      opacity: 1;
      transform: scale(1.05);
    }
  }
}
.sp-lock-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: hsla(0, 0%, 0%, 0.45);
  pointer-events: none;
  z-index: 10;
}
.sp-lock-overlay::before {
  content: '\f023';
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  font-size: 1.2rem;
  color: hsl(0, 0%, 85%);
}
.camera-view.sp-state-hidden {
  opacity: 0.55;
  position: relative;
}
.sp-portrait-fallback {
  position: absolute;
  inset: 0;
  background: var(--sp-bg, hsl(220, 15%, 18%)) center / cover no-repeat;
  pointer-events: none;
}
.sp-context-menu {
  background: var(--sp-bg, hsl(220, 15%, 15%));
  border: 1px solid hsl(0, 0%, 30%);
  border-radius: 4px;
  padding: 4px 0;
  min-width: 160px;
  z-index: 1000;
  box-shadow: 0 4px 12px hsla(0, 0%, 0%, 0.4);
}
.sp-context-menu .sp-context-menu__item {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 6px 12px;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--sp-text, hsl(0, 0%, 85%));
  font-size: 0.875rem;
  text-align: left;
}
.sp-context-menu .sp-context-menu__item:hover,
.sp-context-menu .sp-context-menu__item:focus-visible {
  background: hsla(200, 60%, 55%, 0.15);
}
.sp-action-popover {
  background: var(--sp-bg, hsl(220, 15%, 15%));
  border: 1px solid hsl(0, 0%, 30%);
  border-radius: 6px;
  padding: 12px;
  min-width: 160px;
  box-shadow: 0 4px 16px hsla(0, 0%, 0%, 0.5);
  color: var(--sp-text, hsl(0, 0%, 85%));
}
.sp-action-popover .sp-action-popover__cta {
  display: block;
  width: 100%;
  padding: 8px 16px;
  background: hsl(200, 60%, 40%);
  border: none;
  border-radius: 4px;
  cursor: pointer;
  color: hsl(0, 0%, 95%);
  font-size: 0.875rem;
}
.sp-action-popover .sp-action-popover__cta:hover:not(:disabled) {
  background: hsl(200, 60%, 50%);
}
.sp-action-popover .sp-action-popover__cta:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.sp-participant-avatar.sp-shape-rounded {
  --sp-shape-clip: inset(0 round 6px);
}
.sp-participant-avatar.sp-shape-circle {
  --sp-shape-clip: circle(50%);
}
.sp-participant-avatar.sp-shape-hexagon {
  --sp-shape-clip: polygon(25% 0%, 75% 0%, 100% 50%, 75% 100%, 25% 100%, 0% 50%);
}
.sp-participant-avatar.sp-shape-octagon {
  --sp-shape-clip: polygon(29% 0%, 71% 0%, 100% 29%, 100% 71%, 71% 100%, 29% 100%, 0% 71%, 0% 29%);
}
/**
 * styles/components/_directors-board.less
 *
 * Layout for the Director's Board ApplicationV2 window.
 * All selectors scoped under .scrying-pool.
 * Uses --sp-* tokens only — no Foundry --color-* / --font-* / --border-* tokens.
 */
.scrying-pool.directors-board {
  background: var(--sp-dialog-bg);
  color: var(--sp-text-primary);
  border: var(--sp-dialog-border);
  border-top: 2px solid var(--sp-accent);
  border-radius: var(--sp-dialog-radius);
  box-shadow: var(--sp-dialog-shadow);
  /* Ensure Director's Board appears above the video strip */
  z-index: 100;
}
.scrying-pool.directors-board header.window-header {
  display: none;
}
.scrying-pool.directors-board .directors-board__inner {
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
}
.scrying-pool.directors-board .directors-board__grip {
  width: 100%;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: grab;
  color: var(--sp-text-muted);
  opacity: 0.35;
  font-size: 10px;
  flex-shrink: 0;
  transition: opacity 0.15s, background 0.15s;
  user-select: none;
  border-radius: var(--sp-dialog-radius) var(--sp-dialog-radius) 0 0;
}
.scrying-pool.directors-board .directors-board__grip:hover {
  opacity: 0.8;
  background: rgba(255, 255, 255, 0.03);
}
.scrying-pool.directors-board .directors-board__grip:active {
  cursor: grabbing;
  opacity: 1;
}
.scrying-pool.directors-board .directors-board__close-btn {
  position: absolute;
  top: 2px;
  right: 6px;
  z-index: 10;
  width: 20px;
  height: 20px;
  padding: 0;
  line-height: 20px;
  font-size: 14px;
  font-weight: 400;
  background: transparent;
  color: var(--sp-text-muted);
  border: none;
  border-radius: var(--sp-radius-sm);
  cursor: pointer;
  opacity: 0.5;
  transition: opacity 0.15s, background 0.15s, color 0.15s;
}
.scrying-pool.directors-board .directors-board__close-btn:hover {
  opacity: 1;
  background: rgba(255, 255, 255, 0.08);
  color: var(--sp-text-primary);
}
.scrying-pool.directors-board .directors-board__close-btn:active {
  opacity: 0.75;
}
.scrying-pool.directors-board .directors-board__content {
  display: grid;
  grid-template-columns: repeat(auto-fill, 68px);
  gap: 6px;
  padding: 8px;
  overflow-y: auto;
  flex: 1 1 auto;
  list-style: none;
  margin: 0;
}
.scrying-pool.directors-board .directors-board__empty {
  grid-column: 1 / -1;
  text-align: center;
  color: var(--sp-text-muted);
  font-size: 12px;
  padding: 20px 0;
  margin: 0;
}
.scrying-pool.directors-board .directors-board__bulk-bar {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 5px 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  flex-shrink: 0;
  flex-wrap: wrap;
  background: rgba(0, 0, 0, 0.15);
}
.scrying-pool.directors-board .directors-board__bulk-btn {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-btn-gap, 6px);
  padding: var(--sp-btn-padding-sm, 4px 10px);
  font-size: var(--sp-btn-font-size-sm, 11px);
  font-weight: 600;
  border-radius: var(--sp-btn-radius, 5px);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
  line-height: 1.2;
  border: 1px solid transparent;
  background: rgba(74, 158, 107, 0.75);
  color: #e8f0ea;
  border-color: rgba(74, 158, 107, 0.4);
}
.scrying-pool.directors-board .directors-board__bulk-btn i {
  font-size: 10px;
  pointer-events: none;
}
.scrying-pool.directors-board .directors-board__bulk-btn:hover {
  background: rgba(74, 158, 107, 0.95);
}
.scrying-pool.directors-board .directors-board__bulk-btn:active {
  opacity: 0.8;
}
.scrying-pool.directors-board .directors-board__bulk-btn--undo {
  background: var(--sp-btn-secondary-bg, rgba(255, 255, 255, 0.05));
  color: var(--sp-btn-secondary-text, var(--sp-text-secondary));
  border-color: var(--sp-btn-secondary-border, rgba(255, 255, 255, 0.12));
  font-weight: 500;
}
.scrying-pool.directors-board .directors-board__bulk-btn--undo:hover {
  background: var(--sp-btn-secondary-hover-bg, rgba(255, 255, 255, 0.1));
  color: var(--sp-btn-secondary-hover-text, var(--sp-text-primary));
  border-color: rgba(255, 255, 255, 0.25);
}
.scrying-pool.directors-board .directors-board__bulk-btn--restore {
  background: rgba(123, 79, 166, 0.75);
  border-color: rgba(123, 79, 166, 0.4);
}
.scrying-pool.directors-board .directors-board__bulk-btn--restore:hover {
  background: rgba(123, 79, 166, 0.95);
}
.scrying-pool.directors-board .directors-board__help-btn {
  margin-left: auto;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: transparent;
  color: var(--sp-text-muted);
  font-size: 11px;
  font-weight: bold;
  line-height: 1;
  cursor: pointer;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.scrying-pool.directors-board .directors-board__help-btn:hover {
  background: rgba(74, 158, 107, 0.8);
  color: #fff;
  border-color: transparent;
}
.scrying-pool.directors-board .directors-board__footer {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 6px 8px 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  flex-shrink: 0;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 0 0 var(--sp-dialog-radius) var(--sp-dialog-radius);
}
.scrying-pool.directors-board .directors-board__footer-group {
  display: flex;
  align-items: center;
  gap: 4px;
}
.scrying-pool.directors-board .directors-board__footer-group--presets {
  flex-wrap: wrap;
}
.scrying-pool.directors-board .directors-board__footer-group--controls {
  padding-top: 4px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}
.scrying-pool.directors-board .directors-board__footer-sep {
  width: 1px;
  align-self: stretch;
  background: rgba(255, 255, 255, 0.1);
  margin: 0 3px;
  flex-shrink: 0;
}
.scrying-pool.directors-board .directors-board__footer-btn {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-btn-gap, 6px);
  padding: var(--sp-btn-padding-sm, 4px 10px);
  font-size: var(--sp-btn-font-size-sm, 11px);
  font-weight: 600;
  border-radius: var(--sp-btn-radius, 5px);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
  white-space: nowrap;
  line-height: 1.2;
  border: 1px solid transparent;
  background: rgba(74, 158, 107, 0.7);
  color: #e8f0ea;
  border-color: rgba(74, 158, 107, 0.35);
}
.scrying-pool.directors-board .directors-board__footer-btn i {
  font-size: 0.9em;
  pointer-events: none;
}
.scrying-pool.directors-board .directors-board__footer-btn:hover {
  background: rgba(74, 158, 107, 0.9);
  color: #fff;
}
.scrying-pool.directors-board .directors-board__footer-btn:active {
  opacity: 0.8;
}
.scrying-pool.directors-board .directors-board__footer-btn[disabled] {
  cursor: not-allowed;
  opacity: 0.4;
  background: transparent;
  color: var(--sp-text-muted);
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.scrying-pool.directors-board .directors-board__footer-btn--secondary {
  background: var(--sp-btn-secondary-bg, rgba(255, 255, 255, 0.05));
  color: var(--sp-btn-secondary-text, var(--sp-text-secondary));
  border-color: var(--sp-btn-secondary-border, rgba(255, 255, 255, 0.12));
  font-weight: 500;
}
.scrying-pool.directors-board .directors-board__footer-btn--secondary:hover {
  background: var(--sp-btn-secondary-hover-bg, rgba(255, 255, 255, 0.1));
  color: var(--sp-btn-secondary-hover-text, var(--sp-text-primary));
}
.scrying-pool.directors-board .directors-board__footer-btn--auto-apply {
  background: var(--sp-btn-secondary-bg, rgba(255, 255, 255, 0.05));
  color: var(--sp-btn-secondary-text, var(--sp-text-secondary));
  border-color: var(--sp-btn-secondary-border, rgba(255, 255, 255, 0.12));
  font-weight: 500;
}
.scrying-pool.directors-board .directors-board__footer-btn--auto-apply:hover {
  background: var(--sp-btn-secondary-hover-bg, rgba(255, 255, 255, 0.1));
  color: var(--sp-btn-secondary-hover-text, var(--sp-text-primary));
}
.scrying-pool.directors-board .directors-board__footer-btn--av {
  background: rgba(30, 35, 45, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--sp-text-muted);
  font-weight: 500;
}
.scrying-pool.directors-board .directors-board__footer-btn--av:hover {
  background: rgba(50, 55, 70, 0.9);
}
.scrying-pool.directors-board .directors-board__footer-btn--av-active {
  background: rgba(90, 42, 42, 0.85);
  border-color: rgba(160, 64, 64, 0.6);
  color: #f0a0a0;
  font-weight: 500;
}
.scrying-pool.directors-board .directors-board__footer-btn--av-active:hover {
  background: rgba(110, 50, 50, 0.95);
}
.scrying-pool.directors-board .directors-board__footer-btn--av-config {
  background: rgba(30, 35, 45, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--sp-text-muted);
  flex: 0 0 auto;
  font-weight: 500;
}
.scrying-pool.directors-board .directors-board__footer-btn--av-config:hover {
  background: rgba(50, 55, 70, 0.9);
}
.scrying-pool.directors-board .directors-board__dock-layout-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  flex-shrink: 0;
  background: rgba(0, 0, 0, 0.12);
}
.scrying-pool.directors-board .directors-board__dock-layout-label {
  font-size: 10px;
  color: var(--sp-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  flex-shrink: 0;
  margin-right: 2px;
}
.scrying-pool.directors-board .directors-board__dock-layout-group {
  display: flex;
  align-items: center;
  gap: 2px;
  flex-wrap: wrap;
}
.scrying-pool.directors-board .directors-board__dock-layout-sep {
  width: 1px;
  height: 20px;
  background: rgba(255, 255, 255, 0.12);
  margin: 0 3px;
  flex-shrink: 0;
}
.scrying-pool.directors-board .directors-board__dock-layout-btn {
  width: 28px;
  height: 28px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--sp-btn-radius, 5px);
  cursor: pointer;
  color: var(--sp-text-muted);
  padding: 0;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.scrying-pool.directors-board .directors-board__dock-layout-btn i {
  font-size: 10px;
  pointer-events: none;
}
.scrying-pool.directors-board .directors-board__dock-layout-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--sp-text-primary);
  border-color: rgba(255, 255, 255, 0.2);
}
.scrying-pool.directors-board .directors-board__dock-layout-btn.is-active {
  background: rgba(74, 158, 107, 0.2);
  border-color: var(--sp-accent);
  color: var(--sp-accent);
}
.scrying-pool.directors-board .directors-board__dock-layout-size {
  font-size: 8px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0.02em;
  pointer-events: none;
}
.scrying-pool.directors-board .directors-board__tile-shape-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  flex-shrink: 0;
  background: rgba(0, 0, 0, 0.12);
}
.scrying-pool.directors-board .directors-board__tile-shape-label {
  font-size: 10px;
  color: var(--sp-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  flex-shrink: 0;
  margin-right: 2px;
}
.scrying-pool.directors-board .directors-board__tile-shape-group {
  display: flex;
  align-items: center;
  gap: 2px;
}
.scrying-pool.directors-board .directors-board__tile-border-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  flex-shrink: 0;
  background: rgba(0, 0, 0, 0.12);
}
.scrying-pool.directors-board .directors-board__tile-border-label {
  font-size: 10px;
  color: var(--sp-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  flex-shrink: 0;
  margin-right: 2px;
}
.scrying-pool.directors-board .directors-board__tile-border-group {
  display: flex;
  align-items: center;
  gap: 2px;
}
.scrying-pool.directors-board .directors-board__tile-border-btn {
  height: 24px;
  min-width: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--sp-btn-radius, 5px);
  cursor: pointer;
  color: var(--sp-text-secondary, #7a8390);
  font-size: 10px;
  padding: 0 6px;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.scrying-pool.directors-board .directors-board__tile-border-btn.is-active {
  background: hsla(200, 70%, 55%, 0.2);
  border-color: hsla(200, 70%, 55%, 0.6);
  color: var(--sp-text-primary, #dde2e8);
}
.scrying-pool.directors-board .directors-board__tile-border-btn:hover:not(.is-active) {
  background: rgba(255, 255, 255, 0.08);
  color: var(--sp-text-primary, #dde2e8);
}
.scrying-pool.directors-board .directors-board__tile-border-color {
  width: 24px;
  height: 24px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--sp-btn-radius, 5px);
  cursor: pointer;
  background: none;
  flex-shrink: 0;
}
.scrying-pool.directors-board .directors-board__tile-border-color::-webkit-color-swatch-wrapper {
  padding: 2px;
}
.scrying-pool.directors-board .directors-board__tile-border-color::-webkit-color-swatch {
  border: none;
  border-radius: 3px;
}
.scrying-pool.directors-board .directors-board__tile-shape-btn {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--sp-btn-radius, 5px);
  cursor: pointer;
  color: var(--sp-text-muted);
  padding: 0;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.scrying-pool.directors-board .directors-board__tile-shape-btn i {
  font-size: 11px;
  pointer-events: none;
}
.scrying-pool.directors-board .directors-board__tile-shape-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--sp-text-primary);
  border-color: rgba(255, 255, 255, 0.2);
}
.scrying-pool.directors-board .directors-board__tile-shape-btn.is-active {
  background: rgba(74, 158, 107, 0.2);
  border-color: var(--sp-accent);
  color: var(--sp-accent);
}
.directors-board__preset-panel {
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--sp-dialog-radius);
  padding: 10px 12px 12px;
  margin-top: 8px;
  display: flex;
  flex-direction: column;
  gap: 0;
  font-size: 13px;
  line-height: 1.4;
  color: var(--sp-text-primary);
}
.directors-board__preset-panel-header {
  margin-bottom: 8px;
  padding-bottom: 7px;
  border-bottom: 1px solid var(--sp-border-subtle);
}
.directors-board__preset-panel-title {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  color: var(--sp-text-primary);
  letter-spacing: 0.02em;
  text-transform: uppercase;
  opacity: 0.75;
}
.directors-board__preset-panel-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.directors-board__preset-panel-row {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
}
.directors-board__preset-panel-row--hint {
  font-size: 11px;
  color: var(--sp-text-secondary);
  margin-top: 4px;
  padding-top: 8px;
  border-top: 1px solid var(--sp-border-subtle);
  opacity: 0.7;
}
.directors-board__preset-panel-label {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  cursor: default;
  user-select: none;
  white-space: nowrap;
}
.directors-board__preset-panel-toggle {
  flex-shrink: 0;
  appearance: none;
  -webkit-appearance: none;
  width: 14px;
  height: 14px;
  border: 1.5px solid var(--sp-border);
  border-radius: 3px;
  background-color: var(--sp-surface);
  cursor: pointer;
  position: relative;
  transition: background-color 120ms ease, border-color 120ms ease;
  margin: 0;
}
.directors-board__preset-panel-toggle:checked {
  background-color: var(--sp-accent);
  border-color: var(--sp-accent);
}
.directors-board__preset-panel-toggle:checked::after {
  content: '';
  position: absolute;
  top: 1px;
  left: 3px;
  width: 5px;
  height: 8px;
  border: 2px solid white;
  border-top: none;
  border-left: none;
  transform: rotate(40deg);
}
.directors-board__preset-panel-toggle:focus {
  outline: 2px solid var(--sp-focus);
  outline-offset: 2px;
}
.directors-board__preset-panel-select {
  flex: 1;
  min-width: 0;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  padding: 4px 6px;
  font-family: inherit;
  font-size: 12px;
  color: var(--sp-text-primary);
  cursor: pointer;
  transition: border-color 120ms ease;
}
.directors-board__preset-panel-select:hover:not(:disabled) {
  border-color: var(--sp-accent);
}
.directors-board__preset-panel-select:focus {
  outline: none;
  border-color: var(--sp-focus);
}
.directors-board__preset-panel-select:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.directors-board__preset-panel-delay-value {
  flex-shrink: 0;
  min-width: 38px;
  text-align: right;
  font-family: monospace;
  font-size: 11px;
  color: var(--sp-text-secondary);
  background: rgba(0, 0, 0, 0.2);
  border-radius: 3px;
  padding: 1px 4px;
}
.directors-board__preset-panel-slider {
  flex: 1;
  -webkit-appearance: none;
  appearance: none;
  height: 4px;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 2px;
  outline: none;
  cursor: pointer;
  margin: 0;
}
.directors-board__preset-panel-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 12px;
  height: 12px;
  background: var(--sp-accent);
  border-radius: 50%;
  cursor: pointer;
  transition: transform 120ms ease;
}
.directors-board__preset-panel-slider::-webkit-slider-thumb:hover {
  transform: scale(1.2);
}
.directors-board__preset-panel-slider::-moz-range-thumb {
  width: 12px;
  height: 12px;
  background: var(--sp-accent);
  border-radius: 50%;
  cursor: pointer;
  border: none;
  transition: transform 120ms ease;
}
.directors-board__preset-panel-slider::-moz-range-thumb:hover {
  transform: scale(1.2);
}
.directors-board__preset-panel-message {
  margin: 4px 0 0;
  color: var(--sp-text-secondary);
  font-style: italic;
  text-align: center;
  font-size: 12px;
}
@media (prefers-reduced-motion: reduce) {
  .directors-board__preset-panel-toggle,
  .directors-board__preset-panel-select,
  .directors-board__preset-panel-slider::-webkit-slider-thumb,
  .directors-board__preset-panel-slider::-moz-range-thumb {
    transition: none;
  }
  .directors-board__preset-panel-slider::-webkit-slider-thumb:hover,
  .directors-board__preset-panel-slider::-moz-range-thumb:hover {
    transform: none;
  }
}
.sp-visibility-badge {
  transition: none;
  animation: none;
}
:root {
  --sp-badge-bg: hsl(220, 15%, 10%);
  --sp-badge-text: hsl(0, 0%, 85%);
  --sp-badge-border: hsl(220, 15%, 25%);
  --sp-badge-font-size: 0.6875rem;
  --sp-badge-letter-sp: 0.02em;
  --sp-chip-bg: hsl(220, 15%, 15%);
  --sp-chip-text: hsl(0, 0%, 75%);
}
.sp-visibility-badge {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 6px;
  background: var(--sp-badge-bg);
  color: var(--sp-badge-text);
  border: 1px solid var(--sp-badge-border);
  border-radius: 4px;
  cursor: pointer;
  white-space: nowrap;
}
.sp-visibility-badge__label {
  font-size: var(--sp-badge-font-size);
  letter-spacing: var(--sp-badge-letter-sp);
  line-height: 1.2;
}
.sp-first-encounter-panel {
  position: fixed;
  z-index: 100;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%);
  max-width: 280px;
  background: var(--sp-badge-bg);
  color: var(--sp-badge-text);
  border: 1px solid var(--sp-badge-border);
  border-radius: 6px;
  padding: 12px 16px;
  overflow: hidden;
  max-height: 200px;
}
.sp-first-encounter-panel__title {
  font-size: 0.75rem;
  font-weight: 600;
  margin: 0 0 6px;
}
.sp-first-encounter-panel__body {
  font-size: 0.6875rem;
  margin: 0 0 10px;
}
.sp-first-encounter-panel__got-it {
  font-size: 0.6875rem;
  padding: 4px 10px;
  cursor: pointer;
  border-radius: 3px;
}
.sp-visibility-chip {
  position: fixed;
  z-index: 100;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%);
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  background: var(--sp-chip-bg);
  color: var(--sp-chip-text);
  border: 1px solid var(--sp-badge-border);
  border-radius: 12px;
  font-size: var(--sp-badge-font-size);
  cursor: pointer;
}
.sp-visibility-chip:focus-visible {
  outline: 2px solid var(--sp-state-active, hsl(220, 80%, 60%));
  outline-offset: 2px;
}
dialog.sp-visibility-details-panel {
  background: var(--sp-badge-bg);
  color: var(--sp-badge-text);
  border: 1px solid var(--sp-badge-border);
  border-radius: 8px;
  padding: 20px 24px;
  max-width: 320px;
  width: 100%;
}
dialog.sp-visibility-details-panel__state {
  font-size: 0.875rem;
  font-weight: 600;
  margin: 0 0 10px;
}
dialog.sp-visibility-details-panel__reassurance,
dialog.sp-visibility-details-panel__audio-note {
  font-size: 0.75rem;
  margin: 0 0 10px;
}
dialog.sp-visibility-details-panel__stale {
  font-size: 0.6875rem;
  opacity: 0.6;
  margin: 0 0 10px;
  font-style: italic;
}
dialog.sp-visibility-details-panel__close {
  display: block;
  margin-top: 12px;
  padding: 6px 14px;
  cursor: pointer;
  border-radius: 4px;
  font-size: 0.75rem;
}
dialog.sp-visibility-details-panel::backdrop {
  background: hsla(0, 0%, 0%, 0.4);
}
@media (prefers-reduced-motion: no-preference) {
  .sp-first-encounter-panel {
    transition: max-height 300ms ease-out, opacity 300ms ease-out;
  }
  .sp-first-encounter-panel--collapsing {
    max-height: 0;
    opacity: 0;
  }
}
.scrying-pool .sp-strip__overlay-layer {
  z-index: 10;
}
.scrying-pool .sp-strip__overlay-layer > * {
  pointer-events: auto;
}
.scrying-pool__confirmation-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 12px 16px;
  border-radius: 4px 4px 0 0;
  box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.3);
  z-index: 100;
  font-size: 14px;
  line-height: 1.4;
  display: flex;
  align-items: center;
  gap: 12px;
  transition: opacity 200ms ease-out;
  opacity: 1;
  user-select: none;
}
.scrying-pool__confirmation-bar--default {
  background-color: var(--sp-surface);
  border-top: 1px solid var(--sp-border);
  color: var(--sp-text-primary);
}
.scrying-pool__confirmation-bar--default .sp-confirmation-bar__message {
  color: var(--sp-text-primary);
}
.scrying-pool__confirmation-bar--amber {
  background-color: var(--sp-surface);
  border-top: 1px solid var(--sp-border-warning);
}
.scrying-pool__confirmation-bar--amber .sp-confirmation-bar__message {
  color: var(--sp-text-warning);
}
.scrying-pool .sp-confirmation-bar__message {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.scrying-pool .sp-confirmation-bar__undo-btn {
  background: transparent;
  border: none;
  padding: 6px 12px;
  margin: 0;
  cursor: pointer;
  font-family: inherit;
  font-size: inherit;
  font-weight: 600;
  text-decoration: none;
  color: var(--sp-accent);
  border-radius: 4px;
  transition: background-color 200ms ease, color 200ms ease;
}
.scrying-pool .sp-confirmation-bar__undo-btn:hover {
  background-color: rgba(255, 255, 255, 0.06);
  color: var(--sp-accent-hover);
}
.scrying-pool .sp-confirmation-bar__undo-btn:active {
  background-color: rgba(255, 255, 255, 0.1);
}
.scrying-pool .sp-confirmation-bar__undo-btn:focus {
  outline: 2px solid var(--sp-focus);
  outline-offset: 2px;
}
.scrying-pool .sp-confirmation-bar__undo-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
@keyframes sp-confirmation-bar-slide-up {
  from {
    opacity: 0;
    transform: translateY(100%);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@keyframes sp-confirmation-bar-slide-down {
  from {
    opacity: 1;
    transform: translateY(0);
  }
  to {
    opacity: 0;
    transform: translateY(100%);
  }
}
@media (prefers-reduced-motion: no-preference) {
  .scrying-pool__confirmation-bar {
    animation: sp-confirmation-bar-slide-up 200ms ease-out;
  }
  .scrying-pool.is-hiding {
    animation: sp-confirmation-bar-slide-down 200ms ease-in forwards;
  }
}
@media (prefers-reduced-motion: reduce) {
  .scrying-pool__confirmation-bar {
    animation: none;
    transition: none;
  }
}
/**
 * Preset Save Dialog — compact, polished design.
 * Follows SP token system; mirrors Directors Board aesthetic.
 */
.scrying-pool.preset-save-dialog {
  background: var(--sp-dialog-bg);
  color: var(--sp-text-primary);
  border: var(--sp-dialog-border);
  border-top: 2px solid var(--sp-accent);
  border-radius: var(--sp-dialog-radius);
  box-shadow: var(--sp-dialog-shadow);
}
.scrying-pool.preset-save-dialog .preset-save-dialog__form {
  display: flex;
  flex-direction: column;
  height: 100%;
  gap: 0;
}
.scrying-pool.preset-save-dialog .preset-save-dialog__header {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 14px 16px 10px;
  border-bottom: 1px solid var(--sp-border);
  background: rgba(255, 255, 255, 0.02);
}
.scrying-pool.preset-save-dialog .preset-save-dialog__header-icon {
  flex-shrink: 0;
  font-size: 16px;
  color: var(--sp-accent);
  margin-top: 1px;
  opacity: 0.9;
}
.scrying-pool.preset-save-dialog .preset-save-dialog__description {
  margin: 0;
  font-family: var(--font-primary, ui-sans-serif, system-ui, sans-serif);
  font-size: 12px;
  color: var(--sp-text-secondary);
  line-height: 1.45;
}
.scrying-pool.preset-save-dialog .preset-save-dialog__body {
  padding: 16px;
  overflow-y: auto;
  flex: 1 1 auto;
}
.scrying-pool.preset-save-dialog .preset-save-dialog__field {
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.scrying-pool.preset-save-dialog .preset-save-dialog__label {
  font-family: var(--font-primary, ui-sans-serif, system-ui, sans-serif);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--sp-text-muted);
  cursor: default;
}
.scrying-pool.preset-save-dialog .preset-save-dialog__input {
  width: 100%;
  font-family: var(--font-primary, ui-sans-serif, system-ui, sans-serif);
  font-size: 14px;
  padding: 9px 12px;
  border: 1px solid var(--sp-border);
  border-radius: var(--sp-btn-radius);
  background: var(--sp-control-bg, #1a1d20);
  color: var(--sp-text-primary);
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
  box-sizing: border-box;
}
.scrying-pool.preset-save-dialog .preset-save-dialog__input:focus {
  border-color: var(--sp-accent);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--sp-accent) 22%, transparent);
}
.scrying-pool.preset-save-dialog .preset-save-dialog__input::placeholder {
  color: var(--sp-text-muted);
  font-style: italic;
  font-size: 13px;
}
.scrying-pool.preset-save-dialog .preset-save-dialog__footer {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.15);
  flex-shrink: 0;
  border-radius: 0 0 var(--sp-dialog-radius) var(--sp-dialog-radius);
}
.scrying-pool.preset-save-dialog .preset-save-dialog__btn {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-btn-gap, 6px);
  padding: var(--sp-btn-padding, 7px 14px);
  font-family: var(--font-primary, ui-sans-serif, system-ui, sans-serif);
  font-size: var(--sp-btn-font-size, 12px);
  font-weight: 600;
  border: 1px solid transparent;
  border-radius: var(--sp-btn-radius, 5px);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s, opacity 0.15s;
  line-height: 1.2;
}
.scrying-pool.preset-save-dialog .preset-save-dialog__btn i {
  font-size: 10px;
  pointer-events: none;
}
.scrying-pool.preset-save-dialog .preset-save-dialog__btn--save {
  background: var(--sp-btn-primary-bg, var(--sp-accent));
  color: var(--sp-btn-primary-text, #fff);
  letter-spacing: 0.02em;
}
.scrying-pool.preset-save-dialog .preset-save-dialog__btn--save:hover {
  background: var(--sp-btn-primary-hover, var(--sp-accent-hover));
}
.scrying-pool.preset-save-dialog .preset-save-dialog__btn--save:active {
  background: var(--sp-btn-primary-active, var(--sp-accent-active));
}
.scrying-pool.preset-save-dialog .preset-save-dialog__btn--save i {
  opacity: 1;
}
.scrying-pool.preset-save-dialog .preset-save-dialog__btn--cancel {
  background: var(--sp-btn-secondary-bg, rgba(255, 255, 255, 0.05));
  color: var(--sp-btn-secondary-text, var(--sp-text-secondary));
  border-color: var(--sp-btn-secondary-border, rgba(255, 255, 255, 0.12));
  font-weight: 500;
}
.scrying-pool.preset-save-dialog .preset-save-dialog__btn--cancel:hover {
  background: var(--sp-btn-secondary-hover-bg, rgba(255, 255, 255, 0.1));
  color: var(--sp-btn-secondary-hover-text, var(--sp-text-primary));
}
.scrying-pool.preset-load-dialog {
  background: var(--sp-dialog-bg);
  color: var(--sp-text-primary);
  border: var(--sp-dialog-border);
  border-top: 2px solid var(--sp-accent);
  border-radius: var(--sp-dialog-radius);
  box-shadow: var(--sp-dialog-shadow);
}
.scrying-pool.preset-load-dialog .preset-load-dialog__content {
  display: flex;
  flex-direction: column;
  height: 100%;
  gap: 0;
}
.scrying-pool.preset-load-dialog .preset-load-dialog__body {
  padding: 12px;
  overflow-y: auto;
  flex: 1 1 auto;
}
.scrying-pool.preset-load-dialog .preset-load-dialog__empty {
  text-align: center;
  color: var(--sp-text-muted);
  font-size: 13px;
  padding: 24px 0;
  margin: 0;
  font-style: italic;
}
.scrying-pool.preset-load-dialog .preset-load-dialog__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.scrying-pool.preset-load-dialog .preset-load-dialog__item {
  margin: 0;
  padding: 0;
}
.scrying-pool.preset-load-dialog .preset-load-dialog__btn {
  width: 100%;
  text-align: left;
  font-size: 13px;
  padding: 8px 12px;
  border-radius: var(--sp-btn-radius);
  cursor: pointer;
  transition: background-color 0.15s, border-color 0.15s, color 0.15s;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  line-height: 1.2;
}
.scrying-pool.preset-load-dialog .preset-load-dialog__btn i {
  font-size: 0.85em;
  opacity: 0.7;
  flex-shrink: 0;
}
.scrying-pool.preset-load-dialog .preset-load-dialog__btn--load {
  background: rgba(255, 255, 255, 0.04);
  color: var(--sp-text-primary);
  border: 1px solid rgba(255, 255, 255, 0.1);
  font-weight: 500;
}
.scrying-pool.preset-load-dialog .preset-load-dialog__btn--load:hover {
  background: rgba(74, 158, 107, 0.85);
  border-color: var(--sp-accent);
  color: #fff;
}
.scrying-pool.preset-load-dialog .preset-load-dialog__btn--load:hover i {
  opacity: 1;
}
.scrying-pool.preset-load-dialog .preset-load-dialog__btn--load:active {
  opacity: 0.85;
}
.scrying-pool.preset-load-dialog .preset-load-dialog__btn--cancel {
  background: transparent;
  color: var(--sp-text-muted);
  border: 1px solid rgba(255, 255, 255, 0.1);
  font-weight: 500;
}
.scrying-pool.preset-load-dialog .preset-load-dialog__btn--cancel:hover {
  color: var(--sp-text-primary);
  border-color: rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.05);
}
.scrying-pool.preset-load-dialog .preset-load-dialog__footer {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 10px 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.15);
  flex-shrink: 0;
  border-radius: 0 0 var(--sp-dialog-radius) var(--sp-dialog-radius);
}
.sp-preset-export-dialog,
.sp-preset-import-dialog {
  display: flex;
  flex-direction: column;
  height: 100%;
}
.scrying-pool.dialog.preset-export,
.scrying-pool.dialog.preset-import {
  background: var(--sp-dialog-bg);
  color: var(--sp-text-primary);
  border: var(--sp-dialog-border);
  border-top: 2px solid var(--sp-accent);
  border-radius: var(--sp-dialog-radius);
  box-shadow: var(--sp-dialog-shadow);
}
.scrying-pool.dialog.preset-export .sp-dialog-content,
.scrying-pool.dialog.preset-import .sp-dialog-content {
  padding: var(--sp-space-m);
  color: var(--sp-text-primary);
}
.scrying-pool.dialog.preset-export .sp-dialog-buttons,
.scrying-pool.dialog.preset-import .sp-dialog-buttons {
  display: flex;
  justify-content: flex-end;
  gap: var(--sp-space-xs);
  padding: var(--sp-space-m);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.15);
  border-radius: 0 0 var(--sp-dialog-radius) var(--sp-dialog-radius);
}
.scrying-pool.dialog.preset-export .sp-export-description,
.scrying-pool.dialog.preset-import .sp-export-description,
.scrying-pool.dialog.preset-export .sp-import-description,
.scrying-pool.dialog.preset-import .sp-import-description {
  margin: 0 0 var(--sp-space-m) 0;
  color: var(--sp-text-secondary);
  line-height: 1.5;
}
.scrying-pool.dialog.preset-export .sp-form-group,
.scrying-pool.dialog.preset-import .sp-form-group {
  margin-bottom: var(--sp-space-m);
}
.scrying-pool.dialog.preset-export .sp-form-group:last-child,
.scrying-pool.dialog.preset-import .sp-form-group:last-child {
  margin-bottom: 0;
}
.scrying-pool.dialog.preset-export .sp-form-label,
.scrying-pool.dialog.preset-import .sp-form-label {
  display: block;
  margin-bottom: var(--sp-space-xs);
  font-weight: 600;
  color: var(--sp-text-primary);
  font-size: var(--sp-font-size-sm);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.scrying-pool.dialog.preset-export .sp-export-info,
.scrying-pool.dialog.preset-import .sp-export-info,
.scrying-pool.dialog.preset-export .sp-import-info,
.scrying-pool.dialog.preset-import .sp-import-info {
  display: flex;
  align-items: center;
  gap: var(--sp-space-xs);
  margin-bottom: var(--sp-space-xs);
  padding: var(--sp-space-xs) var(--sp-space-sm);
  background: var(--sp-surface-subtle);
  border-radius: var(--sp-radius-sm);
  font-size: var(--sp-font-size-sm);
}
.scrying-pool.dialog.preset-export .sp-info-label,
.scrying-pool.dialog.preset-import .sp-info-label {
  color: var(--sp-text-secondary);
  font-weight: 600;
}
.scrying-pool.dialog.preset-export .sp-info-value,
.scrying-pool.dialog.preset-import .sp-info-value {
  color: var(--sp-text-primary);
}
.scrying-pool.dialog.preset-export .sp-filename,
.scrying-pool.dialog.preset-import .sp-filename {
  font-family: monospace;
  font-size: 0.85em;
  word-break: break-all;
}
.scrying-pool.dialog.preset-export .sp-btn,
.scrying-pool.dialog.preset-import .sp-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-btn-gap, 6px);
  padding: var(--sp-btn-padding, 7px 14px);
  border: 1px solid transparent;
  border-radius: var(--sp-btn-radius, 5px);
  font-size: var(--sp-btn-font-size, 12px);
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s, opacity 0.15s;
  line-height: 1.2;
}
.scrying-pool.dialog.preset-export .sp-btn:disabled,
.scrying-pool.dialog.preset-import .sp-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
}
.scrying-pool.dialog.preset-export .sp-btn i,
.scrying-pool.dialog.preset-import .sp-btn i {
  font-size: 0.9em;
  pointer-events: none;
}
.scrying-pool.dialog.preset-export .sp-btn-primary,
.scrying-pool.dialog.preset-import .sp-btn-primary {
  background: var(--sp-btn-primary-bg, var(--sp-accent));
  color: var(--sp-btn-primary-text, #fff);
}
.scrying-pool.dialog.preset-export .sp-btn-primary:hover:not(:disabled),
.scrying-pool.dialog.preset-import .sp-btn-primary:hover:not(:disabled) {
  background: var(--sp-btn-primary-hover, var(--sp-accent-hover));
}
.scrying-pool.dialog.preset-export .sp-btn-primary:active:not(:disabled),
.scrying-pool.dialog.preset-import .sp-btn-primary:active:not(:disabled) {
  background: var(--sp-btn-primary-active, var(--sp-accent-active));
}
.scrying-pool.dialog.preset-export .sp-btn-secondary,
.scrying-pool.dialog.preset-import .sp-btn-secondary {
  background: var(--sp-btn-secondary-bg, rgba(255, 255, 255, 0.05));
  color: var(--sp-btn-secondary-text, var(--sp-text-secondary));
  border-color: var(--sp-btn-secondary-border, rgba(255, 255, 255, 0.12));
  font-weight: 500;
}
.scrying-pool.dialog.preset-export .sp-btn-secondary:hover:not(:disabled),
.scrying-pool.dialog.preset-import .sp-btn-secondary:hover:not(:disabled) {
  background: var(--sp-btn-secondary-hover-bg, rgba(255, 255, 255, 0.1));
  color: var(--sp-btn-secondary-hover-text, var(--sp-text-primary));
}
.scrying-pool.dialog.preset-export .sp-btn-danger,
.scrying-pool.dialog.preset-import .sp-btn-danger {
  background: var(--sp-btn-danger-bg, var(--sp-color-red));
  color: var(--sp-btn-danger-text, #fff);
}
.scrying-pool.dialog.preset-export .sp-btn-danger:hover:not(:disabled),
.scrying-pool.dialog.preset-import .sp-btn-danger:hover:not(:disabled) {
  background: var(--sp-btn-danger-hover, var(--sp-color-red-dark));
}
.scrying-pool.dialog.preset-export .sp-file-upload,
.scrying-pool.dialog.preset-import .sp-file-upload {
  position: relative;
  overflow: hidden;
  display: inline-block;
}
.scrying-pool.dialog.preset-export .sp-file-input,
.scrying-pool.dialog.preset-import .sp-file-input {
  position: absolute;
  left: 0;
  top: 0;
  opacity: 0;
  width: 100%;
  height: 100%;
  cursor: pointer;
  z-index: 2;
}
.scrying-pool.dialog.preset-export .sp-file-label,
.scrying-pool.dialog.preset-import .sp-file-label {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-space-xs);
  padding: var(--sp-space-sm) var(--sp-space-m);
  background: rgba(255, 255, 255, 0.04);
  border: 1px dashed rgba(255, 255, 255, 0.2);
  border-radius: var(--sp-btn-radius, 5px);
  cursor: pointer;
  color: var(--sp-text-secondary);
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.scrying-pool.dialog.preset-export .sp-file-label:hover,
.scrying-pool.dialog.preset-import .sp-file-label:hover {
  border-color: var(--sp-accent);
  color: var(--sp-accent);
  background: rgba(255, 255, 255, 0.06);
}
.scrying-pool.dialog.preset-export .sp-file-label i,
.scrying-pool.dialog.preset-import .sp-file-label i {
  font-size: 1.1em;
}
.scrying-pool.dialog.preset-export .sp-file-selected,
.scrying-pool.dialog.preset-import .sp-file-selected {
  display: flex;
  align-items: center;
  gap: var(--sp-space-xs);
  margin-top: var(--sp-space-xs);
  padding: var(--sp-space-xs) var(--sp-space-sm);
  background: var(--sp-color-green-subtle);
  border-radius: var(--sp-radius-sm);
  font-size: var(--sp-font-size-sm);
  color: var(--sp-color-green);
}
.scrying-pool.dialog.preset-export .sp-file-selected i,
.scrying-pool.dialog.preset-import .sp-file-selected i {
  font-size: 0.9em;
}
.scrying-pool.dialog.preset-export .sp-radio-group,
.scrying-pool.dialog.preset-import .sp-radio-group {
  display: flex;
  flex-direction: column;
  gap: var(--sp-space-xs);
}
.scrying-pool.dialog.preset-export .sp-radio-label,
.scrying-pool.dialog.preset-import .sp-radio-label {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-space-sm);
  padding: var(--sp-space-xs) var(--sp-space-sm);
  border-radius: var(--sp-btn-radius, 5px);
  cursor: pointer;
  transition: background 0.15s ease;
}
.scrying-pool.dialog.preset-export .sp-radio-label:hover,
.scrying-pool.dialog.preset-import .sp-radio-label:hover {
  background: rgba(255, 255, 255, 0.04);
}
.scrying-pool.dialog.preset-export .sp-radio-label input[type="radio"],
.scrying-pool.dialog.preset-import .sp-radio-label input[type="radio"] {
  margin-top: 0.2em;
  accent-color: var(--sp-accent);
}
.scrying-pool.dialog.preset-export .sp-radio-label .sp-radio-text,
.scrying-pool.dialog.preset-import .sp-radio-label .sp-radio-text {
  font-weight: 500;
  color: var(--sp-text-primary);
}
.scrying-pool.dialog.preset-export .sp-radio-label .sp-radio-hint,
.scrying-pool.dialog.preset-import .sp-radio-label .sp-radio-hint {
  display: block;
  font-size: 0.85em;
  color: var(--sp-text-secondary);
  margin-top: 0.1em;
}
.scrying-pool.dialog.preset-export .sp-preview-section,
.scrying-pool.dialog.preset-import .sp-preview-section {
  margin-top: var(--sp-space-m);
  padding-top: var(--sp-space-m);
  border-top: 1px solid var(--sp-border);
}
.scrying-pool.dialog.preset-export .sp-preview-title,
.scrying-pool.dialog.preset-import .sp-preview-title {
  margin: 0 0 var(--sp-space-sm) 0;
  font-size: var(--sp-font-size-sm);
  font-weight: 600;
  color: var(--sp-text-primary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.scrying-pool.dialog.preset-export .sp-preview-list,
.scrying-pool.dialog.preset-import .sp-preview-list {
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: 200px;
  overflow-y: auto;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--sp-btn-radius, 5px);
  background: rgba(0, 0, 0, 0.2);
}
.scrying-pool.dialog.preset-export .sp-preview-item,
.scrying-pool.dialog.preset-import .sp-preview-item {
  display: flex;
  align-items: center;
  gap: var(--sp-space-sm);
  padding: var(--sp-space-xs) var(--sp-space-sm);
  border-bottom: 1px solid var(--sp-border-subtle);
}
.scrying-pool.dialog.preset-export .sp-preview-item:last-child,
.scrying-pool.dialog.preset-import .sp-preview-item:last-child {
  border-bottom: none;
}
.scrying-pool.dialog.preset-export .sp-preview-item i,
.scrying-pool.dialog.preset-import .sp-preview-item i {
  font-size: 0.9em;
  flex-shrink: 0;
}
.scrying-pool.dialog.preset-export .sp-preview-item .sp-valid,
.scrying-pool.dialog.preset-import .sp-preview-item .sp-valid {
  color: var(--sp-color-green);
}
.scrying-pool.dialog.preset-export .sp-preview-item .sp-invalid,
.scrying-pool.dialog.preset-import .sp-preview-item .sp-invalid {
  color: var(--sp-color-red);
}
.scrying-pool.dialog.preset-export .sp-preview-item .sp-preview-name,
.scrying-pool.dialog.preset-import .sp-preview-item .sp-preview-name {
  flex-grow: 1;
  font-size: var(--sp-font-size-sm);
  color: var(--sp-text-primary);
}
.scrying-pool.dialog.preset-export .sp-preview-item .sp-preview-error,
.scrying-pool.dialog.preset-import .sp-preview-item .sp-preview-error {
  font-size: 0.8em;
  color: var(--sp-color-red);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 200px;
}
.scrying-pool.dialog.preset-export .sp-preview-item--invalid,
.scrying-pool.dialog.preset-import .sp-preview-item--invalid {
  background: rgba(var(--sp-color-red-rgb), 0.05);
}
.scrying-pool.dialog.preset-export .sp-warning-box,
.scrying-pool.dialog.preset-import .sp-warning-box {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-space-sm);
  padding: var(--sp-space-sm);
  margin-bottom: var(--sp-space-m);
  background: var(--sp-color-yellow-subtle);
  border-radius: var(--sp-radius-sm);
  color: var(--sp-color-yellow);
  font-size: var(--sp-font-size-sm);
}
.scrying-pool.dialog.preset-export .sp-warning-box i,
.scrying-pool.dialog.preset-import .sp-warning-box i {
  font-size: 1.1em;
  flex-shrink: 0;
  margin-top: 0.1em;
}
.scrying-pool.dialog.preset-export .sp-confirmation-section,
.scrying-pool.dialog.preset-import .sp-confirmation-section {
  margin-top: var(--sp-space-m);
  padding: var(--sp-space-sm);
  background: var(--sp-color-red-subtle);
  border-radius: var(--sp-radius-sm);
}
.scrying-pool.dialog.preset-export .sp-confirmation-warning,
.scrying-pool.dialog.preset-import .sp-confirmation-warning {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-space-sm);
  color: var(--sp-color-red);
  font-size: var(--sp-font-size-sm);
  font-weight: 500;
}
.scrying-pool.dialog.preset-export .sp-confirmation-warning i,
.scrying-pool.dialog.preset-import .sp-confirmation-warning i {
  font-size: 1.1em;
  flex-shrink: 0;
  margin-top: 0.1em;
}
.scrying-pool.dialog.preset-export .fas.fa-spinner.fa-spin,
.scrying-pool.dialog.preset-import .fas.fa-spinner.fa-spin {
  animation: sp-spin 0.8s linear infinite;
}
@keyframes sp-spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}
@media (max-width: 768px) {
  .scrying-pool.dialog.preset-export,
  .scrying-pool.dialog.preset-import {
    width: 90vw;
    max-width: 500px;
  }
  .sp-dialog-buttons {
    flex-wrap: wrap;
    gap: var(--sp-space-sm);
  }
  .sp-dialog-buttons .sp-btn {
    flex: 1 1 100%;
  }
}
/**
 * Player Privacy Panel styles.
 *
 * Uses SP (Scrying Pool) semantic token system.
 * All colors and spacing come from SP tokens, not Foundry tokens directly.
 */
.scrying-pool.player-privacy-panel {
  background: var(--sp-dialog-bg);
  color: var(--sp-text-primary);
  font-family: var(--font-primary, inherit);
  border: var(--sp-dialog-border);
  border-top: 2px solid var(--sp-accent);
  border-radius: var(--sp-dialog-radius);
  box-shadow: var(--sp-dialog-shadow);
}
.scrying-pool .player-privacy-panel__container {
  display: flex;
  flex-direction: column;
  min-width: 300px;
  max-width: 400px;
}
.scrying-pool .player-privacy-panel__body {
  padding: 12px;
  background: var(--sp-surface);
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.scrying-pool .player-privacy-panel__notice {
  padding: 8px 12px;
  margin-bottom: 10px;
  border-radius: 4px;
  font-size: 12px;
  text-align: center;
}
.scrying-pool .player-privacy-panel__notice--readonly {
  background: var(--sp-color-yellow-subtle);
  color: var(--sp-color-yellow);
  border: 1px solid var(--sp-color-yellow-subtle);
}
.scrying-pool .player-privacy-panel__section {
  margin-bottom: 12px;
}
.scrying-pool .player-privacy-panel__section-header {
  margin: 0 0 4px 0;
  font-family: var(--font-primary, ui-sans-serif, system-ui, sans-serif);
  font-size: 13px;
  font-weight: 700;
  color: var(--sp-text-primary);
  letter-spacing: 0.02em;
  text-transform: uppercase;
  opacity: 0.85;
}
.scrying-pool .player-privacy-panel__section-description {
  margin: 0 0 10px 0;
  font-size: 12px;
  color: var(--sp-text-secondary);
  line-height: 1.4;
}
.scrying-pool .player-privacy-panel__effects-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.scrying-pool .player-privacy-panel__effect {
  padding: 8px 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--sp-btn-radius, 5px);
  background: rgba(0, 0, 0, 0.15);
  transition: border-color 120ms ease;
}
.scrying-pool .player-privacy-panel__effect:hover {
  border-color: rgba(255, 255, 255, 0.2);
}
.scrying-pool .player-privacy-panel__effect-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
  gap: 8px;
}
.scrying-pool .player-privacy-panel__effect-label {
  margin: 0;
  font-family: var(--font-primary, ui-sans-serif, system-ui, sans-serif);
  font-size: 13px;
  font-weight: 600;
  color: var(--sp-text-primary);
  letter-spacing: 0;
}
.scrying-pool .player-privacy-panel__effect-description {
  margin: 0;
  font-size: 11px;
  color: var(--sp-text-secondary);
  line-height: 1.4;
  opacity: 0.8;
}
.scrying-pool .player-privacy-panel__toggle {
  flex-shrink: 0;
  display: flex;
  align-items: center;
}
.scrying-pool .player-privacy-panel__toggle-label {
  display: flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  user-select: none;
  font-size: 12px;
}
.scrying-pool .player-privacy-panel__toggle-input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}
.scrying-pool .player-privacy-panel__toggle-input:focus-visible + .player-privacy-panel__toggle-text {
  outline: 2px solid var(--sp-focus);
  outline-offset: 2px;
}
.scrying-pool .player-privacy-panel__toggle-input:disabled + .player-privacy-panel__toggle-text {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
}
.scrying-pool .player-privacy-panel__toggle-text {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border: 1px solid var(--sp-border);
  border-radius: 20px;
  font-family: var(--font-primary, ui-sans-serif, system-ui, sans-serif);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--sp-text-secondary);
  background: rgba(255, 255, 255, 0.04);
  transition: background 120ms ease, color 120ms ease, border-color 120ms ease;
  cursor: pointer;
}
.scrying-pool .player-privacy-panel__toggle-text i {
  font-size: 9px;
  opacity: 0.7;
}
.player-privacy-panel__toggle-input:checked + .scrying-pool .player-privacy-panel__toggle-text {
  background: var(--sp-color-green-subtle);
  color: var(--sp-color-green);
  border-color: color-mix(in srgb, var(--sp-accent) 40%, transparent);
}
.player-privacy-panel__toggle-input:checked + .scrying-pool .player-privacy-panel__toggle-text i {
  opacity: 1;
}
.player-privacy-panel__toggle-label:hover .scrying-pool .player-privacy-panel__toggle-text {
  border-color: var(--sp-accent);
}
.player-privacy-panel__toggle-input:checked + .scrying-pool .player-privacy-panel__toggle-text:hover,
.player-privacy-panel__toggle-label:hover .player-privacy-panel__toggle-input:checked + .scrying-pool .player-privacy-panel__toggle-text {
  background: color-mix(in srgb, var(--sp-accent) 25%, transparent);
}
.scrying-pool .player-privacy-panel__portrait-container {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}
.scrying-pool .player-privacy-panel__portrait-preview {
  flex-shrink: 0;
  width: 80px;
  height: 80px;
  border: 2px solid rgba(255, 255, 255, 0.12);
  border-radius: 6px;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
}
.scrying-pool .player-privacy-panel__portrait-image {
  max-width: 100%;
  max-height: 100%;
  object-fit: cover;
}
.scrying-pool .player-privacy-panel__portrait-actions {
  display: flex;
  flex-direction: column;
  gap: 6px;
  justify-content: center;
}
.scrying-pool .player-privacy-panel__portrait-choose,
.scrying-pool .player-privacy-panel__portrait-remove {
  font-size: var(--sp-btn-font-size, 12px);
  padding: var(--sp-btn-padding-sm, 5px 10px);
  display: inline-flex;
  align-items: center;
  gap: var(--sp-btn-gap, 6px);
  border: 1px solid transparent;
  border-radius: var(--sp-btn-radius, 5px);
  cursor: pointer;
  font-weight: 600;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
  line-height: 1.2;
}
.scrying-pool .player-privacy-panel__portrait-choose {
  background: var(--sp-btn-primary-bg, var(--sp-accent));
  color: var(--sp-btn-primary-text, #fff);
}
.scrying-pool .player-privacy-panel__portrait-choose:hover {
  background: var(--sp-btn-primary-hover, var(--sp-accent-hover));
}
.scrying-pool .player-privacy-panel__portrait-remove {
  background: var(--sp-btn-secondary-bg, rgba(255, 255, 255, 0.05));
  color: var(--sp-btn-secondary-text, var(--sp-text-secondary));
  border-color: var(--sp-btn-secondary-border, rgba(255, 255, 255, 0.12));
  font-weight: 500;
}
.scrying-pool .player-privacy-panel__portrait-remove:hover {
  background: var(--sp-btn-secondary-hover-bg, rgba(255, 255, 255, 0.1));
  color: var(--sp-btn-secondary-hover-text, var(--sp-text-primary));
}
.scrying-pool.gm-privacy-selector-dialog {
  background: var(--sp-dialog-bg);
  border: var(--sp-dialog-border);
  border-top: 2px solid var(--sp-accent);
  border-radius: var(--sp-dialog-radius);
  box-shadow: var(--sp-dialog-shadow);
  min-width: 320px;
  max-width: 480px;
  overflow: hidden;
}
.scrying-pool .sp-gm-privacy-selector {
  display: flex;
  flex-direction: column;
}
.scrying-pool .sp-dialog-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.15);
}
.scrying-pool .sp-dialog-header h2 {
  margin: 0;
  font-family: var(--font-primary, ui-sans-serif, system-ui, sans-serif);
  font-size: 13px;
  font-weight: 700;
  color: var(--sp-text-primary);
  text-transform: uppercase;
  letter-spacing: 0.02em;
  opacity: 0.85;
}
.scrying-pool .sp-close-button {
  background: transparent;
  border: none;
  color: var(--sp-text-secondary);
  cursor: pointer;
  padding: 3px 6px;
  border-radius: 4px;
  line-height: 1;
  transition: color 120ms ease, background 120ms ease;
}
.scrying-pool .sp-close-button:hover {
  color: var(--sp-text-primary);
  background: var(--sp-surface-interactive);
}
.scrying-pool .sp-gm-privacy-selector > p {
  padding: 7px 14px;
  margin: 0;
  font-size: 12px;
  color: var(--sp-text-secondary);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.scrying-pool .sp-user-list {
  display: flex;
  flex-direction: column;
  padding: 8px;
  gap: 4px;
}
.scrying-pool .sp-user-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 7px 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--sp-btn-radius, 5px);
  background: rgba(0, 0, 0, 0.15);
  cursor: pointer;
  transition: background 120ms ease, border-color 120ms ease;
}
.scrying-pool .sp-user-item:hover {
  background: rgba(0, 0, 0, 0.25);
  border-color: var(--sp-accent);
}
.scrying-pool .sp-user-name {
  font-family: var(--font-primary, ui-sans-serif, system-ui, sans-serif);
  font-size: 13px;
  font-weight: 600;
  color: var(--sp-text-primary);
}
.scrying-pool .sp-user-role {
  font-size: 11px;
  color: var(--sp-text-secondary);
  padding: 2px 6px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.04);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
/**
 * Actor-Mapping Panel styles.
 *
 * GM settings submenu to assign actors to user webcams for token overlay.
 * Uses SP (Scrying Pool) semantic token system.
 */
.scrying-pool.actor-mapping {
  background: var(--sp-dialog-bg);
  color: var(--sp-text-primary);
  font-family: var(--font-primary, inherit);
  border: var(--sp-dialog-border);
  border-top: 2px solid var(--sp-accent);
  border-radius: var(--sp-dialog-radius);
  box-shadow: var(--sp-dialog-shadow);
}
.scrying-pool .sp-actor-mapping {
  display: flex;
  flex-direction: column;
  min-width: 320px;
  max-width: 500px;
}
.scrying-pool .sp-actor-mapping__hint {
  margin: 0 0 12px 0;
  font-size: 12px;
  color: var(--sp-text-secondary);
  line-height: 1.4;
  padding: 12px 12px 0;
}
.scrying-pool .sp-actor-mapping__empty {
  text-align: center;
  color: var(--sp-text-muted);
  font-size: 13px;
  padding: 24px 12px;
  margin: 0;
}
.scrying-pool .sp-actor-mapping__table {
  display: flex;
  flex-direction: column;
  padding: 0 12px 12px;
  gap: 6px;
}
.scrying-pool .sp-actor-mapping__row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  background: var(--sp-surface);
  border: 1px solid var(--sp-border);
  border-radius: var(--sp-radius-md);
}
.scrying-pool .sp-actor-mapping__user {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 1;
  min-width: 0;
}
.scrying-pool .sp-actor-mapping__user-avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}
.scrying-pool .sp-actor-mapping__user-name {
  font-size: 12px;
  font-weight: 600;
  color: var(--sp-text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.scrying-pool .sp-actor-mapping__badge {
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--sp-accent);
  border: 1px solid var(--sp-accent);
  border-radius: 3px;
  padding: 1px 4px;
  flex-shrink: 0;
  line-height: 1.2;
  opacity: 0.85;
}
.scrying-pool .sp-actor-mapping__select {
  flex-shrink: 0;
  width: 180px;
  padding: 4px 6px;
  font-size: 12px;
  font-family: var(--font-primary, inherit);
  background: var(--sp-control-bg);
  color: var(--sp-text-primary);
  border: 1px solid var(--sp-border);
  border-radius: var(--sp-radius-sm);
  cursor: pointer;
}
.scrying-pool .sp-actor-mapping__select:focus-visible {
  outline: none;
  box-shadow: var(--sp-focus-ring);
}
.scrying-pool.freeform-camera {
  border-radius: 4px !important;
  overflow: hidden !important;
}
.scrying-pool.freeform-camera > header.window-header {
  padding: 1px 6px !important;
  min-height: 0 !important;
  height: 22px !important;
  line-height: 20px !important;
  background: rgba(0, 0, 0, 0.75) !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
  flex-shrink: 0;
  gap: 2px;
}
.scrying-pool.freeform-camera .window-title {
  font-size: 10px !important;
  line-height: 18px !important;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #dde2e8;
}
.scrying-pool.freeform-camera .window-controls {
  gap: 1px;
}
.scrying-pool.freeform-camera .window-control {
  width: 18px !important;
  height: 18px !important;
  line-height: 18px !important;
  font-size: 10px !important;
  padding: 0 !important;
  margin: 0 !important;
  border-radius: 2px !important;
  display: flex !important;
  align-items: center;
  justify-content: center;
}
.scrying-pool.freeform-camera .window-control i {
  font-size: 10px !important;
}
.scrying-pool.freeform-camera .window-control:hover {
  background: rgba(255, 255, 255, 0.15) !important;
}
.scrying-pool.freeform-camera .window-control.close {
  font-size: 13px !important;
  font-weight: 400;
}
.scrying-pool.freeform-camera > .window-content {
  padding: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  flex: 1 !important;
  min-height: 0 !important;
  overflow: hidden !important;
  background: #000;
}
.scrying-pool.freeform-camera .freeform-camera__body {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  overflow: hidden;
  color: #dde2e8;
}
.scrying-pool.freeform-camera .freeform-camera__video-container {
  flex: 1;
  position: relative;
  min-height: 0;
  overflow: hidden;
  background: #000;
}
.scrying-pool.freeform-camera .freeform-camera__video-element {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.scrying-pool.freeform-camera .freeform-camera__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1px 6px;
  gap: 4px;
  background: rgba(0, 0, 0, 0.55);
  flex-shrink: 0;
  height: 18px;
}
.scrying-pool.freeform-camera .freeform-camera__footer-left {
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
}
.scrying-pool.freeform-camera .freeform-camera__footer-right {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}
.scrying-pool.freeform-camera .freeform-camera__control-btn {
  background: none;
  border: none;
  color: #dde2e8;
  cursor: pointer;
  padding: 1px 3px;
  font-size: 9px;
  line-height: 1;
  border-radius: 2px;
  transition: background 0.15s;
}
.scrying-pool.freeform-camera .freeform-camera__control-btn:hover {
  background: rgba(255, 255, 255, 0.15);
}
.scrying-pool.freeform-camera .freeform-camera__control-btn:active {
  background: rgba(255, 255, 255, 0.25);
}
.scrying-pool.freeform-camera .freeform-camera__control-btn i {
  font-size: 9px;
}
.scrying-pool.freeform-camera .freeform-camera__name {
  font-size: 9px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1;
}
.scrying-pool.freeform-camera .freeform-camera__volume {
  width: 44px;
  height: 10px;
  accent-color: #4a9eff;
  cursor: pointer;
  margin: 0;
}
.scrying-pool.freeform-camera .freeform-camera__volume::-webkit-slider-thumb {
  appearance: none;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #4a9eff;
  border: none;
}
.scrying-pool.freeform-camera .freeform-camera__volume::-moz-range-thumb {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #4a9eff;
  border: none;
}
.scrying-pool.freeform-camera .freeform-camera__volume::-webkit-slider-runnable-track {
  height: 2px;
}
.scrying-pool.freeform-camera .freeform-camera__volume::-moz-range-track {
  height: 2px;
}
.scrying-pool.freeform-camera.is-spotlight {
  box-shadow: 0 0 10px 2px #ffd700;
  border-color: #ffd700;
}
.scrying-pool.freeform-camera.is-spotlight > header.window-header {
  border-bottom-color: #ffd700 !important;
}
/*
 * VisibilityBadge :root exception
 * ─────────────────────────────────────────────────────────────────────────────
 * PlayerStatusBadge (FR-22) is mounted directly onto Foundry's AV tile DOM,
 * OUTSIDE the .scrying-pool root element. Its state tokens must therefore be
 * declared on :root rather than scoped under .scrying-pool.
 *
 * This is an intentional architectural exception — all other module CSS MUST
 * remain scoped under .scrying-pool. Do not add additional :root declarations
 * without documenting the architectural reason here.
 *
 * The badge tokens are a subset of the Layer 2 state tokens declared in
 * _states.less, re-exported on :root for badge accessibility outside the root.
 */
:root {
  --sp-badge-state-active-bg: var(--sp-state-active-bg);
  --sp-badge-state-active-text: var(--sp-state-active-text);
  --sp-badge-state-hidden-bg: var(--sp-state-hidden-bg);
  --sp-badge-state-hidden-text: var(--sp-state-hidden-text);
  --sp-badge-state-self-muted-bg: var(--sp-state-self-muted-bg);
  --sp-badge-state-self-muted-text: var(--sp-state-self-muted-text);
  --sp-badge-state-offline-bg: var(--sp-state-offline-bg);
  --sp-badge-state-offline-text: var(--sp-state-offline-text);
  --sp-badge-state-cam-lost-bg: var(--sp-state-cam-lost-bg);
  --sp-badge-state-cam-lost-text: var(--sp-state-cam-lost-text);
  --sp-badge-state-reconnecting-bg: var(--sp-state-reconnecting-bg);
  --sp-badge-state-reconnecting-text: var(--sp-state-reconnecting-text);
  /* Badge surface & text (badge mounts outside .scrying-pool root) */
  --sp-badge-surface: var(--sp-badge-bg, rgba(0, 0, 0, 0.72));
  --sp-badge-color: var(--sp-badge-text, #dde2e8);
}
#av {
  display: none !important;
}
#camera-views {
  display: none !important;
}
.camera-view {
  display: none !important;
}
