.room-workspace-tabs button {
  transition: none;
}

.room-workspace-media .room-watch-options,
.room-workspace-media .room-play-options,
.room-workspace-media .room-language-context,
.room-workspace-media .activity-bar,
.room-workspace-media .activity-column > :not(#roomMediaPanel):not(#videoPanel) {
  display: none !important;
}

.guest-screen-only.party-hub-active .room-workspace-hub {
  display: grid;
}

.room-media-panel,
.party-music-dock {
  display: grid;
  gap: 10px;
  padding: 14px;
  margin-bottom: 14px;
  min-width: 0;
}

.room-media-panel[hidden],
.party-music-dock[hidden] {
  display: none;
}

.room-media-heading,
.party-music-heading,
.room-media-form,
.room-media-actions,
.room-media-queue li {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  min-width: 0;
}

.room-media-heading,
.party-music-heading {
  justify-content: space-between;
}

.room-media-heading h2,
.party-music-heading h2,
.party-game-empty h2 {
  font-size: 16px;
  margin: 0 0 3px;
}

.room-media-panel p,
.party-music-dock p,
.party-game-empty p {
  font-size: 12px;
  line-height: 1.4;
  margin: 0;
  overflow-wrap: anywhere;
}

.room-media-form {
  align-items: flex-end;
}

.room-media-form label {
  flex: 1 1 180px;
  min-width: 0;
}

.room-media-panel input,
.room-media-panel button,
.party-music-dock input,
.party-music-dock button {
  font-size: 12px;
  height: 36px;
  min-height: 36px;
  max-height: 36px;
  padding: 5px 10px;
}

.room-media-panel input[type="url"],
.party-music-dock input[type="url"] {
  width: 100%;
}

.room-media-stage,
.party-music-stage {
  position: relative;
  aspect-ratio: 16 / 9;
  width: 100%;
  min-height: 202px;
  overflow: hidden;
  background: #080f17;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.room-media-stage > iframe,
.room-media-stage > video,
.room-media-stage > div,
.party-music-stage > iframe {
  position: absolute;
  width: 100%;
  height: 100%;
  border: 0;
  top: 0;
  left: 0;
}

.room-media-stage video {
  object-fit: contain;
}

.link-video-stage:has(iframe) {
  min-height: 202px;
}

#linkVideoPlayer {
  position: absolute;
  inset: 0;
}

.room-media-volume,
.room-media-seek {
  flex-direction: row;
  align-items: center;
  min-width: 0;
  font-size: 12px;
}

.room-media-volume input[type="range"] {
  width: min(90px, 26vw);
  padding: 0;
  background: transparent;
  accent-color: var(--green);
}

.room-media-seek input {
  width: 72px;
}

.room-media-details {
  border-top: 1px solid var(--line);
  padding-top: 8px;
}

.room-media-details summary {
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.room-media-details > :not(summary) {
  margin-top: 8px;
}

.room-media-queue {
  margin: 0;
  padding: 0;
  display: grid;
  gap: 4px;
  list-style: none;
}

.room-media-queue li {
  padding: 5px 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.room-media-queue li[aria-current="true"] {
  border-color: var(--green);
}

.room-media-queue li span {
  flex: 1 1 120px;
  min-width: 0;
  font-size: 12px;
  overflow-wrap: anywhere;
}

.room-media-actions > a {
  font-size: 12px;
}

#roomMediaCommandStatus,
.party-music-error {
  color: #ffd2cc;
}

#roomPanel > .party-room-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px 16px;
  margin: 0 0 12px;
  padding: 12px 14px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
}

.party-room-header .room-identity {
  min-width: 0;
}

.party-room-identity h2 {
  margin: 0 0 4px;
  font-size: 19px;
  line-height: 1.2;
}

.party-room-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px 9px;
  min-width: 0;
  font-size: 12px;
  color: var(--muted);
}

.party-room-meta #roomTitle {
  font-size: 12px;
  font-weight: 650;
  color: var(--text);
  overflow-wrap: anywhere;
}

.party-room-meta .room-code {
  margin: 0;
  color: var(--muted);
}

.party-connection {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.party-connection::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #eac47a;
}

.party-connection[data-connected="true"]::before {
  background: var(--green);
}

.party-room-header .toolbar-actions {
  width: auto;
  flex-wrap: wrap;
  gap: 6px;
}

.party-room-header .toolbar-actions button {
  flex: 0 0 auto;
  height: 36px;
  min-height: 36px;
  padding: 5px 10px;
  font-size: 12px;
}

