/* Reset and base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

@font-face {
    font-family: 'Zurich';
    src: url('../ZurichCondMono.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

:root {
    /* Harrison Bored brand palette - matches mc-shared/map-core.css so
       BeatBoy reads as part of the same site rather than a separate app */
    --gold: #d4a030;
    --gold-light: #e8b84a;
    --gold-dark: #b8891a;
    --indigo: #11079c;
    --indigo-mid: #0f078c;
    --indigo-deep: #0d067c;
    --indigo-darkest: #0a056a;
    --bg-card: rgba(11, 5, 102, 0.6);
    --text: #e8e4f0;
    --text-muted: #a099b8;
    --text-faint: rgba(232, 228, 240, 0.35);
    --bg-grad-a: #2a28c4;
    --bg-grad-b: #2424b8;
    --bg-grad-c: #2020a8;
    --bg-grad-d: #1a1890;
    --nav-bg: rgba(30, 26, 160, 0.5);
    --border: rgba(255, 255, 255, 0.08);
    --border-light: rgba(255, 255, 255, 0.14);
    --font-brand: 'Zurich', 'Courier New', monospace;
}

/* ── Dark mode overrides ── (same toggle + recipe as the Minecraft tool
   pages' mc-shared/map-core.css: background gradient and borders/text shift
   to a darker, cooler palette; the gold accent stays gold in both modes,
   same as orange stays orange there.) */
body.dark-mode {
    --bg-grad-a: #1a1212;
    --bg-grad-b: #1e1414;
    --bg-grad-c: #1c1010;
    --bg-grad-d: #150c0c;
    --nav-bg: rgba(20, 12, 12, 0.7);
    --border: rgba(255, 255, 255, 0.07);
    --border-light: rgba(255, 255, 255, 0.12);
    --text: #ddd8d0;
    --text-muted: rgba(220, 210, 200, 0.55);
    --text-faint: rgba(220, 210, 200, 0.20);
    --bg-card: rgba(40, 20, 18, 0.55);
}
body.dark-mode .bg-layer {
    background: linear-gradient(180deg, var(--bg-grad-a) 0%, var(--bg-grad-b) 40%, var(--bg-grad-c) 70%, var(--bg-grad-d) 100%);
}

html { font-size: 15px; }

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background: #2226b0;
    color: var(--text);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

/* Shared site background: gradient + grain + edge vignette, same recipe as
   the Nether tool pages (mc-shared/map-core.css) */
.bg-layer {
    position: fixed;
    inset: 0;
    z-index: 0;
    background: linear-gradient(180deg, var(--bg-grad-a) 0%, var(--bg-grad-b) 40%, var(--bg-grad-c) 70%, var(--bg-grad-d) 100%);
}

.bg-grain {
    position: fixed;
    inset: 0;
    z-index: 1;
    opacity: 0.10;
    pointer-events: none;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 512 512' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
    background-size: 256px 256px;
}

.bg-vignette {
    position: fixed;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    background:
        linear-gradient(to right, rgba(10, 8, 60, 0.15) 0%, transparent 12%, transparent 88%, rgba(10, 8, 60, 0.15) 100%),
        linear-gradient(to bottom, rgba(10, 8, 60, 0.10) 0%, transparent 10%, transparent 92%, rgba(10, 8, 60, 0.12) 100%);
}

