/* ═══════════════════════════════════════════════════════════════
   FLOPS — design system cyberpunk
   Temas trocam só as variáveis; componentes usam sempre var(--*)
   ═══════════════════════════════════════════════════════════════ */

:root,
[data-theme="neon"] {
    --primary: #00f0ff;
    --secondary: #ff2bd6;
    --bg: #06060c;
    --bg-2: #0c0b18;
    --bg-3: #13122a;
    --grid: rgba(0, 240, 255, .06);
}
[data-theme="synthwave"] { --primary: #ff6ad5; --secondary: #8c52ff; --bg: #0a0414; --bg-2: #140a24; --bg-3: #1f1236; --grid: rgba(255, 106, 213, .06); }
[data-theme="toxic"]     { --primary: #39ff14; --secondary: #d4ff00; --bg: #040a05; --bg-2: #08140a; --bg-3: #0f2212; --grid: rgba(57, 255, 20, .05); }
[data-theme="blood"]     { --primary: #ff2a3d; --secondary: #ff8a00; --bg: #0b0405; --bg-2: #16080a; --bg-3: #240d11; --grid: rgba(255, 42, 61, .06); }
[data-theme="ice"]       { --primary: #7df9ff; --secondary: #4d7cff; --bg: #03070d; --bg-2: #081221; --bg-3: #0e1d33; --grid: rgba(125, 249, 255, .05); }
[data-theme="solar"]     { --primary: #ffcf40; --secondary: #ff5e00; --bg: #0a0703; --bg-2: #161006; --bg-3: #241a0a; --grid: rgba(255, 207, 64, .05); }

:root {
    --text: #ecebff;
    --text-dim: #a9a6c9;
    --muted: #6f6b8f;
    --danger: #ff3860;
    --ok: #39ff88;
    --warn: #ffe600;

    --panel: color-mix(in srgb, var(--bg-2) 82%, transparent);
    --panel-solid: var(--bg-2);
    --line: color-mix(in srgb, var(--primary) 20%, transparent);
    --line-strong: color-mix(in srgb, var(--primary) 45%, transparent);
    --glow: 0 0 12px color-mix(in srgb, var(--primary) 55%, transparent), 0 0 32px color-mix(in srgb, var(--primary) 20%, transparent);
    --glow-2: 0 0 12px color-mix(in srgb, var(--secondary) 55%, transparent), 0 0 32px color-mix(in srgb, var(--secondary) 20%, transparent);

    --font-display: "Orbitron", "Segoe UI", sans-serif;
    --font-body: "Rajdhani", "Segoe UI", sans-serif;
    --font-mono: "JetBrains Mono", ui-monospace, Consolas, monospace;

    --cut: 12px;
    --radius: 4px;
    --rail-w: 76px;
    color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { height: 100%; }
body {
    margin: 0;
    background:
        radial-gradient(1200px 600px at 85% -10%, color-mix(in srgb, var(--secondary) 16%, transparent), transparent 60%),
        radial-gradient(900px 500px at -10% 110%, color-mix(in srgb, var(--primary) 14%, transparent), transparent 60%),
        var(--bg);
    /* sem repetir: em páginas mais altas que a tela o degradê virava uma faixa */
    background-repeat: no-repeat; background-attachment: fixed;
    color: var(--text);
    font-family: var(--font-body);
    font-size: 16px;
    font-weight: 500;
    line-height: 1.45;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

/* Grade em perspectiva + scanlines */
body::before {
    content: "";
    position: fixed;
    inset: 0;
    background-image:
        linear-gradient(var(--grid) 1px, transparent 1px),
        linear-gradient(90deg, var(--grid) 1px, transparent 1px);
    background-size: 44px 44px;
    mask-image: radial-gradient(ellipse at center, #000 30%, transparent 85%);
    pointer-events: none;
    z-index: 0;
}
body::after {
    content: "";
    position: fixed;
    inset: 0;
    background: repeating-linear-gradient(0deg, rgba(255, 255, 255, .018) 0 1px, transparent 1px 3px);
    pointer-events: none;
    z-index: 9999;
}

a { color: var(--primary); text-decoration: none; }
a:hover { text-shadow: var(--glow); }
h1, h2, h3, h4 { font-family: var(--font-display); letter-spacing: .04em; margin: 0 0 .5em; line-height: 1.15; }
h1 { font-size: clamp(1.6rem, 3vw, 2.3rem); }
h2 { font-size: 1.35rem; }
h3 { font-size: 1.05rem; }
p { margin: 0 0 1em; }
img { max-width: 100%; }
::selection { background: var(--secondary); color: #000; }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: color-mix(in srgb, var(--primary) 25%, transparent); border: 3px solid transparent; background-clip: padding-box; border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background-color: color-mix(in srgb, var(--primary) 50%, transparent); }

.mono { font-family: var(--font-mono); }
.dim { color: var(--text-dim); }
.muted { color: var(--muted); }
.accent { color: var(--primary); }
.accent-2 { color: var(--secondary); }
.upper { text-transform: uppercase; letter-spacing: .12em; }
.tag {
    display: inline-flex; align-items: center; gap: .35em;
    font-family: var(--font-mono); font-size: .72rem; text-transform: uppercase; letter-spacing: .1em;
    padding: .2em .6em; color: var(--primary);
    background: color-mix(in srgb, var(--primary) 10%, transparent);
    border: 1px solid var(--line);
    clip-path: polygon(6px 0, 100% 0, 100% calc(100% - 6px), calc(100% - 6px) 100%, 0 100%, 0 6px);
}
.tag.pink { color: var(--secondary); background: color-mix(in srgb, var(--secondary) 10%, transparent); border-color: color-mix(in srgb, var(--secondary) 30%, transparent); }
.tag.live { color: var(--ok); border-color: color-mix(in srgb, var(--ok) 40%, transparent); background: color-mix(in srgb, var(--ok) 10%, transparent); }
.tag.live::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 8px var(--ok); animation: pulse 1.4s infinite; }

@keyframes pulse { 50% { opacity: .35; } }
@keyframes flicker { 0%, 19%, 21%, 62%, 64%, 100% { opacity: 1; } 20%, 63% { opacity: .4; } }
@keyframes scan { from { transform: translateY(-100%); } to { transform: translateY(100%); } }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ───────────── Glitch logo ───────────── */
.glitch {
    position: relative;
    font-family: var(--font-display);
    font-weight: 900;
    letter-spacing: .12em;
    color: var(--text);
    text-shadow: 0 0 18px color-mix(in srgb, var(--primary) 60%, transparent);
}
.glitch::before, .glitch::after {
    content: attr(data-text);
    position: absolute; inset: 0;
    overflow: hidden;
}
.glitch::before { color: var(--primary); transform: translate(2px, 0); clip-path: inset(0 0 55% 0); animation: glitch-a 3.2s infinite steps(1); mix-blend-mode: screen; }
.glitch::after { color: var(--secondary); transform: translate(-2px, 0); clip-path: inset(55% 0 0 0); animation: glitch-b 2.7s infinite steps(1); mix-blend-mode: screen; }
@keyframes glitch-a { 0%, 88%, 100% { transform: translate(0); } 90% { transform: translate(4px, -2px); clip-path: inset(10% 0 60% 0); } 94% { transform: translate(-3px, 1px); clip-path: inset(40% 0 20% 0); } }
@keyframes glitch-b { 0%, 84%, 100% { transform: translate(0); } 86% { transform: translate(-4px, 2px); clip-path: inset(60% 0 5% 0); } 92% { transform: translate(3px, -1px); clip-path: inset(20% 0 50% 0); } }

/* ───────────── Botões ───────────── */
.btn {
    --c: var(--primary);
    display: inline-flex; align-items: center; justify-content: center; gap: .5em;
    padding: .7em 1.3em;
    font-family: var(--font-display); font-size: .78rem; font-weight: 700;
    letter-spacing: .14em; text-transform: uppercase;
    color: var(--c);
    background: color-mix(in srgb, var(--c) 10%, transparent);
    border: 0;
    box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--c) 55%, transparent);
    clip-path: polygon(var(--cut) 0, 100% 0, 100% calc(100% - var(--cut)), calc(100% - var(--cut)) 100%, 0 100%, 0 var(--cut));
    cursor: pointer;
    transition: background .15s, color .15s, transform .08s, filter .15s;
    white-space: nowrap;
    user-select: none;
}
.btn:hover { background: color-mix(in srgb, var(--c) 22%, transparent); text-shadow: 0 0 10px var(--c); }
.btn:active { transform: translateY(1px); }
.btn:focus-visible { outline: 2px solid var(--c); outline-offset: 3px; }
.btn[disabled] { opacity: .45; pointer-events: none; }
.btn-primary { color: #05050a; background: var(--c); box-shadow: none; }
.btn-primary:hover { background: var(--c); filter: brightness(1.15) drop-shadow(0 0 10px var(--c)); text-shadow: none; }
.btn-secondary { --c: var(--secondary); }
.btn-danger { --c: var(--danger); }
.btn-ok { --c: var(--ok); }
.btn-ghost { --c: var(--text-dim); box-shadow: none; background: transparent; }
.btn-ghost:hover { --c: var(--text); background: color-mix(in srgb, var(--text) 8%, transparent); }
.btn-sm { padding: .45em .9em; font-size: .68rem; --cut: 8px; }
.btn-lg { padding: 1em 2em; font-size: .9rem; --cut: 16px; }
.btn-block { width: 100%; }
.btn-icon { padding: .6em; aspect-ratio: 1; --cut: 8px; }
.btn svg, .icon { width: 1.15em; height: 1.15em; flex: none; }

/* ───────────── Painéis ───────────── */
.panel {
    position: relative;
    background: var(--panel);
    border: 1px solid var(--line);
    padding: 1.4rem;
    backdrop-filter: blur(10px);
    clip-path: polygon(0 0, calc(100% - 18px) 0, 100% 18px, 100% 100%, 18px 100%, 0 calc(100% - 18px));
}
.panel::before, .panel::after {
    content: ""; position: absolute; width: 22px; height: 22px; pointer-events: none;
}
.panel::before { top: -1px; left: -1px; border-top: 2px solid var(--primary); border-left: 2px solid var(--primary); }
.panel::after { bottom: -1px; right: -1px; border-bottom: 2px solid var(--secondary); border-right: 2px solid var(--secondary); }
.panel-title {
    display: flex; align-items: center; justify-content: space-between; gap: 1rem;
    font-family: var(--font-mono); font-size: .75rem; text-transform: uppercase; letter-spacing: .18em;
    color: var(--text-dim); margin: 0 0 1rem;
}
.panel-title::before { content: "//"; color: var(--secondary); margin-right: .2em; }
.panel-title > span { flex: 1; }

.divider { height: 1px; border: 0; margin: 1.4rem 0; background: linear-gradient(90deg, transparent, var(--line-strong), transparent); }

/* ───────────── Formulários ───────────── */
.field { display: flex; flex-direction: column; gap: .35rem; margin-bottom: 1.1rem; }
.field label, .label {
    font-family: var(--font-mono); font-size: .72rem; text-transform: uppercase; letter-spacing: .14em; color: var(--text-dim);
}
.input, .field input[type=text], .field input[type=email], .field input[type=password], .field input[type=number], .field textarea, .field select, select.input {
    width: 100%;
    padding: .75em .9em;
    font: inherit; font-size: 1rem;
    color: var(--text);
    background: color-mix(in srgb, var(--bg) 70%, transparent);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    outline: none;
    transition: border-color .15s, box-shadow .15s;
}
.field textarea { resize: vertical; min-height: 90px; }
.input:focus, .field input:focus, .field textarea:focus, .field select:focus { border-color: var(--primary); box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 18%, transparent), var(--glow); }
.field .hint { font-size: .85rem; color: var(--muted); }
.field-validation-error, .validation-summary-errors, .text-danger { color: var(--danger); font-size: .9rem; }
.validation-summary-errors ul { margin: 0 0 1rem; padding-left: 1.1rem; }
.validation-summary-valid { display: none; }
.input-validation-error { border-color: var(--danger) !important; }
.check { display: flex; align-items: center; gap: .6rem; cursor: pointer; color: var(--text-dim); margin-bottom: 1rem; }
.check input { accent-color: var(--primary); width: 18px; height: 18px; }
.row { display: flex; gap: 1rem; flex-wrap: wrap; align-items: center; }
.row > .grow { flex: 1; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 0 1.2rem; }
.form-actions { display: flex; gap: .8rem; justify-content: flex-end; flex-wrap: wrap; margin-top: .5rem; }

input[type=color] { width: 54px; height: 42px; padding: 2px; border: 1px solid var(--line); background: transparent; border-radius: var(--radius); cursor: pointer; }
input[type=file] { color: var(--text-dim); font: inherit; font-size: .9rem; }
input[type=file]::file-selector-button {
    font-family: var(--font-display); font-size: .68rem; letter-spacing: .12em; text-transform: uppercase; font-weight: 700;
    padding: .6em 1em; margin-right: .8em; border: 1px solid var(--line-strong); color: var(--primary);
    background: color-mix(in srgb, var(--primary) 10%, transparent); cursor: pointer;
}
input[type=range] { accent-color: var(--primary); }

/* Seletor de tema */
.theme-picker { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .7rem; margin-bottom: 1.2rem; }
.theme-option { position: relative; cursor: pointer; }
.theme-option input { position: absolute; opacity: 0; }
.theme-option .swatch {
    display: block; padding: .8rem; border: 1px solid var(--line); background: var(--bg-3); transition: border-color .15s, box-shadow .15s;
    clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 0 100%);
}
.theme-option .bars { display: flex; gap: 4px; height: 26px; margin-bottom: .5rem; }
.theme-option .bars i { flex: 1; }
.theme-option b { font-family: var(--font-display); font-size: .72rem; letter-spacing: .1em; display: block; }
.theme-option small { color: var(--muted); font-size: .78rem; line-height: 1.2; display: block; margin-top: .2rem; }
.theme-option input:checked + .swatch { border-color: var(--primary); box-shadow: var(--glow); }
.theme-option input:focus-visible + .swatch { outline: 2px solid var(--primary); outline-offset: 2px; }

/* ───────────── Avatar ───────────── */
.avatar {
    --a: var(--primary);
    --s: 40px;
    position: relative; flex: none;
    width: var(--s); height: var(--s);
    display: inline-grid; place-items: center;
    font-family: var(--font-display); font-weight: 700; font-size: calc(var(--s) * .38); color: #05050a;
    background: linear-gradient(135deg, var(--a), color-mix(in srgb, var(--a) 40%, #000));
    border-radius: 50%;
    box-shadow: 0 0 0 2px var(--bg), 0 0 0 3px color-mix(in srgb, var(--a) 70%, transparent);
    overflow: hidden;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar.square { border-radius: 0; clip-path: polygon(22% 0, 100% 0, 100% 78%, 78% 100%, 0 100%, 0 22%); box-shadow: none; }
.avatar-xs { --s: 24px; } .avatar-sm { --s: 32px; } .avatar-md { --s: 40px; } .avatar-lg { --s: 64px; } .avatar-xl { --s: 120px; } .avatar-xxl { --s: 150px; }

/* ═══════════════ Shell do app ═══════════════ */
.shell { position: relative; z-index: 1; display: grid; grid-template-columns: var(--rail-w) 1fr; height: 100vh; height: 100dvh; }
.shell.no-rail { grid-template-columns: 1fr; }

.rail {
    display: flex; flex-direction: column; align-items: center; gap: .55rem;
    padding: .9rem 0;
    background: color-mix(in srgb, var(--bg) 85%, transparent);
    border-right: 1px solid var(--line);
    overflow-y: auto; overflow-x: hidden;
    scrollbar-width: none;
}
.rail::-webkit-scrollbar { display: none; }
.rail-logo { font-size: 1.5rem; padding: .2rem 0 .6rem; }
.rail-logo:hover { text-shadow: none; }
.rail-sep { width: 34px; height: 2px; background: var(--line); flex: none; }
.rail-item {
    --a: var(--primary);
    position: relative; flex: none;
    width: 50px; height: 50px;
    display: grid; place-items: center;
    color: var(--text-dim);
    font-family: var(--font-display); font-weight: 700; font-size: .9rem;
    background: var(--bg-3);
    border: 1px solid var(--line);
    clip-path: polygon(12px 0, 100% 0, 100% calc(100% - 12px), calc(100% - 12px) 100%, 0 100%, 0 12px);
    transition: background .15s, color .15s, border-color .15s;
    overflow: hidden;
}
.rail-item img { width: 100%; height: 100%; object-fit: cover; }
.rail-item:hover, .rail-item.active { color: #05050a; background: var(--a); border-color: var(--a); text-shadow: none; }
.rail-item.active::after { content: ""; position: absolute; inset: 0; box-shadow: inset 0 0 0 2px var(--a); }
.rail-wrap { position: relative; display: flex; justify-content: center; width: 100%; }
.rail-wrap.active::before { content: ""; position: absolute; left: 0; top: 10px; bottom: 10px; width: 4px; background: var(--primary); box-shadow: var(--glow); }
.rail-item.action { color: var(--ok); background: transparent; border-style: dashed; border-color: color-mix(in srgb, var(--ok) 45%, transparent); }
.rail-item.action:hover { background: var(--ok); color: #05050a; }
.rail-spacer { flex: 1; }
.rail .avatar { cursor: pointer; }

.main { position: relative; overflow-y: auto; overflow-x: hidden; min-width: 0; }
.page { max-width: 1180px; margin: 0 auto; padding: 2.2rem 1.6rem 4rem; }
.page-narrow { max-width: 760px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.8rem; }
.page-head .kicker { font-family: var(--font-mono); font-size: .75rem; color: var(--secondary); letter-spacing: .2em; text-transform: uppercase; margin-bottom: .4rem; }
.page-head h1 { margin: 0; }
.breadcrumb { font-family: var(--font-mono); font-size: .78rem; color: var(--muted); margin-bottom: .6rem; }
.breadcrumb a { color: var(--text-dim); }

/* Tooltip (posicionado via JS para não ser cortado pelo clip-path) */
.tooltip {
    position: fixed; z-index: 500; pointer-events: none;
    padding: .35em .7em; white-space: nowrap;
    font-family: var(--font-mono); font-size: .72rem; color: var(--text);
    background: var(--bg-3); border: 1px solid var(--line-strong); box-shadow: 0 8px 20px rgba(0,0,0,.5);
    opacity: 0; transition: opacity .1s;
}
.tooltip.show { opacity: 1; }

/* Flash */
.flash-stack { position: fixed; top: 1rem; right: 1rem; z-index: 200; display: flex; flex-direction: column; gap: .5rem; max-width: min(420px, calc(100vw - 2rem)); }
.flash {
    display: flex; align-items: center; gap: .8rem;
    padding: .8rem 1rem; background: var(--panel-solid); border: 1px solid var(--ok);
    border-left-width: 4px; box-shadow: 0 10px 30px rgba(0, 0, 0, .5);
    animation: rise .25s ease-out;
}
.flash.error { border-color: var(--danger); }
.flash.info { border-color: var(--primary); }
.flash button { margin-left: auto; background: none; border: 0; color: var(--muted); cursor: pointer; font-size: 1.2rem; }

/* ═══════════════ Landing ═══════════════ */
.landing { position: relative; z-index: 1; min-height: 100vh; display: flex; flex-direction: column; }
.landing-nav { display: flex; align-items: center; justify-content: space-between; padding: 1.4rem clamp(1rem, 4vw, 3rem); }
.landing-nav .glitch { font-size: 1.6rem; }
.hero { flex: 1; display: grid; grid-template-columns: 1.1fr 1fr; gap: 3rem; align-items: center; padding: 2rem clamp(1rem, 4vw, 3rem) 4rem; max-width: 1300px; margin: 0 auto; width: 100%; }
.hero h1 { font-size: clamp(2.4rem, 6vw, 4.6rem); line-height: 1; margin-bottom: 1.2rem; }
.hero h1 .accent { text-shadow: var(--glow); }
.hero h1 .accent-2 { text-shadow: var(--glow-2); }
.hero .lead { font-size: 1.25rem; color: var(--text-dim); max-width: 34ch; margin-bottom: 2rem; }
.hero-visual { position: relative; aspect-ratio: 4 / 3.2; }
.hero-screen {
    position: absolute; inset: 0; padding: 12px;
    display: grid; grid-template-columns: repeat(3, 1fr); grid-template-rows: 2fr 1fr; gap: 10px;
    background: var(--bg-2); border: 1px solid var(--line-strong);
    clip-path: polygon(0 0, calc(100% - 30px) 0, 100% 30px, 100% 100%, 30px 100%, 0 calc(100% - 30px));
    box-shadow: var(--glow);
    transform: perspective(1200px) rotateY(-10deg) rotateX(4deg);
}
.hero-screen .big { grid-column: 1 / -1; position: relative; overflow: hidden; background:
    linear-gradient(160deg, color-mix(in srgb, var(--secondary) 35%, transparent), transparent 55%),
    linear-gradient(20deg, color-mix(in srgb, var(--primary) 30%, transparent), transparent 60%), var(--bg-3); }
.hero-screen .big::after { content: ""; position: absolute; inset: 0; height: 40%; background: linear-gradient(transparent, color-mix(in srgb, var(--primary) 15%, transparent), transparent); animation: scan 3.5s linear infinite; }
.hero-screen .big span { position: absolute; left: 12px; bottom: 10px; }
.hero-screen .cell { background: var(--bg-3); display: grid; place-items: center; border: 1px solid var(--line); }
.hero-screen .cell.speaking { border-color: var(--ok); box-shadow: inset 0 0 20px color-mix(in srgb, var(--ok) 30%, transparent); }
.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 1rem; padding: 0 clamp(1rem, 4vw, 3rem) 4rem; max-width: 1300px; margin: 0 auto; width: 100%; }
.feature h3 { color: var(--primary); display: flex; align-items: center; gap: .5rem; }
.feature p { color: var(--text-dim); margin: 0; }

/* Auth */
.auth-wrap { position: relative; z-index: 1; min-height: 100vh; display: grid; place-items: center; padding: 2rem 1rem; }
.auth-card { width: min(440px, 100%); }
.auth-card .glitch { display: block; text-align: center; font-size: 2.2rem; margin-bottom: .3rem; }
.auth-card .sub { text-align: center; color: var(--muted); font-family: var(--font-mono); font-size: .8rem; letter-spacing: .2em; text-transform: uppercase; margin-bottom: 1.6rem; }
.auth-foot { text-align: center; margin-top: 1.2rem; color: var(--text-dim); }

/* ═══════════════ Comunidades ═══════════════ */
.grid-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 1.1rem; }
.community-card {
    --a: var(--primary);
    display: flex; flex-direction: column; color: var(--text);
    background: var(--panel); border: 1px solid var(--line);
    clip-path: polygon(0 0, calc(100% - 20px) 0, 100% 20px, 100% 100%, 0 100%);
    transition: transform .15s, border-color .15s, box-shadow .15s;
}
.community-card:hover { transform: translateY(-3px); border-color: var(--a); box-shadow: 0 0 24px color-mix(in srgb, var(--a) 30%, transparent); text-shadow: none; }
.community-card .banner { height: 96px; background: linear-gradient(135deg, color-mix(in srgb, var(--a) 60%, #000), var(--bg-3)); background-size: cover; background-position: center; position: relative; }
.community-card .banner::after { content: ""; position: absolute; inset: 0; background: linear-gradient(transparent 40%, var(--bg-2)); }
.community-card .body { padding: 0 1.1rem 1.1rem; margin-top: -28px; position: relative; z-index: 1; }
.community-card h3 { margin: .7rem 0 .3rem; font-size: 1rem; }
.community-card p { color: var(--text-dim); font-size: .95rem; margin: 0 0 .8rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.community-card .stats { display: flex; gap: 1rem; font-family: var(--font-mono); font-size: .75rem; color: var(--muted); }
.empty { text-align: center; padding: 3rem 1rem; color: var(--text-dim); }
.empty .glitch { font-size: 3rem; display: inline-block; margin-bottom: 1rem; }

.community-hero { --a: var(--primary); position: relative; margin: -2.2rem -1.6rem 1.8rem; padding: 5.5rem 1.6rem 1.4rem; background: linear-gradient(135deg, color-mix(in srgb, var(--a) 45%, #000), var(--bg-2)); background-size: cover; background-position: center; border-bottom: 1px solid var(--line); }
.community-hero::before { content: ""; position: absolute; inset: 0; background: linear-gradient(transparent, color-mix(in srgb, var(--bg) 92%, transparent)); }
.community-hero > * { position: relative; }
.community-hero .row { align-items: flex-end; }
.community-hero h1 { margin-bottom: .2rem; }
.community-cover { display: none; position: relative; }
.community-layout { display: grid; grid-template-columns: 1fr 320px; gap: 1.4rem; align-items: start; }

.room-list { display: grid; gap: .8rem; }
.room-card {
    display: grid; grid-template-columns: auto 1fr auto; gap: 1rem; align-items: center;
    padding: 1rem 1.1rem; color: var(--text);
    background: color-mix(in srgb, var(--bg-3) 70%, transparent); border: 1px solid var(--line);
    border-left: 3px solid var(--primary);
    transition: background .15s, border-color .15s;
}
.room-card:hover { background: color-mix(in srgb, var(--primary) 8%, var(--bg-3)); text-shadow: none; border-color: var(--line-strong); }
.room-card .room-icon { width: 42px; height: 42px; display: grid; place-items: center; color: var(--primary); background: color-mix(in srgb, var(--primary) 10%, transparent); clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px); }
.room-card h3 { margin: 0 0 .15rem; font-size: .95rem; }
.room-card .meta { color: var(--muted); font-size: .9rem; }
.room-card .count { font-family: var(--font-mono); font-size: .8rem; color: var(--text-dim); text-align: right; }
.room-card .count b { color: var(--primary); }
.room-card .voice-members { grid-column: 2 / -1; display: flex; flex-wrap: wrap; gap: .4rem; }
.room-card .voice-members:empty { display: none; }
.voice-chip { display: inline-flex; align-items: center; gap: .4rem; padding: .15rem .55rem .15rem .2rem; font-size: .85rem; background: var(--bg-2); border: 1px solid var(--line); border-radius: 999px; }
.voice-chip .icons { display: inline-flex; gap: 2px; color: var(--muted); }
.voice-chip .icons svg { width: 12px; height: 12px; }
.voice-chip .icons .off { color: var(--danger); }
.voice-chip .icons .on { color: var(--ok); }

.member-list { display: flex; flex-direction: column; gap: .15rem; }
.member { display: flex; align-items: center; gap: .7rem; padding: .45rem .5rem; border-radius: var(--radius); }
.member:hover { background: color-mix(in srgb, var(--primary) 6%, transparent); }
.member .name { flex: 1; min-width: 0; }
.member .name a { color: var(--text); display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.member .name small { color: var(--muted); display: block; font-size: .8rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.member-actions { display: none; gap: .3rem; }
.member:hover .member-actions, .member:focus-within .member-actions { display: flex; }
.role-owner { color: var(--warn); }
.role-admin { color: var(--secondary); }

.invite-box { display: flex; gap: .5rem; align-items: stretch; }
.invite-box input { flex: 1; min-width: 0; font-family: var(--font-mono); font-size: .85rem; }
.code-big { font-family: var(--font-mono); font-size: 1.6rem; letter-spacing: .3em; color: var(--primary); text-shadow: var(--glow); }

/* ═══════════════ Perfil ═══════════════ */
.profile-banner { --a: var(--primary); height: 240px; margin: -2.2rem -1.6rem 0; background: linear-gradient(135deg, color-mix(in srgb, var(--a) 55%, #000), var(--bg-3) 70%); background-size: cover; background-position: center; position: relative; border-bottom: 1px solid var(--line); }
.profile-banner::after { content: ""; position: absolute; inset: 0; background: linear-gradient(transparent 50%, var(--bg)); }
.profile-head { display: flex; gap: 1.5rem; align-items: flex-end; margin-top: -70px; position: relative; z-index: 1; flex-wrap: wrap; }
.profile-head .avatar { box-shadow: 0 0 0 5px var(--bg), 0 0 0 7px var(--a), 0 0 40px color-mix(in srgb, var(--a) 60%, transparent); }
.profile-head .who { flex: 1; min-width: 220px; padding-bottom: .4rem; }
.profile-head h1 { margin: 0; }
.profile-grid { display: grid; grid-template-columns: 1fr 320px; gap: 1.4rem; margin-top: 1.8rem; }
.status-line { display: inline-flex; align-items: center; gap: .5rem; color: var(--text-dim); }
.status-line::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 8px var(--ok); }
.game-tags { display: flex; flex-wrap: wrap; gap: .5rem; }
.preview-img { max-height: 120px; border: 1px solid var(--line); margin-bottom: .5rem; }

/* ═══════════════ Sala / Call ═══════════════ */
body.room-page .main { overflow: hidden; }
.room-layout { display: grid; grid-template-columns: 250px 1fr 340px; height: 100vh; height: 100dvh; }
.room-side, .room-chat { display: flex; flex-direction: column; min-height: 0; background: color-mix(in srgb, var(--bg-2) 80%, transparent); }
.room-side { border-right: 1px solid var(--line); }
.room-chat { border-left: 1px solid var(--line); }
.side-head { padding: 1rem; border-bottom: 1px solid var(--line); }
.side-head h2 { font-size: .95rem; margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-head a { color: var(--text); }
.side-body { flex: 1; overflow-y: auto; padding: .8rem .6rem; }
.side-label { display: flex; align-items: center; justify-content: space-between; font-family: var(--font-mono); font-size: .7rem; color: var(--muted); text-transform: uppercase; letter-spacing: .16em; padding: .4rem .5rem; }
.side-label a { color: var(--muted); }
.side-label a:hover { color: var(--primary); }
.side-room { display: block; padding: .45rem .6rem; margin-bottom: 2px; color: var(--text-dim); border-left: 2px solid transparent; }
.side-room:hover { color: var(--text); background: color-mix(in srgb, var(--primary) 7%, transparent); text-shadow: none; }
.side-room.active { color: var(--text); background: color-mix(in srgb, var(--primary) 12%, transparent); border-left-color: var(--primary); }
.side-room .title { display: flex; align-items: center; gap: .5rem; }
.side-room .title svg { width: 16px; height: 16px; color: var(--primary); flex: none; }
.side-room .title span { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-room .title small { font-family: var(--font-mono); font-size: .7rem; color: var(--muted); }
.side-room .voice-members { display: flex; flex-direction: column; gap: 2px; padding: .3rem 0 0 1.5rem; }
.side-room .voice-members:empty { display: none; }
.side-room .voice-chip { border: 0; background: none; padding: 0; font-size: .85rem; }
.side-foot { padding: .7rem; border-top: 1px solid var(--line); display: flex; align-items: center; gap: .6rem; }
.side-foot .who { flex: 1; min-width: 0; line-height: 1.15; }
.side-foot .who b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .95rem; }
.side-foot .who small { font-family: var(--font-mono); font-size: .7rem; color: var(--muted); }

.room-center { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.room-topbar { display: flex; align-items: center; gap: .8rem; padding: .75rem 1rem; border-bottom: 1px solid var(--line); background: color-mix(in srgb, var(--bg) 60%, transparent); }
.room-topbar h1 { font-size: 1.05rem; margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.room-topbar .topic { color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex: 1; min-width: 0; }
.room-center .mobile-only, .room-chat .mobile-only { display: none; }

.stage { position: relative; flex: 1; min-height: 0; padding: 1rem; display: flex; flex-direction: column; gap: .8rem; }
.stage-lobby { flex: 1; display: grid; place-items: center; text-align: center; }
.stage-lobby .ring {
    width: 150px; height: 150px; margin: 0 auto 1.5rem; display: grid; place-items: center;
    border-radius: 50%; border: 2px dashed var(--line-strong); position: relative;
    animation: spin 18s linear infinite;
}
.stage-lobby .ring > * { animation: spin 18s linear infinite reverse; }
.stage-lobby .ring::before { content: ""; position: absolute; inset: 12px; border-radius: 50%; border: 1px solid var(--line); }
@keyframes spin { to { transform: rotate(360deg); } }
.lobby-avatars { display: flex; justify-content: center; margin: 1rem 0 1.4rem; }
.lobby-avatars .avatar { margin-left: -8px; }

.spotlight { position: relative; flex: 3; min-height: 0; display: none; }
.stage.has-spotlight .spotlight { display: block; }
.tiles {
    flex: 1; min-height: 0;
    display: grid; gap: .7rem;
    grid-template-columns: repeat(var(--cols, 3), minmax(0, 1fr));
    grid-auto-rows: minmax(0, 1fr);
    align-content: center;
}
.stage.has-spotlight .tiles { flex: 0 0 132px; grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 200px; overflow-x: auto; overflow-y: hidden; grid-auto-rows: 100%; justify-content: start; }

.tile {
    --a: var(--primary);
    position: relative; min-height: 0; overflow: hidden;
    background: radial-gradient(circle at 50% 40%, color-mix(in srgb, var(--a) 18%, var(--bg-3)), var(--bg-2) 75%);
    border: 1px solid var(--line);
    clip-path: polygon(0 0, calc(100% - 16px) 0, 100% 16px, 100% 100%, 16px 100%, 0 calc(100% - 16px));
    display: grid; place-items: center;
    aspect-ratio: 16 / 9;
    max-height: 100%;
    width: 100%;
    cursor: pointer;
    transition: border-color .12s, box-shadow .12s;
}
.spotlight .tile { position: absolute; inset: 0; aspect-ratio: auto; height: 100%; cursor: zoom-out; }
.tile video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; background: #000; }
.tile.screen video, .spotlight .tile video { object-fit: contain; }
.tile.mirror video { transform: scaleX(-1); }
.tile .avatar { --s: clamp(48px, 7vw, 110px); }
.tile.speaking { border-color: var(--ok); box-shadow: inset 0 0 0 2px var(--ok), inset 0 0 30px color-mix(in srgb, var(--ok) 25%, transparent); }
.tile.speaking .avatar { box-shadow: 0 0 0 3px var(--bg), 0 0 0 5px var(--ok), 0 0 30px var(--ok); }
.tile .label {
    position: absolute; left: 8px; bottom: 8px; z-index: 2;
    display: inline-flex; align-items: center; gap: .4rem; max-width: calc(100% - 16px);
    padding: .2rem .55rem; font-size: .85rem; font-weight: 600;
    background: rgba(0, 0, 0, .65); border-left: 2px solid var(--a);
    backdrop-filter: blur(4px);
}
.tile .label span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tile .label svg { width: 14px; height: 14px; flex: none; }
.tile .label .off { color: var(--danger); }
.tile .badges { position: absolute; top: 8px; right: 10px; z-index: 2; display: flex; gap: .3rem; }
.tile .conn { position: absolute; top: 8px; left: 10px; z-index: 2; font-family: var(--font-mono); font-size: .65rem; color: var(--warn); background: rgba(0,0,0,.6); padding: .1rem .4rem; }
.tile .conn:empty { display: none; }
.tile .fs-btn { position: absolute; right: 8px; bottom: 8px; z-index: 2; opacity: 0; transition: opacity .15s; }
.tile:hover .fs-btn { opacity: 1; }

.controls {
    display: flex; justify-content: center; align-items: center; gap: .6rem; flex-wrap: wrap;
    padding: .8rem 1rem; border-top: 1px solid var(--line); background: color-mix(in srgb, var(--bg) 70%, transparent);
}
.ctrl {
    --c: var(--text-dim);
    width: 50px; height: 50px; display: grid; place-items: center;
    color: var(--c); background: color-mix(in srgb, var(--c) 10%, var(--bg-3)); border: 0;
    box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--c) 40%, transparent);
    clip-path: polygon(12px 0, 100% 0, 100% calc(100% - 12px), calc(100% - 12px) 100%, 0 100%, 0 12px);
    cursor: pointer; transition: background .12s, color .12s;
    position: relative;
}
.ctrl svg { width: 22px; height: 22px; }
.ctrl:hover { --c: var(--text); }
.ctrl.on { --c: var(--primary); background: color-mix(in srgb, var(--primary) 18%, var(--bg-3)); }
.ctrl.off { --c: var(--danger); }
.ctrl.leave { --c: var(--danger); width: auto; padding: 0 1.2rem; gap: .5rem; display: inline-flex; font-family: var(--font-display); font-size: .72rem; letter-spacing: .12em; font-weight: 700; }
.ctrl.leave:hover { background: var(--danger); color: #000; }
.ctrl[disabled] { opacity: .35; pointer-events: none; }
.ctrl-group { display: flex; gap: .6rem; }
.controls .sep { width: 1px; height: 30px; background: var(--line); }

/* Popover de configurações */
.popover {
    position: absolute; bottom: 86px; left: 50%; transform: translateX(-50%); z-index: 30;
    width: min(380px, calc(100% - 2rem)); padding: 1.2rem;
    background: var(--panel-solid); border: 1px solid var(--line-strong); box-shadow: 0 20px 50px rgba(0, 0, 0, .6), var(--glow);
    /* Nunca maior que o espaço acima da barra de controles: o conteúdo rola dentro do card. */
    max-height: calc(100vh - 110px); max-height: calc(100dvh - 110px);
    overflow-y: auto; overscroll-behavior: contain;
}
.popover[hidden] { display: none; }
.popover h3 { font-size: .85rem; }
.meter { height: 6px; background: var(--bg-3); overflow: hidden; margin-top: .4rem; }
.meter i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--ok), var(--warn), var(--danger)); transition: width .06s; }

/* Menu de contexto do tile (volume por pessoa) */
.tile-menu { position: fixed; z-index: 100; width: 240px; padding: .9rem; background: var(--panel-solid); border: 1px solid var(--line-strong); box-shadow: 0 16px 40px rgba(0,0,0,.6); }
.tile-menu[hidden] { display: none; }
.tile-menu b { display: block; margin-bottom: .6rem; }
.tile-menu label { display: flex; justify-content: space-between; font-family: var(--font-mono); font-size: .72rem; color: var(--text-dim); text-transform: uppercase; letter-spacing: .1em; }
.tile-menu input[type=range] { width: 100%; }
.tile-menu .row { margin-top: .6rem; }

/* Chat */
.chat-head { display: flex; align-items: center; justify-content: space-between; padding: .95rem 1rem; border-bottom: 1px solid var(--line); font-family: var(--font-mono); font-size: .75rem; text-transform: uppercase; letter-spacing: .16em; color: var(--text-dim); }
.chat-head::before { content: "//"; color: var(--secondary); margin-right: .4rem; }
.chat-head span { flex: 1; }
.chat-log { flex: 1; overflow-y: auto; padding: 1rem .9rem .5rem; display: flex; flex-direction: column; }
.chat-log .load-more { align-self: center; margin-bottom: .8rem; }
.msg { display: grid; grid-template-columns: 34px 1fr; gap: .6rem; padding: .35rem .3rem; border-radius: var(--radius); animation: rise .18s ease-out; }
.msg:hover { background: color-mix(in srgb, var(--primary) 5%, transparent); }
.msg.cont { padding-top: 0; }
.msg.cont .avatar { visibility: hidden; height: 0; }
.msg.cont .msg-head { display: none; }
.msg-head { display: flex; align-items: baseline; gap: .5rem; }
.msg-head b { font-weight: 700; }
.msg-head b a { color: inherit; }
.msg-head time { font-family: var(--font-mono); font-size: .68rem; color: var(--muted); }
.msg-body { color: var(--text); word-wrap: break-word; overflow-wrap: anywhere; white-space: pre-wrap; }
.msg-body a { word-break: break-all; }
.msg.mention .msg-body { background: color-mix(in srgb, var(--warn) 10%, transparent); border-left: 2px solid var(--warn); padding-left: .4rem; }
.msg-system { align-self: center; margin: .4rem 0; font-family: var(--font-mono); font-size: .72rem; color: var(--muted); text-align: center; }
.msg-system b { color: var(--text-dim); }
.day-sep { display: flex; align-items: center; gap: .6rem; margin: .8rem 0; font-family: var(--font-mono); font-size: .68rem; color: var(--muted); text-transform: uppercase; letter-spacing: .14em; }
.day-sep::before, .day-sep::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.typing { height: 1.3rem; padding: 0 1rem; font-size: .82rem; color: var(--muted); font-style: italic; }
.chat-form { display: flex; gap: .5rem; padding: .3rem .8rem .9rem; align-items: flex-end; }
.chat-form textarea {
    flex: 1; resize: none; max-height: 140px; min-height: 44px; padding: .65em .8em;
    font: inherit; color: var(--text); background: color-mix(in srgb, var(--bg) 80%, transparent);
    border: 1px solid var(--line); border-radius: var(--radius); outline: none;
}
.chat-form textarea:focus { border-color: var(--primary); box-shadow: var(--glow); }
.chat-form .btn { height: 44px; }
.emoji-bar { display: flex; gap: .2rem; padding: 0 .8rem .3rem; flex-wrap: wrap; }
.emoji-bar button { background: none; border: 0; cursor: pointer; font-size: 1.05rem; padding: .15rem .25rem; filter: grayscale(.4); transition: transform .1s, filter .1s; }
.emoji-bar button:hover { transform: scale(1.25); filter: none; }

.conn-banner { position: absolute; top: 0; left: 0; right: 0; z-index: 40; padding: .4rem 1rem; text-align: center; font-family: var(--font-mono); font-size: .75rem; color: #000; background: var(--warn); }
.conn-banner[hidden] { display: none; }

/* ═══════════════ Social: presença, selos, atividade ═══════════════ */
.rail-item { overflow: visible; }
.rail-item:has(.rail-badge) { clip-path: none; }
.rail-badge {
    position: absolute; top: -4px; right: -6px; z-index: 2;
    min-width: 18px; height: 18px; padding: 0 5px; display: grid; place-items: center;
    font-family: var(--font-mono); font-size: .62rem; font-weight: 700; color: #000;
    background: var(--danger); border-radius: 9px; box-shadow: 0 0 10px var(--danger);
}
.presence-wrap { position: relative; display: inline-flex; flex: none; }
.presence-wrap::after {
    content: ""; position: absolute; right: -1px; bottom: -1px; width: 11px; height: 11px;
    border-radius: 50%; background: var(--muted); border: 2px solid var(--bg-2);
}
.presence-wrap.online::after { background: var(--ok); box-shadow: 0 0 8px var(--ok); }
.presence-wrap.big::after { width: 22px; height: 22px; right: 8px; bottom: 8px; border-width: 4px; }
.activity { color: var(--ok); }
.now-playing { display: inline-flex; align-items: center; gap: .4rem; margin-top: .5rem; padding: .25rem .7rem; color: var(--ok); background: color-mix(in srgb, var(--ok) 10%, transparent); border: 1px solid color-mix(in srgb, var(--ok) 35%, transparent); }
.chip-game { color: var(--ok); font-size: .72rem; margin-left: .2rem; }
.side-room .voice-chip .chip-game { display: none; }
.level-chip { color: var(--secondary); }
[data-notify-state="granted"] .notify-label::after { content: " ✓"; }
[data-notify-state="granted"] { --c: var(--ok); }
[data-notify-state="denied"] .notify-label::after { content: " (bloqueado no navegador)"; }

/* Toast de conquista */
.achievement-toast {
    position: fixed; left: 50%; bottom: 2rem; z-index: 400;
    display: flex; align-items: center; gap: 1rem; min-width: 300px; padding: 1rem 1.4rem;
    background: var(--panel-solid); border: 1px solid var(--warn);
    box-shadow: 0 0 30px color-mix(in srgb, var(--warn) 35%, transparent), 0 20px 50px rgba(0,0,0,.6);
    clip-path: polygon(14px 0, 100% 0, 100% calc(100% - 14px), calc(100% - 14px) 100%, 0 100%, 0 14px);
    transform: translate(-50%, 140%); transition: transform .35s cubic-bezier(.2,1.4,.4,1);
}
.achievement-toast.show { transform: translate(-50%, 0); }
.achievement-toast .icon-big { font-size: 2.2rem; }
.achievement-toast small { display: block; font-family: var(--font-mono); font-size: .7rem; color: var(--warn); text-transform: uppercase; letter-spacing: .12em; }
.achievement-toast b { font-family: var(--font-display); font-size: 1rem; }

/* Perfil: nível e conquistas */
.level-row { display: flex; align-items: center; gap: 1.2rem; }
.level-badge {
    --a: var(--primary); width: 76px; height: 76px; flex: none; display: grid; place-content: center; text-align: center;
    background: color-mix(in srgb, var(--a) 14%, var(--bg-3)); border: 2px solid var(--a);
    clip-path: polygon(25% 0, 75% 0, 100% 50%, 75% 100%, 25% 100%, 0 50%);
}
.level-badge b { font-family: var(--font-display); font-size: 1.6rem; line-height: 1; }
.level-badge small { font-family: var(--font-mono); font-size: .55rem; text-transform: uppercase; letter-spacing: .1em; color: var(--text-dim); }
.xp-bar { height: 10px; background: var(--bg-3); border: 1px solid var(--line); overflow: hidden; }
.xp-bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--primary), var(--secondary)); box-shadow: var(--glow); }
.stat-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: .6rem; margin-top: 1.2rem; }
.stat { padding: .7rem; text-align: center; background: color-mix(in srgb, var(--bg-3) 70%, transparent); border: 1px solid var(--line); }
.stat b { display: block; font-family: var(--font-display); font-size: 1.15rem; color: var(--primary); }
.stat small { font-family: var(--font-mono); font-size: .65rem; color: var(--muted); text-transform: uppercase; letter-spacing: .1em; }
.achievement-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: .6rem; }
.achievement { padding: .8rem; background: var(--bg-3); border: 1px solid var(--line); opacity: .45; filter: grayscale(1); }
.achievement.got { opacity: 1; filter: none; border-color: color-mix(in srgb, var(--warn) 50%, transparent); box-shadow: inset 0 0 20px color-mix(in srgb, var(--warn) 10%, transparent); }
.achievement .icon-big { font-size: 1.6rem; display: block; margin-bottom: .3rem; }
.achievement b { display: block; font-size: .92rem; }
.achievement small { color: var(--muted); font-size: .78rem; line-height: 1.2; display: block; }

/* LFG */
.lfg-list { display: grid; gap: .8rem; }
.lfg-card { --a: var(--primary); padding: 1rem 1.1rem; background: var(--panel); border: 1px solid var(--line); border-left: 3px solid var(--a); }
.lfg-card.full { opacity: .7; }
.lfg-card header { display: flex; align-items: center; gap: .8rem; }
.lfg-card .lfg-game { display: block; font-family: var(--font-display); font-size: .95rem; letter-spacing: .04em; }
.lfg-card .slots { font-size: 1.1rem; color: var(--text-dim); }
.lfg-card .slots b { color: var(--primary); }
.lfg-card.full .slots b { color: var(--ok); }
.lfg-tags { display: flex; flex-wrap: wrap; gap: .4rem; margin: .7rem 0 .4rem; }
.lfg-card p { margin: .4rem 0 0; }
.lfg-card footer { display: flex; align-items: center; gap: .5rem; margin-top: .8rem; }
.lfg-avatars { display: flex; flex: 1; }
.lfg-avatars .avatar { margin-right: -6px; }

/* Clipes */
.clip-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1rem; }
.clip-card { background: var(--bg-3); border: 1px solid var(--line); overflow: hidden; }
.clip-card video { display: block; width: 100%; aspect-ratio: 16 / 9; background: #000; }
.clip-meta { display: flex; align-items: center; gap: .6rem; padding: .6rem .7rem; font-size: .9rem; }
.clip-meta b { display: block; }
.clip-meta small { display: block; font-size: .78rem; }
.msg-body + .clip-card { margin-top: .4rem; max-width: 420px; }
.msg .clip-card .clip-meta { justify-content: space-between; font-size: .8rem; color: var(--text-dim); }

/* Soundboard */
.sound-list { display: grid; gap: .4rem; }
.sound-row { display: flex; align-items: center; gap: .7rem; padding: .5rem .6rem; background: var(--bg-3); border: 1px solid var(--line); }
.sb-emoji { font-size: 1.3rem; width: 1.6em; text-align: center; }
.sound-trim { margin: -.3rem 0 1.1rem; padding: .9rem; background: color-mix(in srgb, var(--bg) 70%, transparent); border: 1px solid var(--line); }
.sound-trim canvas { display: block; width: 100%; height: 90px; margin-bottom: .8rem; }
.sound-trim .field { margin-bottom: .6rem; }
.sb-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: .5rem; max-height: 300px; overflow-y: auto; }
.sb-btn {
    display: flex; flex-direction: column; align-items: center; gap: .25rem; padding: .7rem .4rem;
    font: inherit; font-size: .8rem; color: var(--text); cursor: pointer;
    background: var(--bg-3); border: 1px solid var(--line); transition: border-color .12s, transform .08s, background .12s;
}
.sb-btn:hover { border-color: var(--secondary); background: color-mix(in srgb, var(--secondary) 12%, var(--bg-3)); }
.sb-btn:active { transform: scale(.95); }
.sb-btn[disabled] { opacity: .5; }
.sb-btn .sb-emoji { font-size: 1.5rem; }
.sound-toast {
    position: absolute; left: 50%; top: 1rem; z-index: 20; transform: translateX(-50%);
    padding: .4rem .9rem; font-family: var(--font-mono); font-size: .8rem;
    background: var(--panel-solid); border: 1px solid var(--secondary); box-shadow: var(--glow-2);
    animation: fadeout .4s 2.2s forwards;
}
@keyframes fadeout { to { opacity: 0; } }

/* Qualidade da conexão */
.popover.wide { width: min(640px, calc(100% - 2rem)); }
.quality-table { width: 100%; border-collapse: collapse; font-family: var(--font-mono); font-size: .75rem; }
.quality-table th { text-align: left; color: var(--muted); font-weight: 400; text-transform: uppercase; letter-spacing: .08em; padding: .3rem .4rem; border-bottom: 1px solid var(--line); }
.quality-table td { padding: .4rem; border-bottom: 1px solid color-mix(in srgb, var(--line) 50%, transparent); white-space: nowrap; }
.quality-table td.q-name { font-family: var(--font-body); font-weight: 600; font-size: .9rem; }
.quality-table td[data-q="4"] { color: var(--ok); }
.quality-table td[data-q="3"] { color: var(--primary); }
.quality-table td[data-q="2"] { color: var(--warn); }
.quality-table td[data-q="1"] { color: var(--danger); }
.tile .sig { position: absolute; top: 9px; right: 10px; z-index: 2; display: flex; align-items: flex-end; gap: 2px; height: 14px; padding: 2px 4px; background: rgba(0,0,0,.55); }
.tile .sig i { width: 3px; background: rgba(255,255,255,.2); }
.tile .sig i:nth-child(1) { height: 25%; }
.tile .sig i:nth-child(2) { height: 50%; }
.tile .sig i:nth-child(3) { height: 75%; }
.tile .sig i:nth-child(4) { height: 100%; }
.tile .sig[data-q="0"], .tile .sig:not([data-q]) { display: none; }
.tile .sig[data-q="4"] i { background: var(--ok); }
.tile .sig[data-q="3"] i:nth-child(-n+3) { background: var(--primary); }
.tile .sig[data-q="2"] i:nth-child(-n+2) { background: var(--warn); }
.tile .sig[data-q="1"] i:nth-child(1) { background: var(--danger); }
.tile .label .lv { font-family: var(--font-mono); font-size: .62rem; color: var(--secondary); white-space: nowrap; text-transform: none; }
.tile-game { position: absolute; left: 8px; bottom: 38px; z-index: 2; padding: .1rem .5rem; font-size: .72rem; color: var(--ok); background: rgba(0,0,0,.6); }
.tile.blocked { opacity: .55; }
.ctrl.ptt::before { content: "PTT"; position: absolute; top: 3px; right: 5px; font-family: var(--font-mono); font-size: .5rem; color: var(--warn); }

/* Modal (clipe) */
.modal { position: fixed; inset: 0; z-index: 300; display: grid; place-items: center; padding: 1rem; overflow-y: auto; scrollbar-gutter: stable; background: rgba(0,0,0,.72); backdrop-filter: blur(4px); }
/* Sem scroll no próprio card: os cantos decorativos (-1px) faziam a barra aparecer e sumir em loop, e o card "tremia". */
.modal-card { width: min(720px, 100%); }
.modal-card video { display: block; width: 100%; aspect-ratio: 16 / 9; max-height: 50vh; object-fit: contain; background: #000; }

/* Chat: mensagens de bloqueados */
.msg-blocked { display: block; width: 100%; margin: .2rem 0; padding: .3rem .6rem; text-align: left; font: inherit; font-size: .8rem; font-style: italic; color: var(--muted); background: none; border: 1px dashed var(--line); cursor: pointer; }

/* DMs */
.dm-layout { display: grid; grid-template-columns: 280px 1fr; height: 100vh; height: 100dvh; }
.dm-center { background: color-mix(in srgb, var(--bg-2) 60%, transparent); }
.dm-center .chat-log { flex: 1; }
.dm-row { display: flex; align-items: center; gap: .7rem; padding: .55rem .6rem; color: var(--text); border-left: 2px solid transparent; }
.dm-row:hover { background: color-mix(in srgb, var(--primary) 7%, transparent); text-shadow: none; }
.dm-row.active { background: color-mix(in srgb, var(--primary) 12%, transparent); border-left-color: var(--primary); }
.dm-row .grow { min-width: 0; }
.dm-row b, .dm-row small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dm-unread { min-width: 20px; padding: 0 6px; text-align: center; font-family: var(--font-mono); font-size: .7rem; font-weight: 700; color: #000; background: var(--danger); border-radius: 10px; }
.dm-seen { align-self: flex-end; font-family: var(--font-mono); font-size: .65rem; color: var(--muted); margin-top: .2rem; }
.dm-locked { padding: 1rem; text-align: center; border-top: 1px solid var(--line); }
.ring-lock { width: 72px; height: 72px; margin: 0 auto 1rem; display: grid; place-items: center; color: var(--primary); border: 2px dashed var(--line-strong); border-radius: 50%; }
.ring-lock .icon { width: 30px; height: 30px; }

@media (max-width: 980px) {
    .dm-layout { grid-template-columns: 1fr; }
    .dm-list { display: none; }
    .stat-row { grid-template-columns: repeat(2, 1fr); }
}

/* ═══════════════ Navegar sem cair da call ═══════════════ */
:root { --dock-h: 64px; }
.browse-frame {
    position: fixed; left: 0; right: 0; top: 0; bottom: var(--dock-h); z-index: 150;
    width: 100%; height: calc(100% - var(--dock-h)); border: 0; background: var(--bg);
}
body.browsing { overflow: hidden; }
.call-dock {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 190; height: var(--dock-h);
    display: flex; align-items: center; gap: .8rem; padding: 0 1rem;
    background: color-mix(in srgb, var(--bg-2) 94%, transparent); backdrop-filter: blur(10px);
    border-top: 1px solid color-mix(in srgb, var(--ok) 55%, transparent);
    box-shadow: 0 -8px 30px rgba(0, 0, 0, .55), 0 -1px 18px color-mix(in srgb, var(--ok) 18%, transparent);
}
.dock-room { display: flex; align-items: center; gap: .7rem; min-width: 0; padding: .3rem .5rem; color: var(--text); background: none; border: 0; cursor: pointer; font: inherit; text-align: left; }
.dock-room:hover { background: color-mix(in srgb, var(--ok) 8%, transparent); }
.dock-live { width: 10px; height: 10px; flex: none; border-radius: 50%; background: var(--ok); box-shadow: 0 0 10px var(--ok); animation: pulse 1.4s infinite; }
.dock-text { display: flex; flex-direction: column; line-height: 1.1; min-width: 0; }
.dock-text b { font-family: var(--font-display); font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; color: var(--ok); }
.dock-text small { font-size: .9rem; color: var(--text-dim); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 22ch; }
.dock-avatars { display: flex; flex: 1; min-width: 0; overflow: hidden; }
.dock-avatars .avatar { margin-right: -6px; transition: box-shadow .12s; }
.dock-avatars .avatar.speaking { box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--ok), 0 0 16px var(--ok); z-index: 1; }
.dock-unread { font-family: var(--font-mono); font-size: .78rem; padding: .2rem .55rem; color: var(--warn); border: 1px solid color-mix(in srgb, var(--warn) 45%, transparent); background: color-mix(in srgb, var(--warn) 10%, transparent); }
.dock-actions { display: flex; align-items: center; gap: .5rem; flex: none; }
.dock-actions .ctrl { width: 42px; height: 42px; }
.dock-actions .ctrl svg { width: 19px; height: 19px; }
.dock-actions .ctrl.leave { width: 42px; padding: 0; }
@media (max-width: 640px) {
    :root { --dock-h: 58px; }
    /* No celular a barra de controles quebra em duas linhas. */
    .popover { bottom: 140px; max-height: calc(100vh - 160px); max-height: calc(100dvh - 160px); }
    .call-dock { gap: .5rem; padding: 0 .5rem; }
    .dock-text small, .dock-avatars, .dock-return { display: none; }
    .dock-actions .ctrl { width: 38px; height: 38px; }
}

/* ═══════════════ Responsivo ═══════════════ */
@media (max-width: 1200px) {
    .room-layout { grid-template-columns: 220px 1fr 300px; }
}
@media (max-width: 980px) {
    .community-layout, .profile-grid { grid-template-columns: 1fr; }
    .hero { grid-template-columns: 1fr; }
    .hero-visual { max-width: 520px; width: 100%; margin: 0 auto; }
    .room-layout { grid-template-columns: 1fr; }
    .room-side, .room-chat {
        position: fixed; top: 0; bottom: 0; z-index: 60; width: min(340px, 88vw);
        background: var(--panel-solid); transition: transform .22s ease; box-shadow: 0 0 60px rgba(0,0,0,.7);
    }
    .room-side { left: 0; transform: translateX(-105%); }
    .room-chat { right: 0; transform: translateX(105%); }
    body.show-side .room-side, body.show-chat .room-chat { transform: none; }
    .room-center .mobile-only, .room-chat .mobile-only { display: inline-flex; }
    .stage.has-spotlight .tiles { flex-basis: 96px; grid-auto-columns: 140px; }
}
@media (max-width: 640px) {
    :root { --rail-w: 60px; }
    .rail-item { width: 42px; height: 42px; }
    .page { padding: 1.4rem 1rem 3rem; }
    .community-hero, .profile-banner { margin-left: -1rem; margin-right: -1rem; margin-top: -1.4rem; }
    .ctrl { width: 44px; height: 44px; }
    .controls { gap: .4rem; }
    .controls .sep { display: none; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---------- página do app desktop ---------- */
.desktop-app { display: grid; gap: 1rem; max-width: 760px; }
.desktop-hero { display: grid; justify-items: start; gap: .8rem; padding: 1.6rem; }
.desktop-hero .small { font-size: .85rem; margin: 0; }
/* dentro do app desktop não faz sentido oferecer o download dele mesmo */
html.is-desktop [data-desktop-download] { display: none; }
.landing-download { display: inline-flex; align-items: center; gap: .5rem; margin-top: 1.1rem; color: var(--text-dim); font-weight: 600; text-decoration: none; }
.landing-download:hover { color: var(--primary); }
.landing-download .icon { width: 18px; height: 18px; color: var(--primary); }
.landing-download span { font-family: var(--font-mono); font-size: .8rem; color: var(--muted); }

/* ═══════════════ Celular ═══════════════ */
:root { --tab-h: 60px; --safe-b: env(safe-area-inset-bottom, 0px); }
.tabbar { display: none; }

/* Gaveta de baixo (menu "Mais" do celular) */
dialog.sheet {
    margin: auto 0 0; width: 100%; max-width: 100%; max-height: 82dvh; overflow-y: auto;
    padding: .5rem 0 calc(1rem + var(--safe-b)); color: var(--text);
    background: var(--panel-solid); border: 0; border-top: 1px solid var(--line-strong);
    box-shadow: 0 -20px 50px rgba(0, 0, 0, .6);
}
dialog.sheet[open] { animation: sheet-up .2s ease-out; }
dialog.sheet::backdrop { background: rgba(0, 0, 0, .6); backdrop-filter: blur(2px); }
@keyframes sheet-up { from { transform: translateY(100%); } to { transform: none; } }
.sheet-grip { width: 42px; height: 4px; margin: .2rem auto .8rem; border-radius: 2px; background: var(--line-strong); }
.sheet-title { padding: 0 1.2rem .4rem; font-family: var(--font-mono); font-size: .7rem; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); }
.sheet-list form { margin: 0; }
.sheet-item {
    display: flex; align-items: center; gap: .9rem; width: 100%; padding: .65rem 1.2rem;
    color: var(--text); background: none; border: 0; font: inherit; font-size: 1.02rem; text-align: left; cursor: pointer;
}
.sheet-item:hover, .sheet-item:active { background: color-mix(in srgb, var(--primary) 8%, transparent); text-shadow: none; }
.sheet-item.active { color: var(--primary); }
.sheet-item.danger { color: var(--danger); }
.sheet-icon {
    --a: var(--primary); width: 38px; height: 38px; flex: none; display: grid; place-items: center; overflow: hidden;
    font-family: var(--font-display); font-weight: 700; font-size: .8rem; color: #05050a; background: var(--a);
    clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px);
}
.sheet-icon img { width: 100%; height: 100%; object-fit: cover; }
.sheet-icon.action { color: var(--ok); background: color-mix(in srgb, var(--ok) 12%, transparent); }
.sheet-icon.plain { color: var(--text-dim); background: var(--bg-3); }
.sheet-icon .icon { width: 18px; height: 18px; }
.sheet-sep { height: 1px; margin: .5rem 1.2rem; background: var(--line); }

@media (max-width: 980px) {
    /* Mensagens: sem conversa aberta, a lista ocupa a tela (no desktop ela fica ao lado). */
    .dm-layout:not(.has-conv) { grid-template-columns: 1fr; }
    .dm-layout:not(.has-conv) .dm-list { display: flex; position: static; transform: none; width: auto; box-shadow: none; }
    .dm-layout:not(.has-conv) > .room-center { display: none; }
    .dm-list .dm-row { padding: .75rem 1rem; }
}

@media (max-width: 640px) {
    /* Navegação: rail vira barra de abas */
    .shell { grid-template-columns: 1fr; }
    .rail { display: none; }
    .main { padding-bottom: calc(var(--tab-h) + var(--safe-b)); }
    .tabbar {
        display: grid; grid-template-columns: repeat(5, 1fr);
        position: fixed; left: 0; right: 0; bottom: 0; z-index: 80;
        height: calc(var(--tab-h) + var(--safe-b)); padding-bottom: var(--safe-b);
        background: color-mix(in srgb, var(--bg-2) 94%, transparent); backdrop-filter: blur(10px);
        border-top: 1px solid var(--line);
    }
    .tab {
        position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
        min-width: 0; color: var(--muted); background: none; border: 0; cursor: pointer; text-decoration: none;
        font-family: var(--font-body); font-size: .68rem; font-weight: 600; letter-spacing: .02em;
        -webkit-tap-highlight-color: transparent;
    }
    .tab .icon { width: 22px; height: 22px; }
    .tab .avatar { --s: 24px; }
    .tab:hover { text-shadow: none; color: var(--text); }
    .tab.active { color: var(--primary); }
    .tab.active::before { content: ""; position: absolute; top: -1px; left: 28%; right: 28%; height: 2px; background: var(--primary); box-shadow: var(--glow); }
    .tab.active .avatar { box-shadow: 0 0 0 2px var(--bg), 0 0 0 3px var(--primary); }
    .tab-badge {
        position: absolute; top: 6px; left: calc(50% + 6px); min-width: 17px; height: 17px; padding: 0 4px;
        display: grid; place-items: center; font-family: var(--font-mono); font-size: .62rem; font-weight: 700;
        color: #fff; background: var(--danger); border-radius: 9px; box-shadow: 0 0 0 2px var(--bg-2);
    }
    .tab-badge[hidden] { display: none; }
    /* Dentro de sala e conversa a barra sai (lá embaixo ficam os controles / o campo de mensagem). */
    body.room-page:not(.dm-inbox) .tabbar { display: none; }
    body.room-page:not(.dm-inbox) .main { padding-bottom: 0; }
    body.dm-inbox .dm-layout { height: 100%; }

    /* Páginas */
    .page { padding: 1.2rem 1rem 2rem; }
    .page-head { margin-bottom: 1.3rem; }
    .page-head > .row { width: 100%; }
    .page-head > .row .btn { flex: 1; justify-content: center; padding: .75em .5em; font-size: .66rem; letter-spacing: .06em; white-space: nowrap; }
    .panel { padding: 1.1rem 1rem; }
    .community-hero, .profile-banner { margin-top: -1.2rem; }
    .invite-box { flex-direction: column; }
    .invite-box:has(> .btn-icon) { flex-direction: row; } /* botão só de ícone continua do lado do campo */
    .invite-box .btn { justify-content: center; }
    .btn { white-space: normal; text-align: center; line-height: 1.3; }
    form.row > .input.grow { flex: 1 1 100%; }
    form.row > .input.grow ~ .btn { flex: 1; }

    /* Topo da comunidade: ícone menor em cima, atalhos em linha */
    /* Topo da comunidade no mesmo padrão do perfil: banner em bloco, ícone sobreposto, atalhos em grade */
    .community-hero { padding: 0 1rem 1.2rem; background: none !important; }
    .community-hero::before { display: none; }
    .community-cover {
        display: block; height: 150px; margin: 0 -1rem;
        background: linear-gradient(135deg, color-mix(in srgb, var(--a) 55%, #000), var(--bg-3) 70%);
        background-size: cover; background-position: center; border-bottom: 1px solid var(--line);
    }
    .community-cover::after { content: ""; position: absolute; inset: 0; background: linear-gradient(transparent 50%, var(--bg)); }
    .community-hero > .row { flex-direction: column; align-items: flex-start; gap: .6rem; margin-top: -48px; }
    .community-hero .avatar-xl { --s: 96px; box-shadow: 0 0 0 4px var(--bg), 0 0 0 6px var(--a), 0 0 30px color-mix(in srgb, var(--a) 55%, transparent); }
    .community-hero h1 { font-size: 1.9rem; }
    .community-actions { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; width: 100%; margin-top: .5rem; }
    .community-actions > :first-child, .community-actions > :last-child:nth-child(even) { grid-column: 1 / -1; }
    .community-actions .btn, .community-actions form .btn { width: 100%; padding: .75rem .5rem; font-size: .68rem; letter-spacing: .08em; }
    .community-actions .btn-ghost { box-shadow: inset 0 0 0 1px var(--line-strong); background: color-mix(in srgb, var(--bg-3) 70%, transparent); }
    .community-actions form { margin: 0; }
    .community-actions form .btn-sm { font-size: .68rem; }

    /* Perfil */
    .profile-banner { height: 150px; }
    .profile-head { margin-top: -52px; gap: 1rem; }
    .profile-head .avatar-xl, .profile-head .avatar-xxl { --s: 104px; }
    .profile-head .who { min-width: 0; flex-basis: 100%; }

    /* Landing */
    .landing-nav { padding: 1rem; }
    .landing-nav .row { gap: .4rem; flex-wrap: nowrap; }
    .landing-nav .btn { padding: .55rem .75rem; font-size: .64rem; white-space: nowrap; letter-spacing: .1em; }
    .hero { gap: 2rem; padding-top: 1rem; }
    .hero .lead { font-size: 1.08rem; }
    .hero .row .btn { flex: 1 1 100%; justify-content: center; }

    /* Sala */
    .room-topbar { gap: .35rem; padding: .5rem .5rem; }
    .room-topbar h1 { font-size: .95rem; }
    .room-topbar .topic, .room-topbar .tag.pink { display: none; }
    .room-topbar .tag { font-size: .62rem; padding: .15rem .45rem; }
    .stage { padding: .6rem; gap: .6rem; }
    .tiles { gap: .5rem; }
    .tile .avatar { --s: 64px; }
    /* Em pé, cada card ocupa a célula inteira da grade (em vez de uma faixa 16:9 no topo). */
    @media (orientation: portrait) {
        .tiles { align-content: stretch; }
        .tiles > .tile { aspect-ratio: auto; height: 100%; }
    }
    .tile .label { font-size: .75rem; bottom: 6px; left: 6px; }
    .tile-game { bottom: 32px; left: 6px; font-size: .66rem; }
    .tile .fs-btn { opacity: 1; }
    .stage.has-spotlight .tiles { flex-basis: 84px; grid-auto-columns: 128px; }
    /* Controles da call em grade: 5 por linha, "Sair" ocupa duas casas */
    .controls {
        display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); justify-items: center; gap: .5rem .3rem;
        padding: .6rem .5rem calc(.6rem + var(--safe-b));
    }
    .controls .ctrl-group { display: contents; }
    .controls .ctrl.leave { grid-column: span 2; width: 100%; justify-content: center; }
    .popover { bottom: calc(140px + var(--safe-b)); }
    .room-chat { width: 100vw; }
    .room-side { width: min(320px, 86vw); }
    .chat-form { padding-bottom: calc(.9rem + var(--safe-b)); }

    /* Barra da call enquanto navega (respeita a área do gesto do iPhone) */
    .call-dock { height: calc(var(--dock-h) + var(--safe-b)); padding-bottom: var(--safe-b); }
    .browse-frame { bottom: calc(var(--dock-h) + var(--safe-b)); height: calc(100% - var(--dock-h) - var(--safe-b)); }
}

/* ═══════════════ PWA ═══════════════ */
/* "Instalar app" só aparece no celular fora do app instalado; no celular o download de Windows some. */
[data-pwa-install] { display: none !important; }
html.can-install [data-pwa-install] { display: inline-flex !important; }
html.can-install .sheet-item[data-pwa-install] { display: flex !important; }
html.is-mobile [data-desktop-download], html.is-mobile .desktop-hero:not(.mobile-install) { display: none !important; }
.mobile-install { display: none; }
html.is-mobile .mobile-install { display: grid; }
.install-steps { margin: .3rem 0 1rem; padding: 0 1.2rem 0 2.6rem; display: grid; gap: .8rem; line-height: 1.5; }
.install-steps li::marker { color: var(--primary); font-family: var(--font-mono); font-weight: 700; }
.ios-share { display: inline-grid; place-items: center; width: 1.5em; height: 1.5em; color: var(--primary); border: 1px solid var(--line-strong); border-radius: 4px; font-size: .85em; }
.install-note { padding: 0 1.2rem; margin: 0 0 1rem; font-size: .88rem; }
button.landing-download { display: flex; padding: 0; background: none; border: 0; cursor: pointer; font-family: inherit; font-size: inherit; }

/* Navegação sem recarregar: barrinha do Turbo quando uma tela demora */
.turbo-progress-bar { height: 3px; background: var(--primary); box-shadow: var(--glow); }

/* ═══════════════ Gravação da tela ═══════════════ */
.ctrl.rec { --c: var(--danger); background: color-mix(in srgb, var(--danger) 22%, var(--bg-3)); animation: rec-pulse 1.4s ease-in-out infinite; }
@keyframes rec-pulse { 50% { box-shadow: inset 0 0 0 1px var(--danger), 0 0 18px color-mix(in srgb, var(--danger) 55%, transparent); } }
.rec-badge {
    position: absolute; top: .8rem; left: 50%; transform: translateX(-50%); z-index: 6;
    display: inline-flex; align-items: center; gap: .45rem; padding: .3rem .75rem; white-space: nowrap;
    font-family: var(--font-mono); font-size: .75rem; letter-spacing: .08em; color: #fff;
    background: rgba(0, 0, 0, .72); border: 1px solid color-mix(in srgb, var(--danger) 60%, transparent);
}
.rec-badge[hidden] { display: none; }
.rec-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--danger); box-shadow: 0 0 8px var(--danger); animation: pulse 1.2s infinite; }
.rec-max { color: var(--muted); }
.rec-who { color: var(--text-dim); }
@media (max-width: 640px) {
    .rec-who { display: none; }
    /* 10 botões: 5 por linha, com "Sair" numa casa só (só o ícone). */
    .controls .ctrl.leave { grid-column: auto; font-size: 0; gap: 0; padding: 0; }
}
/* Recurso que este aparelho não tem (ex.: compartilhar tela no celular): apagado, mas o toque explica o porquê. */
.ctrl.unavailable { opacity: .4; }
.ctrl.unavailable:hover { --c: var(--text-dim); }

/* ═══════════════ App Android ═══════════════ */
[data-android-download], .android-install { display: none !important; }
/* Só no navegador de um Android o servidor marca offer-android (e gera os links); no PC e nos apps, nada. */
html.offer-android [data-android-download] { display: inline-flex !important; }
html.offer-android .sheet-item[data-android-download] { display: flex !important; }
html.offer-android .desktop-hero.android-install { display: grid !important; } /* vence o "esconde desktop-hero no celular" */
html.offer-android [data-pwa-install], html.offer-android .mobile-install { display: none !important; }
/* Dentro do próprio app Android: nada de instalar ou baixar app. */
html.is-native [data-pwa-install], html.is-native [data-android-download], html.is-native [data-desktop-download],
html.is-native .mobile-install, html.is-native .android-install { display: none !important; }
