:root {
  color-scheme: dark;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-right: env(safe-area-inset-right, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left: env(safe-area-inset-left, 0px);
  --bg: #25282f;
  --panel: #30343d;
  --panel-2: #353944;
  --panel-3: #292c34;
  --panel-dark: #1f2228;
  --line: #1c1f26;
  --line-soft: #424753;
  --text: #f3f5fb;
  --muted: #a8afbd;
  --faint: #7a8292;
  --primary: #5967f7;
  --primary-strong: #6977ff;
  --green: #25c56b;
  --orange: #f47a2b;
  --cyan: #52d7db;
  --danger: #ef476f;
  font-family: Inter, "Segoe UI", "Microsoft YaHei", Arial, sans-serif;
}

html,
body {
  width: 100%;
  min-height: 100%;
  -webkit-text-size-adjust: 100%;
}

* {
  box-sizing: border-box;
}

body {
  min-width: 320px;
  margin: 0;
  overflow: hidden;
  overscroll-behavior: none;
  background:
    radial-gradient(circle at 48% 44%, rgba(95, 104, 125, 0.12), transparent 28rem),
    linear-gradient(135deg, rgba(255, 255, 255, 0.018) 25%, transparent 25%) 0 0 / 28px 28px,
  var(--bg);
  color: var(--text);
}

body.expanded-share-open {
  overflow: hidden;
}

button,
input {
  font: inherit;
}

button {
  border: 0;
  color: inherit;
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.6;
}

.icon {
  width: 20px;
  height: 20px;
  display: inline-block;
  flex: none;
}

.login-shell {
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding:
    calc(24px + var(--safe-top))
    calc(24px + var(--safe-right))
    calc(24px + var(--safe-bottom))
    calc(24px + var(--safe-left));
}

.login-card {
  width: min(100%, 374px);
  padding: 36px 24px 44px;
  border: 1px solid rgba(255, 255, 255, 0.03);
  border-radius: 8px;
  background: #343842;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.34);
  text-align: center;
}

.login-mark {
  width: 52px;
  height: 52px;
  margin: 0 auto 16px;
  color: #e8eaf2;
  opacity: 0.92;
}

.login-mark .icon {
  width: 52px;
  height: 52px;
}

.login-title {
  margin: 0;
  font-size: 26px;
  font-weight: 800;
  line-height: 1.2;
}

.login-subtitle {
  margin: 26px 0 28px;
  color: #b5bac7;
  font-size: 14px;
}

.login-form {
  display: grid;
  gap: 14px;
}

.text-input {
  width: 100%;
  height: 48px;
  border: 1px solid #292d35;
  border-radius: 7px;
  outline: none;
  background: #20232a;
  color: var(--text);
  padding: 0 16px;
}

.text-input::placeholder {
  color: #858c9b;
}

.text-input:focus {
  border-color: var(--primary-strong);
  box-shadow: 0 0 0 3px rgba(89, 103, 247, 0.18);
}

.primary-btn {
  height: 50px;
  border-radius: 7px;
  background: var(--primary);
  color: white;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: background 0.18s ease, transform 0.18s ease;
}

.primary-btn:hover {
  background: var(--primary-strong);
  transform: translateY(-1px);
}

.error-text {
  min-height: 20px;
  margin: 0;
  color: #ff8da8;
  font-size: 13px;
  text-align: left;
}

.app-shell {
  min-height: 100vh;
  min-height: 100svh;
  height: 100vh;
  height: 100svh;
  display: grid;
  grid-template-columns: 210px minmax(520px, 1fr) 300px;
  background: var(--bg);
}

.sidebar,
.chat-panel {
  min-width: 0;
  background: #2c3038;
}

.sidebar {
  border-right: 3px solid #191c22;
}

.profile-row {
  height: 64px;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 2px solid #20232a;
}

.avatar {
  position: relative;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--primary);
  color: white;
  font-weight: 800;
  box-shadow: inset 0 -10px 20px rgba(0, 0, 0, 0.12);
}

.avatar.small {
  width: 30px;
  height: 30px;
  font-size: 14px;
}

.status-dot {
  position: absolute;
  right: 0;
  bottom: 1px;
  width: 10px;
  height: 10px;
  border: 2px solid #2c3038;
  border-radius: 50%;
  background: var(--green);
}

.profile-name {
  min-width: 0;
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 14px;
  font-weight: 800;
}