.party-room-header > .room-workspace-hub,
.party-room-header > .switch-room-form,
.party-room-header > .invitation-share {
  grid-column: 1 / -1;
}

.switch-room-form {
  display: flex;
  align-items: end;
  flex-wrap: wrap;
  gap: 6px 8px;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--field);
}

.switch-room-form label { flex: 0 1 330px; min-width: 0; font-size: 12px; }
.switch-room-form input, .switch-room-form button { min-height: 38px; padding: 6px 9px; font-size: 13px; }
.switch-room-form input { width: 100%; min-width: 0; }
#switchRoomStatus { flex-basis: 100%; margin: 0; color: var(--danger); font-size: 13px; overflow-wrap: anywhere; }

.party-room-header > .room-workspace-hub {
  margin: 0;
  padding: 0;
  gap: 6px;
}

.party-room-header .room-workspace-tabs {
  border: 0;
  border-top: 1px solid var(--line);
  padding: 9px 0 0;
  gap: 6px;
}

.party-room-header #roomRoleStatus:empty {
  display: none;
}

.party-room-header #roomWorkspaceStatus:empty {
  display: none;
}

.party-room-header .room-watch-options button,
.party-room-header .room-workspace-tabs button {
  font-size: 12px;
}

.party-hub-active #roomChatShortcut,
.party-hub-active #connectionBadge,
.party-hub-active .activity-column:has(> #partyGameEmpty:not([hidden])) > .activity-bar {
  display: none;
}

.party-game-empty {
  padding: 15px;
}

.room-chat-back {
  display: none;
}

.game-panel [data-your-turn] {
  color: var(--green);
  font-weight: 650;
}

#drawTimer, #raceTimer {
  flex-shrink: 0;
  white-space: nowrap;
}

.party-side-rail {
  display: contents;
}

.party-hub-active .room-layout {
  grid-template-columns: minmax(0, 1fr) minmax(244px, 320px);
  align-items: start;
}

.party-hub-active .party-side-rail {
  display: flex;
  flex-direction: column;
  align-self: start;
  gap: 12px;
  min-width: 0;
}

.party-side-rail > .party-music-dock {
  flex: 0 0 auto;
  margin: 0;
}

.party-music-dock {
  padding: 12px;
  gap: 7px;
}

.party-music-dock .room-media-actions:not(:has(> :not([hidden]))) {
  display: none;
}

.party-music-stage > iframe {
  min-width: 200px;
  min-height: 200px;
}

.party-music-dock .room-media-details summary:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 3px;
}

@media (min-width: 901px) and (min-height: 540px) {
  .party-hub-active .party-side-rail {
    position: sticky;
    top: 12px;
    max-height: calc(100vh - 24px);
    max-height: calc(100dvh - 24px);
  }

  .party-hub-active .party-side-rail > .room-sidebar {
    min-height: 0;
    overflow-y: auto;
  }
}

@media (max-width: 900px) {
  .party-hub-active .room-layout {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "music" "activity" "conversation";
    row-gap: 12px;
  }

  .party-hub-active .party-side-rail {
    display: contents;
  }

  .party-hub-active .room-layout > .activity-column {
    grid-area: activity;
  }

  .party-hub-active .party-side-rail > .room-sidebar {
    grid-area: conversation;
  }

  .party-hub-active .party-side-rail > .party-music-dock {
    grid-area: music;
  }

  .party-hub-active:not(.simple-sharing):not(.party-controller):not([data-desktop="true"]) .room-layout {
    grid-template-areas: "activity" "music" "conversation";
  }
}

