@import url('https://fonts.googleapis.com/css2?family=Inter:wght@100;200;300;400;500;600;700&display=swap');

html {
    scroll-behavior: smooth;
    scroll-padding-top: 90px;
}

body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

/* Improved text readability */
p {
    line-height: 1.6;
    margin-bottom: 1rem;
}

/* Better heading spacing */
h1, h2, h3, h4, h5, h6 {
    margin-top: 1.5em;
    margin-bottom: 0.5em;
    line-height: 1.3;
}

h1:first-child,
h2:first-child,
h3:first-child {
    margin-top: 0;
}

/* Link styling */
a {
    transition: all 0.2s ease;
}

/* Better list spacing */
ul, ol {
    margin-bottom: 1rem;
    padding-left: 1.5rem;
}

li {
    margin-bottom: 0.5rem;
}

/* Blockquote styling */
blockquote {
    border-left: 4px solid var(--mantine-color-teal-5);
    padding-left: 1rem;
    margin-left: 0;
    margin-right: 0;
    font-style: italic;
    color: var(--mantine-color-dimmed);
}

input:invalid {
    outline: none !important;
}

#wrapper {
    padding: 10px;
    margin-left: 320px;
    margin-right: 320px;
}

:root[data-mantine-color-scheme="dark"] #dark-theme-icon {
    display: none;
}

:root[data-mantine-color-scheme="light"] #light-theme-icon {
    display: none;
}

.demo-container {
    display: flex;
    max-width: 100%;
    overflow: hidden;
}

.demo-preview {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 20px;
    justify-content: center;
}

.demo-controls {
    width: 250px;
    padding: 20px;
    gap: 10px;
}

.demo-control {
    margin: 10px;
}

@media only screen and (max-width: 750px) {
    .demo-container {
        flex-direction: column;
    }

    .demo-controls {
        width: 100%;
    }
}

.dmc-bar {
    background-image: linear-gradient(to right, yellow, orange);
}

.dmc-thumb {
    border-color: orange;
    height: 20px;
    width: 20px;
    background-color: white;
}

.mantine-Table-th {
    font-size: 15px;
    font-weight: 500;
}

.dmc-indicator {
  width: 12px;
  height: 4px;
  transition: width 250ms ease;

  &[data-active] {
    width: 40px;
  }
}

.dmc-control {
  &[data-inactive] {
    opacity: 0;
    cursor: default;
  }
}

.dmc-controls {
  transition: opacity 150ms ease;
  opacity: 0;
}

.dmc-root {
  &:hover {
    .dmc-controls {
      opacity: 1;
    }
  }
}



.dmc-slider-track {
  &::before {
    background-color: light-dark(var(--mantine-color-blue-1), var(--mantine-color-dark-3));
  }
}

.dmc-slider-mark {
  width: 6px;
  height: 6px;
  border-radius: 6px;
  transform: translateX(-3px) translateY(-2px);
  border-color: light-dark(var(--mantine-color-blue-1), var(--mantine-color-dark-3));

  &[data-filled] {
    border-color: var(--mantine-color-blue-6);
  }
}

.dmc-slider-markLabel {
  font-size: var(--mantine-font-size-sm);
  color: var(--mantine-color-green-5);
  margin-bottom: 5px;
  margin-top: 0;
}

.dmc-slider-thumb {
  height: 16px;
  width: 16px;
  background-color: var(--mantine-color-green-5);
  border-width: 1px;
  box-shadow: var(--mantine-shadow-lg);
}

.navbar-link {
    padding: 0.5rem 1rem;
    border-radius: 0.25rem;
    transition: background 0.1s;
    color: inherit;
    display: inline-flex;
    gap: 0.5rem;

    &:hover {
        text-decoration: none;
        background: color-mix(in srgb, var(--mantine-color-gray-5), transparent 90%);
    }
}

.m_b8a05bbd {
    margin-top: 80px !important;
    height: 63vh !important;
}

div .m_46b77525 {
    margin-top: calc(0.5rem* var(--mantine-scale)) !important;
}

.m_5caae85b {
    position: absolute !important;
    top: calc(0.3125rem* var(--mantine-scale));
    inset-inline-end: calc(0.3125rem* var(--mantine-scale));
    z-index: 1;
}

.m_9cdde9a {
    inset-inline-end: 0;
    width: var(--app-shell-aside-width);
    transform: var(--app-shell-aside-transform);
    z-index: var(--app-shell-aside-z-index);
    margin-top: 15px;
}

:root[data-mantine-color-scheme="dark"] {
    --mantine-color-anchor: #74c0fc !important;
    --mantine-color-dark-light: rgba(63, 63, 70, 0.15);
    --mantine-color-dark-light-hover: rgba(63, 63, 70, 0.2);
    --mantine-color-dark-outline-hover: rgba(113, 113, 122, 0.05);
}

img[alt=logo] { width: 100%; }

/* Theme-aware code blocks */
:root[data-mantine-color-scheme="light"] pre,
:root[data-mantine-color-scheme="light"] code {
    background-color: #f8f9fa;
    color: #1a1b1e;
}

:root[data-mantine-color-scheme="dark"] pre,
:root[data-mantine-color-scheme="dark"] code {
    background-color: #1a1b1e;
    color: #c1c2c5;
}

/* Inline code */
:root[data-mantine-color-scheme="light"] code {
    background-color: #f1f3f5;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.9em;
}

:root[data-mantine-color-scheme="dark"] code {
    background-color: #25262b;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.9em;
}

