/* ===========================
   One-Take — Core Styles (Lobby + Studio)
   r7.3.6 — tokens + light/dark + layout
   =========================== */

/* ----- Tokens: Dark (default) ----- */
:root {
    --bg: #0b0f14;
    --fg: #e6eef7;
    --muted: #a8b3c3;

    --brand: #ff6a00;
    /* One-Take orange */
    --accent: #3da1ff;
    /* supporting blue */

    --panel: #0f141b;
    --panel-border: #1e2937;
    --panel-hl: #101722;
    --panel-hl-border: #203047;

    --success: #22c55e;
    --warn: #ff6b6b;
    --error: #ff5454;

    --input-bg: #0f141b;
    --input-border: #233142;
    --input-fg: var(--fg);

    --btn-bg: #17202b;
    --btn-fg: var(--fg);
    --btn-border: #223043;

    --focus: #3da1ff66;
    --shadow: 0 6px 20px rgba(0, 0, 0, .35);
}

/* ----- Tokens: Light (used by Lobby) ----- */
html[data-theme="light"] {
    --bg: #f6f8fb;
    --fg: #0b0f14;
    --muted: #465163;

    --panel: #ffffff;
    --panel-border: #e5ecf4;
    --panel-hl: #f3f7fb;
    --panel-hl-border: #dbe6f2;

    --input-bg: #ffffff;
    --input-border: #ced9e6;
    --input-fg: #0b0f14;

    --btn-bg: #ffffff;
    --btn-fg: #0b0f14;
    --btn-border: #ced9e6;

    --shadow: 0 8px 30px rgba(16, 36, 94, .08);
}

/* ================= Base ================= */

* {
    box-sizing: border-box;
}

html,
body {
    height: 100%;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--fg);
    font: 14px/1.45 system-ui, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

a {
    color: var(--accent);
    text-decoration: none;
}

img {
    max-width: 100%;
    display: block;
}

.muted {
    color: var(--muted);
}

.grow {
    flex: 1;
}

/* ================= Shared Layout / Panels ================= */

.container {
    max-width: 1100px;
    margin: 24px auto;
    padding: 0 16px;
}

.panel {
    background: var(--panel);
    border: 1px solid var(--panel-border);
    border-radius: 12px;
    box-shadow: var(--shadow);
}

.section {
    padding: 16px;
}

.section+.section {
    border-top: 1px solid var(--panel-border);
}

/* Simple grid helper */
.row {
    display: grid;
    gap: 16px;
}

.row.cols-2 {
    grid-template-columns: 1fr 1fr;
}

@media (max-width: 860px) {
    .row.cols-2 {
        grid-template-columns: 1fr;
    }
}

/* ================= Inputs ================= */

.input,
.select {
    width: 100%;
    padding: 10px 12px;
    background: var(--input-bg);
    color: var(--input-fg);
    border: 1px solid var(--input-border);
    border-radius: 10px;
    outline: none;
}

.input:focus,
.select:focus {
    box-shadow: 0 0 0 3px var(--focus);
}

.label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
}

.field {
    display: grid;
    gap: 6px;
}

.form-error {
    color: var(--error);
    font-size: 12px;
    min-height: 1em;
}

/* Reset native button styling (Android/iOS/desktop) */
button {
    -webkit-appearance: none;
    appearance: none;
    background: none;
    background-image: none;
    border: none;
    border-radius: 0;
    color: inherit;
    font: inherit;
    padding: 0;
    margin: 0;
}

/* ================= Buttons ================= */

/* ----- Buttons (global) ----- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 14px;

    background: var(--btn-bg);
    color: var(--btn-fg);
    border: 1px solid var(--btn-border);
    border-radius: 10px;
    cursor: pointer;
    font-weight: 600;

    -webkit-appearance: none;
    appearance: none;

    transition:
        background 0.2s ease,
        color 0.2s ease,
        border-color 0.2s ease,
        box-shadow 0.2s ease;
    /* ⬆️ removed transform from the transition */
}

/* softer hover, no “jump” */
.btn:hover {
    filter: brightness(1.03);
    box-shadow: none;
}

/* keep a tiny press feedback but no size jump */
.btn:active {
    filter: brightness(0.97);
}

/* focus ring */
.btn:focus {
    box-shadow: 0 0 0 3px var(--focus);
    outline: none;
}

