:root {
  --ms-bg: #070811;
  --ms-bg-soft: #0d0f1b;
  --ms-surface: #11131f;
  --ms-surface-2: #171a29;
  --ms-surface-3: #202335;
  --ms-line: rgba(218, 216, 244, .15);
  --ms-line-strong: rgba(218, 216, 244, .32);
  --ms-text: #f8f7ff;
  --ms-muted: #a9a8bb;
  --ms-violet: #8b5cf6;
  --ms-violet-2: #b78cff;
  --ms-violet-dark: #5d35bd;
  --ms-gold: #f1c876;
  --ms-gold-2: #ffe5ad;
  --ms-positive: #54d894;
  --ms-danger: #ff6e7c;
  --ms-warning: #ffca75;
  --ms-shadow: 0 26px 76px rgba(0, 0, 0, .42);
  --ms-radius-sm: 10px;
  --ms-radius: 16px;
  --ms-radius-lg: 24px;
  --ms-control: 44px;
  --ms-sidebar: 232px;
  --ms-font: "IBM Plex Sans Arabic", "Noto Sans Arabic", "Segoe UI", sans-serif;
}

html { color-scheme: dark; }
body.studio-body,
html[data-site-theme] body.studio-body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  overflow-y: auto;
  overflow-x: hidden;
  background:
    linear-gradient(124deg, transparent 0 40%, rgba(154, 95, 255, .08) 49%, transparent 58%),
    radial-gradient(circle at 82% -10%, rgba(108, 65, 211, .22), transparent 32rem),
    radial-gradient(circle at 12% 35%, rgba(241, 200, 118, .07), transparent 24rem),
    var(--ms-bg);
  color: var(--ms-text);
  font: 400 16px/1.55 var(--ms-font);
}
body.studio-body.scene-editor-open,
html[data-site-theme] body.studio-body.scene-editor-open { overflow: hidden !important; }

.studio-body *, .studio-body *::before, .studio-body *::after { box-sizing: border-box; }
.studio-body button, .studio-body input, .studio-body select, .studio-body textarea { font: inherit; }
.studio-body button, .studio-body a, .studio-body select, .studio-body input[type="checkbox"], .studio-body input[type="range"] { -webkit-tap-highlight-color: transparent; }
.studio-body button { color: inherit; }
.studio-body img { max-width: 100%; }
.studio-body h1, .studio-body h2, .studio-body h3, .studio-body p { margin-top: 0; }
.studio-body header { position: static; top: auto; z-index: auto; padding: 0; border: 0; background: transparent; backdrop-filter: none; }
.studio-body [hidden] { display: none !important; }

.studio-body::-webkit-scrollbar,
.studio-body *::-webkit-scrollbar { width: 10px; height: 10px; }
.studio-body::-webkit-scrollbar-thumb,
.studio-body *::-webkit-scrollbar-thumb { background: rgba(183, 140, 255, .34); border: 3px solid transparent; border-radius: 20px; background-clip: padding-box; }
.studio-body *::-webkit-scrollbar-track { background: transparent; }

.studio-body > .studio-shell { min-height: 100vh; }
.studio-body > .studio-shell > .studio-header { display: none; }
.studio-body .site-theme-control { display: none !important; }
.studio-main { width:100%; max-width:none; min-height:100vh; margin:0; padding:0; }
.studio-loading { min-height: 100vh; display: grid; place-items: center; color: var(--ms-muted); }
.skip { position: fixed; inset-inline-start: 12px; top: -80px; z-index: 9999; padding: 10px 16px; border-radius: 10px; background: var(--ms-text); color: var(--ms-bg); }
.skip:focus { top: 12px; }

/* Unified shell */
.studio-layout.studio-v5-layout {
  direction: rtl;
  display: grid;
  grid-template-columns: var(--ms-sidebar) minmax(0, 1fr);
  grid-template-areas: "side work";
  width: min(1920px, 100%);
  min-height: 100vh;
  margin: 0 auto;
  padding: 18px;
  gap: 14px;
}
.studio-side {
  grid-area: side;
  position: sticky;
  top: 18px;
  z-index: 80;
  display: flex;
  flex-direction: column;
  width: var(--ms-sidebar);
  height: calc(100vh - 36px);
  padding: 22px 14px 16px;
  border: 1px solid var(--ms-line-strong);
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(20, 21, 35, .98), rgba(9, 10, 18, .98));
  box-shadow: -20px 0 70px rgba(0, 0, 0, .2);
  backdrop-filter: blur(20px);
}
.studio-side-brand { display: flex; align-items: center; justify-content: center; gap: 12px; min-height: 66px; padding: 10px 12px 20px; border-bottom: 1px solid var(--ms-line); direction: ltr; overflow: visible; }
.studio-side-brand img { width: 48px; height: 42px; object-fit: contain; filter: drop-shadow(0 0 13px rgba(157,95,255,.3)); }
.studio-side-brand div { display: grid; flex: 0 0 82px; min-width: 82px; gap: 0; direction: ltr; text-align: left; }
.studio-side-brand b { display: block; white-space: nowrap; font-size: 18px; letter-spacing: .01em; }
.studio-side-brand small { color: var(--ms-gold); font-size: 11px; font-weight: 800; letter-spacing: .18em; }
.studio-side nav { display: grid; gap: 4px; overflow: auto; padding: 18px 0; min-height: 0; }
.studio-side nav button,
.studio-settings-link {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 46px;
  padding: 10px 13px;
  border: 1px solid transparent;
  border-radius: 12px;
  background: transparent;
  color: #c3c1d1;
  text-decoration: none;
  font-weight: 700;
  text-align: right;
  cursor: pointer;
  transition: color .18s ease, background .18s ease, border-color .18s ease, transform .18s ease;
}
.studio-side nav button svg, .studio-settings-link svg { width: 20px; height: 20px; flex: 0 0 auto; stroke-width: 1.8; }
.studio-side nav button:hover, .studio-settings-link:hover { color: var(--ms-text); background: rgba(255,255,255,.035); transform: translateX(-2px); }
.studio-side nav button.active { color: var(--ms-text); border-color: rgba(196,151,255,.72); background: linear-gradient(135deg, rgba(139,92,246,.46), rgba(139,92,246,.15)); box-shadow: inset 0 1px rgba(255,255,255,.18), 0 0 22px rgba(133,73,232,.26), inset -3px 0 0 var(--ms-violet-2); }
.studio-side-foot { margin-top: auto; padding-top: 14px; border-top: 1px solid var(--ms-line); }
.studio-identity { display: flex; align-items: center; gap: 10px; padding: 8px 10px; min-width: 0; }
.studio-identity > img { width: 38px; height: 38px; border-radius: 50%; object-fit: cover; border: 1px solid rgba(241,200,118,.45); background: var(--ms-surface-2); }
.studio-identity > div { display: grid; min-width: 0; }
.studio-identity b, .studio-identity small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.studio-identity small { color: var(--ms-muted); font-size: 12px; direction: ltr; text-align: right; }

