/* Modern Neon Craft styling with classic CSS 2.1 compatibility fallback for #browserError. */
:root {
    --bg: #0c1b22;
    --panel: #12262f;
    --panel-soft: rgba(12, 27, 34, 0.82);
    --border: #2c4c57;
    --accent: #38f2cf;
    --accent-2: #a8ff78;
    --danger: #f57a6c;
    --text: #eefaf7;
    --muted: #93b5b5;
}
* { box-sizing: border-box; }
html, body { margin: 0; width: 100%; height: 100%; overflow: hidden; }
body {
    background: var(--bg);
    color: var(--text);
    font-family: system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
    display: flex;
    flex-direction: column;
    height: 100dvh;
    user-select: none;
}
button, a, input { -webkit-tap-highlight-color: transparent; }
button, a { touch-action: manipulation; }
button {
    font: inherit;
    color: inherit;
    cursor: pointer;
    border: 1px solid var(--border);
    background: #1b3640;
    border-radius: 10px;
}
button:active { transform: scale(0.96); }
button:focus-visible, a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
button:disabled { opacity: 0.38; cursor: default; transform: none; }

/* Header */
header {
    flex-shrink: 0;
    padding: calc(10px + env(safe-area-inset-top)) 14px 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid #24404a;
    background: var(--bg);
}
.brand { display: flex; gap: 9px; align-items: center; font-size: 16px; letter-spacing: 2px; }
.brand b { color: var(--accent); }
.brand-icon { font-size: 26px; color: var(--accent); text-shadow: 0 0 12px rgba(56, 242, 207, 0.45); }
.brand small { display: block; font-size: 8px; letter-spacing: 1.2px; color: var(--muted); margin-top: 2px; }
.header-actions { display: flex; gap: 8px; align-items: center; }
#options, #chat-toggle {
    font-size: 13px;
    padding: 8px 12px;
    border-radius: 18px;
    background: rgba(18, 38, 47, 0.86);
    border-color: #36606b;
    white-space: nowrap;
}
#chat-toggle.has-unread { border-color: var(--accent); box-shadow: 0 0 0 2px rgba(56, 242, 207, 0.35); }

/* 3D World Viewport */
#world {
    position: relative;
    flex: 1;
    min-height: 120px;
    overflow: hidden;
    background: #6eb7d8;
    touch-action: none;
}
#world canvas { display: block; width: 100%; height: 100%; }
#underwater-tint, #hurt-tint {
    position: absolute;
    inset: 0;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.14s ease;
    z-index: 1;
}
#underwater-tint { background: radial-gradient(circle, rgba(24, 128, 168, 0.28), rgba(10, 58, 86, 0.62)); }
#underwater-tint.active { opacity: 1; }
#hurt-tint { background: radial-gradient(circle, transparent 45%, rgba(232, 48, 48, 0.55)); }

.world-meta {
    position: absolute;
    z-index: 2;
    top: 10px;
    left: 12px;
    right: 12px;
    display: flex;
    gap: 6px;
    justify-content: flex-end;
    flex-wrap: wrap;
    pointer-events: none;
}
.world-meta span {
    background: rgba(10, 24, 31, 0.78);
    border: 1px solid rgba(56, 242, 207, 0.22);
    color: #e2faf5;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.6px;
    padding: 5px 9px;
    border-radius: 14px;
}