.icon-btn {
  width: 36px;
  height: 36px;
  border-radius: 7px;
  display: grid;
  place-items: center;
  background: transparent;
  color: #c5cbd8;
}

.icon-btn:hover {
  background: rgba(255, 255, 255, 0.06);
  color: white;
}

.sidebar-section {
  padding: 28px 8px 12px;
}

.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 8px 14px;
  color: #a5acba;
  font-size: 13px;
  font-weight: 800;
}

.add-channel {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  display: grid;
  place-items: center;
  background: transparent;
  color: #d9deea;
}

.add-channel:hover {
  background: rgba(255, 255, 255, 0.07);
}

.channel-list {
  display: grid;
  gap: 8px;
}

.channel-card {
  width: 100%;
  min-height: 56px;
  padding: 10px 10px;
  border-radius: 7px;
  background: transparent;
  color: #d8deea;
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  text-align: left;
}

.channel-card.active {
  background: #3a3f4a;
}

.channel-card:hover {
  background: #373c47;
}

.channel-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 800;
}

.member-count {
  color: #98a0af;
  font-size: 13px;
}

.member-list {
  grid-column: 1 / -1;
  display: grid;
  gap: 10px;
  padding: 7px 4px 0 18px;
}

.member-row {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  color: #c8cfda;
  font-size: 12px;
}

.member-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.badge {
  border-radius: 4px;
  padding: 2px 6px;
  font-size: 11px;
  font-weight: 800;
  color: white;
}

.badge.green {
  background: var(--green);
}

.badge.orange {
  background: var(--orange);
}

.badge.cyan {
  background: var(--cyan);
}

.badge.muted {
  background: #5b6270;
}

.stage {
  min-width: 0;
  overflow: hidden;
  display: grid;
  grid-template-rows: 74px minmax(0, 1fr) auto;
  background: #2e323b;
}

.channel-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 24px;
  border-bottom: 1px solid #20232a;
}

.topbar-main,
.topbar-actions {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 12px;
}

.play-circle {
  width: 27px;
  height: 27px;
  border: 2px solid #8d95a5;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #aeb6c4;
}

.stage-title {
  font-size: 18px;
  font-weight: 900;
}

.stage-action {
  color: #8f97a7;
}

.mobile-only {
  display: none;
}

.mobile-nav-btn,
.mobile-panel-close {
  flex: none;
}

.secondary-mini {
  height: 34px;
  margin-left: auto;
  border-radius: 7px;
  padding: 0 12px;
  background: #444a56;
  color: #dce2ef;
  font-size: 12px;
  font-weight: 800;
}

.secondary-mini:hover {
  background: #505765;
}

.secondary-mini:disabled {
  opacity: 0.45;
}

.screen-wrap {
  min-width: 0;
  min-height: 0;
  display: grid;
  align-items: start;
  justify-items: stretch;
  align-content: start;
  overflow: auto;
  padding: 22px 24px 18px;
  scrollbar-gutter: stable;
}

.screen-frame {
  position: relative;
  width: min(100%, 1190px);
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 7px;
  background: #111318;
  box-shadow: 0 0 0 1px #171a20, 0 18px 34px rgba(0, 0, 0, 0.42);
}

.screen-header {
  position: absolute;
  inset: 0 0 auto 0;
  height: 58px;
  z-index: 5;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 11px 12px;
  pointer-events: none;
}

.screen-label {
  width: 212px;
  height: 78px;
  padding: 10px 12px;
  background: rgba(14, 15, 19, 0.86);
  border-radius: 6px 6px 0 0;
  color: white;
  font-weight: 900;
}

.screen-label span {
  display: block;
  margin-top: 7px;
  color: #d5dae5;
  font-size: 18px;
}

.screen-tools {
  display: flex;
  align-items: center;
  gap: 12px;
  color: white;
  font-weight: 900;
}

.tool-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 9px;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.62);
}