/* Nav ribbon - same structure/behavior as the other tool pages */
nav {
    position: relative;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.9rem 2.5rem;
    border-bottom: 1px solid var(--border);
    background: var(--nav-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    text-decoration: none;
    cursor: pointer;
    transition: opacity 0.2s;
}

.nav-brand:hover { opacity: 0.8; }
.nav-brand-icon { width: 32px; height: 26px; object-fit: contain; }
.nav-brand-text {
    font-family: var(--font-brand);
    font-size: 0.95rem;
    color: var(--text-muted);
    letter-spacing: 0.06em;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 2.2rem;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

.nav-actions { display: flex; align-items: center; gap: 0.8rem; }
.nav-links { display: flex; gap: 2.2rem; list-style: none; }
.nav-links a {
    font-family: var(--font-brand);
    font-size: 0.82rem;
    color: var(--text-muted);
    text-decoration: none;
    letter-spacing: 0.04em;
    transition: color 0.2s;
    cursor: pointer;
}
.nav-links a:hover { color: var(--text); }
.nav-links a.active { color: var(--gold); }
/* Diamond Finder accents diamond-teal on hover, matching its map pages */
.nav-links a[href="/diamond-finder/"]:hover { color: #6fe3e8; }

/* "Minecraft Tools" ribbon dropdown — desktop hovers to reveal, mobile shows
   both links inline (no hover on touch, so just leave it expanded there) */
.nav-dropdown { position: relative; }
.nav-dropdown-toggle {
  font-family: var(--font-brand); font-size: 0.82rem;
  color: var(--text-muted); letter-spacing: 0.04em; cursor: pointer;
  text-decoration: none; display: inline-block;
  transition: color 0.2s;
}
.nav-dropdown-toggle:hover { color: var(--text); }
.nav-dropdown-toggle.active { color: var(--gold); }
.nav-dropdown-menu {
  display: none; list-style: none; position: absolute; top: 100%; left: 50%;
  transform: translateX(-50%); margin: 0; padding: 1.15rem 0 0.35rem;
  background: rgba(30,26,160,0.93); border: 1px solid var(--border-light);
  border-radius: 6px; width: max-content; z-index: 110;
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  text-align: center;
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 26px, #000 100%);
  mask-image: linear-gradient(to bottom, transparent, #000 26px, #000 100%);
}
.nav-dropdown-menu li { padding: 0; }
.nav-dropdown-menu a { display: block; padding: 0.4rem 0.85rem; white-space: nowrap; }
.nav-dropdown:hover .nav-dropdown-menu { display: block; }

/* Dark mode toggle button (matches the Minecraft tool pages') */
.darkmode-btn {
    background: none; border: 1px solid var(--border-light); cursor: pointer;
    color: var(--text-muted); font-family: var(--font-data, monospace); font-size: 0.65rem;
    padding: 0.3rem 0.6rem; letter-spacing: 0.05em; transition: all 0.2s;
    display: flex; align-items: center; gap: 0.35rem;
}
.darkmode-btn:hover { border-color: var(--gold-dark); color: var(--gold); }
.darkmode-btn-dot {
    width: 7px; height: 7px; border-radius: 50%;
    background: var(--text-faint); transition: background 0.3s;
}
body.dark-mode .darkmode-btn-dot { background: var(--gold); }

.nav-hamburger {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    flex-direction: column;
    gap: 4px;
    justify-content: center;
    z-index: 102;
}
.nav-hamburger span {
    display: block;
    width: 20px;
    height: 2px;
    background: var(--text-muted);
    transition: transform 0.25s, opacity 0.25s;
}
.nav-hamburger.open span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-hamburger.open span:nth-child(2) { opacity: 0; }
.nav-hamburger.open span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

.nav-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 100;
}
.nav-overlay.open { display: block; right: 180px; }

@media (max-width: 700px) {
    nav { padding: 0.7rem 1.2rem; backdrop-filter: none; -webkit-backdrop-filter: none; }
    .nav-brand-text { display: none; }
    .nav-hamburger { display: flex; }
    .darkmode-btn { font-size: 0.55rem; padding: 0.22rem 0.5rem; }
    .nav-right {
        position: fixed;
        top: 0;
        /* left: 50% survives from the base (desktop, centered) .nav-right rule
           above unless reset here - with left, right, AND width all set on a
           fixed box, the spec drops "right" and positions from "left"
           instead, so the panel lands ~mid-screen instead of flush against
           the true right edge. */
        left: auto;
        right: 0;
        width: 180px;
        height: 100vh;
        background: rgba(12, 10, 22, 0.97);
        border-left: 1px solid var(--border);
        backdrop-filter: blur(12px);
        -webkit-backdrop-filter: blur(12px);
        flex-direction: column;
        align-items: flex-start;
        padding: 4rem 1.4rem 2rem;
        gap: 0.6rem;
        transform: translateX(100%);
        transition: transform 0.3s ease, visibility 0.3s;
        visibility: hidden;
        z-index: 101;
    }
    .nav-right.open { transform: translateX(0); visibility: visible; }
    /* Real tap targets, not just the bare text line - was only ~16px tall
       with ~10px gaps, well under the ~44px touch-target guideline, so an
       imprecise tap could land on the wrong adjacent link. Padding does
       the spacing now, so gap can shrink without the rows visually
       crowding. */
    .nav-links { flex-direction: column; gap: 0.1rem; }
    .nav-links > li > a, .nav-dropdown-toggle {
        display: block; padding: 0.55rem 0; font-size: 0.92rem;
    }

    /* no hover on touch — just leave the Minecraft Tools sub-links expanded */
    .nav-dropdown { display: flex; flex-direction: column; gap: 0; }
    .nav-dropdown-toggle { font-size: 0.78rem; color: var(--text-faint); padding-bottom: 0.3rem; }
    .nav-dropdown-menu {
        display: flex; flex-direction: column; gap: 0;
        position: static; transform: none; margin: 0 0 0 0.8rem;
        background: none; border: none; padding: 0; min-width: 0;
        backdrop-filter: none;
        /* the desktop top-fade mask (below) survives into this stacked
           mobile list unless reset - it faded the first nested link
           ("Nether Seed Map") toward invisible against the dark panel. */
        mask-image: none; -webkit-mask-image: none;
    }
    /* A fixed dash anchors the eye at a consistent point instead of relying
       on each destination name's own glyph shape - the Zurich font's
       capital letters render with different left-side bearing per letter
       (measured up to ~7px difference), which reads as inconsistent
       indentation even though the underlying box positions are identical. */
    .nav-dropdown-menu a {
        display: flex; align-items: center; gap: 0.5rem;
        padding: 0.5rem 0; font-size: 0.88rem;
    }
    .nav-dropdown-menu a::before {
        content: '\2013'; color: var(--text-faint); flex-shrink: 0;
    }
}

.container {
    text-align: center;
    padding: 2rem;
    max-width: 500px;
    width: 100%;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

/* Desktop gets real room to breathe - the title/subtitle no longer need
   to dominate the page now that they're smaller, so that space goes to
   the stage box instead (Harrison: "much larger, especially for desktop"). */
@media (min-width: 860px) {
    .container {
        max-width: 820px;
    }
}

/* Header */
header {
    margin-bottom: 0.6rem;
}

h1 {
    font-family: var(--font-brand);
    font-size: 3.2rem;
    font-weight: 700;
    line-height: 1.1;
    color: var(--gold);
    letter-spacing: 0.01em;
    /* Zurich only ships one weight (see the @font-face above), so 700
       relies on the browser's synthetic-bold fallback - a slight stroke
       reinforces that so it reads as genuinely bold/loud, not just
       bigger, regardless of how strong that synthesis is. */
    -webkit-text-stroke: 0.5px var(--gold);
}

.tagline {
    color: var(--text-muted);
    font-size: 0.85rem;
    line-height: 1.25;
    margin-top: 0.25rem;
}

/* Audio visualizer: sits behind the (transparent background) three.js
   canvas, as the "ground" the dancer stands on - but it's the core
   BPM-detector visual (not a dancer accessory), so it lives in
   .stage-visual, a sibling of .stage-dancer, and keeps showing even with
   character "None" selected. */
.audio-viz {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100px;
    z-index: 0;
    display: block;
    pointer-events: none;
}

/* Stage box: dancer (front and center) + BPM/confidence + character picker
   (left) + mini beat pulse/count + style picker (right), all one panel so
   the whole live readout and its controls read as a single glance instead
   of several separate boxes. */
.stage-box {
    width: 100%;
    height: 300px;
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(212, 160, 48, 0.2);
    border-radius: 16px;
    display: flex;
    align-items: stretch;
    gap: 0.25rem;
    position: relative;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.stage-col {
    flex: 0 0 84px;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 0.6rem;
    padding: 0.6rem 0.35rem;
    overflow: hidden;
}

.stage-stats {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.stage-mini {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.4rem;
}

/* Picture-in-picture pop-out - sits ABOVE the stage box (not inside it),
   right-aligned, so it never overlaps the pulsing circle or its ring/
   sunburst the way an in-box corner button did. Lowkey by design (a
   curious person finds it, it's not a headline control) but still a
   real, visible icon button rather than a bare unicode glyph. */
.pip-btn-row {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 0.35rem;
}

.pip-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    background: rgba(212, 160, 48, 0.1);
    border: 1px solid rgba(212, 160, 48, 0.35);
    border-radius: 6px;
    color: var(--text-muted);
    cursor: pointer;
    transition: color 0.2s, background 0.2s, border-color 0.2s;
}

.pip-btn:hover {
    color: var(--gold-light);
    background: rgba(212, 160, 48, 0.2);
    border-color: rgba(212, 160, 48, 0.55);
}

/* While popped out, a placeholder note covers the now-empty stage box
   (its live BPM/dancer/hill/mini-circle nodes have been physically moved
   into the PiP window, not cloned, so they keep animating seamlessly) */
.pip-placeholder {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-data, monospace);
    font-size: 0.75rem;
    color: var(--text-muted);
    text-align: center;
    padding: 1rem;
    z-index: 3;
    background: var(--bg-card);
}

.stage-stat {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
}

.stage-stat .stat-value {
    font-size: 1.15rem;
}

/* BPM is the headline number for a "BPM detector" - much bigger than the
   other stage stats, and colored gold (low confidence) -> red (high
   confidence) via inline style set in setBpmConfidenceColor() (app.js) */
#bpmValue {
    font-size: 2.1rem;
    line-height: 1;
    transition: color 0.3s ease;
}

.stage-stat .stat-label {
    font-size: 0.55rem;
}

.stage-stat .stat-note {
    white-space: normal;
}

.stage-col-right {
    align-items: center;
}

.stage-visual {
    flex: 1 1 auto;
    min-width: 0;
    position: relative;
}

.stage-dancer {
    position: absolute;
    inset: 0;
    z-index: 1;
}

.stage-dancer .dancer-3d {
    width: 100%;
    height: 100%;
    border: none;
    border-radius: 0;
    background: transparent;
}

/* Shown only while a character's GLB is being fetched/decoded - first pick
   of a session can take a couple seconds (Draco-compressed model download),
   repeat picks are instant off the browser cache. Sits above .stage-dancer
   (z-index 1) so it's readable even once the empty rig starts rendering. */
.dancer-loading {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-brand);
    font-size: 1rem;
    letter-spacing: 0.04em;
    color: var(--gold-light);
    text-shadow: 0 2px 12px rgba(0,0,0,.6);
    pointer-events: none;
}

/* Character/style buttons packed into the stage box's own columns, under
   the stats / mini circle. Stacked (not wrapped) so column width is fixed
   regardless of label count. */
.stage-btn-group {
    display: flex;
    flex-direction: column;
    gap: 0.22rem;
    margin-top: auto;
    width: 100%;
}

.stage-btn-group .dancer-ctl-label {
    margin: 0 0 0.1rem 0;
}

.stage-btn-group .dancer-btn {
    width: 100%;
    font-size: 0.56rem;
    padding: 0.16rem 0.2rem;
    text-align: center;
}

.stage-btn-group .dancer-ctl-sep {
    width: 100%;
    height: 1px;
    align-self: stretch;
    margin: 0.1rem 0;
}

/* "None" character: hide the 3D stage and its style picker, recenter the
   mini pulse circle to the middle of the box (like the old dedicated
   beat-circle box) so disabling the dancer still reads as a deliberate,
   complete layout rather than an empty gap. Written as a bare .no-dancer
   ancestor (not scoped to .stage-box specifically) so the SAME rules also
   center the circle correctly inside the picture-in-picture window,
   which uses its own plain wrapper div rather than .stage-box - see the
   PiP code in app.js, which mirrors the no-dancer class onto that
   wrapper. .stage-mini (not .stage-col-right) is what gets pulled out of
   the flex flow, since .stage-col-right doesn't exist as a wrapper in the
   PiP layout - .stage-mini does, in both places. */
.no-dancer .stage-dancer,
.no-dancer .stage-col-right .stage-btn-group {
    display: none;
}

/* .stage-mini's new containing block (position:absolute) is .stage-box,
   but its DOM PARENT in the main page is still .stage-col-right, which
   still carries .stage-col's base overflow:hidden - that clips ANY
   descendant's rendering wherever it escapes the parent's own box,
   positioning context or not (the same shield-clipping bug from before,
   just one level further down), so it needs the same override here. */
.no-dancer .stage-col-right {
    overflow: visible;
}

.no-dancer .stage-mini {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    padding: 0;
    overflow: visible;
}

.no-dancer .beat-mini-wrap {
    width: 100px;
    height: 100px;
}

.no-dancer .beat-circle--mini {
    width: 100px;
    height: 100px;
}

.no-dancer .beat-sunburst {
    /* Same reach-to-circle-size ratio as the mini circle's -18px on 34px
       (~0.55x diameter) - the mask % fade points stay the same, so this
       just scales the whole burst to line up with the bigger circle. */
    inset: -55px;
}

/* Beat indicator - contour modeled on Harrison's Blender orb reference
   (fine interfering repeating-conic layers, NOT a smooth swirl or evenly
   spaced pie-slice gradient, for an urchin/anemone-like texture), but the
   base color is the site's own orange/gold (--gold, same as the title
   text) rather than a dark core, and the contour is dialed WAY down -
   barely visible texture on top of the base color, not a dominant
   spike burst. (The wavy white ring shell from an earlier pass was
   dropped per Harrison's feedback.) */
.beat-circle {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    position: relative;
    overflow: hidden;
    background: radial-gradient(circle, var(--gold-light) 0%, var(--gold) 60%, var(--gold-dark) 100%);
    box-shadow: inset 0 0 18px rgba(90, 55, 8, 0.4), 0 0 0 rgba(212, 160, 48, 0);
    transition: transform 0.08s ease-out, box-shadow 0.08s ease-out, filter 0.2s ease-out;
}

.beat-circle::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background:
        url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"),
        repeating-conic-gradient(from 0deg, rgba(110, 65, 10, 0.16) 0deg 0.6deg, transparent 0.6deg 1.7deg),
        repeating-conic-gradient(from 0.9deg, rgba(140, 90, 20, 0.1) 0deg 0.5deg, transparent 0.5deg 2.3deg);
    background-size: 60px 60px, 100% 100%, 100% 100%;
    background-blend-mode: overlay, multiply, multiply;
    -webkit-mask-image: radial-gradient(circle, transparent 0%, black 14%, black 66%, transparent 88%);
    mask-image: radial-gradient(circle, transparent 0%, black 14%, black 66%, transparent 88%);
    animation: sunFlareSpin 18s linear infinite;
}

@keyframes sunFlareSpin {
    to { transform: rotate(360deg); }
}

.beat-circle.pulse {
    transform: scale(1.3);
    box-shadow: inset 0 0 16px rgba(90, 55, 8, 0.55), 0 0 50px rgba(212, 160, 48, 0.5);
}

/* Downbeat pulse (beatnet mode): same purple as the timeline downbeat layer
   - reuses the gritty gold texture, just hue-shifted, so the "sun" doesn't
   flatten into a plain disc on downbeats */
.beat-circle.pulse.downbeat {
    filter: hue-rotate(233deg) saturate(1.25);
    box-shadow: inset 0 0 16px rgba(50, 15, 80, 0.55), 0 0 50px rgba(168, 85, 247, 0.6);
}

/* Mini pulse circle, demoted to the stage box's top-right corner */
.beat-circle--mini {
    width: 34px;
    height: 34px;
}

.beat-circle--mini.pulse {
    transform: scale(1.35);
    box-shadow: 0 0 22px rgba(212, 160, 48, 0.5);
}

.beat-circle--mini.pulse.downbeat {
    box-shadow: 0 0 26px rgba(168, 85, 247, 0.7);
}

.beat-mini-wrap {
    position: relative;
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Downbeat ray burst: alternating wedges radiating from the mini circle,
   imperial-rising-sun-flag style rather than a generic corporate glow.
   The mini circle sits close to the stage box's edges, so the rays get a
   radial mask fading them to fully transparent well inside their own
   bounding box - they fade into nothing before reaching the box's
   rectangular overflow clip, instead of being visibly chopped off. */
.beat-sunburst {
    position: absolute;
    inset: -18px;
    border-radius: 50%;
    background: repeating-conic-gradient(
        rgba(168, 85, 247, 0.9) 0deg 7deg,
        transparent 7deg 18deg
    );
    -webkit-mask-image: radial-gradient(circle, black 0%, black 38%, transparent 58%);
    mask-image: radial-gradient(circle, black 0%, black 38%, transparent 58%);
    opacity: 0;
    transform: scale(0.35) rotate(0deg);
    pointer-events: none;
}

.beat-sunburst.flash {
    animation: sunburstFlash 0.6s ease-out;
}

@keyframes sunburstFlash {
    0% { opacity: 0.9; transform: scale(0.4) rotate(0deg); }
    100% { opacity: 0; transform: scale(1.4) rotate(16deg); }
}

/* Auto-picked (winning) ensemble model */
/* ============================================================
   BeatNet ensemble: group checkboxes + per-model live-stat cards
   ============================================================ */

.bn-ensemble {
    margin-bottom: 1.5rem;
}

/* Group checkboxes: deliberately NOT styled like the model cards below - a
   checkbox only ever means "in the ensemble," so it can't be confused with
   the card's separate selected/winning states. */
.bn-group-row {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 0.75rem;
}

.bn-group-checkbox {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.8rem;
    color: var(--text-muted);
    cursor: pointer;
    user-select: none;
}

.bn-group-checkbox input[type="checkbox"] {
    width: 15px;
    height: 15px;
    accent-color: var(--gold);
    cursor: pointer;
}

.bn-group-checkbox:hover {
    color: var(--text);
}

.bn-model-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.6rem;
    max-width: 620px;
    margin: 0 auto;
}

/* Model card: three distinct states.
   - default (not in classList below): deselected, dim, excluded from the run
   - .selected: running as part of the ensemble, outlined (not filled) so a
     later .winner fill is still visually distinguishable from "just selected"
   - .winner: currently driving the display; solid fill + glow + badge */
.bn-model-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.3rem;
    background: rgba(10, 5, 40, 0.5);
    border: 1px solid rgba(212, 160, 48, 0.2);
    color: var(--text-muted);
    padding: 0.55rem 0.5rem;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.15s ease;
    position: relative;
}