/* Survival Vitals */
#vitals {
    position: absolute;
    z-index: 2;
    top: 10px;
    left: 12px;
    display: flex;
    flex-direction: column;
    gap: 3px;
    pointer-events: none;
}
.vital-row {
    display: flex;
    gap: 2px;
    background: rgba(10, 24, 31, 0.66);
    padding: 3px 6px;
    border-radius: 10px;
    font-size: 11px;
    line-height: 1;
}
.vital-row[hidden] { display: none; }
.heart-full { color: #ff4d5e; }
.heart-half { color: #ff9a9e; }
.heart-empty { color: #3d4d54; }
.food-full { color: #f0a848; }
.food-empty { color: #43494f; }
.oxy-full { color: #52e5ff; }
.oxy-empty { color: #2b4a56; }

/* Crosshair & Mining Ring */
#crosshair {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    pointer-events: none;
    z-index: 2;
}
#crosshair span {
    color: #ffffff;
    font-size: 24px;
    font-weight: 300;
    text-shadow: 0 1px 4px #08151a;
    line-height: 1;
}
#mine-ring {
    position: absolute;
    inset: 0;
    width: 36px;
    height: 36px;
    transform: rotate(-90deg);
    opacity: 0;
}
#mine-ring.active { opacity: 1; }
#mine-ring circle {
    fill: none;
    stroke: var(--accent);
    stroke-width: 3;
    stroke-dasharray: 94.25;
    stroke-dashoffset: 94.25;
    stroke-linecap: round;
}

#target {
    position: absolute;
    z-index: 2;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(10, 24, 31, 0.82);
    border: 1px solid rgba(56, 242, 207, 0.25);
    border-radius: 16px;
    padding: 5px 12px;
    font-size: 11px;
    color: #dff7f2;
    white-space: nowrap;
    max-width: calc(100% - 24px);
    overflow: hidden;
    text-overflow: ellipsis;
    pointer-events: none;
}

#toast {
    position: absolute;
    z-index: 5;
    top: 48px;
    left: 50%;
    transform: translateX(-50%);
    max-width: min(92%, 440px);
    text-align: center;
    font-size: 12px;
    font-weight: 600;
    color: #fff;
    background: rgba(12, 34, 42, 0.92);
    border: 1px solid var(--accent);
    border-radius: 10px;
    padding: 8px 14px;
    display: none;
    pointer-events: none;
}

#advancement {
    position: absolute;
    z-index: 6;
    top: 56px;
    right: 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(16, 40, 48, 0.95), rgba(14, 52, 46, 0.95));
    border: 1px solid #ffd55c;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.42), 0 0 16px rgba(56, 242, 207, 0.25);
    pointer-events: none;
    max-width: min(300px, calc(100% - 32px));
    animation: advPop 0.28s ease-out;
}
#advancement[hidden] { display: none; }
.adv-star { font-size: 22px; color: #ffd55c; text-shadow: 0 0 10px rgba(255, 213, 92, 0.7); }
#advancement strong { display: block; font-size: 13px; color: #ffe885; }
#advancement small { display: block; font-size: 11px; color: #d8f5ef; margin-top: 1px; }
@keyframes advPop {
    from { opacity: 0; transform: translateY(-10px) scale(0.95); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

/* Room Chat Drawer */
#chat-drawer {
    position: absolute;
    z-index: 6;
    top: 46px;
    right: 12px;
    width: min(300px, calc(100% - 24px));
    background: rgba(11, 25, 32, 0.92);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 8px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    backdrop-filter: blur(8px);
}
#chat-drawer[hidden] { display: none; }
#chat-log {
    max-height: 150px;
    overflow-y: auto;
    font-size: 12px;
    line-height: 1.4;
    display: flex;
    flex-direction: column;
    gap: 4px;
    user-select: text;
}
.chat-msg b { color: var(--accent); }
.chat-sys { color: var(--muted); font-style: italic; }
#chat-form { display: flex; gap: 6px; }
#chat-input {
    flex: 1;
    min-width: 0;
    padding: 7px 9px;
    background: #0a171d;
    color: var(--text);
    border: 1px solid #305561;
    border-radius: 8px;
    font: inherit;
    font-size: 12px;
    user-select: text;
}
#chat-form button { padding: 6px 12px; background: var(--accent); color: #092226; font-weight: 700; font-size: 12px; border: 0; }