/* ---- Petri Dish: theme-aware dish + silhouettes ---- */
/* The circular field background + inner glow, light and dark variants. */
.petri-dish {
    background: radial-gradient(circle at 50% 45%, #f6fbff 0%, #e8f0f8 55%, #d3deec 100%);
    box-shadow: inset 0 0 60px 14px rgba(20, 40, 60, 0.18),
                inset 0 0 0 2px rgba(51, 153, 255, 0.28);
}
:root[data-mantine-color-scheme="dark"] .petri-dish {
    background: radial-gradient(circle at 50% 45%, #16222f 0%, #101a26 55%, #0b121b 100%);
    box-shadow: inset 0 0 60px 14px rgba(0, 0, 0, 0.45),
                inset 0 0 0 2px rgba(51, 153, 255, 0.30);
}

/* /tileset-dish: the petri-dish ring WITHOUT the agar background — the dish
   floor is a live leaflet tile basemap showing through the circular clip.
   The inset shadow sits on an overlay (not the clip div) so it paints ABOVE
   the map tiles; pointer-events stay off so the joystick/keys own all input. */
.tdish-dish {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    overflow: hidden;
}
.tdish-ring {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    pointer-events: none;
    z-index: 3;
    box-shadow: inset 0 0 60px 14px rgba(20, 40, 60, 0.30),
                inset 0 0 0 2px rgba(51, 153, 255, 0.35);
    /* feather the dish rim into the page body so the floor blends with the app
       theme (color-mix keeps it tracking the live light/dark scheme) */
    background: radial-gradient(circle at 50% 48%,
        transparent 58%,
        color-mix(in srgb, var(--mantine-color-body) 30%, transparent) 100%);
}
/* the dish backdrop is THEME-AWARE (the .petri-dish agar gradients) and the tile
   pane is slightly translucent, so the theme bleeds through the tileset — the
   floor visibly re-tints when light/dark switches. Unpainted tile space (stages
   not yet published / beyond the arenas) reads as agar/deep fluid, not blank. */
.tdish-dish .leaflet-container {
    background: radial-gradient(circle at 50% 45%, #f6fbff 0%, #e8f0f8 55%, #d3deec 100%);
}
:root[data-mantine-color-scheme="dark"] .tdish-dish .leaflet-container {
    background: radial-gradient(circle at 50% 45%, #14202d 0%, #0c1520 55%, #070d15 100%);
}
.tdish-dish .leaflet-tile-pane {
    opacity: 0.84;
    transition: opacity 200ms ease;
}
:root[data-mantine-color-scheme="dark"] .tdish-dish .leaflet-tile-pane {
    opacity: 0.74;
}

/* in-game tileset floor (#pde-floor, under the arena svg): the world tab's own
   theme gradient is the backdrop — keep leaflet transparent and let the theme
   bleed through slightly-translucent tiles, same blend as the lab dish */
#pde-floor .leaflet-container { background: transparent; }
#pde-floor .leaflet-tile-pane {
    opacity: 0.8;
    transition: opacity 200ms ease;
}
:root[data-mantine-color-scheme="dark"] #pde-floor .leaflet-tile-pane {
    opacity: 0.7;
}

/* PhyloPic silhouettes are black artwork — recolour to white in dark mode so the
   console portrait and catalogue thumbnails stay visible. (On-dish specimen
   images are tinted per-species via an SVG filter, so they're unaffected.) */
:root[data-mantine-color-scheme="dark"] #petri-portrait,
:root[data-mantine-color-scheme="dark"] .petri-silhouette {
    filter: brightness(0) invert(1);
}

/* ---- Eyespot Lab: lootbox / splice reel ---- */
.eye-type-reel {
    text-align: center; padding: 8px; margin: 6px 0;
    border: 1px solid var(--mantine-color-default-border); border-radius: 10px;
    background: var(--mantine-color-default);
}
.eye-type-reel > div:last-child { font-family: monospace; font-weight: 800; font-size: 20px; letter-spacing: 2px; }
.eye-type-spin { color: var(--mantine-color-dimmed); opacity: 0.7; }
.eye-type-hit  { color: #3399ff; text-shadow: 0 0 10px rgba(51,153,255,0.6); }
.eye-type-miss { color: #e8590c; }

.eye-odds-row { display: flex; gap: 8px; margin: 8px 0; }
.eye-odd {
    flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px;
    padding: 6px 4px; border: 2px solid var(--mantine-color-default-border);
    border-radius: 10px; transition: all 0.12s ease;
}
.eye-bar-track {
    width: 22px; height: 70px; border-radius: 6px;
    background: var(--mantine-color-default); display: flex; align-items: flex-end;
    overflow: hidden;
}
.eye-bar {
    width: 100%; height: 0%;
    background: linear-gradient(0deg, #3399ff, #8effb4);
    transition: height 0.25s ease;
}
.eye-odd.eye-hl {
    border-color: #ffd43b; transform: translateY(-3px) scale(1.04);
    box-shadow: 0 0 14px rgba(255,212,59,0.7);
}
.eye-odd.eye-win {
    border-color: #3399ff;
    box-shadow: 0 0 18px rgba(51,153,255,0.85);
    animation: eye-pop 0.5s ease;
}
@keyframes eye-pop { 0% { transform: scale(1); } 40% { transform: scale(1.14); } 100% { transform: scale(1); } }

/* Code blocks */
:root[data-mantine-color-scheme="light"] pre {
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 16px;
    overflow-x: auto;
}

:root[data-mantine-color-scheme="dark"] pre {
    background-color: #1a1b1e;
    border: 1px solid #373a40;
    border-radius: 8px;
    padding: 16px;
    overflow-x: auto;
}

/* Code inside pre blocks */
:root[data-mantine-color-scheme="light"] pre code {
    background-color: transparent;
    padding: 0;
    color: #1a1b1e;
}

:root[data-mantine-color-scheme="dark"] pre code {
    background-color: transparent;
    padding: 0;
    color: #c1c2c5;
}

/* Sun icon rotation animations - direction based on scroll */
@keyframes rotate-sun-clockwise {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

@keyframes rotate-sun-counter-clockwise {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(-360deg);
    }
}

/* Clockwise rotation (scroll down) */
#light-theme-icon.rotating-down,
#light-theme-icon.rotating-down svg,
#light-theme-icon.rotating-down iconify-icon {
    animation: rotate-sun-clockwise 1.2s ease-out infinite;
    display: inline-block;
}

/* Counter-clockwise rotation (scroll up) */
#light-theme-icon.rotating-up,
#light-theme-icon.rotating-up svg,
#light-theme-icon.rotating-up iconify-icon {
    animation: rotate-sun-counter-clockwise 1.2s ease-out infinite;
    display: inline-block;
}

/* Smooth transition when stopping */
#light-theme-icon,
#light-theme-icon svg,
#light-theme-icon iconify-icon {
    transition: transform 0.3s ease-out;
    display: inline-block;
}

/* Typewriter cursor animation for Dash Docs title */
@keyframes blink-cursor {
    0%, 49% {
        opacity: 1;
    }
    50%, 100% {
        opacity: 0;
    }
}

/* Add blinking cursor while typing */
#dash-docs-title.typing::after {
    content: '▋';
    animation: blink-cursor 1s step-end infinite;
    margin-left: 2px;
    color: #03c7e5;
}

/* AG Grid Dark Mode Support */
/* Override AG Grid theme colors for dark mode */
:root[data-mantine-color-scheme="dark"] .ag-theme-alpine {
    /* Core background colors */
    --ag-background-color: #1a1b1e;
    --ag-foreground-color: #c1c2c5;
    --ag-border-color: #373a40;
    --ag-secondary-border-color: #2c2e33;

    /* Header colors */
    --ag-header-background-color: #25262b;
    --ag-header-foreground-color: #c1c2c5;

    /* Row colors */
    --ag-odd-row-background-color: #1a1b1e;
    --ag-row-hover-color: #25262b;
    --ag-selected-row-background-color: #373a40;

    /* Control panel (filters, pagination) */
    --ag-control-panel-background-color: #25262b;

    /* Input colors */
    --ag-input-border-color: #373a40;
    --ag-input-disabled-border-color: #2c2e33;
    --ag-input-disabled-background-color: #25262b;

    /* Pagination and widgets */
    --ag-disabled-foreground-color: #5c5f66;
    --ag-chip-background-color: #373a40;

    /* Hover and focus states */
    --ag-row-border-color: #2c2e33;
    --ag-cell-horizontal-border: solid #2c2e33;

    /* Filter colors */
    --ag-input-focus-border-color: #5c5f66;

    /* Icons */
    color-scheme: dark;
}

/* Light mode adjustments (ensure proper contrast) */
:root[data-mantine-color-scheme="light"] .ag-theme-alpine {
    --ag-background-color: #ffffff;
    --ag-foreground-color: #1a1b1e;
    --ag-border-color: #dee2e6;
    --ag-header-background-color: #f8f9fa;
    --ag-row-hover-color: #f1f3f5;
}

/* Custom AG Grid Cell Styling - Light Mode */
:root[data-mantine-color-scheme="light"] .ag-theme-alpine .timestamp-cell {
    font-family: monospace;
    font-size: 14px;
}

:root[data-mantine-color-scheme="light"] .ag-theme-alpine .bot-type-cell {
    font-weight: 500;
    padding: 4px 8px;
    border-radius: 4px;
}

:root[data-mantine-color-scheme="light"] .ag-theme-alpine .bot-training {
    background-color: #ffe0e0;
    color: #c92a2a;
}

:root[data-mantine-color-scheme="light"] .ag-theme-alpine .bot-search {
    background-color: #d0ebff;
    color: #1971c2;
}

:root[data-mantine-color-scheme="light"] .ag-theme-alpine .bot-traditional {
    background-color: #d3f9d8;
    color: #2f9e44;
}

:root[data-mantine-color-scheme="light"] .ag-theme-alpine .bot-unknown {
    background-color: #f1f3f5;
    color: #868e96;
    font-weight: 400;
}

:root[data-mantine-color-scheme="light"] .ag-theme-alpine .page-cell {
    font-family: monospace;
    font-size: 12px;
    background-color: #f8f9fa;
    padding: 4px 6px;
    border-radius: 4px;
}

:root[data-mantine-color-scheme="light"] .ag-theme-alpine .user-agent-cell {
    font-size: 12px;
    color: #868e96;
}

/* Custom AG Grid Cell Styling - Dark Mode */
:root[data-mantine-color-scheme="dark"] .ag-theme-alpine .timestamp-cell {
    font-family: monospace;
    font-size: 14px;
}

:root[data-mantine-color-scheme="dark"] .ag-theme-alpine .bot-type-cell {
    font-weight: 500;
    padding: 4px 8px;
    border-radius: 4px;
}

:root[data-mantine-color-scheme="dark"] .ag-theme-alpine .bot-training {
    background-color: #5c1414;
    color: #ffa8a8;
}

:root[data-mantine-color-scheme="dark"] .ag-theme-alpine .bot-search {
    background-color: #1c3d5a;
    color: #74c0fc;
}

:root[data-mantine-color-scheme="dark"] .ag-theme-alpine .bot-traditional {
    background-color: #1b4332;
    color: #8ce99a;
}

:root[data-mantine-color-scheme="dark"] .ag-theme-alpine .bot-unknown {
    background-color: #373a40;
    color: #909296;
    font-weight: 400;
}

:root[data-mantine-color-scheme="dark"] .ag-theme-alpine .page-cell {
    font-family: monospace;
    font-size: 12px;
    background-color: #25262b;
    padding: 4px 6px;
    border-radius: 4px;
}

:root[data-mantine-color-scheme="dark"] .ag-theme-alpine .user-agent-cell {
    font-size: 12px;
    color: #909296;
}

/* ------------------------------------------------------------------------- */
/* dash-mui-scheduler docs tweaks                                            */
/* ------------------------------------------------------------------------- */

/* Align the scheduler's desktop event drawer with the navbar: inset it below
   the 70px AppShell header (consumed by the component's injected drawer CSS). */
:root {
    --dms-dialog-top-offset: 70px;
}

/* Keep the auto-generated `.. kwargs::` props tables from breaking the layout
   on small screens — long rows scroll horizontally inside their own box. */
.m2d-kwargs-scroll {
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* Mobile: never let the page itself scroll horizontally. Wide content (props
   tables, code blocks) scrolls inside its own container instead. */
@media (max-width: 768px) {
    html,
    body {
        overflow-x: hidden;
        max-width: 100%;
    }
    .mantine-CodeHighlight-root,
    .mantine-CodeHighlight-pre,
    pre {
        max-width: 100%;
    }
}

/* Radar navigation game joystick (docs/radar) */
.radar-joystick-ctrl {
    background: radial-gradient(circle at 35% 30%, #7dffb4, #1f9d5b) !important;
    border: 1px solid rgba(57, 255, 153, 0.7) !important;
    box-shadow: 0 0 14px rgba(57, 255, 153, 0.55) !important;
}

/* Microscope stage-control knob (docs/petri_dish) — brass mechanical knob */
.petri-stage-ctrl {
    background: radial-gradient(circle at 35% 30%, #e9d8a6, #9c7b3a) !important;
    border: 1px solid rgba(120, 92, 40, 0.7) !important;
    box-shadow: 0 0 12px rgba(180, 140, 70, 0.5), inset 0 -2px 6px rgba(80, 58, 20, 0.5) !important;
}

/* PhyloPic catalogue thumbnails (docs/silhouette_tracer) */
.pp-thumb { transition: border-color 120ms ease, transform 120ms ease; }
.pp-thumb:hover {
    border-color: #3399ff !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(51, 153, 255, 0.18);
}
:root[data-mantine-color-scheme="dark"] .pp-thumb img { filter: invert(1) brightness(1.6); }
/* ===================================================================== */
/*  /petri-dish-evolution — full-bleed flexlayout-dash game shell        */
/*  Negative margins cancel the AppShell `padding="xl"` (the Mantine      */
/*  --app-shell-padding var) so the dfl sits flush to the header + nav.   */
/* ===================================================================== */
.pde-fullbleed {
    margin: calc(var(--app-shell-padding, 2rem) * -1);
    height: calc(100vh - 70px);
    overflow: hidden;
    position: relative;
}
.pde-fullbleed > .dash-flex-layout,
.pde-fullbleed .dash-dock-container {
    position: relative;
    width: 100%;
    height: 100%;
}
/* The game drives tab selection (DNA milestone → ⚡ Evolve; Equip → World) by
   clicking the flexlayout tab button from JS — the slim strip stays visible so
   the two surfaces read clearly while staying flush to the header/navbar. */
.pde-fullbleed .flexlayout__tabset { border: none !important; }
.pde-fullbleed .flexlayout__tab { overflow: hidden; }

/* ADAPT drawer: fill the available height (mantine's content sizing otherwise
   leaves a short, vertically-centered panel). Mobile = 88vh bottom sheet; md-xl =
   flush from the 70px header to the bottom. The responsive callback sets which
   edge it pulls from; this just guarantees the height. */
.pde-adapt-content { height: 88vh !important; align-self: stretch !important; margin: 0 !important; }
@media (min-width: 768px) {
    .pde-adapt-content { height: calc(100vh - 70px) !important; }
}

/* HUD: pulse the Adapt button when a DNA milestone is reached ("you can evolve now").
   Milestones no longer pause the game, so this glow is the cue (toggled in the loop cb). */
.pde-can-evolve { animation: pde-evolve-pulse 1.1s ease-in-out infinite; border-radius: 8px; }
@keyframes pde-evolve-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(51, 153, 255, 0); }
    50%      { box-shadow: 0 0 0 4px rgba(51, 153, 255, 0.5); }
}

/* ---------------- accessibility (2026-06-09 a11y pass) ---------------- */
/* visually-hidden (screen-reader-only) utility — the game page h1 uses this */
.pde-sr-only {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* WCAG AA contrast: Mantine's light-mode dimmed gray (#868e96 = 3.32:1 on white)
   fails AA for normal text — darken the dimmed var in the light scheme only
   (dark-scheme dimmed is fine). Lifts every c="dimmed" Text app-wide. */
:root[data-mantine-color-scheme="light"] { --mantine-color-dimmed: #5a646e; }

/* brand #3399ff on white = 2.94:1 — darken the header title in light scheme */
:root[data-mantine-color-scheme="light"] #dash-docs-title { color: #1971c2 !important; }

/* game HUD variant="light" buttons measured 2.3-3.2:1 in light scheme — darken
   the label color only (backgrounds/sizes unchanged; dark scheme already passes) */
:root[data-mantine-color-scheme="light"] #pde-view-toggle  { color: #066649 !important; }
:root[data-mantine-color-scheme="light"] #pde-pause-toggle { color: #a33800 !important; }
:root[data-mantine-color-scheme="light"] #pde-speed-toggle { color: #1864ab !important; }
:root[data-mantine-color-scheme="light"] #pde-export-btn   { color: #862e9c !important; }

/* keyboard affordance for the dfl tab buttons (made focusable by assets/a11y.js) */
.flexlayout__tab_button:focus-visible {
    outline: 2px solid #3399ff; outline-offset: -2px; border-radius: 4px;
}

/* a11y round-2 (adversarial review): remaining light-scheme AA failures */
:root[data-mantine-color-scheme="light"] #pde-ai-toggle { color: #364fc7 !important; }
/* lifts ALL gray variant="light" badges (backend badge, strategy badges) to ~7.4:1 */
:root[data-mantine-color-scheme="light"] { --mantine-color-gray-light-color: var(--mantine-color-gray-7); }

/* skip link — first tab stop, visible only on focus (57 stops precede game content) */
.skip-link {
    position: absolute; left: -9999px; top: 0; z-index: 9999;
    background: #1971c2; color: #fff; padding: 8px 14px; border-radius: 0 0 8px 0;
    font-weight: 600; text-decoration: none;
}
.skip-link:focus { left: 0; }

/* ================= 2plot.ai Petri Dish — home page (2026-06-09 rebrand) ===== */
.home-hero {
    position: relative;
    overflow: hidden;
    border-radius: var(--mantine-radius-lg);
    min-height: 480px;
    isolation: isolate;
    padding: clamp(20px, 4vw, 48px);
    display: flex;
    align-items: center;
    border: 1px solid light-dark(rgba(51, 142, 234, 0.22), rgba(153, 170, 255, 0.14));
    background: radial-gradient(circle at 60% 42%,
        light-dark(#eef5ff, #0a1018) 0%,
        light-dark(#dbe8f7, #05080d) 78%);
}
.home-hero-dish { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
.home-cell {
    position: absolute;
    object-fit: contain;
    animation: home-drift 14s ease-in-out infinite;
}
/* PhyloPic specimen art is solid BLACK — invert to white in dark mode so the
   hero animation reads. (light-dark() can't be used here: it's a <color>-only
   function, invalid inside filter:, and the whole declaration gets dropped.) */
:root[data-mantine-color-scheme="dark"] .home-cell {
    filter: brightness(0) invert(0.92);
}
@keyframes home-drift {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    25%      { transform: translate(14px, -18px) rotate(8deg); }
    50%      { transform: translate(-10px, -6px) rotate(-6deg); }
    75%      { transform: translate(8px, 14px) rotate(4deg); }
}
@media (prefers-reduced-motion: reduce) {
    .home-cell { animation: none; }
}
.home-hero-scrim {
    position: absolute; inset: 0; z-index: 1; pointer-events: none;
    background: linear-gradient(90deg,
        color-mix(in srgb, var(--mantine-color-body) 86%, transparent) 0%,
        color-mix(in srgb, var(--mantine-color-body) 62%, transparent) 48%,
        color-mix(in srgb, var(--mantine-color-body) 18%, transparent) 100%);
}
.home-hero-content { position: relative; z-index: 2; width: 100%; }
.home-glass {
    background: color-mix(in srgb, var(--mantine-color-body) 72%, transparent) !important;
    backdrop-filter: blur(6px);
}
.home-feature-card {
    transition: transform 120ms ease, border-color 120ms ease, box-shadow 120ms ease;
}
.home-feature-card:hover {
    transform: translateY(-2px);
    border-color: var(--mantine-color-brand-5);
    box-shadow: var(--mantine-shadow-sm);
}
.home-jump-link {
    display: block;
    padding: 6px 8px;
    border-radius: var(--mantine-radius-sm);
    transition: background-color 120ms ease;
}
.home-jump-link:hover { background-color: var(--mantine-color-default-hover); }

/* --- Explore cards: faint drifting specimen vignette (same drift as the hero,
       slower; brightens a touch on hover). Decorative — copy stays on top. --- */
.home-feature-card { position: relative; overflow: hidden; }
.home-card-cell {
    position: absolute;
    right: -14px;
    bottom: -16px;
    width: 112px;
    height: 112px;
    object-fit: contain;
    opacity: 0.10;
    pointer-events: none;
    animation: home-drift 18s ease-in-out infinite;
    transition: opacity 150ms ease;
}
:root[data-mantine-color-scheme="dark"] .home-card-cell {
    filter: brightness(0) invert(0.92);
    opacity: 0.14;
}
.home-feature-card:hover .home-card-cell { opacity: 0.22; }

/* --- "How a run works": a second, fainter ambient band — drifting plankton
       motes behind glass step cards (the hero's quieter echo) --- */
.home-loop-band {
    position: relative;
    overflow: hidden;
    isolation: isolate;
    border-radius: var(--mantine-radius-lg);
    border: 1px solid light-dark(rgba(51, 142, 234, 0.16), rgba(153, 170, 255, 0.10));
    background: radial-gradient(circle at 28% 18%,
        light-dark(#f2f8ff, #0a1018) 0%,
        light-dark(#e6effb, #06090e) 82%);
    padding: clamp(16px, 3vw, 36px);
}
.home-loop-content { position: relative; z-index: 1; }
.home-plankton {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    background: radial-gradient(circle,
        light-dark(rgba(51, 153, 255, 0.55), rgba(130, 188, 255, 0.5)) 0%,
        transparent 72%);
    animation: home-plankton 26s ease-in-out infinite;
}
@keyframes home-plankton {
    0%, 100% { transform: translate(0, 0); }
    33%      { transform: translate(20px, -26px); }
    66%      { transform: translate(-16px, 14px); }
}
.home-loop-art {
    display: block;
    width: 100%;
    height: 84px;
    object-fit: contain;
}
@media (prefers-reduced-motion: reduce) {
    .home-card-cell, .home-plankton { animation: none; }
}

/* Match-report specimen sprites: black PhyloPic art → white in dark mode.
   !important: the inline drop-shadow filter would otherwise win over this class.
   (Gemini data-URI sprites are colored — the Python side skips the class for those.) */
:root[data-mantine-color-scheme="dark"] .pde-specimen-sprite {
    filter: brightness(0) invert(0.92) drop-shadow(0 0 8px rgba(255, 255, 255, 0.12)) !important;
}

/* 🏆 Match report: sections fade in when the server callback replaces the
   content (pairs with the dcc.Loading skeleton in _report_tab) */
#pde-report-content > * { animation: pde-report-fadein 0.5s ease both; }
@keyframes pde-report-fadein {
    from { opacity: 0; transform: translateY(6px); }
    to   { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
    #pde-report-content > * { animation: none; }
}

/* ---- 3rd-person mobile zoom slider (xs–sm only) — liquid-glass pill, far left ---- */
/* Hidden by default; the view-toggle cb adds .pde-zoom-on in 3rd person, and the media
   query keeps it phone/tablet-only (≥md keeps the desktop scroll/pinch + drag). Display
   lives HERE (not inline) so the media query always wins. */
.pde-zoom-wrap { display: none; }
@media (max-width: 62em) {
    .pde-zoom-wrap.pde-zoom-on {
        display: flex;
        align-items: center;
        justify-content: center;
        position: absolute;
        left: 10px;
        top: 50%;
        transform: translateY(-50%);
        z-index: 7;
        padding: 18px 6px;
        border-radius: 999px;
        pointer-events: auto;
        background: light-dark(rgba(255, 255, 255, 0.34), rgba(20, 28, 40, 0.38));
        -webkit-backdrop-filter: blur(16px) saturate(1.6);
        backdrop-filter: blur(16px) saturate(1.6);
        border: 1px solid light-dark(rgba(255, 255, 255, 0.55), rgba(255, 255, 255, 0.14));
        box-shadow: 0 8px 28px rgba(8, 20, 36, 0.28),
                    inset 0 1px 0 light-dark(rgba(255, 255, 255, 0.65), rgba(255, 255, 255, 0.10));
    }
}
/* Dash 4.2 dcc.Slider is Radix-based (.dash-slider-*) — frosted track + glass thumb */
.pde-zoom-wrap .dash-slider-track {
    width: 6px !important;
    border-radius: 3px;
    background: light-dark(rgba(40, 70, 110, 0.20), rgba(255, 255, 255, 0.18)) !important;
}
.pde-zoom-wrap .dash-slider-thumb {
    width: 22px !important;
    height: 22px !important;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.85) !important;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.95), rgba(222, 233, 246, 0.78)) !important;
    box-shadow: 0 2px 8px rgba(8, 20, 36, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.90) !important;
}
:root[data-mantine-color-scheme="dark"] .pde-zoom-wrap .dash-slider-thumb {
    background: linear-gradient(180deg, rgba(232, 241, 252, 0.85), rgba(168, 188, 214, 0.60)) !important;
    border: 1px solid rgba(255, 255, 255, 0.40) !important;
}

/* Survivor mini-dishes (match-report assessments): the cells are black PhyloPic
   silhouettes — in dark mode their svg flood tints read near-black on the dish floor.
   The CSS filter property overrides the svg filter attribute, so these dark-mode rules
   recolor them BRIGHT while keeping the colony identity (yours green, rival red).
   Scoped to /assets/petri/ hrefs: Gemini-evolved data-URI sprites are colored art and
   keep their own pixels. */
:root[data-mantine-color-scheme="dark"] #pde-dish-you image[href^="/assets/petri/"] {
    filter: brightness(0) invert(0.9) sepia(1) saturate(2.2) hue-rotate(95deg) brightness(1.15);
}
:root[data-mantine-color-scheme="dark"] #pde-dish-rival image[href^="/assets/petri/"] {
    filter: brightness(0) invert(0.82) sepia(1) saturate(3) hue-rotate(312deg) brightness(1.25);
}

/* Home hero mini-dish: per-kind DARK-MODE recolors. The cast mixes tints, so each cv-*
   flood filter gets its own bright chain (CSS filter property beats the svg filter attr;
   attribute selectors match the exact url(#cv-*) value CV writes). Light mode keeps the
   svg tints. sepia base hue ≈38°, target hue = 38° + rotation. */
:root[data-mantine-color-scheme="dark"] #home-dish image[filter="url(#cv-ally)"],
:root[data-mantine-color-scheme="dark"] #home-dish image[filter="url(#cv-food)"] {
    filter: brightness(0) invert(0.9) sepia(1) saturate(2.2) hue-rotate(95deg) brightness(1.15);
}
:root[data-mantine-color-scheme="dark"] #home-dish image[filter="url(#cv-hunter)"],
:root[data-mantine-color-scheme="dark"] #home-dish image[filter="url(#cv-threat)"] {
    filter: brightness(0) invert(0.82) sepia(1) saturate(3) hue-rotate(312deg) brightness(1.25);
}
:root[data-mantine-color-scheme="dark"] #home-dish image[filter="url(#cv-player)"] {
    filter: brightness(0) invert(0.88) sepia(1) saturate(2.6) hue-rotate(172deg) brightness(1.2);
}
:root[data-mantine-color-scheme="dark"] #home-dish image[filter="url(#cv-rival)"] {
    filter: brightness(0) invert(0.85) sepia(1) saturate(2.6) hue-rotate(247deg) brightness(1.2);
}

/* ---- game joystick: liquid-glass skin (visual only — steering in 1st person and
   viewport panning in 3rd person are untouched). NOTE: light-dark() is <color>-only,
   so gradients use the data-mantine-color-scheme selector pattern instead. ---- */
.pde-joy-wrap {
    padding: 7px;
    border-radius: 50%;
    background: light-dark(rgba(255, 255, 255, 0.26), rgba(20, 28, 40, 0.30));
    -webkit-backdrop-filter: blur(14px) saturate(1.5);
    backdrop-filter: blur(14px) saturate(1.5);
    border: 1px solid light-dark(rgba(255, 255, 255, 0.55), rgba(255, 255, 255, 0.14));
    box-shadow: 0 8px 24px rgba(8, 20, 36, 0.25),
                inset 0 1px 0 light-dark(rgba(255, 255, 255, 0.60), rgba(255, 255, 255, 0.10));
}
/* the base ring: clear glass with a faint inner rim — the dish shows through */
.pde-joy-wrap .react-joystick {
    border-radius: 50%;
    background: radial-gradient(circle at 50% 38%,
                rgba(255, 255, 255, 0.16), rgba(120, 150, 185, 0.10)) !important;
    border: 1px solid light-dark(rgba(255, 255, 255, 0.45), rgba(255, 255, 255, 0.12)) !important;
    box-shadow: inset 0 0 14px light-dark(rgba(40, 70, 110, 0.10), rgba(0, 0, 0, 0.28));
}
:root[data-mantine-color-scheme="dark"] .pde-joy-wrap .react-joystick {
    background: radial-gradient(circle at 50% 38%,
                rgba(255, 255, 255, 0.07), rgba(8, 14, 22, 0.20)) !important;
}
/* the knob: a frosted glass puck with a top highlight */
.pde-joy-wrap .react-joystick-controller {
    border-radius: 50%;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(222, 233, 246, 0.70)) !important;
    border: 1px solid rgba(255, 255, 255, 0.85) !important;
    box-shadow: 0 3px 10px rgba(8, 20, 36, 0.35),
                inset 0 1px 0 rgba(255, 255, 255, 0.85) !important;
}
:root[data-mantine-color-scheme="dark"] .pde-joy-wrap .react-joystick-controller {
    background: linear-gradient(180deg, rgba(232, 241, 252, 0.80), rgba(168, 188, 214, 0.52)) !important;
    border: 1px solid rgba(255, 255, 255, 0.35) !important;
}
/* direction arrows: quiet hints (CSS fill beats the inline #ddd presentation attr) */
.pde-joy-wrap .arrows-wrapper svg path {
    fill: light-dark(rgba(40, 70, 110, 0.38), rgba(220, 235, 250, 0.34));
}

/* Incubation spawn dish: the selected specimen is a black PhyloPic silhouette — give it
   the player-blue bright recolor in dark mode (same mechanics as the report/home dishes). */
:root[data-mantine-color-scheme="dark"] #pde-spawn-dish image[href^="/assets/petri/"] {
    filter: brightness(0) invert(0.88) sepia(1) saturate(2.6) hue-rotate(172deg) brightness(1.2);
}

/* Balance-lab specimen hero (pre/post-run dish): player-blue bright recolor in dark
   mode — scoped to the hero wrapper so live watch-run renders keep their kind tints. */
:root[data-mantine-color-scheme="dark"] .blab-hero image[href^="/assets/petri/"] {
    filter: brightness(0) invert(0.88) sepia(1) saturate(2.6) hue-rotate(172deg) brightness(1.2);
}

/* ── /360-dish: the 360 Dish Lab (docs/pano_dish) ──────────────────────────
   The instrument viewport: one 16:10 stage holding three stacked POV layers
   (🌎 top-down dish · 👁 CV first-person · 🪬 dash-pannellum 360). Inactive
   layers keep their LAYOUT SIZE (visibility, not display) so the pannellum
   WebGL canvas never initializes at 0×0 — the dfl-tab lesson, applied here. */
.p360-stage {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 10;
    border-radius: 14px;
    overflow: hidden;
    background: radial-gradient(circle at 50% 42%, #101c2a 0%, #0b121b 62%, #070c12 100%);
}
.p360-layer {
    position: absolute;
    inset: 0;
    transition: opacity 240ms ease, filter 220ms ease;
}
.p360-layer.p360-hidden {
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
}
/* microscope-bezel rim: the game's cyan dish ring, squared off for the stage */
.p360-rim {
    position: absolute;
    inset: 0;
    border-radius: 14px;
    pointer-events: none;
    z-index: 40;
    box-shadow: inset 0 0 54px 12px rgba(0, 0, 0, 0.42),
                inset 0 0 0 2px rgba(51, 153, 255, 0.32);
}
/* frosted monospace HUD chips floating over the stage (GAZE readout etc.) */
.p360-chip {
    position: absolute;
    z-index: 50;
    pointer-events: none;
    font-family: monospace;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1.5px;
    color: #9ec9ff;
    background: rgba(10, 18, 30, 0.72);
    border: 1px solid rgba(51, 153, 255, 0.35);
    border-radius: 8px;
    padding: 4px 10px;
    backdrop-filter: blur(4px);
}
/* 0.4.3 affliction status chip (1st/3rd person) — mirrors .p360-chip, danger-tinted +
   a soft pulse so a live status reads at a glance. Colour overridden per-kind inline. */
.pde-status-chip {
    position: absolute;
    z-index: 10;
    pointer-events: none;
    font-family: monospace;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1.5px;
    color: #ffd0d6;
    background: rgba(40, 12, 20, 0.74);
    border: 1px solid rgba(255, 98, 89, 0.55);
    border-radius: 8px;
    padding: 4px 10px;
    backdrop-filter: blur(4px);
    animation: pde-status-pulse 1.1s ease-in-out infinite;
}
@keyframes pde-status-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(255, 98, 89, 0.0); }
    50% { box-shadow: 0 0 10px 1px rgba(255, 98, 89, 0.45); }
}
/* 🧭 gyro look-around chip (dash-pannellum 0.4.0) — a .p360-chip that is a real
   BUTTON (clickable: the iOS motion prompt needs the tap) and hidden until the
   page learns the device can gyro-steer (orientationSupported → .gyro-ready). */