.btn:disabled {
    opacity: .5;
    cursor: not-allowed;
}

/* solid orange buttons: works for class="btn primary" AND class="btn btn-primary" */
.btn-primary,
.btn.primary {
    background: var(--brand);
    color: #ffffff;
    border: 1px solid #c85300;
}

.btn-primary:hover,
.btn.primary:hover {
    filter: brightness(1.05);
    box-shadow: 0 4px 14px rgba(255, 106, 0, 0.45);
}

/* danger */
.btn-danger {
    background: #2b1313;
    border-color: #5c2424;
    color: #ffb4b4;
}

/* ghost / texty */
.btn-ghost {
    background: transparent;
    border-color: transparent;
    color: var(--muted);
}

/* small variant */
.btn.sm {
    padding: 6px 10px;
    font-size: 12px;
    border-radius: 8px;
}

/* links that look like buttons: no underline */
a.btn,
[data-leave] {
    text-decoration: none;
}

/* toggle-style buttons used for Arm / Solo / Mute / Lock */
.btn-toggle.active {
    border-color: var(--brand);
    color: var(--brand);
    background: rgba(255, 106, 0, 0.12);
}

.btn-toggle.active:focus {
    box-shadow: 0 0 0 3px rgba(255, 106, 0, 0.45);
}

/* ===== Transport buttons (Studio) ===== */
/* SINGLE source of truth for .btn-transport — delete any earlier .btn-transport blocks */
.btn-transport {
    background: transparent;
    color: var(--brand);
    border: 1px solid var(--brand);
    padding: 2px 4px;
    /* mobile-friendly, also nice on desktop */
    box-shadow: none;
}

/* hover: soft orange highlight, no size pop */
.btn-transport:hover {
    background: rgba(255, 106, 0, 0.08);
    box-shadow: 0 0 0 1px rgba(255, 106, 0, 0.4);
}

/* focus ring for keyboard */
.btn-transport:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px #ff6a0040;
}

/* Talkback recording state */
#btnChatMic.is-recording {
    border-color: var(--warn);
    background: rgba(255, 107, 107, 0.18);
    box-shadow: 0 0 0 1px var(--warn);
    color: var(--fg);
}

#btnChatMic.is-recording::before {
    content: "● ";
    color: var(--warn);
    font-size: 0.9em;
}

/* Optional: make record feel “hotter” later if you want */
#btnRec.btn-transport {
    border-color: var(--brand);
}

/* Transport icons (if using SVG) */
.icon-transport {
    width: 22px;
    height: 22px;
    display: block;
    fill: var(--brand);
}

.ot-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