/* Controls Panel (Portrait stacked below world) */
#controls {
    padding: 8px 12px calc(8px + env(safe-area-inset-bottom));
    flex-shrink: 0;
    background: var(--bg);
    border-top: 1px solid #203b45;
}
.control-heading {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 6px;
    font-size: 10px;
    color: var(--muted);
    margin-bottom: 4px;
}
.heading-pills { display: flex; gap: 6px; align-items: center; }
.heading-pills button {
    height: 28px;
    padding: 0 10px;
    border-radius: 14px;
    font-size: 11px;
    font-weight: 600;
}
#mode { color: var(--accent-2); }
#mode.creative { background: #264d47; border-color: var(--accent); color: var(--accent); }
#fly-btn[aria-pressed="true"] { background: #2d5940; border-color: var(--accent-2); color: var(--accent-2); }
#help { width: 28px; padding: 0; border-radius: 50%; }
#lock-btn { display: none; }
@media (pointer: fine) { #lock-btn { display: inline-flex; align-items: center; } }
#lock-btn.locked { background: var(--accent); color: #072024; border-color: var(--accent); }

.thumb-controls {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 46px 46px minmax(0, 1fr);
    gap: 8px;
    align-items: center;
    height: 104px;
}
.pad-wrap { display: flex; justify-content: center; min-width: 0; }
.pad {
    position: relative;
    width: min(96px, 100%);
    aspect-ratio: 1;
    border: 1px solid #3c626d;
    background: #142a33;
    border-radius: 50%;
    touch-action: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    padding: 7px;
    color: #9ec4c2;
    font-size: 11px;
}
.pad > span:last-child { font-size: 8px; letter-spacing: 1.4px; }
.pad i {
    position: absolute;
    left: calc(50% - 19px);
    top: calc(50% - 19px);
    width: 38px;
    height: 38px;
    background: #2f5c5c;
    border: 1px solid #67a8a3;
    border-radius: 50%;
    pointer-events: none;
}
.look i { background: #2e4a5e; border-color: #638aa6; }

.actions, .flight { display: flex; flex-direction: column; gap: 8px; }
.actions button, .flight button {
    width: 46px;
    height: 46px;
    padding: 0;
    display: grid;
    place-items: center;
    touch-action: none;
}
.actions svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
#place { background: var(--accent-2); color: #103220; border-color: #d0ffb4; }
#place.interact { background: var(--accent); color: #08282b; border-color: #9effef; }
#remove { background: #2a333b; color: #f6b3a6; border-color: #684f4c; }
#remove.mining { background: #6b2e2e; border-color: #ff9c8a; }
.flight button { font-size: 22px; font-weight: 700; }
#fall.sneaking { background: #2e5460; border-color: var(--accent); }

/* Hotbar */
.palette-heading {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 11px;
    margin: 4px 0 5px;
    min-height: 15px;
}
#selected { color: var(--accent); font-weight: 700; }
#action-hint { color: var(--muted); font-size: 10px; }

.hotbar-wrap { display: flex; gap: 6px; align-items: stretch; }
#hotbar {
    flex: 1;
    display: grid;
    grid-template-columns: repeat(9, minmax(0, 1fr));
    gap: 4px;
}
.hot-slot, .inv-slot {
    position: relative;
    aspect-ratio: 1;
    min-height: 36px;
    padding: 3px;
    border-radius: 8px;
    background: #172f38;
    border: 2px solid #2b4a56;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.hot-slot[aria-pressed="true"] {
    border-color: var(--accent);
    background: #1f4852;
    box-shadow: 0 0 10px rgba(56, 242, 207, 0.35);
}
.hot-slot img, .inv-slot img {
    width: 86%;
    height: 86%;
    object-fit: contain;
    image-rendering: pixelated;
    pointer-events: none;
}
.slot-count {
    position: absolute;
    right: 2px;
    bottom: 1px;
    font-size: 10px;
    font-weight: 800;
    color: #fff;
    text-shadow: 0 1px 2px #000, 0 0 2px #000;
    line-height: 1;
    pointer-events: none;
}
.slot-key {
    position: absolute;
    left: 3px;
    top: 2px;
    font-size: 8px;
    color: rgba(255, 255, 255, 0.45);
    pointer-events: none;
}
.slot-dur {
    position: absolute;
    left: 4px;
    right: 4px;
    bottom: 3px;
    height: 3px;
    background: rgba(0, 0, 0, 0.65);
    border-radius: 2px;
    overflow: hidden;
    pointer-events: none;
}
.slot-dur i { display: block; height: 100%; background: var(--accent-2); }

#bag-btn {
    width: 52px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    background: #1c3d46;
    border-color: var(--accent);
    color: var(--accent);
    font-size: 9px;
    font-weight: 700;
    padding: 2px;
}
#bag-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; }

