/* =========================================================
   Hoomie – Watch Together. Feel Closer.
   Black + red, app-first design
   ========================================================= */
:root {
  --bg: #000;
  --bg2: #0b0b0d;
  --panel: #121214;
  --panel2: #1a1a1d;
  --panel3: #242428;
  --line: #2a2a2f;
  --text: #f5f5f7;
  --muted: #9a9aa3;
  --red: #e50914;
  --red2: #ff2d3d;
  --redd: #8f0610;
  --grad: linear-gradient(135deg, #ff2d3d 0%, #e50914 55%, #b0060f 100%);
  --ok: #22c55e;
  --r: 18px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; min-height: 100%; }
body {
  background: var(--bg);
  color: var(--text);
  font: 15px/1.45 "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", sans-serif;
  overscroll-behavior: none;
  -webkit-font-smoothing: antialiased;
}
.hidden { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
button, .btn, select, input { font: inherit; color: inherit; }
button, .btn {
  background: var(--panel2);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 10px 16px;
  cursor: pointer;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
  transition: background .15s, border-color .15s, transform .08s, opacity .15s, box-shadow .15s;
  user-select: none;
}
button:active, .btn:active { transform: scale(.96); }
button:disabled { opacity: .4; cursor: not-allowed; }
.primary, button.primary, .btn.primary { background: var(--grad); border: none; font-weight: 650; color: #fff; box-shadow: 0 8px 24px rgba(229, 9, 20, .35); }
.primary:hover { filter: brightness(1.08); }
.ghost-btn { background: var(--panel2); border: 1px solid var(--line); color: var(--text); font-weight: 600; }
button.danger { background: var(--red); border: none; color: #fff; }
.big { padding: 14px 22px !important; font-size: 16px; border-radius: 16px !important; }
.small { padding: 5px 11px; font-size: 13px; border-radius: 10px; }
.block { display: flex; width: 100%; }
.icon-btn { width: 40px; height: 40px; padding: 0; border-radius: 50%; background: var(--panel2); border: 1px solid var(--line); flex: none; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; text-decoration: none; font-size: 16px; }
.icon-btn.sm { width: 34px; height: 34px; font-size: 14px; }
input:not([type]), input[type=text], select {
  background: var(--panel2);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 13px 15px;
  outline: none;
  min-width: 0;
  width: 100%;
}
input:focus, select:focus { border-color: var(--red); }
input[type=range] { accent-color: var(--red); }
.lbl { display: block; font-weight: 650; margin: 18px 0 8px; }
.hint { color: var(--muted); font-size: 13px; margin: 8px 2px 0; }
.wordmark { font-weight: 800; letter-spacing: -1px; margin: 0; }
.mark-xl { width: 168px; }
.mark-md { width: 92px; }

/* ---------- toggles ---------- */
.settings { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.toggle { display: flex; align-items: center; gap: 12px; padding: 13px 14px; cursor: pointer; border-bottom: 1px solid var(--line); }
.toggle:last-child { border-bottom: none; }
.toggle .ti { width: 26px; text-align: center; font-size: 18px; }
.toggle .tt { flex: 1; display: flex; flex-direction: column; }
.toggle .tt small { color: var(--muted); font-size: 12px; }
.toggle input { display: none; }
.toggle i { width: 46px; height: 27px; border-radius: 20px; background: var(--panel3); position: relative; transition: background .2s; flex: none; }
.toggle i::after { content: ""; position: absolute; top: 3px; left: 3px; width: 21px; height: 21px; border-radius: 50%; background: #fff; transition: transform .2s; }
.toggle input:checked + i { background: var(--red); }
.toggle input:checked + i::after { transform: translateX(19px); }

/* ---------- sheets / cards / share ---------- */
.sheet-wrap { position: fixed; inset: 0; background: rgba(0,0,0,.7); z-index: 60; display: flex; align-items: center; justify-content: center; animation: fadein .15s; }
@keyframes fadein { from { opacity: 0; } }
.sheet { background: var(--panel); border: 1px solid var(--line); border-radius: 24px; width: min(520px, 94vw); max-height: 88vh; overflow-y: auto; padding: 20px; display: flex; flex-direction: column; gap: 12px; animation: sheetup .22s ease-out; }
@keyframes sheetup { from { transform: translateY(30px); opacity: 0; } }
.sheet h3 { margin: 0; font-size: 19px; }
.sheet .lbl { margin: 6px 0 0; }
.grab { display: none; width: 42px; height: 5px; border-radius: 3px; background: var(--panel3); margin: -8px auto 2px; }
.types { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 14px; }
.type { flex-direction: column; gap: 6px; padding: 16px 8px; border-radius: 16px; background: var(--panel2); border: 1px solid var(--line); font-size: 13px; font-weight: 600; text-align: center; white-space: normal; }
.type span { font-size: 24px; }
.type small { color: var(--muted); font-weight: 400; font-size: 11px; }
.type.on { background: linear-gradient(160deg, #c8101a, #7a050c); border-color: var(--red); box-shadow: 0 8px 24px rgba(229,9,20,.3); }
.type.on small { color: #ffd0d3; }
.pastebox { display: flex; gap: 8px; align-items: center; }
.pastebox input { flex: 1; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.opt-line { display: flex; align-items: center; gap: 12px; padding: 13px 14px; background: var(--panel2); border: 1px solid var(--line); border-radius: 16px; cursor: pointer; }
.opt-line > span:first-child { font-size: 22px; }
.opt-line span:nth-child(2) { flex: 1; display: flex; flex-direction: column; }
.opt-line small { color: var(--muted); font-size: 12px; }
.opt-line em { font-style: normal; color: var(--muted); font-size: 22px; }
.search { background: var(--panel2); border-radius: 14px; max-height: 320px; overflow-y: auto; }
.sitem { display: flex; gap: 10px; align-items: center; padding: 8px; border-bottom: 1px solid var(--line); }
.sitem:last-child { border-bottom: none; }
.sitem img { width: 92px; height: 52px; object-fit: cover; border-radius: 8px; flex: none; background: #000; }
.sitem .meta { flex: 1; min-width: 0; }
.sitem .t { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sitem .c { color: var(--muted); font-size: 12px; }

.roomcard { background: radial-gradient(circle at 50% 0%, #2a0a0d, var(--panel2) 70%); border: 1px solid var(--line); border-radius: 20px; padding: 22px; display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; }
.roomcard img { width: 76px; margin-bottom: 6px; }
.roomcard b { font-size: 20px; }
.roomcard small { color: var(--muted); }
.linkbox { display: flex; align-items: center; gap: 10px; background: var(--panel2); border: 1px solid var(--line); border-radius: 16px; padding: 8px 8px 8px 16px; }
.linkbox span { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; }
.sharerow { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.sharerow a, .sharerow button { display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 12px; color: var(--text); text-decoration: none; background: none; border: none; padding: 6px 0; }
.sc { width: 50px; height: 50px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: var(--panel3); font-size: 20px; }
.sc.wa { background: #25d366; color: #fff; }
.sc.tg { background: #2aa3e0; color: #fff; }

.modal { position: fixed; inset: 0; background: rgba(0,0,0,.92); display: flex; align-items: center; justify-content: center; z-index: 80; padding: 20px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 24px; padding: 30px 26px; width: 100%; max-width: 380px; display: flex; flex-direction: column; gap: 12px; text-align: center; }
.card .logo { width: 84px; margin: 0 auto 4px; }
.card h2 { margin: 0; }
.card p { margin: 0; }
.toasts { position: fixed; top: calc(14px + var(--safe-t)); left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; gap: 8px; z-index: 100; width: min(92vw, 460px); pointer-events: none; }
.toast { background: var(--panel3); border: 1px solid var(--line); border-left: 4px solid var(--red); padding: 11px 14px; border-radius: 14px; box-shadow: 0 10px 30px rgba(0,0,0,.6); animation: tin .2s ease-out; pointer-events: auto; font-size: 14px; }
.toast.err { border-left-color: #ff8a00; }
.toast a { color: #ff8a8f; }
@keyframes tin { from { opacity: 0; transform: translateY(-8px); } }

/* =========================================================
   HOME APP (index.html)
   ========================================================= */
.home .screen { min-height: 100vh; min-height: 100dvh; max-width: 560px; margin: 0 auto; position: relative; }
.splash { display: flex; align-items: center; justify-content: center; overflow: hidden; max-width: none !important; }
.splash-in { text-align: center; position: relative; z-index: 2; animation: pop .6s ease-out; }
.splash .wordmark { font-size: 52px; margin-top: 6px; }
.splash p { color: #c9c9cf; font-size: 18px; margin: 14px 0 0; }
@keyframes pop { from { transform: scale(.85); opacity: 0; } }
.wave { position: absolute; left: -20%; right: -20%; bottom: -14vh; height: 42vh; border-radius: 50% 50% 0 0 / 60% 60% 0 0; background: radial-gradient(120% 100% at 30% 0%, #ff2d3d 0%, #b0060f 35%, #3a0306 70%, #000 100%); transform: rotate(-6deg); opacity: .9; filter: blur(.5px); }
.wave::before { content: ""; position: absolute; inset: 18px 0 0; border-radius: inherit; background: #000; opacity: .55; transform: translateY(34px); }

.onboard { display: flex; flex-direction: column; overflow: hidden; padding-bottom: calc(24px + var(--safe-b)); }
.slides { flex: 1; display: flex; transition: transform .35s ease; }
.slide { min-width: 100%; padding: 40px 28px 0; display: flex; flex-direction: column; justify-content: flex-end; }
.slide h2 { font-size: 34px; line-height: 1.1; margin: 28px 0 12px; letter-spacing: -.5px; }
.slide p { color: #bdbdc5; font-size: 16px; margin: 0; }
.art { position: relative; height: 340px; }
.art-people .pcard { position: absolute; width: 190px; height: 210px; border-radius: 26px; border: 2px solid rgba(255,45,61,.6); background: linear-gradient(160deg, #2a2a30, #121216); box-shadow: 0 18px 40px rgba(0,0,0,.6), 0 0 40px rgba(229,9,20,.18); display: flex; align-items: center; justify-content: center; }
.art-people .p1 { left: 4%; top: 10px; transform: rotate(-4deg); }
.art-people .p2 { right: 4%; top: 120px; transform: rotate(4deg); }
.face { width: 96px; height: 96px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 40px; font-weight: 800; background: linear-gradient(135deg, hsl(var(--h) 70% 45%), hsl(calc(var(--h) + 40) 75% 35%)); }
.playdot { position: absolute; right: -16px; bottom: 20px; width: 44px; height: 44px; border-radius: 50%; background: rgba(0,0,0,.7); border: 1px solid #555; display: flex; align-items: center; justify-content: center; font-size: 15px; }
.heart { position: absolute; color: var(--red2); font-size: 26px; filter: drop-shadow(0 0 10px rgba(255,45,61,.7)); }
.heart.h1 { right: 18%; top: 30px; }
.heart.h2 { left: 18%; bottom: 20px; font-size: 32px; }
.art-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; padding: 30px 40px; background: radial-gradient(circle at 50% 50%, rgba(229,9,20,.25), transparent 65%); }
.art-grid .tile { aspect-ratio: 1; border-radius: 26px; display: flex; align-items: center; justify-content: center; font-size: 46px; box-shadow: 0 16px 36px rgba(0,0,0,.6); border: 1px solid rgba(255,255,255,.08); }
.art-grid .t1 { background: linear-gradient(160deg, #ff2d3d, #b0060f); transform: rotate(-4deg); }
.art-grid .t2 { background: linear-gradient(160deg, #2b2b31, #151518); color: var(--red2); transform: rotate(3deg); }
.art-grid .t3 { background: linear-gradient(160deg, #2b2b31, #151518); transform: rotate(3deg); }
.art-grid .t4 { background: linear-gradient(160deg, #d10d18, #6d040a); transform: rotate(-3deg); }
.onfoot { display: flex; align-items: center; justify-content: space-between; padding: 30px 28px 0; }
.dots { display: flex; gap: 8px; }
.dots i { width: 8px; height: 8px; border-radius: 50%; background: #444; transition: all .2s; }
.dots i.on { background: var(--red); width: 22px; border-radius: 6px; }
.fab { width: 58px; height: 58px; border-radius: 50%; padding: 0; background: var(--grad); border: none; color: #fff; font-size: 24px; box-shadow: 0 10px 28px rgba(229,9,20,.5); }

.started { display: flex; align-items: center; justify-content: center; padding: 30px 26px; background: radial-gradient(circle at 50% 18%, #2a0508, #000 55%); }
.started-in { width: 100%; text-align: center; }
.started .wordmark.sm { font-size: 34px; margin: 4px 0 34px; }
.started h2 { margin: 0 0 6px; font-size: 26px; }
.started .stack { display: flex; flex-direction: column; gap: 12px; margin-top: 26px; }

.homeapp { padding: calc(10px + var(--safe-t)) 18px calc(30px + var(--safe-b)); }
.apphead { display: flex; align-items: center; justify-content: space-between; padding: 8px 0 14px; }
.brandrow { display: flex; align-items: center; gap: 10px; font-size: 22px; }
.brandrow img { width: 44px; }
.avatar-btn { width: 42px; height: 42px; border-radius: 50%; padding: 0; background: var(--grad); border: 2px solid #fff3; font-weight: 800; }
.chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding-bottom: 4px; }
.chips::-webkit-scrollbar { display: none; }
.chip { border-radius: 20px; padding: 8px 16px; font-size: 14px; background: var(--panel2); }
.chip.on { background: var(--red); border-color: var(--red); color: #fff; font-weight: 600; }
.hero { margin-top: 16px; border-radius: 24px; overflow: hidden; position: relative; min-height: 300px; display: flex; align-items: flex-end; border: 1px solid #ffffff10; background: radial-gradient(130% 90% at 80% 10%, #ff6a3d 0%, #c2410c 25%, #7a0a12 55%, #120304 85%); }
.hero-art { position: absolute; right: -40px; top: -20px; opacity: .25; transform: rotate(-12deg); }
.hero-art img { width: 300px; }
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 30%, rgba(0,0,0,.85)); }
.hero-txt { position: relative; z-index: 2; padding: 22px; width: 100%; }
.kicker { font-size: 12px; letter-spacing: 4px; color: #ffd2c2; }
.hero h2 { font-size: 34px; margin: 4px 0 6px; letter-spacing: -.5px; }
.hero p { margin: 0 0 16px; color: #e8e2e2; }
.hero .row { display: flex; gap: 10px; }
.hero .row .primary { flex: 1; }
.sect { display: flex; align-items: center; justify-content: space-between; margin: 26px 2px 12px; }
.sect h3 { margin: 0; font-size: 18px; }
.quick { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.qcard { flex-direction: column; align-items: flex-start; gap: 4px; padding: 14px 12px; border-radius: 18px; background: var(--panel); white-space: normal; text-align: left; }
.qcard b { font-size: 14px; }
.qcard small { color: var(--muted); font-size: 11px; }
.qi { width: 38px; height: 38px; border-radius: 12px; background: var(--panel3); display: flex; align-items: center; justify-content: center; font-size: 18px; margin-bottom: 4px; }
.qi.red { background: var(--red); }
.recent { display: flex; gap: 12px; overflow-x: auto; scrollbar-width: none; padding-bottom: 6px; }
.recent::-webkit-scrollbar { display: none; }
.rcard { flex: none; width: 160px; color: var(--text); text-decoration: none; display: flex; flex-direction: column; gap: 2px; }
.rthumb { height: 104px; border-radius: 16px; display: flex; align-items: center; justify-content: center; font-size: 34px; margin-bottom: 6px; background: linear-gradient(150deg, hsl(var(--h) 55% 32%), #120a0b 85%); border: 1px solid #ffffff12; }
.rcard small { color: var(--muted); font-size: 12px; }
.empty-card { color: var(--muted); background: var(--panel); border: 1px dashed var(--line); border-radius: 16px; padding: 18px; font-size: 14px; width: 100%; }
.empty-card b { color: var(--text); }
.appcta { margin-top: 26px; display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: 18px; background: linear-gradient(90deg, #2a0508, var(--panel)); border: 1px solid #ff2d3d40; color: var(--text); text-decoration: none; }
.appcta img { width: 48px; height: 48px; border-radius: 12px; }
.appcta div { flex: 1; display: flex; flex-direction: column; }
.appcta small { color: var(--muted); }
.appcta span { width: 36px; height: 36px; border-radius: 50%; background: var(--red); display: flex; align-items: center; justify-content: center; font-weight: 800; }

.navhead { display: grid; grid-template-columns: 44px 1fr 44px; align-items: center; padding: calc(10px + var(--safe-t)) 14px 6px; }
.navhead h2 { margin: 0; text-align: center; font-size: 19px; }
.back { width: 40px; height: 40px; padding: 0; border-radius: 50%; background: transparent; border: none; font-size: 32px; line-height: 1; color: var(--text); text-decoration: none; display: inline-flex; align-items: center; justify-content: center; }
.pad { padding: 4px 18px calc(30px + var(--safe-b)); }
.create .primary.block { margin-top: 22px; }
.created .pad { display: flex; flex-direction: column; gap: 16px; padding-top: 14px; }

/* =========================================================
   ROOM (room.html)
   ========================================================= */
.room { display: flex; flex-direction: column; height: 100vh; height: 100dvh; overflow: hidden; }
.rhead { display: flex; align-items: center; gap: 8px; padding: calc(8px + var(--safe-t)) 12px 8px; background: #000; border-bottom: 1px solid #ffffff10; flex: none; }
.rtitle { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; }
.rtitle b { font-size: 18px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rsub { color: var(--muted); font-size: 13px; display: inline-flex; align-items: center; gap: 6px; flex: none; }
.dot { width: 7px; height: 7px; border-radius: 50%; background: #ff8a00; }
.dot.ok { background: var(--ok); }

.appbanner { display: flex; align-items: center; gap: 10px; padding: 8px 12px; background: linear-gradient(90deg, #3a0508, #140304); font-size: 13px; flex: none; }
.appbanner img { width: 30px; height: 30px; border-radius: 8px; }
.appbanner span { flex: 1; }

.layout { flex: 1; display: grid; grid-template-columns: 1fr 380px; min-height: 0; }
.main { overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 10px; min-width: 0; padding-bottom: 110px; }

.stage { position: relative; background: #000; border-radius: var(--r); overflow: hidden; aspect-ratio: 16 / 9; width: 100%; max-height: 70vh; flex: none; box-shadow: 0 14px 50px rgba(0,0,0,.7); }
.stage:fullscreen, .stage.pseudo-fs { max-height: none; border-radius: 0; aspect-ratio: auto; }
.stage.pseudo-fs { position: fixed; inset: 0; z-index: 90; width: 100vw; height: 100vh; height: 100dvh; }
.stage > video, #ytWrap, #ytWrap iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.stage > video { object-fit: contain; background: #000; }
.shield { position: absolute; inset: 0; }
.stage-empty { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 20px; background: radial-gradient(circle at 50% 30%, #3a0508 0%, #120203 50%, #000 100%); }
.stage-empty p { margin: 3px 0; }
.stage-empty .t { font-size: 20px; font-weight: 750; margin-top: 8px; }
.stage-empty .mark-md { width: 84px; animation: bob 2.6s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(-6px); } }

/* overlay controls */
.ovl { position: absolute; inset: 0; z-index: 3; pointer-events: none; opacity: 0; transition: opacity .25s; background: linear-gradient(180deg, rgba(0,0,0,.35), transparent 30%, transparent 55%, rgba(0,0,0,.8)); }
.stage.ctl-on .ovl { opacity: 1; }
.stage.ctl-on .ovl button, .stage.ctl-on .ovl input, .stage.ctl-on .ovl select { pointer-events: auto; }
.ovl.disabled { display: none; }
.ovl-mid { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); display: flex; align-items: center; gap: 34px; }
.round { width: 54px; height: 54px; border-radius: 50%; padding: 0; background: rgba(0,0,0,.45); border: 1px solid rgba(255,255,255,.25); backdrop-filter: blur(6px); color: #fff; font-size: 22px; flex-direction: column; gap: 0; line-height: 1; }
.round small { font-size: 9px; font-weight: 700; }
.round.big { width: 72px; height: 72px; font-size: 26px; background: rgba(0,0,0,.5); }
.ovl-bot { position: absolute; left: 0; right: 0; bottom: 0; padding: 0 12px 10px; }
.ovl-bot #seek { width: 100%; margin: 0 0 4px; height: 18px; }
.ovl-row { display: flex; align-items: center; gap: 8px; }
.ovl-row .time { font-variant-numeric: tabular-nums; font-size: 13px; color: #eee; }
.ovl-row .grow { flex: 1; }
.ovl-row select { width: auto; padding: 5px 8px; border-radius: 10px; background: rgba(0,0,0,.5); font-size: 13px; }
.ovl-row .icon-btn { background: rgba(0,0,0,.45); border-color: rgba(255,255,255,.2); }
.vol { display: flex; align-items: center; gap: 4px; font-size: 14px; }
.vol input { width: 80px; }

/* camera bubbles over the video */
.tiles { position: absolute; right: 10px; top: 10px; z-index: 4; display: flex; flex-direction: column; gap: 8px; max-height: calc(100% - 70px); overflow-y: auto; scrollbar-width: none; align-items: flex-end; }
.tiles::-webkit-scrollbar { display: none; }
.tile { position: relative; width: 112px; height: 112px; border-radius: 18px; overflow: hidden; background: var(--panel2); border: 2px solid rgba(255,255,255,.12); box-shadow: 0 8px 20px rgba(0,0,0,.6); transition: border-color .15s, width .2s, height .2s; flex: none; }
.tile.speaking { border-color: var(--ok); }
.tile video { width: 100%; height: 100%; object-fit: cover; }
.tile.me video { transform: scaleX(-1); }
.tile .avatar { position: absolute; inset: 0; display: none; align-items: center; justify-content: center; }
.tile .avatar span { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; font-size: 22px; font-weight: 800; color: #fff; }
.tile.novideo { width: 46px; height: 46px; border-radius: 50%; }
.tile.novideo .avatar { display: flex; }
.tile.novideo .tname { display: none; }
.tile .tname { position: absolute; left: 5px; bottom: 5px; background: rgba(0,0,0,.6); padding: 1px 7px; border-radius: 8px; font-size: 11px; max-width: calc(100% - 10px); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.overlay { position: absolute; inset: 0; background: rgba(0,0,0,.82); display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 24px; gap: 12px; z-index: 6; }
.livebanner { position: absolute; top: 10px; left: 10px; background: rgba(0,0,0,.62); backdrop-filter: blur(6px); padding: 6px 11px; border-radius: 12px; display: flex; gap: 8px; align-items: center; z-index: 5; font-size: 13px; max-width: calc(100% - 140px); }
.rec { color: var(--red2); animation: blink 1.4s infinite; }
@keyframes blink { 50% { opacity: .2; } }
.reactlayer { position: absolute; inset: 0; pointer-events: none; overflow: hidden; z-index: 7; }
.floater { position: absolute; bottom: 10px; font-size: 38px; animation: floatup 2.6s ease-out forwards; text-align: center; }
.floater small { display: block; font-size: 11px; background: rgba(0,0,0,.55); border-radius: 6px; padding: 0 5px; }
@keyframes floatup { 0% { transform: translateY(0) scale(.6); opacity: 0; } 15% { opacity: 1; transform: translateY(-20px) scale(1.2); } 100% { transform: translateY(-260px) scale(1); opacity: 0; } }
.stagechat { position: absolute; left: 12px; bottom: 70px; display: none; flex-direction: column; gap: 6px; z-index: 7; max-width: min(60%, 420px); pointer-events: none; }
.stage:fullscreen .stagechat, .stage.pseudo-fs .stagechat { display: flex; }
.stagechat div { background: rgba(0,0,0,.6); backdrop-filter: blur(6px); padding: 6px 10px; border-radius: 12px; font-size: 14px; animation: tin .2s ease-out; }
.exitfs { display: none; position: absolute; top: 10px; left: 10px; z-index: 8; background: rgba(0,0,0,.55); border: none; }
.stage.pseudo-fs .exitfs { display: inline-flex; }

.nowplaying { color: var(--muted); font-size: 14px; min-height: 20px; padding: 0 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex: none; }
.nowplaying b { color: var(--text); }

.reactbar { display: flex; align-items: center; gap: 8px; flex: none; }
.emojis { display: flex; gap: 2px; flex: 1; overflow-x: auto; scrollbar-width: none; }
.emojis::-webkit-scrollbar { display: none; }
.emojis button { border: none; background: transparent; font-size: 26px; padding: 4px 6px; border-radius: 12px; }
.emojis button:hover { background: var(--panel2); }
.reactbar.noreact .emojis { opacity: .3; pointer-events: none; }
.rb-icons { display: flex; gap: 6px; }

/* side panel */
.side { border-left: 1px solid #ffffff10; background: var(--bg2); display: flex; flex-direction: column; min-height: 0; }
.tabs { display: flex; gap: 4px; padding: 10px; flex: none; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs button { flex: 1; border: none; background: var(--panel2); padding: 9px 12px; color: var(--muted); border-radius: 12px; font-size: 14px; }
.tabs button.active { color: #fff; background: linear-gradient(160deg, #c8101a, #7a050c); font-weight: 600; }
.badge { background: #fff; color: var(--red); border-radius: 9px; font-size: 11px; padding: 0 6px; min-width: 18px; font-weight: 700; }
.badge.soft { background: var(--panel3); color: var(--muted); }
.tab { flex: 1; display: flex; flex-direction: column; min-height: 0; overflow-y: auto; padding: 4px 12px 12px; gap: 10px; }
#tab-chat { padding: 0; }
.chatlist { flex: 1; overflow-y: auto; padding: 10px 14px; display: flex; flex-direction: column; gap: 12px; }
.msg { display: flex; gap: 10px; align-items: flex-start; max-width: 92%; }
.msg .av { width: 34px; height: 34px; font-size: 14px; }
.msg .mb { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.msg .mh { display: flex; gap: 8px; align-items: baseline; font-size: 13px; }
.msg .mh .ts { color: var(--muted); font-size: 11px; }
.msg .bubble { background: var(--panel2); border: 1px solid var(--line); padding: 8px 12px; border-radius: 4px 16px 16px 16px; word-wrap: break-word; overflow-wrap: anywhere; }
.msg.mine .bubble { background: linear-gradient(160deg, #c8101a, #8a0710); border-color: transparent; }
.sys { color: var(--muted); font-size: 12px; text-align: center; padding: 2px 0; }
.chatform { display: flex; gap: 8px; padding: 10px 12px calc(10px); border-top: 1px solid #ffffff10; flex: none; }
.chatform input { flex: 1; border-radius: 24px; padding: 12px 18px; }
.chatform .send { width: 46px; height: 46px; border-radius: 50%; padding: 0; background: var(--grad); border: none; color: #fff; font-size: 17px; flex: none; }
.list { display: flex; flex-direction: column; gap: 8px; }
.row { display: flex; align-items: center; gap: 12px; background: var(--panel); border: 1px solid #ffffff0c; padding: 10px 12px; border-radius: 16px; }
.row .grow { flex: 1; min-width: 0; }
.row .t { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 600; }
.row .c { color: var(--muted); font-size: 12px; }
.row img { width: 78px; height: 44px; object-fit: cover; border-radius: 8px; flex: none; }
.av { width: 40px; height: 40px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 800; flex: none; color: #fff; }
.crown { font-size: 18px; }
.remoji { font-size: 26px; }
.phead { padding: 6px 2px 2px; font-size: 16px; }
.empty { color: var(--muted); text-align: center; padding: 24px 0; font-size: 14px; }
.setting { display: flex; flex-direction: column; gap: 6px; margin-bottom: 10px; }
.tips { background: var(--panel); border-radius: 16px; padding: 12px 14px; font-size: 13px; color: var(--muted); margin-top: 6px; }
.tips ul { margin: 6px 0 0; padding-left: 18px; }
.tips li { margin: 4px 0; }
.tips b { color: var(--text); }
#tab-settings .lbl:first-child { margin-top: 6px; }

/* dock */
.dock { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(14px + var(--safe-b)); z-index: 40; display: flex; align-items: center; gap: 4px; background: rgba(18,18,20,.94); backdrop-filter: blur(16px); border: 1px solid #ffffff14; border-radius: 28px; padding: 6px 10px; box-shadow: 0 16px 44px rgba(0,0,0,.7); }
.dk { flex-direction: column; gap: 2px; width: 64px; height: 54px; padding: 0; border: none; background: transparent; border-radius: 16px; color: var(--muted); }
.dk .ic { font-size: 20px; line-height: 1; }
.dk .lb { font-size: 11px; }
.dk:hover { background: var(--panel2); }
.dk.on { color: #fff; background: #3a0a0e; }
.dk.live { background: var(--red); color: #fff; }
.dk.add { width: 60px; height: 60px; border-radius: 50%; background: var(--grad); color: #fff; margin: -18px 6px 0; box-shadow: 0 10px 28px rgba(229,9,20,.55); }
.dk.add .ic { font-size: 32px; font-weight: 300; }

/* ================= Mobile ================= */
@media (max-width: 899px) {
  .rtitle b { font-size: 17px; }
  .layout { display: flex; flex-direction: column; overflow-y: auto; }
  .main { overflow: visible; padding: 0; gap: 0; flex: none; }
  .stage { border-radius: 0; max-height: none; box-shadow: none; }
  .tile { width: 84px; height: 84px; border-radius: 14px; }
  .tile.novideo { width: 38px; height: 38px; }
  .tiles { right: 8px; top: 8px; gap: 6px; }
  .round { width: 46px; height: 46px; font-size: 19px; }
  .round.big { width: 62px; height: 62px; }
  .ovl-mid { gap: 26px; }
  .vol { display: none; }
  .nowplaying { padding: 8px 14px 0; font-size: 13px; }
  .nowplaying:empty { display: none; }
  .reactbar { padding: 6px 10px; border-bottom: 1px solid #ffffff10; }
  .emojis button { font-size: 24px; padding: 4px; }
  .side { flex: 1; min-height: 62vh; border-left: none; padding-bottom: calc(84px + var(--safe-b)); }
  .chatlist { max-height: none; }
  .dock { left: 0; right: 0; transform: none; bottom: 0; border-radius: 24px 24px 0 0; justify-content: space-around; padding: 6px 4px calc(6px + var(--safe-b)); border-bottom: none; }
  .dk { width: 62px; }
  .sheet-wrap { align-items: flex-end; }
  .sheet { width: 100%; border-radius: 26px 26px 0 0; padding-bottom: calc(22px + var(--safe-b)); max-height: 92vh; border-bottom: none; }
  .grab { display: block; }
  .quick { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 899px) and (orientation: landscape) and (max-height: 500px) {
  .stage { height: 100dvh; aspect-ratio: auto; }
}

/* =========================================================
   v3 – icons, games, couple & watch features
   ========================================================= */
.ic { width: 20px; height: 20px; flex: none; display: inline-block; vertical-align: middle; }
.ic.xs { width: 14px; height: 14px; }
.ic.lg { width: 28px; height: 28px; }
.ic.xl { width: 46px; height: 46px; }
.back .ic { width: 28px; height: 28px; }
.icon-btn .ic { width: 19px; height: 19px; }
.icon-btn.sm .ic { width: 16px; height: 16px; }
.round .ic { width: 22px; height: 22px; }
.round.big .ic { width: 30px; height: 30px; }
.dk .ic { width: 22px; height: 22px; }
.dk.add .ic { width: 30px; height: 30px; stroke-width: 2.4; }
.dk .ic-wrap { display: flex; height: 24px; align-items: center; }
.dk.on .ic, .dk.live .ic { color: #fff; }
.type .ic.lg { color: var(--red2); }
.type.on .ic.lg { color: #fff; }
.opt-line .ic.lg { color: var(--red2); }
.sc .ic { width: 22px; height: 22px; }
.rsub .ic { opacity: .8; }
.streak { display: inline-flex; align-items: center; gap: 2px; color: #ff9f43; font-weight: 700; margin-left: 4px; }
.streak .ic { color: #ff9f43; opacity: 1; }

.tool { width: 40px; height: 40px; padding: 0; border-radius: 50%; background: var(--panel2); border: 1px solid var(--line); color: var(--text); }
.tool.on { background: var(--red); border-color: var(--red); }
.tool.pulse { animation: pulse .8s ease-out; background: var(--red); }
@keyframes pulse { 0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(229,9,20,.7); } 60% { transform: scale(1.15); box-shadow: 0 0 0 14px rgba(229,9,20,0); } 100% { transform: scale(1); } }

.schedbanner { display: flex; align-items: center; gap: 10px; padding: 9px 14px; background: linear-gradient(90deg, #3a0508, #140304); font-size: 14px; flex: none; }
.schedbanner span { flex: 1; }
.schedbanner .ic { color: var(--red2); }

/* doodle */
.doodle { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 5; pointer-events: none; transition: opacity .6s; }
.doodle.fade { opacity: 0; }
.stage.doodling .doodle { pointer-events: auto; cursor: crosshair; touch-action: none; }
.stage.doodling .ovl { display: none; }
.doodlebar { position: absolute; left: 50%; bottom: 12px; transform: translateX(-50%); z-index: 8; display: flex; gap: 8px; align-items: center; background: rgba(0,0,0,.65); backdrop-filter: blur(8px); padding: 8px 10px; border-radius: 24px; }
.swatch { width: 28px; height: 28px; padding: 0; border-radius: 50%; border: 2px solid #ffffff40; }
.swatch.on { border-color: #fff; transform: scale(1.12); }

/* nudge hearts */
.nudgefx { position: fixed; inset: 0; pointer-events: none; z-index: 95; overflow: hidden; }
.nudgefx span { position: absolute; bottom: -40px; color: var(--red2); animation: rise 3s ease-out forwards; filter: drop-shadow(0 0 12px rgba(255,45,61,.8)); }
@keyframes rise { to { transform: translateY(-110vh) rotate(20deg); opacity: 0; } }

/* sleep */
.sleep { position: fixed; inset: 0; z-index: 85; background: radial-gradient(circle at 50% 30%, #12060a, #000 70%); display: flex; align-items: center; justify-content: center; text-align: center; padding: 30px; }
.sleep-in { display: flex; flex-direction: column; align-items: center; gap: 16px; max-width: 420px; }
.sleep .ic.xl { color: #ffd9a0; filter: drop-shadow(0 0 20px #ffb46a80); }
.sleep .clock { font-size: 72px; font-weight: 200; letter-spacing: 2px; color: #e9e3ff; }
.sleep p { color: #9a9aa3; margin: 0; }
.sounds { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.sleepusers { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }

/* voice notes */
.chatform { align-items: center; }
.chatform .icon-btn.live { background: var(--red); border-color: var(--red); color: #fff; }
.recbar { flex: 1; display: flex; align-items: center; gap: 8px; padding: 0 6px; font-size: 14px; color: var(--muted); }
.recbar .ghost-btn { margin-left: auto; }
.bubble.voice { display: flex; align-items: center; gap: 10px; min-width: 190px; }
.vplay { width: 34px; height: 34px; padding: 0; border-radius: 50%; background: #fff; color: #000; border: none; flex: none; }
.vplay .ic { width: 16px; height: 16px; }
.vbar { flex: 1; height: 4px; border-radius: 4px; background: #ffffff30; overflow: hidden; }
.vbar i { display: block; height: 100%; width: 0; background: #fff; }

/* watchlist */
.row.done { opacity: .55; }
.wl-ic { width: 44px; height: 44px; border-radius: 10px; background: var(--panel3); display: flex; align-items: center; justify-content: center; color: var(--red2); flex: none; }

/* memory */
.memimg { width: 100%; border-radius: 16px; border: 1px solid var(--line); }

/* games panel */
.gamepill { position: fixed; right: 14px; bottom: calc(100px + var(--safe-b)); z-index: 45; background: var(--grad); border: none; color: #fff; border-radius: 30px; padding: 10px 16px; font-weight: 600; box-shadow: 0 10px 30px rgba(229,9,20,.5); }
.gamepanel { position: fixed; z-index: 70; right: 16px; top: 70px; bottom: 16px; width: min(480px, 96vw); background: var(--bg2); border: 1px solid #ffffff18; border-radius: 24px; display: flex; flex-direction: column; box-shadow: 0 24px 80px rgba(0,0,0,.8); animation: sheetup .22s ease-out; }
.gp-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; border-bottom: 1px solid #ffffff10; font-size: 18px; }
.gp-body { flex: 1; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 12px; }
.ghub { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.gcard { flex-direction: column; align-items: center; padding: 10px 6px 12px; border-radius: 18px; background: var(--panel); white-space: normal; text-align: center; gap: 2px; }
.gcard img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 14px; margin-bottom: 6px; }
.gcard b { font-size: 13px; }
.gcard small { color: var(--muted); font-size: 11px; line-height: 1.2; }
.extlink { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 16px; background: var(--panel); border: 1px solid var(--line); color: var(--text); text-decoration: none; }
.extlink > span:nth-child(2) { flex: 1; display: flex; flex-direction: column; }
.extlink small { color: var(--muted); }
.globby { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px; }
.globby .lart { width: 120px; border-radius: 24px; }
.globby h3 { margin: 0; font-size: 22px; }
.globby p { margin: 0; }
.globby .row2 { width: 100%; }
.gplayers, .dscores, .vs { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.gp { display: inline-flex; align-items: center; gap: 6px; background: var(--panel2); border: 1px solid var(--line); border-radius: 20px; padding: 4px 12px 4px 4px; font-size: 13px; }
.gp i { width: 24px; height: 24px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-style: normal; font-weight: 700; font-size: 12px; color: #fff; }
.gp.ok { border-color: var(--ok); }
.gp.drawer { border-color: var(--red); }
.gp .ic { width: 14px; height: 14px; }
.gtop { display: flex; justify-content: center; }
.gwrap { display: flex; flex-direction: column; gap: 12px; align-items: center; }
.vsp { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 20px; background: var(--panel2); border: 1px solid var(--line); font-size: 14px; }
.vsp.on { border-color: var(--red); box-shadow: 0 0 0 2px #e5091440; }
.gturn { font-weight: 700; color: var(--muted); }
.gturn.mine { color: #fff; background: var(--grad); padding: 6px 16px; border-radius: 20px; }
.gtag { background: var(--panel3); padding: 6px 14px; border-radius: 20px; font-weight: 600; }
.gtag.ok { background: #14532d; }
.gover { width: 100%; background: linear-gradient(160deg, #3a0508, var(--panel)); border: 1px solid #ff2d3d50; border-radius: 18px; padding: 16px; display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; }
.gover b { font-size: 22px; }
.gover .row2 { width: 100%; }
.m0 { color: var(--red2); }
.m1 { color: #fff; }
.ttt { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; width: min(320px, 86vw); }
.ttt .cell { aspect-ratio: 1; font-size: 48px; font-weight: 800; padding: 0; background: var(--panel); border-radius: 16px; }
.ttt .cell.win { background: #3a0508; border-color: var(--red); }
.c4 { display: flex; gap: 6px; background: #1a1a6e; background: linear-gradient(160deg, #1c1c22, #0e0e12); padding: 10px; border-radius: 18px; border: 1px solid var(--line); }
.c4col { display: flex; flex-direction: column; gap: 6px; padding: 4px; border-radius: 12px; background: transparent; border: none; }
.c4col:hover:not(:disabled) { background: #ffffff10; }
.disc { width: min(38px, 9vw); height: min(38px, 9vw); border-radius: 50%; background: #000; box-shadow: inset 0 3px 6px #000; display: block; }
.disc.p0 { background: radial-gradient(circle at 35% 30%, #ff6a6a, #c4000f); box-shadow: none; }
.disc.p1 { background: radial-gradient(circle at 35% 30%, #ffffff, #b9b9c2); box-shadow: none; }
.disc.win { outline: 3px solid #fdd835; }
.disc.mini { width: 16px; height: 16px; }
.chess { display: grid; grid-template-columns: repeat(8, 1fr); width: min(400px, 90vw); border-radius: 12px; overflow: hidden; border: 2px solid #3a3a42; }
.chess .sq { aspect-ratio: 1; padding: 0; border: none; border-radius: 0; font-size: min(40px, 8.5vw); line-height: 1; position: relative; }
.chess .lt { background: #ecd9c6; }
.chess .dk { background: #a2694e; }
.chess .last { box-shadow: inset 0 0 0 100px #e5091433; }
.chess .sel { box-shadow: inset 0 0 0 4px #e50914; }
.chess .dot::after { content: ""; position: absolute; width: 26%; height: 26%; border-radius: 50%; background: #00000040; left: 37%; top: 37%; }
.chess .cap { box-shadow: inset 0 0 0 4px #00000050; }
.pc.w { color: #fff; text-shadow: 0 0 2px #000, 0 1px 2px #000; }
.pc.b { color: #111; }
.ghist { max-width: 400px; text-align: center; word-spacing: 4px; }
.ludo { position: relative; width: min(420px, 92vw); aspect-ratio: 1; border-radius: 14px; overflow: hidden; box-shadow: 0 10px 30px rgba(0,0,0,.6); }
.ludo img { width: 100%; height: 100%; display: block; pointer-events: none; user-select: none; }
.tok { position: absolute; width: 5.2%; height: 5.2%; padding: 0; border-radius: 50%; transform: translate(-50%, -50%); background: radial-gradient(circle at 35% 30%, #fff8, transparent 45%), var(--tc); border: 2px solid #fff; box-shadow: 0 2px 4px #0008; transition: top .25s, left .25s; z-index: 1; }
.tok:disabled { opacity: 1; cursor: default; }
.tok.can { animation: glow .9s ease-in-out infinite; outline: 3px solid #fff; outline-offset: 2px; z-index: 2; cursor: pointer; width: 6.4%; height: 6.4%; }
@keyframes glow { 50% { box-shadow: 0 0 0 6px #ffffff90, 0 0 18px 6px var(--tc); } }
.ludobar { width: 100%; display: flex; align-items: center; gap: 12px; background: var(--panel); border-radius: 16px; padding: 10px 12px; }
.ludobar .grow { flex: 1; display: flex; flex-direction: column; }
.dice { width: 52px; height: 52px; border-radius: 14px; background: #fff; color: #000; display: flex; align-items: center; justify-content: center; font-size: 44px; line-height: 1; box-shadow: 0 0 0 3px var(--tc); }
.lchip { width: 14px; height: 14px; border-radius: 50%; display: inline-block; }
.vs.wrap { gap: 6px; }
.draw { align-items: stretch; }
.dhead { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.dtimer { display: inline-flex; align-items: center; gap: 4px; background: var(--panel2); padding: 5px 10px; border-radius: 14px; font-weight: 700; }
.dtimer .ic { width: 16px; height: 16px; color: var(--red2); }
.dword { font-size: 20px; letter-spacing: 3px; text-align: center; flex: 1; }
.dstage { position: relative; }
.dcanvas { width: 100%; aspect-ratio: 1; background: #fff; border-radius: 16px; display: block; }
.dchoose { position: absolute; inset: 0; display: flex; flex-direction: column; gap: 10px; align-items: center; justify-content: center; background: rgba(0,0,0,.7); border-radius: 16px; }
.dchoose button { min-width: 180px; }
.dtools { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; justify-content: center; }
.dtools .size { width: 34px; height: 34px; padding: 0; border-radius: 50%; }
.dtools .size i { background: #fff; border-radius: 50%; display: block; }
.dtools .size.on { border-color: var(--red); }
.dfeed { max-height: 150px; overflow-y: auto; background: var(--panel); border-radius: 14px; padding: 8px 10px; font-size: 14px; display: flex; flex-direction: column; gap: 4px; }
.fsys { color: var(--muted); font-size: 13px; }
.fsys.ok { color: #4ade80; font-weight: 600; }
.fmsg em { color: #fdd835; font-style: normal; }
.dguess { display: flex; gap: 8px; }
.dguess input { flex: 1; border-radius: 22px; }
.dguess .send { width: 46px; height: 46px; border-radius: 50%; padding: 0; background: var(--grad); border: none; color: #fff; flex: none; }
.modes { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; }
.tcard { width: 100%; background: linear-gradient(160deg, #2a0508, var(--panel)); border: 1px solid #ff2d3d40; border-radius: 20px; padding: 20px; display: flex; flex-direction: column; gap: 14px; text-align: center; }
.tcard > b { font-size: 19px; }
.tcard.big { font-size: 20px; font-weight: 700; min-height: 160px; justify-content: center; }
.topts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.topt { flex-direction: column; white-space: normal; min-height: 60px; background: var(--panel2); font-weight: 600; }
.topt small { color: #ffb4b8; font-weight: 400; }
.topt.on { background: var(--red); border-color: var(--red); color: #fff; }
.topt:disabled { opacity: 1; }
.tform { display: flex; flex-direction: column; gap: 10px; }
.tform textarea { background: var(--panel2); border: 1px solid var(--line); border-radius: 14px; padding: 12px; color: var(--text); font: inherit; resize: vertical; }
.tans { display: flex; flex-direction: column; gap: 8px; text-align: left; }
.tans div { background: var(--panel2); padding: 10px 12px; border-radius: 12px; }
.chip { border-radius: 20px; padding: 7px 14px; font-size: 13px; background: var(--panel2); }
.chip.on { background: var(--red); border-color: var(--red); color: #fff; font-weight: 600; }

@media (max-width: 899px) {
  .gamepanel { left: 0; right: 0; bottom: 0; top: auto; width: 100%; height: 88dvh; border-radius: 26px 26px 0 0; padding-bottom: var(--safe-b); }
  .ghub { grid-template-columns: repeat(2, 1fr); }
  .rb-icons .tool { width: 38px; height: 38px; }
  .gamepill { bottom: calc(86px + var(--safe-b)); }
}

/* home v3 */
.meet { margin-top: 18px; display: flex; align-items: center; gap: 12px; padding: 16px; border-radius: 20px; background: linear-gradient(120deg, #2a0508, var(--panel) 70%); border: 1px solid #ff2d3d40; cursor: pointer; }
.meet-l { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.meet-l small { letter-spacing: 3px; color: #ffb4b8; font-size: 11px; }
.meet-l b { font-size: 22px; }
.hidden-date { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.qcard.art { padding: 8px 8px 12px; }
.qcard.art img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 14px; margin-bottom: 6px; }
.gamerow { display: flex; gap: 12px; overflow-x: auto; scrollbar-width: none; padding-bottom: 6px; }
.gamerow::-webkit-scrollbar { display: none; }
.gtile { flex: none; width: 118px; flex-direction: column; gap: 6px; padding: 0; background: none; border: none; }
.gtile img { width: 118px; height: 118px; border-radius: 22px; object-fit: cover; box-shadow: 0 10px 24px rgba(0,0,0,.6); }
.gtile b { font-size: 13px; }
.feat { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.feat div { display: grid; grid-template-columns: 54px 1fr; grid-template-rows: auto auto; column-gap: 10px; align-items: center; padding: 10px; border-radius: 16px; background: var(--panel); border: 1px solid #ffffff0c; }
.feat img { width: 54px; height: 54px; border-radius: 12px; grid-row: span 2; }
.feat b { font-size: 14px; }
.feat small { color: var(--muted); font-size: 11px; line-height: 1.3; }
.art-grid .tile { overflow: hidden; padding: 0; }
.art-grid .tile img { width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 420px) { .feat { grid-template-columns: 1fr; } }
.artfb { display: flex; align-items: center; justify-content: center; background: #0e0e10; border: 1px solid #ffffff14; color: #fff; aspect-ratio: 1; border-radius: 18px; }
.artfb .ic { width: 42%; height: 42%; stroke-width: 1.6; }
.qcard .artfb { width: 100%; margin-bottom: 6px; }
.gtile .artfb { width: 118px; height: 118px; border-radius: 22px; }
.feat .artfb { width: 54px; height: 54px; border-radius: 12px; grid-row: span 2; }
.gcard .artfb { width: 100%; margin-bottom: 6px; border-radius: 14px; }
.globby .artfb { width: 110px; border-radius: 24px; }
.art-grid .artfb { width: 100%; height: 100%; border-radius: 26px; }

/* custom image icons (white PNG used as mask so they take the text colour) */
.ic.img { background: currentColor; -webkit-mask: var(--m) center / contain no-repeat; mask: var(--m) center / contain no-repeat; font-style: normal; }
.i-mic { --m: url(/icons/ui/mic.png); }
.i-mic-off { --m: url(/icons/ui/mic-off.png); }
.i-camera { --m: url(/icons/ui/camera.png); }
.i-camera-off { --m: url(/icons/ui/camera-off.png); }
.i-screen { --m: url(/icons/ui/screen.png); }
.i-invite { --m: url(/icons/ui/invite.png); }
.i-settings { --m: url(/icons/ui/settings.png); }
.i-chat { --m: url(/icons/ui/chat.png); }
.i-people { --m: url(/icons/ui/people.png); }
.i-games { --m: url(/icons/ui/games.png); }
.i-movie { --m: url(/icons/ui/movie.png); }
.i-link { --m: url(/icons/ui/link.png); }
.i-file { --m: url(/icons/ui/file.png); }
.i-live { --m: url(/icons/ui/live.png); }
.dk .ic.img { width: 24px; height: 24px; }
.dk.add .ic.img { width: 30px; height: 30px; }
.artfb .ic.img { width: 46%; height: 46%; }
.type .ic.img.lg { background: var(--red2); }
.type.on .ic.img.lg { background: #fff; }
.opt-line .ic.img.lg { background: var(--red2); }

/* OTT sync */
.ottstage { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; text-align: center; padding: 18px; background: radial-gradient(circle at 50% 20%, #3a0508, #0a0203 60%, #000); }
.ottsvc { background: #ffffff14; border: 1px solid #ffffff22; padding: 4px 12px; border-radius: 20px; font-size: 12px; letter-spacing: 1px; text-transform: uppercase; }
.otttitle { font-size: 22px; max-width: 90%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ottclock { font-size: clamp(40px, 9vw, 72px); font-weight: 200; font-variant-numeric: tabular-nums; letter-spacing: 2px; }
.ottstatus { color: var(--muted); font-size: 13px; }
.ottstatus.on { color: #4ade80; }
.ottbtns { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; margin: 6px 0; }
.ottstage small { max-width: 460px; font-size: 12px; }
.ottcount { position: absolute; inset: 0; z-index: 9; background: rgba(0,0,0,.85); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; font-size: 44px; font-weight: 800; }
.ottcount b { font-size: 120px; line-height: 1; color: var(--red2); }
.ottcount small { font-size: 14px; font-weight: 400; color: #ccc; }
.ottform { background: var(--panel2); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.ottform summary { list-style: none; display: flex; align-items: center; gap: 12px; padding: 13px 14px; cursor: pointer; }
.ottform summary::-webkit-details-marker { display: none; }
.ottform summary > span { flex: 1; display: flex; flex-direction: column; }
.ottform summary small { color: var(--muted); font-size: 12px; }
.ottform summary .ic:first-child { color: var(--red2); width: 26px; height: 26px; }
.ottfields { display: flex; flex-direction: column; gap: 10px; padding: 0 14px 14px; }
.ottmode #controls { display: none !important; }
.ottstage { z-index: 3; overflow-y: auto; }

/* ---------- tokens / wallet ---------- */
.apphead { gap: 10px; }
.apphead .brandrow { margin-right: auto; }
.tokchip { display: inline-flex; align-items: center; gap: 6px; background: #1a1012; border: 1px solid #ff2d3a55; color: #fff; padding: 7px 12px; border-radius: 20px; font: 600 14px/1 inherit; cursor: pointer; }
.tokchip.low { border-color: #ffb020; }
.coin { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #ffd86b, #e3a008); color: #5a3a00; font-size: 13px; font-weight: 900; }
.walletsheet { position: fixed; inset: 0; z-index: 200; display: flex; align-items: flex-end; justify-content: center; }
.wsbg { position: absolute; inset: 0; background: #000a; }
.wscard { position: relative; width: 100%; max-width: 460px; background: #111; border: 1px solid #ffffff14; border-radius: 22px 22px 0 0; padding: 14px 20px 26px; display: flex; flex-direction: column; gap: 14px; text-align: center; animation: wsup .25s ease; }
@keyframes wsup { from { transform: translateY(40px); opacity: 0; } }
.wsgrab { width: 40px; height: 4px; border-radius: 4px; background: #ffffff30; margin: 0 auto; }
.wsreason { background: #2a0d10; border: 1px solid #ff2d3a44; padding: 10px 12px; border-radius: 12px; margin: 0; font-size: 14px; }
.wsbal { display: flex; align-items: center; justify-content: center; gap: 10px; }
.wsbal .coin { width: 38px; height: 38px; font-size: 22px; }
.wsbal b { font-size: 44px; font-weight: 800; }
.wsbal small { color: var(--muted, #999); font-size: 15px; }
.wsinfo { list-style: none; margin: 0; padding: 12px 14px; background: #ffffff08; border-radius: 14px; text-align: left; display: flex; flex-direction: column; gap: 8px; font-size: 14px; color: #ccc; }
.wsinfo b { color: #fff; }
.adfull { position: fixed; inset: 0; z-index: 300; background: #000e; display: grid; place-items: center; padding: 20px; }
.adbox { position: relative; width: 100%; max-width: 380px; background: linear-gradient(160deg, #2a0508, #0b0b0b); border: 1px solid #ffffff1a; border-radius: 22px; padding: 28px 22px 22px; display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; }
.adbox img { width: 72px; height: 72px; }
.adbox b { font-size: 20px; }
.adbox p { color: #bbb; margin: 0; }
.adtag { position: absolute; top: 12px; left: 14px; font-size: 11px; color: #999; border: 1px solid #ffffff22; border-radius: 6px; padding: 2px 6px; }
.adclose { position: absolute; top: 8px; right: 10px; background: none; border: 0; color: #888; font-size: 18px; cursor: pointer; }
.adbar { width: 100%; height: 4px; background: #ffffff1a; border-radius: 4px; overflow: hidden; }
.adbar i { display: block; height: 100%; width: 0; background: #ff2d3a; transition: width .2s linear; }
.adbox .primary { width: 100%; }
.timepill { display: inline-flex; align-items: center; gap: 4px; background: #ffffff10; border: 1px solid #ffffff1f; color: #ddd; border-radius: 16px; padding: 6px 9px; font: 600 12px/1 inherit; cursor: pointer; white-space: nowrap; }
.timepill b { color: #ff4d57; font-size: 14px; }
.timepill.warn { background: #3a1205; border-color: #ff9a3c; color: #ffb36b; animation: pulsewarn 1.6s infinite; }
@keyframes pulsewarn { 50% { box-shadow: 0 0 0 4px #ff9a3c33; } }
.endedscreen { position: fixed; inset: 0; z-index: 250; background: #000d; display: grid; place-items: center; padding: 24px; text-align: center; }
.endedscreen > div { max-width: 360px; display: flex; flex-direction: column; gap: 12px; align-items: center; }
.endedscreen b { font-size: 24px; }
.endedscreen p { color: #bbb; margin: 0; }
.center { text-align: center; } .block { display: block; }
#costNote { margin-top: 8px; }