.ot-modal {
    background: var(--panel, #111827);
    border-radius: 8px;
    padding: 16px 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
    min-width: 260px;
    max-width: 360px;
}

.ot-modal-header {
    font-weight: 600;
    margin-bottom: 8px;
}

.ot-modal-body p {
    margin: 0 0 8px 0;
    font-size: 13px;
    color: var(--muted, #9ca3af);
}

.ot-input {
    width: 100%;
    padding: 6px 8px;
    border-radius: 4px;
    border: 1px solid var(--panelBorder, #374151);
    background: #020617;
    color: var(--fg, #e5e7eb);
}

.ot-modal-footer {
    margin-top: 12px;
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

/* Mobile tweak: keep the transport left-aligned & tight so Rec isn’t clipped */
@media (max-width: 600px) {
    .transport-bar {
        justify-content: flex-start;
        padding-inline: 8px 4px;
        gap: 6px;
    }

    .transport-bar .btn-transport {
        padding: 2px 4px;
        font-size: 18px;
        min-width: 0;
    }

    /* Mobile header: stack logo, room name, then Leave Room (centered) */
    @media (max-width: 600px) {
        header {
            flex-direction: column;
            /* stack vertically */
            align-items: center;
            /* center everything */
            gap: 4px;
            text-align: center;
        }

        header .spacer {
            display: none;
            /* no flex pushing needed in column mode */
        }

        header .ot-logo {
            height: 20px;
            /* a bit smaller on mobile */
        }

        header h1#roomName {
            font-size: 16px;
        }

        header [data-leave] {
            font-size: 16px;
            padding: 4px 10px;
            border-radius: 999px;
            align-self: center;
            /* explicitly center the pill */
        }
    }
}

/* ================= Topbar (shared) ================= */

.topbar {
    display: flex;
    align-items: center;
    gap: 10px;
    border-bottom: 1px solid var(--panel-border);
    background: var(--panel);
}

#currentUserName {
    display: inline-flex;
    align-items: center;
    margin-top: 15px;
    line-height: 1;

    /* tiny optical nudge if it still feels high/low */
}

.ot-logo {
    height: 22px;
    width: auto;
    display: block;
}

/* ================= Generic Modal (shared) ================= */

.modal {
    position: fixed;
    inset: 0;
    display: none;
    place-items: center;
    background: rgba(0, 0, 0, .35);
    z-index: 50;
    padding: 20px;
}

.modal[open] {
    display: grid;
}

/* generic card-style modal */
.modal-card {
    width: 100%;
    max-width: 460px;
    background: var(--panel);
    border: 1px solid var(--panel-border);
    border-radius: 14px;
    box-shadow: var(--shadow);
    overflow: hidden;
}

.modal-head {
    padding: 14px 16px;
    border-bottom: 1px solid var(--panel-border);
    font-weight: 700;
}

.modal-body {
    padding: 16px;
    display: grid;
    gap: 12px;
}

.modal-foot {
    padding: 12px 16px;
    border-top: 1px solid var(--panel-border);
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

/* lobby-specific dialog variant */
.dialog {
    background: var(--panel);
    padding: 20px;
    border-radius: 16px;
    box-shadow: var(--shadow);
    width: min(90%, 400px);
    display: grid;
    gap: 14px;
    border: 1px solid var(--panel-border);
}

.dialog h3 {
    margin: 0;
}

.dialog .field {
    display: grid;
    gap: 6px;
}

.dialog input {
    padding: 10px;
    border: 1px solid var(--panel-border);
    border-radius: 10px;
}

/* Modal buttons row */
.dialog .row {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}

/* ================= Toasts ================= */

.toast-wrap {
    position: fixed;
    right: 16px;
    bottom: 16px;
    display: grid;
    gap: 8px;
    z-index: 60;
}

.toast {
    padding: 10px 12px;
    background: var(--panel);
    border: 1px solid var(--panel-border);
    color: var(--fg);
    border-radius: 10px;
    box-shadow: var(--shadow);
    animation: toast-in .2s ease-out;
}

.toast.ok {
    border-color: #1d7f3f;
}

.toast.warn {
    border-color: #b38b00;
}

.toast.err {
    border-color: #993232;
}

@keyframes toast-in {
    from {
        opacity: 0;
        transform: translateY(6px);
    }

    to {
        opacity: 1;
        transform: none;
    }
}

/* ================= Utility ================= */

.hidden {
    display: none !important;
}

.admin-toggle {
    margin: 0;
    padding: 0 0 8px;
    text-align: right;
}

.link-button {
    border: 0;
    background: none;
    padding: 0;
    margin: 0;
    cursor: pointer;
    color: var(--brand);
    font: inherit;
}

/* generic footer */
footer {
    text-align: center;
    color: var(--muted);
    font-size: 13px;
    padding: 16px 0 8px;
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
    * {
        transition: none !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
    }
}

/* =========================================================
   LOBBY ONLY
   ========================================================= */

body.lobby {
    /* light theme already set at <html data-theme="light"> */
    background: var(--bg);
}

/* hero */
.hero {
    text-align: center;
    padding: 40px 0 20px;
}

.hero img {
    width: 180px;
    margin: 0 auto 16px;
}

.hero h1 {
    font-size: clamp(26px, 4vw, 40px);
    margin: 0;
    font-weight: 800;
}

.hero p {
    color: var(--muted);
    margin: 4px 0 0;
}

/* rooms grid */
.rooms {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

/* room cards */
.card {
    background: var(--panel);
    border: 1px solid var(--panel-border);
    border-radius: 16px;
    padding: 18px;
    box-shadow: var(--shadow);
    transition:
        transform 0.15s ease,
        box-shadow 0.2s ease,
        border-color 0.2s ease;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, .16);
    border-color: var(--brand);
}

.card-header {
    display: flex;
    align-items: center;
    gap: 10px;
}

.room-icon {
    font-size: 22px;
}

.room-title {
    font-weight: 700;
    font-size: 16px;
}

.room-meta {
    font-size: 13px;
    color: var(--muted);
}

/* status pills */
.status {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    margin-top: 4px;
}

.dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--muted);
}

.status.open {
    color: #2ecc71;
}

.status.open .dot {
    background: #2ecc71;
}

.status.locked {
    color: #a0a0a0;
}

.status.locked .dot {
    background: #a0a0a0;
}

/* Lobby CTA desktop */
.cta-wrap {
    text-align: center;
    margin: 30px 0 10px;
}

.cta {
    border: 2px dashed var(--brand);
    color: var(--brand);
    background: transparent;
    font-weight: 700;
    border-radius: 999px;
    padding: 12px 20px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.cta:hover {
    border-style: solid;
    background: var(--brand);
    color: #fff;
    box-shadow: 0 4px 14px rgba(255, 106, 0, .4);
}

/* Mobile floating CTA */
.cta-mobile {
    position: fixed;
    left: 50%;
    transform: translateX(-50%);
    bottom: max(16px, env(safe-area-inset-bottom));
    z-index: 50;
    display: none !important;
}

.cta-mobile .cta {
    border-style: solid;
    box-shadow: 0 8px 24px rgba(255, 106, 0, .4);
    padding: 14px 22px;
}

@media (max-width: 680px) {
    .cta-wrap {
        display: none !important;
    }

    .cta-mobile {
        display: block !important;
    }
}

/* =========================================================
   STUDIO ONLY
   ========================================================= */

body.studio-layout {
    display: grid;
    grid-template-rows: auto 1fr auto;
    min-height: 100vh;
}

/* header bar for studio */
body.studio-layout header {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--panel);
    border-bottom: 1px solid var(--panel-border);
    padding: 10px 18px;
}

body.studio-layout header img {
    width: 130px;
    height: auto;
}

body.studio-layout header h1 {
    font-size: 18px;
    margin: 0;
    font-weight: 700;
}

/* main 3-column layout */
body.studio-layout main {
    display: grid;
    grid-template-columns: 320px 1fr 320px;
    grid-template-areas: "left center right";
    gap: 12px;
    padding: 14px;
    background: var(--bg);
}

aside.left {
    grid-area: left;
}

section.center {
    grid-area: center;
}

aside.right {
    grid-area: right;
}

@media (max-width: 1100px) {
    body.studio-layout main {
        grid-template-columns: 1fr;
        grid-template-areas:
            "center"
            "left"
            "right";
    }
}

/* side panels */
aside.left,
section.center,
aside.right {
    background: var(--panel);
    border: 1px solid var(--panel-border);
    border-radius: 10px;
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* section headings (left/right rail) */
aside.left h2,
aside.right h2 {
    font-size: 14px;
    margin: 0;
    padding: 10px;
    background: rgba(255, 255, 255, .05);
    border-bottom: 1px solid var(--panel-border);
    color: var(--brand);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
}

aside.left h2:hover,
aside.right h2:hover {
    background: rgba(255, 106, 0, .08);
}

/* caret for collapsible headings */
.caret {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-right: 2px solid var(--brand);
    border-bottom: 2px solid var(--brand);
    transform: rotate(45deg);
    transition: transform .2s ease;
}

h2.open .caret {
    transform: rotate(225deg);
}

/* inner subtitles */
.subtitle {
    font-weight: 700;
    margin: 0 0 8px 0;
    color: var(--fg);
    padding-bottom: 6px;
    border-bottom: 1px solid rgba(255, 255, 255, .08);
}

/* details block wrapper */
details.block {
    padding: 10px;
    border-bottom: 1px solid var(--panel-border);
}

details.block>summary {
    display: none;
}

/* grid + fields */
.grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-top: 8px;
}

.field {
    display: grid;
    gap: 6px;
    font-size: 13px;
}

/* studio inputs override */
.input,
select,
.number {
    width: 100%;
    padding: 8px 10px;
    border-radius: 8px;
}

/* rows */
.row.flex,
.row.between {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.row.between {
    justify-content: space-between;
    align-items: center;
}

/* access lock pill */
.lock {
    display: inline-block;
    margin-left: 8px;
    padding: 2px 6px;
    border: 1px solid var(--panel-border);
    border-radius: 6px;
    font-size: 11px;
    color: var(--muted);
}

.lock.ok {
    color: #12d47a;
    border-color: #12d47a;
}

/* input level + VU */
.level-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
}

.level {
    appearance: none;
    width: 100%;
    height: 6px;
    background: #222;
    border-radius: 4px;
    outline: none;
}

.level::-webkit-slider-thumb {
    appearance: none;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--brand);
}

.vu {
    display: flex;
    gap: 2px;
    align-items: flex-end;
    height: 14px;
}

.vu div {
    width: 4px;
    height: 10px;
    background: #1f2a33;
    border-radius: 1px;
    transition: height .08s ease, background .08s ease;
}

.routing {
    font-size: 12px;
}

.info {
    font-size: 13px;
    font-weight: 600;
}

.routing strong {
    color: #fff;
}

/* timeline center area */
.timeline {
    flex: 1;
    padding: 8px;
    position: relative;
    display: grid;
    grid-template-rows: auto auto 1fr;
    /* measure, transport, then tracks filling space */
    gap: 8px;
}

/* measure ruler */
.measure {
    position: sticky;
    top: 0;
    height: 32px;
    border: 1px solid var(--panel-border);
    border-radius: 8px;
    overflow: hidden;
    background:
        repeating-linear-gradient(90deg, rgba(255, 255, 255, .08) 0, rgba(255, 255, 255, .08) 1px, transparent 1px, transparent 12px),
        repeating-linear-gradient(90deg, rgba(255, 106, 0, .25) 0, rgba(255, 106, 0, .25) 2px, transparent 2px, transparent 48px);
    background-position: var(--p1) var(--p2);
}

.measure.scrolling {
    animation: scrollBg linear infinite;
}

/* ===== Studio display-name modal (does NOT affect lobby) ===== */

.studio-layout #displayNameModal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    display: none;
    /* hidden by default */
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

.studio-layout #displayNameModal.hidden {
    display: none;
}

