/* Platform layout: Twitch-style sidebar, featured carousel, channel bar and live chat. Loads after app.css. */
:root { --chat-w: 340px; --rail-w: var(--chat-w); --side-a: #3d8bff; --side-b: var(--accent); }
body.chat-min { --rail-w: 0px; }

/* ---------- shell ---------- */
.shell { grid-template-columns: var(--side-w) minmax(0, 1fr) var(--chat-w); }
body.chat-min .shell { grid-template-columns: var(--side-w) minmax(0, 1fr); }
.main { padding: 22px 30px 72px; }
.side { background: var(--panel); padding: 8px 6px 0; }

/* ---------- sidebar ---------- */
.side-top { padding: 4px 4px 2px 0; }
.side .side-head { padding: 10px 10px 6px; font-size: 12px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--text-2); }
.side-sec + .side-sec { margin-top: 4px; }
.creator-list { padding-bottom: 6px; }
.creator { display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; column-gap: 10px; align-items: center; padding: 5px 10px; border-radius: var(--r); }
.creator:hover { background: var(--panel-2); }
.creator-pic { position: relative; width: 30px; height: 30px; }
.creator-pic img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; background: var(--panel-3); }
.creator-name { font-weight: 600; font-size: 14px; color: var(--text); }
.creator-what { font-size: 13px; }
.creator-age { align-self: center; font-variant-numeric: tabular-nums; }
.chan-list { margin-bottom: 2px; }
.lp-side { margin-bottom: 10px; }

body.side-min .side { padding: 8px 6px 0; }
body.side-min .side-sec + .side-sec { border-top: 1px solid var(--line); padding-top: 6px; }
body.side-min .creator { grid-template-columns: 1fr; justify-items: center; padding: 6px 0; }
body.side-min .creator > div, body.side-min .creator .creator-age { display: none; }
body.side-min .creator-pic.is-live::after { content: ""; position: absolute; right: -1px; bottom: -1px; width: 9px; height: 9px; border-radius: 50%; background: var(--live); box-shadow: 0 0 0 2px var(--panel); }

/* ---------- headings ---------- */
body.t-broadcast .row-head h2 { font-family: var(--font); text-transform: none; letter-spacing: -.01em; font-size: 19px; font-weight: 700; }
.row-head h2 em { font-style: normal; color: var(--accent); }
.row { margin-bottom: 40px; }
.row-head a { font-weight: 600; }

