/* VR Club - Optimized Stylesheet for Quest 3S */
/* GPU-accelerated, reduced blur/shadow complexity */

:root {
    --blur-light: blur(8px);
    --blur-heavy: blur(12px);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.5);
    --accent: #667eea;
    --accent-hover: #764ba2;
    --transition-fast: 0.15s ease;
    --transition-normal: 0.25s ease;
}

.hidden { display: none !important; }

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    width: 100%;
    height: 100%;
    overflow: hidden;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

/* The canvas sizes itself with height:100%, which only resolves against a parent
   with a definite height - without this it collapses to the 150px canvas default. */
#mainExperience {
    width: 100%;
    height: 100%;
}

#canvas {
    width: 100%;
    height: 100%;
    display: block;
    touch-action: none;
    transform: translateZ(0);
    /* `contain: strict` implies size containment, which makes a replaced element
       ignore its intrinsic dimensions - fragile on the one element Babylon resizes
       via engine.resize(). `paint` gives the isolation without the sizing risk. */
    contain: paint;
}

#cameraControls {
    position: absolute;
    bottom: calc(20px + env(safe-area-inset-bottom, 0px));
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(10, 10, 20, 0.75);
    padding: 6px;
    border-radius: 8px;
    -webkit-backdrop-filter: var(--blur-light);
    backdrop-filter: var(--blur-light);
    z-index: 100;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: var(--shadow-md);
    transition: opacity var(--transition-normal);
}

#cameraControls.expanded {
    padding-right: 10px;
}

#cameraControls:hover {
    background: rgba(10, 10, 20, 0.8);
    border-color: rgba(255, 255, 255, 0.2);
}

.preset-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
}

.preset-grid[hidden] {
    display: none;
}

.camera-controls-toggle {
    min-width: 52px;
    min-height: 48px;
    padding: 4px 8px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    font-size: 19px;
    cursor: pointer;
}

/* Every corner button says what it opens in one word under its icon: an icon alone means nothing to a first-time
   visitor, and touch screens never show the tooltip. */
#vjToggle,
#networkToggle,
#audioToggle,
.camera-controls-toggle {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    line-height: 1;
}

#vjToggle,
#networkToggle,
#audioToggle {
    padding: 7px 12px;
}

.toggle-word {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.camera-controls-toggle:hover,
.camera-controls-toggle[aria-expanded="true"] {
    background: rgba(102, 126, 234, 0.65);
    border-color: rgba(122, 162, 255, 0.85);
}

.preset-grid button {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.9);
    min-height: 44px;
    padding: 10px 14px;
    font-size: 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: background var(--transition-fast), transform var(--transition-fast);
    font-weight: 500;
}

.preset-grid button:hover {
    background: rgba(102, 126, 234, 0.6);
    border-color: rgba(102, 126, 234, 0.8);
    transform: translateY(-2px);
    color: white;
}

.preset-grid button:active {
    transform: translateY(0);
}

/* Enter VR - a top-level control, not a setting. Sits beside #vjToggle. */
#vrButton {
    position: absolute;
    top: 20px;
    right: calc(20px + env(safe-area-inset-right, 0px));
    background: var(--accent);
    border: 1px solid rgba(255, 255, 255, 0.18);
    color: white;
    min-height: 44px;
    padding: 12px 18px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 600;
    z-index: 101;
    -webkit-backdrop-filter: var(--blur-light);
    backdrop-filter: var(--blur-light);
    transition: background var(--transition-fast), transform var(--transition-fast);
}

#vrButton:hover:not(:disabled) {
    background: var(--accent-hover);
    transform: scale(1.04);
}

#vrButton:disabled {
    background: rgba(255, 255, 255, 0.12);
    color: rgba(255, 255, 255, 0.55);
    cursor: not-allowed;
}

#vrButton.in-session {
    background: #b3452f;
}

/* Credits & licences: a collapsed disclosure in the bottom-left corner.
   The plate is required, not decoration: this text renders directly over a live 3D
   canvas whose corner is regularly washed white by a spotlight, so without an opaque
   backing its contrast ratio is unbounded and can approach 1:1. */
#modelCredits {
    position: fixed;
    bottom: calc(10px + env(safe-area-inset-bottom, 0px));
    left: calc(10px + env(safe-area-inset-left, 0px));
    color: rgba(255, 255, 255, 0.92);
    font-size: 12px;
    font-family: Arial, sans-serif;
    z-index: 100;
    max-width: 320px;
    line-height: 1.45;
    background: rgba(0, 0, 0, 0.68);
    padding: 4px 10px;
    border-radius: 6px;
}

#modelCredits:not([open]) {
    opacity: 0.7;
}

#modelCredits:not([open]):hover,
#modelCredits:not([open]):focus-within {
    opacity: 1;
}

#modelCredits .credits-title {
    cursor: pointer;
    list-style: none;
    user-select: none;
}

#modelCredits .credits-title::-webkit-details-marker {
    display: none;
}

#modelCredits .credits-title:focus-visible {
    outline: 2px solid #7ec8ff;
    outline-offset: 2px;
}

#modelCredits .credits-body {
    margin-top: 6px;
    max-height: min(60vh, 420px);
    overflow-y: auto;
}

#modelCredits .credits-heading {
    margin-bottom: 3px;
}