.fake-game {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: 40% 60%;
  background:
    linear-gradient(111deg, transparent 42%, rgba(119, 69, 255, 0.93) 42%),
    linear-gradient(180deg, #69c9ff 0 50%, #312f78 50% 100%);
}

.arcade-left {
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(155deg, #398b30 0 31%, transparent 31%),
    linear-gradient(180deg, #84dcff, #85d5ff 72%, #49474c 72%);
}

.coin-line {
  position: absolute;
  top: 25%;
  left: 10%;
  color: #f5ed2a;
  font-size: 40px;
  font-weight: 900;
  text-shadow: 4px 4px #152013;
}

.pixel-ship {
  position: absolute;
  width: 210px;
  height: 104px;
  left: 31%;
  top: 37%;
  transform: skewX(-10deg);
}

.pixel-ship::before,
.pixel-ship::after {
  content: "";
  position: absolute;
  background: #ff5a9d;
  box-shadow:
    30px 18px 0 #ff88bd,
    78px 10px 0 #df397e,
    116px 26px 0 #ff7ab4,
    150px 38px 0 #cd2d70,
    52px 54px 0 #ff6aa9,
    106px 60px 0 #ffd0e0;
}

.pixel-ship::before {
  width: 78px;
  height: 28px;
  left: 10px;
  top: 40px;
}

.pixel-ship::after {
  width: 94px;
  height: 18px;
  left: 64px;
  top: 22px;
}

.heart-line {
  position: absolute;
  left: 14%;
  bottom: 28%;
  color: #ff2e72;
  font-size: 34px;
  text-shadow: 3px 3px #14161d;
}

.game-right {
  position: relative;
  padding: 118px 46px 90px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.04) 25%, transparent 25%) 0 0 / 42px 42px,
    rgba(93, 53, 225, 0.78);
}

.progress-rail {
  position: absolute;
  left: 18%;
  right: 28%;
  top: 35px;
  height: 7px;
  border-radius: 99px;
  background: #f4f45a;
  box-shadow: 0 2px #453b6e;
}

.step-dot {
  position: absolute;
  top: -15px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #eff45f;
  color: #4b4971;
  font-size: 19px;
  font-weight: 900;
  box-shadow: 0 0 0 4px rgba(47, 39, 92, 0.7);
}

.step-dot:nth-child(1) {
  left: 0%;
}

.step-dot:nth-child(2) {
  left: 23%;
}

.step-dot:nth-child(3) {
  left: 50%;
}

.step-dot:nth-child(4) {
  left: 75%;
  background: #43476d;
  color: #78809a;
}

.cards {
  height: 100%;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.game-card {
  position: relative;
  min-width: 0;
  display: grid;
  grid-template-rows: auto 70px 1fr auto;
  border: 3px solid #4e37c9;
  background:
    linear-gradient(150deg, #242836 0 34%, #f5f8ff 34% 100%);
  color: #3b4050;
  text-align: center;
}

.game-card.active {
  border-color: #7ff4ff;
}

.game-card h3 {
  margin: 12px 0 6px;
  color: #f5e9a5;
  font-size: 18px;
}

.item-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto;
  border: 5px solid #3d2ba8;
  background: linear-gradient(135deg, #515c74, #252936);
  display: grid;
  place-items: center;
  color: #92fbff;
  font-size: 30px;
}

.game-tags {
  display: flex;
  justify-content: center;
  gap: 5px;
}

.game-tag {
  padding: 2px 8px;
  border-radius: 3px;
  background: #5644dd;
  color: white;
  font-size: 13px;
  font-weight: 800;
}

.game-card p {
  margin: 10px 10px;
  font-size: 14px;
  line-height: 1.55;
  text-align: left;
}

.cooldown {
  padding: 5px;
  background: #64e3e5;
  color: #24525b;
  font-weight: 900;
}

.buy-row {
  margin: 8px 12px 10px;
  height: 36px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  background: white;
  color: #4c3b88;
  font-weight: 900;
}

.inventory {
  position: absolute;
  left: 28px;
  right: 28px;
  bottom: 28px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.inventory-item {
  width: 50px;
  height: 50px;
  border: 3px solid #3825aa;
  background: #252833;
  display: grid;
  place-items: center;
  font-size: 23px;
  box-shadow: 0 4px 0 rgba(0, 0, 0, 0.35);
}

.live-room {
  width: min(100%, 1190px);
  min-width: 0;
  min-height: 0;
  height: 100%;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 16px;
}

.room-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 2px;
}

.room-kicker {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.room-header h2 {
  margin: 4px 0 0;
  font-size: 22px;
  line-height: 1.2;
}

.room-count {
  min-width: 108px;
  height: 38px;
  border-radius: 7px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: #252932;
  color: #cbd2df;
  font-size: 13px;
  font-weight: 800;
}

.share-panel {
  position: relative;
  min-height: 350px;
  overflow: hidden;
  border-radius: 7px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.035) 25%, transparent 25%) 0 0 / 32px 32px,
    #151820;
  box-shadow: 0 0 0 1px #171a20, 0 18px 34px rgba(0, 0, 0, 0.32);
}

.share-panel.active {
  box-shadow: 0 0 0 1px rgba(82, 215, 219, 0.55), 0 18px 34px rgba(0, 0, 0, 0.32);
}

.share-topline {
  position: absolute;
  left: 12px;
  right: 12px;
  top: 12px;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: white;
  font-size: 13px;
  font-weight: 900;
  pointer-events: none;
}

.share-topline span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 34px;
  padding: 7px 10px;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.56);
}