#controls footer {
    height: 16px;
    line-height: 16px;
    margin-top: 6px;
    font-size: 9px;
    color: var(--muted);
    overflow: hidden;
}
#save { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Landscape Overlay Mode (Phones & Desktops) */
@media (orientation: landscape) {
    body { position: relative; }
    #world { position: absolute; inset: 0; width: 100%; height: 100%; min-height: 0; }
    header {
        position: absolute;
        z-index: 4;
        top: calc(8px + env(safe-area-inset-top));
        left: calc(14px + env(safe-area-inset-left));
        right: calc(14px + env(safe-area-inset-right));
        padding: 0;
        border: 0;
        background: none;
        pointer-events: none;
    }
    .brand { font-size: 14px; text-shadow: 0 1px 4px #08151a; }
    .brand small { display: none; }
    .header-actions { pointer-events: auto; }
    .world-meta {
        top: calc(12px + env(safe-area-inset-top));
        left: 50%;
        right: auto;
        transform: translateX(-50%);
        justify-content: center;
    }
    #vitals {
        top: calc(48px + env(safe-area-inset-top));
        left: calc(14px + env(safe-area-inset-left));
    }
    #controls {
        position: absolute;
        z-index: 3;
        inset: 0;
        padding: 0;
        background: none;
        border: 0;
        pointer-events: none;
    }
    #controls button, #controls .pad { pointer-events: auto; }
    .control-heading, .thumb-controls { display: contents; }
    .control-heading > span, #controls footer { display: none; }
    .heading-pills {
        position: absolute;
        right: calc(14px + env(safe-area-inset-right));
        top: calc(52px + env(safe-area-inset-top));
        pointer-events: auto;
    }
    .heading-pills button { height: 34px; background: var(--panel-soft); }
    .thumb-controls .pad {
        position: absolute;
        width: 96px;
        height: 96px;
        bottom: calc(74px + env(safe-area-inset-bottom));
        background: rgba(12, 27, 34, 0.56);
    }
    #move { left: calc(14px + env(safe-area-inset-left)); }
    #look { right: calc(14px + env(safe-area-inset-right)); }
    .actions {
        position: absolute;
        left: calc(122px + env(safe-area-inset-left));
        bottom: calc(76px + env(safe-area-inset-bottom));
    }
    .flight {
        position: absolute;
        right: calc(122px + env(safe-area-inset-right));
        bottom: calc(76px + env(safe-area-inset-bottom));
    }
    .palette-heading {
        position: absolute;
        left: 50%;
        transform: translateX(-50%);
        bottom: calc(64px + env(safe-area-inset-bottom));
        margin: 0;
        gap: 8px;
        background: rgba(10, 24, 31, 0.78);
        padding: 3px 10px;
        border-radius: 10px;
        white-space: nowrap;
    }
    .hotbar-wrap {
        position: absolute;
        left: 50%;
        transform: translateX(-50%);
        bottom: calc(10px + env(safe-area-inset-bottom));
        width: min(510px, calc(100vw - 24px));
        pointer-events: auto;
    }
    .hot-slot { height: 48px; min-height: 44px; background: rgba(14, 32, 40, 0.84); }
    #bag-btn { height: 48px; background: rgba(18, 48, 56, 0.9); }
    #target {
        bottom: calc(92px + env(safe-area-inset-bottom));
    }
}
@media (orientation: landscape) and (pointer: fine) and (min-width: 900px) {
    /* On desktop mouse/keyboard, make touch pads subtle so the 3D world breathes. */
    .thumb-controls .pad { opacity: 0.45; transition: opacity 0.15s; }
    .thumb-controls .pad:hover { opacity: 0.95; }
}