.splash-credits {
    font-size: 11px;
    opacity: 0.75;
}

.splash-credits a {
    color: #7ec8ff;
}

#modelCredits .credits-note {
    margin-top: 4px;
    opacity: 0.8;
}

#modelCredits .credit-link {
    color: #7ec8ff;
    text-decoration: underline;
}

#modelCredits .credit-link:hover {
    color: #ffffff;
}

@keyframes fadeOut {
    0% { opacity: 1; }
    70% { opacity: 1; }
    100% { opacity: 0; }
}

/* Shared chrome for the floating control panels (#vjMenu, #audioMenu).
   These were previously two byte-identical rule sets under .vj-* / .audio-* names,
   which is how the two panels silently drifted apart. */
.panel {
    background: rgba(0, 0, 0, 0.9);
    padding: 15px;
    border-radius: 12px;
    -webkit-backdrop-filter: var(--blur-light);
    backdrop-filter: var(--blur-light);
    /* Above the toggle buttons (101) and the credits link (100). On a phone a full-width panel otherwise sat under the
       Multiplayer toggle, which covered its close button; every panel has its own close, so covering the toggles is safe. */
    z-index: 102;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: white;
    box-shadow: var(--shadow-lg);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: opacity var(--transition-normal);
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.panel.minimized .panel-header {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.panel-title {
    margin: 0;
    font-size: 16px;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 8px;
}

.panel-header-actions {
    display: flex;
    gap: 8px;
}

/* 44px: the practical minimum for a Quest raycast pointer, which jitters far more
   than a mouse. Mis-hitting "close" loses all panel state. */
.panel-btn-icon {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.14);
    color: white;
    width: 44px;
    height: 44px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 18px;
    transition: background var(--transition-fast), transform var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
}

.panel-btn-icon:hover {
    background: rgba(255, 255, 255, 0.22);
    transform: scale(1.08);
}

/* VJ Control Menu */
#vjMenu {
    position: absolute;
    top: 70px;
    left: 20px;
    /* A definite width so a long line (the room-guest note) wraps instead of widening the panel. */
    width: 480px;
    min-width: 280px;
    max-width: calc(100vw - 40px);
    /* Without these the panel is ~950px tall, is clipped by `body { overflow: hidden }`
       on every laptop/phone/Quest viewport, and offers no scrollbar - which put the
       accessibility section permanently out of reach. It also ends above the credits link. */
    max-height: calc(100dvh - 120px);
    overflow-y: auto;
    overscroll-behavior: contain;
}

#vjMenu.minimized {
    padding: 8px 12px;
    width: auto;
    min-width: auto;
    max-height: none;
    overflow: visible;
}

#vjMenu.minimized .vj-content {
    display: none;
}

#vjMenu.hidden {
    display: none;
}

.vj-section {
    margin-bottom: 15px;
}

.vj-section:last-child {
    margin-bottom: 0;
}

.vj-section-title {
    font-size: 12px;
    text-transform: uppercase;
    opacity: 0.9;
    margin-bottom: 8px;
    letter-spacing: 0.5px;
}

.vj-button-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

/* One plain sentence under a section title: what this group of controls is for. */
.vj-help {
    margin: -2px 0 8px;
    font-size: 12px;
    line-height: 1.4;
    opacity: 0.75;
}

.vj-button {
    background: rgba(102, 126, 234, 0.3);
    border: 1px solid rgba(102, 126, 234, 0.5);
    color: white;
    min-height: 44px;
    padding: 12px 8px;
    font-size: 11px;
    border-radius: 6px;
    cursor: pointer;
    transition: transform var(--transition-fast), background var(--transition-fast);
    text-align: center;
    font-weight: 500;
}

.vj-button-wide {
    width: 100%;
    margin-top: 8px;
}

.vj-button:hover {
    background: rgba(102, 126, 234, 0.5);
    border-color: rgba(102, 126, 234, 0.8);
    transform: translateY(-2px);
}

.vj-button:active {
    transform: translateY(0);
}

/* WCAG 1.4.1 Use of Colour: on/off previously differed only by the alpha of one hue,
   which is indistinguishable in greyscale, under deuteranopia, or on a dimmed HMD.
   The corner marker and the heavier border carry the state without relying on colour.
   Deliberately drawn with a gradient rather than `content: '●'`: generated text content
   IS exposed to the accessibility tree, and a screen reader would announce a bullet
   before every active label. `aria-pressed` carries the state for assistive tech. */
.vj-button.active {
    background:
        linear-gradient(135deg, #ffffff 0 10px, transparent 10px) top left / 14px 14px no-repeat,
        rgba(102, 126, 234, 0.85);
    border-color: #ffffff;
    border-width: 2px;
    padding: 11px 7px;
}

.vj-slider-container {
    margin-top: 8px;
}

.vj-slider {
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.2);
    outline: none;
    -webkit-appearance: none;
    appearance: none; /* Standard property for compatibility */
}

.vj-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #667eea;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.vj-slider::-moz-range-thumb {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #667eea;
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.vj-slider-label {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    opacity: 0.88;
    margin-top: 4px;
}

.vj-slider-label-secondary {
    margin-top: 6px;
    opacity: 0.9;
}