.studio-layout #displayNameModal:not(.hidden) {
    display: flex;
    /* show as centered flex when we remove .hidden */
}

.studio-layout #displayNameModal .modal {
    background: #0f141b;
    color: var(--fg);
    border-radius: 18px;
    padding: 24px 28px 20px;
    box-shadow: 0 22px 45px rgba(0, 0, 0, 0.7);
    max-width: 520px;
    width: 100%;
}

.studio-layout #displayNameModal .modal-title {
    font-size: 20px;
    font-weight: 600;
    margin: 0 0 8px;
}

.studio-layout #displayNameModal .modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 16px;
}

.studio-layout #displayNameModal .input {
    width: 100%;
}

/* ===== Studio: display-name modal (independent from lobby modal) ===== */

.display-modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 2100;
    background: rgba(2, 6, 23, 0.78);
    /* dark glass */
    display: flex;
    align-items: center;
    /* center vertically */
    justify-content: center;
    /* center horizontally */
}

.display-modal-backdrop.hidden {
    display: none;
}

.display-modal {
    width: 100%;
    max-width: 460px;
    background: #05080f;
    border-radius: 18px;
    padding: 24px 28px 22px;
    box-shadow:
        0 26px 80px rgba(0, 0, 0, 0.85),
        0 0 0 1px rgba(148, 163, 184, 0.18);
}

