/* Buffon's Needle (/buffons-needle): what is its own - the canvas stage and what is drawn over it. The buttons and the accent
   come from the app kit (css/app-kit, docs/app-kit.md); the sliders and checkboxes are the shared app controls.
   Loaded only on this app's page (StylePaths). The stage is the canvas's own box, not the kit's padded
   .ak-stage column; the phone layout is the shared one for canvas apps in landing/seo-pages.css. */

.buffon-needle-landing-canvas {
    display: block;
    width: 100%;
    height: 100%;
}

.filter-landing-stage.buffon-needle-landing-stage {
    position: relative;
    display: block;
    width: 100%;
    min-height: 280px;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    box-shadow: none;
    cursor: crosshair;
    touch-action: none;
    background-color: #c89d6b;
    background-image: none;
}

.buffon-needle-landing-stage:focus {
    outline: none;
}

.buffon-needle-landing-canvas {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
}

.buffon-needle-hud {
    --buffon-hud-accent: #fbbf24;
    position: absolute;
    left: 12px;
    top: 12px;
    right: auto;
    width: max-content;
    max-width: min(440px, calc(100% - 24px));
    margin: 0;
    padding: 10px 14px 11px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    background: rgba(8, 13, 26, 0.74);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.28);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    color: #f1f5f9;
    font-size: 0.76rem;
    line-height: 1.4;
    font-variant-numeric: tabular-nums;
    pointer-events: none;
}

.buffon-needle-stage--light .buffon-needle-hud {
    --buffon-hud-accent: #b3123c;
    border-color: rgba(42, 29, 20, 0.1);
    background: rgba(255, 251, 244, 0.86);
    box-shadow: 0 8px 24px rgba(48, 24, 6, 0.2);
    color: #2a1d14;
}

.buffon-needle-hud-pi {
    display: block;
    margin-bottom: 4px;
    font-size: 1.3rem;
    font-weight: 600;
    line-height: 1.15;
    letter-spacing: -0.01em;
}

.buffon-needle-hud-pi-label {
    font-weight: 500;
    opacity: 0.7;
}

.buffon-needle-hud-pi-match {
    color: var(--buffon-hud-accent);
}

.buffon-needle-hud-pi-spread {
    font-size: 0.8rem;
    font-weight: 500;
    opacity: 0.65;
}

.buffon-needle-hud-row {
    display: block;
}

.buffon-needle-hud-detail {
    opacity: 0.72;
}

.buffon-needle-hud-placed {
    margin-top: 4px;
    font-weight: 600;
    color: var(--buffon-hud-accent);
}

.buffon-needle-hud-row[hidden] {
    display: none;
}

.buffon-needle-stage--compact .buffon-needle-hud {
    left: 8px;
    top: 8px;
    max-width: calc(100% - 16px);
    padding: 7px 10px 8px;
    border-radius: 10px;
    font-size: 0.7rem;
}

.buffon-needle-stage--compact .buffon-needle-hud-pi {
    margin-bottom: 2px;
    font-size: 1.05rem;
}

.buffon-needle-stage--compact .buffon-needle-hud-detail {
    display: none;
}

body.filter-app-mode .buffon-needle-landing-app .buffon-needle-landing-canvas {
    max-width: none;
}

body.filter-app-mode .buffon-needle-landing-stage {
    box-shadow: none;
}

.buffon-needle-landing-app {
    display: grid;
    gap: 1rem;
    align-items: start;
}

.buffon-needle-landing-stage.buffon-needle-stage--transparent {
    background: var(--component-checkerboard);
}
