/* Quatro visuais, tudo desenhado em CSS puro (sem imagens):
   • Padrão (retro): bordas grossas, painéis estilo RPG, LEDs de gadget e barra de HP, vermelho e cinza.
   • PlayStation 2 preto: carcaça preta brilhante, menus azul-gelo e as torres azuis flutuantes da tela de abertura.
   • Ilha tranquila: aconchegante, inspirado em Animal Crossing: New Horizons.
   • Carta TCG: moldura dourada, plaquinha de nome, caixa de ataques e energias, inspirado nas cartas de Pokémon TCG.
   Para recolorir, mexa só nas variáveis de cada tema. */

:root {
  /* paleta fixa */
  --red: #e3350d; --red-d: #a5230a; --ink: #1a1a1f; --paper: #fffdf3; --cream: #f4ecd2;
  --blue: #3b5bdb; --yellow: #ffcb05; --green: #3fae49; --purple: #8e5bd9; --teal: #1f9fb0; --steel: #7f8aa0; --pink: #e0568f;
  --ub-yellow: #ffc61a; --ub-black: #151518; --ub-white: #f4f4f1;

  /* variáveis por tema (padrão = claro) */
  --bg: #23232b; --dots: rgba(255,255,255,.06);
  --hd: var(--red); --hd-sh: var(--red-d); --hd-ink: #fff; --hd-line: var(--ink); --hd-tsh: var(--ink);
  --acc: var(--red); --acc-ink: #fff; --tsh: 2px 2px 0 var(--ink);
  --panel: var(--paper); --panel-ink: var(--ink); --muted: #666; --line: var(--ink); --h4: var(--red-d);
  --bar: var(--cream); --bar-line: var(--ink);
  --field: #fff; --field-ink: var(--ink); --fbd: var(--ink);
  --btn: var(--steel); --btn-ink: #fff; --btn-sh: var(--ink); --btn-hi: inset 0 0 0 0 transparent;
  --bezel: #3a3a46; --stage: #0b0b10; --sbbg: rgba(0,0,0,.35);
  --msg: #fff; --mine: #dbe4ff; --theirs: #ffe2da; --link: var(--blue);
  --lcd: #9bbc0f; --lcd-d: #0f380f;
  --shadow: 4px 4px 0 var(--ink);
  --ui: "Trebuchet MS", "Segoe UI", system-ui, -apple-system, sans-serif;
  --mono: ui-monospace, "Cascadia Mono", Consolas, "DejaVu Sans Mono", monospace;
  color-scheme: light;
}

/* PlayStation 2 preto: carcaça preta brilhante com relevo diagonal, luz azul e menus em vidro escuro.
   Só cores, gradientes e formas (nenhum logotipo nem imagem). */
:root[data-theme="ps2"] {
  --bg: #03040a; --dots: rgba(120,170,255,.05);
  --hd: #0a0b10; --hd-sh: #000; --hd-ink: #e8f1ff; --hd-line: #3a6bff; --hd-tsh: rgba(60,120,255,.8);
  --acc: #2f5fe6; --acc-ink: #fff; --tsh: 0 0 8px rgba(120,170,255,.8);
  --panel: #0d1019; --panel-ink: #dbe8ff; --muted: #8c98b5; --line: #2a3560; --h4: #7fb4ff;
  --bar: #07080d; --bar-line: #2a3560;
  --field: #05070d; --field-ink: #e8f1ff; --fbd: #33406e;
  --btn: #1a1d29; --btn-ink: #e8f1ff; --btn-sh: #000; --btn-hi: inset 0 1px 0 rgba(255,255,255,.18);
  --bezel: #10131c; --stage: #000; --sbbg: rgba(40,80,200,.10);
  --msg: #151a2a; --mine: #142a66; --theirs: #171b28; --link: #8fc4ff;
  --lcd: rgba(20,35,80,.75); --lcd-d: #bfe0ff;
  --shadow: 0 10px 40px rgba(0,0,0,.75), 0 0 26px rgba(50,100,255,.18);
  --red-d: #ff7b7b; --yellow: #7fd0ff;
  --ui: "Segoe UI", "Helvetica Neue", Arial, "Noto Sans", system-ui, sans-serif;
  --mono: var(--ui);
  color-scheme: dark;
}

/* Ilha tranquila: visual aconchegante inspirado em Animal Crossing: New Horizons, com uma homenagem à Bluebear
   (paleta azul-pervinca, creme e rosado das bochechas). Só cores e formas, sem imagens do personagem. */