.studio-work { grid-area: work; min-width: 0; padding: 8px 4px 44px 8px; }
.studio-toolbar { display: flex; align-items: center; min-height: 72px; gap: 18px; padding: 10px 2px 18px; }
.studio-toolbar > div:first-of-type { margin-inline-end: auto; }
.studio-toolbar span { display: block; color: var(--ms-violet-2); font-size: 10px; font-weight: 800; letter-spacing: .18em; }
.studio-toolbar h1 { margin: 2px 0 0; font-size: clamp(25px, 2.3vw, 38px); line-height: 1.15; letter-spacing: -.02em; }
.studio-menu { display: none; }
.studio-live-indicator { display: flex; align-items: center; gap: 8px; min-height: 36px; padding: 8px 12px; border: 1px solid var(--ms-line); border-radius: 999px; background: rgba(255,255,255,.025); color: var(--ms-muted); font-size: 13px; font-weight: 700; }
.studio-live-indicator i, .context-live i { width: 8px; height: 8px; border-radius: 50%; background: #656577; box-shadow: 0 0 0 4px rgba(101,101,119,.14); }
.studio-live-indicator.on { color: #caffdf; border-color: rgba(84,216,148,.3); }
.studio-live-indicator.on i, .context-live.on i { background: var(--ms-positive); box-shadow: 0 0 0 4px rgba(84,216,148,.14), 0 0 14px rgba(84,216,148,.4); }
.studio-context-bar {
  display: grid;
  grid-template-columns: minmax(150px,.65fr) minmax(260px,1.5fr) minmax(180px,.8fr) auto;
  gap: 0;
  align-items: center;
  min-height: 66px;
  margin-bottom: 18px;
  border: 1px solid var(--ms-line);
  border-radius: var(--ms-radius);
  background: rgba(18,21,34,.78);
  box-shadow: 0 14px 40px rgba(0,0,0,.12);
  overflow: hidden;
}

/* Reference board shell */
.studio-work:has(.studio-reference-home) > .studio-toolbar { display: none; }
.studio-home.studio-reference-home { display: grid; grid-template-columns: minmax(0,1fr); gap: 16px; }
.studio-reference-home > section,
.studio-reference-home > article {
  border: 1px solid rgba(202, 194, 241, .38);
  border-radius: 22px;
  background:
    radial-gradient(circle at 82% 0, rgba(120, 67, 218, .11), transparent 30rem),
    linear-gradient(145deg, rgba(22,24,38,.97), rgba(9,11,19,.98));
  box-shadow: inset 0 1px rgba(255,255,255,.045), 0 24px 64px rgba(0,0,0,.32);
}
.home-live-control { display:flex; align-items:center; justify-content:space-between; gap:14px; min-height:58px; padding:10px 14px; border:1px solid rgba(202,194,241,.28); border-radius:16px; background:rgba(16,18,30,.92); }
.home-live-control > div { display:flex; align-items:center; gap:10px; min-width:0; }
.home-live-control > div > i { flex:0 0 auto; width:10px; height:10px; border-radius:50%; background:#73778b; box-shadow:0 0 0 5px rgba(115,119,139,.1); }
.home-live-control.connected > div > i { background:var(--ms-positive); box-shadow:0 0 0 5px rgba(84,216,148,.12),0 0 16px rgba(84,216,148,.4); }
.home-live-control span { display:grid; min-width:0; }
.home-live-control small { color:var(--ms-muted); font-size:11px; }
.home-live-control b { overflow:hidden; color:var(--ms-text); font-size:14px; text-overflow:ellipsis; white-space:nowrap; }
.home-live-control button { min-height:38px; padding:8px 15px; border:1px solid rgba(171,126,255,.42); border-radius:11px; background:linear-gradient(135deg,rgba(117,67,211,.85),rgba(78,45,143,.9)); color:#fff; font-weight:800; cursor:pointer; }
.home-live-control button:disabled { opacity:.58; cursor:wait; }
.home-live-center { position: relative; overflow: hidden; padding: 18px; }
.home-live-center::before,
.home-library-board::before { content:""; position:absolute; inset:0; pointer-events:none; border-radius:inherit; background:linear-gradient(115deg,transparent 0 63%,rgba(155,91,255,.08),transparent 78%); }
.home-board-title,
.home-library-board > header { position:relative; z-index:1; display:flex; align-items:center; justify-content:space-between; gap:18px; min-height:58px; padding:0 10px 14px; }
.home-board-title h2,
.home-library-board > header h2 { margin:2px 0 0; color:#fbf9ff; font-size:clamp(24px,2.25vw,36px); line-height:1.1; }
.home-board-title h2 i,
.home-library-board > header h2 i { color:var(--ms-gold); font-style:normal; filter:drop-shadow(0 0 8px rgba(241,200,118,.35)); }
.home-board-title span,
.home-library-board > header span { color:#aaa8bc; font-size:13px; }
.home-account-chip { display:flex; align-items:center; gap:10px; min-width:200px; padding:8px 12px; border:1px solid rgba(219,213,247,.28); border-radius:15px; background:rgba(255,255,255,.035); }
.home-account-chip img { width:42px; height:42px; object-fit:contain; border-radius:50%; padding:3px; border:1px solid rgba(183,140,255,.5); background:#12141f; }
.home-account-chip div { display:grid; }
.home-account-chip small { color:#a7a4b7; }
.home-control-grid { position:relative; z-index:1; display:grid; grid-template-columns:minmax(300px,.78fr) minmax(540px,1.5fr); gap:16px; direction:ltr; }
.home-left-stack,
.home-right-stack { display:grid; gap:14px; min-width:0; direction:rtl; }
.home-left-stack { grid-template-rows:minmax(230px,1fr) auto; }
.home-right-stack { grid-template-rows:auto auto 1fr; }
.home-stream-card { position:relative; min-height:250px; overflow:hidden; border:1px solid rgba(218,214,245,.26); border-radius:17px; background:#0b0d16; box-shadow:inset 0 1px rgba(255,255,255,.05); }
.home-stream-card > img { width:100%; height:100%; object-fit:cover; filter:saturate(.9) contrast(1.04); }
.home-stream-shade { position:absolute; inset:0; background:linear-gradient(180deg,rgba(5,6,12,.08),rgba(6,7,13,.12) 52%,rgba(5,6,12,.82)); }
.home-demo-badge { position:absolute; top:14px; right:14px; display:flex; align-items:center; gap:7px; padding:6px 10px; border-radius:999px; background:rgba(25,20,34,.75); backdrop-filter:blur(12px); font-size:11px; }
.home-demo-badge i { width:8px; height:8px; border-radius:50%; background:#ff5c6c; box-shadow:0 0 10px rgba(255,92,108,.7); }
.home-stream-brand { position:absolute; top:16px; left:16px; display:flex; align-items:center; gap:9px; text-align:left; direction:ltr; }
.home-stream-brand img { width:45px; height:32px; object-fit:contain; filter:drop-shadow(0 0 10px rgba(173,100,255,.5)); }
.home-stream-brand div { display:grid; }
.home-stream-brand small { color:#cfcadc; }
.home-stream-card footer { position:absolute; inset:auto 16px 12px; display:grid; grid-template-columns:auto auto 1fr auto; align-items:center; gap:10px; font-size:11px; }
.home-stream-card footer span { height:3px; border-radius:3px; background:linear-gradient(90deg,#8a4cf2 48%,rgba(255,255,255,.17) 48%); }
.home-activity-card,
.home-platform-panel,
.home-quick-panel { border:1px solid rgba(218,214,245,.2); border-radius:16px; background:linear-gradient(145deg,rgba(26,28,43,.72),rgba(12,14,24,.78)); overflow:hidden; }
.home-activity-card > header,
.home-platform-panel > header,
.home-quick-panel > header { display:flex; align-items:center; justify-content:space-between; min-height:42px; padding:9px 13px; border-bottom:1px solid rgba(218,214,245,.13); }
.home-activity-card > header button { min-height:28px; padding:3px 10px; border-radius:999px; background:transparent; font-size:10px; }
.home-activity-list { padding:5px 12px 8px; }
.home-activity-list article { display:grid; grid-template-columns:48px 16px minmax(0,1fr); align-items:center; gap:8px; min-height:34px; padding-inline:6px; border-bottom:1px solid rgba(255,255,255,.045); }
.home-activity-list article:last-child { border-bottom:0; }
.home-activity-list time { color:#8f8da0; font-size:10px; direction:ltr; }
.home-activity-list span { width:9px; height:9px; border-radius:50%; background:var(--ms-violet); box-shadow:0 0 12px rgba(139,92,246,.55); }
.home-activity-list .activity-follow { background:var(--ms-gold); }
.home-activity-list .activity-like { background:#ff6f8a; }
.home-activity-list b { overflow:hidden; color:#e7e4f1; font-size:11px; font-weight:650; text-overflow:ellipsis; white-space:nowrap; }
.home-platform-grid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:10px; padding:12px; }
.home-platform-card { position:relative; display:grid; place-items:center; align-content:center; min-height:90px; padding:10px; border:1px solid rgba(218,214,245,.16); border-radius:14px; background:linear-gradient(145deg,rgba(255,255,255,.045),rgba(255,255,255,.015)); text-align:center; }
.home-platform-card.connected { border-color:rgba(241,200,118,.72); box-shadow:inset 0 0 24px rgba(241,200,118,.06),0 0 18px rgba(241,200,118,.07); }
.home-platform-card > i { display:grid; place-items:center; width:30px; height:30px; color:#d8b7ff; font-size:22px; font-style:normal; font-weight:900; }
.home-platform-card.platform-youtube > i { color:#ff4a55; }
.home-platform-card.platform-kick > i { color:#57f23c; }
.home-platform-card.platform-twitch > i { color:#9e6cff; }
.home-platform-card > b { font-size:12px; }
.home-platform-card > span { margin-top:4px; padding:2px 8px; border-radius:999px; background:rgba(255,255,255,.06); color:#aaa8b9; font-size:9px; }
.home-platform-card.connected > span { background:rgba(79,213,139,.17); color:#9ff3c4; }
.home-platform-card > em { position:absolute; top:9px; left:9px; width:8px; height:8px; border-radius:50%; background:#4ddb8f; box-shadow:0 0 12px rgba(77,219,143,.65); }
.home-stat-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; }
.home-stat-grid article { display:grid; grid-template-columns:auto 1fr; grid-template-rows:auto auto; align-items:center; gap:0 11px; min-height:82px; padding:12px 16px; border:1px solid rgba(218,214,245,.22); border-radius:15px; background:linear-gradient(145deg,rgba(31,33,49,.78),rgba(17,19,31,.82)); }
.home-stat-grid i { grid-row:1/-1; color:#f2c789; font-size:25px; font-style:normal; }
.home-stat-grid b { font-size:26px; line-height:1; direction:ltr; text-align:right; }
.home-stat-grid span { color:#aaa8b8; font-size:11px; }
.home-quick-panel > div { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:10px; padding:12px; }
.home-quick-panel > div > button { display:grid; grid-template-columns:34px 1fr; align-items:center; min-height:74px; padding:12px; border-color:rgba(218,214,245,.2); border-radius:14px; background:linear-gradient(145deg,rgba(129,76,225,.15),rgba(255,255,255,.025)); text-align:right; }
.home-quick-panel svg { width:24px; color:#c69bff; }
.home-quick-panel button span { display:grid; }
.home-quick-panel button small { color:#9997aa; font-size:9px; }
.home-library-board { position:relative; overflow:hidden; padding:16px 18px 14px; }
.home-library-board > header { padding:0 4px 12px; }
.home-library-board > header > button { min-height:34px; padding:5px 13px; background:rgba(255,255,255,.025); }
.home-game-shelf { position:relative; z-index:1; display:grid; grid-template-columns:repeat(6,minmax(0,1fr)); gap:10px; }
.home-game-card { position:relative; display:grid !important; grid-template-rows:auto 1fr auto !important; min-height:230px !important; padding:0 !important; overflow:hidden; border:1px solid rgba(218,214,245,.2) !important; border-radius:16px !important; background:#10121d !important; text-align:right !important; }
.home-game-card .game-cover { aspect-ratio:1.55; }
.home-game-card > span { display:grid; align-content:start; gap:3px; min-height:70px; padding:10px 11px 7px; }
.home-game-card > span b { font-size:14px; }
.home-game-card > span small { color:#aaa7b8; font-size:9px; line-height:1.4; }
.home-game-card > i,
.home-game-card > em { position:absolute; bottom:8px; min-width:58px; padding:5px 8px; border:1px solid rgba(218,214,245,.25); border-radius:8px; font-size:9px; font-style:normal; text-align:center; }
.home-game-card > i { right:9px; }
.home-game-card > em { left:9px; border-color:rgba(181,126,255,.55); background:linear-gradient(135deg,rgba(153,87,245,.7),rgba(100,57,187,.75)); }
.home-library-board > nav { position:relative; z-index:1; display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:10px; margin-top:14px; padding:8px; border:1px solid rgba(218,214,245,.18); border-radius:13px; background:rgba(255,255,255,.022); }
.home-library-board > nav button { min-height:38px; border:0; border-inline-start:1px solid rgba(218,214,245,.15); border-radius:8px; background:transparent; }
.home-library-board > nav button:last-child { border-inline-start:0; }
.home-library-board > nav button:first-child { border:1px solid rgba(181,126,255,.6); background:linear-gradient(135deg,rgba(135,76,229,.58),rgba(95,52,166,.42)); box-shadow:0 0 18px rgba(121,63,217,.2); }

/* Reference library cards */
.studio-catalogue-v5 { background:linear-gradient(145deg,rgba(20,22,35,.98),rgba(8,10,18,.98)); }
.studio-catalogue-v5 .game-card-grid { grid-template-columns:repeat(auto-fit,minmax(190px,1fr)); gap:13px; }
.studio-catalogue-v5 .game-card { min-height:290px; border-color:rgba(215,210,242,.24); background:linear-gradient(160deg,#171925,#0c0e17); }
.studio-catalogue-v5 .game-card-content { padding:14px; }
.studio-catalogue-v5 .game-card-content > em { color:var(--ms-gold); font-size:10px; font-style:normal; }
.studio-catalogue-v5 .game-card-content > strong { margin:3px 0; font-size:18px; }
.studio-catalogue-v5 .game-card-content > small { color:#a8a5b6; font-size:11px; }
.studio-catalogue-v5 .game-card-content > i { margin-top:auto; color:#d6c6ef; font-size:11px; font-style:normal; }
.game-card-reference-actions { display:grid; grid-template-columns:1fr 1fr; gap:8px; margin-top:auto; padding-top:12px; }
.game-card-reference-actions > i,
.game-card-reference-actions > b { min-height:34px; display:grid; place-items:center; border:1px solid rgba(219,214,245,.28); border-radius:9px; font-size:11px; font-style:normal; font-weight:800; }
.game-card-reference-actions > b { border-color:rgba(191,139,255,.65); background:linear-gradient(135deg,#9863ef,#6538b5); box-shadow:inset 0 1px rgba(255,255,255,.18),0 8px 20px rgba(105,52,190,.24); }

/* Board 01 — real leaderboard compositions. */
.ranking-reference-page{position:relative;overflow:hidden;padding:20px;border:1px solid rgba(208,199,242,.36);border-radius:22px;background:radial-gradient(circle at 12% 0,rgba(90,47,160,.15),transparent 30rem),linear-gradient(145deg,#12141f,#080a12);box-shadow:var(--ms-shadow)}
.ranking-reference-page::before{content:"";position:absolute;inset:-10% -20%;pointer-events:none;background:linear-gradient(115deg,transparent 0 34%,rgba(126,71,219,.1) 39%,transparent 45%,transparent 70%,rgba(241,200,118,.07) 74%,transparent 79%);transform:rotate(-3deg)}
.ranking-reference-page>header,.ranking-reference-page>footer,.ranking-reference-grid{position:relative;z-index:1}.ranking-reference-page>header{display:flex;align-items:center;justify-content:space-between;gap:20px;padding:6px 10px 16px;border-bottom:1px solid rgba(218,216,244,.14)}
.ranking-reference-page>header span{color:#cbc5d9;font-size:11px}.ranking-reference-page>header h2{margin:2px 0 0;font-size:32px}.ranking-reference-page>header p{margin:4px 0 0;color:var(--ms-muted);font-size:11px}
.ranking-live-state{display:flex;align-items:center;gap:8px;padding:7px 11px;border:1px solid var(--ms-line);border-radius:999px;color:var(--ms-muted);font-size:10px}.ranking-live-state i{width:8px;height:8px;border-radius:50%;background:var(--ms-warning);box-shadow:0 0 12px rgba(255,202,117,.5)}.ranking-live-state.live i{background:var(--ms-positive)}
.ranking-reference-grid{display:grid;grid-template-columns:1fr 1fr;gap:14px;padding:16px 0}.ranking-family{min-width:0;overflow:hidden;border:1px solid rgba(218,216,244,.2);border-radius:18px;background:rgba(255,255,255,.018)}
.ranking-family>header{display:flex;align-items:center;justify-content:space-between;min-height:68px;padding:10px 16px;border-bottom:1px solid rgba(218,216,244,.18);background:linear-gradient(180deg,rgba(113,62,192,.48),rgba(72,38,125,.24))}.ranking-family.support>header{background:linear-gradient(180deg,rgba(160,112,45,.38),rgba(90,61,27,.2))}
.ranking-family>header span{display:block;color:#c9c3d5;font-size:8px}.ranking-family>header h3{margin:0;font-size:24px;line-height:1}.ranking-family>header small{display:block;margin-top:3px;color:#d8d2df;font-size:9px;letter-spacing:.13em;direction:ltr;text-align:right}.ranking-family>header>i{color:#c895ff;font-size:40px;font-style:normal;filter:drop-shadow(0 0 11px rgba(180,107,255,.45))}.ranking-family.support>header>i{color:var(--ms-gold);filter:drop-shadow(0 0 11px rgba(241,200,118,.45))}
.ranking-podium{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));align-items:end;min-height:228px;padding:28px 22px 10px;gap:8px}.rank-place{position:relative;display:grid;justify-items:center;align-content:start;min-width:0;min-height:132px;padding:18px 8px 10px;border:1px solid rgba(205,167,255,.38);border-radius:50% 50% 15px 15px/28% 28% 15px 15px;background:linear-gradient(180deg,rgba(155,95,238,.28),rgba(89,49,143,.18));box-shadow:inset 0 1px rgba(255,255,255,.22),0 0 24px rgba(126,68,218,.16);text-align:center}.ranking-family.support .rank-place{border-color:rgba(241,200,118,.42);background:linear-gradient(180deg,rgba(241,200,118,.22),rgba(92,61,28,.16))}
.rank-place.rank-1{order:2;min-height:174px;border-color:rgba(255,218,143,.74);transform:translateY(-12px)}.rank-place.rank-2{order:1;min-height:145px}.rank-place.rank-3{order:3;min-height:132px}.rank-place>i{position:absolute;top:-25px;color:var(--ms-gold);font-size:31px;font-style:normal;filter:drop-shadow(0 0 9px rgba(241,200,118,.55))}
.rank-avatar{position:relative;display:grid;place-items:center;width:66px;aspect-ratio:1;margin-bottom:6px;border:2px solid rgba(255,255,255,.65);border-radius:50%;background:#202236;box-shadow:0 0 18px rgba(178,116,255,.35)}.rank-avatar img,.rank-list-avatar img,.ranking-bubbles article>div img{width:100%;height:100%;border-radius:inherit;object-fit:cover}.rank-avatar>span,.rank-list-avatar>span,.ranking-bubbles article>div>span{display:grid;place-items:center;width:100%;height:100%;border-radius:inherit;background:linear-gradient(145deg,#8851e5,#33204d)}.rank-avatar>b{position:absolute;inset:auto -4px -4px auto;display:grid;place-items:center;width:24px;aspect-ratio:1;border:2px solid rgba(255,255,255,.7);border-radius:50%;background:linear-gradient(145deg,#ffe6aa,#c88b27);color:#1a1420;font-size:11px}
.rank-place>strong,.rank-place>small,.rank-place>em{max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.rank-place>small{color:#bdb7c6;font-size:8px}.rank-place>em{color:#e2c2ff;font-size:13px;font-style:normal;font-weight:900;direction:ltr}.ranking-family.support .rank-place>em{color:var(--ms-gold-2)}
.ranking-list{display:grid;gap:4px;padding:8px 12px;border-top:1px solid rgba(218,216,244,.14)}.ranking-list article{display:grid;grid-template-columns:34px 32px minmax(0,1fr) auto;align-items:center;gap:7px;min-height:38px;padding:4px 8px;border:1px solid rgba(218,216,244,.12);border-radius:999px;background:linear-gradient(90deg,rgba(123,73,211,.16),rgba(255,255,255,.018))}.ranking-family.support .ranking-list article{background:linear-gradient(90deg,rgba(171,119,51,.15),rgba(255,255,255,.018))}.ranking-list article>b{display:grid;place-items:center;min-width:28px;height:22px;border-radius:999px;background:rgba(153,96,238,.24);font-size:10px}.rank-list-avatar{display:grid;place-items:center;width:30px;aspect-ratio:1;overflow:hidden;border:1px solid rgba(255,255,255,.4);border-radius:50%}.ranking-list article div{min-width:0;display:flex;gap:5px;align-items:center}.ranking-list strong,.ranking-list small{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ranking-list small{color:#aaa5b6;font-size:8px}.ranking-list em{color:#e1c0ff;font-size:11px;font-style:normal;font-weight:900;direction:ltr}
.ranking-bubbles{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:6px;padding:10px 12px;border-top:1px solid rgba(218,216,244,.14)}.ranking-bubbles article{position:relative;display:grid;justify-items:center;min-width:0;padding:8px 3px;border:1px solid rgba(255,255,255,.23);border-radius:50% 50% 20px 20px;background:radial-gradient(circle at 30% 16%,rgba(255,255,255,.25),rgba(135,78,219,.1) 45%,rgba(8,9,16,.7));box-shadow:inset 0 1px rgba(255,255,255,.28);text-align:center}.ranking-family.support .ranking-bubbles article{background:radial-gradient(circle at 30% 16%,rgba(255,255,255,.25),rgba(241,200,118,.1) 45%,rgba(8,9,16,.7))}.ranking-bubbles article>b{position:absolute;top:3px;z-index:2;display:grid;place-items:center;width:20px;aspect-ratio:1;border-radius:50%;background:linear-gradient(145deg,#ffe8b2,#bf8326);color:#211608;font-size:9px}.ranking-bubbles article>div{width:46px;aspect-ratio:1;overflow:hidden;border:1px solid rgba(255,255,255,.5);border-radius:50%}.ranking-bubbles strong,.ranking-bubbles em{max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ranking-bubbles strong{margin-top:3px;font-size:10px}.ranking-bubbles em{color:#d9b7fa;font-size:8px;font-style:normal;direction:ltr}
.ranking-champion{display:grid;grid-template-columns:minmax(120px,.85fr) 1.4fr;min-height:148px;padding:10px 12px 14px;border-top:1px solid rgba(218,216,244,.14)}.ranking-champion>article{position:relative;display:grid;justify-items:center;align-content:center;padding:8px;border:1px solid rgba(241,200,118,.5);border-radius:28px;background:radial-gradient(circle at 50% 35%,rgba(241,200,118,.14),transparent 55%)}.ranking-champion>article>i{position:absolute;top:3px;color:var(--ms-gold);font-size:22px;font-style:normal}.ranking-champion>article .rank-avatar{width:56px}.ranking-champion>article em{color:var(--ms-gold-2);font-style:normal;font-weight:900}.ranking-champion>.ranking-list{align-content:center;padding:4px 8px;border:0}.ranking-empty{grid-column:1/-1;place-self:center;color:var(--ms-muted)}
.ranking-reference-page>footer{display:grid;grid-template-columns:repeat(3,minmax(120px,1fr)) minmax(200px,1.4fr);gap:8px;padding:10px;border:1px solid rgba(218,216,244,.2);border-radius:14px;background:rgba(255,255,255,.025)}.ranking-reference-page>footer>div{display:grid;grid-template-columns:1fr auto;align-items:center;min-height:40px;padding:6px 10px;border-inline-start:1px solid rgba(218,216,244,.14)}.ranking-reference-page>footer span{color:#aaa6b7;font-size:9px}.ranking-reference-page>footer b{font-size:11px}.ranking-reference-page>footer button{min-height:40px;border-color:rgba(188,136,255,.62);background:linear-gradient(145deg,#8c54df,#5830a0)}

/* Board 02 — the comments screen uses the same real stream state as the feed. */
.comment-reference-board { position:relative; margin-bottom:16px; padding:18px; overflow:hidden; border:1px solid rgba(208,199,242,.34); border-radius:22px; background:radial-gradient(circle at 68% 0,rgba(115,69,210,.12),transparent 28rem),linear-gradient(145deg,rgba(17,19,31,.98),rgba(7,9,16,.98)); box-shadow:var(--ms-shadow); }
.comment-reference-board::before { content:""; position:absolute; inset:-1px; pointer-events:none; background:linear-gradient(125deg,transparent 0 37%,rgba(145,87,235,.08) 50%,transparent 63%); }
.comment-reference-board > header { position:relative; z-index:1; display:flex; align-items:center; justify-content:space-between; gap:20px; padding:4px 8px 16px; border-bottom:1px solid rgba(218,216,244,.12); }
.comment-reference-board > header span { color:var(--ms-gold); font-size:10px; font-weight:800; letter-spacing:.08em; }
.comment-reference-board > header h3 { margin:3px 0 0; font-size:22px; }
.comment-board-source { display:flex; align-items:center; gap:8px; padding:7px 11px; border:1px solid var(--ms-line); border-radius:999px; color:var(--ms-muted); font-size:11px; }
.comment-board-source i { width:8px; height:8px; border-radius:50%; background:#6d6d7f; }
.comment-board-source.is-live { color:#bcf8d6; border-color:rgba(84,216,148,.38); }
.comment-board-source.is-live i { background:var(--ms-positive); box-shadow:0 0 14px rgba(84,216,148,.65); }
.comment-board-grid { position:relative; z-index:1; display:grid; grid-template-columns:1.05fr 1fr 1fr; gap:18px; padding-top:18px; }
.comment-board-panel { min-width:0; padding:0; border:0; background:transparent; }
.comment-board-panel h4 { display:grid; grid-template-columns:auto 1fr; grid-template-rows:auto auto; align-items:center; gap:0 8px; margin:0 0 9px; font-size:18px; }
.comment-board-panel h4 > i { grid-row:1/-1; color:#d2adff; font-size:25px; font-style:normal; filter:drop-shadow(0 0 9px rgba(183,140,255,.35)); }
.comment-board-panel h4 small { color:#8e8b9e; font-size:8px; font-weight:600; letter-spacing:.18em; direction:ltr; text-align:right; }
.board-live-chat > div { display:grid; gap:6px; }
.board-live-chat article { display:grid; grid-template-columns:38px minmax(0,1fr) auto; align-items:center; gap:9px; min-height:58px; padding:8px 10px; border:1px solid rgba(218,216,244,.18); border-radius:15px; background:linear-gradient(135deg,rgba(255,255,255,.065),rgba(255,255,255,.018)); box-shadow:inset 0 1px rgba(255,255,255,.05); }
.comment-board-avatar { display:grid; place-items:center; width:38px; aspect-ratio:1; overflow:hidden; border:1px solid rgba(214,184,255,.55); border-radius:50%; background:#1b1c2b; color:#fff; font-weight:900; }
.comment-board-avatar img { width:100%; height:100%; object-fit:cover; }
.board-live-chat article div { min-width:0; }
.board-live-chat article b,.board-live-chat article p { display:block; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.board-live-chat article p { margin:1px 0 0; color:#d6d3df; font-size:11px; }
.board-live-chat article time { color:#8d8a9b; font-size:9px; }
.featured-comment { position:relative; display:grid; grid-template-columns:70px minmax(0,1fr); align-items:center; gap:14px; min-height:164px; padding:22px; overflow:hidden; border:1px solid rgba(241,200,118,.66); border-radius:25px; background:radial-gradient(circle at 84% 20%,rgba(255,222,158,.13),transparent 32%),linear-gradient(145deg,rgba(255,255,255,.08),rgba(126,88,160,.05)); box-shadow:inset 0 1px rgba(255,255,255,.16),0 0 30px rgba(241,200,118,.08); }
.featured-comment::after { content:""; position:absolute; inset:auto -5% -20px 12%; height:44px; border:2px solid rgba(241,200,118,.55); border-radius:50%; filter:blur(5px); transform:rotate(-4deg); }
.featured-comment .comment-board-avatar { width:70px; border-width:2px; border-color:rgba(241,200,118,.75); }
.featured-comment div { min-width:0; }
.featured-comment b { font-size:20px; }
.featured-comment small { display:block; color:#b6b2c1; font-size:10px; }
.featured-comment p { margin:8px 0 0; font-size:17px; line-height:1.55; }
.event-lines { display:grid; gap:7px; }
.event-lines p { display:grid; grid-template-columns:42px minmax(0,1fr) auto; align-items:center; gap:8px; min-height:50px; margin:0; padding:6px 10px; border:1px solid rgba(218,216,244,.18); border-radius:999px; background:linear-gradient(90deg,rgba(128,78,218,.28),rgba(255,255,255,.025)); }
.event-lines i { display:grid; place-items:center; width:38px; height:38px; border-radius:50%; background:rgba(183,140,255,.12); color:#d6b6ff; font-size:18px; font-style:normal; }
.event-lines b { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:12px; }
.event-lines span { color:var(--ms-gold-2); font-weight:900; direction:ltr; }
.board-goal { display:grid; align-content:start; justify-items:center; }
.board-goal h4 { width:100%; }
.follower-goal-card { display:grid; grid-template-columns:52px minmax(0,1fr) 58px; align-items:center; gap:13px; min-height:112px; padding:18px; border:1px solid rgba(218,216,244,.26); border-radius:999px; background:linear-gradient(145deg,rgba(255,255,255,.075),rgba(255,255,255,.02)); box-shadow:inset 0 1px rgba(255,255,255,.12),0 0 24px rgba(241,200,118,.07); }
.follower-goal-card>i { display:grid; place-items:center; width:48px; aspect-ratio:1; border-radius:50%; background:rgba(150,92,243,.16); color:#d8b8ff; font-size:25px; font-style:normal; }
.follower-goal-card>div { display:grid; gap:9px; min-width:0; }
.follower-goal-card b { font-size:25px; text-align:right; }
.follower-goal-card span { height:10px; overflow:hidden; border-radius:999px; background:rgba(255,255,255,.09); }
.follower-goal-card span em { display:block; height:100%; border-radius:inherit; background:linear-gradient(90deg,#8f49ff,#d8b5ff); box-shadow:0 0 14px rgba(143,73,255,.55); }
.follower-goal-card>strong { display:grid; place-items:center; min-height:52px; border:1px solid rgba(218,216,244,.2); border-radius:999px; font-size:18px; direction:ltr; }
.goal-ring { position:relative; display:grid; place-items:center; align-content:center; width:min(170px,80%); aspect-ratio:1; border-radius:50%; background:radial-gradient(circle,#10121d 55%,transparent 56%),conic-gradient(#9d58ff var(--goal),rgba(255,255,255,.1) 0); box-shadow:0 0 28px rgba(139,92,246,.26),inset 0 0 18px rgba(255,255,255,.04); }
.goal-ring::after { content:"♡"; position:absolute; top:23px; color:#ffd5c4; font-size:25px; }
.goal-ring b { margin-top:22px; font-size:27px; direction:ltr; }
.goal-ring small { color:#d6d2dd; direction:ltr; }
.board-stats > div { display:grid; grid-template-columns:repeat(3,1fr); min-height:120px; padding:18px; border:1px solid rgba(218,216,244,.26); border-radius:32px; background:linear-gradient(145deg,rgba(255,255,255,.07),rgba(255,255,255,.018)); box-shadow:inset 0 1px rgba(255,255,255,.12),0 0 24px rgba(241,200,118,.06); }
.board-stats p { display:grid; align-content:center; justify-items:center; margin:0; border-inline-start:1px solid rgba(218,216,244,.2); }
.board-stats p:last-child { border-inline-start:0; }
.board-stats b { font-size:24px; direction:ltr; }
.board-stats small { color:#b6b2c0; font-size:10px; }
.identity-card { display:grid; grid-template-columns:64px minmax(0,1fr) 70px; align-items:center; gap:12px; min-height:112px; padding:14px; border:1px solid rgba(241,200,118,.5); border-radius:28px; background:linear-gradient(145deg,rgba(139,92,246,.18),rgba(241,200,118,.08),rgba(255,255,255,.025)); overflow:hidden; }
.identity-card > img:first-child { width:64px; height:64px; border:2px solid rgba(241,200,118,.75); border-radius:50%; object-fit:cover; }
.identity-card div { min-width:0; }
.identity-card b,.identity-card small { display:block; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.identity-card b { font-size:22px; }
.identity-card small { color:#b4afc0; direction:ltr; text-align:right; }
.identity-card .identity-mark { width:70px; height:50px; object-fit:contain; filter:drop-shadow(0 0 10px rgba(165,98,255,.4)); }
.new-follower-card { position:relative; display:grid; grid-template-columns:72px minmax(0,1fr) 42px; align-items:center; gap:13px; min-height:112px; padding:16px; overflow:hidden; border:1px solid rgba(216,181,255,.55); border-radius:46px; background:radial-gradient(circle at 82% 10%,rgba(241,200,118,.22),transparent 36%),linear-gradient(145deg,rgba(139,92,246,.18),rgba(255,255,255,.03)); box-shadow:inset 0 1px rgba(255,255,255,.14),0 0 26px rgba(139,92,246,.12); }
.new-follower-card .comment-board-avatar { width:70px; border-color:rgba(241,200,118,.7); }
.new-follower-card div { min-width:0; }
.new-follower-card b,.new-follower-card small { display:block; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.new-follower-card b { font-size:18px; }
.new-follower-card small { color:#bbb5c5; font-size:10px; }
.new-follower-card>i { display:grid; place-items:center; width:40px; aspect-ratio:1; border-radius:50%; background:linear-gradient(145deg,#a960ff,#6f34d0); color:#fff; font-size:21px; font-style:normal; }
.board-audio-stack { display:grid; grid-template-columns:minmax(0,1.55fr) minmax(150px,.75fr); gap:14px; align-items:end; }
.board-music,.board-tts { min-width:0; }
.music-player-card { display:grid; grid-template-columns:56px minmax(0,1fr) 42px; align-items:center; gap:11px; min-height:104px; padding:13px; border:1px solid rgba(241,200,118,.42); border-radius:22px; background:linear-gradient(145deg,rgba(139,92,246,.16),rgba(255,255,255,.025)); }
.music-player-card>span { display:grid; place-items:center; width:54px; aspect-ratio:1; border-radius:14px; background:radial-gradient(circle at 70% 15%,#8f55ff,#17203d 72%); color:#fff; font-size:23px; }
.music-player-card>div { display:grid; gap:3px; min-width:0; }
.music-player-card b,.music-player-card small { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.music-player-card small { color:#aaa6b7; font-size:9px; }
.music-player-card em { height:6px; overflow:hidden; border-radius:99px; background:rgba(255,255,255,.1); }
.music-player-card em i { display:block; height:100%; border-radius:inherit; background:linear-gradient(90deg,#8e4dff,#d9b8ff); }
.music-player-card button { display:grid; place-items:center; width:40px; min-width:40px; min-height:40px; padding:0; border-color:rgba(241,200,118,.46); border-radius:50%; background:rgba(255,255,255,.025); }
.tts-state { display:grid; grid-template-columns:13px 1fr; align-items:center; gap:2px 9px; min-height:104px; padding:18px; border:1px solid rgba(218,216,244,.24); border-radius:20px; background:linear-gradient(145deg,rgba(255,255,255,.06),rgba(255,255,255,.018)); }
.tts-state i { grid-row:1/-1; width:13px; height:13px; border-radius:50%; background:#777788; }
.tts-state.on i { background:#47ee86; box-shadow:0 0 18px rgba(71,238,134,.7); }
.tts-state small { color:#aba7b7; font-size:10px; direction:ltr; text-align:right; }
.comment-board-wait { display:grid; place-items:center; align-content:center; min-height:120px; padding:16px; border:1px dashed rgba(218,216,244,.2); border-radius:18px; color:var(--ms-muted); text-align:center; }
.comment-board-wait img { width:56px; height:36px; object-fit:contain; opacity:.75; }
.comment-board-wait b { margin-top:8px; color:var(--ms-text); font-size:12px; }
.comment-board-wait small { max-width:220px; font-size:9px; }

@media (max-width:1100px) {
  .ranking-reference-grid{grid-template-columns:1fr}
  .ranking-reference-page>footer{grid-template-columns:repeat(3,1fr)}
  .ranking-reference-page>footer button{grid-column:1/-1}
  .comment-board-grid { grid-template-columns:1fr 1fr; }
  .board-audio-stack { grid-template-columns:1fr; }
}
@media (max-width:720px) {
  .ranking-reference-page{padding:13px}
  .ranking-reference-page>header{align-items:flex-start}.ranking-reference-page>header h2{font-size:25px}.ranking-reference-page>header p{display:none}
  .ranking-podium{padding-inline:8px}.rank-avatar{width:48px}.rank-place{padding-inline:4px}.ranking-bubbles{grid-template-columns:repeat(3,1fr)}.ranking-bubbles article:nth-child(n+4){display:none}.ranking-reference-page>footer{grid-template-columns:1fr}
  .comment-reference-board { padding:13px; }
  .comment-reference-board > header { align-items:flex-start; }
  .comment-reference-board > header h3 { font-size:18px; }
  .comment-board-grid { grid-template-columns:1fr; gap:15px; }
  .featured-comment { min-height:140px; }
}
.studio-context-bar > * { min-width: 0; min-height: 44px; padding: 10px 16px; border-inline-start: 1px solid var(--ms-line); }
.studio-context-bar > *:first-child { border-inline-start: 0; }
.studio-context-bar small, .studio-context-bar label > span { display: block; color: var(--ms-muted); font-size: 11px; }
.studio-context-bar b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; }
.studio-context-bar label { display: block; }
.studio-context-bar select { width: 100%; height: 30px; padding: 0 0 0 30px; border: 0; background: transparent; color: var(--ms-text); font-weight: 700; outline: 0; }
.context-live { display: flex; align-items: center; gap: 9px; color: var(--ms-muted); font-size: 12px; white-space: nowrap; }

/* Shared controls */
.studio-body button,
.studio-body .studio-primary,
.studio-body .studio-secondary,
.studio-body .studio-ghost {
  min-height: var(--ms-control);
  padding: 9px 16px;
  border: 1px solid var(--ms-line-strong);
  border-radius: 11px;
  background: var(--ms-surface-2);
  color: var(--ms-text);
  font-weight: 750;
  cursor: pointer;
  transition: transform .16s ease, border-color .16s ease, background .16s ease, box-shadow .16s ease, opacity .16s ease;
}
.studio-body button:hover:not(:disabled) { transform: translateY(-1px); border-color: rgba(183,140,255,.62); background: #22263a; }
.studio-body button:focus-visible, .studio-body a:focus-visible, .studio-body input:focus-visible, .studio-body select:focus-visible, .studio-body textarea:focus-visible { outline: 3px solid rgba(183,140,255,.38); outline-offset: 2px; }
.studio-body button:disabled { cursor: not-allowed; opacity: .46; transform: none; }
.studio-body .studio-primary { border-color: rgba(183,140,255,.6); background: linear-gradient(135deg, var(--ms-violet), #6e41df); box-shadow: 0 10px 28px rgba(101,59,207,.24), inset 0 1px rgba(255,255,255,.18); }
.studio-body .studio-primary:hover:not(:disabled) { background: linear-gradient(135deg, #9b6cff, #7548e7); box-shadow: 0 13px 34px rgba(101,59,207,.32); }
.studio-body .studio-secondary { background: transparent; }
.studio-body .danger, .studio-body .danger-ghost { color: #ffb9c0; border-color: rgba(255,110,124,.35); background: rgba(255,110,124,.08); }
.studio-body input:not([type="range"]):not([type="checkbox"]):not([type="radio"]):not([type="color"]),
.studio-body select,
.studio-body textarea {
  width: 100%;
  min-height: var(--ms-control);
  padding: 9px 12px;
  border: 1px solid var(--ms-line-strong);
  border-radius: 10px;
  background: rgba(8,9,18,.7);
  color: var(--ms-text);
  outline: 0;
}
.studio-body textarea { min-height: 96px; resize: vertical; }
.studio-body input::placeholder, .studio-body textarea::placeholder { color: #77768a; }
.studio-body input[type="range"] { accent-color: var(--ms-violet); }
.studio-body input[type="checkbox"], .studio-body input[type="radio"] { accent-color: var(--ms-violet); }
.studio-body label { color: #d7d5e3; font-size: 13px; font-weight: 650; }
.studio-body output { display: block; color: var(--ms-muted); font-size: 13px; }

/* Shared page panels */
.studio-section,
.studio-home > section,
.studio-home > article,
.studio-library,
.studio-room-list {
  border: 1px solid var(--ms-line);
  border-radius: var(--ms-radius-lg);
  background: linear-gradient(145deg, rgba(22,24,38,.94), rgba(13,15,26,.96));
  box-shadow: var(--ms-shadow);
}
.studio-section { overflow: clip; }
.studio-section > header,
.studio-section > .game-browser-head,
.studio-section > .wheel-page-head,
.studio-section > .overlay-settings-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: clamp(22px, 3vw, 36px);
  border-bottom: 1px solid var(--ms-line);
}
.studio-section > header h2, .game-browser-head h2, .wheel-page-head h2 { margin: 4px 0 6px; font-size: clamp(24px, 2.2vw, 36px); line-height: 1.2; }
.studio-section > header p, .game-browser-head p, .wheel-page-head p { max-width: 760px; margin: 0; color: var(--ms-muted); }
.studio-section > header span, .eyebrow, .game-browser-head span, .wheel-page-head span { color: var(--ms-violet-2); font-size: 12px; font-weight: 800; }
.studio-empty, .studio-empty-inline, .interaction-idle { display: grid; place-items: center; min-height: 110px; padding: 24px; border: 1px dashed var(--ms-line-strong); border-radius: var(--ms-radius); background: rgba(8,9,18,.36); color: var(--ms-muted); text-align: center; }

/* Home */
.studio-home { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(300px, .75fr); gap: 18px; }
.featured-game { grid-row: span 2; display: grid; grid-template-columns: minmax(280px,.86fr) minmax(320px,1fr); min-height: 430px; overflow: hidden; }
.featured-game-cover { position: relative; min-height: 350px; overflow: hidden; background: #101222; }
.featured-game-cover::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, transparent 40%, rgba(10,11,20,.86)); }
.featured-game-cover img { width: 100%; height: 100%; object-fit: cover; }
.featured-game-cover > span { position: absolute; top: 20px; right: 20px; z-index: 2; padding: 7px 11px; border: 1px solid rgba(241,200,118,.5); border-radius: 999px; background: rgba(8,9,18,.74); color: var(--ms-gold-2); font-size: 12px; }
.featured-game-copy { align-self: center; padding: clamp(26px,4vw,52px); }
.featured-game-copy h2 { margin: 8px 0 12px; font-size: clamp(30px,3vw,52px); line-height: 1.15; }
.featured-game-copy > p { color: var(--ms-muted); }
.featured-game-name { display: flex; align-items: center; gap: 12px; margin: 26px 0; padding: 14px; border: 1px solid var(--ms-line); border-radius: 14px; background: rgba(255,255,255,.025); }
.featured-game-name i { width: 10px; height: 44px; border-radius: 10px; background: linear-gradient(var(--ms-violet), var(--ms-gold)); }
.featured-game-name div { display: grid; }
.featured-game-name small, .featured-game-name span { color: var(--ms-muted); }
.featured-actions, .studio-hero-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.live-compact-card { padding: 22px; }
.live-compact-status { display: flex; align-items: center; gap: 12px; }
.live-compact-status > i { width: 13px; height: 13px; border-radius: 50%; background: #676879; }
.live-compact-card.connected .live-compact-status > i { background: var(--ms-positive); box-shadow: 0 0 18px rgba(84,216,148,.5); }
.live-compact-status > div { display: grid; }
.live-compact-status small { color: var(--ms-muted); }
.live-compact-actions { display: flex; gap: 10px; margin-top: 18px; }
.home-launch-grid, .live-action-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; padding: 18px; }
.home-launch-grid button, .live-action-grid button { display: grid; text-align: right; min-height: 110px; background: linear-gradient(145deg, rgba(139,92,246,.12), rgba(255,255,255,.02)); }
.home-launch-grid button span, .live-action-grid button span { font-size: 22px; }
.home-launch-grid small, .live-action-grid small { color: var(--ms-muted); }
.realm-studio-card, .live-proof-grid { grid-column: 1 / -1; }
.live-proof-grid { display: grid; grid-template-columns: repeat(6,minmax(0,1fr)); gap: 10px; padding: 16px; }
.live-proof-grid article { display: grid; min-height: 116px; padding: 15px; border: 1px solid var(--ms-line); border-radius: 14px; background: rgba(255,255,255,.02); }
.live-proof-grid article.verified { border-color: rgba(84,216,148,.3); }
.live-proof-grid small, .live-proof-grid em { color: var(--ms-muted); font-size: 11px; font-style: normal; }
.live-proof-grid b { font-size: 24px; }
.live-command { display: flex; justify-content: space-between; align-items: center; gap: 24px; padding: 28px; border: 1px solid var(--ms-line); border-radius: var(--ms-radius-lg); background: var(--ms-surface); }
.live-orb { flex: 0 0 116px; aspect-ratio: 1; display: grid; place-items: center; align-content: center; border: 1px solid var(--ms-line-strong); border-radius: 50%; background: radial-gradient(circle, rgba(139,92,246,.23), transparent 65%); }
.live-orb small { color: var(--ms-muted); }

/* Games catalogue */
.game-hub { min-height: 620px; }
.game-hub-head, .game-browser-head { display: flex; align-items: center; justify-content: space-between; gap: 28px; padding: 30px; }
.game-hub-stats { display: flex; gap: 10px; }
.game-hub-stats > div, .game-hub-stats > article { min-width: 100px; padding: 14px; border: 1px solid var(--ms-line); border-radius: 13px; background: rgba(255,255,255,.025); text-align: center; }
.game-hub-stats b { display: block; font-size: 24px; }
.game-hub-stats span, .game-hub-stats small { color: var(--ms-muted); font-size: 11px; }
.studio-session-planner { display:grid; gap:14px; margin:18px; padding:18px; border:1px solid var(--ms-line); border-radius:17px; background:rgba(8,10,18,.44); }
.studio-session-planner>header { display:flex; align-items:flex-start; justify-content:space-between; gap:16px; padding:4px 6px 14px; border-bottom:1px solid var(--ms-line); }
.studio-session-planner>header span { color:var(--ms-gold-2); font-size:10px; font-weight:850; }.studio-session-planner>header h3 { margin:3px 0; }.studio-session-planner>header p { margin:0; color:var(--ms-muted); font-size:10px; }
.studio-session-planner>header>b { flex:0 0 auto; padding:7px 10px; border:1px solid rgba(183,140,255,.3); border-radius:10px; color:var(--ms-violet-2); }
.session-plan-list { display:grid; gap:8px; }.session-plan-list>article { display:grid; grid-template-columns:32px minmax(0,1fr) 90px 90px 130px auto; align-items:end; gap:8px; padding:10px; border:1px solid var(--ms-line); border-radius:12px; background:rgba(255,255,255,.02); }
.session-plan-list>article>span { display:grid; place-items:center; width:30px; aspect-ratio:1; border-radius:9px; background:rgba(139,92,246,.14); color:var(--ms-violet-2); font-weight:900; }.session-plan-list>article>div small { display:block; margin-top:3px; color:var(--ms-muted); font-size:9px; }
.session-plan-list label { display:grid; gap:4px; color:var(--ms-muted); font-size:9px; }.session-plan-actions { display:flex; gap:4px; }.session-plan-actions button { min-width:32px; padding:5px; }
.session-preset-row { display:grid; grid-template-columns:minmax(220px,1fr) auto auto; align-items:end; gap:8px; }.session-preset-row label { display:grid; gap:5px; color:var(--ms-muted); font-size:9px; }
.session-presets { display:flex; flex-wrap:wrap; gap:8px; min-height:26px; padding:4px 2px; }.session-presets>small { color:var(--ms-muted); }.session-presets article { display:flex; gap:4px; }.session-presets article>button:first-child { display:grid; text-align:start; }
.game-shortcuts, .game-filter { display: flex; flex-wrap: wrap; gap: 8px; padding: 16px 28px; border-block: 1px solid var(--ms-line); background: rgba(255,255,255,.016); }
.game-shortcuts button, .game-filter button { min-height: 38px; padding: 7px 13px; border-radius: 999px; background: transparent; }
.game-shortcuts button.active, .game-filter button.active { border-color: rgba(183,140,255,.65); background: rgba(139,92,246,.18); }
.game-card-grid, .game-tile-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 16px; padding: 22px; }
.game-card, .game-tile { position: relative; display: flex; flex-direction: column; min-width: 0; overflow: hidden; border: 1px solid var(--ms-line); border-radius: 18px; background: #101320; box-shadow: 0 18px 44px rgba(0,0,0,.18); transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease; }
.game-card:hover, .game-tile:hover { transform: translateY(-3px); border-color: rgba(183,140,255,.5); box-shadow: 0 25px 55px rgba(0,0,0,.3); }
.game-cover { position: relative; display:block; width:100%; margin:0; aspect-ratio: 16/9; overflow: hidden; background: radial-gradient(circle at 50% 40%, rgba(139,92,246,.28), #0c0e18 72%); }
.game-cover > img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.game-card:hover .game-cover img { transform: scale(1.025); }
.game-cover > span, .game-favorite-mark { position: absolute; top: 12px; padding: 6px 9px; border-radius: 999px; background: rgba(8,9,18,.75); backdrop-filter: blur(10px); }
.game-cover > span { right: 12px; }
.game-favorite-mark { left: 12px; color: var(--ms-gold); }
.game-card-content, .game-tile-copy { display: flex; flex: 1; flex-direction: column; padding: 18px; }
.game-card-content h3, .game-tile-copy h3 { margin: 0 0 6px; font-size: 20px; }
.game-card-content p, .game-tile-copy p { flex: 1; color: var(--ms-muted); font-size: 13px; }
.game-tile-meta { display: flex; gap: 6px; flex-wrap: wrap; color: var(--ms-muted); font-size: 11px; }
.game-actions { display: flex; gap: 8px; margin-top: 14px; }
.game-actions > * { flex: 1; }
.game-library-tip { margin: 0 22px 22px; padding: 14px 16px; border: 1px solid rgba(241,200,118,.2); border-radius: 12px; background: rgba(241,200,118,.05); color: var(--ms-gold-2); }

/* Modal and game setup */
.game-modal-layer { position: fixed; inset: 0; z-index: 900; display: grid; place-items: center; padding: 24px; background: rgba(3,4,9,.82); backdrop-filter: blur(14px); }
.game-modal-shell { display: flex; flex-direction: column; width: min(1240px, 100%); height: min(90dvh, 900px); max-height: min(90dvh, 900px); min-height: 0; overflow: hidden; border: 1px solid rgba(209,198,241,.32); border-radius: 24px; background: radial-gradient(circle at 80% 0,rgba(129,72,220,.11),transparent 30rem),#0d0f19; box-shadow: 0 40px 120px rgba(0,0,0,.68),inset 0 1px rgba(255,255,255,.06); }
.game-modal-shell.is-expanded { width: calc(100vw - 28px); height: calc(100dvh - 28px); max-height: calc(100dvh - 28px); }
.game-modal-head { position:relative; z-index:4; flex: 0 0 auto; display: flex; align-items: center; justify-content:space-between; gap: 12px; min-height: 70px; padding: 12px 18px; border-bottom: 1px solid var(--ms-line); background: rgba(15,17,29,.97); }
.game-modal-head > div:first-child { min-width:0; margin-inline-end: auto; }
.game-modal-head small,.game-modal-head strong { display:block; }
.game-modal-head small { color: var(--ms-gold-2); font-size:11px; font-weight:800; }
.game-modal-head strong { overflow-wrap:anywhere; color:#fff; font-size:20px; line-height:1.45; }
.game-modal-tools { display:flex; gap:8px; }
.game-modal-tools button { min-width:44px; min-height:42px; padding:7px 12px; border:1px solid var(--ms-line); border-radius:11px; background:#171a28; color:#fff; }
.game-modal-body { min-height: 0; flex: 1 1 auto; display: grid; overflow: hidden; overscroll-behavior: contain; scrollbar-gutter:stable; }
.game-modal-body.game-session-modal { display:block; min-height:0; max-height:100%; overflow-x:hidden; overflow-y:auto; touch-action:pan-y; -webkit-overflow-scrolling:touch; }
.game-modal-body > * { min-width: 0; }
.game-detail { display:grid; grid-template-columns:minmax(330px,.82fr) minmax(0,1.18fr); width:100%; height:100%; min-width:0; min-height:0; overflow:hidden; }
.game-detail-cover { position:relative; display:grid; grid-template-rows:minmax(0,1fr) auto; gap:14px; min-width:0; min-height:0; overflow:hidden; padding:18px; border-inline-end:1px solid var(--ms-line); background:radial-gradient(circle at 50% 20%,rgba(120,65,213,.16),transparent 22rem),#090b13; }
.game-detail-cover .game-cover { width:100%; height:100%; min-height:0; aspect-ratio:auto; border-radius:18px; }
.game-detail-cover .game-cover img { width:100%; height:100%; object-fit:cover; }
.game-detail-copy { min-width:0; min-height:0; max-height:100%; overflow-y:auto; overscroll-behavior:contain; padding:clamp(22px,3vw,38px); touch-action:pan-y; -webkit-overflow-scrolling:touch; }
.game-detail-copy > .eyebrow { color:var(--ms-gold-2); font-size:11px; font-weight:900; }
.game-detail-copy > h2 { margin:7px 0 4px; color:#fff; font-size:clamp(28px,3vw,42px); }
.game-detail-copy > p { margin:0 0 16px; color:var(--ms-muted); }
.game-modal-preview-state { display:grid; gap:4px; min-height:auto; padding:14px 16px; overflow:visible; border:1px solid rgba(241,200,118,.3); border-radius:16px; background:linear-gradient(145deg,rgba(139,92,246,.13),rgba(241,200,118,.06)); }
.game-modal-preview-state span,.game-modal-preview-state small { color:var(--ms-muted); font-size:11px; }
.game-modal-preview-state b { color:#fff; font-size:17px; }
.game-preview, .host-live-preview, .musical-live-preview { min-height: 420px; padding: 20px; background: #090b14; overflow: auto; }
.game-how { display:grid; grid-template-columns:1fr 1fr; gap:10px; }
.game-how article,.actual-question { padding:14px; border:1px solid var(--ms-line); border-radius:14px; background:rgba(255,255,255,.025); }
.actual-question { display:grid; gap:5px; font-size:inherit; }
.actual-question small,.game-how small { color:var(--ms-gold-2); font-size:10px; }
.actual-question b { color:#fff; font-size:18px; }
.actual-question span,.game-how b { color:#c9c5d4; font-size:12px; line-height:1.7; }
.game-detail .game-actions { position:sticky; z-index:3; bottom:0; display:grid; grid-template-columns:1fr 1fr; gap:8px; margin:18px -5px -8px; padding:13px 5px 8px; background:linear-gradient(to top,#0d0f19 75%,transparent); }
.game-detail .game-actions .studio-primary { background:linear-gradient(135deg,#9f62ff,#6c36cc); box-shadow:0 10px 25px rgba(127,68,226,.25); }
.game-join-keyword { display:grid; grid-template-columns:minmax(150px,.72fr) minmax(240px,1.28fr); gap:12px 16px; align-items:center; }
.game-modal-mobile-tabs { display: none; }
.game-fields, .round-setup-fields, .keyword-form, .live-game-form, .overlay-fields, .room-create-fields, .avatar-fields { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px; }
.game-fields label, .round-setup-fields label, .keyword-form label, .overlay-fields label, .room-create-fields label, .avatar-fields label { display: grid; gap: 6px; }
.game-fields .wide, .round-setup-fields .wide, .overlay-fields .wide, .avatar-fields .wide { grid-column: 1 / -1; }
.game-join-keyword, .game-setup-note, .game-connection-note { margin: 14px 0; padding: 14px; border: 1px solid var(--ms-line); border-radius: 12px; background: rgba(139,92,246,.07); }
.game-rules { display: grid; gap: 8px; margin: 16px 0; color: var(--ms-muted); }
.game-rules li { padding-inline-start: 4px; }

/* Comments, questions, poll */
.comment-center-toolbar { display: grid; grid-template-columns: 200px minmax(250px,1fr) minmax(220px,.7fr); gap: 12px; padding: 18px 28px; border-bottom: 1px solid var(--ms-line); }
.comment-center-toolbar label { display: grid; gap: 5px; }
.comment-platform-state { display: flex; align-items: center; gap: 8px; color: var(--ms-muted); }
.studio-capability-grid { display:grid; grid-template-columns:1.35fr .85fr .85fr; gap:12px; padding:18px 28px; border-bottom:1px solid var(--ms-line); background:rgba(255,255,255,.012); }
.studio-capability-grid > article { min-width:0; padding:16px; border:1px solid var(--ms-line); border-radius:15px; background:rgba(8,9,18,.42); }
.studio-capability-grid article > header { display:flex; align-items:flex-start; justify-content:space-between; gap:10px; margin-bottom:12px; }
.studio-capability-grid article > header div { display:grid; }
.studio-capability-grid article > header span { color:var(--ms-violet-2); font-size:11px; }
.studio-capability-grid article > header em { color:var(--ms-muted); font-size:10px; font-style:normal; }
.studio-capability-grid article > p,.studio-capability-grid article > small { margin:0; color:var(--ms-muted); font-size:11px; }
.tts-control-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:10px; margin-bottom:10px; }
.tts-control-grid label { display:grid; gap:4px; }
.tts-control-grid .tts-check { display:flex; align-items:center; gap:7px; }
.tts-actions { display:flex; align-items:end; gap:6px; }
.tts-actions button { min-height:38px; padding:6px 9px; font-size:11px; }
.chat-write-capability.unavailable { border-style:dashed; }
.live-comment-feed { display: grid; gap: 10px; min-height: 180px; padding: 28px; }
.live-comment-feed article, .question-queue article { display: grid; grid-template-columns: auto minmax(0,1fr) auto; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--ms-line); border-radius: 14px; background: rgba(255,255,255,.025); }
.comment-avatar { width: 42px; height: 42px; border-radius: 50%; object-fit: cover; background: var(--ms-surface-3); }
.comment-actions { display: flex; gap: 6px; }
.poll-form, .question-layout { display: grid; grid-template-columns: minmax(280px,.7fr) minmax(0,1.3fr); gap: 18px; padding: 24px; }
.question-queue, .question-spotlight { padding: 20px; border: 1px solid var(--ms-line); border-radius: 16px; background: rgba(8,9,18,.36); }
.question-spotlight { display: grid; place-items: center; min-height: 300px; text-align: center; }
.actual-question { font-size: clamp(24px,3vw,42px); }

/* Overlay and account settings */
.overlay-control { overflow:visible; background:transparent; border:0; box-shadow:none; }
.overlay-page-head { margin-bottom:16px; padding:20px 22px !important; border:1px solid var(--ms-line); border-radius:18px; background:radial-gradient(circle at 15% 0,rgba(139,92,246,.14),transparent 28rem),linear-gradient(145deg,rgba(19,21,34,.98),rgba(10,12,21,.98)); box-shadow:var(--ms-shadow); }
.overlay-control-grid { display:grid; grid-template-columns:minmax(0,1.28fr) minmax(340px,.72fr); grid-template-areas:"preview link" "preview settings"; align-items:start; gap:16px; min-height:680px; }
.overlay-current,.overlay-link-card,.overlay-settings { min-width:0; overflow:hidden; border:1px solid var(--ms-line); border-radius:18px; background:linear-gradient(145deg,rgba(21,23,37,.96),rgba(10,12,21,.98)); box-shadow:var(--ms-shadow); }
.overlay-current { grid-area:preview; position:sticky; top:16px; }
.overlay-link-card { grid-area:link; display:grid; gap:14px; padding:18px; }
.overlay-settings { grid-area:settings; display:grid; gap:18px; padding:18px; }
.overlay-panel-heading,.overlay-settings-head { display:grid; grid-template-columns:36px minmax(0,1fr) auto; align-items:center; gap:11px; }
.overlay-panel-heading>span,.overlay-settings-head>span { display:grid; place-items:center; width:36px; aspect-ratio:1; border:1px solid rgba(183,140,255,.36); border-radius:12px; background:rgba(139,92,246,.13); color:var(--ms-violet-2); font-size:11px; font-weight:900; }
.overlay-panel-heading b,.overlay-settings-head b { display:block; color:#fff; font-size:15px; }
.overlay-panel-heading p,.overlay-settings-head p { margin:3px 0 0; color:var(--ms-muted); font-size:10px; line-height:1.7; }
.overlay-panel-heading>strong { padding:7px 10px; border:1px solid rgba(241,200,118,.28); border-radius:10px; color:var(--ms-gold-2); font-size:11px; }
.overlay-live-preview { padding:14px; border-block:1px solid var(--ms-line); background:#080a12; }
.overlay-preview-toolbar { display:flex; flex-wrap:wrap; gap:6px; margin-bottom:10px; }
.overlay-preview-toolbar button { min-height:34px; padding:5px 9px; border-radius:9px; color:var(--ms-muted); font-size:10px; }
.overlay-preview-toolbar button:hover,.overlay-preview-toolbar button.active { border-color:rgba(183,140,255,.55); background:rgba(139,92,246,.13); color:#fff; }
.overlay-preview-viewport { position:relative; display:grid; place-items:center; width:100%; min-height:520px; overflow:hidden; border:1px solid rgba(183,140,255,.28); border-radius:15px; background-color:#0b0e18; background-image:linear-gradient(45deg,#141827 25%,transparent 25%),linear-gradient(-45deg,#141827 25%,transparent 25%),linear-gradient(45deg,transparent 75%,#141827 75%),linear-gradient(-45deg,transparent 75%,#141827 75%); background-size:24px 24px; background-position:0 0,0 12px,12px -12px,-12px 0; }
.overlay-preview-viewport iframe { display:block; width:100%; height:100%; min-height:520px; border:0; background:transparent; }
.overlay-preview-footer { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:12px 16px; color:var(--ms-muted); font-size:10px; }
.overlay-preview-footer button { min-height:38px; }
.overlay-current>.overlay-panel-heading { padding:14px 16px; }
.overlay-lab { display:grid; gap:12px; margin:0 14px 14px; padding:14px; border:1px solid var(--ms-line); border-radius:14px; background:rgba(255,255,255,.018); }
.overlay-lab>header { display:flex; align-items:flex-start; justify-content:space-between; gap:12px; padding:0 2px 11px; border-bottom:1px solid var(--ms-line); }
.overlay-lab>header span,.overlay-lab>header b,.overlay-lab>header small { display:block; }.overlay-lab>header span { color:var(--ms-gold-2); font-size:9px; }.overlay-lab>header b { margin-top:3px; }.overlay-lab>header small { margin-top:3px; color:var(--ms-muted); font-size:9px; }
.overlay-lab>header a { flex:0 0 auto; color:var(--ms-violet-2); font-size:10px; }
.overlay-lab-fields { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:9px; }
.overlay-lab-fields label { display:grid; gap:5px; color:var(--ms-muted); font-size:9px; }.overlay-lab-fields label:last-child { grid-column:1/-1; }
.overlay-lab-actions { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:7px; }
.overlay-lab-actions button { min-height:37px; padding:6px; font-size:9px; }
.overlay-lab>output { display:block; min-height:36px; padding:9px 11px; border-radius:10px; background:rgba(8,10,18,.58); color:var(--ms-muted); font-size:9px; line-height:1.7; }
.overlay-link-card>label,.overlay-fields>label,.overlay-size-inputs>label { display:grid; gap:6px; color:var(--ms-muted); font-size:10px; }
.overlay-link-card input { min-width:0; direction:ltr; text-align:left; }
.overlay-source-metrics { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; padding:10px; border:1px solid var(--ms-line); border-radius:12px; background:rgba(7,9,17,.48); }
.overlay-source-metrics article { display:grid; gap:3px; padding:9px; border-radius:9px; background:rgba(255,255,255,.025); }
.overlay-source-metrics small { color:var(--ms-muted); font-size:9px; }.overlay-source-metrics b { overflow:hidden; direction:ltr; color:#fff; font-size:11px; text-overflow:ellipsis; white-space:nowrap; }
.overlay-source-metrics p { grid-column:1/-1; margin:0; padding:8px 9px; border-radius:8px; color:var(--ms-muted); font-size:9px; line-height:1.7; }
.overlay-source-metrics.connected.matched p { background:rgba(77,224,151,.08); color:#9af0c2; }.overlay-source-metrics.mismatch p { background:rgba(241,200,118,.09); color:#ffe0a0; }
.overlay-actions { display:grid; grid-template-columns:1fr 1fr 1fr; gap:7px; }
.overlay-actions>* { display:grid; place-items:center; min-height:40px; padding:7px 9px; border:1px solid var(--ms-line); border-radius:10px; background:rgba(255,255,255,.025); color:var(--ms-text); text-decoration:none; font-size:11px; }
.overlay-theme-picker { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; margin:0; padding:0; border:0; }
.overlay-theme-picker legend { grid-column:1/-1; padding-bottom:2px; color:#fff; font-size:12px; font-weight:850; }
.overlay-theme-choice { position:relative; min-width:0; }
.overlay-theme-choice input { position:absolute; inset:0; opacity:0; }
.overlay-theme-choice span { display:grid; grid-template-columns:22px minmax(0,1fr); gap:2px 8px; min-height:64px; padding:10px; border:1px solid var(--ms-line); border-radius:12px; background:rgba(255,255,255,.025); cursor:pointer; }
.overlay-theme-choice i { grid-row:span 2; width:22px; height:22px; border-radius:50%; background:var(--choice-accent); box-shadow:0 0 14px color-mix(in srgb,var(--choice-accent) 55%,transparent); }
.overlay-theme-choice small { overflow:hidden; color:var(--ms-muted); font-size:9px; text-overflow:ellipsis; white-space:nowrap; }
.overlay-theme-choice:has(input:checked) span { border-color:color-mix(in srgb,var(--choice-accent) 68%,white 10%); background:color-mix(in srgb,var(--choice-accent) 13%,transparent); }
.overlay-fields { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; }
.overlay-wide,.overlay-size-settings,.overlay-toggles { grid-column:1/-1; }
.overlay-size-settings { display:grid; gap:13px; padding:14px; border:1px solid var(--ms-line); border-radius:14px; background:rgba(255,255,255,.018); }
.overlay-size-settings>header { display:flex; align-items:flex-start; justify-content:space-between; gap:12px; }
.overlay-size-settings>header b,.overlay-size-settings>header small { display:block; }
.overlay-size-settings>header small,.overlay-size-minimum { margin-top:3px; color:var(--ms-muted); font-size:9px; line-height:1.7; }
.overlay-size-settings>header strong { flex:0 0 auto; color:var(--ms-gold-2); font-size:11px; }
.overlay-size-groups { display:grid; gap:10px; }
.overlay-size-groups>div { display:grid; gap:6px; }
.overlay-size-groups>div>b { color:#dcd8e8; font-size:10px; }
.overlay-size-presets { display:flex; flex-wrap:wrap; gap:6px; margin:0; }
.overlay-size-presets button { min-height:34px; padding:6px 8px; border-radius:9px; font-size:9px; }
.overlay-size-inputs,.overlay-lab-fields { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
.overlay-ratio-lock { grid-column:1/-1; display:flex !important; grid-template-columns:auto 1fr; align-items:center; }
.overlay-toggles { display:flex; flex-wrap:wrap; gap:8px; margin:0; }
.overlay-toggles label { display:flex; align-items:center; gap:7px; min-height:38px; padding:8px 10px; border:1px solid var(--ms-line); border-radius:10px; background:rgba(255,255,255,.02); }
.overlay-save-row { display:flex; align-items:center; gap:10px; padding-top:2px; }
.overlay-save-row output { min-width:0; color:var(--ms-muted); font-size:10px; }
.overlay-steps { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:10px; margin-top:16px; }
.overlay-steps article { display:grid; gap:4px; padding:14px 16px; border:1px solid var(--ms-line); border-radius:14px; background:rgba(255,255,255,.02); }
.overlay-steps b { color:var(--ms-gold-2); font-size:11px; }.overlay-steps span { color:var(--ms-muted); font-size:10px; line-height:1.7; }
.stream-account-grid { display: grid; gap: 12px; padding: 24px; }
.stream-account-card { display: grid; grid-template-columns: auto minmax(0,1fr) auto; gap: 16px; align-items: center; padding: 18px; border: 1px solid var(--ms-line); border-radius: 15px; background: rgba(255,255,255,.025); }
.stream-account-icon { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 14px; background: var(--ms-surface-3); font-size: 24px; }
.stream-account-content { min-width: 0; }
.stream-account-identity { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: baseline; }
.stream-account-identity small, .stream-account-identity em { color: var(--ms-muted); font-style: normal; }
.platform-capabilities { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.platform-capabilities span { padding: 4px 8px; border-radius: 999px; background: rgba(255,255,255,.045); color: var(--ms-muted); font-size: 11px; }
.platform-capabilities .yes { color: #a8f5c8; background: rgba(84,216,148,.09); }
.stream-account-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 7px; }
.stream-oauth-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; padding: 0 24px 24px; }
.stream-oauth-button { display: grid; grid-template-columns: auto 1fr; gap: 4px 10px; text-align: right; }
.stream-oauth-button span { grid-row: span 2; font-size: 26px; }
.stream-oauth-button small { color: var(--ms-muted); }
.stream-account-add, .stream-account-note { margin: 0 24px 24px; padding: 18px; border: 1px solid var(--ms-line); border-radius: 14px; background: rgba(255,255,255,.02); }

/* Rooms and avatar */
.room-manage-grid, .room-live-grid, .avatar-workspace { display: grid; grid-template-columns: minmax(320px,.8fr) minmax(0,1.2fr); gap: 18px; padding: 24px; }
.room-stage, .room-create, .room-moderation, .avatar-builder, .avatar-preview-panel { padding: 20px; border: 1px solid var(--ms-line); border-radius: 16px; background: rgba(8,9,18,.36); }
.room-metrics, .room-share-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 10px; }
.room-metrics article, .room-share-grid article { padding: 14px; border: 1px solid var(--ms-line); border-radius: 13px; }
.avatar-builder { display:grid; gap:12px; }
.avatar-step { padding:16px; border:1px solid var(--ms-line); border-radius:14px; background:rgba(255,255,255,.018); }
.avatar-step > b { display: block; margin-bottom: 12px; }
.avatar-step > b span { color: var(--ms-gold); }
.avatar-drop { display: grid; place-items: center; min-height: 130px; padding: 18px; border: 1px dashed var(--ms-line-strong); border-radius: 14px; text-align: center; }
.avatar-drop input { max-width: 260px; }
.avatar-stage { display: grid; place-items: center; min-height: 380px; overflow: hidden; border-radius: 18px; background: radial-gradient(circle,rgba(139,92,246,.18),transparent 65%),#0b0d17; }
.avatar-stage img { width: 100%; height: 100%; object-fit: contain; }
.avatar-empty { display: grid; place-items: center; gap: 8px; color: var(--ms-muted); text-align: center; }
.avatar-versions, .avatar-privacy { padding: 24px; border-top: 1px solid var(--ms-line); }
.avatar-versions > div { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 12px; }
.avatar-versions article { padding: 10px; border: 1px solid var(--ms-line); border-radius: 14px; }
.avatar-versions article img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 10px; }

/* Wheel, tournament, teams, chairs */
.wheel-live-layout { display: grid; grid-template-columns: minmax(0,1.25fr) minmax(290px,.65fr); gap: 18px; padding: 22px; }
.wheel-showcase { display: grid; place-items: center; min-height: 560px; border: 1px solid var(--ms-line); border-radius: 20px; background: radial-gradient(circle at 50% 48%, rgba(139,92,246,.16), transparent 46%),#090b14; }
.wheel-compact-panel { display: grid; align-content: start; gap: 12px; }
.wheel-compact-panel > * { padding: 14px; border: 1px solid var(--ms-line); border-radius: 14px; background: rgba(255,255,255,.02); }
.wheel-roster { max-height: 260px; overflow: auto; }
.wheel-primary-row { display: flex; gap: 8px; }
.wheel-primary-row > * { flex: 1; }
.wheel-design-settings { overflow:hidden; border:1px solid var(--ms-line); border-radius:14px; background:rgba(255,255,255,.018); }
.wheel-design-settings summary { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:13px 15px; cursor:pointer; color:#fff; font-weight:800; }
.wheel-design-settings summary span { color:var(--ms-muted); font-size:9px; font-weight:600; }
.wheel-design-settings form { display:grid; gap:12px; padding:0 15px 15px; border-top:1px solid var(--ms-line); }
.wheel-colors { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:8px; margin:0; padding:13px 0 0; border:0; }
.wheel-colors legend { grid-column:1/-1; padding-bottom:3px; color:var(--ms-muted); font-size:10px; }
.wheel-colors label { display:grid; grid-template-columns:1fr auto; align-items:center; gap:7px; min-width:0; padding:8px; border:1px solid var(--ms-line); border-radius:10px; }
.wheel-check { display:flex; align-items:center; gap:8px; min-height:40px; padding:9px 11px; border:1px solid var(--ms-line); border-radius:10px; }
.studio-room-list.room-history { display:grid; gap:9px; margin:0 24px 24px; padding:18px; border:1px solid var(--ms-line); border-radius:16px; background:rgba(8,9,18,.34); }
.room-history>header { padding:8px 8px 13px; border-bottom:1px solid var(--ms-line); }
.room-history>header b,.room-history>header small { display:block; }.room-history>header small { margin-top:4px; color:var(--ms-muted); font-size:10px; }
.room-history>article { display:grid; grid-template-columns:minmax(0,1fr) auto auto; align-items:center; gap:12px; padding:12px 14px; border:1px solid var(--ms-line); border-radius:12px; background:rgba(255,255,255,.02); }
.musical-control-room { display:grid; gap:16px; padding:20px; background:radial-gradient(circle at 55% 0,rgba(128,70,221,.12),transparent 35rem); }
.musical-control-room > header,.musical-roster > header { display:flex; align-items:flex-start; justify-content:space-between; gap:16px; }
.musical-control-room > header h2 { margin:3px 0; font-size:28px; }
.musical-control-room > header span { color:var(--ms-gold-2); font-size:11px; font-weight:900; }
.musical-control-room > header p { margin:0; color:var(--ms-muted); font-size:11px; }
.musical-status-strip { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:9px; }
.musical-status-strip article { padding:11px 13px; border:1px solid var(--ms-line); border-radius:13px; background:linear-gradient(145deg,rgba(255,255,255,.045),rgba(255,255,255,.014)); }
.musical-status-strip small,.musical-status-strip b { display:block; }
.musical-status-strip small { color:var(--ms-muted); font-size:10px; }
.musical-status-strip b { margin-top:4px; color:#fff; font-size:15px; }
.musical-host-layout { display:grid; grid-template-columns:minmax(0,1.45fr) minmax(300px,.55fr); gap:14px; align-items:stretch; }
.musical-host-controls,.musical-live-preview,.musical-roster { min-width:0; padding:14px; border:1px solid rgba(207,197,237,.22); border-radius:18px; background:rgba(14,17,29,.82); }
.musical-host-controls { display:flex; flex-direction:column; gap:12px; }
.host-preview-head { display:flex; align-items:center; justify-content:space-between; gap:10px; margin-bottom:10px; color:#fff; font-size:11px; }
.host-preview-head b { padding:4px 8px; border:1px solid rgba(241,200,118,.4); border-radius:999px; color:var(--ms-gold-2); }
.host-controls-title { display:flex; align-items:center; gap:10px; padding-bottom:12px; border-bottom:1px solid var(--ms-line); }
.host-controls-title > span { display:grid; place-items:center; width:42px; aspect-ratio:1; border-radius:12px; background:rgba(139,92,246,.18); font-size:22px; }
.host-controls-title div { min-width:0; display:grid; gap:3px; }
.host-controls-title small { color:var(--ms-muted); line-height:1.6; }
.musical-now-playing { display:flex; align-items:center; justify-content:space-between; gap:10px; padding:12px; border:1px solid rgba(241,200,118,.26); border-radius:13px; background:linear-gradient(135deg,rgba(241,200,118,.08),rgba(139,92,246,.08)); }
.musical-now-playing div { display:grid; min-width:0; }
.musical-now-playing small,.musical-now-playing span { color:var(--ms-muted); font-size:10px; }
.musical-now-playing b { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.musical-runtime-status { display:grid; gap:6px; }
.musical-runtime-status > * { padding:9px 11px; border:1px solid var(--ms-line); border-radius:11px; background:rgba(255,255,255,.025); color:var(--ms-muted); }
.musical-runtime-status .ready { border-color:rgba(77,224,151,.35); color:#a6f4c9; }
.musical-runtime-status .error { border-color:rgba(255,96,112,.35); color:#ffb0ba; }
.host-control-actions { display:grid; gap:8px; }
.host-control-actions .studio-primary { min-height:48px; background:linear-gradient(135deg,#ffe0a1,#d99637); color:#1d1407; box-shadow:0 10px 25px rgba(220,151,53,.18); }
.musical-session-settings { display:grid; grid-template-columns:1fr 1fr; gap:8px; padding:12px; border:1px solid var(--ms-line); border-radius:13px; background:rgba(255,255,255,.02); }
.musical-session-settings label { display:grid; gap:4px; color:var(--ms-muted); font-size:10px; }
.musical-live-preview { overflow:hidden; }
.musical-arena { position:relative; display:grid; place-items:center; min-height:500px; overflow:hidden; border:1px solid rgba(210,181,255,.28); border-radius:20px; background:radial-gradient(circle at 50% 48%,rgba(143,84,226,.26),transparent 30%),radial-gradient(ellipse at 50% 100%,rgba(241,200,118,.14),transparent 42%),linear-gradient(145deg,#15172a,#080a12); box-shadow:inset 0 1px rgba(255,255,255,.09),inset 0 -80px 100px rgba(0,0,0,.35); container-type:size; isolation:isolate; }
.musical-arena::before { content:""; position:absolute; inset:8% 8% 5%; border:1px solid rgba(241,200,118,.26); border-radius:50%; box-shadow:0 0 45px rgba(144,83,227,.2),inset 0 0 50px rgba(139,92,246,.08); transform:perspective(600px) rotateX(58deg); }
.musical-floor { position:relative; width:min(520px,86%); aspect-ratio:1; border:1px solid rgba(194,166,255,.25); border-radius:50%; background:radial-gradient(circle,#27294a 0 12%,#181b35 13% 55%,#101326 56% 100%); box-shadow:inset 0 0 0 10px rgba(129,83,218,.06),0 30px 70px rgba(0,0,0,.36); }
.musical-floor-rings { position:absolute; inset:11%; border:1px solid rgba(208,191,255,.12); border-radius:50%; box-shadow:0 0 42px rgba(133,79,220,.13); }
.musical-center { position:absolute; inset:50% auto auto 50%; z-index:3; display:grid; place-items:center; transform:translate(-50%,-50%); color:var(--ms-gold-2); font-size:10px; font-weight:900; }
.musical-center img { width:66px; height:52px; object-fit:contain; filter:drop-shadow(0 0 18px rgba(178,108,255,.48)); }
.musical-chair { --angle:calc(360deg / var(--chair-total) * var(--chair-index)); position:absolute; left:50%; top:50%; z-index:4; width:clamp(42px,9cqw,78px); height:clamp(50px,10cqw,88px); transform:translate(-50%,-50%) rotate(var(--angle)) translateY(-150px) rotate(calc(var(--angle) * -1)); transform-style:preserve-3d; }
.chair-back,.chair-seat { position:absolute; left:12%; right:12%; border:1px solid rgba(255,234,188,.45); background:linear-gradient(145deg,#9870e8,#55328e 72%); box-shadow:inset 3px 3px 8px rgba(255,255,255,.16),0 7px 0 #39205f,0 13px 24px rgba(0,0,0,.4); }
.chair-back { top:0; display:grid; place-items:center; height:55%; border-radius:15px 15px 7px 7px; color:#fff0bf; font-size:clamp(14px,3cqw,24px); font-weight:900; }
.chair-seat { bottom:8%; height:28%; border-radius:8px; transform:perspective(80px) rotateX(54deg); }
.musical-chair.claimed .chair-back { border-color:rgba(248,205,112,.9); box-shadow:inset 3px 3px 8px rgba(255,255,255,.18),0 7px 0 #69450e,0 0 28px rgba(247,193,70,.32); }
.moving-player { --player-angle:calc(360deg / var(--player-total) * var(--player-index)); position:absolute; left:50%; top:50%; z-index:5; display:grid; justify-items:center; gap:4px; will-change:transform; }
.moving-player span,.seated-player span,.musical-roster article>span { display:grid; place-items:center; width:38px; height:38px; overflow:hidden; border:2px solid #dccfff; border-radius:50%; background:linear-gradient(145deg,#a076ed,#5730a1); color:#fff; font-weight:900; }
.moving-player img,.seated-player img,.musical-roster img { width:100%; height:100%; object-fit:cover; }
.moving-player b,.seated-player b { max-width:100px; padding:2px 7px; overflow:hidden; border-radius:999px; background:rgba(8,10,20,.88); color:#fff; font-size:10px; text-overflow:ellipsis; white-space:nowrap; }
.seated-player { position:absolute; left:50%; bottom:60%; z-index:5; display:grid; justify-items:center; transform:translateX(-50%); }
.musical-winner-card { position:absolute; inset:50% auto auto 50%; z-index:20; display:grid; min-width:240px; padding:18px 24px; transform:translate(-50%,-50%); border:1px solid rgba(255,217,136,.8); border-radius:22px; background:rgba(18,14,28,.92); box-shadow:0 0 45px rgba(241,200,118,.3); text-align:center; backdrop-filter:blur(16px); }
.musical-winner-card small { color:var(--ms-gold-2); }.musical-winner-card b { font-size:28px; }
.musical-roster>div { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:8px; }
.musical-roster article { display:grid; grid-template-columns:auto minmax(0,1fr); align-items:center; gap:9px; padding:9px; border:1px solid var(--ms-line); border-radius:12px; background:rgba(255,255,255,.02); }
.musical-roster article div { min-width:0; display:grid; }.musical-roster article small { color:var(--ms-muted); font-size:10px; }
.musical-roster article.eliminated { opacity:.48; filter:grayscale(.55); }.musical-roster article.seated { border-color:rgba(241,200,118,.52); }
.musical-track-list { display: grid; gap: 8px; max-height: 220px; overflow: auto; }
.musical-track-card { display: grid; grid-template-columns: minmax(0,1fr) auto auto; gap: 10px; align-items: center; padding: 10px; border: 1px solid var(--ms-line); border-radius: 12px; }
.team-battle-stage, .tournament-stage, .host-game-grid { display: grid; gap: 14px; padding: 18px; }
.team-battle-stage { grid-template-columns: minmax(0,1fr) auto minmax(0,1fr); }
.team-battle-card, .tournament-match, .host-scoreboard { padding: 18px; border: 1px solid var(--ms-line); border-radius: 16px; background: rgba(255,255,255,.025); }
.team-battle-card:first-child { border-color: rgba(139,92,246,.4); }
.team-battle-card:last-child { border-color: rgba(241,200,118,.36); }
.team-battle-center { align-self: center; color: var(--ms-gold); font-size: 28px; font-weight: 900; }

/* Global responsive */
@media (max-width: 1180px) {
  :root { --ms-sidebar: 202px; }
  .studio-context-bar { grid-template-columns: 1fr 1.5fr 1fr; }
  .context-live { grid-column: 1 / -1; border-top: 1px solid var(--ms-line); }
  .game-card-grid, .game-tile-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .live-proof-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .studio-home { grid-template-columns: 1fr; }
  .featured-game { grid-row: auto; }
  .stream-oauth-grid { grid-template-columns: 1fr; }
  .home-control-grid { grid-template-columns:1fr; }
  .home-game-shelf { grid-template-columns:repeat(3,minmax(0,1fr)); }
}

/* Cross-page studio spacing polish: panels keep a safe edge on small screens. */
.studio-section>*{min-width:0}.studio-section>header>*{min-width:0}
.studio-body :where(.studio-primary,.studio-secondary,.studio-danger,.studio-ghost){min-height:40px}
@media (max-width:820px){
 .studio-work{padding:10px 9px 42px}
 .studio-reference-home>section,.studio-reference-home>article{border-radius:18px}
 .home-live-center,.home-library-board{padding:14px 12px}
 .home-board-title,.home-library-board>header{align-items:flex-start;flex-wrap:wrap;gap:10px;padding:0 2px 12px}
 .home-account-chip{min-width:0;width:100%}
 .home-control-grid{gap:12px}
 .home-platform-panel,.home-quick-panel,.home-activity-card{border-radius:14px}
 .home-platform-grid,.home-quick-panel>div{padding:10px;gap:8px}
 .home-stat-grid{gap:8px}
 .home-stat-grid article{padding:11px 10px}
 .home-game-shelf{gap:8px}
 .home-game-card{min-height:220px!important}
 .home-library-board>nav{gap:6px;padding:7px}
 .studio-section>header,.game-browser-head,.wheel-page-head,.overlay-settings-head{padding:18px 16px}
 .game-card-grid,.game-tile-grid,.live-proof-grid{padding:14px;gap:12px}
}
@media (max-width:520px){
 .studio-work{padding-inline:8px}
 .home-live-center,.home-library-board{padding:12px 10px}
 .home-platform-grid{grid-template-columns:1fr 1fr}
 .home-platform-card{min-height:88px}
 .home-stat-grid article{min-height:86px}
 .home-library-board>header>button{min-height:42px}
 .home-game-card>span{padding-inline:10px}
 .home-library-board>nav{grid-template-columns:1fr 1fr}
 .game-card-grid,.game-tile-grid,.live-proof-grid{padding:10px;gap:10px}
}

@media (max-width: 820px) {
  :root { --ms-sidebar: min(84vw,300px); }
  .studio-layout.studio-v5-layout { display: block; }
  .studio-side { position: fixed; inset: 0 auto 0 0; transform: translateX(-105%); transition: transform .22s ease; }
  [dir="rtl"] .studio-side { inset: 0 0 0 auto; transform: translateX(105%); }
  .studio-side.open { transform: translateX(0); box-shadow: 0 0 0 100vmax rgba(0,0,0,.55), var(--ms-shadow); }
  .studio-work { width: 100%; padding: 12px 12px 40px; }
  .studio-menu { display: inline-grid; place-items: center; width: 44px; padding: 0; }
  .studio-work:has(.studio-reference-home) > .studio-toolbar { display:flex; }
  .studio-toolbar { position: sticky; top: 0; z-index: 50; min-height: 64px; padding: 8px 0; background: rgba(8,9,18,.9); backdrop-filter: blur(16px); }
  .studio-toolbar > div:first-of-type { margin-inline-end: auto; }
  .studio-toolbar h1 { font-size: 24px; }
  .studio-toolbar span { display: none; }
  .studio-live-indicator { max-width: 132px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .studio-context-bar { grid-template-columns: 1fr; }
  .studio-context-bar > * { border-inline-start: 0; border-top: 1px solid var(--ms-line); }
  .studio-context-bar > *:first-child { border-top: 0; }
  .featured-game { grid-template-columns: 1fr; }
  .featured-game-cover { min-height: 230px; }
  .featured-game-cover::after { background: linear-gradient(0deg,rgba(10,11,20,.78),transparent 60%); }
  .featured-game-copy h2 { font-size: 30px; }
  .game-card-grid, .game-tile-grid, .live-proof-grid { grid-template-columns: 1fr 1fr; }
  .game-modal-layer { padding: 0; }
  .game-modal-shell, .game-modal-shell.is-expanded { width: 100%; max-height: 100dvh; height: 100dvh; border: 0; border-radius: 0; }
  .game-modal-body { display: block; overflow: auto; }
  .game-modal-body:not(.game-session-modal) { overflow: hidden; }
  .game-detail { display: grid; grid-template-columns:1fr; grid-template-rows: minmax(0,1fr) auto; width: 100%; height: 100%; min-height: 0; }
  .game-detail-cover,.game-detail-copy { min-height: 0; }
  .game-detail-cover { overflow: auto; }
  .game-detail-copy { overflow: auto; overscroll-behavior: contain; }
  .game-modal-shell[data-mobile-tab="preview"] .game-detail-copy > :not(.game-actions):not(output) { display: none; }
  .game-modal-shell[data-mobile-tab="settings"] .game-detail-cover { display: none; }
  .game-detail .game-actions { position: sticky; bottom: 0; z-index: 8; display: grid; grid-template-columns: 1fr 1fr; margin: 0; padding: 10px; border-top: 1px solid var(--ms-line); background: rgba(15,18,32,.97); box-shadow: 0 -16px 34px rgba(5,6,12,.6); backdrop-filter: blur(16px); }
  .game-detail .game-actions > * { min-width: 0; }
  .game-modal-tools, .game-modal-preview-state, .game-preview, .host-live-preview, .musical-live-preview { min-height: auto; overflow: visible; }
  .game-preview, .host-live-preview, .musical-live-preview { min-height: 440px; }
  .game-modal-preview-state { min-height:auto; }
  .game-modal-mobile-tabs { display:flex; flex-direction:row; align-items:center; gap:8px; position:sticky; top:0; z-index:3; padding:8px; border-bottom:1px solid var(--ms-line); background:#111422; }
  .game-modal-mobile-tabs button { flex:1 1 0; min-width:0; min-height:42px; padding:7px 10px; border:1px solid var(--ms-line); border-radius:10px; background:#181b2b; color:#fff; }
  .poll-form, .question-layout, .overlay-control-grid, .room-manage-grid, .room-live-grid, .avatar-workspace, .wheel-live-layout, .musical-host-layout { grid-template-columns: 1fr; }
  .comment-center-toolbar { grid-template-columns: 1fr; }
  .studio-capability-grid { grid-template-columns:1fr; }
  .overlay-control-grid { grid-template-columns:1fr; grid-template-areas:"preview" "link" "settings"; }
  .overlay-current { position:relative; top:auto; }
  .overlay-preview-viewport,.overlay-preview-viewport iframe { min-height:440px; }
  .overlay-settings { border-inline-end: 0; }
  .overlay-steps { grid-template-columns:1fr; }
  .avatar-versions > div { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .team-battle-stage { grid-template-columns: 1fr; }
  .team-battle-center { justify-self: center; }
  .musical-status-strip { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .musical-roster>div { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .musical-arena { min-height:min(78vw,560px); }
  .studio-layout.studio-v5-layout { padding:0; }
  .studio-side { top:0; height:100dvh; border-radius:0; }
  .studio-reference-home { gap:10px; }
  .home-live-center,.home-library-board { padding:12px; border-radius:16px !important; }
  .home-board-title,.home-library-board > header { align-items:flex-start; }
  .home-account-chip { display:none; }
  .home-platform-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .home-stat-grid { grid-template-columns:repeat(3,minmax(0,1fr)); gap:6px; }
  .home-stat-grid article { grid-template-columns:1fr; grid-template-rows:auto auto auto; justify-items:center; min-height:92px; padding:9px; text-align:center; }
  .home-stat-grid i { grid-row:auto; }
  .home-stat-grid b { font-size:20px; }
  .home-quick-panel > div { grid-template-columns:1fr; }
  .home-game-shelf { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .home-library-board > nav { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .session-plan-list>article { grid-template-columns:32px minmax(0,1fr) repeat(2,78px); }
  .session-plan-list>article>label:nth-of-type(3),.session-plan-actions { grid-column:auto; }
  .session-preset-row { grid-template-columns:1fr 1fr; }.session-preset-row label { grid-column:1/-1; }
}

@media (max-width: 520px) {
  body.studio-body { font-size: 15px; }
  .studio-work { padding-inline: 9px; }
  .overlay-page-head { padding:16px !important; }
  .overlay-link-card,.overlay-settings { padding:14px; }
  .overlay-panel-heading,.overlay-settings-head { grid-template-columns:32px minmax(0,1fr); }
  .overlay-panel-heading>strong { grid-column:1/-1; justify-self:start; }
  .overlay-fields,.overlay-size-inputs,.overlay-theme-picker { grid-template-columns:1fr; }
  .overlay-source-metrics,.overlay-lab-fields,.overlay-lab-actions { grid-template-columns:1fr; }
  .overlay-source-metrics p,.overlay-lab-fields label:last-child { grid-column:auto; }
  .overlay-lab>header { flex-direction:column; }
  .overlay-wide,.overlay-size-settings,.overlay-toggles,.overlay-ratio-lock { grid-column:1; }
  .overlay-actions { grid-template-columns:1fr; }
  .overlay-preview-viewport,.overlay-preview-viewport iframe { min-height:360px; }
  .overlay-preview-footer { align-items:flex-start; flex-direction:column; }
  .wheel-colors { grid-template-columns:1fr; }
  .room-history>article { grid-template-columns:1fr; }
  .studio-session-planner { margin:10px; padding:13px; }
  .session-plan-list>article { grid-template-columns:30px minmax(0,1fr); align-items:center; }
  .session-plan-list>article>label,.session-plan-actions { grid-column:1/-1; }
  .session-preset-row { grid-template-columns:1fr; }.session-preset-row label { grid-column:auto; }
  .home-game-shelf { grid-template-columns:1fr 1fr; gap:7px; }
  .home-game-card { min-height:205px !important; }
  .home-game-card > i,.home-game-card > em { min-width:48px; padding-inline:5px; }
  .studio-live-indicator { font-size: 0; width: 38px; padding: 0; justify-content: center; }
  .studio-live-indicator i { margin: 0; }
  .studio-section > header, .game-hub-head, .game-browser-head, .wheel-page-head { align-items: flex-start; flex-direction: column; padding: 20px 16px; }
  .studio-section > header h2, .game-browser-head h2 { font-size: 26px; }
  .featured-game-copy { padding: 22px 18px; }
  .home-launch-grid, .live-action-grid, .game-card-grid, .game-tile-grid, .live-proof-grid { grid-template-columns: 1fr; padding: 14px; }
  .game-fields, .round-setup-fields, .keyword-form, .overlay-fields, .overlay-size-inputs, .overlay-lab-fields, .room-create-fields, .avatar-fields { grid-template-columns: 1fr; }
  .game-fields .wide, .round-setup-fields .wide, .overlay-fields .wide, .avatar-fields .wide { grid-column: auto; }
  .game-modal-head { min-height: 58px; }
  .game-modal-head h2 { font-size: 18px; }
  .comment-center-toolbar, .live-comment-feed, .stream-account-grid { padding: 16px; }
  .studio-capability-grid { padding:14px; }
  .tts-control-grid { grid-template-columns:1fr; }
  .stream-account-card { grid-template-columns: auto minmax(0,1fr); }
  .stream-account-actions { grid-column: 1 / -1; justify-content: stretch; }
  .stream-account-actions button { flex: 1; }
  .room-metrics, .room-share-grid { grid-template-columns: 1fr; }
  .avatar-versions > div { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  .studio-body *, .studio-body *::before, .studio-body *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