.gyro-chip {
    display: none;
    font-family: monospace;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1.5px;
    color: #9ec9ff;
    background: rgba(8, 16, 28, 0.72);
    border: 1px solid rgba(51, 153, 255, 0.35);
    border-radius: 8px;
    padding: 4px 10px;
    backdrop-filter: blur(4px);
    cursor: pointer;
}
.gyro-chip.gyro-ready { display: block; }
.gyro-chip.gyro-on {
    color: #63e6be;
    border-color: rgba(99, 230, 190, 0.65);
    box-shadow: 0 0 8px 1px rgba(99, 230, 190, 0.35);
}
/* 0.4.8 phone layout: the chips compete for a 360px-wide stage — tighten them
   so GAZE (top-center), GYRO (top-right) and the status chip stay legible
   without overlapping at 360×800. */
@media (max-width: 480px) {
    .p360-chip, .pde-status-chip, .gyro-chip {
        font-size: 10px;
        letter-spacing: 1px;
        padding: 3px 7px;
    }
}
/* the circular dish inside the 3rd/1st person layers */
.p360-disc {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    height: 92%;
    aspect-ratio: 1 / 1;
    border-radius: 50%;
    overflow: hidden;
}
.p360-disc > svg {
    width: 100%;
    height: 100%;
    display: block;
}
/* top-down markers (server-rendered sprites, % positioned, centered) */
.p360-mk {
    position: absolute;
    transform: translate(-50%, -50%);
    pointer-events: none;
}
/* the live gaze cone (95° hfov wedge, rotated clientside from pannellum yaw) */
.p360-gaze {
    position: absolute;
    width: 52%;
    aspect-ratio: 1 / 1;
    border-radius: 50%;
    pointer-events: none;
    transform: translate(-50%, -50%);
    background: conic-gradient(from -47.5deg at 50% 50%,
        rgba(51, 153, 255, 0.26) 0deg 95deg, transparent 95deg 360deg);
    transition: transform 180ms ease;
}