:root[data-theme="acnh"] {
  --red: #ef7d6d; --red-d: #c95a4b; --ink: #6b5a3e; --paper: #fffaea; --cream: #f6efd3;
  --blue: #6aa6ee; --yellow: #f7d154; --green: #5fc9a0; --purple: #f2a0b6; --teal: #62c5c9; --steel: #c9b48a; --pink: #f2a0b6;
  --bg: #e9f4d8; --dots: rgba(255,255,255,.7);
  --hd: #8fb4f2; --hd-sh: #7aa0e0; --hd-ink: #fff; --hd-line: #fffaea; --hd-tsh: rgba(70,90,150,.35);
  --acc: #5fc9a0; --acc-ink: #fff; --tsh: 0 1px 0 rgba(60,110,90,.35);
  --panel: #fffaea; --panel-ink: #5b4a30; --muted: #8b7a5a; --line: #d9c79a; --h4: #4aa583;
  --bar: #fff3cf; --bar-line: #fffaea;
  --field: #fffdf5; --field-ink: #5b4a30; --fbd: #d9c79a;
  --btn: #c9b48a; --btn-ink: #fff; --btn-sh: rgba(107,90,62,.28); --btn-hi: inset 0 2px 0 rgba(255,255,255,.35);
  --bezel: #c79a62; --stage: #1d2a24; --sbbg: rgba(255,250,234,.12);
  --msg: #fff; --mine: #d6e6ff; --theirs: #ffe3ea; --link: #3f7fd6;
  --lcd: #fffaea; --lcd-d: #5b4a30;
  --shadow: 0 6px 0 rgba(107,90,62,.22);
  --ui: "Nunito", "Varela Round", "Arial Rounded MT Bold", "Hiragino Maru Gothic ProN", "Segoe UI", system-ui, sans-serif;
  --mono: var(--ui);
  color-scheme: light;
}
:root[data-theme="acnh"] body { color: #5b4a30; }
:root[data-theme="acnh"] header { border-bottom: 0; position: relative; z-index: 2; }
:root[data-theme="acnh"] header h1 { font-weight: 900; letter-spacing: .02em; text-transform: none; }
:root[data-theme="acnh"] header h1::before { content: "🍃 "; }
:root[data-theme="acnh"] .lights { display: none; }
:root[data-theme="acnh"] .lcd { border: 2px solid #fff; border-radius: 999px; padding: 2px 12px; text-transform: none; letter-spacing: 0; color: #5b4a30; background: #fffaea; box-shadow: 0 2px 0 rgba(0,0,0,.12); }
:root[data-theme="acnh"] .btn { border-width: 0; border-radius: 999px; text-shadow: none; box-shadow: var(--btn-hi), 0 4px 0 var(--btn-sh); font-weight: 800; letter-spacing: 0; }
:root[data-theme="acnh"] .btn.mini { border-radius: 999px; }
:root[data-theme="acnh"] #screen { color: #6b5420; }
:root[data-theme="acnh"] #hangup, :root[data-theme="acnh"] .btn.danger { --c: var(--red); color: #fff; }
:root[data-theme="acnh"] .btn.primary { --c: var(--green); color: #fff; }
:root[data-theme="acnh"] .btn.off { background: repeating-linear-gradient(45deg, #bdb7a6 0 8px, #aea995 8px 16px); color: #fff; }
:root[data-theme="acnh"] .btn.active { box-shadow: 0 4px 0 var(--btn-sh), 0 0 0 3px #fff; }
:root[data-theme="acnh"] .card, :root[data-theme="acnh"] #chat, :root[data-theme="acnh"] .panel { border: 4px solid #fff; border-radius: 24px; outline: 3px solid #e3d3a6; }
:root[data-theme="acnh"] .banner, :root[data-theme="acnh"] #chat h3, :root[data-theme="acnh"] .panel h3 { border-bottom: 0; letter-spacing: .01em; text-transform: none; font-size: 16px; }
:root[data-theme="acnh"] .banner { background: linear-gradient(135deg, #8fb4f2, #5fc9a0); color: #fff; }
:root[data-theme="acnh"] input[type=text], :root[data-theme="acnh"] select { border-radius: 14px; border-width: 2px; }
:root[data-theme="acnh"] .field { text-transform: none; letter-spacing: 0; font-size: 13px; }
:root[data-theme="acnh"] #stage { border: 6px solid #fffaea; outline: 4px solid var(--bezel); border-radius: 26px; background: #1d2a24; }
:root[data-theme="acnh"] #stage::after { display: none; }
:root[data-theme="acnh"] .tile { border: 3px solid #fffaea; border-radius: 18px; box-shadow: 0 3px 0 rgba(0,0,0,.3); }
:root[data-theme="acnh"] .tile figcaption { border: 0; border-radius: 999px; background: rgba(255,250,234,.92); color: #5b4a30; text-transform: none; letter-spacing: 0; font-family: var(--ui); }
:root[data-theme="acnh"] .tile.scr figcaption { background: #f7d154; color: #6b5420; }
:root[data-theme="acnh"] #sbBg { border-left: 3px dashed rgba(255,250,234,.45); }
:root[data-theme="acnh"] .tabbtn { border: 0; border-radius: 14px 14px 0 0; text-transform: none; letter-spacing: 0; font-family: var(--ui); background: #f0e6c2; }
:root[data-theme="acnh"] .tabs { border-bottom: 4px solid #5fc9a0; }
:root[data-theme="acnh"] .pane h4 { text-transform: none; letter-spacing: 0; font-size: 13px; border-bottom: 3px dotted #d9c79a; }
:root[data-theme="acnh"] .meter { border: 2px solid #d9c79a; background: #efe6c8; }
:root[data-theme="acnh"] .msg { border: 0; border-radius: 18px; box-shadow: 0 2px 0 rgba(0,0,0,.08); }
:root[data-theme="acnh"] .msg.sys { background: #e5f4d0; color: #4a7a3a; border: 2px dashed #a9cf8a; }
:root[data-theme="acnh"] #chatForm { border-top: 3px solid #fff; }
:root[data-theme="acnh"] .err { color: #c95a4b !important; }
:root[data-theme="acnh"] #sbHandle::before { border: 0; background: #fffaea; }

/* --- Ilha tranquila: cenário de ilha (céu, nuvens, árvores e gramado desenhados em CSS) --- */
:root[data-theme="acnh"] body {
  background-color: #7ed957;
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='420' height='110' viewBox='0 0 420 110'%3E%3Cg id='p'%3E%3Crect x='27' y='96' width='7' height='14' fill='%238a5a2b'/%3E%3Cpolygon points='30,6 54,46 6,46' fill='%232c9a57'/%3E%3Cpolygon points='30,24 60,68 0,68' fill='%23258a4d'/%3E%3Cpolygon points='30,46 66,98 -6,98' fill='%231f7a44'/%3E%3C/g%3E%3Cg%3E%3Crect x='87' y='78' width='8' height='32' fill='%238a5a2b'/%3E%3Ccircle cx='91' cy='56' r='30' fill='%2370cf55'/%3E%3Ccircle cx='80' cy='48' r='9' fill='%2390e070' opacity='.7'/%3E%3C/g%3E%3Cuse href='%23p' x='120'/%3E%3Cg%3E%3Crect x='207' y='78' width='8' height='32' fill='%238a5a2b'/%3E%3Ccircle cx='211' cy='56' r='30' fill='%2368c74e'/%3E%3Ccircle cx='222' cy='50' r='4' fill='%23ff9a3d'/%3E%3Ccircle cx='200' cy='62' r='4' fill='%23ff9a3d'/%3E%3C/g%3E%3Cuse href='%23p' x='240'/%3E%3Cg%3E%3Crect x='327' y='78' width='8' height='32' fill='%238a5a2b'/%3E%3Ccircle cx='331' cy='56' r='30' fill='%2370cf55'/%3E%3C/g%3E%3C/svg%3E"),
    radial-gradient(ellipse 120px 38px at 14% 14%, #fff 60%, transparent 62%),
    radial-gradient(ellipse 80px 30px at 10% 12%, #fff 60%, transparent 62%),
    radial-gradient(ellipse 150px 44px at 74% 10%, #fff 60%, transparent 62%),
    radial-gradient(ellipse 90px 30px at 82% 8%, #fff 60%, transparent 62%),
    radial-gradient(ellipse 110px 34px at 46% 24%, rgba(255,255,255,.85) 60%, transparent 62%),
    radial-gradient(rgba(255,255,255,.18) 2px, transparent 2.5px),
    linear-gradient(to bottom, #58b7f5 0, #9dd8fb 40%, #d3f0ff 62%, #8fe060 62%, #62c447 100%);
  background-repeat: repeat-x, no-repeat, no-repeat, no-repeat, no-repeat, no-repeat, repeat, no-repeat;
  background-size: 420px 110px, auto, auto, auto, auto, auto, 38px 38px, 100% 100%;
  background-position: 0 calc(62vh - 110px), 0 0, 0 0, 0 0, 0 0, 0 0, 0 0, 0 0;
  background-attachment: fixed;
}
:root[data-theme="acnh"] header {
  background: repeating-linear-gradient(180deg, #cc9560 0 13px, #bd8650 13px 15px); color: #fff7dc;
  border-radius: 0 0 24px 24px; box-shadow: 0 4px 0 #8a5a2b, 0 8px 0 rgba(0,0,0,.12);
}
:root[data-theme="acnh"] header h1 { color: #fff7dc; text-shadow: 0 2px 0 #7a4a1f; }
:root[data-theme="acnh"] #controls {
  margin: 0 10px 8px; border-radius: 26px; background: #fffaea; border: 3px solid #fff; outline: 3px solid #e3d3a6; box-shadow: 0 5px 0 rgba(107,90,62,.25);
}
:root[data-theme="acnh"] #stage { border-color: #fffaea; outline: 5px solid #c79a62; box-shadow: 0 6px 0 rgba(107,90,62,.28); margin: 10px 14px 12px; }
:root[data-theme="acnh"] #lobby { background: #fffaea; }
:root[data-theme="acnh"] #lobby::after { content: "🌳 🍃 🏝️ 🍎 🌷"; text-align: center; letter-spacing: .3em; font-size: 18px; }

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html, body { height: 100%; margin: 0; }
body {
  display: flex; flex-direction: column;
  font: 600 15px/1.4 var(--ui); color: var(--ub-white);
  background: var(--bg) radial-gradient(var(--dots) 2px, transparent 2px) 0 0 / 22px 22px;
}

/* ---------- Cabeçalho ---------- */
header {
  display: flex; align-items: center; gap: 10px; padding: 4px 12px;
  background: var(--hd); border-bottom: 4px solid var(--hd-line);
  box-shadow: inset 0 -4px 0 var(--hd-sh);
}
header h1 { margin: 0; font: 900 16px var(--mono); letter-spacing: .08em; color: var(--hd-ink); text-shadow: 2px 2px 0 var(--hd-tsh); flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lights { display: flex; align-items: center; gap: 8px; }
.lens {
  width: 24px; height: 24px; border-radius: 50%; border: 3px solid #fff;
  background: radial-gradient(circle at 32% 30%, #fff 0 8%, #9bdcff 9% 24%, #2f7bff 56%, #1537a8 100%);
  box-shadow: 0 0 0 2px var(--ink), 0 0 10px rgba(80,160,255,.8);
  animation: glow 2.6s ease-in-out infinite;
}
.led { width: 9px; height: 9px; border-radius: 50%; border: 2px solid var(--ink); }
.led.r { background: #ff5b5b; } .led.y { background: var(--yellow); } .led.g { background: #3b6b45; }
body.connected .led.g { background: #4ade80; animation: blink 1.4s steps(2) infinite; }

.lcd {
  font: 700 11px var(--mono); text-transform: uppercase; letter-spacing: .05em;
  color: var(--lcd-d); background: var(--lcd); border: 2px solid var(--line); border-radius: 7px;
  padding: 1px 8px; box-shadow: inset 2px 2px 0 rgba(0,0,0,.18);
}
.lcd:empty { display: none; }

/* ---------- Botões ---------- */
.btn {
  --c: var(--btn);
  font: inherit; font-weight: 800; letter-spacing: .02em; color: var(--btn-ink); background: var(--c);
  border: 2px solid var(--line); border-radius: 10px; padding: 5px 11px; font-size: 13.5px; cursor: pointer;
  box-shadow: var(--btn-hi), 0 3px 0 var(--btn-sh); text-shadow: 1px 1px 0 rgba(0,0,0,.35);
  transition: transform .06s, box-shadow .06s, filter .12s;
}
.btn:hover { filter: brightness(1.12); }
.btn:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--btn-sh); }
.btn:focus-visible, input:focus-visible, select:focus-visible, .tabbtn:focus-visible, #sbHandle:focus-visible { outline: 3px solid var(--yellow); outline-offset: 2px; }
.btn:disabled { filter: grayscale(1) brightness(.9); opacity: .6; cursor: not-allowed; transform: none; box-shadow: 0 4px 0 var(--btn-sh); }
.btn.mini { padding: 2px 9px; border-radius: 8px; font-size: 12.5px; box-shadow: var(--btn-hi), 0 2px 0 var(--btn-sh); }
.btn .ic { margin-right: 5px; } .btn .lbl:only-child { margin: 0; }
.btn.primary, .btn.danger { --c: var(--acc); color: var(--acc-ink); }
.btn.off { background: repeating-linear-gradient(45deg, #7a7a86 0 8px, #666672 8px 16px); color: #fff; }
.btn.active { box-shadow: 0 4px 0 var(--btn-sh), 0 0 0 3px var(--yellow); }
/* cores por "tipo" no modo claro; no escuro todos viram neutros e só os destaques ficam amarelos */
#mic { --c: var(--green); } #cam { --c: var(--blue); } #pip { --c: var(--teal); }
#chatBtn { --c: var(--purple); } #cfgBtn { --c: var(--steel); }
#screen { --c: var(--yellow); color: var(--ink); text-shadow: none; }
.badge { display: inline-block; min-width: 20px; padding: 0 6px; margin-left: 4px; text-align: center; font-size: 12px; color: #fff; background: var(--red); border: 2px solid var(--line); border-radius: 999px; animation: pop .35s; }

/* ---------- Cartões e painéis ---------- */
.card, #chat, .panel {
  color: var(--panel-ink); background: var(--panel); border: 4px solid var(--line); border-radius: 16px; box-shadow: var(--shadow);
}
#lobby { margin: auto; width: min(430px, 92vw); padding: 0 22px 22px; display: flex; flex-direction: column; gap: 12px; overflow: hidden; }
#lobby p { margin: 0; color: var(--muted); font-size: 14px; }
.banner, #chat h3, .panel h3 {
  font: 900 14px var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--acc-ink); background: var(--acc);
  border-bottom: 4px solid var(--line); text-shadow: var(--tsh);
}
:root:not([data-theme="ps2"]) .banner, :root:not([data-theme="ps2"]) #chat h3, :root:not([data-theme="ps2"]) .panel h3 { color: #fff; }
.banner { margin: 0 -22px 4px; padding: 12px 22px; font-size: 18px; letter-spacing: .08em; }
.field { display: flex; flex-direction: column; gap: 5px; font: 800 12px var(--mono); text-transform: uppercase; letter-spacing: .06em; }
input[type=text], select {
  font: 600 15px var(--ui); color: var(--field-ink); background: var(--field); width: 100%;
  border: 3px solid var(--fbd); border-radius: 10px; padding: 9px 10px;
}
input[type=range] { width: 100%; accent-color: var(--acc); }
.err { color: var(--red-d) !important; font-weight: 800; min-height: 1.4em; }

/* ---------- Chamada ---------- */
#call { flex: 1; display: none; flex-direction: row; min-height: 0; }
#callMain { flex: 1; display: flex; flex-direction: column; min-width: 0; min-height: 0; }

/* Palco em grade: a transmissão (ou a câmera) à esquerda, as miniaturas numa barra à direita.
   --sbw é a largura da barra (0 = recolhida); o JS ajusta. Nada flutua por cima da transmissão. */
#stage {
  --sbw: 0px; --gap: 10px;
  position: relative; flex: 1; min-height: 0; margin: 8px 10px; overflow: hidden;
  display: grid; grid-template-columns: minmax(0, 1fr) var(--sbw);
  grid-template-rows: minmax(0, 1fr);
  background: var(--stage); border: 6px solid var(--bezel); outline: 4px solid var(--line); border-radius: 16px;
}
#stage::after { /* linhas de varredura bem sutis, como um visor antigo */
  content: ""; position: absolute; inset: 0; z-index: 6; pointer-events: none;
  background: repeating-linear-gradient(0deg, rgba(255,255,255,.03) 0 1px, transparent 1px 3px);
}
body.noscan #stage::after { display: none; } /* Configurações → Aparência */

#sbBg { position: absolute; top: 0; right: 0; bottom: 0; width: var(--sbw); z-index: 0; box-sizing: border-box; background: var(--sbbg); border-left: 3px solid var(--line); } /* fora da grade, senão empurra as miniaturas */
#stage.sb-off #sbBg { display: none; }

/* Contêineres: #main (destaque ou mosaico), #sb (barra lateral rolável) e #pool (quadros sem espaço, fora de vista). */
#main { grid-column: 1; grid-row: 1; position: relative; min-width: 0; min-height: 0; overflow: hidden; display: flex; z-index: 1; }
#main.mosaic { flex-wrap: wrap; align-content: center; justify-content: center; gap: 8px; padding: 8px; }
#sb { grid-column: 2; grid-row: 1; position: relative; z-index: 3; min-width: 0; min-height: 0; overflow-y: auto; overflow-x: hidden; display: flex; flex-direction: column; gap: var(--gap); padding: var(--gap); scrollbar-width: thin; }
#stage.sb-off #sb { display: none; }
#pool { display: none; }

.tile {
  position: relative; z-index: 3; cursor: pointer; overflow: hidden; background: #000; margin: 0; flex: none; min-width: 0; min-height: 0;
  border: 3px solid var(--line); border-radius: 10px; box-shadow: 3px 3px 0 rgba(0,0,0,.6);
  transition: transform .12s, box-shadow .15s;
}
.tile:hover { transform: translateY(-2px); }
#sb .tile { width: 100%; aspect-ratio: 16 / 9; }
.tile.big { width: 100%; height: 100%; margin: 0; z-index: 1; border: 0; border-radius: 0; box-shadow: none; cursor: default; }
.tile.big:hover { transform: none; }
#main.mosaic .tile { width: var(--tw); height: var(--th); }
.tile video { display: block; width: 100%; height: 100%; object-fit: cover; background: #000; }
.tile.big video, .tile.scr video { object-fit: contain; }
body:not(.nomirror) video.self { transform: scaleX(-1); } /* espelho só na sua própria prévia */
/* Sem câmera (ou câmera desligada): inicial do nome sobre uma cor */
.tile .avatar { display: none; position: absolute; inset: 0; align-items: center; justify-content: center; background: hsl(var(--h, 210) 45% 32%); color: #fff; font: 900 min(14vmin, 46px) var(--mono); }
.tile.novideo .avatar { display: flex; }
.tile.novideo video { visibility: hidden; }
.tile .mic-off { position: absolute; top: 6px; right: 6px; font-size: 13px; line-height: 1; background: rgba(0,0,0,.7); border-radius: 50%; padding: 4px; pointer-events: none; }
/* Quem está falando ganha um contorno que pulsa */
.tile.speaking { box-shadow: 0 0 0 4px var(--speak, #3ddc84), 0 0 18px 2px var(--speak, #3ddc84); animation: speakpulse .9s ease-in-out infinite; z-index: 4; }
.tile.big.speaking { box-shadow: inset 0 0 0 5px var(--speak, #3ddc84); }
@keyframes speakpulse { 50% { box-shadow: 0 0 0 4px var(--speak, #3ddc84), 0 0 6px 0 var(--speak, #3ddc84); } }
:root[data-theme="ps2"] { --speak: #6fd8ff; }
:root[data-theme="acnh"] { --speak: #5fc9a0; }
.tile figcaption {
  position: absolute; left: 6px; bottom: 6px; max-width: calc(100% - 12px); overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font: 800 11px var(--mono); text-transform: uppercase; letter-spacing: .05em; color: #fff;
  background: rgba(26,26,31,.85); border: 2px solid #fff; border-radius: 6px; padding: 1px 7px; pointer-events: none;
}
.tile.big figcaption { font-size: 13px; left: 12px; bottom: 12px; padding: 2px 10px; }
.tile.scr figcaption { background: var(--yellow); color: var(--ink); border-color: var(--ink); }
#main.mosaic .tile figcaption { font-size: 12px; }

/* Alça para redimensionar e botões do palco */
#sbHandle { position: absolute; top: 0; bottom: 0; right: calc(var(--sbw) - 7px); width: 14px; z-index: 5; cursor: col-resize; touch-action: none; }
#sbHandle::before { content: ""; position: absolute; top: 50%; left: 4px; width: 6px; height: 48px; transform: translateY(-50%); border-radius: 3px; background: var(--acc); border: 2px solid var(--line); opacity: .55; transition: opacity .12s; }
#sbHandle:hover::before, #sbHandle:focus-visible::before, #sbHandle.drag::before { opacity: 1; }
#stage.resizing { cursor: col-resize; user-select: none; }
#stage.resizing .tile { transition: none; }
#sbToggle { position: absolute; top: 10px; right: calc(var(--sbw) + 10px); z-index: 7; }
#fsBtn { position: absolute; bottom: 10px; right: calc(var(--sbw) + 10px); z-index: 7; }

#controls { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; padding: 7px 10px 9px; background: var(--bar); border-top: 4px solid var(--bar-line); }

/* ---------- Tela cheia da transmissão ---------- */
/* Só a transmissão aparece; a sua câmera some e a da outra pessoa vira uma janelinha que dá para arrastar. */
/* Em tela cheia nenhum tema aparece: só o vídeo, em preto puro, sem moldura, linhas, legendas nem bordas. */
:root:root #stage.fs { margin: 0 !important; border: 0; outline: 0; border-radius: 0; --sbw: 0px; background: #000; box-shadow: none; }
:root:root #stage.fs::after, #stage.fs #sbBg, #stage.fs figcaption, #stage.fs #sbToggle, #stage.fs #fsBtn, #stage.fs .mic-off, #stage.fs #sb { display: none !important; }
:root:root #stage.fs .tile.speaking { animation: none; box-shadow: none; } /* tela cheia sem nenhum enfeite */
#stage.fs .tile.big { background: #000; }
/* Sem a câmera flutuante (opcional) a câmera continua tocando, só some de vista */
.tile.fsfloat {
  position: absolute; z-index: 8; margin: 0; width: var(--fsw, 260px); aspect-ratio: 16 / 9; height: auto;
  right: 20px; bottom: 76px; cursor: grab; touch-action: none; user-select: none; border: 2px solid rgba(255,255,255,.55); border-radius: 8px; box-shadow: 0 2px 10px rgba(0,0,0,.6);
}
.tile.fsfloat.dragging { cursor: grabbing; transition: none; opacity: .92; }
.tile.fsfloat:hover { transform: none; }
.tile.fsfloat video { pointer-events: none; }
#stage .fsResize { display: none; }
.tile.fsfloat .fsResize { display: block; position: absolute; left: 0; top: 0; width: 26px; height: 26px; cursor: nwse-resize; touch-action: none; z-index: 2;
  background: linear-gradient(315deg, transparent 0 55%, rgba(255,255,255,.9) 55% 62%, transparent 62% 72%, rgba(255,255,255,.9) 72% 79%, transparent 79%); filter: drop-shadow(0 0 2px #000); }
.tile.fsfloat:hover .fsResize, .tile.fsfloat.dragging .fsResize { opacity: 1; }
#fsbar { position: absolute; bottom: 16px; left: 50%; transform: translateX(-50%); z-index: 9; display: flex; gap: 8px; }
#stage.fs .btn { --c: rgba(24,24,28,.78); color: #fff; border: 1px solid rgba(255,255,255,.35); border-radius: 8px; box-shadow: none; text-shadow: none; backdrop-filter: blur(4px); }
#stage.fs .btn.off { background: rgba(120,40,40,.85); }
#stage.fs #fsExit { --c: rgba(24,24,28,.78); }
#fsbar { transition: opacity .25s; }
#stage.fs.idle { cursor: none; }
#stage.fs.idle #fsbar { opacity: 0; pointer-events: none; }

/* ---------- Chat ---------- */
#chat { display: none; flex-direction: column; width: min(340px, 100vw); margin: 8px 10px 8px 0; overflow: hidden; }
#call.chat-open #chat { display: flex; }
#chat h3, .panel h3 { margin: 0; padding: 10px 12px; display: flex; justify-content: space-between; align-items: center; }
#msgs { flex: 1; min-height: 0; overflow: auto; padding: 12px; display: flex; flex-direction: column; gap: 9px; background: var(--panel) radial-gradient(rgba(128,128,128,.12) 1px, transparent 1px) 0 0 / 14px 14px; }
.msg { max-width: 90%; padding: 6px 10px; font-size: 14px; font-weight: 600; overflow-wrap: anywhere; color: var(--panel-ink); background: var(--msg); border: 3px solid var(--line); border-radius: 12px; animation: pop .2s; }
.msg.mine { align-self: flex-end; background: var(--mine); border-bottom-right-radius: 3px; }
.msg.theirs { align-self: flex-start; background: var(--theirs); border-bottom-left-radius: 3px; }
.msg.sys { align-self: center; max-width: 100%; font: 700 11px var(--mono); text-transform: uppercase; color: var(--lcd-d); background: var(--lcd); border-width: 2px; border-style: dashed; border-radius: 8px; }
.msg .who { display: flex; justify-content: space-between; gap: 10px; font: 800 10px var(--mono); text-transform: uppercase; letter-spacing: .05em; opacity: .7; }
.msg .txt { white-space: pre-wrap; }
.msg a { color: var(--link); }
#chatForm { display: flex; gap: 8px; padding: 10px; background: var(--bar); border-top: 4px solid var(--line); }
#chatInput { flex: 1; min-width: 0; }
#chatForm .btn { padding: 6px 12px; }

/* ---------- Painel de configurações (abas) ---------- */
.panel { display: none; flex-direction: column; position: fixed; right: 10px; bottom: 58px; z-index: 20; width: min(410px, calc(100vw - 20px)); max-height: calc(100vh - 70px); overflow: hidden; }
.panel.show { display: flex; }
.panel .x { padding: 1px 9px; }
.tabs { display: flex; gap: 6px; padding: 10px 12px 0; background: var(--bar); border-bottom: 4px solid var(--line); }
.tabbtn {
  font: 800 12px var(--mono); text-transform: uppercase; letter-spacing: .03em; cursor: pointer; margin-bottom: -4px;
  color: var(--panel-ink); background: var(--field); border: 3px solid var(--line); border-bottom: 0; border-radius: 10px 10px 0 0; padding: 7px 10px;
}
.tabbtn.active { color: var(--acc-ink); background: var(--acc); }
:root:not([data-theme="ps2"]) .tabbtn.active { color: #fff; }
.pane { flex: 1; min-height: 0; overflow: auto; padding: 0 16px 6px; }
.pane h4 { margin: 18px 0 8px; font: 900 12px var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--h4); border-bottom: 3px dotted var(--line); padding-bottom: 4px; }
.row { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; margin-bottom: 10px; }
.row label.t { display: flex; justify-content: space-between; font-size: 13px; font-weight: 800; }
.row label.t span { color: var(--muted); font-weight: 700; }
.sw { display: flex; gap: 10px; align-items: flex-start; margin-top: 10px; margin-bottom: 10px; cursor: pointer; }
.sw input { flex: none; width: 18px; height: 18px; margin-top: 3px; accent-color: var(--acc); }
.sw b { display: block; font-size: 14px; }
.hint { display: block; color: var(--muted); font-size: 12px; font-weight: 600; }
.meter { position: relative; height: 18px; overflow: hidden; background: #3b3b44; border: 3px solid var(--line); border-radius: 9px; } /* barra de HP */
.meter i { position: absolute; inset: 0 auto 0 0; width: 0; background: var(--green); transition: width .06s linear; }
.meter b { position: absolute; top: 0; bottom: 0; width: 3px; background: var(--ink); display: none; box-shadow: 0 0 0 1px #ffa94d; }
#gateState { min-height: 18px; }
#resetAudio, #resetVideo, #resetLook { display: block; width: 100%; margin: 16px 0 12px; }

/* ---------- Animações ---------- */
@keyframes glow { 50% { box-shadow: 0 0 0 3px var(--ink), 0 0 22px rgba(120,190,255,1); } }
@keyframes blink { 50% { opacity: .15; } }
@keyframes pop { from { transform: scale(.85); opacity: 0; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* ---------- Celular ---------- */
/* Cabeçalho + botões ocupam no máximo ~25% da altura; o resto é só vídeo. Botões viram ícones. */
@media (max-width: 760px), (max-height: 520px) and (pointer: coarse) {
  body { font-size: 14px; }
  header { padding: 3px 8px; gap: 6px; border-bottom-width: 3px; box-shadow: none; }
  header h1 { font-size: 13px; letter-spacing: .03em; }
  .lights .led { display: none; } .lens { width: 18px; height: 18px; border-width: 2px; }
  #copy { padding: 2px 8px; } #copy .lbl { display: none; } #copy .ic { margin: 0; }
  #controls { flex-wrap: nowrap; gap: 6px; padding: 5px 6px calc(6px + env(safe-area-inset-bottom)); border-top-width: 3px; }
  #controls .btn { flex: 1 1 0; min-width: 0; max-width: 64px; padding: 7px 0; font-size: 19px; line-height: 1; border-width: 2px; text-align: center; position: relative; }
  #controls #hideUi { display: inline-block; }
  #controls .btn .lbl { display: none; } #controls .btn .ic { margin: 0; }
  #controls .btn .ico { width: 1.1em; height: 1.1em; }
  #controls .badge { position: absolute; top: -6px; right: -4px; margin: 0; min-width: 16px; font-size: 10px; line-height: 14px; padding: 0 3px; }
  #chat { position: fixed; inset: 40px 6px 62px 6px; width: auto; margin: 0; z-index: 15; }
  .panel { right: 6px; left: 6px; width: auto; bottom: 62px; max-height: calc(100% - 100px); }
  .tabbtn { padding: 7px 7px; font-size: 11px; }
  #stage { margin: 4px !important; --gap: 5px; border-width: 3px; outline-width: 2px; border-radius: 12px; --sbw: 100px !important; }
  #stage.sb-off { --sbw: 0px !important; }
  #stage.fs { margin: 0; border: 0; }
  .tile { border-width: 2px; border-radius: 8px; }
  .tile figcaption { font-size: 9px; left: 3px; bottom: 3px; padding: 0 4px; }
  .tile.big figcaption { font-size: 11px; left: 8px; bottom: 8px; }
  #sbHandle { display: none; }
  #sbToggle { top: 6px; right: calc(var(--sbw) + 6px); } #fsBtn { bottom: 6px; right: calc(var(--sbw) + 6px); }
  #fsBtn .lbl, #fsBtn { font-size: 12px; }
  .tile.fsfloat { right: 10px; bottom: 64px; }
  #lobby { padding: 0 16px 16px; }
  :root[data-theme="acnh"] #controls { margin: 0 4px 4px; border-radius: 18px; }
}

/* ---------- Avisos (ex.: áudio da tela) ---------- */
#toast { position: absolute; top: 12px; left: calc((100% - var(--sbw)) / 2); transform: translateX(-50%); z-index: 7; max-width: min(calc(100% - var(--sbw) - 80px), 560px); text-align: center; text-transform: none; font-size: 13px; line-height: 1.35; padding: 7px 14px; white-space: normal; animation: pop .2s; }

/* ---------- Ilha tranquila: botões e menus no estilo dos menus do jogo ---------- */
/* Texto marrom-escuro sobre cores vivas porém claras (contraste alto), cantos bem redondos, brilho interno
   e "sombra" de cor mais escura. O item ativo vira a barra laranja de seleção, como nas listas do jogo. */
:root[data-theme="acnh"] {
  --btn-ink: #3b2d20; --muted: #75653f; --h4: #2f7d5f;
}
:root[data-theme="acnh"] .btn {
  --sh: color-mix(in srgb, var(--c) 62%, #3b2d20);
  color: #3b2d20; font-weight: 900; font-size: 14px; border: 0; text-shadow: none;
  background: var(--c);
  box-shadow: inset 0 0 0 3px rgba(255,255,255,.6), 0 4px 0 var(--sh);
}
:root[data-theme="acnh"] .btn:hover { filter: none; transform: translateY(-1px); box-shadow: inset 0 0 0 3px #fff, 0 5px 0 var(--sh); }
:root[data-theme="acnh"] .btn:active { transform: translateY(3px); box-shadow: inset 0 0 0 3px rgba(255,255,255,.6), 0 1px 0 var(--sh); }
:root[data-theme="acnh"] .btn.mini { font-size: 13px; padding: 3px 11px; box-shadow: inset 0 0 0 2px rgba(255,255,255,.6), 0 3px 0 var(--sh); }
:root[data-theme="acnh"] #mic { --c: #86dca0; }
:root[data-theme="acnh"] #cam { --c: #93b5f7; }
:root[data-theme="acnh"] #screen { --c: #fadb63; color: #3b2d20; }
:root[data-theme="acnh"] #pip { --c: #74d8d2; }
:root[data-theme="acnh"] #chatBtn { --c: #f6a8c0; }
:root[data-theme="acnh"] #cfgBtn { --c: #e2cd9c; }
:root[data-theme="acnh"] #hangup, :root[data-theme="acnh"] .btn.danger { --c: #f59482; color: #3b2d20; }
:root[data-theme="acnh"] .btn.primary { --c: #86dca0; color: #3b2d20; }
:root[data-theme="acnh"] #copy, :root[data-theme="acnh"] #themeBtn, :root[data-theme="acnh"] #sbToggle, :root[data-theme="acnh"] #fsBtn, :root[data-theme="acnh"] .btn.x { --c: #fff8e4; }
:root[data-theme="acnh"] .btn.active { --c: #f7b24a; color: #3b2d20; box-shadow: inset 0 0 0 3px #fff, 0 4px 0 var(--sh); } /* barra laranja de seleção */
:root[data-theme="acnh"] .btn.off { --c: #cfc7b3; background: repeating-linear-gradient(45deg, #d6cfbb 0 8px, #cbc3ae 8px 16px); color: #5b4a30; }
:root[data-theme="acnh"] .badge { color: #fff; background: #e8604c; border: 2px solid #fff; }
/* cabeçalhos dos menus: faixa verde-menta com texto escuro, como as abas do jogo */
:root[data-theme="acnh"] .banner, :root[data-theme="acnh"] #chat h3, :root[data-theme="acnh"] .panel h3 { color: #2d4a3a; text-shadow: none; background: #9be3c0; font-weight: 900; }
:root[data-theme="acnh"] .banner { background: linear-gradient(135deg, #a9c8fa, #9be3c0); }
/* abas: a ativa é a faixa laranja de seleção */
:root[data-theme="acnh"] .tabs { background: #fff3cf; border-bottom: 3px dashed #d9c79a; gap: 8px; }
:root[data-theme="acnh"] .tabbtn { color: #5b4a30; background: #f3e8c4; font-weight: 900; font-size: 13px; border-radius: 14px 14px 0 0; padding: 8px 12px; }
:root[data-theme="acnh"] .tabbtn.active { color: #3b2d20; background: #f7b24a; }
/* linhas das listas com tracejado, como os menus do jogo */
:root[data-theme="acnh"] .pane h4 { color: #2f7d5f; border-bottom: 3px dashed #d9c79a; }
:root[data-theme="acnh"] .row label.t, :root[data-theme="acnh"] .sw b { color: #4a3a26; }
:root[data-theme="acnh"] .row label.t span { color: #75653f; }
:root[data-theme="acnh"] input[type=text], :root[data-theme="acnh"] select { color: #3b2d20; background: #fff; border: 2px solid #d9c79a; font-weight: 700; }
:root[data-theme="acnh"] .lcd { color: #3b2d20; background: #fff8e4; font-weight: 800; }
:root[data-theme="acnh"] #msgs { background-color: #fffaea; }
:root[data-theme="acnh"] .msg { color: #3b2d20; background: #fff; border-radius: 20px; }
:root[data-theme="acnh"] .msg.mine { background: #cfe0ff; } :root[data-theme="acnh"] .msg.theirs { background: #ffe0e8; }
:root[data-theme="acnh"] .tile figcaption { color: #3b2d20; background: #fff8e4; font-weight: 800; }
/* mobile: ícones sobre quadradinhos arredondados, como os apps do celular do jogo */
@media (max-width: 760px), (max-height: 520px) and (pointer: coarse) {
  :root[data-theme="acnh"] #controls .btn { border-radius: 16px; font-size: 20px; }
}


/* ---------- Visual Padrão (retro): botões em cinza, texto escuro, bem legíveis ---------- */
:root:not([data-theme="ps2"]):not([data-theme="acnh"]):not([data-theme="tcg"]) .btn:not(.primary) {
  --c: #d3d5dc; color: #1c1d22; text-shadow: none; border-color: #3a3b44; font-weight: 800;
  box-shadow: inset 0 2px 0 #fff, inset 0 -3px 0 rgba(0,0,0,.12), 0 3px 0 #4a4b55;
}
:root:not([data-theme="ps2"]):not([data-theme="acnh"]):not([data-theme="tcg"]) .btn:not(.primary):hover { filter: brightness(1.05); }
:root:not([data-theme="ps2"]):not([data-theme="acnh"]):not([data-theme="tcg"]) .btn.active:not(.primary) { --c: #fff; box-shadow: inset 0 2px 0 #fff, 0 3px 0 #4a4b55, 0 0 0 3px var(--yellow); }
:root:not([data-theme="ps2"]):not([data-theme="acnh"]):not([data-theme="tcg"]) .btn.off:not(.primary) { background: repeating-linear-gradient(45deg, #8d8f99 0 8px, #7d7f89 8px 16px); color: #fff; text-shadow: 0 1px 0 rgba(0,0,0,.5); }
:root:not([data-theme="ps2"]):not([data-theme="acnh"]):not([data-theme="tcg"]) #hangup { color: #8a1c14; }
:root:not([data-theme="ps2"]):not([data-theme="acnh"]):not([data-theme="tcg"]) #stage.fs .btn { --c: rgba(24,24,28,.78); color: #fff; border-color: rgba(255,255,255,.35); box-shadow: none; }
/* os botões da barra têm cor própria por id; este bloco tem mais força e os deixa cinza */
:root:not([data-theme="ps2"]):not([data-theme="acnh"]):not([data-theme="tcg"]) #controls .btn:not(.primary) {
  --c: #d3d5dc; color: #1c1d22; text-shadow: none; border-color: #3a3b44; font-weight: 800;
  box-shadow: inset 0 2px 0 #fff, inset 0 -3px 0 rgba(0,0,0,.12), 0 3px 0 #4a4b55;
}
:root:not([data-theme="ps2"]):not([data-theme="acnh"]):not([data-theme="tcg"]) #controls .btn:not(.primary):hover { filter: brightness(1.05); }
:root:not([data-theme="ps2"]):not([data-theme="acnh"]):not([data-theme="tcg"]) #controls .btn.active:not(.primary) { --c: #fff; box-shadow: inset 0 2px 0 #fff, 0 3px 0 #4a4b55, 0 0 0 3px var(--yellow); }
:root:not([data-theme="ps2"]):not([data-theme="acnh"]):not([data-theme="tcg"]) #controls .btn.off:not(.primary) { background: repeating-linear-gradient(45deg, #8d8f99 0 8px, #7d7f89 8px 16px); color: #fff; text-shadow: 0 1px 0 rgba(0,0,0,.5); }
:root:not([data-theme="ps2"]):not([data-theme="acnh"]):not([data-theme="tcg"]) #controls #hangup { color: #8a1c14; }


/* ---------- Ícones: cada visual tem o seu estilo (ver icons.js) ---------- */
/* retro = pixel art · PS2 = traço fino com brilho azul · Ilha tranquila = traço grosso e arredondado com miolo suave */
.ico { width: 1.3em; height: 1.3em; vertical-align: middle; flex: none; overflow: visible; }
.ico.k-ps2, .ico.k-acnh { display: none; }
:root[data-theme="ps2"] .ico.k-retro, :root[data-theme="acnh"] .ico.k-retro { display: none; }
:root[data-theme="ps2"] .ico.k-ps2, :root[data-theme="acnh"] .ico.k-acnh { display: inline-block; }
.ico.k-retro { fill: currentColor; }
.ico.k-ps2, .ico.k-acnh { fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; }
.ico.k-ps2 { stroke-width: 1.5; filter: drop-shadow(0 0 3px rgba(110,170,255,.95)); }
.ico.k-acnh { stroke-width: 2.6; }
.ico .f { fill: currentColor; fill-opacity: .28; }
.ico.k-ps2 .f { fill-opacity: .22; }
.ico .s { stroke-width: 2.6; }
.ico.k-ps2 .s { stroke-width: 1.8; }
.btn .ic { display: inline-flex; align-items: center; margin-right: 6px; line-height: 1; vertical-align: middle; }
.btn .ic:empty { display: none; }
.mic-off { color: #ff8a7a; display: inline-flex; }
.mic-off .ico { width: 1.15em; height: 1.15em; vertical-align: 0; }
.tabbtn .ico { width: 1.2em; height: 1.2em; margin-right: 4px; vertical-align: -.25em; }
h3 .ico { margin-right: 6px; }

/* Aviso "aguardando" no cabeçalho: a mensagem fica no status, com cursor piscando */
body.alone #status::after { content: " ▮"; animation: blink 1s steps(2) infinite; }
#status { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#status .w-short { display: none; }
@media (max-width: 760px) { #status .w-long { display: none; } #status .w-short { display: inline; } }

/* ---------- Ilha tranquila: fonte FOT-Bokutoh Pro ---------- */
/* A fonte é licenciada, então não vem junto com o app. Instale-a no computador ou coloque o arquivo
   (FOT-BokutohPro.otf/.ttf/.woff2) na pasta "fonts" ao lado do programa. Sem ela, entra uma fonte arredondada parecida. */
@font-face {
  font-family: "FOT-Bokutoh Pro"; font-display: swap;
  src: local("FOT-Bokutoh Pro"), local("FOT-BokutohPro-DB"), local("FOT-Bokutoh Pro DB"), local("FOT-BokutohPro"),
       url("fonts/FOT-BokutohPro.woff2") format("woff2"),
       url("fonts/FOT-BokutohPro.otf") format("opentype"), url("fonts/FOT-BokutohPro.ttf") format("truetype");
}
:root[data-theme="acnh"] {
  --ui: "FOT-Bokutoh Pro", "Nunito", "Varela Round", "Arial Rounded MT Bold", "Hiragino Maru Gothic ProN", "Segoe UI", system-ui, sans-serif;
  --mono: var(--ui); font-synthesis: none;
}
:root[data-theme="acnh"] body, :root[data-theme="acnh"] button, :root[data-theme="acnh"] input, :root[data-theme="acnh"] select { font-family: var(--ui); }
:root[data-theme="acnh"] .btn, :root[data-theme="acnh"] header h1, :root[data-theme="acnh"] .tabbtn { font-weight: 700; }

/* ---------- PlayStation 2 preto ---------- */
:root[data-theme="ps2"] body {
  background-color: #02030a;
  background-image:
    radial-gradient(ellipse 60% 42% at 50% 108%, rgba(50,100,255,.42), transparent 70%),
    radial-gradient(ellipse 50% 30% at 86% -8%, rgba(100,150,255,.20), transparent 70%),
    linear-gradient(to top, rgba(90,140,255,.30), rgba(90,140,255,.02)),
    linear-gradient(to top, rgba(90,140,255,.22), rgba(90,140,255,.01)),
    linear-gradient(to top, rgba(90,140,255,.16), rgba(90,140,255,.01)),
    linear-gradient(to top, rgba(90,140,255,.24), rgba(90,140,255,.02)),
    linear-gradient(to top, rgba(90,140,255,.28), rgba(90,140,255,.02)),
    linear-gradient(to top, rgba(90,140,255,.18), rgba(90,140,255,.01)),
    linear-gradient(to top, rgba(90,140,255,.20), rgba(90,140,255,.01)),
    radial-gradient(rgba(160,200,255,.14) 1px, transparent 1.6px),
    linear-gradient(180deg, #02030a, #060a22 70%, #02030a);
  background-repeat: no-repeat, no-repeat, no-repeat, no-repeat, no-repeat, no-repeat, no-repeat, no-repeat, no-repeat, repeat, no-repeat;
  background-size: 100% 100%, 100% 100%, 44px 38vh, 30px 52vh, 56px 30vh, 34px 44vh, 60px 56vh, 28px 34vh, 46px 26vh, 46px 46px, 100% 100%;
  background-position: 0 0, 0 0, 6% 100%, 14% 100%, 24% 100%, 70% 100%, 80% 100%, 90% 100%, 97% 100%, 0 0, 0 0;
  background-attachment: fixed;
}
:root[data-theme="ps2"] header {
  background: repeating-linear-gradient(115deg, #0c0d13 0 5px, #161824 5px 7px), #0a0b10;
  border-bottom: 1px solid #3a6bff; padding-top: 5px; padding-bottom: 5px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.14), 0 1px 0 #000, 0 4px 18px rgba(40,90,255,.40);
}
:root[data-theme="ps2"] header h1 { font-size: 13px; font-weight: 300; letter-spacing: .24em; text-transform: uppercase; color: #e8f1ff; text-shadow: 0 0 10px rgba(90,150,255,.95); }
:root[data-theme="ps2"] header h1::before { content: ""; display: inline-block; width: 3px; height: 1em; margin-right: 10px; vertical-align: -.15em; background: #3a6bff; box-shadow: 0 0 8px #3a6bff; }
:root[data-theme="ps2"] .lens { border: 2px solid #cfe6ff; background: radial-gradient(circle, #fff 0 10%, #7fd0ff 12% 30%, #1f4fe0 62%, #071a66 100%); box-shadow: 0 0 0 2px #000, 0 0 14px #3a6bff; }
:root[data-theme="ps2"] .led { display: none; }
:root[data-theme="ps2"] .lcd { border: 1px solid rgba(120,170,255,.55); border-radius: 3px; letter-spacing: .12em; font-weight: 600; box-shadow: inset 0 0 8px rgba(60,110,255,.25); text-shadow: 0 0 6px rgba(120,180,255,.7); }
:root[data-theme="ps2"] .btn {
  background: linear-gradient(#2c3040 0, #12141d 50%, #0a0b11 51%, #191c28 100%);
  border: 1px solid #4a5a92; border-radius: 4px; color: #e8f1ff; font-weight: 600; letter-spacing: .06em; text-shadow: 0 0 6px rgba(120,170,255,.55);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.22), 0 2px 0 #000, 0 0 0 1px #000;
}
:root[data-theme="ps2"] .btn:hover { filter: none; border-color: #7fd0ff; box-shadow: inset 0 1px 0 rgba(255,255,255,.3), 0 0 14px rgba(70,130,255,.75), 0 0 0 1px #000; }
:root[data-theme="ps2"] .btn:active { transform: translateY(1px); }
:root[data-theme="ps2"] .btn.active, :root[data-theme="ps2"] .btn.primary {
  background: linear-gradient(#5b8dff, #1f47c9 55%, #17389f); border-color: #bcd6ff; color: #fff;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.5), 0 0 16px rgba(80,140,255,.85), 0 0 0 1px #000;
}
:root[data-theme="ps2"] .btn.off { background: linear-gradient(#3a1519, #1b080b); border-color: #8a3a42; color: #ff9a9a; text-shadow: none; }
:root[data-theme="ps2"] #hangup, :root[data-theme="ps2"] .btn.danger { background: linear-gradient(#e0424b, #8c1018 55%, #6a0a10); border-color: #ffb3b3; color: #fff; }
:root[data-theme="ps2"] #stage.fs .btn { background: rgba(24,24,28,.78); border: 1px solid rgba(255,255,255,.35); border-radius: 8px; box-shadow: none; text-shadow: none; }
:root[data-theme="ps2"] #stage.fs .btn.off { background: rgba(120,40,40,.85); }
:root[data-theme="ps2"] .card, :root[data-theme="ps2"] #chat, :root[data-theme="ps2"] .panel {
  background: linear-gradient(180deg, rgba(20,25,42,.97), rgba(7,9,17,.98)); border: 1px solid rgba(110,160,255,.5); border-radius: 6px;
  box-shadow: 0 0 0 1px #000, var(--shadow);
}
:root[data-theme="ps2"] .banner, :root[data-theme="ps2"] #chat h3, :root[data-theme="ps2"] .panel h3 {
  background: linear-gradient(90deg, #1f46c9, #0a1030 85%); color: #fff; border-bottom: 1px solid rgba(140,190,255,.6);
  font-weight: 600; letter-spacing: .16em; text-shadow: 0 0 8px rgba(130,180,255,.9);
}
:root[data-theme="ps2"] input[type=text], :root[data-theme="ps2"] select { border: 1px solid #33406e; border-radius: 3px; }
:root[data-theme="ps2"] input[type=text]:focus, :root[data-theme="ps2"] select:focus { border-color: #7fd0ff; box-shadow: 0 0 10px rgba(80,150,255,.6); outline: 0; }
:root[data-theme="ps2"] .field { letter-spacing: .12em; font-weight: 600; }
:root[data-theme="ps2"] #lobby p { color: #9fb0d4; }
:root[data-theme="ps2"] .err { color: #ff8a8a !important; }
:root[data-theme="ps2"] #stage {
  border: 2px solid #1a2036; outline: 1px solid rgba(120,170,255,.5); border-radius: 6px;
  box-shadow: 0 0 40px rgba(40,90,255,.28), inset 0 0 40px rgba(0,0,0,.85);
}
:root[data-theme="ps2"] #sbBg { border-left: 1px solid rgba(120,170,255,.35); }
:root[data-theme="ps2"] .tile { border: 1px solid rgba(120,170,255,.55); border-radius: 3px; box-shadow: 0 0 0 1px #000, 0 0 16px rgba(50,100,255,.25); }
:root[data-theme="ps2"] .tile figcaption { font-weight: 600; letter-spacing: .12em; color: #dbe8ff; background: rgba(5,8,18,.85); border: 1px solid rgba(120,170,255,.6); border-radius: 2px; }
:root[data-theme="ps2"] .tile.scr figcaption { background: #1f47c9; color: #fff; border-color: #bcd6ff; }
:root[data-theme="ps2"] .tile .avatar { background: linear-gradient(160deg, hsl(var(--h, 215) 55% 22%), #05070f); text-shadow: 0 0 14px rgba(120,170,255,.8); }
:root[data-theme="ps2"] #controls { background: linear-gradient(#0c0e15, #05060a); border-top: 1px solid #3a6bff; box-shadow: 0 -4px 18px rgba(40,90,255,.25); }
:root[data-theme="ps2"] .tabs { background: #07080d; border-bottom: 1px solid rgba(120,170,255,.5); }
:root[data-theme="ps2"] .tabbtn { border: 1px solid #33406e; border-bottom: 0; border-radius: 3px 3px 0 0; background: #0d1019; color: #9fb0d4; font-weight: 600; letter-spacing: .1em; }
:root[data-theme="ps2"] .tabbtn.active { background: linear-gradient(#3b6bf0, #1a3bad); color: #fff; border-color: #bcd6ff; box-shadow: 0 0 12px rgba(80,140,255,.7); }
:root[data-theme="ps2"] .pane h4 { letter-spacing: .16em; font-weight: 600; border-bottom: 1px solid #2a3560; }
:root[data-theme="ps2"] .meter { border: 1px solid #33406e; border-radius: 2px; background: #05070d; }
:root[data-theme="ps2"] .meter i { background: linear-gradient(90deg, #1f47c9, #7fd0ff); }
:root[data-theme="ps2"] #msgs { background-color: #0a0d16; }
:root[data-theme="ps2"] .msg { border: 1px solid #2a3560; border-radius: 4px; }
:root[data-theme="ps2"] .msg.mine { border-color: #3a6bff; }
:root[data-theme="ps2"] .msg.sys { color: #7fd0ff; background: transparent; border: 1px dashed rgba(127,208,255,.5); }
:root[data-theme="ps2"] .badge { background: #2f5fe6; border: 1px solid #bcd6ff; }
:root[data-theme="ps2"] #sbHandle::before { background: #3a6bff; border: 1px solid #bcd6ff; box-shadow: 0 0 8px #3a6bff; }
:root[data-theme="ps2"] .tile.speaking { box-shadow: 0 0 0 2px #7fd0ff, 0 0 20px 3px rgba(80,170,255,.9); }
:root[data-theme="ps2"] #toast { background: rgba(10,18,50,.92); color: #cfe6ff; }


/* ---------- Carta de Pokémon TCG ---------- */
/* Inspirado nas cartas: moldura dourada, plaquinha de nome, janela de arte, caixa de ataques em pergaminho,
   símbolos de energia nos botões, barra de PS e brilho "holo". Só cores e formas (sem imagens nem logotipos). */
:root[data-theme="tcg"] {
  --bg: #14398f; --dots: rgba(255,235,150,.10);
  --hd: #f7efc9; --hd-sh: #c9a000; --hd-ink: #1b1b1b; --hd-line: #c9a000; --hd-tsh: rgba(255,255,255,.8);
  --acc: #d2302a; --acc-ink: #fff; --tsh: 0 1px 0 rgba(255,255,255,.7);
  --panel: #fbf3d9; --panel-ink: #1b1b1b; --muted: #6b5f33; --line: #7a5f00; --h4: #d2302a;
  --bar: #efe0a6; --bar-line: #7a5f00;
  --field: #fffef6; --field-ink: #1b1b1b; --fbd: #7a5f00;
  --btn: #f1e4b6; --btn-ink: #1b1b1b; --btn-sh: #7a5f00; --btn-hi: inset 0 0 0 2px #fff4b0;
  --bezel: #f6c90e; --stage: #0b0b10; --sbbg: rgba(10,20,60,.45);
  --msg: #fffef6; --mine: #fff0a8; --theirs: #e4efff; --link: #1d4fb8;
  --lcd: #fffef6; --lcd-d: #c4221b;
  --shadow: 0 12px 34px rgba(0,0,0,.5);
  --red-d: #c4221b; --yellow: #f6c90e; --speak: #ffcb05;
  --ui: "Gill Sans", "Gill Sans MT", "Trebuchet MS", "Segoe UI", system-ui, sans-serif;
  --mono: var(--ui);
  color-scheme: light;
}
.ico.k-tcg { display: none; }
:root[data-theme="tcg"] .ico.k-retro, :root[data-theme="tcg"] .ico.k-ps2, :root[data-theme="tcg"] .ico.k-acnh { display: none; }
:root[data-theme="tcg"] .ico.k-tcg { display: inline-block; fill: none; stroke: currentColor; stroke-width: 2.8; stroke-linecap: round; stroke-linejoin: round; }

:root[data-theme="tcg"] body {
  background-color: #14398f;
  background-image:
    radial-gradient(circle at 50% 46%, transparent 0 17%, rgba(255,255,255,.16) 17.3% 17.9%, transparent 18.3% 24%, rgba(255,255,255,.08) 24.3% 24.8%, transparent 25.2%),
    repeating-conic-gradient(from 20deg at 50% 46%, rgba(255,255,255,.055) 0 7deg, transparent 7deg 14deg),
    radial-gradient(circle, rgba(255,235,150,.40) 1px, transparent 1.6px),
    radial-gradient(ellipse at 50% 40%, #3a78ec 0%, #1d4fb8 38%, #0c2670 78%, #071a52 100%);
  background-size: 100% 100%, 100% 100%, 54px 54px, 100% 100%;
  background-attachment: fixed;
}
:root[data-theme="tcg"] header {
  background: linear-gradient(#fffbe2, #efe0a6); color: #1b1b1b; border-bottom: 4px solid #c9a000;
  box-shadow: inset 0 -2px 0 #fff6c8, 0 4px 0 #7a5f00, 0 6px 14px rgba(0,0,0,.35);
}
:root[data-theme="tcg"] header h1 { font-size: 16px; font-weight: 900; letter-spacing: .02em; color: #1b1b1b; text-shadow: 0 1px 0 #fff; }
:root[data-theme="tcg"] .led { display: none; }
:root[data-theme="tcg"] .lens {
  border: 2px solid #1b1b1b; box-shadow: 0 1px 0 rgba(0,0,0,.35);
  background: radial-gradient(circle, #fff 0 17%, #1b1b1b 18% 31%, transparent 32%), linear-gradient(#e3350d 0 43%, #1b1b1b 43% 57%, #fff 57%);
}
:root[data-theme="tcg"] .lcd { border: 2px solid #7a5f00; border-radius: 999px; padding: 1px 12px; font-weight: 900; letter-spacing: .03em; text-transform: none; color: #c4221b; background: #fffef6; box-shadow: inset 0 0 0 2px #fff4b0; }
:root[data-theme="tcg"] .btn {
  background: linear-gradient(#fffdf0, #f1e4b6); color: #1b1b1b; border: 2px solid #7a5f00; border-radius: 10px; font-weight: 800; letter-spacing: 0; text-shadow: none;
  box-shadow: inset 0 0 0 2px #fff4b0, 0 3px 0 #7a5f00;
}
:root[data-theme="tcg"] .btn:hover { filter: none; background: linear-gradient(#ffffff, #ffeaa0); }
:root[data-theme="tcg"] .btn:active { transform: translateY(2px); box-shadow: inset 0 0 0 2px #fff4b0, 0 1px 0 #7a5f00; }
:root[data-theme="tcg"] .btn.active { background: linear-gradient(#ffe266, #f0b800); }
:root[data-theme="tcg"] .btn.primary, :root[data-theme="tcg"] #hangup, :root[data-theme="tcg"] .btn.danger {
  background: linear-gradient(#f0675c, #c4221b); color: #fff; border-color: #6e130e; text-shadow: 0 1px 0 rgba(0,0,0,.35);
  box-shadow: inset 0 0 0 2px #ff9b90, 0 3px 0 #6e130e;
}
:root[data-theme="tcg"] .btn.off { background: linear-gradient(#d9d2b8, #bdb596); color: #5f5840; border-color: #6b6450; box-shadow: inset 0 0 0 2px #ece6cf, 0 3px 0 #6b6450; }
/* símbolo de energia: o ícone vai dentro de uma bolinha colorida, como nas cartas */
:root[data-theme="tcg"] .btn .ic {
  --en: #8a96a8; width: 26px; height: 26px; justify-content: center; margin-right: 7px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, rgba(255,255,255,.7), transparent 45%), var(--en); border: 2px solid #1b1b1b; color: #fff;
  box-shadow: 0 1px 0 rgba(0,0,0,.35);
}
:root[data-theme="tcg"] .btn .ic .ico { width: 17px; height: 17px; stroke-width: 2.6; filter: drop-shadow(0 0 .6px #000); }
:root[data-theme="tcg"] .btn .ic:empty { display: none; }
:root[data-theme="tcg"] #mic { --c: #fff; } :root[data-theme="tcg"] #mic .ic { --en: #f5c518; color: #1b1b1b; } :root[data-theme="tcg"] #mic .ic .ico { filter: none; }
:root[data-theme="tcg"] #cam .ic { --en: #2f7de1; }
:root[data-theme="tcg"] #screen .ic { --en: #8e5bd9; }
:root[data-theme="tcg"] #pip .ic { --en: #3fae49; }
:root[data-theme="tcg"] #chatBtn .ic { --en: #e3450d; }
:root[data-theme="tcg"] #cfgBtn .ic { --en: #8a96a8; }
:root[data-theme="tcg"] #hideUi .ic { --en: #1b1b1b; }
:root[data-theme="tcg"] #hangup .ic { --en: #7a1a14; }
:root[data-theme="tcg"] .btn.mini .ic { --en: #c9a000; width: 21px; height: 21px; margin-right: 5px; }
:root[data-theme="tcg"] .btn.mini .ic .ico { width: 13px; height: 13px; }
:root[data-theme="tcg"] .btn.primary .ic { --en: #7a1a14; }
:root[data-theme="tcg"] .btn.mini:not(:has(.lbl)) .ic { margin-right: 0; }
:root[data-theme="tcg"] #stage.fs .btn { background: rgba(24,24,28,.78); color: #fff; border: 1px solid rgba(255,255,255,.35); border-radius: 8px; box-shadow: none; }
:root[data-theme="tcg"] #stage.fs .btn .ic { background: none; border: 0; box-shadow: none; width: auto; height: auto; }
:root[data-theme="tcg"] #stage.fs .btn.off { background: rgba(120,40,40,.85); }
:root[data-theme="tcg"] #controls { background: linear-gradient(#f3e6bd, #e3d08a); border-top: 4px solid #c9a000; box-shadow: inset 0 2px 0 #fff6c8, 0 -4px 14px rgba(0,0,0,.35); }
:root[data-theme="tcg"] #stage {
  border: 8px solid #f6c90e; border-radius: 16px;
  box-shadow: 0 0 0 3px #7a5f00, inset 0 0 0 3px #fff2a0, inset 0 0 0 5px #b38f00, 0 12px 30px rgba(0,0,0,.5);
}
:root[data-theme="tcg"] #stage.fs { border: 0; border-radius: 0; box-shadow: none; }
:root[data-theme="tcg"] #sbBg { border-left: 3px solid #b38f00; }
:root[data-theme="tcg"] .tile { border: 3px solid #f6c90e; border-radius: 9px; box-shadow: 0 0 0 2px #7a5f00, inset 0 0 0 2px #fff2a0; }
:root[data-theme="tcg"] .tile figcaption { font-weight: 900; color: #1b1b1b; background: linear-gradient(#fffbe2, #efe0a6); border: 2px solid #7a5f00; border-radius: 7px; letter-spacing: 0; text-transform: none; }
:root[data-theme="tcg"] .tile.scr figcaption { background: linear-gradient(#f0675c, #c4221b); color: #fff; border-color: #6e130e; }
:root[data-theme="tcg"] .tile .avatar { background: linear-gradient(160deg, hsl(var(--h, 215) 65% 52%), hsl(var(--h, 215) 65% 28%)); text-shadow: 0 2px 0 rgba(0,0,0,.4); }
:root[data-theme="tcg"] .tile.speaking { box-shadow: 0 0 0 2px #7a5f00, 0 0 0 5px #fff, 0 0 22px 6px rgba(255,203,5,.95); }
/* brilho "holo" que passa pela carta ao passar o mouse */
:root[data-theme="tcg"] .tile::after {
  content: ""; position: absolute; inset: 0; z-index: 4; pointer-events: none; border-radius: inherit; opacity: 0;
  background: linear-gradient(115deg, transparent 18%, rgba(255,0,128,.20) 30%, rgba(255,230,0,.24) 40%, rgba(0,255,170,.20) 50%, rgba(0,140,255,.24) 60%, rgba(170,0,255,.20) 70%, transparent 82%);
  background-size: 260% 100%; background-position: 100% 0; mix-blend-mode: color-dodge; transition: opacity .25s, background-position .7s;
}
:root[data-theme="tcg"] .tile:hover::after { opacity: .95; background-position: 0 0; }
:root[data-theme="tcg"] #stage.fs .tile::after { display: none; }
:root[data-theme="tcg"] .card, :root[data-theme="tcg"] #chat, :root[data-theme="tcg"] .panel {
  background: linear-gradient(#fffbe8, #f3e6bd); color: #1b1b1b; border: 6px solid #f6c90e; border-radius: 16px;
  box-shadow: 0 0 0 3px #7a5f00, inset 0 0 0 2px #fff2a0, var(--shadow);
}
:root[data-theme="tcg"] .banner, :root[data-theme="tcg"] #chat h3, :root[data-theme="tcg"] .panel h3 {
  background: linear-gradient(#fffbe2, #efe0a6); color: #1b1b1b; border-bottom: 3px solid #c9a000; font-weight: 900; letter-spacing: .02em; text-shadow: 0 1px 0 #fff;
}
:root[data-theme="tcg"] .banner { text-transform: none; font-size: 20px; }
:root[data-theme="tcg"] #lobby p { color: #6b5f33; font-weight: 600; }
:root[data-theme="tcg"] .field { font-weight: 900; letter-spacing: .04em; }
:root[data-theme="tcg"] input[type=text], :root[data-theme="tcg"] select { border: 2px solid #7a5f00; border-radius: 8px; box-shadow: inset 0 2px 0 rgba(0,0,0,.06); }
:root[data-theme="tcg"] input[type=text]:focus, :root[data-theme="tcg"] select:focus { outline: 0; border-color: #d2302a; box-shadow: 0 0 0 3px rgba(246,201,14,.8); }
:root[data-theme="tcg"] input[type=range], :root[data-theme="tcg"] input[type=checkbox] { accent-color: #d2302a; }
:root[data-theme="tcg"] .tabs { background: #efe0a6; border-bottom: 3px solid #c9a000; }
:root[data-theme="tcg"] .tabbtn { background: #fffef6; color: #1b1b1b; border: 2px solid #7a5f00; border-bottom: 0; border-radius: 9px 9px 0 0; font-weight: 800; }
:root[data-theme="tcg"] .tabbtn.active { background: linear-gradient(#ffe266, #f0b800); color: #1b1b1b; }
/* títulos de seção viram a fitinha vermelha de "Habilidade" */
:root[data-theme="tcg"] .pane h4 { display: inline-block; border: 0; padding: 3px 14px 3px 10px; border-radius: 4px 14px 14px 4px; background: linear-gradient(90deg, #c4221b, #f0675c); color: #fff; text-transform: uppercase; letter-spacing: .08em; font-size: 11px; text-shadow: 0 1px 0 rgba(0,0,0,.3); }
:root[data-theme="tcg"] .meter { border: 2px solid #7a5f00; border-radius: 999px; background: #fffef6; }
:root[data-theme="tcg"] .meter i { background: linear-gradient(90deg, #3fae49, #b6e04a); }
:root[data-theme="tcg"] #msgs { background-color: #f6ecc8; }
:root[data-theme="tcg"] .msg { border: 2px solid #7a5f00; border-radius: 10px; }
:root[data-theme="tcg"] .msg.sys { background: #1d4fb8; color: #fff; border: 2px dashed #bcd6ff; }
:root[data-theme="tcg"] .badge { background: #d2302a; border: 2px solid #fff; }
:root[data-theme="tcg"] #sbHandle::before { background: #f6c90e; border: 2px solid #7a5f00; }
:root[data-theme="tcg"] .err { color: #c4221b !important; }
:root[data-theme="tcg"] #toast { background: #fffef6; color: #1b1b1b; border: 3px solid #7a5f00; }
:root[data-theme="tcg"] .tile .vol { background: #fffef6; color: #1b1b1b; border: 2px solid #7a5f00; }
:root[data-theme="tcg"] .tile .vol input[type=range] { accent-color: #d2302a; }

/* ---------- Esconder controles (celular) ---------- */
#hideUi { display: none; }
#imm { display: none; }
body.immersive header, body.immersive #controls { display: none; }
body.immersive #imm { display: flex; position: fixed; top: 8px; right: 8px; z-index: 30; gap: 6px; opacity: .75; }
body.immersive #imm:hover, body.immersive #imm:focus-within { opacity: 1; }
body.immersive #stage { margin: 0 !important; border: 0 !important; outline: 0 !important; border-radius: 0 !important; box-shadow: none !important; }
body.immersive #stage::after { display: none; }
body.immersive.is-mosaic .tile figcaption { font-size: 10px; }
body.immersive #stage .btn { box-shadow: 0 2px 6px rgba(0,0,0,.5); }

/* Volume sobre a tela compartilhada (aparece ao passar o mouse; sempre visível em telas de toque) */
.tile .vol { position: absolute; top: 8px; left: 8px; z-index: 6; display: flex; align-items: center; gap: 6px; padding: 4px 8px 4px 4px;
  background: rgba(10,10,12,.78); border: 1px solid rgba(255,255,255,.35); border-radius: 999px; color: #fff; opacity: 0; transition: opacity .15s; }
.tile:hover .vol, .tile .vol:focus-within, .tile .vol.show { opacity: 1; }
@media (hover: none) { .tile .vol { opacity: .9; } }
.tile .vol[hidden] { display: none; }
.tile .vol .volbtn { all: unset; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 50%; font-size: 15px; }
.tile .vol .volbtn:hover { background: rgba(255,255,255,.18); }
.tile .vol .volbtn:disabled, .tile .vol input:disabled { cursor: not-allowed; opacity: .5; }
.tile .vol input[type=range] { width: 96px; margin: 0; accent-color: #fff; cursor: pointer; }
#sb .tile .vol { display: none; }
:root[data-theme="ps2"] .tile .vol { border-color: rgba(120,170,255,.7); background: rgba(5,8,18,.85); box-shadow: 0 0 10px rgba(60,120,255,.4); }
:root[data-theme="ps2"] .tile .vol input[type=range] { accent-color: #7fd0ff; }
:root[data-theme="acnh"] .tile .vol { background: #fff8e6; color: #5a4632; border: 3px solid #fff; box-shadow: 0 2px 0 rgba(0,0,0,.18); }
:root[data-theme="acnh"] .tile .vol input[type=range] { accent-color: #5aa17a; }
@media (max-width: 760px) { .tile .vol input[type=range] { width: 72px; } }