.bn-model-card:hover {
    border-color: rgba(212, 160, 48, 0.5);
    color: var(--text);
}

.bn-model-card.selected {
    border: 2px solid var(--gold);
    color: var(--text);
    padding: calc(0.55rem - 1px) calc(0.5rem - 1px);
}

.bn-model-card.winner {
    background: var(--gold);
    border: 2px solid var(--gold);
    color: #0a0828;
    padding: calc(0.55rem - 1px) calc(0.5rem - 1px);
    box-shadow: 0 0 16px rgba(212, 160, 48, 0.55);
}

.bn-model-card.winner::before {
    content: 'LEADING';
    position: absolute;
    top: -8px;
    right: 6px;
    background: #0a0828;
    color: var(--gold);
    font-size: 0.55rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    padding: 1px 5px;
    border-radius: 4px;
}

.bn-model-name {
    font-size: 0.78rem;
    font-weight: 600;
}

.bn-model-stats {
    display: flex;
    gap: 0.6rem;
}

.bn-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 34px;
}

.bn-stat-val {
    font-size: 0.8rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.bn-stat-lbl {
    font-size: 0.55rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    opacity: 0.75;
}

@media (max-width: 768px) {
    .bn-model-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Stats row */
.stats {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 1.5rem;
}

.stat {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: #ffffff;
    font-variant-numeric: tabular-nums;
}

.stat-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-top: 0.25rem;
}

/* Raw-bpm footnote shown only when the main readout has been octave-normalized */
.stat-note {
    font-size: 0.6rem;
    color: var(--text-muted);
    margin-top: 0.2rem;
    white-space: nowrap;
}

/* Toggle button rows (audio source + detection mode) */
.audio-source,
.mode-toggle {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

/* Legacy modes (Threshold/Spectral Flux/MAD Onset): kept for troubleshooting,
   visually demoted now that BeatNet is the default/primary mode. Candidate
   for hiding behind an "extras" menu later. */
.mode-toggle-legacy {
    margin-top: -1rem;
    opacity: 0.65;
}

.mode-toggle-legacy-label {
    font-size: 0.62rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-right: 0.15rem;
}

.legacy-mode-btn {
    font-size: 0.72rem;
    padding: 0.35rem 0.7rem;
}

.source-btn {
    background: rgba(10, 5, 40, 0.5);
    border: 1px solid rgba(212, 160, 48, 0.25);
    color: var(--text-muted);
    padding: 0.62rem 1.3rem;
    border-radius: 8px;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.15s ease;
    backdrop-filter: blur(5px);
}

.source-btn:hover {
    border-color: rgba(212, 160, 48, 0.5);
    color: var(--text);
    background: rgba(58, 12, 163, 0.4);
}

.source-btn.active {
    /* Deliberately duller than .start-btn's full --gold: this is just
       confirming a selection, not the button to press next. The brighter
       gold stays reserved for Start so the eye is pulled there. */
    background: var(--gold-dark);
    border-color: var(--gold-dark);
    color: #0a0828;
    font-weight: 600;
}

/* System Audio on platforms with no getDisplayMedia (iOS Safari/WebKit) -
   disabled + explained via title tooltip, rather than left clickable to
   fail with a raw JS error after Start is pressed. */
.source-btn.disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

.source-btn.disabled:hover {
    border-color: rgba(212, 160, 48, 0.25);
    color: var(--text-muted);
    background: rgba(10, 5, 40, 0.5);
}

/* Main start button */
.start-btn {
    background: var(--gold);
    border: none;
    color: #0a0520;
    padding: 1.15rem 3rem;
    border-radius: 12px;
    font-size: 1.15rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
    margin-bottom: 1rem;
    box-shadow: 0 4px 20px rgba(212, 160, 48, 0.3);
}

.start-btn:hover {
    background: var(--gold-light);
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(212, 160, 48, 0.4);
}

.start-btn:active {
    transform: translateY(0);
}

.start-btn.listening {
    background: rgba(212, 160, 48, 0.15);
    color: var(--gold);
    border: 2px solid var(--gold);
    box-shadow: 0 4px 20px rgba(212, 160, 48, 0.2);
}

.start-btn.listening:hover {
    background: rgba(212, 160, 48, 0.25);
    box-shadow: 0 8px 30px rgba(212, 160, 48, 0.3);
}

/* Status message */
.status {
    color: var(--text-muted);
    font-size: 0.85rem;
}

.status.active {
    color: var(--gold);
}

.status.error {
    color: #ef4444;
}

/* Main row - stats and threshold control side by side */
.main-row {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    gap: 2rem;
    margin-bottom: 1.5rem;
}

/* Stats adjustments for row layout */
.stats {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* Threshold control - mixing board fader style */
.threshold-control {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(212, 160, 48, 0.2);
    border-radius: 12px;
    padding: 1rem 0.75rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

/* Hidden utility */
.hidden {
    display: none !important;
}

.threshold-label {
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Container for meter + fader + ticks */
.meter-fader-group {
    display: flex;
    align-items: center;
    gap: 0.15rem;
    height: 180px;
}

/* Volume meter - vertical bar showing current level */
.volume-meter {
    width: 12px;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    border-radius: 6px;
    border: 1px solid rgba(212, 160, 48, 0.2);
    position: relative;
    overflow: hidden;
}

.meter-fill {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 0%;
    background: linear-gradient(to top,
        #22c55e 0%,
        #22c55e 60%,
        #eab308 75%,
        #ef4444 100%
    );
    border-radius: 0 0 5px 5px;
    transition: height 0.05s ease-out;
}

/* Onset meter uses gold/white gradient instead of traffic light */
.onset-meter-fill {
    background: linear-gradient(to top,
        rgba(212, 160, 48, 0.4) 0%,
        var(--gold) 50%,
        var(--gold-light) 80%,
        #ffffff 100%
    );
}

.meter-peak {
    position: absolute;
    left: 1px;
    right: 1px;
    height: 2px;
    background: var(--gold);
    border-radius: 1px;
    bottom: 0%;
    transition: bottom 0.05s ease-out;
    box-shadow: 0 0 4px var(--gold);
}

.fader-track {
    display: flex;
    align-items: center;
    height: 100%;
}

/* Vertical range slider - the fader itself */
.fader {
    -webkit-appearance: none;
    appearance: none;
    width: 180px;
    height: 8px;
    background: transparent;
    transform: rotate(-90deg);
    transform-origin: center center;
    margin: 0;
}

/* Track styling */
.fader::-webkit-slider-runnable-track {
    width: 100%;
    height: 8px;
    background: linear-gradient(to right, 
        rgba(212, 160, 48, 0.3) 0%, 
        rgba(212, 160, 48, 0.6) 100%);
    border-radius: 4px;
    border: 1px solid rgba(212, 160, 48, 0.3);
}

.fader::-moz-range-track {
    width: 100%;
    height: 8px;
    background: linear-gradient(to right, 
        rgba(212, 160, 48, 0.3) 0%, 
        rgba(212, 160, 48, 0.6) 100%);
    border-radius: 4px;
    border: 1px solid rgba(212, 160, 48, 0.3);
}

/* Thumb (the draggable part) - mixing board knob style */
.fader::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 32px;
    background: linear-gradient(to bottom,
        #f0f0f0 0%,
        #d0d0d0 20%,
        #e8e8e8 50%,
        #d0d0d0 80%,
        #b0b0b0 100%);
    border-radius: 3px;
    cursor: grab;
    margin-top: -12px;
    box-shadow: 
        0 2px 4px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.5),
        inset 0 -1px 0 rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(0, 0, 0, 0.2);
}

.fader::-moz-range-thumb {
    width: 20px;
    height: 32px;
    background: linear-gradient(to bottom,
        #f0f0f0 0%,
        #d0d0d0 20%,
        #e8e8e8 50%,
        #d0d0d0 80%,
        #b0b0b0 100%);
    border-radius: 3px;
    cursor: grab;
    box-shadow: 
        0 2px 4px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.5),
        inset 0 -1px 0 rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(0, 0, 0, 0.2);
}

.fader::-webkit-slider-thumb:active {
    cursor: grabbing;
}

.fader::-moz-range-thumb:active {
    cursor: grabbing;
}

/* Tick marks on the side */
.fader-ticks {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
    padding: 4px 0;
}

.fader-ticks span {
    font-size: 0.6rem;
    color: var(--text-muted);
    font-variant-numeric: tabular-nums;
}

/* Current value display */
.threshold-value {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--gold);
    font-variant-numeric: tabular-nums;
    min-width: 3ch;
    text-align: center;
}

/* Debug timeline */
.debug-panel {
    margin-bottom: 0.5rem;
}

.panel-hidden {
    display: none;
}

/* three.js stage (anim/dancer3d.js) */
.dancer-3d {
    width: 100%;
    height: 260px;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(212, 160, 48, 0.2);
    border-radius: 12px;
    display: block;
    overflow: hidden;
}

.dancer-3d canvas {
    display: block;
}

.dancer-ctl-label {
    font-family: var(--font-data, monospace);
    font-size: 0.62rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    opacity: 0.55;
    margin-right: 0.2rem;
}

/* Robot doesn't share the Mixamo rig/move set the others do, so it's set
   off from the rest of the character roster by a thin divider rather than
   just tacked on the end. */
.dancer-ctl-sep {
    width: 1px;
    align-self: stretch;
    background: rgba(212, 160, 48, 0.3);
    margin: 0 0.15rem;
}

.dancer-btn {
    font-family: var(--font-data, monospace);
    font-size: 0.68rem;
    padding: 0.22rem 0.6rem;
    background: rgba(212, 160, 48, 0.08);
    border: 1px solid rgba(212, 160, 48, 0.3);
    border-radius: 6px;
    color: rgba(255, 255, 255, 0.75);
    cursor: pointer;
}

.dancer-btn:hover {
    background: rgba(212, 160, 48, 0.18);
}

.dancer-btn.active {
    background: rgba(212, 160, 48, 0.85);
    color: #1a1c60;
    border-color: rgba(212, 160, 48, 0.9);
}

/* While Random is rotating, a ring on whichever style is CURRENTLY
   playing - separate from .active (which stays on the Random button
   itself, since that's still the selected MODE, not the live style) */
.dancer-btn.current {
    box-shadow: 0 0 0 2px var(--gold-light), 0 0 6px rgba(232, 184, 74, 0.55);
}

/* "None" reads as an off-switch, not a character, so it gets its own red
   ring instead of the gold everything else uses - it's the default, and a
   red ring signals "nothing selected" at a glance. */
.dancer-btn-none {
    border-color: rgba(239, 68, 68, 0.55);
}

.dancer-btn-none:hover {
    background: rgba(239, 68, 68, 0.12);
}

.dancer-btn-none.active {
    background: rgba(239, 68, 68, 0.22);
    color: #fca5a5;
    border-color: rgba(239, 68, 68, 0.8);
}

/* Desktop: the freed-up header space goes straight into the stage box -
   bigger dancer, bigger everything, since this is the whole point of the
   page. Columns/stats/buttons scale up a bit too so they don't look lost
   in the extra room. */
@media (min-width: 860px) {
    .stage-box {
        height: 460px;
    }

    .stage-col {
        flex-basis: 110px;
        padding: 0.9rem 0.5rem;
        gap: 0.9rem;
    }

    #bpmValue {
        font-size: 2.8rem;
    }

    .stage-stat .stat-label {
        font-size: 0.65rem;
    }

    .stage-stat .stat-value:not(#bpmValue) {
        font-size: 1.4rem;
    }

    .stage-btn-group .dancer-btn {
        font-size: 0.68rem;
        padding: 0.24rem 0.3rem;
    }

    .beat-mini-wrap,
    .beat-circle--mini {
        width: 46px;
        height: 46px;
    }
}

@media (max-width: 768px) {
    .stage-box {
        height: 260px;
    }

    .stage-col {
        flex-basis: 70px;
    }
}

/* Narrow phones: character/style columns (6-7 stacked buttons each) are the
   ones most likely to overflow, so they shrink rather than wrap - a wrapped
   button stack is exactly the kind of layout break this is guarding against. */
@media (max-width: 500px) {
    .stage-col {
        flex-basis: 64px;
        padding: 0.4rem 0.22rem;
        gap: 0.4rem;
    }

    .dancer-ctl-label {
        font-size: 0.48rem;
        margin: 0 0 0.05rem 0;
    }

    .stage-btn-group .dancer-btn {
        font-size: 0.5rem;
        padding: 0.12rem 0.15rem;
    }

    .stage-stat .stat-value {
        font-size: 0.95rem;
    }
}

.timeline-canvas {
    width: 100%;
    height: 100px;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(212, 160, 48, 0.2);
    border-radius: 12px;
    margin-bottom: 0.25rem;
    display: block;
}

.mad-buffer-canvas {
    width: 100%;
    height: 80px;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(212, 160, 48, 0.2);
    border-radius: 12px;
    margin-bottom: 0.25rem;
    display: block;
}

.timeline-legend,
.mad-buffer-legend {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 0.5rem;
    font-size: 0.65rem;
    color: var(--text-muted);
}

.mad-buffer-info {
    color: var(--gold);
    font-weight: 600;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

/* Onset never actually plots in BeatNet mode (it's a legacy-mode-only
   signal), so its legend chip is hidden there instead of being confusingly
   always-present. The gold "Activation" line DOES plot in BeatNet mode -
   it's the same frameFlux variable legacy modes use for spectral flux,
   but in BeatNet mode it's set to the CRNN's raw beat/downbeat activation
   strength (see runBeatNetVis() in app.js), i.e. how strongly the network
   currently "feels" a beat, continuously - a genuinely useful signal to
   show, just not literally spectral flux, hence the different label. */
body.beatnet-mode .legend-item-onset {
    display: none;
}

.legend-swatch {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 2px;
}

.legend-volume {
    background: rgba(160, 153, 184, 0.5);
}

.legend-flux {
    background: var(--gold);
}

.legend-onset {
    background: #ef4444;
}

.legend-beat {
    background: #22c55e;
}

.legend-downbeat {
    background: #a855f7;
}

.attribution {
    text-align: center;
    font-size: 0.7rem;
    color: rgba(160, 153, 184, 0.55);
    margin-top: 0.6rem;
}

.legend-inlier {
    background: var(--gold);
}

.legend-outlier {
    background: #ef4444;
}

.legend-median {
    background: #22c55e;
}

.legend-bounds {
    background: rgba(34, 197, 94, 0.3);
    border: 1px dashed rgba(34, 197, 94, 0.6);
}

/* Responsive: stack vertically on small screens */
@media (max-width: 500px) {
    .main-row {
        flex-direction: column;
        align-items: center;
    }

    .stats {
        flex-direction: row;
        gap: 2rem;
    }
}

/* "Advanced features . . ." disclosure - same look as the "Advanced..."
   link on /netherite-finder/ (orange, underlined, IBM Plex Mono) so the
   model internals/timeline/bar-chart/legacy-modes read as clearly optional
   depth rather than the default experience. */
.advanced-details {
    margin-top: 0.4rem;
    margin-bottom: 1rem;
    text-align: left;
}

.advanced-summary {
    font-family: var(--font-data, monospace);
    font-size: 0.82rem;
    color: var(--gold-dark);
    cursor: pointer;
    letter-spacing: 0.02em;
    list-style: none;
    text-decoration: underline;
    text-decoration-color: var(--gold-dark);
    transition: color 0.2s;
    user-select: none;
    display: inline-block;
    text-align: center;
    width: 100%;
}

.advanced-summary:hover {
    color: var(--gold);
    text-decoration-color: var(--gold);
}

.advanced-summary::-webkit-details-marker {
    display: none;
}

.advanced-body {
    margin-top: 0.8rem;
}

/* Reference section (the SEO/FAQ content framework) - same collapsed-
   expandables pattern as the Minecraft tool pages' Reference blocks
   (mc-shared/map-core.css .tool-reference), retinted to BeatBoy's
   gold-on-indigo. Everything collapsed by default so the page still
   reads as a simple tool. */
.tool-reference {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
    text-align: left;
}

.tool-reference h2 {
    font-family: var(--font-data, monospace);
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.10em;
    text-transform: uppercase;
    color: var(--gold);
    margin-bottom: 1.1rem;
}

.tool-reference-intro {
    font-size: 0.92rem;
    line-height: 1.65;
    color: var(--text-muted);
    margin-bottom: 1.6rem;
}

.tool-reference-intro p { margin-bottom: 0.7rem; }
.tool-reference-intro p:last-child { margin-bottom: 0; }

.ref-details { border-top: 1px solid var(--border); }
.ref-details:last-of-type { border-bottom: 1px solid var(--border); }

.ref-summary {
    font-family: var(--font-data, monospace);
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--text);
    cursor: pointer;
    padding: 0.95rem 0.2rem;
    list-style: none;
    user-select: none;
    display: flex;
    align-items: center;
    gap: 0.65rem;
    transition: color 0.2s;
}

.ref-summary:hover { color: var(--gold); }
.ref-summary::-webkit-details-marker { display: none; }

.ref-summary::before {
    content: '+';
    display: inline-block;
    width: 0.85rem;
    font-size: 1rem;
    color: var(--gold-dark);
    font-weight: 400;
    transition: color 0.2s;
}

.ref-details[open] > .ref-summary::before {
    content: '−';
    color: var(--gold);
}

.ref-details[open] > .ref-summary { color: var(--gold); }

.ref-body {
    font-size: 0.88rem;
    line-height: 1.7;
    color: var(--text-muted);
    padding: 0 0.2rem 1.2rem 1.5rem;
    text-align: left;
}

.ref-body p { margin-bottom: 0.7rem; }
.ref-body p:last-child { margin-bottom: 0; }
.ref-body strong { color: var(--text); font-weight: 600; }
.ref-body ul { margin: 0.4rem 0 0.7rem 1.2rem; }
.ref-body li { margin-bottom: 0.4rem; }
.ref-body a { color: var(--gold-dark); text-decoration: underline; text-decoration-color: var(--gold-dark); }
.ref-body a:hover { color: var(--gold); text-decoration-color: var(--gold); }

@media (max-width: 640px) {
    .ref-summary { font-size: 0.85rem; padding: 0.85rem 0.1rem; }
    .ref-body { font-size: 0.85rem; padding: 0 0.1rem 1rem 1.3rem; }
}

/* Dev footer (System Updates / Support & Community) + permanent site
   footer, ported from the Minecraft tools' mc-shared/map-core.css
   (.dev-footer/.dev-column/.dev-entry/footer) and retinted gold. Populated
   by /site-shared/updates.js reading data-hb-tool="beatboy" on <html>. */
.dev-footer {
    max-width: 900px;
    margin: 4rem auto 2rem;
    padding: 3rem 1.5rem 0;
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 3rem;
    border-top: 1px solid var(--border);
    text-align: left;
    /* Sits outside .container (the z-index:2 stacking wrapper everything
       else uses), so without its own stacking context .bg-layer's opaque
       fixed gradient (position:fixed, z-index:0) painted over it per CSS
       stacking rules - static in-flow content sits BELOW z-index:0
       positioned elements. Made it invisible even though the DOM/content
       was completely correct. */
    position: relative;
    z-index: 2;
}

.dev-column .dev-label {
    font-family: var(--font-data, monospace);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--gold);
    margin-bottom: 1.2rem;
    font-weight: 600;
    display: block;
}

.dev-entry {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 0.8rem;
    font-size: 0.85rem;
    line-height: 1.4;
}

.dev-date {
    color: var(--text-muted);
    flex-shrink: 0;
    font-variant-numeric: tabular-nums;
}

.dev-column.support p {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.6;
}

.support-link {
    color: var(--text);
    text-decoration: underline;
    text-decoration-color: var(--gold-dark);
    transition: color 0.2s;
}

.support-link:hover { color: var(--gold); }

/* #hbComments (populated by site-shared/comments.js) sits outside .container
   like .dev-footer above it, and hit the exact same stacking bug: no
   position of its own meant .bg-layer's fixed z-index:0 gradient painted
   over it, leaving the whole comments widget invisible even though the DOM
   content was completely correct. Same fix as .dev-footer. */
#hbComments {
    position: relative;
    z-index: 2;
}