.screen-video {
  width: 100%;
  height: 100%;
  min-height: 350px;
  object-fit: contain;
  background: #05070a;
}

.share-placeholder {
  height: 100%;
  min-height: 350px;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 14px;
  color: #9ca5b6;
}

.share-placeholder .icon {
  width: 58px;
  height: 58px;
  color: #5967f7;
}

.share-placeholder strong {
  color: #e8edf7;
  font-size: 18px;
}

.share-placeholder.on {
  background:
    radial-gradient(circle at center, rgba(82, 215, 219, 0.12), transparent 22rem),
    #151820;
}

.share-avatar .avatar {
  width: 72px;
  height: 72px;
  font-size: 28px;
}

.member-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  align-content: start;
}

.member-tile {
  min-height: 126px;
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 7px;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 8px;
  background: #343944;
  box-shadow: inset 0 -20px 38px rgba(0, 0, 0, 0.1);
}

.member-tile.speaking {
  border-color: rgba(82, 215, 219, 0.7);
  box-shadow: 0 0 0 3px rgba(82, 215, 219, 0.12), inset 0 -20px 38px rgba(0, 0, 0, 0.1);
}

.member-tile.sharing {
  border-color: rgba(244, 122, 43, 0.72);
}

.member-tile .avatar {
  width: 48px;
  height: 48px;
}

.tile-name {
  max-width: 100%;
  padding: 0 10px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #eef2fb;
  font-weight: 900;
}

.tile-status {
  min-height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: #b8c1d1;
}

.tile-status .icon {
  width: 18px;
  height: 18px;
}

.stage-empty {
  width: min(100%, 520px);
  padding: 36px;
  border-radius: 8px;
  background: #343842;
  text-align: center;
  color: var(--muted);
}

.control-bar {
  width: calc(100% - 32px);
  justify-self: center;
  margin: 0 16px 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-top-color: rgba(255, 255, 255, 0.12);
  border-radius: 20px;
  background:
    linear-gradient(180deg, rgba(64, 70, 83, 0.72), rgba(42, 46, 56, 0.56));
  box-shadow:
    0 14px 30px rgba(0, 0, 0, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(18px) saturate(120%);
  -webkit-backdrop-filter: blur(18px) saturate(120%);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 12px 14px;
  padding: 12px 18px 14px;
  min-height: 82px;
  position: relative;
  z-index: 2;
}

.control-btn {
  width: 46px;
  height: 46px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: #404652;
  color: #d9dfec;
}

.control-btn.orange {
  background: var(--orange);
  color: white;
}

.control-btn.green {
  background: #30bf71;
  color: white;
}

.ai-label {
  font-size: 13px;
  font-weight: 900;
}

.control-btn:hover {
  filter: brightness(1.08);
}

.chat-panel {
  display: grid;
  grid-template-rows: 53px minmax(0, 1fr) 56px;
  border-left: 3px solid #191c22;
}

.chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  border-bottom: 2px solid #20232a;
  font-weight: 900;
}

.chat-body {
  min-height: 0;
  overflow: auto;
  padding: 14px;
}

.chat-empty {
  height: 100%;
  display: grid;
  place-items: start center;
  padding-top: 30px;
  color: #7e8593;
  font-size: 13px;
}

.message {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  gap: 8px;
  margin-bottom: 14px;
}

.message-meta {
  display: flex;
  align-items: baseline;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
}

.message-author {
  color: #dfe4ef;
  font-weight: 800;
}

.message-text {
  margin-top: 4px;
  line-height: 1.45;
  word-break: break-word;
  color: #d2d8e5;
  font-size: 13px;
}

.chat-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 42px;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-top: 1px solid #20232a;
}