/* Dialogs */
dialog {
    border: 1px solid #35606c;
    border-radius: 18px;
    background: #10242c;
    color: var(--text);
    width: min(94vw, 430px);
    max-height: 92dvh;
    padding: 20px;
    overflow: auto;
    user-select: text;
}
dialog.wide-dialog { width: min(96vw, 760px); }
dialog::backdrop { background: rgba(4, 12, 18, 0.76); backdrop-filter: blur(3px); }
dialog h2 { margin: 0 36px 8px 0; font-size: 20px; }
dialog p { font-size: 13px; line-height: 1.5; color: #b7d2d0; margin: 6px 0 12px; }
.close { position: absolute; right: 12px; top: 12px; width: 34px; height: 34px; font-size: 20px; border-radius: 10px; }
.panel-note { font-size: 12px; color: var(--muted); margin: 0 0 10px; }

.dialog-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 10px; padding-right: 36px; }
.tab-bar { display: flex; gap: 6px; }
.tab-btn, .filter-pill { padding: 6px 12px; font-size: 12px; border-radius: 14px; background: #17333d; }
.tab-btn.active, .filter-pill.active { background: var(--accent); color: #072226; font-weight: 700; border-color: var(--accent); }

/* Crafting & Inventory Grid */
.craft-layout { display: grid; grid-template-columns: 1.15fr 1fr; gap: 16px; }
@media (max-width: 680px) { .craft-layout { grid-template-columns: 1fr; } }
.section-label { font-size: 11px; font-weight: 700; color: var(--accent); letter-spacing: 0.6px; text-transform: uppercase; margin: 10px 0 6px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 6px; }
.section-label small { color: var(--muted); text-transform: none; font-weight: 400; font-size: 10px; }
.hotbar-divider { font-size: 10px; color: var(--muted); margin: 8px 0 4px; text-transform: uppercase; letter-spacing: 0.6px; }

.bench-row { display: flex; align-items: center; gap: 14px; background: #0b1b22; padding: 12px; border-radius: 12px; border: 1px solid #264550; }
.slot-grid { display: grid; gap: 5px; }
.grid-2 { grid-template-columns: repeat(2, 46px); }
.grid-3 { grid-template-columns: repeat(3, 46px); }
.inv-grid { grid-template-columns: repeat(9, minmax(0, 1fr)); }
.creative-grid { grid-template-columns: repeat(auto-fill, minmax(46px, 1fr)); max-height: 330px; overflow-y: auto; padding-right: 4px; }
.inv-slot.picked { border-color: #ffe26a; box-shadow: 0 0 0 2px rgba(255, 226, 106, 0.35); }
.result-slot { width: 54px; height: 54px; border-color: var(--accent); background: #153840; }
.craft-arrow { font-size: 22px; color: var(--accent); font-weight: 700; }
.craft-result-col { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.mini-btn { padding: 5px 10px; font-size: 11px; font-weight: 700; background: var(--accent-2); color: #0d2b1b; border: 0; border-radius: 8px; }

.recipe-toolbar { display: flex; gap: 6px; margin-bottom: 8px; }
.recipe-list { display: flex; flex-direction: column; gap: 6px; max-height: 360px; overflow-y: auto; padding-right: 4px; }
.recipe-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    background: #142d37;
    border: 1px solid #274854;
    border-radius: 10px;
    text-align: left;
}
.recipe-row.ready { border-color: var(--accent); background: #153b42; }
.recipe-row img { width: 32px; height: 32px; image-rendering: pixelated; flex-shrink: 0; }
.recipe-info { flex: 1; min-width: 0; }
.recipe-info strong { display: block; font-size: 13px; color: var(--text); }
.recipe-info small { display: block; font-size: 10px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.recipe-tag { font-size: 10px; font-weight: 700; padding: 3px 8px; border-radius: 10px; background: #22444f; color: var(--muted); }
.recipe-row.ready .recipe-tag { background: var(--accent); color: #062126; }

#held-cursor-bar {
    margin-top: 10px;
    padding: 8px 12px;
    border-radius: 10px;
    background: #183b45;
    border: 1px solid #ffe26a;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
}
#held-cursor-bar[hidden] { display: none; }

/* Furnace UI */
.furnace-stage {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 22px;
    padding: 14px;
    background: #0b1a20;
    border-radius: 12px;
    border: 1px solid #284652;
    margin-bottom: 12px;
}
.furnace-col { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.furnace-col .inv-slot { width: 52px; height: 52px; }
.slot-caption { font-size: 10px; color: var(--muted); text-transform: uppercase; }
.flame-meter { width: 32px; height: 8px; background: #26343a; border-radius: 4px; overflow: hidden; }
.flame-fill { height: 100%; width: 0%; background: linear-gradient(90deg, #ff6a24, #ffda45); transition: width 0.15s; }
.furnace-progress { display: flex; flex-direction: column; align-items: center; gap: 6px; width: 92px; }
.prog-bar { width: 100%; height: 10px; background: #243840; border-radius: 5px; overflow: hidden; }
#furnace-prog-fill { height: 100%; width: 0%; background: var(--accent); transition: width 0.1s; }

/* Options / Name / Invite */
.option-list { display: flex; flex-direction: column; gap: 7px; }
.option-list button { text-align: left; padding: 11px 14px; font-weight: 650; }
.option-list small { display: block; color: var(--muted); font-size: 11px; font-weight: 400; margin-top: 2px; }
#name-form label { display: block; font-size: 12px; color: var(--muted); }
#player-name, #join-link {
    display: block;
    width: 100%;
    margin: 8px 0 12px;
    padding: 11px;
    background: #09181e;
    color: var(--text);
    border: 1px solid #35606c;
    border-radius: 10px;
    font: inherit;
    user-select: text;
}
.outfit-colors { display: flex; gap: 12px; margin-bottom: 12px; }
.outfit-colors label { flex: 1; }
.outfit-colors input { display: block; width: 100%; height: 42px; padding: 4px; margin-top: 6px; border: 1px solid #35606c; border-radius: 10px; background: #09181e; cursor: pointer; }
#save-name, #copy { width: 100%; padding: 12px; background: var(--accent); color: #072226; font-weight: 700; border: 0; }
#name-error { color: var(--danger); min-height: 18px; }
#qr { text-align: center; margin: 10px 0; }

/* Standard RCWeb QR Panel (verbatim proportions from v/style.css) */
.rcRoomQrCodeLink, .rcRoomQrCodeLink * { box-sizing: content-box; }
.rcRoomQrCodeLink {
    display: inline-block;
    background: #ffffff;
    color: #000000;
    padding: 16px;
    border-radius: 12px;
    text-decoration: none;
    text-align: center;
    font-family: monospace;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35);
}
.rcTechLabel {
    background: #000000;
    color: #ffffff;
    padding: 4px 10px;
    font-size: 14px;
    font-weight: bold;
    border-radius: 6px;
    margin-bottom: 10px;
}
.rcRoomQrCode {
    width: 150px;
    height: 150px;
    margin: 0 auto;
    display: block;
}
.rcRoomId {
    background: #000000;
    color: #ffffff;
    padding: 4px 10px;
    font-size: 18px;
    font-weight: bold;
    letter-spacing: 2px;
    border-radius: 6px;
    margin-top: 10px;
}

/* Classic CSS 2.1 Compatibility Warning Screen (works on legacy browsers without Grid/Flex/Vars) */
.browser-error {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 200;
    overflow: auto;
    background: #081217;
    color: #eef8f6;
    text-align: center;
    font-family: Arial, Helvetica, sans-serif;
}
.browser-error-table { display: table; width: 100%; height: 100%; }
.browser-error-cell { display: table-cell; vertical-align: middle; padding: 24px; }
.browser-error-card {
    max-width: 520px;
    margin: 0 auto;
    padding: 28px;
    border: 1px solid #2e5a66;
    border-radius: 16px;
    background: #10232c;
}
.browser-error-card img { border-radius: 14px; }
.browser-error-card h1 { margin: 18px 0 12px; font-size: 26px; line-height: 1.25; }
.browser-error-card p { margin: 10px 0; color: #b7d2d0; font-size: 16px; line-height: 1.5; }
.browser-error-card a {
    display: inline-block;
    margin-top: 16px;
    padding: 13px 24px;
    border: 2px solid #38f2cf;
    border-radius: 10px;
    background: #38f2cf;
    color: #072126;
    font-size: 17px;
    font-weight: bold;
    text-decoration: none;
}
.browser-error-card a:focus, .browser-error-card a:hover { outline: 3px solid #ffffff; outline-offset: 3px; }
.browser-unavailable body > header,
.browser-unavailable #world,
.browser-unavailable #controls,
.browser-unavailable dialog { display: none; }