/* ── pannellum callback-hotspot sprites ─────────────────────────────────────
   cssClass REPLACES pannellum's default hotspot classes (only pnlm-hotspot-base
   survives), and pannellum's transform hard-codes a 26px box — each size class
   re-centers itself with margin = 13px − size/2. `scale: true` hotspots grow
   as the player zooms (origHfov/hfov), which reads as leaning closer. */
.p360-spot {
    background: center / contain no-repeat;
    cursor: pointer;
}
.p360-sz0 { width: 26px; height: 26px; }
.p360-sz1 { width: 38px; height: 38px; margin-left: -6px;  margin-top: -6px;  }
.p360-sz2 { width: 56px; height: 56px; margin-left: -15px; margin-top: -15px; }
.p360-sz3 { width: 84px; height: 84px; margin-left: -29px; margin-top: -29px; }
.p360-sp-paramecium { background-image: url("/assets/petri/paramecium.svg"); }
.p360-sp-euglena    { background-image: url("/assets/petri/euglena.svg"); }
.p360-sp-navicula   { background-image: url("/assets/petri/navicula.svg"); }
.p360-sp-volvox     { background-image: url("/assets/petri/volvox.svg"); }
.p360-sp-daphnia    { background-image: url("/assets/petri/daphnia.svg"); }
.p360-sp-generic    { background-image: url("/assets/petri/_generic.svg"); }
/* kind glows — the CV full-color tints, as bioluminescence */
.p360-food {
    filter: drop-shadow(0 0 6px rgba(55, 178, 77, 0.95))
            drop-shadow(0 0 16px rgba(55, 178, 77, 0.45));
}
.p360-threat {
    filter: drop-shadow(0 0 7px rgba(240, 62, 62, 0.95))
            drop-shadow(0 0 18px rgba(240, 62, 62, 0.5));
    animation: p360-pulse 1.6s ease-in-out infinite;
}
.p360-player {
    filter: drop-shadow(0 0 6px rgba(51, 153, 255, 0.95))
            drop-shadow(0 0 14px rgba(51, 153, 255, 0.5));
}
@keyframes p360-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.55; }
}
/* hotspot tooltips: pannellum's .pnlm-tooltip span, in field-journal voice */
.p360-spot.pnlm-tooltip span {
    font-family: monospace;
    font-size: 11px;
    letter-spacing: 0.5px;
    background: rgba(10, 18, 30, 0.85);
    border: 1px solid rgba(51, 153, 255, 0.35);
    border-radius: 6px;
}