.chat-input {
  height: 38px;
  border: 0;
  border-radius: 7px;
  outline: none;
  background: #25282f;
  color: var(--text);
  padding: 0 12px;
}

.send-btn {
  height: 40px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: var(--primary);
  color: white;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(13, 15, 20, 0.58);
  z-index: 70;
}

.modal {
  width: min(100%, 390px);
  padding: 22px;
  border-radius: 8px;
  background: #343842;
  box-shadow: 0 26px 80px rgba(0, 0, 0, 0.42);
}

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}

.modal-title {
  margin: 0;
  font-size: 18px;
}

.modal-form {
  display: grid;
  gap: 12px;
}

.secondary-btn {
  height: 44px;
  border-radius: 7px;
  background: #444a56;
  font-weight: 800;
}

.modal-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 92px;
  transform: translateX(-50%);
  max-width: min(92vw, 420px);
  padding: 10px 14px;
  border-radius: 8px;
  background: #151820;
  color: white;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
  z-index: 30;
}

.hidden {
  display: none !important;
}

.remote-audio-rack {
  position: fixed;
  width: 1px;
  height: 1px;
  overflow: hidden;
  pointer-events: none;
  opacity: 0;
}

.mobile-panel-overlay {
  position: fixed;
  inset: 0;
  background: rgba(8, 10, 14, 0.58);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 35;
}

@media (max-width: 1100px) {
  body {
    overflow: auto;
  }

  body.expanded-share-open {
    overflow: hidden;
  }

  .app-shell {
    min-height: 100svh;
    height: auto;
    grid-template-columns: 210px minmax(0, 1fr);
  }

  .chat-panel {
    grid-column: 1 / -1;
    min-height: 320px;
    border-left: 0;
    border-top: 3px solid #191c22;
  }
}

@media (max-width: 760px) {
  body.expanded-share-open {
    overflow: hidden;
  }

  .app-shell {
    min-height: 100svh;
    height: 100svh;
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: min(86vw, 340px);
    max-width: 340px;
    z-index: 40;
    padding-top: var(--safe-top);
    padding-bottom: var(--safe-bottom);
    border-right: 1px solid rgba(255, 255, 255, 0.06);
    border-bottom: 0;
    box-shadow: 18px 0 42px rgba(0, 0, 0, 0.34);
    transform: translateX(-104%);
    transition: transform 0.24s ease;
    overflow: auto;
  }

  .sidebar.mobile-open {
    transform: translateX(0);
  }

  .stage {
    min-height: 100svh;
    grid-template-rows: 68px minmax(0, 1fr) auto;
  }

  .channel-topbar {
    padding: calc(var(--safe-top) + 0px) 12px 0 10px;
  }

  .topbar-main,
  .topbar-actions {
    gap: 8px;
  }

  .mobile-only {
    display: grid;
  }

  .stage-title {
    max-width: 42vw;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 16px;
  }

  .screen-wrap {
    padding: 12px 12px 16px;
  }

  .screen-frame {
    aspect-ratio: 4 / 3;
  }

  .expanded-share-overlay {
    padding: 0;
  }

  .expanded-share-content {
    width: 100vw;
    height: 100svh;
    border-radius: 0;
  }

  .fake-game {
    grid-template-columns: 1fr;
  }

  .arcade-left {
    display: none;
  }

  .game-right {
    padding: 92px 16px 72px;
  }

  .cards {
    gap: 8px;
  }

  .game-card h3 {
    font-size: 13px;
  }

  .game-card p,
  .game-tag,
  .cooldown,
  .buy-row {
    font-size: 11px;
  }

  .control-bar {
    width: calc(100% - 20px);
    margin: 0 10px 10px;
    margin-bottom: calc(10px + var(--safe-bottom));
    border-radius: 16px;
    padding: 10px 12px 12px;
    gap: 10px 12px;
    min-height: 78px;
  }

  .chat-panel {
    position: fixed;
    inset: auto 0 0 0;
    min-height: min(78svh, 720px);
    height: min(78svh, 720px);
    z-index: 41;
    padding-bottom: var(--safe-bottom);
    border-left: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 22px 22px 0 0;
    box-shadow: 0 -24px 48px rgba(0, 0, 0, 0.34);
    transform: translateY(104%);
    transition: transform 0.24s ease;
    background: rgba(36, 40, 48, 0.98);
    backdrop-filter: blur(18px) saturate(120%);
    -webkit-backdrop-filter: blur(18px) saturate(120%);
  }

  .chat-panel.mobile-open {
    transform: translateY(0);
  }

  .chat-header {
    padding: 0 12px 0 16px;
  }

  .member-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .member-tile {
    min-height: 112px;
  }

  .share-grid.multi {
    grid-template-columns: 1fr;
  }

  .share-grid .share-panel,
  .share-grid .screen-video,
  .share-grid .share-placeholder {
    min-height: 170px;
  }
}