#vjToggle {
    position: absolute;
    top: 20px;
    left: 20px;
    background: rgba(0, 0, 0, 0.8);
    border: none;
    color: white;
    padding: 12px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    z-index: 101;
    -webkit-backdrop-filter: var(--blur-light);
    backdrop-filter: var(--blur-light);
    transition: background var(--transition-fast), transform var(--transition-fast);
}

#vjToggle:hover {
    background: var(--accent);
    transform: scale(1.05);
}

/* Multiplayer toggle - sits below #vrButton so neither overlaps in the top-right
   corner (#vrButton is top:20px there). */
#networkToggle {
    position: absolute;
    top: 76px;
    right: calc(20px + env(safe-area-inset-right, 0px));
    background: rgba(0, 0, 0, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.14);
    color: white;
    min-width: 44px;
    min-height: 44px;
    padding: 12px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    z-index: 101;
    -webkit-backdrop-filter: var(--blur-light);
    backdrop-filter: var(--blur-light);
    transition: background var(--transition-fast), transform var(--transition-fast);
}

#networkToggle:hover {
    background: var(--accent);
    transform: scale(1.05);
}

#networkMenu {
    position: absolute;
    top: 130px;
    right: calc(20px + env(safe-area-inset-right, 0px));
    /* Definite width: its help text and safety note are long, and sized to content the panel spread across the screen. */
    width: 380px;
    min-width: 320px;
    max-width: calc(100vw - 40px);
    /* The panel keeps inside the window and its content scrolls under the header. */
    max-height: calc(100dvh - 150px);
    display: flex;
    flex-direction: column;
}

#networkMenu.minimized {
    padding: 8px 12px;
    width: auto;
    min-width: auto;
}

#networkMenu.minimized .audio-content {
    display: none;
}

#networkMenu.hidden {
    display: none;
}

#networkEmojiGrid {
    grid-template-columns: repeat(4, 1fr);
}

#networkEmojiGrid .vj-button {
    font-size: 22px;
    padding: 8px;
}

#networkMenu .audio-content {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
}

/* Anyone / Women / Men on one row. */
#networkAvatarPool .audio-podcasts {
    grid-template-columns: repeat(3, 1fr);
}

/* Explanations in the Multiplayer panel: wrapped, unlike the one-line .audio-file-name status lines. */
.network-help {
    font-size: 12px;
    line-height: 1.4;
    opacity: 0.8;
    margin: 6px 0 8px;
}

.network-people {
    list-style: none;
    margin: 6px 0 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.network-audience {
    border: 1px solid #40505d;
    border-radius: 8px;
    margin: 8px 0;
    padding: 8px;
    min-width: 0;
}
.network-audience legend { font-weight: 600; }
.network-audience .vj-button { margin: 2px 4px 2px 0; }
.network-audience .vj-button[aria-pressed="true"] { border-color: #8fffee; color: #8fffee; }
.network-audience-list { display: grid; gap: 8px; max-height: 160px; overflow-y: auto; }
.network-audience-list[hidden] { display: none; }
.network-audience-list label { display: flex; gap: 8px; align-items: center; overflow-wrap: anywhere; }

.network-person {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
}

.network-person-name {
    flex: 1 1 100%;
    font-size: 13px;
    overflow-wrap: anywhere;
}

.network-person-btn {
    flex: 1 1 auto;
    min-height: 36px;
    padding: 6px 10px;
}

#networkMoreRooms[hidden] { display: none; }

/* Kick and ban cannot be undone by the host, so they read differently to the everyday buttons (not by colour alone: the
   label changes to "Sure?" once armed). */
.network-danger {
    background: rgba(220, 70, 90, 0.3);
    border-color: rgba(220, 70, 90, 0.7);
}

/* In someone else's room the host owns the music and the lights: those controls dim and say so (the note names the
   host), while a guest's own comfort controls stay normal. */
.room-guest-note {
    padding: 8px 10px;
    margin-bottom: 10px;
    border: 1px solid rgba(143, 255, 238, 0.45);
    border-radius: 8px;
    background: rgba(143, 255, 238, 0.1);
    font-size: 13px;
    line-height: 1.35;
}

.room-guest-locked .host-owned {
    opacity: 0.45;
    cursor: not-allowed;
}

/* An unavailable control looks unavailable: no hover lift, a dimmed face and a not-allowed cursor. */
.vj-button:disabled,
.audio-button:disabled,
.audio-podcast-choice:disabled {
    opacity: 0.45;
    cursor: not-allowed;
    transform: none;
}

.vj-button:disabled:hover,
.audio-button:disabled:hover {
    transform: none;
}

/* ---- Multiplayer panel: a form a first-time visitor can read top to bottom ---- */
.network-field {
    display: block;
    margin: 8px 0 4px;
    font-size: 13px;
    font-weight: 600;
}

#networkMenu .audio-input {
    width: 100%;
    box-sizing: border-box;
}

.network-primary {
    width: 100%;
    justify-content: center;
    margin-top: 10px;
    padding: 12px 20px;
    font-size: 15px;
    font-weight: 700;
}

#networkMenu .audio-button {
    width: 100%;
    justify-content: center;
    margin-top: 8px;
}

/* Leaving the room ends the conversation: red, so it is not pressed by mistake for "invite". */
#networkMenu .audio-button.network-danger {
    background: rgba(200, 55, 75, 0.85);
}