/* exhausted overlay */
.p360-dead {
    position: absolute;
    inset: 0;
    z-index: 60;
    display: none;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 10px;
    background: rgba(7, 12, 18, 0.82);
    backdrop-filter: blur(3px);
    font-family: monospace;
    letter-spacing: 3px;
    color: #fa5252;
    font-weight: 700;
}

/* the lab discs follow the ILLUMINATION toggle (not the page theme): the
   observer's transmitted-light plate vs the darkfield stage */
.p360-agar-light {
    background: radial-gradient(circle at 50% 45%, #f6fbff 0%, #e8f0f8 55%, #d3deec 100%);
    box-shadow: inset 0 0 60px 14px rgba(20, 40, 60, 0.18),
                inset 0 0 0 2px rgba(51, 153, 255, 0.28);
}
.p360-agar-dark {
    background: radial-gradient(circle at 50% 45%, #16222f 0%, #101a26 55%, #0b121b 100%);
    box-shadow: inset 0 0 60px 14px rgba(0, 0, 0, 0.45),
                inset 0 0 0 2px rgba(51, 153, 255, 0.30);
}
/* darkfield 360: specimens glow against the dark fluid (silhouette → tint,
   the balance-lab recolor recipe re-aimed at the CV kind colors) */
.p360-df .p360-spot.p360-food {
    filter: brightness(0) invert(0.8) sepia(1) saturate(3) hue-rotate(62deg) brightness(1.15)
            drop-shadow(0 0 6px rgba(55, 178, 77, 0.95))
            drop-shadow(0 0 16px rgba(55, 178, 77, 0.45));
}
.p360-df .p360-spot.p360-threat {
    filter: brightness(0) invert(0.75) sepia(1) saturate(5) hue-rotate(-50deg) brightness(1.05)
            drop-shadow(0 0 7px rgba(240, 62, 62, 0.95))
            drop-shadow(0 0 18px rgba(240, 62, 62, 0.5));
}
/* …and the top-down markers glow the same way on the dark plate */
.p360-agar-dark .p360-mk.p360-food {
    filter: brightness(0) invert(0.8) sepia(1) saturate(3) hue-rotate(62deg) brightness(1.15)
            drop-shadow(0 0 5px rgba(55, 178, 77, 0.9));
}
.p360-agar-dark .p360-mk.p360-threat {
    filter: brightness(0) invert(0.75) sepia(1) saturate(5) hue-rotate(-50deg) brightness(1.05)
            drop-shadow(0 0 6px rgba(240, 62, 62, 0.9));
}
.p360-agar-dark .p360-mk.p360-player {
    filter: brightness(0) invert(0.88) sepia(1) saturate(2.6) hue-rotate(172deg) brightness(1.2)
            drop-shadow(0 0 6px rgba(51, 153, 255, 0.95));
}
/* live contact tooltips: the loop rewrites the text every few ticks, so beat
   pannellum's creation-time inline width/margin and recenter with CSS */
.p360-spot.pnlm-tooltip span {
    width: max-content !important;
    margin-left: 0 !important;
    left: 50%;
    transform: translateX(-50%);
}

/* ── 360 DISH v3 (dash-pannellum 0.3.0) ──────────────────────────────────── */
/* zoom stays functional (scroll / pinch / shift-drag) — just no corner chrome.
   !important because pannellum writes display as an INLINE style (showZoomCtrl);
   the tour config also sets showZoomCtrl:false — this is the fallback. */
#p360-pano-wrap .pnlm-zoom-controls {
    display: none !important;
}
/* no compass in the dish viewers (the component passes compass=False; the
   !important covers pannellum's inline display on stale builds) */
#p360-pano-wrap .pnlm-compass,
#a360-pano-wrap .pnlm-compass {
    display: none !important;
}
/* invisible contact click-zones (focus picking + hover tooltip) — the visual
   sprite lives IN the canvas texture; this is just the pointer affordance */