/* Volume controls */
.vol-slider, .vol-slider-inline, .global-volume-slider { -webkit-appearance: none; appearance: none; height: 4px; border-radius: 2px; background: #444a56; outline: none; cursor: pointer; }
.vol-slider::-webkit-slider-thumb, .vol-slider-inline::-webkit-slider-thumb, .global-volume-slider::-webkit-slider-thumb { -webkit-appearance: none; appearance: none; width: 12px; height: 12px; border-radius: 50%; background: var(--primary); cursor: pointer; }
.vol-slider { width: 80px; }
.vol-slider-inline { width: 60px; height: 3px; }
.global-volume-slider { width: 80px; height: 3px; margin-left: 4px; }
.global-volume-wrap { display: flex; align-items: center; gap: 4px; }
.tile-volume { padding: 0 8px 4px; }
/* Multi-share */
.share-grid { display: grid; gap: 8px; }
.share-grid.multi { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.share-grid .share-panel { min-height: 200px; }
.share-grid .screen-video { min-height: 200px; }
.share-grid .share-placeholder { min-height: 200px; }
/* Expanded share */
.expanded-share-overlay { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 12px; background: rgba(4, 6, 11, 0.82); backdrop-filter: blur(18px) saturate(120%); -webkit-backdrop-filter: blur(18px) saturate(120%); }
.expanded-share-overlay.hidden { display: none !important; }
.expanded-share-content { width: min(calc(100vw - 24px), 1600px); height: min(calc(100dvh - 24px), 980px); display: grid; grid-template-rows: 56px minmax(0, 1fr); background: linear-gradient(180deg, #181c25 0%, #11151c 100%); border-radius: 18px; overflow: hidden; box-shadow: 0 28px 80px rgba(0,0,0,0.58); border: 1px solid rgba(255,255,255,0.06); }
.expanded-share-header { display: flex; align-items: center; justify-content: space-between; padding: 0 18px; background: rgba(23, 27, 36, 0.95); color: white; font-weight: 800; font-size: 14px; border-bottom: 1px solid rgba(255,255,255,0.06); }
.expanded-share-body { position: relative; min-height: 0; min-width: 0; display: grid; place-items: center; background: #05070a; overflow: hidden; }
.expanded-share-body.loading { background: radial-gradient(circle at center, rgba(89, 103, 247, 0.12), transparent 48%), #05070a; }
.expanded-share-content .screen-video { width: 100%; height: 100%; min-height: 0; object-fit: contain; background: #05070a; }
.expanded-share-loading { display: grid; place-items: center; gap: 12px; color: #dce2f2; font-weight: 800; text-align: center; }
.expanded-share-spinner { width: 30px; height: 30px; border-radius: 50%; border: 3px solid rgba(255,255,255,0.16); border-top-color: #8c95ff; animation: expanded-share-spin 0.8s linear infinite; }
.share-expand-btn { width: 28px; height: 28px; pointer-events: auto; }

@keyframes expanded-share-spin {
  to { transform: rotate(360deg); }
}

/* Mic volume control */
.mic-volume-wrap { display: flex; align-items: center; gap: 4px; margin: 0 4px; }
.mic-volume-slider { width: 70px; height: 3px; -webkit-appearance: none; appearance: none; border-radius: 2px; background: #444a56; outline: none; cursor: pointer; }
.mic-volume-slider::-webkit-slider-thumb { -webkit-appearance: none; appearance: none; width: 12px; height: 12px; border-radius: 50%; background: #ff6b6b; cursor: pointer; }
.mic-vol-label { font-size: 10px; color: #888; min-width: 32px; text-align: center; }
/* Channel delete */
.delete-channel-btn { width: 20px; height: 20px; border-radius: 4px; display: grid; place-items: center; background: transparent; color: #888; font-size: 10px; opacity: 0; transition: opacity 0.15s; }
.channel-card:hover .delete-channel-btn { opacity: 1; }
.delete-channel-btn:hover { background: var(--danger); color: white; }