footer {
    position: relative;
    border-top: 1px solid var(--border);
    padding: 1rem 2.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-left { font-family: var(--font-data, monospace); font-size: 0.6rem; color: var(--text-faint); }
.footer-center { font-family: var(--font-data, monospace); font-size: 0.6rem; color: var(--text-faint); }
.footer-contact { color: var(--text-faint); text-decoration: none; transition: color 0.2s; }
.footer-contact:hover { color: var(--text-muted); }
.footer-right { display: flex; gap: 1.5rem; }

@media (max-width: 640px) {
    .dev-footer { grid-template-columns: 1fr; gap: 2rem; }
}

/* Explains the greyed-out System Audio button on platforms with no
   getDisplayMedia (iOS/mobile) - deliberately a quiet footnote, not a
   heads-up like .mic-warning below: it's just stating a platform fact, not
   something the user needs to weigh or act on. */
.system-audio-note {
    font-family: var(--font-data, monospace);
    font-size: 0.68rem;
    color: var(--text-faint);
    text-align: center;
    max-width: 420px;
    margin: 0.5rem auto 0;
}

/* Mic-quality caveat, shown only while Microphone is the selected source -
   bumped up in size/color from a barely-there footnote to something
   actually easy to read, in the site's orange since it's a real heads-up
   worth noticing, not fine print */
.mic-warning {
    font-family: var(--font-data, monospace);
    font-size: 0.8rem;
    line-height: 1.55;
    color: var(--gold-light);
    text-align: center;
    max-width: 480px;
    margin: 0.7rem auto 0;
}
