/* Dino Brawl. #app is a fixed 540px-high "logical screen" (800..1170 wide) that main.js layout() scales (and rotates in portrait)
   to fit, so every size in here is in logical px. */
:root { --ink: #3a2418; --soft: #8a6a55; --accent: #ff7a3d; --accent-d: #c9541c; --card: #fff8ec; --card2: #f3e4cc; --gold: #ffb627;
  --fire: #ff7a3d; --leaf: #62c94a; --water: #44b0ff; --light: #ffcf33; --dark: #9a6cf0; --c: var(--accent); }
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
html, body { margin: 0; height: 100%; overflow: hidden; background: #1c1410; overscroll-behavior: none; }
body { font-family: 'Mali', 'Sukhumvit Set', Thonburi, system-ui, sans-serif; font-weight: 600; color: var(--ink); touch-action: none; position: fixed; inset: 0; }
#app { position: absolute; left: 0; top: 0; transform-origin: 0 0; overflow: hidden; background: #2b1d16; }
#cv { position: absolute; left: 0; top: 0; display: block; }
#ui, #pad { position: absolute; inset: 0; }
#ui { pointer-events: none; } #ui > * { pointer-events: auto; }
[hidden] { display: none !important; }
button { font: inherit; color: inherit; border: 0; cursor: pointer; touch-action: manipulation; background: none; padding: 0; }
h2, h3 { margin: 0; }
.el-fire { --c: var(--fire); } .el-leaf { --c: var(--leaf); } .el-water { --c: var(--water); } .el-light { --c: var(--light); } .el-dark { --c: var(--dark); }

.btn { background: var(--accent); color: #fff; font-weight: 700; font-size: 18px; padding: 9px 18px; border-radius: 16px; box-shadow: 0 5px 0 var(--accent-d); transition: transform .06s; white-space: nowrap; }
.btn:active { transform: translateY(4px); box-shadow: 0 1px 0 var(--accent-d); }
.btn.alt { background: #fff; color: var(--ink); box-shadow: 0 5px 0 #d9c3a6; }
.btn.alt:active { box-shadow: 0 1px 0 #d9c3a6; }
.btn.big { font-size: 22px; padding: 11px 26px; }
.btn.sm { font-size: 15px; padding: 7px 13px; border-radius: 13px; }
.btn.dis { filter: grayscale(.9); opacity: .6; }
.row { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
/* keyboard / gamepad focus ring (only after a key or pad was used) */
body.kbd .f.foc { outline: 4px solid #ffe27a; outline-offset: 3px; box-shadow: 0 0 0 9px rgba(255,226,122,.35); z-index: 3; position: relative; }
body.kbd .f.foc.stc, body.kbd .f.foc.pc { transform: translateY(-4px); }
.hint { color: rgba(255,255,255,.75); font-size: 14px; margin: 0; text-shadow: 0 2px 0 rgba(0,0,0,.4); }
.note { color: var(--soft); font-size: 13.5px; margin: 6px 0 0; line-height: 1.35; }
.toast { position: absolute; left: 50%; top: 70px; transform: translateX(-50%); background: var(--ink); color: #ffe27a; padding: 8px 20px; border-radius: 18px; font-size: 18px; z-index: 80; animation: pop .2s; pointer-events: none; }

/* ---------- loading ---------- */
#load { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; background: #2b1d16; color: #ffe27a; }
#load h1 { font-size: 60px; margin: 0; letter-spacing: 3px; }
#load p { margin: 0 0 22px; font-size: 22px; color: #fff; }
#load .bar { width: 340px; height: 14px; background: #4a3426; border-radius: 9px; overflow: hidden; }
#load .bar i { display: block; height: 100%; width: 0; background: var(--accent); transition: width .15s; }

/* ---------- generic screen ---------- */
.scr { position: absolute; inset: 0; display: flex; flex-direction: column; padding: 10px max(16px, env(safe-area-inset-left)) 12px max(16px, env(safe-area-inset-right)); gap: 10px; }
.hdr { display: flex; align-items: center; gap: 14px; color: #fff; flex: none; }
.hdr h2 { font-size: 28px; flex: 1; color: #ffe27a; text-shadow: 0 3px 0 rgba(0,0,0,.35); }
.hint2 { font-size: 13px; color: rgba(255,255,255,.7); }
.panel { background: var(--card); border-radius: 20px; padding: 10px 14px; box-shadow: 0 6px 0 rgba(0,0,0,.3); min-height: 0; }
.panel h3 { font-size: 19px; margin-bottom: 6px; }
.seg { display: inline-flex; background: #e6d5bd; border-radius: 13px; padding: 4px; gap: 4px; }
.seg button { border-radius: 10px; padding: 4px 14px; font-size: 15px; font-weight: 700; color: var(--soft); }
.seg button.on { background: #fff; color: var(--ink); box-shadow: 0 2px 0 #cdb696; }
.opt { display: flex; align-items: center; gap: 10px; margin: 4px 0; }
.opt > span { font-size: 15px; min-width: 82px; }

/* ---------- title ---------- */
#title, #modes { background: linear-gradient(rgba(30,16,10,.3), rgba(30,16,10,.7)); }
#title { align-items: center; justify-content: center; gap: 18px; }
.logo { text-align: center; transform: rotate(-3deg); animation: logoIn .5s cubic-bezier(.2,1.6,.4,1) both; }
.logo small { display: inline-block; background: var(--ink); color: #ffe27a; font-size: 22px; padding: 2px 18px; border-radius: 20px; }
.logo h1 { margin: 4px 0 0; font-size: 100px; line-height: .86; color: #ffd23d; letter-spacing: 3px;
  text-shadow: 3px 3px 0 var(--ink), -3px 3px 0 var(--ink), 3px -3px 0 var(--ink), -3px -3px 0 var(--ink), 0 3px 0 var(--ink), 3px 0 0 var(--ink), -3px 0 0 var(--ink), 0 -3px 0 var(--ink), 0 9px 0 var(--accent-d), 3px 12px 0 var(--ink), -3px 12px 0 var(--ink), 0 13px 0 var(--ink); }
@keyframes logoIn { from { transform: rotate(-12deg) scale(.3); opacity: 0; } }
#title > .btn.big { font-size: 28px; padding: 12px 44px; }

/* ---------- mode select ---------- */
.mcards { flex: 1; display: flex; gap: 18px; align-items: center; justify-content: center; }
.mcard { width: 250px; height: 330px; background: var(--card); border-radius: 26px; display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 20px 14px;
  box-shadow: 0 8px 0 rgba(0,0,0,.35); border: 5px solid #fff; transition: transform .1s; }
.mcard:active { transform: scale(.97); }
.mcard em { font-style: normal; font-size: 64px; line-height: 1.1; }
.mcard b { font-size: 32px; }
.mcard span { font-size: 16px; color: var(--soft); text-align: center; line-height: 1.4; flex: 1; }
.mcard small { background: var(--ink); color: #ffe27a; border-radius: 12px; padding: 3px 12px; font-size: 14px; }

/* ---------- setup ---------- */
.setup { background: linear-gradient(#3a2a4a, #2b1d16); }
.cols { flex: 1; display: flex; gap: 12px; min-height: 0; }
.team { width: 40%; flex: none; display: flex; flex-direction: column; }
.mems { display: flex; flex-direction: column; gap: 6px; margin-top: 6px; flex: 1; min-height: 0; }
.mem { display: flex; align-items: center; gap: 10px; background: #fff; border-radius: 16px; padding: 2px 12px 2px 4px; text-align: left; border-left: 8px solid var(--c); box-shadow: 0 3px 0 #e2cdb0; }
.mem canvas { width: 76px; height: 61px; flex: none; }
.mem span { flex: 1; min-width: 0; } .mem b { display: block; font-size: 19px; } .mem small { font-size: 13px; color: var(--soft); }
.tag { font-style: normal; font-weight: 700; font-size: 14px; color: #fff; background: var(--ink); border-radius: 9px; padding: 2px 9px; }
.tag.t-P1 { background: #ff5a4d; } .tag.t-P2 { background: #3f9dff; } .tag.t-CPU { background: #8a7a6a; }
.side { flex: 1; display: flex; flex-direction: column; }
.sgrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; flex: 1; align-content: start; }
.stc { position: relative; background: #fff; border-radius: 14px; padding: 5px; text-align: left; box-shadow: 0 4px 0 #e2cdb0; border: 4px solid transparent; transition: transform .1s; }
.stc canvas { width: 100%; aspect-ratio: 2 / 1; display: block; border-radius: 9px; }
.stc b { display: block; font-size: 15px; margin: 3px 2px 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stc .stars { position: absolute; right: 9px; top: 9px; background: rgba(0,0,0,.45); border-radius: 9px; padding: 0 5px; font-size: 13px; }
.stars i { font-style: normal; color: rgba(255,255,255,.35); } .stars i.on { color: #ffd23d; }
.stc.on { border-color: var(--accent); transform: translateY(-3px); }
.stc.locked canvas { filter: grayscale(1) brightness(.6); }
.stc.locked em { position: absolute; left: 50%; top: 32%; transform: translate(-50%, -50%); font-style: normal; font-size: 34px; }
.best { display: flex; gap: 10px; margin: 8px 0; }
.best div { flex: 1; background: #fff; border-radius: 14px; padding: 10px; text-align: center; box-shadow: 0 3px 0 #e2cdb0; }
.best div.on { outline: 4px solid var(--accent); }
.best span { display: block; color: var(--soft); font-size: 15px; } .best b { font-size: 30px; }
.foot { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex: none; background: rgba(255,248,236,.95); border-radius: 18px; padding: 8px 14px; }

/* vs */
.vgrid { flex: 1; display: grid; grid-template-columns: repeat(4, 1fr); grid-template-rows: 1fr 1fr; gap: 10px; min-height: 0; }
.vslot { background: var(--card); border-radius: 16px; border-top: 8px solid var(--tc); display: flex; flex-direction: column; padding: 5px 8px 7px; gap: 4px; min-height: 0; box-shadow: 0 5px 0 rgba(0,0,0,.3); }
.vslot.off { background: rgba(255,248,236,.35); }
.vh { display: flex; align-items: center; gap: 8px; } .vh b { font-size: 18px; width: 22px; }
.vctl { flex: 1; border-radius: 10px; padding: 3px 0; font-weight: 700; font-size: 16px; background: #e6d5bd; }
.vctl.c-p1 { background: #ff5a4d; color: #fff; } .vctl.c-p2 { background: #3f9dff; color: #fff; } .vctl.c-cpu { background: #5d6b7a; color: #fff; }
.vdino { flex: 1; min-height: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; background: #fff; border-radius: 12px;
  background-image: radial-gradient(circle at 50% 45%, color-mix(in srgb, var(--c) 40%, #fff) 0, #fff 70%); }
.vdino canvas { height: 72px; width: 104px; } .vdino span { font-size: 15px; font-weight: 700; }
.vrow { display: flex; gap: 6px; } .vrow button { flex: 1; border-radius: 10px; padding: 3px 0; font-size: 14px; font-weight: 700; background: var(--tc); color: #fff; }
.vrow .vlv { background: #5d6b7a; }
.voff { flex: 1; display: flex; align-items: center; justify-content: center; color: rgba(255,255,255,.6); font-size: 18px; }
.arenas { display: flex; align-items: center; gap: 8px; } .arenas > span { font-size: 15px; }
.ar { border-radius: 10px; padding: 3px; border: 3px solid transparent; background: #fff; display: flex; flex-direction: column; align-items: center; }
.ar canvas { width: 84px; height: 42px; border-radius: 6px; display: block; } .ar small { font-size: 11px; white-space: nowrap; max-width: 84px; overflow: hidden; }
.ar.on { border-color: var(--accent); }
.gocol { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }
.err { margin: 0; color: #d33; font-size: 14px; }

/* ---------- fighter pick ---------- */
.pick { background: linear-gradient(#3a2a4a, #2b1d16); }
.pgrid { width: 52%; flex: none; display: grid; grid-template-columns: repeat(4, 1fr); grid-template-rows: 1fr 1fr; gap: 10px; }
.pc { position: relative; background: var(--card); border-radius: 18px; border: 5px solid transparent; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 2px;
  background-image: radial-gradient(circle at 50% 40%, color-mix(in srgb, var(--c) 45%, #fff) 0, var(--card) 72%); box-shadow: 0 5px 0 rgba(0,0,0,.35); transition: transform .1s; min-height: 0; }
.pc canvas { width: 100%; max-width: 140px; aspect-ratio: 160 / 128; }
.pc b { font-size: 18px; line-height: 1.1; } .pc small { font-size: 12px; color: var(--soft); }
.pc.on { border-color: var(--c); box-shadow: 0 5px 0 rgba(0,0,0,.35), 0 0 0 3px #fff; }
.info { flex: 1; border-left: 12px solid var(--c); display: flex; flex-direction: column; gap: 5px; }
.info h3 { font-size: 28px; line-height: 1.1; margin: 0; } .info h3 small { font-size: 16px; color: var(--soft); margin-left: 6px; }
.badges { display: flex; gap: 6px; flex-wrap: wrap; } .badges span { background: #e6d5bd; border-radius: 9px; padding: 1px 9px; font-size: 13.5px; }
.badges .role { background: var(--ink); color: #ffe27a; } .badges .elb { background: var(--c); color: #fff; }
.info .tip { margin: 0; font-size: 15px; color: var(--soft); line-height: 1.35; }
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 3px 16px; }
.stat { display: flex; align-items: center; gap: 8px; font-size: 14px; } .stat span { width: 64px; }
.stat i { display: flex; gap: 3px; } .stat b { width: 18px; height: 11px; border-radius: 4px; background: #e6d5bd; } .stat b.on { background: var(--c); }
.sks { display: flex; flex-direction: column; gap: 4px; }
.sk { display: flex; align-items: center; gap: 8px; background: #fff; border-radius: 11px; padding: 3px 10px; font-size: 15px; }
.sk b { flex: 1; } .sk em { font-style: normal; font-size: 13px; color: #fff; background: #3f7dd8; border-radius: 8px; padding: 0 7px; }
.seq { font-size: 13px; color: var(--soft); } .seq i { font-style: normal; background: var(--ink); color: #fff; border-radius: 6px; padding: 0 5px; margin: 0 1px; }
.pfoot { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; margin-top: auto; }
.pfoot .note { margin: 0; font-size: 12.5px; }

/* ---------- touch controls ---------- */
#stickZone { position: absolute; left: 0; top: 80px; bottom: 0; width: 44%; }
#stick { position: absolute; left: 130px; top: 405px; width: 136px; height: 136px; margin: -68px 0 0 -68px; border-radius: 50%; pointer-events: none;
  background: rgba(255,255,255,.12); border: 3px solid rgba(255,255,255,.4); opacity: .5; transition: opacity .15s; }
#stick.on { opacity: 1; }
#stick i { position: absolute; left: 50%; top: 50%; width: 62px; height: 62px; margin: -31px; border-radius: 50%; background: rgba(255,255,255,.78); box-shadow: 0 3px 0 rgba(0,0,0,.25); }
#stick b { position: absolute; left: 0; right: 0; top: -26px; text-align: center; color: #fff; font-size: 14px; opacity: 0; text-shadow: 0 2px 0 rgba(0,0,0,.5); }
#stick.run { border-color: #ffd23d; box-shadow: 0 0 0 6px rgba(255,210,61,.35); } #stick.run b { opacity: 1; } #stick.run i { background: #ffd23d; }
.pb { position: absolute; border-radius: 50%; font-weight: 700; font-size: 22px; color: #fff; background: color-mix(in srgb, var(--k) 62%, transparent);
  border: 4px solid rgba(255,255,255,.8); text-shadow: 0 2px 0 rgba(0,0,0,.45); box-shadow: 0 5px 0 rgba(0,0,0,.25); touch-action: none; }
.pb.on { transform: scale(.9); background: var(--k); box-shadow: 0 0 0 6px rgba(255,255,255,.35); }
#bA { --k: #ff5a4d; width: 112px; height: 112px; right: calc(128px + env(safe-area-inset-right)); bottom: 22px; font-size: 26px; }
#bJ { --k: #44b0ff; width: 96px; height: 96px; right: calc(18px + env(safe-area-inset-right)); bottom: 104px; }
#bG { --k: #5d6b7a; width: 88px; height: 88px; right: calc(254px + env(safe-area-inset-right)); bottom: 18px; }
.pb.sk { --k: #8a5cf0; width: 74px; height: 74px; font-size: 12.5px; line-height: 1.1; border-width: 3px; padding: 0 4px; }
.pb.sk span { display: block; overflow: hidden; max-height: 2.3em; }
.pb.sk::before { content: attr(data-sk); position: absolute; left: -2px; top: -4px; width: 22px; height: 22px; border-radius: 50%; background: #fff; color: #8a5cf0; font-size: 13px; line-height: 22px; text-shadow: none; }
.pb.sk.nomp { filter: grayscale(1); opacity: .45; }
#bS1 { right: calc(272px + env(safe-area-inset-right)); bottom: 126px; }
#bS2 { right: calc(190px + env(safe-area-inset-right)); bottom: 156px; }
#bS3 { right: calc(106px + env(safe-area-inset-right)); bottom: 214px; }
#bS4 { right: calc(20px + env(safe-area-inset-right)); bottom: 218px; }
#bPause { position: absolute; right: calc(10px + env(safe-area-inset-right)); top: 10px; width: 46px; height: 42px; border-radius: 12px; background: rgba(255,255,255,.6); font-size: 18px; z-index: 20; box-shadow: 0 3px 0 rgba(0,0,0,.25); }

/* ---------- modal ---------- */
#modal { position: absolute; inset: 0; display: none; align-items: center; justify-content: center; background: rgba(30,16,10,.6); z-index: 50; }
#modal.on { display: flex; }
#modal .box { background: var(--card); border-radius: 26px; padding: 14px 26px 18px; min-width: 400px; max-width: 760px; max-height: 520px; text-align: center; animation: pop .22s cubic-bezier(.2,1.5,.4,1);
  display: flex; flex-direction: column; gap: 9px; align-items: center; border: 5px solid #fff; box-shadow: 0 10px 0 rgba(0,0,0,.3); }
#modal .box.wide { width: 92%; max-width: 900px; padding: 10px 20px 14px; gap: 6px; }
#modal h2 { font-size: 32px; }
#modal .tip { margin: 0; color: var(--soft); font-size: 17px; }
#modal .btn.big { min-width: 240px; }
#modal .new { margin: 0; color: #e0561b; font-size: 19px; font-weight: 700; }
@keyframes pop { from { transform: scale(.6); opacity: 0; } }
.rart { display: flex; gap: 4px; margin: -4px 0 -10px; } .rart canvas { width: 130px; height: 104px; }
.rstats { display: flex; gap: 10px; }
.rstats div { background: #fff; border-radius: 14px; padding: 5px 16px; box-shadow: 0 3px 0 #e2cdb0; min-width: 96px; }
.rstats span { display: block; font-size: 13px; color: var(--soft); } .rstats b { font-size: 24px; }
.help { text-align: left; width: 100%; overflow: auto; min-height: 0; }
.help table { width: 100%; border-collapse: collapse; font-size: 14px; line-height: 1.3; }
.help th { text-align: left; font-size: 13px; color: var(--soft); padding: 2px 6px; }
.help td { padding: 3px 6px; border-top: 1px solid #ecdcc4; vertical-align: middle; } .help td:first-child { font-weight: 700; white-space: nowrap; }
kbd { display: inline-block; min-width: 22px; text-align: center; font: 700 13px/1.5 inherit; font-family: inherit; background: #ff5a4d; color: #fff; border-radius: 6px; padding: 0 5px; margin: 0 1px; }
kbd.p2 { background: #3f9dff; }
.k { font-style: normal; display: inline-block; color: #fff; border-radius: 9px; padding: 0 8px; } .k.a { background: #ff5a4d; } .k.j { background: #44b0ff; } .k.g { background: #5d6b7a; }
.help .hnote { color: var(--soft); font-size: 12.5px; margin: 6px 0 0; }

/* ---------- online ---------- */
#title > .btn.online { font-size: 19px; padding: 8px 26px; background: #3f9dff; box-shadow: 0 5px 0 #2a6fc0; margin-top: -6px; }
#online { background: linear-gradient(#24364a, #2b1d16); }
.oname { width: 44%; flex: none; display: flex; flex-direction: column; gap: 6px; }
.obig { margin-top: auto; display: flex; flex-direction: column; align-items: center; gap: 4px; padding-bottom: 8px; }
.tin { font: inherit; font-size: 22px; font-weight: 700; color: var(--ink); background: #fff; border: 3px solid #e2cdb0; border-radius: 14px; padding: 6px 14px; width: 100%; user-select: text; -webkit-user-select: text; outline: none; }
.tin:focus { border-color: var(--accent); }
#modal .tin { width: 320px; text-align: center; }
.ojoin { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.ojoin h3 { align-self: flex-start; }
.codebox { display: flex; gap: 8px; }
.codebox b { width: 46px; height: 54px; border-radius: 12px; background: #fff; box-shadow: inset 0 0 0 3px #e2cdb0; font-size: 32px; display: flex; align-items: center; justify-content: center; }
.codebox b.cur { box-shadow: inset 0 0 0 3px var(--accent); }
.keys { display: grid; grid-template-columns: repeat(8, 40px); gap: 5px; }
.key { height: 36px; border-radius: 9px; background: #fff; font-size: 18px; font-weight: 700; box-shadow: 0 3px 0 #e2cdb0; }
.key:active { transform: translateY(2px); box-shadow: 0 1px 0 #e2cdb0; }
.key.del { grid-column: span 1; background: #e6d5bd; }
.rcode { font-size: 34px; letter-spacing: 5px; background: var(--ink); color: #ffe27a; border-radius: 12px; padding: 0 12px; margin-left: 6px; }
#lobby .team { width: 46%; }
.omems { display: flex; flex-direction: column; gap: 4px; flex: 1; min-height: 0; overflow-y: auto; }
.omem { display: flex; align-items: center; gap: 8px; background: #fff; border-radius: 13px; padding: 0 8px 0 4px; border-left: 8px solid var(--sc); box-shadow: 0 2px 0 #e2cdb0; flex: none; min-height: 40px; }
.omem.mine { box-shadow: 0 0 0 3px var(--sc); }
.omem .tag { background: var(--sc); min-width: 32px; text-align: center; }
.omem canvas { width: 50px; height: 40px; flex: none; }
.omem span { flex: 1; min-width: 0; line-height: 1.15; } .omem b { display: block; font-size: 15.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.omem b i { font-style: normal; color: var(--soft); font-size: 13px; } .omem small { font-size: 12px; color: var(--soft); white-space: nowrap; }
.rdy { font-style: normal; font-size: 12.5px; border-radius: 9px; padding: 2px 8px; background: #e6d5bd; color: var(--soft); white-space: nowrap; }
.rdy.on { background: #62c94a; color: #fff; } .rdy.hst { background: var(--gold); color: var(--ink); }
.ome { justify-content: flex-start; margin-top: 6px; }
.oset h3 small { font-size: 13px; color: var(--soft); }
.oset .opt { flex-wrap: wrap; }
.oset .arenas { flex-wrap: wrap; gap: 5px; }
.oset button:disabled { cursor: default; opacity: .85; }
.ar.locked canvas { filter: grayscale(1) brightness(.6); }
.ocpus { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.ocpu { display: flex; align-items: center; gap: 3px; background: #fff; border-radius: 10px; padding: 2px 4px; box-shadow: 0 2px 0 #e2cdb0; }
.ocpu canvas { width: 40px; height: 32px; display: block; }
.osm { border-radius: 8px; padding: 2px 7px; font-size: 13px; font-weight: 700; background: #e6d5bd; }
.osm.x { background: #f3c1b8; } .osm.add { background: var(--accent); color: #fff; padding: 6px 12px; }
.ostat { margin: 0; font-size: 16px; color: var(--ink); } .ostat.err { color: #d33; } .ostat.busy { color: #c9541c; }
#netHud { position: absolute; right: calc(10px + env(safe-area-inset-right)); top: 106px; z-index: 30; display: flex; flex-direction: column; align-items: flex-end; gap: 4px; pointer-events: none; }
#netHud span { background: rgba(30,16,10,.62); color: #fff; border-radius: 10px; padding: 1px 9px; font-size: 12.5px; white-space: nowrap; }
#netHud .ping.ok { color: #9f9; } #netHud .ping.mid { color: #ffd23d; } #netHud .ping.bad { color: #ff8a7a; }
#netHud .wait { font-size: 20px; padding: 4px 16px; background: rgba(30,16,10,.8); color: #ffe27a; animation: pop .2s; }
#netHud .note2 { font-size: 15px; color: #ffe27a; }
#netHud .dbg { font: 11px monospace; color: #9cf; }
/* ---------- direct links + voice (js/rtc.js) ---------- */
.op2p { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.op2p .btn.on { background: #3f9dff; color: #fff; box-shadow: 0 3px 0 #2a6fc0; }
.op2p .note { font-size: 11.5px; line-height: 1.25; margin: 0; }
.omem small.np { display: block; font-size: 11.5px; }
.omem small.np b { display: inline; font-size: 11.5px; } .omem .np b.dir { color: #2f9a3a; } .omem .np b.rel { color: #c9541c; } .omem .np b.spk, .omem .np b.mic.spk { color: #2f7de0; }
.omem.spk { box-shadow: 0 0 0 3px #3f9dff, 0 0 12px #3f9dff; }
.vmute { flex: none; width: 34px; height: 30px; border-radius: 9px; background: #efe3d0; font-size: 16px; box-shadow: 0 2px 0 #e2cdb0; }
.vmute.on { background: #f3c1b8; }
.hdr .vbtn { padding-left: 9px; padding-right: 9px; } .hdr .vbtn.on { background: #62c94a; color: #fff; }
#modal .vbtn.on { background: #62c94a; color: #fff; }
#vHud { position: absolute; right: calc(10px + env(safe-area-inset-right)); top: 58px; z-index: 20; display: flex; gap: 6px; }
#vHud[hidden] { display: none; }
#vHud button { width: 46px; height: 40px; border-radius: 12px; background: rgba(255,255,255,.6); font-size: 18px; box-shadow: 0 3px 0 rgba(0,0,0,.25); position: relative; }
#bMic:not(.on) { opacity: .75; } #bMic:not(.on)::after { content: ''; position: absolute; left: 10px; right: 10px; top: 50%; height: 3px; background: #d33; transform: rotate(-35deg); border-radius: 2px; }
#bMic.on { background: rgba(98,201,74,.9); } #bMic.spk { box-shadow: 0 0 0 4px #3f9dff, 0 3px 0 rgba(0,0,0,.25); }
#bMall.on { background: rgba(243,193,184,.95); }
#netHud .peer.dir { color: #9f9; } #netHud .peer.rel { color: #ffd23d; } #netHud .peer.spk { background: rgba(47,125,224,.85); color: #fff; }
