:root{
  --rooms-ink:#171814;
  --rooms-muted:#72756d;
  --rooms-line:rgba(23,24,20,.12);
  --rooms-paper:#fffef9;
  --rooms-soft:#f3f1e9;
  --rooms-green:#3f7d58;
  --rooms-green-strong:#265c3d;
  --rooms-yellow:#f2c94c;
  --rooms-coral:#d86551;
  --rooms-call:#181a18;
  --rooms-call-2:#212421;
  --rooms-call-line:rgba(255,255,255,.1);
  --rooms-call-muted:#a8ada5;
}

html[data-theme="dark"]{
  --rooms-ink:#f6f4ec;
  --rooms-muted:#a5aaa1;
  --rooms-line:rgba(255,255,255,.12);
  --rooms-paper:#171916;
  --rooms-soft:#20231f;
  --rooms-green:#73a981;
  --rooms-green-strong:#9dc5a5;
  --rooms-yellow:#f1c84b;
}

body.ss-groups-page{background:var(--paper);}
body.ss-app-shell.ss-groups-page .groups-workspace-main{
  width:100%;
  max-width:1600px;
  margin:0 auto;
  padding:28px 34px 54px;
}

.groups-workspace-main,.groups-workspace-main *{box-sizing:border-box;letter-spacing:0;}
.groups-workspace-main .groups-metric-strip{padding:0;}
.groups-workspace-main button{font-family:var(--font-ui);}

.groups-command-header{
  position:relative;
  inset:auto;
  z-index:auto;
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:28px;
  margin-bottom:22px;
  padding:10px 2px 0;
}
.groups-command-copy{max-width:740px;}
.groups-eyebrow,.groups-section-kicker{
  display:flex;
  align-items:center;
  gap:8px;
  margin-bottom:7px;
  color:var(--rooms-green-strong);
  font-family:var(--font-hand);
  font-size:14px;
  line-height:1;
  text-transform:uppercase;
}
.groups-command-copy h1{
  margin:0;
  color:var(--ink);
  font-family:var(--font-display);
  font-size:clamp(34px,4vw,55px);
  font-weight:400;
  line-height:.98;
}
.groups-command-copy p{
  max-width:680px;
  margin:12px 0 0;
  color:var(--graphite);
  font-size:14px;
  line-height:1.6;
}
.groups-command-actions{display:flex;gap:9px;flex:none;}
.groups-command-actions .btn{min-height:42px;border-radius:7px;}
.groups-command-actions .btn i{width:16px;height:16px;}
.groups-live-dot{
  width:8px;
  height:8px;
  flex:none;
  border-radius:50%;
  background:#42b96b;
  box-shadow:0 0 0 4px rgba(66,185,107,.13);
}