@media (max-width: 640px) {
  #roomPanel > .party-room-header {
    grid-template-columns: minmax(0, 1fr);
    padding: 10px;
    gap: 8px;
  }

  .party-room-header .toolbar-actions {
    justify-content: flex-start;
  }
  .switch-room-form label { flex: 1 1 150px; }
  .switch-room-form input, .switch-room-form button { min-height: 44px; }

  body:not(.simple-sharing):not(.party-controller):not([data-desktop="true"]) .party-room-header .toolbar-actions button {
    flex: 1 1 56px;
    min-width: 0;
    white-space: normal;
    line-height: 1.2;
  }

  body:not(.simple-sharing):not(.party-controller):not([data-desktop="true"]) .party-room-header .toolbar-actions button,
  body:not(.simple-sharing):not(.party-controller):not([data-desktop="true"]) .room-workspace-row button,
  body:not(.simple-sharing):not(.party-controller):not([data-desktop="true"]) .room-workspace-row select {
    height: auto;
    min-height: 44px;
    padding-inline: 6px;
  }

  .party-hub-active:not(.simple-sharing):not(.party-controller):not([data-desktop="true"]) .room-workspace-tabs button {
    flex: 1 1 0;
    min-width: 44px;
    padding-inline: 3px;
  }

  body:not(.simple-sharing):not(.party-controller):not([data-desktop="true"]) .room-chat-back {
    display: inline-flex;
    flex-shrink: 0;
    align-items: center;
    min-height: 44px;
  }

  body:not(.simple-sharing):not(.party-controller):not([data-desktop="true"]) #roomChatPanel {
    scroll-margin-top: 10px;
  }

  body:not(.simple-sharing):not(.party-controller):not([data-desktop="true"]) #chatMessages {
    height: clamp(110px, 30vh, 230px);
    height: clamp(110px, 30dvh, 230px);
  }

  #chatText, #chatLanguage, #raceAnswer, #switchRoomCode {
    font-size: 16px;
    min-height: 44px;
  }

  body:not(.simple-sharing):not(.party-controller):not([data-desktop="true"]) #recordChatVoice {
    min-width: 44px;
  }
}
.together-shell > #publicNameForm {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 38px 38px;
  align-items: end;
  gap: 7px;
  padding: 10px 12px;
}

.together-shell > #publicNameForm input { width: 100%; }

.together-shell > #publicNameForm button {
  height: 38px;
  min-height: 38px;
  padding: 4px;
}

.together-shell > #publicNameForm #publicNameHelp {
  grid-column: 1 / -1;
  font-size: 12px;
}

.setup-panel > .party-lobby-entry {
  align-items: flex-end;
  margin: 0 0 18px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #10212b;
  gap: 12px;
}

.party-lobby-entry .join-controls {
  border: 0;
  padding: 0;
  min-width: 0;
}

.party-lobby-entry #joinCodeField {
  flex: 1 1 auto;
  min-width: 0;
}

.party-lobby-entry #joinCode { width: 100%; }
.party-lobby-entry .divider-word { align-self: center; }

.page-header > .vm-workspace-nav { display: inline-grid; gap: 2px; margin-right: auto; }
.page-header > .room-links { gap: 8px; width: auto; flex-wrap: nowrap; }
.room-links-menu { position: relative; }
.room-links-menu summary {
  cursor: pointer;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  white-space: nowrap;
}
.room-links-menu summary:focus-visible { outline: 2px solid var(--green); }
.room-links-menu > div {
  display: grid;
  position: absolute;
  z-index: 8;
  right: 0;
  top: calc(100% + 4px);
  width: 174px;
  padding: 4px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 9px;
  box-shadow: 0 6px 18px #0006;
}
.room-links-menu a, .room-links-menu #togglePublicName {
  padding: 8px;
  border: 0;
  background: transparent;
  min-height: 34px;
  font: inherit;
  text-align: left;
  justify-content: flex-start;
  text-decoration: none;
}
.room-links-menu a:hover, .room-links-menu #togglePublicName:hover { background: var(--raised); }
.room-invitation .room-links-menu #togglePublicName,
.party-controller .room-links-menu #togglePublicName,
[data-desktop="true"] .room-links-menu #togglePublicName,
[data-desktop-join="true"] .room-links-menu #togglePublicName { display: none; }
body:not(.room-invitation):not(.party-controller):not(.show-public-name):not([data-desktop="true"]):not([data-desktop-join="true"]) .together-shell > #publicNameForm { display: none; }
.party-hub-active .together-shell > .page-heading { display: none; }
.together-shell:has(> #roomPanel:not([hidden])) > .page-heading { display: none; }
.together-shell > #publicNameForm { align-items: center; margin: 8px 0; }
.together-shell > #publicNameForm label { flex-direction: row; align-items: center; min-width: 0; }
.together-shell > #publicNameForm input { min-width: 0; }

@media (max-width: 640px) {
  .setup-panel > .party-lobby-entry { align-items: stretch; }
  .party-lobby-entry .divider-word { display: none; }
  .page-header { flex-wrap: wrap; gap: 8px; align-items: center; }
  .page-header > .vm-workspace-nav { order: 1; width: 100%; margin-right: 0; }
  .page-header #connectionBadge { display: none; }
  .page-header #accountLink { display: block; max-width: 114px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .together-shell:has(#setupPanel:not([hidden]) #signInNotice:not([hidden])) #accountLink { display: none; }
  .page-heading { margin: 14px 0; }
  #loungeWelcome { display: none; }
}