#networkMenu .audio-button.network-danger:hover {
    background: rgba(220, 70, 90, 1);
}

.network-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.network-wide {
    width: 100%;
    margin-top: 8px;
    font-size: 12px;
}

#networkGestureGrid {
    margin-top: 8px;
}

.network-advanced {
    margin-top: 12px;
    font-size: 12px;
    opacity: 0.85;
}

.network-advanced summary {
    cursor: pointer;
    padding: 4px 0;
}

#networkMenu kbd {
    padding: 1px 6px;
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 4px;
    font-family: inherit;
    font-size: 11px;
}

/* ---- The social bar: talk, react, type, one press away while in a room ---- */
.social-bar {
    position: absolute;
    left: 50%;
    bottom: calc(80px + env(safe-area-inset-bottom, 0px));
    transform: translateX(-50%);
    z-index: 101;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: white;
    width: max-content;
    max-width: calc(100vw - 24px);
}

.social-bar[hidden],
.social-pop[hidden],
.social-peek[hidden],
.social-badge[hidden] {
    display: none;
}

.social-buttons {
    display: flex;
    gap: 8px;
    padding: 6px;
    background: rgba(10, 10, 20, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 14px;
    -webkit-backdrop-filter: var(--blur-light);
    backdrop-filter: var(--blur-light);
    box-shadow: var(--shadow-md);
}

.social-btn {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    min-width: 72px;
    min-height: 56px;
    padding: 6px 10px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.08);
    color: white;
    cursor: pointer;
    font: inherit;
}

.social-btn:hover {
    background: rgba(102, 126, 234, 0.45);
}

.social-btn.active {
    background: rgba(102, 126, 234, 0.85);
    border-color: #ffffff;
}

/* The microphone, while live, is unmistakable: red, so nobody talks into a room without knowing it. */
#socialMic.active {
    background: rgba(220, 60, 80, 0.9);
    border-color: #ffd0d6;
}

.social-icon {
    font-size: 22px;
    line-height: 1;
}

.social-label {
    font-size: 12px;
    font-weight: 600;
}

.social-badge {
    position: absolute;
    top: -6px;
    right: -6px;
    min-width: 20px;
    height: 20px;
    padding: 0 5px;
    border-radius: 10px;
    background: #ff3b5c;
    font-size: 12px;
    font-weight: 700;
    line-height: 20px;
    box-sizing: border-box;
}

.social-pop {
    width: min(360px, calc(100vw - 24px));
    box-sizing: border-box;
    padding: 12px;
    background: rgba(0, 0, 0, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
}

.social-pop-title {
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 8px;
}

.social-emoji-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
}

.social-emoji-row button {
    min-height: 48px;
    font-size: 26px;
    border-radius: 8px;
    border: 1px solid rgba(102, 126, 234, 0.5);
    background: rgba(102, 126, 234, 0.25);
    cursor: pointer;
}

.social-emoji-row button:hover {
    background: rgba(102, 126, 234, 0.55);
}

.social-gesture-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
    margin-top: 8px;
}

.social-gesture-row button {
    min-height: 40px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.08);
    color: white;
    font: inherit;
    font-size: 13px;
    cursor: pointer;
}

.social-gesture-row button.active {
    background: rgba(102, 126, 234, 0.85);
    border-color: #ffffff;
}

#socialChatBox {
    max-height: calc(100dvh - 110px);
    overflow-y: auto;
}

.social-chat-log {
    list-style: none;
    margin: 0 0 8px;
    padding: 0;
    max-height: 180px;
    overflow-y: auto;
    font-size: 13px;
    line-height: 1.4;
}

.social-chat-log li {
    padding: 3px 0;
    overflow-wrap: anywhere;
}

.social-chat-self strong {
    color: #8fffee;
}

.social-chat-empty {
    opacity: 0.7;
}

.social-chat-form {
    display: flex;
    gap: 8px;
}

.social-chat-form .audio-input {
    flex: 1;
}

.social-peek {
    max-width: min(360px, calc(100vw - 24px));
    padding: 8px 12px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.92);
    color: #111111;
    font-size: 13px;
    overflow-wrap: anywhere;
    box-shadow: var(--shadow-md);
}

/* Audio Upload Menu */
#audioMenu {
    position: absolute;
    bottom: calc(76px + env(safe-area-inset-bottom, 0px));
    right: calc(20px + env(safe-area-inset-right, 0px));
    width: 340px;
    min-width: 320px;
    max-width: calc(100vw - 40px);
    max-height: calc(100dvh - 150px);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

#audioMenu .panel-header {
    flex-shrink: 0;
}

#audioMenu .audio-content {
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
}

#audioMenu.minimized {
    padding: 8px 12px;
    width: auto;
    min-width: auto;
}

#audioMenu.minimized .audio-content {
    display: none;
}

#audioMenu.hidden {
    display: none;
}

.audio-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.audio-title {
    margin: 0;
    font-size: 16px;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 8px;
}

.audio-controls {
    display: flex;
    gap: 8px;
}

.audio-section {
    margin-bottom: 12px;
}

.audio-section:last-child {
    margin-bottom: 0;
}

.audio-input-group {
    display: flex;
    gap: 8px;
    margin-bottom: 8px;
}