.p360-zone {
    width: 46px;
    height: 46px;
    margin-left: -10px;
    margin-top: -10px;
    border-radius: 50%;
    background: transparent;
    cursor: pointer;
}
.p360-zone:hover {
    box-shadow: 0 0 0 2px rgba(51, 153, 255, 0.55),
                0 0 14px 2px rgba(51, 153, 255, 0.35);
}
.p360-zone.pnlm-tooltip span {
    font-family: monospace;
    font-size: 11px;
    letter-spacing: 0.5px;
    background: rgba(10, 18, 30, 0.85);
    border: 1px solid rgba(51, 153, 255, 0.35);
    border-radius: 6px;
    width: max-content !important;
    margin-left: 0 !important;
    left: 50%;
    transform: translateX(-50%);
}

/* ── /adaptation-360: scene-event vignettes (DOM flash layer over the stage) ── */
.a360-fx {
    position: absolute;
    inset: 0;
    z-index: 56;
    pointer-events: none;
    opacity: 0;
}
@keyframes a360-flash {
    0% { opacity: 0; }
    10% { opacity: 1; }
    100% { opacity: 0; }
}
.a360-fx.fx-bite {
    animation: a360-flash 460ms ease-out;
    background: radial-gradient(circle at 50% 62%, rgba(255, 107, 87, 0.5) 0%,
                rgba(255, 107, 87, 0.12) 40%, transparent 70%);
}
.a360-fx.fx-sting {
    animation: a360-flash 620ms ease-out;
    background: radial-gradient(circle at 50% 55%, rgba(204, 93, 232, 0.45),
                transparent 70%);
}
.a360-fx.fx-spark {
    animation: a360-flash 480ms ease-out;
    background: radial-gradient(circle, transparent 50%, rgba(255, 212, 59, 0.4) 62%,
                transparent 78%);
}
.a360-fx.fx-hit {
    animation: a360-flash 700ms ease-out;
    background: radial-gradient(circle, transparent 55%, rgba(240, 62, 62, 0.55) 100%);
}
.a360-fx.fx-detect {
    animation: a360-flash 520ms ease-out;
    background: radial-gradient(circle, transparent 60%, rgba(51, 153, 255, 0.45) 100%);
}
.a360-fx.fx-absorb {
    animation: a360-flash 620ms ease-out;
    background: radial-gradient(circle at 50% 60%, rgba(45, 212, 168, 0.35),
                transparent 65%);
}
.a360-fx.fx-burst {
    animation: a360-flash 450ms ease-out;
    background: radial-gradient(ellipse, transparent 45%, rgba(160, 220, 255, 0.35) 100%);
}
.a360-fx.fx-siphon {
    animation: a360-flash 800ms ease-out;
    background: radial-gradient(circle, transparent 58%, rgba(45, 212, 168, 0.4) 100%);
}

/* ── /affliction-360: the received-affliction vignettes + status overlay ──── */
.a360-fx.fx-maul {
    animation: a360-flash 700ms ease-out;
    background: radial-gradient(circle at 50% 58%, rgba(240, 62, 62, 0.62) 0%,
                rgba(150, 20, 20, 0.25) 45%, transparent 75%);
}
.a360-fx.fx-breach {
    animation: a360-flash 900ms ease-out;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.5) 0%,
                rgba(240, 62, 62, 0.5) 40%, transparent 80%);
}
.a360-fx.fx-spark-hit {
    animation: a360-flash 600ms ease-out;
    background: radial-gradient(circle, transparent 40%, rgba(255, 212, 59, 0.45) 55%,
                rgba(240, 62, 62, 0.4) 85%);
}
/* persistent status layer (engulf iris / venom haze) — opacity driven per tick
   by assets/affliction360.js, NOT keyframed like the one-shot flashes above */
.afl360-status {
    position: absolute;
    inset: 0;
    /* BELOW the chips (50): the engulf iris is near-opaque at the corners —
       exactly where the live status-countdown chip sits */
    z-index: 46;
    pointer-events: none;
    opacity: 0;
    transition: opacity 180ms ease;
}