.groups-metric-strip{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  border:1px solid var(--rooms-line);
  border-radius:8px;
  background:var(--rooms-paper);
  overflow:hidden;
}
.groups-metric{
  min-width:0;
  display:flex;
  align-items:center;
  gap:12px;
  padding:15px 18px;
  border-right:1px solid var(--rooms-line);
}
.groups-metric:last-child{border-right:0;}
.groups-metric>svg{
  width:34px;
  height:34px;
  flex:none;
  padding:8px;
  border-radius:7px;
  background:color-mix(in srgb,var(--rooms-green) 12%,var(--rooms-paper));
  color:var(--rooms-green-strong);
}
.groups-metric span{display:flex;min-width:0;flex-direction:column;}
.groups-metric b{
  overflow:hidden;
  color:var(--rooms-ink);
  font-family:var(--font-mono);
  font-size:16px;
  line-height:1.2;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.groups-metric small{margin-top:2px;color:var(--rooms-muted);font-size:10.5px;font-weight:700;text-transform:uppercase;}

.groups-home-layout{
  display:grid;
  grid-template-columns:230px minmax(440px,1fr) 310px;
  min-height:560px;
  margin-top:18px;
  border:1px solid var(--rooms-line);
  border-radius:8px;
  background:var(--rooms-paper);
  overflow:hidden;
}
.groups-squad-rail,.discord-companion-panel{min-width:0;background:var(--rooms-soft);}
.groups-squad-rail{padding:17px 12px;border-right:1px solid var(--rooms-line);}
.groups-panel-heading{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:0 6px 10px;
  color:var(--rooms-muted);
  font-size:10.5px;
  font-weight:800;
  text-transform:uppercase;
}
.groups-icon-button{
  width:27px;
  height:27px;
  display:flex;
  align-items:center;
  justify-content:center;
  border:0;
  border-radius:6px;
  background:transparent;
  color:var(--rooms-muted);
  cursor:pointer;
}
.groups-icon-button:hover{background:var(--rooms-paper);color:var(--rooms-ink);}
.groups-icon-button svg{width:15px;height:15px;}
.groups-squad-list{display:grid;gap:3px;}
.groups-squad-link{
  width:100%;
  min-width:0;
  display:grid;
  grid-template-columns:34px minmax(0,1fr) 8px;
  align-items:center;
  gap:9px;
  padding:7px;
  border:0;
  border-radius:7px;
  background:transparent;
  color:var(--rooms-ink);
  text-align:left;
  cursor:pointer;
}
.groups-squad-link:hover,.groups-squad-link.active{background:var(--rooms-paper);box-shadow:inset 0 0 0 1px var(--rooms-line);}
.groups-squad-link-avatar,.group-detail-avatar,.group-card-emblem{
  display:flex;
  align-items:center;
  justify-content:center;
  border-radius:7px;
  color:#fff;
  font-weight:800;
  text-transform:uppercase;
}
.groups-squad-link-avatar{width:34px;height:34px;background:hsl(var(--group-hue) 38% 40%);font-size:12px;}
.groups-squad-link-copy{display:flex;min-width:0;flex-direction:column;}
.groups-squad-link-copy b{overflow:hidden;font-size:12px;text-overflow:ellipsis;white-space:nowrap;}
.groups-squad-link-copy small{margin-top:2px;color:var(--rooms-muted);font-size:9.5px;}
.groups-squad-link>span:last-child{width:7px;height:7px;border-radius:50%;background:#42b96b;}
.groups-join-rail{
  width:100%;
  display:flex;
  align-items:center;
  gap:9px;
  margin-top:10px;
  padding:10px 9px;
  border:1px dashed color-mix(in srgb,var(--rooms-green) 50%,var(--rooms-line));
  border-radius:7px;
  background:transparent;
  color:var(--rooms-green-strong);
  font-size:11px;
  font-weight:750;
  cursor:pointer;
}
.groups-join-rail:hover{background:color-mix(in srgb,var(--rooms-green) 8%,transparent);}
.groups-join-rail svg{width:15px;height:15px;}
.groups-capacity-note{
  display:flex;
  gap:8px;
  margin:18px 4px 0;
  padding-top:15px;
  border-top:1px solid var(--rooms-line);
  color:var(--rooms-muted);
  font-size:10px;
  line-height:1.45;
}
.groups-capacity-note svg{width:14px;height:14px;flex:none;color:var(--rooms-green-strong);}
.groups-rail-skeleton{height:48px;border-radius:7px;background:color-mix(in srgb,var(--rooms-line) 60%,transparent);animation:groupsPulse 1.4s ease-in-out infinite;}
.groups-rail-skeleton.short{width:78%;}

.groups-directory-panel{min-width:0;padding:24px 25px 30px;background:var(--rooms-paper);}
.groups-directory-head{display:flex;align-items:flex-start;justify-content:space-between;gap:18px;margin-bottom:18px;}
.groups-directory-head h2{margin:0;color:var(--rooms-ink);font-family:var(--font-display);font-size:27px;font-weight:400;line-height:1.1;}
.groups-section-kicker{margin-bottom:5px;font-size:12px;}
.groups-privacy-label{
  display:inline-flex;
  align-items:center;
  gap:6px;
  flex:none;
  padding:7px 9px;
  border:1px solid var(--rooms-line);
  border-radius:6px;
  color:var(--rooms-muted);
  font-size:10px;
  font-weight:750;
  text-transform:uppercase;
}
.groups-privacy-label svg{width:13px;height:13px;}
.groups-workspace-main .groups-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:11px;}
.groups-workspace-main .group-card{
  position:relative;
  min-width:0;
  min-height:172px;
  display:flex;
  flex-direction:column;
  padding:17px;
  border:1px solid var(--rooms-line);
  border-radius:8px;
  background:var(--rooms-soft);
  box-shadow:none;
  cursor:pointer;
  overflow:hidden;
  transition:border-color .18s ease,background .18s ease,transform .18s ease;
}
.groups-workspace-main .group-card:hover{transform:translateY(-2px);border-color:color-mix(in srgb,var(--rooms-green) 48%,var(--rooms-line));background:var(--rooms-paper);box-shadow:0 12px 28px rgba(23,24,20,.08);}
.group-card-top{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;}
.group-card-emblem{width:42px;height:42px;flex:none;background:hsl(var(--group-hue) 38% 40%);font-size:15px;box-shadow:inset 0 0 0 1px rgba(255,255,255,.18);}
.group-card-status{display:inline-flex;align-items:center;gap:6px;color:var(--rooms-muted);font-size:9.5px;font-weight:750;text-transform:uppercase;}
.group-card-status::before{content:"";width:7px;height:7px;border-radius:50%;background:#42b96b;}
.groups-workspace-main .group-card .gc-name{margin:14px 0 4px;color:var(--rooms-ink);font-size:15px;font-weight:750;}
.groups-workspace-main .group-card .gc-desc{min-height:34px;margin:0;color:var(--rooms-muted);font-size:11.5px;line-height:1.45;}
.group-card-footer{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-top:auto;padding-top:14px;}
.group-card-members{display:flex;align-items:center;}
.group-card-member-dot{
  width:25px;
  height:25px;
  display:flex;
  align-items:center;
  justify-content:center;
  margin-right:-6px;
  border:2px solid var(--rooms-soft);
  border-radius:50%;
  background:color-mix(in srgb,var(--rooms-green) 30%,var(--rooms-paper));
  color:var(--rooms-green-strong);
  font-size:8px;
  font-weight:800;
}
.group-card-member-dot.empty{background:transparent;border:1px dashed var(--rooms-line);}
.group-card-meta{display:flex;align-items:center;gap:6px;color:var(--rooms-muted);font-size:10.5px;}
.group-card-meta svg{width:13px;height:13px;}
.group-card-arrow{width:27px;height:27px;display:flex;align-items:center;justify-content:center;border-radius:50%;background:var(--rooms-ink);color:var(--rooms-paper);}
.group-card-arrow svg{width:13px;height:13px;}
.group-card-skeleton{height:172px;border-radius:8px;background:color-mix(in srgb,var(--rooms-line) 45%,transparent);animation:groupsPulse 1.4s ease-in-out infinite;}
.groups-empty-state{
  grid-column:1/-1;
  min-height:300px;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  padding:32px;
  border:1px dashed var(--rooms-line);
  border-radius:8px;
  text-align:center;
}
.groups-empty-state>span{width:50px;height:50px;display:flex;align-items:center;justify-content:center;border-radius:8px;background:var(--rooms-soft);color:var(--rooms-green-strong);}
.groups-empty-state svg{width:22px;height:22px;}
.groups-empty-state h3{margin:15px 0 6px;font-family:var(--font-display);font-size:24px;font-weight:400;}
.groups-empty-state p{max-width:360px;margin:0 0 16px;color:var(--rooms-muted);font-size:12px;line-height:1.55;}

.discord-companion-panel{padding:20px;border-left:1px solid var(--rooms-line);}
.discord-panel-loading{display:flex;gap:11px;align-items:center;color:var(--rooms-ink);}
.discord-panel-loading>div{display:flex;min-width:0;flex-direction:column;}
.discord-panel-loading b{font-size:12.5px;}
.discord-panel-loading small{margin-top:3px;color:var(--rooms-muted);font-size:10.5px;line-height:1.4;}
.discord-mark{
  width:39px;
  height:39px;
  display:flex;
  align-items:center;
  justify-content:center;
  flex:none;
  border-radius:8px;
  background:#5865f2;
  color:#fff;
}
.discord-mark svg{width:19px;height:19px;}
.discord-companion-head{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:18px;}
.discord-companion-head>div{display:flex;align-items:center;gap:10px;}
.discord-companion-head span:last-child{display:flex;flex-direction:column;}
.discord-companion-head b{font-size:12.5px;}
.discord-companion-head small{margin-top:2px;color:var(--rooms-muted);font-size:9.5px;}
.discord-sync-state{width:7px;height:7px;border-radius:50%;background:#42b96b;box-shadow:0 0 0 3px rgba(66,185,107,.12);}
.discord-squad-name{margin:0;color:var(--rooms-ink);font-family:var(--font-display);font-size:29px;font-weight:400;line-height:1.05;}
.discord-squad-role{margin:5px 0 17px;color:var(--rooms-muted);font-size:10px;font-weight:750;text-transform:uppercase;}
.discord-room-state{
  display:flex;
  align-items:center;
  gap:11px;
  padding:11px;
  border:1px solid var(--rooms-line);
  border-radius:7px;
  background:var(--rooms-paper);
}
.discord-room-state>svg{width:18px;height:18px;color:var(--rooms-green-strong);}
.discord-room-state>div{display:flex;min-width:0;flex-direction:column;}
.discord-room-state b{font-size:11.5px;}
.discord-room-state small{margin-top:2px;color:var(--rooms-muted);font-size:9.5px;}
.discord-goal{margin-top:17px;}
.discord-goal-copy{display:flex;align-items:center;justify-content:space-between;gap:10px;color:var(--rooms-muted);font-size:10px;font-weight:750;text-transform:uppercase;}
.discord-goal-copy b{color:var(--rooms-ink);font-family:var(--font-mono);font-size:10.5px;}
.discord-goal-track{height:7px;margin-top:8px;border-radius:4px;background:var(--rooms-line);overflow:hidden;}
.discord-goal-track span{display:block;height:100%;border-radius:4px;background:linear-gradient(90deg,var(--rooms-green),var(--rooms-yellow));}
.discord-stat-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin-top:12px;}
.discord-mini-stat{padding:10px;border:1px solid var(--rooms-line);border-radius:7px;background:var(--rooms-paper);}
.discord-mini-stat b{display:block;font-family:var(--font-mono);font-size:14px;}
.discord-mini-stat small{display:block;margin-top:3px;color:var(--rooms-muted);font-size:9px;text-transform:uppercase;}
.discord-panel-actions{display:grid;gap:7px;margin-top:14px;}
.discord-panel-actions a{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:7px;
  min-height:37px;
  padding:8px 10px;
  border:1px solid var(--rooms-line);
  border-radius:7px;
  color:var(--rooms-ink);
  background:var(--rooms-paper);
  font-size:11px;
  font-weight:750;
  text-decoration:none;
}
.discord-panel-actions a.primary{border-color:#5865f2;background:#5865f2;color:#fff;}
.discord-panel-actions a:hover{filter:brightness(.98);transform:translateY(-1px);}
.discord-panel-actions svg{width:14px;height:14px;}
.discord-panel-message{margin-top:14px;color:var(--rooms-muted);font-size:10.5px;line-height:1.55;}
.discord-disconnected{display:flex;min-height:440px;flex-direction:column;justify-content:center;}
.discord-disconnected .discord-mark{margin-bottom:15px;}
.discord-disconnected h2{margin:0;font-family:var(--font-display);font-size:25px;font-weight:400;}
.discord-disconnected p{margin:8px 0 17px;color:var(--rooms-muted);font-size:11.5px;line-height:1.55;}

.group-detail-view{width:100%;}
.group-detail-header{
  position:relative;
  inset:auto;
  z-index:auto;
  min-height:72px;
  display:grid;
  grid-template-columns:38px 42px minmax(0,1fr) auto auto;
  align-items:center;
  gap:12px;
  margin-bottom:12px;
  padding:10px 12px;
  border:1px solid var(--rooms-line);
  border-radius:8px;
  background:var(--rooms-paper);
}
.groups-back-button{
  width:36px;height:36px;display:flex;align-items:center;justify-content:center;border:1px solid var(--rooms-line);border-radius:7px;background:var(--rooms-soft);color:var(--rooms-ink);cursor:pointer;
}
.groups-back-button:hover{background:var(--rooms-paper);}
.groups-back-button svg{width:17px;height:17px;}
.group-detail-avatar{width:42px;height:42px;background:hsl(var(--group-hue) 38% 40%);font-size:14px;}
.group-detail-copy{min-width:0;}
.group-detail-title-row{display:flex;align-items:center;gap:9px;}
.group-detail-title-row h1{min-width:0;margin:0;overflow:hidden;color:var(--rooms-ink);font-family:var(--font-display);font-size:25px;font-weight:400;text-overflow:ellipsis;white-space:nowrap;}
.group-detail-copy p{margin:2px 0 0;overflow:hidden;color:var(--rooms-muted);font-size:10.5px;text-overflow:ellipsis;white-space:nowrap;}
.group-owner-badge{padding:3px 6px;border-radius:4px;background:color-mix(in srgb,var(--rooms-yellow) 32%,transparent);color:#795d00;font-size:8px;font-weight:800;text-transform:uppercase;}
html[data-theme="dark"] .group-owner-badge{color:var(--rooms-yellow);}
.group-detail-presence{display:flex;align-items:center;gap:7px;padding:7px 10px;border:1px solid var(--rooms-line);border-radius:6px;color:var(--rooms-muted);font-size:10px;white-space:nowrap;}
.group-detail-presence b{color:var(--rooms-ink);font-family:var(--font-mono);}
.group-header-join{min-height:38px;border-radius:7px;}
.group-header-join svg{width:15px;height:15px;}

.group-room-layout{
  min-height:690px;
  display:grid;
  grid-template-columns:220px minmax(420px,1fr) 285px;
  border:1px solid var(--rooms-call-line);
  border-radius:8px;
  background:var(--rooms-call);
  color:#f4f5f1;
  overflow:hidden;
}
.group-channel-rail{
  min-width:0;
  padding:18px 11px;
  border-right:1px solid var(--rooms-call-line);
  background:#151715;
}
.group-rail-label{padding:0 8px 7px;color:#767c74;font-size:9.5px;font-weight:800;text-transform:uppercase;}
.rail-label-spaced{margin-top:22px;}
.group-channel-item{
  width:100%;
  display:grid;
  grid-template-columns:18px minmax(0,1fr) auto;
  align-items:center;
  gap:8px;
  min-height:36px;
  padding:8px;
  border:0;
  border-radius:6px;
  background:transparent;
  color:#9ca29a;
  font-size:11.5px;
  text-align:left;
  cursor:pointer;
}
.group-channel-item:hover,.group-channel-item.active{background:rgba(255,255,255,.07);color:#fff;}
.group-channel-item svg{width:15px;height:15px;}
.group-channel-item>b{font-family:var(--font-mono);font-size:9.5px;}
.channel-live-pill{padding:2px 5px;border-radius:4px;background:rgba(66,185,107,.15);color:#76dc98;font-size:8px;font-weight:800;text-transform:uppercase;}
.group-channel-rail .invite-code-box{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:7px;
  margin:0;
  padding:9px;
  border:1px solid var(--rooms-call-line);
  border-radius:7px;
  background:rgba(255,255,255,.04);
}
.group-channel-rail .invite-code-box>div:first-child{display:flex;min-width:0;flex-direction:column;}
.group-channel-rail .invite-code-box small{color:#777d75;font-size:8px;font-weight:750;text-transform:uppercase;}
.group-channel-rail .invite-code-box .code{margin-top:3px;color:#f2c94c;font-family:var(--font-mono);font-size:15px;font-weight:700;letter-spacing:.08em;}
.invite-actions{display:flex;gap:3px;}
.invite-actions button{width:27px;height:27px;display:flex;align-items:center;justify-content:center;border:0;border-radius:5px;background:rgba(255,255,255,.06);color:#aeb3ac;cursor:pointer;}
.invite-actions button:hover{background:rgba(255,255,255,.12);color:#fff;}
.invite-actions svg{width:13px;height:13px;}
.group-channel-rail .group-stats-row{display:grid;grid-template-columns:1fr 1fr;gap:6px;margin:13px 0 0;}
.group-channel-rail .group-stat{min-width:0;padding:8px;border:1px solid var(--rooms-call-line);border-radius:6px;color:#777d75;font-size:8.5px;line-height:1.3;text-transform:uppercase;}
.group-channel-rail .group-stat b{display:block;margin-bottom:2px;overflow:hidden;color:#f2f3ef;font-family:var(--font-mono);font-size:11px;text-overflow:ellipsis;white-space:nowrap;}
.group-channel-rail .group-stat:last-child{grid-column:1/-1;}
.room-admin-bar{margin-top:14px;padding:9px;border:1px solid var(--rooms-call-line);border-radius:7px;background:rgba(255,255,255,.04);}
.room-admin-bar>div:first-child{display:flex;flex-direction:column;}
.room-admin-bar b{font-size:10.5px;}
.room-admin-bar small{margin-top:3px;color:#777d75;font-size:8.5px;line-height:1.35;}
.room-admin-bar .btn{width:100%;min-height:32px;margin-top:8px;justify-content:center;border-color:var(--rooms-call-line);color:#fff;background:rgba(255,255,255,.06);font-size:9.5px;}
.group-danger-actions{display:grid;gap:3px;margin-top:20px;padding-top:12px;border-top:1px solid var(--rooms-call-line);}
.group-danger-actions button{display:flex;align-items:center;gap:8px;padding:8px;border:0;border-radius:6px;background:transparent;color:#ae7774;font-size:10px;cursor:pointer;}
.group-danger-actions button:hover{background:rgba(229,72,77,.1);color:#ff8b84;}
.group-danger-actions svg{width:14px;height:14px;}

.group-call-stage{min-width:0;background:var(--rooms-call);}
.study-room-surface{
  min-height:100%;
  display:flex;
  flex-direction:column;
  padding:0;
  background:var(--rooms-call);
}
.study-room-topbar{
  min-height:58px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:11px 16px;
  border-bottom:1px solid var(--rooms-call-line);
}
.study-room-heading>div:first-child{display:flex;align-items:center;gap:8px;}
.study-room-heading b{font-size:12px;}
.study-room-heading small{color:var(--rooms-call-muted);font-size:9.5px;}
.room-timer-display{margin-top:4px;color:#f2c94c;font-family:var(--font-mono);font-size:10.5px;font-weight:700;}
.study-room-utility-actions{display:flex;align-items:center;gap:7px;}
.room-capacity{display:flex;align-items:center;gap:5px;padding:6px 8px;border:1px solid var(--rooms-call-line);border-radius:6px;color:var(--rooms-call-muted);font-size:9px;}
.room-capacity svg{width:12px;height:12px;}.room-capacity b{color:#fff;font-family:var(--font-mono);}
.room-utility-button{width:30px;height:30px;align-items:center;justify-content:center;border:1px solid var(--rooms-call-line);border-radius:6px;background:rgba(255,255,255,.04);color:var(--rooms-call-muted);cursor:pointer;}
.room-utility-button:hover,.room-utility-button.active{background:rgba(255,255,255,.1);color:#fff;}
.room-utility-button svg{width:14px;height:14px;}
.room-error-message,.room-connection-status{margin:10px 16px 0;padding:8px 10px;border-radius:6px;font-size:10.5px;}
.room-connection-status.connecting{background:rgba(255,255,255,.06);color:var(--rooms-call-muted);}
.room-connection-status.error,.room-error-message{background:rgba(229,72,77,.12);color:#ff9d97;font-weight:600;}
.room-body-row{min-height:0;display:flex;flex:1;gap:0;align-items:stretch;}
.room-stage-canvas{min-width:0;display:flex;flex:1;align-items:center;justify-content:center;padding:14px;overflow:hidden;}
.room-video-grid{width:100%;display:grid;gap:10px;grid-template-columns:repeat(var(--room-cols,1),minmax(0,1fr));margin:auto;}
.room-video-grid[data-cols="1"]{max-width:660px;}
.room-video-grid[data-cols="2"]{max-width:820px;}
.room-video-tile{
  position:relative;
  min-width:0;
  aspect-ratio:16/10;
  display:flex;
  align-items:center;
  justify-content:center;
  border:1px solid rgba(255,255,255,.08);
  border-radius:8px;
  background:var(--rooms-call-2);
  overflow:hidden;
  cursor:pointer;
}
.room-video-tile video{width:100%;height:100%;object-fit:cover;}
.room-video-tile .rvt-fallback{width:68px;height:68px;min-width:0;max-width:none;border-radius:50%;background:#30342f;color:#fff;}
.room-video-tile .rvt-camoff-overlay{background:var(--rooms-call-2);}
.room-video-tile .rvt-name{bottom:8px;left:9px;padding:4px 7px;border-radius:5px;background:rgba(0,0,0,.52);font-size:9.5px;}
.room-video-tile.speaking{outline:2px solid #42b96b;outline-offset:-2px;}
.room-video-tile.sharing{outline:2px solid #f2c94c;outline-offset:-2px;}
.room-waiting-state{
  min-height:410px;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  padding:28px;
  text-align:center;
}
.waiting-room-icon{width:58px;height:58px;display:flex;align-items:center;justify-content:center;border:1px solid var(--rooms-call-line);border-radius:8px;background:rgba(255,255,255,.05);color:#f2c94c;}
.waiting-room-icon svg{width:25px;height:25px;}
.room-waiting-state h2{margin:17px 0 6px;color:#f4f5f1;font-family:var(--font-display);font-size:28px;font-weight:400;}
.room-waiting-state p{max-width:360px;margin:0 0 17px;color:var(--rooms-call-muted);font-size:11.5px;line-height:1.55;}
.room-waiting-state .btn{min-height:38px;border-radius:7px;}
.room-spotlight-wrap{width:100%;display:none;}
.room-spotlight-wrap.active{display:block;}
.room-spotlight-main{aspect-ratio:16/9;max-height:57vh;margin-bottom:10px;}
.room-spotlight-main .room-video-tile{width:100%;height:100%;aspect-ratio:auto;}
.room-thumb-strip{display:flex;gap:8px;overflow-x:auto;padding-bottom:3px;}
.room-thumb-strip .room-video-tile{width:105px;flex:none;aspect-ratio:16/10;}

.room-chat-panel{
  width:260px;
  height:auto;
  min-height:440px;
  display:none;
  flex-direction:column;
  flex:none;
  border:0;
  border-left:1px solid var(--rooms-call-line);
  border-radius:0;
  background:#1c1f1c;
}
.room-chat-panel.open{display:flex;}
.room-chat-head{min-height:48px;display:flex;align-items:center;justify-content:space-between;padding:10px 12px;border-bottom:1px solid var(--rooms-call-line);}
.room-chat-head>div{display:flex;align-items:center;gap:8px;font-size:10.5px;}
.room-chat-head button{width:28px;height:28px;display:flex;align-items:center;justify-content:center;border:0;border-radius:5px;background:transparent;color:var(--rooms-call-muted);cursor:pointer;}
.room-chat-head button:hover{background:rgba(255,255,255,.06);color:#fff;}
.room-chat-head svg{width:14px;height:14px;}
.room-chat-messages{flex:1;padding:12px;gap:10px;}
.room-chat-msg{font-size:10.5px;line-height:1.45;}
.room-chat-msg .rcm-name{color:#f4f5f1;}.room-chat-msg .rcm-text{color:var(--rooms-call-muted);}
.room-chat-empty{color:#70766e;font-size:10px;}
.room-chat-input-row{margin:0 10px 10px;border:1px solid var(--rooms-call-line);border-radius:7px;background:rgba(255,255,255,.05);overflow:hidden;}
.room-chat-input-row input{min-width:0;padding:10px;background:transparent;color:#fff;font-size:10.5px;}
.room-chat-input-row input::placeholder{color:#777d75;}
.room-chat-input-row button{color:var(--rooms-call-muted);}

.room-control-dock{
  min-height:66px;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:7px;
  padding:10px 14px;
  border-top:1px solid var(--rooms-call-line);
  background:#161816;
}
.room-control-button{
  width:40px;
  height:40px;
  align-items:center;
  justify-content:center;
  gap:7px;
  border:1px solid var(--rooms-call-line);
  border-radius:50%;
  background:#2a2d29;
  color:#f4f5f1;
  cursor:pointer;
}
.room-control-button:hover,.room-control-button.active{background:#393d38;}
.room-control-button svg{width:16px;height:16px;}
.room-control-wide{width:auto;min-width:76px;padding:0 13px;border-radius:20px;font-size:9.5px;font-weight:750;}
.room-join-control{width:auto;min-width:92px;padding:0 15px;border-radius:20px;background:#318653;border-color:#318653;font-size:10px;font-weight:800;}
.room-join-control:hover{background:#3c9962;}
.room-leave-control{width:auto;min-width:92px;padding:0 15px;border-radius:20px;background:#c74742;border-color:#c74742;font-size:10px;font-weight:800;}
.room-leave-control:hover{background:#db554f;}
.room-react-wrap{position:relative;}
.room-reaction-picker{right:auto;bottom:calc(100% + 10px);left:50%;transform:translateX(-50%);border-color:var(--rooms-call-line);border-radius:7px;background:#2a2d29;box-shadow:0 16px 35px rgba(0,0,0,.35);}
.room-reaction-picker span:hover{background:rgba(255,255,255,.08);}
.room-ambient-drawer{padding:12px 15px;border-top:1px solid var(--rooms-call-line);background:#191b19;}
.ambient-drawer-heading{display:flex;align-items:center;justify-content:space-between;gap:15px;margin-bottom:8px;color:var(--rooms-call-muted);font-size:9px;}
.ambient-drawer-heading>span{display:flex;align-items:center;gap:7px;color:#e8eae5;font-size:10px;}
.ambient-drawer-heading svg{width:13px;height:13px;color:#f2c94c;}
.room-track-chip{margin:0 5px 5px 0;padding:6px 9px;border-color:var(--rooms-call-line);border-radius:6px;background:rgba(255,255,255,.04);color:var(--rooms-call-muted);font-size:9.5px;}
.room-track-chip.active{border-color:#f2c94c;background:#f2c94c;color:#171814;}
#room-player iframe{width:100%;max-height:80px;border:0;border-radius:6px;}
.room-disabled-message{min-height:690px;display:flex;align-items:center;justify-content:center;gap:12px;padding:30px;color:var(--rooms-call-muted);}
.room-disabled-message>svg{width:34px;height:34px;padding:8px;border:1px solid var(--rooms-call-line);border-radius:7px;}
.room-disabled-message>div{display:flex;flex-direction:column;}.room-disabled-message b{color:#fff;font-size:13px;}.room-disabled-message span{margin-top:3px;font-size:10px;}

.group-member-rail{min-width:0;padding:18px 13px;border-left:1px solid var(--rooms-call-line);background:#1c1f1c;}
.member-rail-heading{display:flex;align-items:flex-end;justify-content:space-between;gap:10px;padding:0 4px 11px;}
.member-rail-heading .groups-section-kicker{color:#8db499;font-size:10px;}
.member-rail-heading h2{margin:0;color:#f4f5f1;font-family:var(--font-display);font-size:24px;font-weight:400;}
.member-limit{padding:4px 7px;border:1px solid var(--rooms-call-line);border-radius:5px;color:#8e948c;font-family:var(--font-mono);font-size:9px;}
.member-limit b{color:#fff;}
.member-rail-subtitle{padding:8px 7px;border-top:1px solid var(--rooms-call-line);color:#72786f;font-size:8.5px;font-weight:750;text-transform:uppercase;}
.group-member-rail .member-row{
  min-width:0;
  display:grid;
  grid-template-columns:22px 34px minmax(0,1fr) auto;
  gap:8px;
  padding:9px 6px;
  border-bottom:0;
  border-radius:6px;
}
.group-member-rail .member-row:hover,.group-member-rail .member-row.is-you{background:rgba(255,255,255,.05);}
.group-member-rail .member-rank{width:auto;color:#777d75;font-size:9px;}
.group-member-rail .member-rank.gold{color:#f2c94c;}.group-member-rail .member-rank.silver{color:#c2c7c0;}.group-member-rail .member-rank.bronze{color:#d48b61;}
.group-member-rail .member-avatar{width:34px;height:34px;background:#30342f;color:#fff;font-size:10px;}
.group-member-rail .member-row>div:nth-child(3){min-width:0;overflow:hidden;color:#eceeea;font-size:10.5px!important;text-overflow:ellipsis;white-space:nowrap;}
.group-member-rail .member-xp{grid-column:3;margin:-12px 0 0;color:#777d75;font-size:8.5px;}
.group-member-rail .member-you-tag{grid-column:4;grid-row:1;margin:0;background:#3f7d58;color:#fff;font-size:7px;}
.group-member-rail .member-kick{grid-column:4;grid-row:1;width:14px;height:14px;color:#8c918a;}
.member-rail-note{display:flex;gap:8px;margin-top:16px;padding:11px;border:1px solid var(--rooms-call-line);border-radius:7px;color:#777d75;font-size:8.8px;line-height:1.45;}
.member-rail-note svg{width:14px;height:14px;flex:none;color:#f2c94c;}

#study-room-section.theater{
  position:fixed;
  inset:0;
  z-index:1200;
  display:flex!important;
  min-height:100vh;
  padding:0;
  border-radius:0;
  overflow:auto;
}
.theater .room-stage-canvas{min-height:calc(100vh - 196px);}
.theater .room-video-grid{max-width:1500px;}
.theater .room-spotlight-main{max-height:74vh;}

.groups-error-state{grid-column:1/-1;padding:16px;border:1px solid rgba(229,72,77,.24);border-radius:7px;background:rgba(229,72,77,.06);color:var(--danger);font-size:12px;}
.groups-panel-empty{margin:8px;padding:10px;border:1px dashed var(--rooms-line);border-radius:6px;color:var(--rooms-muted);font-size:10px;text-align:center;}
.ss-groups-page .group-modal{padding:0!important;border-radius:8px!important;background:var(--rooms-paper)!important;color:var(--rooms-ink);overflow:hidden;}
.group-modal-head{display:flex;align-items:center;gap:12px;padding:20px 22px 16px;border-bottom:1px solid var(--rooms-line);background:var(--rooms-soft);}
.group-modal-head>span{width:38px;height:38px;display:flex;align-items:center;justify-content:center;flex:none;border-radius:7px;background:color-mix(in srgb,var(--rooms-green) 14%,var(--rooms-paper));color:var(--rooms-green-strong);}
.group-modal-head svg{width:18px;height:18px;}
.group-modal-head>div{display:flex;min-width:0;flex-direction:column;}
.group-modal-head b{color:var(--rooms-ink);font-family:var(--font-display);font-size:20px;font-weight:400;}
.group-modal-head small{margin-top:3px;color:var(--rooms-muted);font-size:10.5px;}
.group-modal>label{display:block;margin:16px 22px 6px;color:var(--rooms-muted);font-size:10px;font-weight:800;text-transform:uppercase;}
.group-modal>label span{font-weight:500;text-transform:none;}
.group-modal>.field-input,.group-modal>.field-textarea{width:calc(100% - 44px);margin:0 22px;}
.group-modal>.field-input,.group-modal>.field-textarea{border-color:var(--rooms-line);background:var(--rooms-paper);color:var(--rooms-ink);}
.group-modal>.field-textarea{min-height:82px;resize:vertical;}
.group-code-input{text-align:center;text-transform:uppercase;font-family:var(--font-mono)!important;font-size:20px!important;font-weight:700;letter-spacing:.12em!important;}
.group-modal-foot{display:flex;justify-content:flex-end;gap:8px;margin-top:20px;padding:14px 22px;border-top:1px solid var(--rooms-line);background:var(--rooms-soft);}
.group-modal-foot .btn{min-height:38px;border-radius:7px;}.group-modal-foot .btn svg{width:15px;height:15px;}
.group-modal-foot .btn-ghost{color:var(--rooms-ink);}
@keyframes groupsPulse{0%,100%{opacity:.45}50%{opacity:.8}}

@media(max-width:1180px){
  .groups-home-layout{grid-template-columns:210px minmax(400px,1fr);}
  .discord-companion-panel{grid-column:1/-1;border-top:1px solid var(--rooms-line);border-left:0;}
  .discord-disconnected{min-height:0;}
  .group-room-layout{grid-template-columns:200px minmax(420px,1fr);}
  .group-member-rail{grid-column:1/-1;display:grid;grid-template-columns:220px minmax(0,1fr);column-gap:14px;border-top:1px solid var(--rooms-call-line);border-left:0;}
  .group-member-rail #members-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));}
  .member-rail-note{grid-column:1;grid-row:2;margin-top:0;}
}

@media(max-width:850px){
  body.ss-app-shell.ss-groups-page .groups-workspace-main{padding:24px 18px 96px;}
  .groups-command-header{align-items:flex-start;flex-direction:column;gap:16px;}
  .groups-command-actions{width:100%;}.groups-command-actions .btn{flex:1;justify-content:center;}
  .groups-metric-strip{grid-template-columns:repeat(2,minmax(0,1fr));}
  .groups-metric:nth-child(2){border-right:0;}.groups-metric:nth-child(-n+2){border-bottom:1px solid var(--rooms-line);}
  .groups-home-layout{grid-template-columns:1fr;}
  .groups-squad-rail{display:none;}
  .discord-companion-panel{grid-column:auto;}
  .group-detail-header{grid-template-columns:36px 40px minmax(0,1fr) auto;}
  .group-detail-presence{display:none;}
  .group-header-join{padding:0 10px;}.group-header-join span{display:none;}
  .group-room-layout{grid-template-columns:1fr;}
  .group-channel-rail{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:4px;padding:8px;border-right:0;border-bottom:1px solid var(--rooms-call-line);}
  .group-channel-rail>.group-rail-label,.group-channel-rail>.invite-code-box,.group-channel-rail>.group-stats-row,.group-channel-rail>.room-admin-bar,.group-channel-rail>.group-danger-actions{display:none!important;}
  .group-channel-item{display:flex;justify-content:center;}.group-channel-item span:not(.channel-live-pill),.group-channel-item>b{display:none;}
  .group-member-rail{grid-template-columns:1fr;}
  .member-rail-note{grid-column:auto;grid-row:auto;}
}

@media(max-width:620px){
  .groups-command-copy h1{font-size:36px;}
  .groups-command-copy p{font-size:12.5px;}
  .groups-metric{padding:12px;}.groups-metric>svg{width:30px;height:30px;}
  .groups-directory-panel{padding:20px 14px 24px;}
  .groups-directory-head{align-items:flex-start;flex-direction:column;}
  .groups-workspace-main .groups-grid{grid-template-columns:1fr;}
  .group-detail-header{grid-template-columns:34px 36px minmax(0,1fr);padding:8px;}
  .group-detail-avatar{width:36px;height:36px;}.group-detail-title-row h1{font-size:20px;}
  .group-header-join{display:none;}
  .study-room-heading small{display:none;}
  .room-stage-canvas{padding:8px;}
  .room-waiting-state{min-height:360px;padding:20px;}
  .room-body-row{flex-direction:column;}
  .room-chat-panel{width:100%;height:260px;min-height:260px;border-top:1px solid var(--rooms-call-line);border-left:0;}
  .room-control-dock{position:sticky;bottom:0;z-index:8;gap:5px;padding:9px 7px;overflow-x:auto;justify-content:flex-start;}
  .room-control-button{width:38px;height:38px;flex:none;}
  .room-control-wide{min-width:38px;width:38px;padding:0;}.room-control-wide span{display:none;}
  .room-join-control,.room-leave-control{min-width:76px;width:auto;padding:0 12px;}
  .ambient-drawer-heading small{display:none;}
  .group-member-rail #members-list{grid-template-columns:1fr;}
}

@media(prefers-reduced-motion:reduce){
  .groups-workspace-main *{scroll-behavior:auto!important;transition:none!important;animation:none!important;}
}