.audio-input {
    flex: 1;
    /* An input's default minimum width comes from its size attribute; two in a row overflowed a 380 px panel. */
    min-width: 0;
    padding: 10px 12px;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.1);
    color: white;
    font-size: 13px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.audio-input::placeholder {
    color: rgba(255, 255, 255, 0.75);
}

.audio-input:focus {
    outline: none;
    border-color: #667eea;
    background: rgba(255, 255, 255, 0.15);
}

.audio-button {
    background: var(--accent);
    border: none;
    color: white;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    transition: background var(--transition-fast), transform var(--transition-fast);
    display: flex;
    align-items: center;
    gap: 6px;
}

.audio-button:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
}

.audio-button:active {
    transform: translateY(0);
}

.audio-podcast-button {
    width: 100%;
    justify-content: center;
}

.audio-podcast-button:disabled {
    opacity: 0.6;
    cursor: progress;
    transform: none;
}

/* Podcast choice (Hernan Cattaneo / Miss Melera): two exclusive buttons, the chosen one lit. */
.audio-podcasts {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-bottom: 8px;
}

.audio-podcast-choice {
    min-height: 40px;
    padding: 8px 10px;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.25);
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background var(--transition-fast), border-color var(--transition-fast);
}

.audio-podcast-choice:hover {
    background: rgba(255, 255, 255, 0.16);
}

.audio-podcast-choice[aria-checked="true"] {
    background: rgba(0, 255, 255, 0.2);
    border-color: #00ffff;
}

.audio-podcast-actions .audio-podcast-button {
    flex: 1;
    width: auto;
}

/* Position in the episode. */
.audio-seek[hidden] {
    display: none;
}

.audio-seek input[type="range"] {
    width: 100%;
}

.audio-seek-times {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-top: 6px;
    font-size: 12px;
    font-variant-numeric: tabular-nums;
    color: rgba(255, 255, 255, 0.9);
}

.audio-seek-skip {
    min-width: 52px;
    min-height: 32px;
    padding: 4px 8px;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.25);
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    font-size: 12px;
    cursor: pointer;
}

.audio-seek-skip:hover {
    background: rgba(255, 255, 255, 0.18);
}

.audio-file-upload {
    display: flex;
    align-items: center;
    gap: 8px;
}

.audio-file-label {
    background: rgba(102, 126, 234, 0.3);
    border: 1px solid rgba(102, 126, 234, 0.5);
    color: white;
    padding: 10px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s;
    text-align: center;
    flex: 1;
}

.audio-file-label:hover {
    background: rgba(102, 126, 234, 0.5);
    border-color: rgba(102, 126, 234, 0.8);
    transform: translateY(-2px);
}

/* Visually hidden, but still focusable and exposed to assistive tech.
   `display: none` removed it from the tab order entirely, so the "choose an audio
   file" control was unreachable by keyboard and screen-reader users. */
.audio-file-input {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
}

/* Make the associated label look focused when the hidden input has focus.
   The input is authored BEFORE the label in index.html specifically so that `+`
   matches - the previous `~ .audio-button` variant could never match because the
   button lives in a different .audio-section. */
.audio-file-input:focus-visible + label {
    outline: 3px solid #7aa2ff;
    outline-offset: 2px;
}

.audio-now-playing {
    font-size: 13px;
    padding: 8px 10px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    text-overflow: ellipsis;
    overflow: hidden;
    white-space: nowrap;
}

.audio-file-name {
    font-size: 12px;
    opacity: 0.9;
    margin-top: 4px;
    text-overflow: ellipsis;
    overflow: hidden;
    white-space: nowrap;
}

.soundcloud-player {
    margin-top: 8px;
}

.soundcloud-player iframe {
    display: block;
    width: 100%;
    height: 166px;
    border: 0;
    border-radius: 6px;
}

.audio-status {
    font-size: 12px;
    opacity: 0.95;
    padding: 6px 10px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.1);
    margin-top: 8px;
    text-align: center;
}

.audio-status.success {
    background: rgba(0, 255, 100, 0.2);
    color: #7dffb0;
}

.audio-status.error {
    background: rgba(255, 0, 0, 0.25);
    color: #ff9d9d;
}

/* The audio toggle used to share `bottom:20px; left:50%` with #cameraControls and
   was pushed clear of the viewport with `margin-bottom:-60px` to dodge the collision -
   leaving ~5px of a 45px button on screen. Anchored bottom-right instead: no overlap,
   no negative margin, and the app's primary "play my music" affordance is reachable. */
#audioToggle {
    position: absolute;
    bottom: calc(20px + env(safe-area-inset-bottom, 0px));
    right: calc(20px + env(safe-area-inset-right, 0px));
    background: rgba(0, 0, 0, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.14);
    color: white;
    min-width: 44px;
    min-height: 44px;
    padding: 12px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    z-index: 101;
    -webkit-backdrop-filter: var(--blur-light);
    backdrop-filter: var(--blur-light);
    transition: background var(--transition-fast), transform var(--transition-fast);
}

#audioToggle:hover {
    background: var(--accent);
    transform: scale(1.05);
}

/* Attention pulse: applied when the default stream fails so the user is pointed at
   the control that fixes it instead of being left in a silent club. */