/* Title + body text inside the modal */
.display-modal .modal-title {
    margin: 0 0 6px;
    font-size: 20px;
    font-weight: 600;
}

.display-modal p {
    margin: 0 0 16px;
    font-size: 14px;
    color: var(--muted);
}

/* Input + buttons spacing */
.display-modal .input {
    width: 100%;
    margin-bottom: 16px;
}

.display-modal .modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

/* Slightly shrink on small screens */
@media (max-width: 640px) {
    .display-modal {
        max-width: 92vw;
        padding: 20px 18px 18px;
    }
}

@keyframes scrollBg {
    from {
        background-position-x: var(--p1), var(--p2);
    }

    to {
        background-position-x: calc(var(--p1) - 48px), calc(var(--p2) - 48px);
    }
}

.measure-labels {
    position: absolute;
    top: 4px;
    left: 10px;
    display: flex;
    gap: 46px;
    font-size: 10px;
    color: var(--muted);
    pointer-events: none;
}

.measure-labels.scrolling {
    animation: labelsScroll linear infinite;
}

@keyframes labelsScroll {
    from {
        transform: translateX(0);
    }

    to {
        transform: translateX(-48px);
    }
}

/* track list */
.tracks {
    display: flex;
    flex-direction: column;
    gap: 6px;
    background: linear-gradient(to bottom, #0b0f14 0%, #111923 100%);
    border: 1px solid var(--panel-border);
    border-radius: 8px;
    padding: 6px;
}

.track {
    display: grid;
    grid-template-columns: 1fr 80px;
    align-items: center;
    background: #1a2433;
    padding: 6px 8px;
    border-radius: 10px;
    transition: 0.15s;
    cursor: pointer;
}

.track .badge {
    cursor: pointer;
    /* S / M / L / A toggles */
}

.track:hover {
    background: #222f42;
}

.track .title {
    font-size: 13px;
}

/* badges & selection */
.track.selected {
    outline: 2px solid var(--brand);
}

.badge {
    margin-left: 6px;
    padding: 2px 6px;
    border: 1px solid var(--panel-border);
    border-radius: 8px;
    font-size: 11px;
    color: var(--muted);
}

.badge.on {
    border-color: var(--brand);
    color: #fff;
    background: rgba(255, 106, 0, .15);
}

.chip {
    font-size: 11px;
    color: #fff;
    background: rgba(255, 106, 0, .15);
    border: 1px solid var(--brand);
    padding: 4px 8px;
    border-radius: 999px;
    display: inline-block;
}

.marks {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    height: 14px;
}

.recbar {
    width: 0;
    height: 4px;
    background: var(--brand);
    border-radius: 2px;
    opacity: 0;
    transition: all .2s;
}

.recbar.on {
    width: 64px;
    opacity: 1;
}

/* right rail participants list */
.participants {
    list-style: none;
    margin: 0;
    padding: 0;
}

.participants li {
    padding: 8px 6px;
    border-bottom: 1px solid var(--panel-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
}

/* transport bar */
.transport-bar {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    padding: 12px 18px;
    border-top: 1px solid var(--panel-border);
    background: rgba(255, 255, 255, .05);
}

/* Hero logo – keep it centered but not huge */
.hero .ot-logo {
    height: 64px;
    /* was width-based; this trims the big white band */
    width: auto;
    margin: 0 auto 16px;
    object-fit: contain;
    /* just in case */
}

/* Base card – a touch more definition */
.card {
    background: var(--panel);
    border-radius: 18px;
    padding: 18px 20px;
    border: 1px solid rgba(0, 0, 0, 0.04);
    /* a bit stronger than 0.03 */
    box-shadow: 0 10px 30px rgba(15, 30, 60, 0.08);
    transition:
        transform 0.15s ease,
        box-shadow 0.2s ease,
        border-color 0.2s ease,
        background-color 0.2s ease;
}

/* Hover state – clearer focus ring */
.card:hover {
    transform: translateY(-3px);
    box-shadow: 0 14px 40px rgba(15, 30, 60, 0.16);
    border-color: var(--brand);
    /* orange focus ring */
    background-color: var(--panel-hl);
    /* subtle lift */
}

/* --- Chat --- */
.chat-box {
    max-height: 180px;
    min-height: 80px;
    padding: 8px 10px;
    margin-bottom: 8px;
    border-radius: 8px;
    border: 1px solid var(--panel-border);
    background: var(--panel-hl);
    font-size: 13px;
    overflow-y: auto;
}

.chatline {
    padding: 2px 0;
}

.chatline .muted {
    font-size: 11px;
    margin-right: 6px;
}

.chat-input {
    resize: none;
}

.chat-meta {
    margin-top: 6px;
    align-items: center;
}

/* ===== Button sizing: base + primary (shared lobby/studio) ===== */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 18px;
    /* <– adjust this if they still feel tall */
    border-radius: 12px;
    border: 1px solid transparent;
    font-size: 14px;
    line-height: 1.1;
}

/* Primary buttons: Join, Leave Room, Save, etc. */
.btn.primary,
.btn.btn-primary {
    background: var(--brand);
    color: #fff;
    font-weight: 600;
}

/* Small buttons (modals, little actions) */
.btn.sm {
    padding: 6px 14px;
    font-size: 13px;
}