/* ---------- cards ---------- */
.card .thumb { display: block; transition: transform .12s ease-out, box-shadow .12s ease-out; }
.card:hover .thumb { transform: translate(4px, -4px); box-shadow: -4px 4px 0 var(--accent); }
.card:hover .thumb img { transform: none; }
.badge.viewers, .badge.views { left: 8px; bottom: 8px; }
.badge.views { display: none; }
.card:hover .badge.views { display: block; }
.card-meta { grid-template-columns: 36px minmax(0, 1fr); padding-top: 10px; }
.card-meta .avatar { width: 36px; height: 36px; }
.card-title a { color: inherit; }
.card-title { font-size: 14.5px; margin-bottom: 2px; }
.card-sub { font-size: 13.5px; }
.card-tags { display: flex; gap: 5px; margin-top: 7px; flex-wrap: wrap; }
.card-tags .tag, .tiles .tag { padding: 1px 8px; border: 0; background: var(--panel-3); color: var(--text-2); font-size: 12px; font-weight: 600; border-radius: 99px; }
.tag.warn { color: #ffb347; }
.spoil-note > span { display: block; }

/* ---------- featured carousel ---------- */
.hero { position: relative; margin: 0 0 34px; }
.hero-stage { position: relative; aspect-ratio: 3.86 / 1; }
.hero-card {
  position: absolute; top: 0; left: 13%; width: 74%; height: 100%;
  display: grid; grid-template-columns: 1.65fr 1fr; overflow: hidden;
  background: var(--panel); border-radius: 10px; box-shadow: 0 22px 50px -24px rgba(0,0,0,.9), inset 0 0 0 1px var(--line);
  transition: transform .45s var(--ease), opacity .3s, filter .45s var(--ease);
}
.hero-card:not(.on) { filter: brightness(.4) saturate(.8); cursor: pointer; }
.hero-card:not(.on) .hero-info { visibility: hidden; }
.hero-media { position: relative; background: #000; overflow: hidden; }
.hero-media img, .hero-media iframe { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border: 0; }
.hero-media .badge.live { left: 10px; top: 10px; z-index: 2; }
.hero-play { position: absolute; left: 50%; top: 50%; width: 58px; height: 58px; margin: -29px 0 0 -29px; display: grid; place-items: center; border-radius: 50%; background: rgba(10,11,14,.55); border: 1px solid rgba(255,255,255,.18); backdrop-filter: blur(10px); transition: transform .2s var(--ease); }
.hero-play svg { width: 18px; height: 18px; fill: #fff; margin-left: 3px; }
.hero-card.on .hero-media:hover .hero-play { transform: scale(1.07); }
.hero-info { display: flex; flex-direction: column; gap: 10px; padding: 18px 20px; min-width: 0; }
.hi-chan { display: grid; grid-template-columns: 50px minmax(0, 1fr); gap: 12px; align-items: center; }
.hi-chan .creator-pic { width: 50px; height: 50px; }
.hi-chan b { display: block; font-size: 16px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hi-cat { display: block; color: var(--accent); font-weight: 600; font-size: 13.5px; }
.hi-stat { display: block; color: var(--dim); font-size: 13px; font-variant-numeric: tabular-nums; }
.hi-stat i { font-style: normal; }
.hero-info .tags { margin: 0; }
.hero-info .tag { border: 0; background: var(--panel-3); font-weight: 600; padding: 2px 9px; }
.hi-title { margin: 0; font-size: 14px; line-height: 1.45; color: var(--text-2); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.btn-watch { margin-top: auto; align-self: flex-start; height: 32px; padding: 0 16px; display: inline-grid; place-items: center; border-radius: var(--r); background: var(--accent); color: #fff; font-weight: 700; font-size: 13.5px; transition: filter .15s; }
.btn-watch:hover { filter: brightness(1.1); }
.hero-nav { position: absolute; top: 50%; z-index: 20; width: 34px; height: 34px; margin-top: -17px; display: grid; place-items: center; border: 1px solid var(--line-2); border-radius: 50%; background: rgba(14,15,18,.9); color: var(--text); transition: background .15s; }
.hero-nav:hover { background: var(--panel-3); }
.hero-nav svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.hero-nav.prev { left: 0; } .hero-nav.next { right: 0; }

.launch-strip { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 12px; margin: 0 0 36px; padding: 13px 16px; border-radius: 8px; background: var(--panel); box-shadow: inset 0 0 0 1px var(--line); font-size: 14px; }
.launch-strip .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--live); }
.launch-strip span { color: var(--dim); }
.launch-strip .ls-clock { color: var(--text); font-weight: 600; font-variant-numeric: tabular-nums; }
.launch-strip a { margin-left: auto; font-weight: 600; color: var(--accent); }

/* ---------- browse tiles ---------- */
.tiles { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 14px; }
.tile { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.tile-art { position: relative; aspect-ratio: 3 / 4; border-radius: 6px; overflow: hidden; background: var(--panel-3); margin-bottom: 6px; transition: transform .12s ease-out, box-shadow .12s ease-out; }
.tile:hover .tile-art { transform: translate(4px, -4px); box-shadow: -4px 4px 0 var(--accent); }
.tile-art img { width: 100%; height: 100%; object-fit: cover; filter: brightness(.5) saturate(.9); }
.tile-art::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 45%, rgba(6,7,8,.85)); }
.tile-num { position: absolute; left: 9px; bottom: 6px; z-index: 2; font: italic 900 38px/1 Archivo, sans-serif; font-variation-settings: "wdth" 125; color: #fff; letter-spacing: -.02em; }
.tile .badge.live { left: 8px; top: 8px; z-index: 2; }
.tile-name { font-weight: 700; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tile:hover .tile-name { color: var(--accent); }
.tile-stat { font-size: 13px; color: var(--dim); font-variant-numeric: tabular-nums; }
.tile .tag { align-self: flex-start; margin-top: 4px; max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- category head ---------- */
.cat-head { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 22px; align-items: end; margin-bottom: 28px; }
.cat-box { width: 92px; aspect-ratio: 3 / 4; border-radius: 6px; background: var(--panel-2); box-shadow: inset 0 0 0 1px var(--line-2); display: grid; place-items: end start; padding: 8px 10px; }
.cat-box span { font: italic 900 40px/1 Archivo, sans-serif; font-variation-settings: "wdth" 125; color: var(--accent); }
.cat-head .page-title { margin-bottom: 4px; }
.cat-stats { display: flex; gap: 16px; margin-top: 10px; font-size: 13.5px; color: var(--dim); font-variant-numeric: tabular-nums; }

/* ---------- watch page ---------- */
.watch .player { border-radius: 8px; }
.chan-bar { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; gap: 16px; padding: 18px 0 34px; align-items: start; }
.cb-pic { position: relative; width: 64px; height: 64px; border-radius: 50%; }
.cb-pic img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; background: var(--panel-3); }
.cb-pic.is-live { box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--live); }
.cb-live { position: absolute; left: 50%; bottom: -7px; transform: translateX(-50%); padding: 1px 6px; border-radius: 4px; background: var(--live); color: #fff; font-size: 11px; font-weight: 700; letter-spacing: .03em; box-shadow: 0 0 0 2px var(--bg); }
.cb-name { font-weight: 700; font-size: 18px; line-height: 1.2; }
.cb-title { margin: 4px 0 6px; font-weight: 600; font-size: 15px; line-height: 1.4; letter-spacing: 0; }
.cb-cat { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.cb-cat a { color: var(--accent); font-weight: 600; font-size: 14px; margin-right: 4px; }
.cb-cat a:hover { text-decoration: underline; }
.cb-cat .tag { border: 0; background: var(--panel-3); font-weight: 600; padding: 2px 9px; }
.cb-side { display: flex; flex-direction: column; align-items: flex-end; gap: 12px; }
.cb-actions { display: flex; gap: 8px; }
.btn-follow { display: inline-flex; align-items: center; gap: 7px; height: 32px; padding: 0 14px; border: 0; border-radius: var(--r); background: var(--accent); color: #fff; font-weight: 700; font-size: 13.5px; transition: filter .15s, background .15s; }
.btn-follow:hover { filter: brightness(1.1); }
.btn-follow svg { width: 15px; height: 15px; fill: currentColor; }
.btn-follow.on { background: var(--panel-3); color: var(--text); }
.btn-follow.on svg { fill: var(--accent); }
.btn-icon { width: 32px; height: 32px; display: grid; place-items: center; border: 0; border-radius: var(--r); background: var(--panel-3); color: var(--text); }
.btn-icon:hover { background: #2a2c33; }
.btn-icon svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.cb-stats { display: flex; align-items: center; gap: 14px; font-size: 13.5px; color: var(--dim); font-variant-numeric: tabular-nums; white-space: nowrap; }
.cb-stats a:hover { color: var(--text); }
.cb-viewers { display: inline-flex; align-items: center; gap: 5px; color: #ff6b78; font-weight: 600; }
.cb-viewers svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.7; }

/* ---------- predictions page ---------- */
.pred-page { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 28px; align-items: start; }
.pred-board { position: sticky; top: calc(var(--top-h) + 20px); padding: 18px; border-radius: 10px; background: var(--panel); box-shadow: inset 0 0 0 1px var(--line); }
.split .a, .pin-bar .a { background: var(--side-a); }
.side-pick.a .lbl::before { background: var(--side-a); }
.side-pick.mine.a { border-color: var(--side-a); }

/* ---------- chat ---------- */
.chat {
  position: sticky; top: var(--top-h); height: calc(100vh - var(--top-h)); min-width: 0;
  display: flex; flex-direction: column; background: var(--panel); border-left: 1px solid var(--line);
}
body.chat-min .chat { display: none; }
.chat-head { flex: none; position: relative; height: 50px; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 0 8px; border-bottom: 1px solid var(--line); }
.chat-title { position: absolute; left: 50%; transform: translateX(-50%); font-size: 12.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--text-2); pointer-events: none; }
.chat-icon { width: 32px; height: 32px; display: grid; place-items: center; border: 0; border-radius: var(--r); background: none; color: var(--dim); transition: background .12s, color .12s; }
.chat-icon:hover, .chat-icon.on { background: var(--panel-2); color: var(--text); }
.chat-icon svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.chat-tabs { display: flex; gap: 2px; padding: 3px; border-radius: 8px; background: var(--bg); min-width: 0; }
.chat-tabs button { height: 28px; padding: 0 10px; border: 0; border-radius: 6px; background: none; color: var(--dim); font-size: 12.5px; font-weight: 600; white-space: nowrap; max-width: 150px; overflow: hidden; text-overflow: ellipsis; }
.chat-tabs button.on { background: var(--panel-3); color: var(--text); }

.chat-pin { flex: none; padding: 10px 10px 0; }
.chat-pin[hidden] { display: none; }
.pin { border-radius: 8px; background: var(--panel-2); box-shadow: inset 0 0 0 1px var(--line-2); overflow: hidden; }
.pin-head { width: 100%; display: flex; align-items: center; gap: 8px; padding: 9px 12px 0; border: 0; background: none; text-align: left; }
.pin-k { display: flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--text); }
.pin-k::before { content: ""; width: 12px; height: 6px; border-radius: 3px; background: linear-gradient(90deg, var(--side-a) 50%, var(--side-b) 50%); }
.pin-time { margin-left: auto; font-size: 12px; color: var(--dim); }
.pin-time b { color: var(--text); font-weight: 600; font-variant-numeric: tabular-nums; }
.pin-head svg { width: 14px; height: 14px; fill: none; stroke: var(--dim); stroke-width: 1.8; stroke-linecap: round; transition: transform .2s var(--ease); }
.pin.open .pin-head svg { transform: rotate(180deg); }
.pin-sum { display: block; width: 100%; padding: 6px 12px 10px; border: 0; background: none; text-align: left; }
.pin-q { display: block; font-weight: 600; font-size: 13.5px; line-height: 1.35; color: var(--text); }
.pin-bar { display: flex; gap: 2px; height: 5px; margin: 9px 0 6px; }
.pin-bar i { display: block; height: 100%; border-radius: 3px; transition: width .4s var(--ease); }
.pin-bar .b { background: var(--side-b); }
.pin-leg { display: flex; justify-content: space-between; gap: 8px; font-size: 12px; font-weight: 600; }
.pin-leg .a { color: #7fb2ff; } .pin-leg .b { color: #ff8aa8; }
.pin-mine { display: block; margin-top: 6px; font-size: 12px; color: var(--text-2); }
.pin .pred { padding: 6px 12px 10px; border: 0; }
.pin .pred-q { font-size: 13.5px; }
.pin .side-pick .pct { font-size: 16px; }
.pin-foot { display: flex; align-items: center; gap: 12px; padding: 7px 12px; border-top: 1px solid var(--line); font-size: 12px; color: var(--dim); }
.pin-foot button { border: 0; background: none; padding: 0; color: var(--text-2); font-size: 12px; font-weight: 600; }
.pin-foot a { margin-left: auto; color: var(--text-2); font-weight: 600; }
.pin-foot button:hover, .pin-foot a:hover { color: var(--text); }

.chat-body { position: relative; flex: 1; min-height: 0; display: flex; flex-direction: column; }
.chat-log { flex: 1; overflow-y: auto; padding: 10px 0 6px; font-size: 14px; line-height: 1.5; scrollbar-width: thin; scrollbar-color: var(--line-2) transparent; overflow-wrap: anywhere; }
.chat-log[hidden] { display: none; }
.msg { padding: 3px 14px; }
.msg:hover { background: var(--panel-2); }
.msg-name { font-weight: 700; }
.msg-colon { color: var(--text-2); }
.msg-text { color: var(--text); }
.msg.mine { background: rgba(255,255,255,.025); }
.msg-badge { display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 4px; margin-right: 5px; border-radius: 4px; background: var(--accent); color: #fff; font-size: 11px; font-weight: 800; vertical-align: 1px; font-variant-numeric: tabular-nums; }
.msg.sys { display: flex; align-items: baseline; gap: 7px; color: var(--dim); font-size: 13px; }
.msg.sys svg { flex: none; width: 13px; height: 13px; fill: none; stroke: var(--accent); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; transform: translateY(2px); }
.msg.sys a { color: var(--text-2); font-weight: 600; white-space: nowrap; }
.msg.sys a:hover { color: var(--text); }
.msg.note { color: var(--dim); font-size: 13px; }
.chat-more { position: absolute; left: 50%; bottom: 10px; transform: translateX(-50%); height: 30px; padding: 0 14px; border: 0; border-radius: 99px; background: var(--text); color: var(--bg); font-size: 12.5px; font-weight: 700; box-shadow: 0 8px 24px -8px rgba(0,0,0,.8); }
.chat-twitch { flex: 1; width: 100%; border: 0; background: var(--panel); }
.chat-twitch[hidden] { display: none; }
.chat-board { position: absolute; inset: 0; z-index: 3; overflow-y: auto; padding: 16px 16px 20px; background: var(--panel); }
.chat-board[hidden] { display: none; }
.board-all { display: grid; place-items: center; width: 100%; margin-top: 4px; }

.chat-foot { flex: none; padding: 10px; border-top: 1px solid var(--line); }
.chat-foot[hidden] { display: none; }
.chat-status { margin-bottom: 8px; font-size: 12.5px; color: var(--dim); }
.chat-status[hidden] { display: none; }
#chatName { margin-bottom: 10px; padding: 12px; border-radius: 8px; background: var(--panel-2); box-shadow: inset 0 0 0 1px var(--line-2); }
#chatName[hidden] { display: none; }
#chatName label { display: block; font-weight: 700; font-size: 13.5px; margin-bottom: 8px; }
#chatName input { width: 100%; height: 36px; padding: 0 10px; border: 1px solid var(--line-2); border-radius: var(--r); background: var(--bg); color: var(--text); font: 400 14px var(--font); outline: none; }
#chatName input:focus { border-color: var(--accent); }
.chat-name-row { display: flex; justify-content: flex-end; gap: 8px; margin-top: 10px; }
#chatName p { margin: 10px 0 0; font-size: 12.5px; color: var(--dim); }
.linkish { border: 0; background: none; padding: 0; color: var(--text-2); font-size: inherit; text-decoration: underline; text-underline-offset: 2px; }
.linkish:hover { color: var(--text); }
#chatInput { width: 100%; height: 40px; padding: 0 12px; border: 2px solid transparent; border-radius: var(--r); background: var(--panel-3); color: var(--text); font: 400 14px var(--font); outline: none; transition: border-color .15s, background .15s; }
#chatInput:hover { border-color: var(--line-2); }
#chatInput:focus { border-color: var(--accent); background: var(--bg); }
#chatInput::placeholder { color: var(--dim); }
.chat-bar { display: flex; align-items: center; gap: 14px; margin-top: 8px; }
.chat-pts, .chat-count { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; font-weight: 600; color: var(--text-2); font-variant-numeric: tabular-nums; }
.chat-pts svg, .chat-count svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; }
.chat-count { color: var(--dim); font-weight: 500; }
.btn-chat { margin-left: auto; height: 30px; padding: 0 14px; border: 0; border-radius: var(--r); background: var(--accent); color: #fff; font-weight: 700; font-size: 13px; transition: filter .15s; }
.btn-chat:hover { filter: brightness(1.1); }

.chat-open { position: fixed; right: 12px; top: calc(var(--top-h) + 12px); z-index: 12; width: 36px; height: 36px; display: none; place-items: center; border: 1px solid var(--line-2); border-radius: var(--r); background: var(--panel); color: var(--text-2); }
.chat-open:hover { color: var(--text); }
.chat-open svg, .top-chat svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linejoin: round; }
body.chat-min .chat-open { display: grid; }
.top-chat { display: none; width: 32px; height: 32px; place-items: center; border: 0; border-radius: var(--r); background: none; color: var(--text-2); }

/* ---------- responsive ---------- */
@media (max-width: 1380px) {
  :root { --chat-w: 310px; }
  .tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .hero-card { grid-template-columns: 1.4fr 1fr; }
  .hero-stage { aspect-ratio: 3.3 / 1; }
}
@media (max-width: 1100px) {
  .shell { grid-template-columns: var(--side-w) minmax(0, 1fr); }
  .chat { position: fixed; right: 0; top: var(--top-h); bottom: 0; width: min(360px, 100vw); height: auto; z-index: 30; transform: translateX(100%); transition: transform .25s var(--ease); box-shadow: -20px 0 50px -20px rgba(0,0,0,.8); }
  body.chat-show .chat { transform: none; }
  body.chat-min .chat { display: flex; }
  body.chat-min .chat-open { display: none; }
  .top-chat { display: grid; }
  .static { width: calc(100% - var(--side-w)); }
  .pred-page { grid-template-columns: 1fr; }
  .pred-board { position: static; }
}
@media (max-width: 900px) {
  .hero-stage { aspect-ratio: auto; }
  .hero-card { position: relative; left: 0; width: 100%; grid-template-columns: 1fr; transform: none !important; filter: none; }
  .hero-card:not(.on) { display: none; }
  .hero-media { aspect-ratio: 16 / 9; }
  .hero-nav { top: calc((100vw - var(--side-w) - 60px) * .28); }
  .chan-bar { grid-template-columns: 52px minmax(0, 1fr); }
  .cb-pic { width: 52px; height: 52px; }
  .cb-side { grid-column: 1 / -1; flex-direction: row-reverse; justify-content: space-between; align-items: center; }
}
@media (max-width: 760px) {
  .main { padding: 16px 16px 48px; }
  .side-sec { display: contents; }
  #followSec, .side-sec:has(#creatorList), .side-top { display: none !important; }
  .side .side-head { display: none; }
  .lp-side { margin: 0; flex: none; }
  .tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
  .tile-num { font-size: 28px; }
  .tile .tag { display: none; }
  .hero-nav { top: calc((100vw - 32px) * .28); }
  .cat-box { width: 64px; }
  .cat-box span { font-size: 28px; }
  .cb-stats { flex-wrap: wrap; white-space: normal; }
  .top-chat { margin-left: -6px; }
}
.chat-tabs[hidden], .chat-title[hidden] { display: none; }
@media (max-width: 1380px) { .tiles { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); } }

/* ---------- promoted streams ---------- */
.tag.promo, .card-tags .tag.promo, .hero-info .tag.promo, .cb-cat .tag.promo { background: rgba(242, 85, 127, .16); color: #ff8aa8; }
.screen-bar .tag.promo { padding: 1px 7px; border: 0; border-radius: 99px; font-size: 11px; font-weight: 700; flex: none; }
.promo-tag { font-size: 11px !important; font-weight: 700; color: #ff8aa8 !important; letter-spacing: .02em; }
.hero-blank { position: absolute; inset: 0; display: grid; place-items: center; background: radial-gradient(circle at 50% 45%, #1d1f24, #0b0c0e 70%); }
.hero-blank img { position: static !important; width: 96px !important; height: 96px !important; border-radius: 50%; object-fit: cover; }
.pm-link { margin-top: -6px; }
.pm-link .chan-num { font-style: normal; color: var(--accent); }

.pm { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 24px; align-items: start; }
.pm-box span { font-size: 30px; }
.pm-form, .pm-card { padding: 20px 22px; border-radius: 10px; background: var(--panel); box-shadow: inset 0 0 0 1px var(--line); }
.pm-card + .pm-card { margin-top: 14px; }
.pm-card h2 { margin: 0 0 12px; font-size: 16px; font-weight: 700; }
.pm-closed { margin-bottom: 16px; padding: 10px 14px; border-radius: 8px; background: rgba(255, 179, 71, .1); color: #ffcf8a; font-weight: 600; font-size: 14px; }
.pm-closed[hidden] { display: none; }
.pm-lbl { display: block; margin: 18px 0 8px; font-size: 13px; font-weight: 700; color: var(--text-2); }
.pm-lbl:first-of-type { margin-top: 0; }
.pm-hint { font-weight: 500; color: var(--dim); margin-left: 4px; }
.seg { display: inline-flex; gap: 2px; padding: 3px; border-radius: 8px; background: var(--bg); box-shadow: inset 0 0 0 1px var(--line); }
.seg button { min-width: 44px; height: 32px; padding: 0 14px; border: 0; border-radius: 6px; background: none; color: var(--text-2); font-weight: 600; font-size: 13.5px; }
.seg button.on { background: var(--panel-3); color: var(--text); box-shadow: inset 0 0 0 1px var(--line-2); }
.seg button:disabled { opacity: .35; cursor: default; }
.pm-login { display: flex; align-items: center; max-width: 420px; height: 40px; border-radius: var(--r); background: var(--panel-3); border: 2px solid transparent; transition: border-color .15s; }
.pm-login:focus-within { border-color: var(--accent); background: var(--bg); }
.pm-login span { padding: 0 2px 0 12px; color: var(--dim); font-size: 14px; }
.pm-login input { flex: 1; min-width: 0; height: 100%; border: 0; background: none; color: var(--text); font: 600 14px var(--font); outline: none; }
.pm-days { display: grid; gap: 12px; max-height: 300px; overflow-y: auto; padding-right: 6px; scrollbar-width: thin; scrollbar-color: var(--line-2) transparent; }
.pm-loading { color: var(--dim); font-size: 14px; }
.pm-dname { font-size: 12.5px; font-weight: 700; color: var(--dim); margin-bottom: 6px; }
.pm-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.pm-chips button { position: relative; min-width: 62px; height: 34px; padding: 0 10px; border: 1px solid var(--line-2); border-radius: 6px; background: transparent; color: var(--text); font-weight: 600; font-size: 13px; font-variant-numeric: tabular-nums; display: inline-flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1.1; }
.pm-chips button:hover:not(:disabled) { border-color: #4a4c56; }
.pm-chips button.on { border-color: var(--accent); background: rgba(242, 85, 127, .14); }
.pm-chips button:disabled { color: #4a4c56; border-color: var(--line); text-decoration: line-through; cursor: default; }
.pm-chips i { font-style: normal; font-size: 10px; font-weight: 600; color: #ffb347; }
.pm-sum { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin: 20px 0 14px; padding: 12px 14px; border-radius: 8px; background: var(--bg); box-shadow: inset 0 0 0 1px var(--line); font-size: 14px; color: var(--text-2); }
.pm-sum b { font-size: 18px; color: var(--text); font-variant-numeric: tabular-nums; white-space: nowrap; }
.pm-go { height: 40px; padding: 0 22px; font-size: 14.5px; border: 0; }
.pm-go:disabled { opacity: .45; cursor: default; filter: none; }
.pm-go[hidden] { display: none; }
.pm-fine { margin: 14px 0 0; font-size: 12.5px; color: var(--dim); line-height: 1.55; }
.pm-pay { display: flex; gap: 18px; align-items: flex-start; padding: 16px; border-radius: 10px; background: var(--bg); box-shadow: inset 0 0 0 1px var(--line-2); }
.pm-qr { flex: none; display: block; padding: 6px; border-radius: 8px; background: #fff; line-height: 0; }
.pm-qr svg { width: 148px; height: 148px; }
.pm-paymain { min-width: 0; }
.pm-amt { font-size: 28px; font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.pm-amt small { font-size: 15px; color: var(--dim); font-weight: 600; }
.pm-for { color: var(--text-2); font-size: 13.5px; margin: 2px 0 12px; }
.pm-btns { display: flex; gap: 8px; flex-wrap: wrap; }
.pm-btns .btn-watch { margin: 0; border: 0; }
.pm-btns .btn-quiet { display: inline-grid; place-items: center; }
.pm-status { margin-top: 12px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 14px; color: var(--text-2); }
.pm-status.ok { display: block; padding: 12px 14px; border-radius: 8px; background: rgba(76, 217, 123, .1); color: #bff0cf; }
.pm-status.ok b { color: #fff; }
.pm-status.bad { color: #ffb0b0; }
.pm-pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); animation: pmpulse 1.2s ease-in-out infinite; }
@keyframes pmpulse { 50% { opacity: .25; } }
.pm-links { display: flex; gap: 16px; margin-top: 8px; }
.pm-links a { color: #fff; font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
.pm-gets { margin: 0; padding-left: 18px; display: grid; gap: 9px; font-size: 14px; color: var(--text-2); line-height: 1.5; }
.pm-gets b { color: var(--text); }
.pm-cap { margin: 14px 0 0; font-size: 13px; color: var(--dim); line-height: 1.5; }
.pm-booked { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.pm-booked li { display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; gap: 10px; align-items: center; }
.pm-av { width: 30px; height: 30px; border-radius: 50%; overflow: hidden; display: grid; place-items: center; background: var(--panel-3); font-weight: 700; font-size: 13px; }
.pm-av img { width: 100%; height: 100%; object-fit: cover; }
.pm-booked b { display: block; font-size: 14px; }
.pm-booked small { display: block; font-size: 12.5px; color: var(--dim); }
.pm-on { font-size: 11px; font-weight: 700; color: #fff; background: var(--live); padding: 2px 7px; border-radius: 4px; }
.pm-empty { color: var(--dim); font-size: 13.5px; display: block !important; }
@media (max-width: 1100px) { .pm { grid-template-columns: 1fr; } }
@media (max-width: 760px) { .pm-pay { flex-direction: column; } .pm-form, .pm-card { padding: 16px; } }
.screen-viewers.plain::before { display: none; }

/* ---------- tips ---------- */
.btn-tip { display: inline-flex; align-items: center; gap: 7px; height: 32px; padding: 0 14px; border: 0; border-radius: var(--r); background: var(--panel-3); color: var(--text); font-weight: 700; font-size: 13.5px; }
.btn-tip:hover { background: #2a2c33; }
.btn-tip svg { width: 16px; height: 16px; fill: none; stroke: #ffc24d; stroke-width: 1.6; stroke-linecap: round; }
.tipbox { width: min(420px, calc(100vw - 32px)); }
.tip-head { display: grid; grid-template-columns: 48px minmax(0, 1fr); gap: 12px; align-items: center; margin-bottom: 16px; }
.tip-head h3 { margin: 0; }
.tip-head p { margin: 2px 0 0 !important; font-size: 13px; }
.tip-av { width: 48px; height: 48px; border-radius: 50%; overflow: hidden; display: grid; place-items: center; background: var(--panel-3); font-weight: 700; font-size: 18px; }
.tip-av img { width: 100%; height: 100%; object-fit: cover; }
.tip-amts { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.tip-amts button { height: 40px; border: 1px solid var(--line-2); border-radius: var(--r); background: transparent; color: var(--text); font-weight: 700; font-size: 13px; font-variant-numeric: tabular-nums; }
.tip-amts button.on { border-color: #ffc24d; background: rgba(255, 194, 77, .12); }
.tip-msg { width: 100%; height: 40px; margin-top: 10px; padding: 0 12px; border: 2px solid transparent; border-radius: var(--r); background: var(--panel-3); color: var(--text); font: 400 14px var(--font); outline: none; }
.tip-msg:focus { border-color: var(--accent); background: var(--bg); }
.tip-row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.tip-row .btn-watch { margin: 0; border: 0; height: 38px; padding: 0 18px; }
.tip-row .btn-quiet { height: 38px; }
.tip-fine { margin: 12px 0 0 !important; font-size: 12.5px; line-height: 1.5; }
.tip-note { color: var(--text-2) !important; font-size: 14px; line-height: 1.5; }
.tip-wait { color: var(--dim); }
.tip-card .btn-watch { border: 0; margin-top: 12px; }
.tip-card .tip-msg { margin-top: 12px; }
.tip-card b { color: var(--text); }
.tip-card a { color: var(--text); text-decoration: underline; text-underline-offset: 2px; word-break: break-all; }
.msg.tip { display: block; margin: 4px 10px; padding: 8px 10px; border-radius: 8px; background: rgba(255, 194, 77, .09); box-shadow: inset 0 0 0 1px rgba(255, 194, 77, .28); color: var(--text); font-size: 13.5px; }
.msg.tip:hover { background: rgba(255, 194, 77, .13); }
.tip-amt { display: inline-block; margin-right: 7px; padding: 1px 7px; border-radius: 4px; background: #ffc24d; color: #1a1300; font-weight: 800; font-size: 12px; font-variant-numeric: tabular-nums; }
.auth-btn.twitch { background: #9146ff; color: #fff; border-color: #9146ff; }
.cb-actions { flex-wrap: wrap; justify-content: flex-end; }