#audioToggle.needs-attention {
    animation: attention-pulse 1.4s ease-in-out 4;
    border-color: rgba(255, 210, 90, 0.9);
}

@keyframes attention-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(255, 210, 90, 0.6); }
    50% { box-shadow: 0 0 0 10px rgba(255, 210, 90, 0); }
}

/* Splash Screen - Club Style */
#splashScreen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000000;
    /* Follow the visible viewport (mobile toolbars shrink it); the 100% above is the fallback. */
    height: 100dvh;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    align-items: center;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: white;
    transition: opacity 0.5s ease-out;
    /* Decorative filters and fixed animated layers can report compositor overflow even though
       their layout stays inside the viewport. Clip that here so they cannot summon a page
       scrollbar; the card below owns real scrolling when a short window cannot fit its content. */
    overflow: hidden;
    overscroll-behavior: contain;
    box-sizing: border-box;
    padding: max(12px, env(safe-area-inset-top, 0px)) max(12px, env(safe-area-inset-right, 0px))
        max(12px, env(safe-area-inset-bottom, 0px)) max(12px, env(safe-area-inset-left, 0px));
}

/* Animated background grid. Fixed, so it fills the viewport and does not scroll with the card. */
#splashScreen::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        linear-gradient(0deg, transparent 24%, rgba(255, 0, 255, 0.05) 25%, rgba(255, 0, 255, 0.05) 26%, transparent 27%, transparent 74%, rgba(255, 0, 255, 0.05) 75%, rgba(255, 0, 255, 0.05) 76%, transparent 77%, transparent),
        linear-gradient(90deg, transparent 24%, rgba(0, 255, 255, 0.05) 25%, rgba(0, 255, 255, 0.05) 26%, transparent 27%, transparent 74%, rgba(0, 255, 255, 0.05) 75%, rgba(0, 255, 255, 0.05) 76%, transparent 77%, transparent);
    background-size: 50px 50px;
    animation: gridMove 20s linear infinite;
    opacity: 0.3;
}

/* Animated gradient overlay */
#splashScreen::after {
    content: '';
    pointer-events: none;
    position: fixed;
    inset: 0;
    background:
        radial-gradient(circle, rgba(255,0,255,0.15) 0%, rgba(0,255,255,0.15) 25%,
            rgba(255,0,255,0.15) 50%, rgba(0,255,255,0.15) 75%, rgba(255,0,255,0.15) 100%);
    background-size: 160% 160%;
    animation: gradientDrift 15s ease-in-out infinite alternate;
}

@keyframes gridMove {
    0% { transform: perspective(500px) rotateX(60deg) translateY(0); }
    100% { transform: perspective(500px) rotateX(60deg) translateY(50px); }
}

/* Animate paint inside the viewport, not the overlay's box. Rotating the old 200%-sized box
   changed the splash scroll height throughout the cycle, making its scrollbar appear and vanish. */
@keyframes gradientDrift {
    0% { background-position: 0% 0%; }
    50% { background-position: 100% 35%; }
    100% { background-position: 35% 100%; }
}

#splashScreen.hidden {
    opacity: 0;
    pointer-events: none;
}

.splash-title {
    margin: 0 0 clamp(6px, 1.2vmin, 10px);
    position: relative;
    z-index: 2;
    line-height: 0;
}

/* The letters are tubing, not a typeface: stroke the wordmark's centrelines and leave the
   inside empty. The drop-shadows are the tube's halo, exactly as the in-club sign draws it. */
.splash-wordmark {
    display: block;
    width: min(100%, 560px);
    height: auto;
    overflow: visible;
}

.splash-wordmark path {
    fill: none;
    stroke: rgba(255, 255, 255, 0.95);
    stroke-width: 8.8;
    stroke-linecap: butt;
    stroke-linejoin: miter;
    filter:
        drop-shadow(0 0 6px rgba(255, 255, 255, 0.45))
        drop-shadow(0 0 20px rgba(205, 214, 232, 0.3))
        drop-shadow(0 0 48px rgba(164, 176, 200, 0.22));
}

.splash-subtitle {
    font-size: clamp(11px, 2.4vmin, 18px);
    opacity: 0.9;
    margin-bottom: clamp(14px, 4vmin, 40px);
    color: #00ffff;
    text-shadow: 0 0 10px rgba(0, 255, 255, 0.8);
    letter-spacing: clamp(1px, 0.4vmin, 3px);
    text-transform: uppercase;
    position: relative;
    z-index: 2;
    animation: textGlow 2s ease-in-out infinite;
}

@keyframes textGlow {
    0%, 100% { text-shadow: 0 0 10px rgba(0, 255, 255, 0.8); }
    50% { text-shadow: 0 0 20px rgba(0, 255, 255, 1), 0 0 30px rgba(255, 0, 255, 0.5); }
}

.splash-content {
    background: rgba(10, 10, 20, 0.8);
    padding: clamp(16px, 4.5vmin, 50px);
    border-radius: clamp(14px, 3vmin, 24px);
    -webkit-backdrop-filter: var(--blur-heavy);
    backdrop-filter: var(--blur-heavy);
    box-sizing: border-box;
    width: min(100%, 560px);
    margin: auto;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: var(--shadow-lg);
    position: relative;
    z-index: 2;
    /* `margin: auto` centres the card when it fits. In a genuinely short window the card remains
       viewport-sized and scrolls its own controls, while decorative splash overflow stays clipped. */
    max-height: 100%;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
}

.splash-button {
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: clamp(12px, 2.4vmin, 18px) clamp(24px, 9vmin, 60px);
    max-width: 100%;
    box-sizing: border-box;
    font-size: clamp(14px, 2.4vmin, 16px);
    font-weight: 700;
    border-radius: 12px;
    cursor: pointer;
    transition: background var(--transition-fast), transform var(--transition-fast);
    box-shadow: var(--shadow-md);
    margin-top: clamp(14px, 3.5vmin, 30px);
    text-transform: uppercase;
    letter-spacing: clamp(1px, 0.5vmin, 3px);
    position: relative;
    overflow: hidden;
}

.splash-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.6s ease;
}

.splash-button:hover::before {
    left: 100%;
}

.splash-button:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.4);
    transform: translateY(-2px);
}

.splash-button:active {
    transform: translateY(0);
}

/* Photosensitivity warning + safe-mode opt-in, shown before anything renders. */
.splash-warning {
    margin: clamp(12px, 3vmin, 24px) auto 12px;
    max-width: 420px;
    padding: 10px 14px;
    border: 1px solid rgba(255, 210, 90, 0.7);
    border-radius: 8px;
    background: rgba(255, 210, 90, 0.12);
    color: #ffe6a8;
    font-size: 13px;
    line-height: 1.5;
    text-align: left;
}

.splash-warning strong {
    display: block;
    margin-bottom: 2px;
}

.splash-toggle {
    display: block;
    width: 100%;
    max-width: 420px;
    margin: 0 auto clamp(10px, 2.4vmin, 24px);
    min-height: 44px;
    padding: 12px 16px;
    border-radius: 8px;
    border: 2px solid rgba(0, 255, 255, 0.4);
    background: rgba(0, 0, 0, 0.5);
    color: #ffffff;
    font-size: 14px;
    cursor: pointer;
    transition: background var(--transition-fast), border-color var(--transition-fast);
}

.splash-toggle[aria-pressed="true"] {
    background: rgba(0, 255, 255, 0.22);
    border-color: #00ffff;
}

/* A hint belongs to the control above it: keep them together, and space the pair from what follows. */
.splash-toggle:has(+ .splash-hint) {
    margin-bottom: 0;
}

.splash-toggle + .splash-hint {
    margin-top: 6px;
    margin-bottom: clamp(12px, 2.4vmin, 22px);
}

.splash-hint {
    margin-top: clamp(8px, 2vmin, 18px);
    font-size: 13px;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.85);
}

.splash-hint kbd {
    display: inline-block;
    min-width: 20px;
    margin: 0 1px;
    padding: 1px 5px;
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.08);
    font-family: inherit;
    font-size: 12px;
}

.splash-loading {
    display: none;
    margin-top: 20px;
    font-size: 14px;
    opacity: 0.8;
    color: #00ffff;
}

.splash-loading.visible {
    display: block;
}

.splash-progress {
    width: min(280px, 72vw);
    height: 6px;
    margin: 12px auto 0;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(0, 255, 255, 0.35);
}

.splash-progress-bar {
    width: 0;
    height: 100%;
    background: linear-gradient(90deg, #00ffff, #ff00ff);
    transition: width 240ms ease-out;
}

.splash-spinner {
    border: 3px solid rgba(0, 255, 255, 0.2);
    border-top: 3px solid #ff00ff;
    border-right: 3px solid #00ffff;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 10px auto;
    box-shadow: 0 0 20px rgba(255, 0, 255, 0.5);
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Floating particles in background */
.splash-particle {
    position: absolute;
    width: 3px;
    height: 3px;
    background: #ff00ff;
    border-radius: 50%;
    opacity: 0.6;
    box-shadow: 0 0 8px #ff00ff;
    animation: particleFloat 10s infinite;
    z-index: 1;
}

@keyframes particleFloat {
    0% {
        transform: translateY(100vh) translateX(0) scale(0);
        opacity: 0;
    }
    10% {
        opacity: 0.6;
    }
    90% {
        opacity: 0.6;
    }
    100% {
        transform: translateY(-100px) translateX(100px) scale(1);
        opacity: 0;
    }
}

/* Fix inline styles - move to CSS classes */
#canvas.hidden { display: none; }
#audioStatus.hidden { display: none; }
.vj-button[data-control="changeMirrorBallColor"] {
    grid-column: 1 / -1;
}

/* =============================================================================
   ACCESSIBILITY BASELINE
   ============================================================================= */

/* WCAG 2.4.7 Focus Visible.
   Every interactive control in this app previously relied on the UA default focus
   ring, which several rules cancelled with `outline: none` - leaving keyboard users
   with no visible focus indicator at all. This restores a high-contrast ring on
   keyboard focus only, so mouse/touch interaction stays visually unchanged. */
:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
    outline: 3px solid #7aa2ff;
    outline-offset: 2px;
    border-radius: 4px;
}

.sw-update-prompt {
    position: fixed;
    right: 16px;
    bottom: 16px;
    z-index: 10020;
    display: flex;
    align-items: center;
    gap: 12px;
    max-width: min(420px, calc(100vw - 32px));
    padding: 12px 14px;
    border: 1px solid rgba(122, 162, 255, 0.75);
    border-radius: 6px;
    background: rgba(10, 12, 18, 0.96);
    color: #fff;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.55);
    font-size: 14px;
}

.sw-update-prompt button {
    flex: 0 0 auto;
    padding: 8px 12px;
    border: 1px solid #7aa2ff;
    border-radius: 4px;
    background: #244a86;
    color: #fff;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}

.sw-update-prompt button:disabled {
    cursor: wait;
    opacity: 0.72;
}

/* Touch/press feedback. Hover states do nothing on a Quest controller or a phone. */
button:active,
.vj-button:active,
.audio-button:active,
.splash-button:active,
.preset-grid button:active {
    transform: scale(0.97);
}

/* Respect the OS "reduce motion" setting (WCAG 2.3.3 / vestibular safety).
   This is doubly important here: the splash screen animates continuously and the
   audience for this app is wearing a head-mounted display. */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }

    .splash-particle {
        display: none;
    }

    button:active,
    .vj-button:active,
    .audio-button:active,
    .splash-button:active,
    .preset-grid button:active {
        transform: none;
    }
}

/* Forced-colors / Windows High Contrast: keep panels and buttons distinguishable.
   The previous selectors were `.vj-panel, .audio-panel, #settingsPanel` - none of
   which exist in the document, so this block was a silent no-op. */
@media (forced-colors: active) {
    .panel,
    #cameraControls,
    #modelCredits,
    button {
        border: 1px solid ButtonBorder;
    }

    .vj-button.active {
        border: 2px solid Highlight;
    }
}

/* =============================================================================
   RESPONSIVE
   The stylesheet previously had zero width breakpoints, so on any phone (and in the
   Quest browser's default 2D panel) the panels overlapped each other, overflowed the
   viewport, and - because body sets `overflow: hidden` - could not be scrolled to.
   ============================================================================= */
@media (max-width: 720px) {
    #vjMenu,
    #audioMenu,
    #networkMenu {
        left: 8px;
        right: 8px;
        width: auto;
        min-width: 0;
        max-width: none;
        border-radius: 12px 12px 0 0;
    }

    #networkMenu {
        top: 64px;
        max-height: calc(100dvh - 76px);
    }

    #vjMenu {
        top: 64px;
        max-height: calc(100dvh - 76px);
    }

    #audioMenu {
        bottom: calc(72px + env(safe-area-inset-bottom, 0px));
        max-height: calc(100dvh - 150px);
    }

    .vj-button-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .preset-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    #modelCredits {
        max-width: 60vw;
        font-size: 11px;
    }

    .splash-content {
        padding: 20px 14px;
    }
}

/* A short window (a laptop with a toolbar, a phone in landscape): drop only the movement tips. The
   warning, the toggles, ENTER and the licence credits stay, and the card scrolls if it still does not fit. */
@media (max-height: 620px) {
    .splash-controls {
        display: none;
    }
}
/* Payment gate: desktop remains usable while immersive VR access is verified server-side. */
.payment-dialog {
    position: fixed;
    inset: 0;
    z-index: 10030;
    display: grid;
    place-items: center;
    padding: 1rem;
    overflow-y: auto;
    background: rgba(0, 0, 0, .82);
}
.payment-dialog[hidden] { display: none; }
.payment-card {
    width: min(28rem, 100%);
    display: grid;
    gap: .85rem;
    box-sizing: border-box;
    max-height: calc(100dvh - 2rem);
    overflow: hidden;
    padding: 1.5rem;
    border: 1px solid rgba(0, 255, 255, .45);
    border-radius: .75rem;
    background: #10131b;
    color: #f4f7ff;
    box-shadow: 0 1rem 4rem rgba(0, 0, 0, .55);
}
.payment-card h2, .payment-card p { margin: 0; }
.payment-card label { display: grid; gap: .5rem; }
.payment-card { grid-template-rows: auto auto minmax(0, 1fr); }
.payment-header { display: grid; gap: .5rem; }
.payment-content { overflow-y: auto; display: grid; gap: .85rem; }
.payment-content > *, .payment-content input { min-width: 0; }
.payment-keypad { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .4rem; }
.payment-keypad button { min-height: 48px; padding: .5rem; font-size: 1.05rem; }
.payment-content input[readonly] { text-align: center; font-size: 1.4rem; letter-spacing: .15em; }
.payment-card button { min-height: 44px; white-space: normal; }
.payment-devices { margin: 0; padding-left: 1.25rem; display: grid; gap: .75rem; }
.payment-devices li { overflow-wrap: anywhere; }
.payment-devices button { display: block; width: 100%; margin-top: .35rem; }
.payment-toggle {
    position: fixed;
    top: 132px;
    right: calc(20px + env(safe-area-inset-right, 0px));
    z-index: 101;
    min-height: 44px;
    max-width: 130px;
    padding: 7px 12px;
    border: 1px solid rgba(255, 255, 255, .2);
    border-radius: 6px;
    background: #23283b;
    color: white;
    cursor: pointer;
}
.payment-close {
    border: 0;
    background: transparent;
    color: #b5c4d9;
    cursor: pointer;
}
.payment-status { min-height: 1.25em; color: #9fe9d0; }
.payment-status.error { color: #ff9e9e; }
