:root {
  --font-main: "Montserrat", "Onest", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-display: "Montserrat", "Onest", system-ui, sans-serif;
  --bg: #1b1722;
  --bg-deep: #14111a;
  --surface: rgba(36, 31, 44, .96);
  --surface-2: #2d2636;
  --surface-3: #3a3147;
  --chip: #443951;
  --line: rgba(235, 225, 246, .16);
  --text: #fffaff;
  --muted: #c9bdd7;
  --soft: #e4dced;
  --accent: #9b6cff;
  --accent-2: #7a4ee6;
  --accent-3: #d3c4ff;
  --warm: #ffc96b;
  --green: #28d67d;
  --red: #ff5b68;
  --radius-xl: 18px;
  --radius-lg: 14px;
  --radius-md: 10px;
  --shadow-xl: 0 18px 44px rgba(8, 6, 14, .26);
  --shadow-md: 0 12px 28px rgba(8, 6, 14, .2);
}

/* Last mobile header lock: logo + navigation + account button fit in one row. */
@media (max-width: 920px) {
  body {
    padding-top: calc(70px + env(safe-area-inset-top)) !important;
  }

  .topbar {
    position: fixed !important;
    inset: calc(8px + env(safe-area-inset-top)) 8px auto 8px !important;
    z-index: 1200 !important;
    display: grid !important;
    grid-template-columns: 34px minmax(0, 1fr) 54px !important;
    gap: 6px !important;
    align-items: center !important;
    width: calc(100dvw - 16px) !important;
    max-width: calc(100dvw - 16px) !important;
    height: 56px !important;
    min-height: 56px !important;
    padding: 7px 8px !important;
    overflow: hidden !important;
    border-radius: 12px !important;
  }

  .topbar .brand {
    display: grid !important;
    width: 34px !important;
    height: 42px !important;
    place-items: center !important;
    padding: 0 !important;
  }

  .topbar .brand img {
    width: 26px !important;
    height: 26px !important;
  }

  .topbar .brand span,
  .topbar__logout,
  .topbar__actions .button:not(.button--profile) {
    display: none !important;
  }

  .topbar__nav {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 2px !important;
    width: 100% !important;
    height: 42px !important;
    padding: 0 !important;
    overflow: hidden !important;
    border: 0 !important;
    background: transparent !important;
  }

  .topbar__actions {
    display: grid !important;
    width: 54px !important;
    height: 42px !important;
    padding: 0 !important;
    overflow: hidden !important;
  }

  .topbar__nav a,
  .topbar .button--profile {
    display: grid !important;
    grid-template-rows: 18px 12px !important;
    align-content: center !important;
    justify-items: center !important;
    gap: 2px !important;
    width: 100% !important;
    height: 42px !important;
    min-height: 42px !important;
    padding: 4px 2px !important;
    border: 0 !important;
    border-radius: 9px !important;
    background: transparent !important;
    box-shadow: none !important;
    color: rgba(239, 232, 250, .78) !important;
    text-align: center !important;
  }

  .topbar__nav a.is-active,
  .topbar__nav a:hover,
  .topbar__nav a:focus-visible,
  .topbar .button--profile:hover,
  .topbar .button--profile:focus-visible {
    background: rgba(255, 255, 255, .08) !important;
    color: #fff !important;
  }

  .topbar__nav img.nav-icon,
  .topbar .button--profile img.nav-icon,
  .topbar .button--profile .profile-mini-avatar {
    display: block !important;
    width: 17px !important;
    height: 17px !important;
    min-width: 17px !important;
    min-height: 17px !important;
    border-radius: 7px !important;
    object-fit: cover !important;
  }

  .topbar__nav a span,
  .topbar .button--profile > span:not(.profile-mini-avatar) {
    display: block !important;
    width: 100% !important;
    overflow: hidden !important;
    font-size: 8.5px !important;
    font-weight: 600 !important;
    line-height: 1 !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }
}

.profile-mini-avatar,
.chat-message__avatar,
.participant-chip__avatar,
.participant-row__avatar img {
  display: inline-grid;
  place-items: center;
  overflow: hidden;
  flex: 0 0 auto;
  background: #8b5cf6;
  color: #fff;
  text-transform: uppercase;
}

.profile-mini-avatar {
  width: 24px;
  height: 24px;
  border-radius: 9px;
  object-fit: cover;
  font-size: 12px;
  font-weight: 700;
}

.chat-message__avatar {
  position: absolute;
  top: 10px;
  left: 12px;
  width: 28px;
  height: 28px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 700;
}

.chat-message__avatar img,
.participant-chip__avatar img,
.participant-row__avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.chat-message:not(.chat-message--system):not(.chat-message--own) {
  padding-left: 48px;
}

.chat-message--own .chat-message__avatar {
  right: 12px;
  left: auto;
}

.chat-message--own:not(.chat-message--system) {
  padding-right: 48px;
}

* {
  box-sizing: border-box;
}

html {
  color-scheme: dark;
  scroll-behavior: smooth;
  width: 100%;
  max-width: 100%;
  overflow-x: clip;
}

body {
  margin: 0;
  min-width: 320px;
  width: 100%;
  max-width: 100%;
  min-height: 100vh;
  overflow-x: clip;
  color: var(--text);
  font-family: var(--font-main);
  line-height: 1.4;
  background: var(--bg-deep);
  -webkit-font-smoothing: antialiased;
}

body.theme-light {
  --bg: #f4f0fb;
  --bg-deep: #ebe5f5;
  --surface: rgba(255, 255, 255, .94);
  --surface-2: #f7f2ff;
  --surface-3: #eee5fb;
  --chip: #e6dcf6;
  --line: rgba(82, 62, 120, .16);
  --text: #17121f;
  --muted: #675b76;
  --soft: #372d46;
  color-scheme: light;
  background: var(--bg-deep);
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
}

button,
input,
textarea {
  font: inherit;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  isolation: isolate;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  width: min(1560px, calc(100% - 32px));
  margin: 16px auto 0;
  padding: 12px 14px;
  border: 1px solid rgba(226, 214, 255, .1);
  border-radius: 10px;
  background: rgba(27, 23, 34, .86);
  backdrop-filter: blur(24px) saturate(150%);
  box-shadow: 0 22px 70px rgba(0, 0, 0, .28);
}

.topbar::before {
  content: "";
  position: absolute;
  inset: 1px;
  z-index: -1;
  border-radius: inherit;
  background: rgba(255, 255, 255, .035);
  pointer-events: none;
}

.topbar::after {
  content: "";
  position: absolute;
  left: 28px;
  right: 28px;
  bottom: 0;
  height: 1px;
  background: rgba(211, 196, 255, .32);
  opacity: .72;
  pointer-events: none;
}

.brand,
.topbar nav,
.topbar__actions,
.button,
.meta-line,
.room-row__meta,
.access,
.room-toolbar,
.room-toolbar__actions,
.section-title,
.copy-row,
.stat-row,
.source-strip {
  display: flex;
  align-items: center;
}

.brand {
  flex: 0 0 auto;
  gap: 12px;
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  padding: 7px 12px 7px 8px;
  border-radius: 10px;
  transition: background .18s ease, transform .18s ease, color .18s ease;
}

.brand:hover {
  background: rgba(255, 255, 255, .05);
  transform: translateY(-1px);
}

.brand img {
  width: 38px;
  height: 38px;
  object-fit: contain;
  filter: drop-shadow(0 8px 18px rgba(139, 92, 246, .22));
}

.topbar__nav {
  flex: 1 1 auto;
  justify-content: center;
  gap: clamp(18px, 3vw, 44px);
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.topbar__nav a {
  position: relative;
  flex: 0 0 auto;
  padding: 13px 2px;
  border-radius: 0;
  color: rgba(217, 204, 239, .72);
  font-size: 14px;
  font-weight: 600;
  text-align: center;
  white-space: nowrap;
  transition: color .18s ease, opacity .18s ease, transform .18s ease;
}

.topbar__nav a .nav-icon,
.button--profile {
  display: none;
}

.ui-icon,
.nav-icon,
.quick-action-card img,
.chat-collapse-button img,
.chat-reply-action img,
.chat-status img,
.chat-emoji-button img,
.settings-sheet__head button img,
.participant-sheet__head button img,
.chat-reply-draft button img {
  display: block;
  width: 18px;
  height: 18px;
  object-fit: contain;
}

.topbar__nav a::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 6px;
  width: 0;
  height: 1px;
  border-radius: 999px;
  background: #fff;
  opacity: 0;
  transform: translateX(-50%);
  transition: width .18s ease, opacity .18s ease;
}

.topbar__nav a:hover,
.topbar__nav a.is-active {
  color: var(--text);
  transform: translateY(-1px);
}

.topbar__nav a:hover::after,
.topbar__nav a.is-active::after {
  width: 26px;
  opacity: 1;
}

.topbar__actions {
  position: static;
  flex: 0 0 auto;
  gap: 12px;
  margin-left: 10px;
  padding-right: 4px;
}

.topbar__logout {
  display: flex;
  margin: 0;
}

.topbar__actions .button {
  min-height: 48px;
  padding: 0 24px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 700;
}

main {
  width: min(1560px, calc(100% - 32px));
  max-width: 100%;
  margin: 0 auto;
  padding: 28px 0 54px;
  overflow-x: clip;
  animation: content-reveal .28s cubic-bezier(.2, .9, .2, 1) both;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 16px;
  font-family: var(--font-display);
  font-size: clamp(36px, 6vw, 68px);
  line-height: 1.02;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 10px;
  font-family: var(--font-display);
  font-size: 25px;
  line-height: 1.2;
}

h3 {
  margin-bottom: 8px;
  font-size: 17px;
}

p {
  color: var(--muted);
}

.kicker {
  margin-bottom: 12px;
  color: var(--warm);
  font-size: 13px;
  font-weight: 900;
}

.button {
  min-height: 46px;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-3);
  color: var(--text);
  font-weight: 900;
  cursor: pointer;
  transition: transform .16s ease, box-shadow .18s ease, border-color .18s ease, background .18s ease;
}

.button:hover {
  border-color: rgba(196, 181, 253, .44);
  background: #3a2e52;
  transform: translateY(-1px);
}

.button:active {
  transform: translateY(0) scale(.98);
}

.button:focus-visible,
input:focus-visible,
textarea:focus-visible,
a:focus-visible {
  outline: 2px solid var(--accent-3);
  outline-offset: 2px;
}

.button--primary {
  border: 0;
  background: var(--accent);
  color: #fff;
  box-shadow: 0 12px 28px rgba(139, 92, 246, .28);
}

.button--primary:hover {
  background: #7c3aed;
}

.button--secondary {
  border-color: rgba(196, 181, 253, .22);
  background: rgba(139, 92, 246, .14);
  color: #eadfff;
}

.button--ghost {
  background: rgba(255, 255, 255, .04);
}

.button--login {
  border-color: rgba(226, 214, 255, .18);
  background: rgba(255, 255, 255, .06);
  color: #fff;
  box-shadow: none;
}

.button--login:hover {
  border-color: rgba(226, 214, 255, .32);
  background: rgba(255, 255, 255, .1);
  box-shadow: 0 12px 28px rgba(0, 0, 0, .2);
}

.button--create {
  border-color: rgba(196, 181, 253, .28);
  background: #8b5cf6;
  color: #fff;
  box-shadow: 0 14px 32px rgba(139, 92, 246, .26);
}

.button--create:hover {
  border-color: rgba(226, 214, 255, .38);
  background: #7c3aed;
  box-shadow: 0 18px 38px rgba(139, 92, 246, .32);
}

.button--danger {
  border-color: rgba(255, 91, 104, .34);
  background: rgba(255, 91, 104, .1);
  color: #ffc8ce;
}

.button--small {
  min-height: 40px;
  padding: 9px 14px;
  border-radius: 10px;
  font-size: 12px;
}

.button--full,
.button--submit {
  width: 100%;
}

.panel,
.empty-state,
.room-tile,
.about-panel,
.player-panel,
.browser-frame-wrap {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-md);
}

.home-hero {
  position: relative;
  display: grid;
  min-height: min(760px, calc(100svh - 170px));
  overflow: hidden;
  align-items: end;
  padding: clamp(28px, 5vw, 72px);
  border: 1px solid rgba(226, 214, 255, .1);
  border-radius: 10px;
  background: #0b0910;
  box-shadow: 0 26px 70px rgba(0, 0, 0, .34);
  isolation: isolate;
  contain: paint;
  clip-path: inset(0 round 10px);
}

.home-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: rgba(20, 17, 26, .58);
  animation: hero-breathe 7s ease-in-out infinite;
  pointer-events: none;
}

.home-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background-image: var(--hero-bg);
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  transform: scale(1.001);
  pointer-events: none;
}

.home-hero__content {
  position: relative;
  z-index: 2;
  display: grid;
  width: min(790px, 100%);
  gap: 24px;
  animation: home-rise .58s cubic-bezier(.2, .9, .2, 1) .06s both;
  text-shadow: 0 2px 28px rgba(0, 0, 0, .46);
}

.home-hero__content h1 {
  margin: 0;
  font-size: clamp(44px, 7.4vw, 104px);
  font-weight: 800;
  line-height: .94;
  text-wrap: balance;
}

.home-hero__content p {
  max-width: 720px;
  margin: 0;
  color: rgba(239, 232, 250, .82);
  font-size: clamp(16px, 1.5vw, 20px);
  line-height: 1.68;
}

.home-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.home-hero__facts {
  position: absolute;
  z-index: 2;
  right: clamp(22px, 4vw, 58px);
  bottom: clamp(22px, 4vw, 58px);
  display: grid;
  gap: 10px;
  width: min(270px, calc(100% - 44px));
  animation: home-rise .58s cubic-bezier(.2, .9, .2, 1) .16s both;
}

.home-hero__facts span {
  padding: 12px 0;
  border-bottom: 1px solid rgba(226, 214, 255, .18);
  color: rgba(255, 255, 255, .82);
  font-size: 14px;
  font-weight: 600;
  transition: color .18s ease, transform .18s ease, border-color .18s ease;
}

.home-hero__facts span:hover {
  border-color: rgba(196, 181, 253, .5);
  color: #fff;
  transform: translateX(4px);
}

.home-story {
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(320px, .62fr);
  gap: clamp(28px, 5vw, 76px);
  align-items: start;
  padding: clamp(54px, 8vw, 108px) clamp(6px, 2vw, 24px);
}

.home-story h2 {
  max-width: 720px;
  margin-bottom: 18px;
  font-size: clamp(32px, 4.8vw, 64px);
  font-weight: 800;
  line-height: 1;
  text-wrap: balance;
}

.home-story p {
  max-width: 680px;
  margin: 0;
  color: rgba(217, 204, 239, .78);
  font-size: 17px;
  line-height: 1.72;
}

.home-story__list {
  display: grid;
  gap: 0;
  border-top: 1px solid rgba(226, 214, 255, .12);
}

.home-story__list p {
  padding: 20px 0;
  border-bottom: 1px solid rgba(226, 214, 255, .12);
  transition: color .18s ease, transform .18s ease;
}

.home-story__list p:hover {
  color: #fff;
  transform: translateX(4px);
}

.home-story__list strong {
  color: #fff;
  font-weight: 700;
}

.home-open-rooms {
  margin-top: 18px;
}

.home-room-strip {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
}

.home-room-mini {
  display: grid;
  gap: 8px;
  overflow: hidden;
  padding: 10px;
  border: 1px solid rgba(226, 214, 255, .1);
  border-radius: 10px;
  background: rgba(45, 38, 54, .72);
  transition: border-color .16s ease, transform .16s ease;
}

.home-room-mini:hover {
  border-color: rgba(196, 181, 253, .32);
  transform: translateY(-2px);
}

.home-room-mini img,
.home-room-mini div {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 8px;
  object-fit: cover;
  background: rgba(34, 29, 41, .8);
}

.home-room-mini strong {
  min-width: 0;
  overflow: hidden;
  color: #fff;
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.home-room-mini span {
  color: var(--muted);
  font-size: 12px;
}

.home-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  padding-top: 18px;
}

.home-action {
  padding: 24px;
  transition: transform .16s ease, border-color .18s ease, box-shadow .18s ease;
}

.home-action:hover {
  border-color: rgba(196, 181, 253, .34);
  box-shadow: 0 18px 42px rgba(139, 92, 246, .18);
  transform: translateY(-3px);
}

.home-action span {
  color: var(--warm);
  font-weight: 900;
}

.site-footer {
  display: grid;
  width: min(1560px, calc(100% - 32px));
  margin: 20px auto 34px;
  gap: 24px;
  padding: 34px 0 24px;
  border-top: 1px solid rgba(226, 214, 255, .1);
  color: rgba(217, 204, 239, .58);
}

.site-footer__top {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
}

.site-footer__logo,
.site-footer__social {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: rgba(255, 255, 255, .72);
  font-size: 14px;
  font-weight: 700;
  transition: color .16s ease, opacity .16s ease, transform .16s ease;
}

.site-footer__logo img {
  width: 30px;
  height: 30px;
  object-fit: contain;
  opacity: .72;
}

.site-footer__social {
  justify-content: center;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 1px solid rgba(226, 214, 255, .08);
  border-radius: 999px;
  background: rgba(255, 255, 255, .035);
}

.site-footer__social img {
  width: 20px;
  height: 20px;
  opacity: .58;
  filter: grayscale(1) brightness(.82) sepia(1) saturate(1.25) hue-rotate(215deg);
}

.site-footer__social:hover img {
  opacity: .86;
  filter: grayscale(.35) brightness(1) sepia(.55) saturate(1.65) hue-rotate(215deg);
}

.site-footer__logo:hover,
.site-footer__social:hover {
  color: rgba(255, 255, 255, .9);
  transform: translateY(-1px);
}

.site-footer__links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px 26px;
}

.site-footer__links a,
.site-footer__links button {
  color: rgba(217, 204, 239, .54);
  font-size: 13px;
  font-weight: 600;
}

.site-footer__notice {
  width: min(1040px, 100%);
  margin: 0 auto;
  color: rgba(217, 204, 239, .46);
  font-size: 12px;
  line-height: 1.7;
  text-align: center;
}

.site-footer__bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 20px;
  border-top: 1px solid rgba(226, 214, 255, .08);
  color: rgba(217, 204, 239, .42);
  font-size: 12px;
}

.site-footer a,
.site-footer button {
  border: 0;
  background: transparent;
  cursor: pointer;
  transition: color .16s ease, transform .16s ease;
}

.site-footer a:hover,
.site-footer button:hover,
.site-footer a:focus-visible,
.site-footer button:focus-visible {
  color: rgba(255, 255, 255, .86);
  transform: translateY(-1px);
}

.cookie-modal {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  place-items: end center;
  padding: 24px;
  background: rgba(5, 4, 8, .46);
  opacity: 0;
  backdrop-filter: blur(12px);
  transition: opacity .18s ease;
}

.cookie-modal[hidden] {
  display: none;
}

.cookie-modal.is-open {
  opacity: 1;
}

.cookie-modal__dialog {
  position: relative;
  display: grid;
  width: min(620px, 100%);
  gap: 14px;
  padding: 26px;
  border: 1px solid rgba(226, 214, 255, .16);
  border-radius: 10px;
  background: rgba(36, 30, 44, .96);
  box-shadow: 0 26px 70px rgba(0, 0, 0, .42);
  transform: translateY(18px);
  transition: transform .18s ease;
}

.cookie-modal.is-open .cookie-modal__dialog {
  transform: translateY(0);
}

.cookie-modal__dialog h2 {
  margin: 0;
  font-size: 28px;
}

.cookie-modal__dialog p {
  margin: 0;
  color: rgba(217, 204, 239, .8);
  font-size: 15px;
  line-height: 1.62;
}

.cookie-modal__close {
  position: absolute;
  top: 14px;
  right: 14px;
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border: 1px solid rgba(226, 214, 255, .12);
  border-radius: 10px;
  background: rgba(255, 255, 255, .04);
  color: #fff;
  cursor: pointer;
  font-size: 22px;
  line-height: 1;
  transition: background .16s ease, transform .16s ease;
}

.cookie-modal__close:hover {
  background: rgba(255, 255, 255, .08);
  transform: translateY(-1px);
}

.cookie-modal__close img,
.auth-modal__close img {
  width: 17px;
  height: 17px;
}

.cookie-modal__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 4px;
}

.auth-modal {
  position: fixed;
  inset: 0;
  z-index: 130;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(5, 4, 8, .58);
  opacity: 0;
  backdrop-filter: blur(14px);
  transition: opacity .18s ease;
}

.auth-modal[hidden] {
  display: none;
}

.auth-modal.is-open {
  opacity: 1;
}

.auth-modal__dialog {
  position: relative;
  display: grid;
  width: min(430px, 100%);
  overflow: hidden;
  border: 1px solid rgba(226, 214, 255, .14);
  border-radius: 10px;
  background: rgba(14, 11, 21, .96);
  box-shadow: 0 30px 90px rgba(0, 0, 0, .48);
  transform: translateY(16px) scale(.98);
  transition: transform .18s ease;
}

.auth-modal.is-open .auth-modal__dialog {
  transform: translateY(0) scale(1);
}

.auth-modal__art {
  width: 100%;
  height: 214px;
  padding: 6px 10px 0;
  object-fit: contain;
  background: rgba(27, 23, 34, .5);
  opacity: .82;
  filter: saturate(.92) brightness(.82);
}

.auth-modal__close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border: 1px solid rgba(226, 214, 255, .14);
  border-radius: 10px;
  background: rgba(6, 5, 10, .58);
  color: #fff;
  cursor: pointer;
  font-size: 22px;
  line-height: 1;
  backdrop-filter: blur(10px);
  transition: background .16s ease, transform .16s ease;
}

.auth-modal__close:hover {
  background: rgba(139, 92, 246, .18);
  transform: translateY(-1px);
}

.auth-view {
  display: grid;
  gap: 14px;
  padding: 24px;
}

.auth-view[hidden] {
  display: none;
}

.auth-view h2 {
  justify-self: center;
  margin: 0;
  font-size: 30px;
  line-height: 1.05;
  text-align: center;
}

.auth-view p {
  max-width: 330px;
  margin: 0;
  color: rgba(217, 204, 239, .74);
  font-size: 14px;
  line-height: 1.55;
  text-align: center;
  justify-self: center;
}

.auth-view form {
  display: grid;
  gap: 10px;
  margin-top: 4px;
}

.auth-form-error {
  justify-self: stretch !important;
  max-width: none !important;
  min-height: 38px;
  margin: 0 0 2px !important;
  padding: 10px 12px;
  border: 1px solid rgba(248, 113, 113, .32);
  border-radius: 10px;
  background: rgba(127, 29, 29, .18);
  color: #fecaca !important;
  font-size: 13px !important;
  font-weight: 700;
  line-height: 1.35 !important;
  text-align: left !important;
}

.auth-form-error[hidden] {
  display: none !important;
}

.auth-view form.has-error input:focus-visible {
  border-color: rgba(248, 113, 113, .44);
  box-shadow: 0 0 0 4px rgba(248, 113, 113, .12);
}

.auth-view form > .button[type="submit"] {
  margin-top: 10px;
}

.auth-view label {
  color: rgba(239, 232, 250, .82);
  font-size: 13px;
  font-weight: 700;
}

.auth-view input {
  width: 100%;
  min-height: 48px;
  padding: 0 14px;
  border: 1px solid rgba(226, 214, 255, .12);
  border-radius: 10px;
  background: rgba(6, 5, 10, .74);
  color: #fff;
  outline: 0;
  transition: border-color .16s ease, box-shadow .16s ease, background .16s ease;
}

.auth-password {
  position: relative;
}

.auth-password input {
  padding-right: 52px;
}

.auth-password button {
  position: absolute;
  top: 50%;
  right: 6px;
  display: grid;
  width: 38px;
  height: 38px;
  min-height: 38px;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: rgba(217, 204, 239, .54);
  cursor: pointer;
  transform: translateY(-50%);
  transition: background .16s ease, color .16s ease;
}

.auth-password button:hover {
  background: rgba(255, 255, 255, .05);
  color: rgba(255, 255, 255, .78);
}

.auth-password__icon {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.auth-password__icon--visible,
.auth-password button.is-visible .auth-password__icon--hidden {
  display: none;
}

.auth-password button.is-visible .auth-password__icon--visible {
  display: block;
}

.auth-strength {
  display: grid;
  gap: 7px;
  margin-top: -2px;
}

.auth-strength span {
  position: relative;
  display: block;
  height: 5px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(226, 214, 255, .1);
}

.auth-strength span::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 12%;
  border-radius: inherit;
  background: rgba(217, 204, 239, .42);
  transition: width .18s ease, background .18s ease;
}

.auth-strength b {
  color: rgba(217, 204, 239, .66);
  font-size: 12px;
  font-weight: 600;
}

.auth-strength[data-strength="1"] span::before {
  width: 28%;
  background: #fb7185;
}

.auth-strength[data-strength="2"] span::before {
  width: 52%;
  background: #fbbf24;
}

.auth-strength[data-strength="3"] span::before {
  width: 76%;
  background: #a78bfa;
}

.auth-strength[data-strength="4"] span::before {
  width: 100%;
  background: #34d399;
}

.auth-view input:focus-visible {
  border-color: rgba(196, 181, 253, .44);
  background: rgba(31, 26, 38, .86);
  box-shadow: 0 0 0 4px rgba(139, 92, 246, .12);
}

.auth-code-panel {
  position: relative;
  display: grid;
  gap: 14px;
  padding: 18px;
  overflow: hidden;
  border: 1px solid rgba(196, 181, 253, .14);
  border-radius: 14px;
  background: rgba(31, 26, 38, .62);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06);
}

.auth-code-panel::before {
  content: "";
  position: absolute;
  top: 18px;
  right: 18px;
  width: 42px;
  height: 42px;
  border-radius: 13px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .16), rgba(255, 255, 255, 0)),
    rgba(139, 92, 246, .24);
}

.auth-code-panel::after {
  content: "";
  position: absolute;
  top: 31px;
  right: 31px;
  width: 16px;
  height: 12px;
  border-right: 2px solid #fff;
  border-bottom: 2px solid #fff;
  transform: rotate(45deg);
}

.auth-code-panel > strong {
  position: relative;
  z-index: 1;
  max-width: calc(100% - 54px);
  color: #fff;
  font-size: 18px;
  font-weight: 800;
  line-height: 1.2;
  text-wrap: balance;
}

.auth-code-panel > strong span {
  color: #bfa7ff;
}

.auth-code-panel > p {
  position: relative;
  z-index: 1;
  margin: 0;
  color: rgba(217, 204, 239, .68);
  font-size: 13px;
  line-height: 1.45;
  text-align: left;
}

.auth-code-cells {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
}

.auth-code-cells input {
  width: 100%;
  min-width: 0;
  height: 58px;
  padding: 0;
  border: 1px solid rgba(196, 181, 253, .2);
  border-radius: 12px;
  background: rgba(8, 6, 12, .7);
  color: #fff;
  font-size: 24px;
  font-weight: 800;
  line-height: 1;
  text-align: center;
  outline: 0;
  transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease, background .16s ease;
}

.auth-code-cells input:focus {
  border-color: rgba(191, 167, 255, .72);
  background: rgba(49, 39, 66, .82);
  box-shadow: 0 0 0 4px rgba(139, 92, 246, .16);
  transform: translateY(-1px);
}

.auth-code-cells input.is-filled {
  border-color: rgba(191, 167, 255, .58);
  background: rgba(139, 92, 246, .2);
}

.auth-code-cells.is-invalid input,
.auth-code-cells input.is-invalid {
  border-color: rgba(255, 91, 104, .66);
  background: rgba(255, 91, 104, .12);
  animation: auth-code-shake .26s ease;
}

.auth-code-cells input.is-bump {
  animation: auth-code-bump .18s ease-out;
}

@keyframes auth-code-bump {
  0% { transform: scale(.94); }
  70% { transform: scale(1.05); }
  100% { transform: scale(1); }
}

@keyframes auth-code-shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-4px); }
  75% { transform: translateX(4px); }
}

.auth-code-resend {
  position: relative;
  z-index: 1;
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  min-height: 46px;
  padding: 10px 12px;
  border: 1px solid rgba(196, 181, 253, .14);
  border-radius: 12px;
  background: rgba(255, 255, 255, .04);
}

.auth-code-resend span {
  color: rgba(217, 204, 239, .64);
  font-size: 12px;
}

.auth-code-resend button {
  flex: 0 0 auto;
  border: 0;
  background: transparent;
  color: #fff;
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  transition: color .16s ease, transform .16s ease;
}

.auth-code-resend button:hover {
  color: #cdbbff;
  transform: translateY(-1px);
}

.auth-resend-form {
  margin-top: -4px !important;
}

.auth-resend-button {
  width: 100%;
  min-height: 42px;
  border: 1px solid rgba(226, 214, 255, .12);
  border-radius: 10px;
  background: rgba(255, 255, 255, .045);
  color: rgba(239, 232, 250, .9);
  cursor: pointer;
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  transition: background .16s ease, border-color .16s ease, color .16s ease, transform .16s ease, opacity .16s ease;
}

.auth-resend-button:disabled {
  cursor: not-allowed;
  opacity: .42;
}

.auth-resend-button.is-ready:hover,
.auth-resend-button.is-ready:focus-visible {
  border-color: rgba(196, 181, 253, .34);
  background: rgba(139, 92, 246, .16);
  color: #fff;
  transform: translateY(-1px);
}

.auth-switch {
  justify-self: center;
  border: 0;
  background: transparent;
  color: rgba(226, 214, 255, .76);
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  transition: color .16s ease, transform .16s ease;
}

.auth-switch:hover {
  color: #fff;
  transform: translateY(-1px);
}

.auth-forgot {
  justify-self: end;
  margin-top: -4px;
  border: 0;
  background: transparent;
  color: rgba(196, 181, 253, .86);
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  transition: color .16s ease, transform .16s ease;
}

.auth-forgot:hover,
.auth-forgot:focus-visible {
  color: #fff;
  transform: translateY(-1px);
}

.page-hero {
  position: relative;
  display: grid;
  min-height: 520px;
  overflow: hidden;
  align-items: end;
  margin-bottom: clamp(28px, 4vw, 54px);
  padding: clamp(28px, 5vw, 64px);
  border: 1px solid rgba(226, 214, 255, .1);
  border-radius: 10px;
  background: #0b0910;
  box-shadow: 0 26px 70px rgba(0, 0, 0, .3);
  isolation: isolate;
  contain: paint;
  clip-path: inset(0 round 10px);
}

.page-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: rgba(20, 17, 26, .6);
  pointer-events: none;
}

.page-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background-image: var(--hero-bg);
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  transform: scale(1.001);
  pointer-events: none;
}

.page-hero--rooms {
  --hero-bg: url("/static/assets/background/photo-1440404653325-ab127d49abc1.avif");
}

.page-hero--about {
  --hero-bg: url("/static/assets/background/photo-1524985069026-dd778a71c7b4.avif");
}

.page-hero__copy {
  position: relative;
  z-index: 2;
  display: grid;
  width: min(820px, 100%);
  gap: 22px;
  animation: home-rise .5s cubic-bezier(.2, .9, .2, 1) both;
  text-shadow: 0 2px 28px rgba(0, 0, 0, .46);
}

.page-hero__copy h1 {
  margin: 0;
  font-size: clamp(42px, 6.2vw, 88px);
  font-weight: 800;
  line-height: .96;
  text-wrap: balance;
}

.page-hero__copy p {
  max-width: 740px;
  margin: 0;
  color: rgba(239, 232, 250, .82);
  font-size: clamp(16px, 1.35vw, 19px);
  line-height: 1.68;
}

.page-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.page-hero__facts {
  position: absolute;
  z-index: 2;
  right: clamp(22px, 4vw, 58px);
  bottom: clamp(22px, 4vw, 58px);
  display: grid;
  width: min(310px, calc(100% - 44px));
  gap: 0;
}

.page-hero__facts span {
  padding: 13px 0;
  border-bottom: 1px solid rgba(226, 214, 255, .18);
  color: rgba(255, 255, 255, .82);
  font-size: 14px;
  font-weight: 600;
  transition: color .18s ease, transform .18s ease, border-color .18s ease;
}

.page-hero__facts span:hover {
  border-color: rgba(196, 181, 253, .5);
  color: #fff;
  transform: translateX(4px);
}

.rooms-section {
  display: grid;
  gap: 18px;
}

.section-title--quiet {
  padding: 0 4px;
}

.page-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 20px;
}

.page-heading p {
  max-width: 700px;
  margin-bottom: 0;
}

.rooms-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 14px;
}

.room-tile {
  border-radius: 10px;
  overflow: hidden;
  background: rgba(14, 12, 22, .84);
  transition: transform .16s ease, border-color .18s ease, background .18s ease;
}

.room-tile:hover {
  border-color: rgba(196, 181, 253, .34);
  background: rgba(24, 18, 36, .9);
  transform: translateY(-3px);
}

.room-tile__media {
  position: relative;
  overflow: hidden;
  background: #08070d;
}

.room-tile__media > img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.room-tile__online {
  position: absolute;
  top: 10px;
  right: 10px;
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 4px 8px;
  border: 1px solid rgba(251, 146, 60, .36);
  border-radius: 999px;
  background: rgba(67, 25, 12, .86);
  color: #fb923c;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
}

.room-tile__placeholder {
  display: grid;
  place-items: center;
  width: 100%;
  aspect-ratio: 16 / 9;
  padding: 18px;
  background: rgba(45, 38, 54, .96);
  color: var(--muted);
  font-weight: 800;
  text-align: center;
}

.room-tile__body {
  display: grid;
  gap: 8px;
  padding: 13px 13px 14px;
}

.room-tile__body h2 {
  margin: 0;
  color: #fff;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.16;
}

.room-tile__body p {
  display: -webkit-box;
  min-height: 33px;
  margin: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.3;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.room-tile__details {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: rgba(196, 181, 253, .76);
  font-size: 12px;
  line-height: 1.2;
}

.room-tile__details span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.room-tile__details time {
  color: rgba(226, 214, 255, .56);
  font-variant-numeric: tabular-nums;
}

.meta-line,
.room-row__meta {
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.meta-line img,
.room-row__meta img {
  width: 22px;
  height: 22px;
  border-radius: 8px;
  object-fit: cover;
}

.meta-line b,
.access {
  min-height: 25px;
  padding: 4px 9px;
  border-radius: 999px;
  background: rgba(33, 209, 120, .14);
  color: #81efac;
  font-size: 12px;
}

.access--closed {
  background: rgba(255, 201, 107, .16);
  color: #ffd58a;
}

.tile-actions,
.room-card__actions,
.room-row__actions {
  display: grid;
  gap: 8px;
  margin-top: 4px;
}

.tile-actions form,
.room-card__actions form,
.room-row__actions form,
.danger-form {
  margin: 0;
}

.empty-state {
  display: grid;
  place-items: center;
  min-height: 330px;
  padding: 30px;
  text-align: center;
}

.empty-state img {
  width: 78px;
  margin-bottom: 14px;
}

.about-layout {
  display: grid;
  grid-template-columns: minmax(0, .95fr) minmax(320px, .56fr);
  gap: 18px;
}

.about-layout--hero {
  align-items: stretch;
}

.about-copy,
.about-panel {
  padding: clamp(28px, 5vw, 48px);
}

.about-copy {
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: rgba(36, 31, 44, .92);
  box-shadow: var(--shadow-xl);
}

.about-copy p {
  max-width: 700px;
}

.about-panel {
  display: grid;
  gap: 12px;
}

.about-panel div {
  padding: 17px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, .04);
}

.about-panel strong,
.about-panel span {
  display: block;
}

.about-panel span {
  margin-top: 4px;
  color: var(--muted);
}

.about-section {
  margin-top: 18px;
}

.about-wide {
  padding: 22px;
  border: 1px solid rgba(226, 214, 255, .1);
  border-radius: var(--radius-lg);
  background: rgba(45, 38, 54, .6);
}

.about-feature-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.about-feature-list article {
  display: grid;
  gap: 9px;
  padding: 18px;
  border: 1px solid rgba(226, 214, 255, .1);
  border-radius: var(--radius-md);
  background: rgba(28, 24, 34, .32);
}

.about-feature-list strong {
  color: #fff;
  font-size: 17px;
}

.about-feature-list span {
  color: var(--muted);
  line-height: 1.55;
}

.about-steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.about-steps div,
.about-card,
.about-tech {
  border: 1px solid rgba(226, 214, 255, .1);
  border-radius: var(--radius-lg);
  background: rgba(45, 38, 54, .72);
  box-shadow: var(--shadow-md);
}

.about-steps div {
  display: grid;
  gap: 8px;
  padding: 18px;
}

.about-steps b {
  color: var(--accent-3);
  font-size: 13px;
}

.about-steps strong {
  color: #fff;
  font-size: 17px;
}

.about-steps span {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

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

.about-split {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.about-card {
  padding: 22px;
}

.about-card p {
  line-height: 1.58;
}

.about-card ul {
  display: grid;
  gap: 8px;
  margin: 14px 0 0;
  padding-left: 18px;
  color: var(--soft);
}

.about-card li::marker {
  color: var(--accent-3);
}

.about-roadmap {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.about-roadmap div {
  padding: 22px;
  border: 1px solid rgba(226, 214, 255, .1);
  border-radius: var(--radius-lg);
  background: rgba(45, 38, 54, .72);
  box-shadow: var(--shadow-md);
}

.about-roadmap span {
  display: inline-flex;
  margin-bottom: 10px;
  padding: 6px 9px;
  border-radius: 999px;
  background: rgba(137, 80, 255, .18);
  color: #d8c6ff;
  font-size: 13px;
  font-weight: 700;
}

.about-roadmap p {
  line-height: 1.58;
}

.about-tech {
  display: grid;
  grid-template-columns: minmax(0, .72fr) minmax(320px, .5fr);
  gap: 18px;
  padding: 24px;
}

.about-tech p {
  max-width: 760px;
  line-height: 1.6;
}

.about-tech-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-content: start;
}

.about-tech-list span {
  padding: 8px 10px;
  border: 1px solid rgba(226, 214, 255, .12);
  border-radius: 999px;
  background: rgba(28, 24, 34, .42);
  color: var(--soft);
  font-size: 13px;
}

.about-editorial {
  display: grid;
  grid-template-columns: minmax(0, .88fr) minmax(360px, .62fr);
  gap: clamp(30px, 5vw, 78px);
  align-items: start;
  padding: clamp(42px, 7vw, 96px) clamp(6px, 2vw, 24px);
}

.about-editorial h2,
.about-process h2 {
  max-width: 760px;
  margin-bottom: 18px;
  font-size: clamp(32px, 4.8vw, 64px);
  font-weight: 800;
  line-height: 1;
  text-wrap: balance;
}

.about-editorial p,
.about-process > div p {
  max-width: 720px;
  margin: 0;
  color: rgba(217, 204, 239, .78);
  font-size: 17px;
  line-height: 1.72;
}

.about-editorial__lines {
  display: grid;
  border-top: 1px solid rgba(226, 214, 255, .12);
}

.about-editorial__lines article {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 8px 18px;
  padding: 22px 0;
  border-bottom: 1px solid rgba(226, 214, 255, .12);
  transition: transform .18s ease, color .18s ease;
}

.about-editorial__lines article:hover {
  transform: translateX(4px);
}

.about-editorial__lines span {
  grid-row: 1 / 3;
  color: rgba(196, 181, 253, .74);
  font-size: 13px;
  font-weight: 800;
}

.about-editorial__lines strong {
  color: #fff;
  font-size: 18px;
}

.about-editorial__lines p {
  font-size: 15px;
  line-height: 1.58;
}

.about-process {
  display: grid;
  grid-template-columns: minmax(240px, .42fr) minmax(0, 1fr);
  gap: clamp(24px, 4vw, 64px);
  align-items: start;
  padding: clamp(34px, 5vw, 70px) clamp(6px, 2vw, 24px);
  border-top: 1px solid rgba(226, 214, 255, .1);
}

.about-process ol {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: about-step;
}

.about-process li {
  counter-increment: about-step;
  display: grid;
  grid-template-columns: 54px minmax(0, .7fr) minmax(0, 1fr);
  gap: 18px;
  align-items: baseline;
  padding: 22px 0;
  border-bottom: 1px solid rgba(226, 214, 255, .12);
}

.about-process li::before {
  content: counter(about-step, decimal-leading-zero);
  color: rgba(196, 181, 253, .74);
  font-size: 13px;
  font-weight: 800;
}

.about-process strong {
  color: #fff;
  font-size: 18px;
}

.about-process span {
  color: rgba(217, 204, 239, .78);
  font-size: 15px;
  line-height: 1.56;
}

.page-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.page-head__copy {
  max-width: 760px;
}

.back-link {
  display: inline-grid;
  width: 42px;
  height: 42px;
  place-items: center;
  margin-bottom: 12px;
  border: 1px solid rgba(196, 181, 253, .18);
  border-radius: 10px;
  background: rgba(45, 38, 54, .68);
  color: var(--muted);
  font-size: 28px;
  font-weight: 600;
  line-height: 1;
  transition: background .18s ease, color .18s ease, transform .18s ease;
}

.back-link:hover {
  background: rgba(139, 92, 246, .2);
  color: var(--text);
  transform: translateX(-2px);
}

.alert {
  margin-bottom: 16px;
  padding: 14px 16px;
  border: 1px solid rgba(255, 91, 104, .45);
  border-radius: var(--radius-md);
  background: rgba(255, 91, 104, .11);
  color: #ffc8cd;
}

.create-layout,
.room-shell,
.browser-layout {
  display: grid;
  grid-template-columns: minmax(0, .86fr) minmax(0, 1.14fr);
  gap: 18px;
  align-items: start;
}

.room-shell {
  grid-template-columns: minmax(0, 1fr) minmax(520px, 640px);
  gap: 20px;
}

.browser-layout {
  grid-template-columns: minmax(0, 1fr);
}

.panel {
  padding: 20px;
}

.room-shell .panel,
.player-panel {
  border: 1px solid rgba(196, 181, 253, .13);
  background: rgba(42, 35, 52, .72);
  box-shadow: 0 18px 46px rgba(0, 0, 0, .22);
  backdrop-filter: blur(18px) saturate(135%);
}

.type-list,
.field,
.access-field,
.settings-panel form,
.browser-window form {
  display: grid;
  gap: 12px;
}

.choice-card,
.access-field label,
.toggle-row {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  align-items: center;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: rgba(36, 29, 52, .78);
  cursor: pointer;
}

.choice-card {
  grid-template-columns: auto auto 1fr;
}

.choice-card img {
  width: 58px;
  height: 58px;
  border-radius: 10px;
  object-fit: cover;
}

.choice-card small,
.access-field small,
.field span,
legend {
  display: block;
  color: var(--muted);
}

.field input,
.field textarea,
.copy-row input,
.browser-search input,
.chat-form input {
  width: 100%;
  border: 1px solid rgba(226, 214, 255, .1);
  border-radius: 10px;
  background: rgba(28, 24, 34, .74);
  color: var(--text);
}

.field input,
.browser-search input,
.chat-form input {
  min-height: 46px;
  padding: 0 14px;
}

.field textarea {
  min-height: 112px;
  padding: 13px 14px;
  resize: vertical;
}

fieldset {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

legend {
  margin-bottom: 8px;
  font-weight: 900;
}

.choice-card input,
.access-field input,
.toggle-row input {
  accent-color: var(--accent);
}

.toggle-row input[type="checkbox"] {
  position: relative;
  width: 46px;
  height: 26px;
  appearance: none;
  border: 1px solid rgba(196, 181, 253, .18);
  border-radius: 999px;
  background: rgba(34, 29, 41, .86);
  cursor: pointer;
  transition: background .18s ease, border-color .18s ease;
}

.toggle-row input[type="checkbox"]::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .72);
  box-shadow: 0 4px 12px rgba(0, 0, 0, .28);
  transition: transform .18s ease, background .18s ease;
}

.toggle-row input[type="checkbox"]:checked {
  border-color: rgba(196, 181, 253, .52);
  background: var(--accent);
}

.toggle-row input[type="checkbox"]:checked::after {
  background: #fff;
  transform: translateX(20px);
}

.toggle-row input[type="checkbox"]:focus-visible {
  outline: 2px solid rgba(196, 181, 253, .58);
  outline-offset: 3px;
}

.choice-card input:checked + img {
  border-color: var(--accent-3);
  box-shadow: 0 0 0 3px rgba(196, 181, 253, .18);
}

.create-hero {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 18px;
  align-items: start;
  max-width: 980px;
  margin: 16px 0 28px;
}

.create-hero > div {
  display: grid;
  gap: 10px;
}

.create-hero span {
  color: #a78bfa;
  font-size: 13px;
  font-weight: 800;
}

.create-hero h1 {
  max-width: 760px;
  margin: 0;
  color: #fff;
  font-size: clamp(44px, 6vw, 82px);
  font-weight: 850;
  line-height: .94;
  letter-spacing: 0;
}

.create-hero p {
  max-width: 610px;
  margin: 0;
  color: rgba(217, 204, 239, .78);
  font-size: 16px;
  line-height: 1.55;
}

.back-link--inline {
  margin: 3px 0 0;
}

.create-layout--premium {
  grid-template-columns: minmax(0, .92fr) minmax(360px, .62fr);
  gap: 16px;
  align-items: stretch;
}

.create-card {
  display: grid;
  gap: 18px;
  padding: 18px;
  border: 1px solid rgba(196, 181, 253, .13);
  border-radius: 14px;
  background: rgba(28, 23, 36, .78);
  box-shadow: 0 24px 70px rgba(0, 0, 0, .28);
}

.create-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.create-card__head span {
  display: grid;
  min-width: 34px;
  height: 28px;
  place-items: center;
  border: 1px solid rgba(196, 181, 253, .18);
  border-radius: 999px;
  color: rgba(196, 181, 253, .85);
  font-size: 12px;
  font-weight: 800;
}

.create-card__head h2 {
  margin: 0;
  color: #fff;
  font-size: 22px;
}

.create-layout--premium .type-list {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.create-layout--premium .choice-card,
.create-layout--premium .access-field label {
  position: relative;
  min-height: 96px;
  padding: 15px;
  border-color: rgba(196, 181, 253, .13);
  border-radius: 12px;
  background: rgba(20, 16, 27, .78);
  transition: border-color .18s ease, background .18s ease, transform .18s ease;
}

.create-layout--premium .choice-card:hover,
.create-layout--premium .access-field label:hover {
  border-color: rgba(196, 181, 253, .32);
  background: rgba(34, 27, 45, .82);
  transform: translateY(-2px);
}

.create-layout--premium .choice-card input,
.create-layout--premium .access-field input {
  width: 16px;
  height: 16px;
}

.create-layout--premium .choice-card img {
  width: 50px;
  height: 50px;
  border-radius: 12px;
}

.create-layout--premium .choice-card strong,
.create-layout--premium .access-field strong {
  color: #fff;
  font-size: 16px;
}

.create-layout--premium .choice-card small,
.create-layout--premium .access-field small {
  margin-top: 4px;
  color: rgba(217, 204, 239, .66);
  line-height: 1.35;
}

.create-card--settings {
  align-content: start;
}

.create-card--settings .access-field {
  gap: 10px;
}

.create-card--settings .button--submit {
  min-height: 52px;
  border-radius: 12px;
}

.create-summary {
  display: grid;
  gap: 6px;
  padding: 14px;
  border: 1px solid rgba(196, 181, 253, .11);
  border-radius: 12px;
  background: rgba(12, 10, 16, .48);
}

.create-summary span {
  color: rgba(196, 181, 253, .9);
  font-size: 12px;
  font-weight: 800;
}

.create-summary p {
  margin: 0;
  color: rgba(217, 204, 239, .7);
  font-size: 13px;
  line-height: 1.48;
}

.room-main,
.room-sidebar,
.browser-shell {
  display: grid;
  gap: 14px;
  min-width: 0;
}

.room-sidebar {
  position: sticky;
  top: 112px;
  align-self: start;
  width: 100%;
}

.room-toolbar {
  justify-content: space-between;
  gap: 14px;
}

.room-toolbar__actions {
  flex-wrap: wrap;
  gap: 10px;
}

.player-panel,
.browser-frame-wrap {
  overflow: hidden;
  background: #14111a;
}

.player-panel {
  border-radius: 10px;
}

.video-frame {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 0;
  background: #14111a;
}

.watch-player {
  position: relative;
  overflow: hidden;
  border-radius: inherit;
  background: #14111a;
  cursor: pointer;
}

.watch-player::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  z-index: 1;
  height: 120px;
  pointer-events: none;
  background: transparent;
  transition: opacity .2s ease;
}

.watch-player:fullscreen {
  display: grid;
  width: 100vw;
  height: 100vh;
  place-items: center;
  border-radius: 0;
}

.watch-player__media {
  min-height: 420px;
  pointer-events: none;
}

.watch-player--provider {
  cursor: default;
}

.watch-player--provider::after,
.watch-player--provider .watch-player__bar,
.watch-player--provider .watch-player__seek-feedback {
  display: none;
}

.watch-player--provider .watch-player__media {
  pointer-events: auto;
}

.watch-player__poster {
  position: absolute;
  z-index: 1;
  inset: 0;
  background-position: center;
  background-size: cover;
  transition: opacity .22s ease, visibility .22s ease;
}

.watch-player__poster::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, .18);
}

.watch-player--playing .watch-player__poster {
  opacity: 0;
  visibility: hidden;
}

.watch-player__seek-feedback {
  position: absolute;
  top: 50%;
  z-index: 3;
  display: grid;
  width: 82px;
  height: 82px;
  place-items: center;
  gap: 2px;
  color: white;
  font-size: 18px;
  font-weight: 900;
  opacity: 0;
  pointer-events: none;
  text-shadow: 0 2px 14px rgba(0, 0, 0, .58);
  transform: translateY(-50%) scale(.82);
}

.seek-feedback__arrow {
  position: relative;
  width: 52px;
  height: 52px;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, .58));
}

.seek-feedback__icon {
  display: none;
  width: 64px;
  height: 64px;
  filter: drop-shadow(0 2px 12px rgba(0, 0, 0, .62));
}

.watch-player__seek-feedback--left .seek-feedback__icon--back,
.watch-player__seek-feedback--right .seek-feedback__icon--forward {
  display: block;
}

.seek-feedback__arrow::before {
  content: "";
  position: absolute;
  inset: 4px;
  border: 5px solid rgba(255, 255, 255, .96);
  border-left-color: transparent;
  border-radius: 999px;
}

.seek-feedback__arrow::after {
  content: "";
  position: absolute;
  top: 6px;
  right: 3px;
  width: 14px;
  height: 14px;
  border-top: 5px solid rgba(255, 255, 255, .96);
  border-right: 5px solid rgba(255, 255, 255, .96);
  transform: rotate(25deg);
}

.seek-feedback__time {
  line-height: 1;
}

.watch-player__seek-feedback--left {
  left: 14%;
}

.watch-player__seek-feedback--left .seek-feedback__arrow {
  transform: scaleX(-1);
}

.watch-player__seek-feedback--right {
  right: 14%;
}

.watch-player__seek-feedback--show {
  animation: seek-feedback .52s ease-out both;
}

.watch-player__loader {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: grid;
  place-items: center;
  pointer-events: none;
  background: rgba(0, 0, 0, .12);
  opacity: 0;
  transition: opacity .18s ease;
}

.watch-player__loader span {
  width: 46px;
  height: 46px;
  border: 4px solid rgba(255, 255, 255, .24);
  border-top-color: white;
  border-radius: 999px;
  filter: none;
  animation: player-spin .82s linear infinite;
}

.watch-player--loading .watch-player__loader {
  opacity: 1;
}

.watch-player__playback-feedback {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 5;
  display: grid;
  width: 82px;
  height: 82px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 999px;
  background: rgba(8, 7, 11, .42);
  backdrop-filter: blur(12px);
  color: #fff;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -50%) scale(.82);
}

.watch-player__playback-feedback.is-visible {
  animation: playback-feedback .72s ease-out both;
}

.playback-feedback__icon {
  display: block;
}

.playback-feedback__icon--play {
  display: none;
  width: 0;
  height: 0;
  margin-left: 6px;
  border-top: 17px solid transparent;
  border-bottom: 17px solid transparent;
  border-left: 26px solid currentColor;
}

.playback-feedback__icon--pause {
  width: 28px;
  height: 34px;
  border-left: 10px solid currentColor;
  border-right: 10px solid currentColor;
}

.watch-player__playback-feedback.is-playing .playback-feedback__icon--play {
  display: block;
}

.watch-player__playback-feedback.is-playing .playback-feedback__icon--pause {
  display: none;
}

.watch-player__up-next {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 14px;
  padding: 28px;
  text-align: center;
  pointer-events: none;
  background: rgba(9, 7, 14, .74);
  opacity: 0;
  transform: scale(1.02);
  transition: opacity .22s ease, transform .28s cubic-bezier(.2, .8, .2, 1);
}

.watch-player__up-next[hidden] {
  display: none;
}

.watch-player__up-next.is-visible {
  opacity: 1;
  transform: scale(1);
}

.up-next__brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  font-size: 18px;
  font-weight: 600;
}

.up-next__brand img {
  width: 34px;
  height: 34px;
  object-fit: contain;
  filter: brightness(0) invert(1) drop-shadow(0 8px 20px rgba(0, 0, 0, .48));
}

.up-next__label {
  color: rgba(255, 255, 255, .68);
  font-size: 14px;
  font-weight: 500;
}

.watch-player__up-next strong {
  max-width: min(720px, 88%);
  color: #fff;
  font-size: clamp(22px, 3vw, 34px);
  font-weight: 600;
  line-height: 1.18;
  text-wrap: balance;
}

.up-next__count {
  display: grid;
  width: 72px;
  height: 72px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, .22);
  border-radius: 999px;
  background: rgba(255, 255, 255, .1);
  color: #fff;
  font-size: 32px;
  font-weight: 500;
  box-shadow: 0 18px 48px rgba(0, 0, 0, .34);
  animation: up-next-count .95s ease-in-out infinite;
}

.watch-player__mobile-title {
  position: absolute;
  inset: 0 0 auto;
  z-index: 2;
  display: none;
  align-items: center;
  gap: 9px;
  min-width: 0;
  padding: 10px 12px;
  pointer-events: none;
  background: rgba(0, 0, 0, .64);
}

.watch-player__mobile-title span {
  flex: 0 0 auto;
  padding: 4px 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .12);
  color: rgba(255, 255, 255, .72);
  font-size: 10px;
  font-weight: 600;
}

.watch-player__mobile-title strong {
  display: block;
  min-width: 0;
  overflow: hidden;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.25;
  text-overflow: ellipsis;
  text-shadow: 0 2px 12px rgba(0, 0, 0, .68);
  white-space: nowrap;
}

.watch-player:fullscreen .watch-player__media {
  width: 100vw;
  height: 100vh;
  min-height: 0;
  aspect-ratio: auto;
}

.watch-player__bar {
  position: absolute;
  z-index: 2;
  left: 12px;
  right: 12px;
  bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 50px;
  padding: 16px 12px 8px;
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 10px;
  background: rgba(27, 23, 34, .52);
  backdrop-filter: blur(14px);
  cursor: default;
  transition: opacity .2s ease, transform .22s ease;
}

.watch-player--controls-hidden {
  cursor: none;
}

.watch-player--controls-hidden::after {
  opacity: 0;
}

.watch-player--controls-hidden .watch-player__bar {
  opacity: 0;
  pointer-events: none;
  transform: translateY(110%);
}

.watch-player--controls-hidden .player-settings-menu {
  opacity: 0;
  pointer-events: none;
}

.player-button {
  display: inline-grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: rgba(255, 255, 255, .88);
  font-weight: 500;
  cursor: pointer;
  text-shadow: none;
  transition: transform .16s ease, background .16s ease, color .16s ease;
}

.player-button:hover {
  transform: none;
  background: rgba(255, 255, 255, .1);
  color: #fff;
}

.player-button:disabled {
  cursor: not-allowed;
  opacity: .36;
  transform: none;
}

.player-inline-form {
  display: contents;
}

.player-icon {
  display: block;
}

.player-icon--play {
  width: 0;
  height: 0;
  margin-left: 3px;
  border-top: 8px solid transparent;
  border-bottom: 8px solid transparent;
  border-left: 13px solid currentColor;
}

.player-icon--pause {
  display: none;
  width: 14px;
  height: 16px;
  border-left: 5px solid currentColor;
  border-right: 5px solid currentColor;
}

.watch-player--playing .player-icon--play {
  display: none;
}

.watch-player--playing .player-icon--pause {
  display: block;
}

.player-button img {
  display: block;
  width: 20px;
  height: 20px;
  fill: currentColor;
  object-fit: contain;
  overflow: visible;
}

.player-button--wide {
  width: auto;
  min-width: 104px;
  padding: 0 14px;
}

.player-button--fullscreen {
  margin-left: 0;
}

.player-button--previous {
  display: none;
}

.player-range {
  position: absolute;
  left: 12px;
  right: 12px;
  top: 7px;
  flex: 1;
  width: calc(100% - 24px);
  height: 3px;
  margin: 0;
  accent-color: var(--accent);
  cursor: pointer;
  background: transparent;
}

.player-range::-webkit-slider-runnable-track,
.player-volume__range::-webkit-slider-runnable-track {
  height: 3px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .28);
}

.player-range::-webkit-slider-thumb,
.player-volume__range::-webkit-slider-thumb {
  width: 12px;
  height: 12px;
  margin-top: -4.5px;
  border: 0;
  border-radius: 999px;
  appearance: none;
  background: #fff;
}

.player-range::-moz-range-track,
.player-volume__range::-moz-range-track {
  height: 3px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .28);
}

.player-range::-moz-range-thumb,
.player-volume__range::-moz-range-thumb {
  width: 12px;
  height: 12px;
  border: 0;
  border-radius: 999px;
  background: #fff;
}

.watch-player--loading .player-range {
  background: rgba(255, 255, 255, .24);
  animation: player-buffer 1.05s ease-in-out infinite;
}

.timeline-preview {
  position: absolute;
  bottom: 72px;
  z-index: 6;
  display: grid;
  min-width: 62px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 8px;
  background: rgba(10, 8, 14, .82);
  box-shadow: 0 12px 32px rgba(0, 0, 0, .34);
  backdrop-filter: blur(18px) saturate(140%);
  pointer-events: none;
  transform: translateY(-4px);
}

.timeline-preview[hidden] {
  display: none;
}

.timeline-preview span {
  padding: 7px 10px;
  color: #fff;
  font-size: 12px;
  font-weight: 500;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.player-time {
  min-width: 104px;
  margin-right: auto;
  color: rgba(255, 255, 255, .78);
  font-size: 12px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

.player-brand-mark {
  position: absolute;
  left: 50%;
  bottom: 13px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: white;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0;
  pointer-events: none;
  text-shadow: none;
  transform: translateX(-50%);
}

.player-brand-mark img {
  width: 22px;
  height: 22px;
  object-fit: contain;
  object-position: center;
  filter: brightness(0) invert(1);
}

.player-volume {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-left: 8px;
}

.player-volume__range {
  width: 76px;
  height: 3px;
  margin: 0;
  accent-color: #fff;
  cursor: pointer;
}

.player-range,
.player-volume__range {
  -webkit-appearance: none;
  appearance: none;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--range-fill-color, var(--accent)) 0 var(--range-fill, 0%), rgba(255, 255, 255, .34) var(--range-fill, 0%) 100%);
}

.player-range::-webkit-slider-runnable-track,
.player-volume__range::-webkit-slider-runnable-track {
  height: 4px;
  border-radius: 999px;
  background: transparent;
}

.player-range::-webkit-slider-thumb,
.player-volume__range::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 12px;
  height: 12px;
  margin-top: -4px;
  border: 0;
  border-radius: 999px;
  appearance: none;
  background: var(--accent);
}

.player-volume__range::-webkit-slider-thumb {
  background: #fff;
}

.player-range::-moz-range-track,
.player-volume__range::-moz-range-track {
  height: 4px;
  border-radius: 999px;
  background: transparent;
}

.player-range::-moz-range-progress,
.player-volume__range::-moz-range-progress {
  height: 4px;
  border-radius: 999px;
  background: var(--range-fill-color, var(--accent));
}

.player-range::-moz-range-thumb,
.player-volume__range::-moz-range-thumb {
  width: 12px;
  height: 12px;
  border: 0;
  border-radius: 999px;
  background: var(--accent);
}

.player-volume__range::-moz-range-thumb {
  background: #fff;
}

.watch-player--muted .player-button--volume .volume-wave {
  display: none;
}

.player-settings-menu {
  position: absolute;
  right: 18px;
  bottom: 74px;
  z-index: 5;
  display: grid;
  width: min(310px, calc(100% - 36px));
  overflow: hidden;
  gap: 0;
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 10px;
  background: rgba(36, 31, 44, .86);
  box-shadow: 0 18px 42px rgba(0, 0, 0, .28);
  backdrop-filter: blur(18px);
  transform-origin: right bottom;
  animation: settings-menu-in .18s cubic-bezier(.2, .8, .2, 1);
}

.player-settings-menu[hidden] {
  display: none;
}

.settings-panel-view {
  display: grid;
  gap: 2px;
  opacity: 0;
  transform: translateX(14px);
  transition:
    opacity .18s ease,
    transform .22s cubic-bezier(.2, .8, .2, 1);
}

.settings-panel-view.is-active {
  opacity: 1;
  transform: translateX(0);
}

.settings-panel-view[hidden] {
  display: none;
}

.settings-row,
.settings-option,
.settings-back {
  display: flex;
  width: 100%;
  min-height: 44px;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: white;
  padding: 0 10px;
  font: inherit;
  font-size: 14px;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
  transition: background .16s ease, transform .16s ease, color .16s ease;
}

.settings-row:hover,
.settings-option:hover,
.settings-back:hover {
  background: rgba(255, 255, 255, .12);
  transform: translateX(2px);
}

.settings-row strong {
  color: rgba(255, 255, 255, .72);
  font-size: 13px;
  font-weight: 500;
  text-align: right;
}

.settings-row strong::after {
  content: "›";
  margin-left: 8px;
  color: rgba(255, 255, 255, .66);
}

.settings-back {
  justify-content: flex-start;
  margin-bottom: 6px;
  font-weight: 600;
}

.settings-option {
  justify-content: flex-start;
  padding-left: 34px;
  position: relative;
}

.settings-option.is-active::before {
  content: "";
  position: absolute;
  left: 12px;
  top: 50%;
  width: 12px;
  height: 7px;
  border-left: 2px solid white;
  border-bottom: 2px solid white;
  transform: translateY(-60%) rotate(-45deg);
}

.settings-option:disabled {
  cursor: not-allowed;
  opacity: .42;
}

@keyframes settings-menu-in {
  from {
    opacity: 0;
    transform: translateY(10px) scale(.97);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes up-next-count {
  0%,
  100% {
    transform: scale(1);
  }
  48% {
    transform: scale(1.08);
  }
}

@keyframes playback-feedback {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(.82);
  }
  18% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
  72% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(1.08);
  }
}

.player-empty {
  display: grid;
  min-height: 430px;
  align-content: end;
  gap: 12px;
  padding: clamp(24px, 4vw, 38px);
  background: rgba(36, 31, 44, .96);
}

.room-info {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
  gap: 18px;
  padding: 22px;
}

.room-info h2 {
  max-width: 820px;
  margin: 14px 0 8px;
  font-size: clamp(24px, 2.7vw, 34px);
  line-height: 1.18;
}

.room-info p {
  max-width: 760px;
  margin: 0;
  color: var(--muted);
}

.room-participants {
  position: relative;
  display: inline-flex;
  align-items: center;
  margin-left: 6px;
}

.participant-chip {
  position: relative;
  margin-left: -8px;
}

.participant-chip:first-child {
  margin-left: 0;
}

.participant-chip > span {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 2px solid rgba(24, 18, 36, .95);
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  cursor: default;
}

.participant-popover {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 10px);
  z-index: 12;
  display: grid;
  width: 210px;
  gap: 4px;
  padding: 12px;
  border: 1px solid rgba(196, 181, 253, .18);
  border-radius: 10px;
  background: rgba(38, 32, 47, .88);
  box-shadow: 0 18px 46px rgba(0, 0, 0, .34);
  color: #fff;
  opacity: 0;
  pointer-events: none;
  transform: translateX(-50%) translateY(6px);
  transition: opacity .16s ease, transform .16s ease;
  backdrop-filter: blur(18px);
}

.participant-popover form {
  display: grid;
  gap: 8px;
  margin-top: 6px;
}

.participant-popover label {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--soft);
  font-size: 12px;
}

.participant-popover input[type="checkbox"] {
  accent-color: var(--accent);
}

.participant-popover button {
  min-height: 34px;
  border: 0;
  border-radius: 10px;
  background: var(--accent);
  color: #fff;
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.participant-popover .participant-kick {
  background: rgba(255, 91, 104, .14);
  color: #ffd3d7;
}

.participant-popover strong {
  font-size: 14px;
  font-weight: 600;
}

.participant-popover small,
.participant-popover em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.participant-chip:hover .participant-popover,
.participant-chip:focus-within .participant-popover {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}

.participant-more {
  display: grid;
  width: 44px;
  height: 44px;
  margin-left: -8px;
  place-items: center;
  border: 2px solid rgba(24, 18, 36, .95);
  border-radius: 999px;
  background: rgba(34, 29, 41, .78);
  color: #fff;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.participant-all {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 14;
  display: grid;
  width: 240px;
  max-height: 260px;
  overflow: auto;
  gap: 6px;
  padding: 10px;
  border: 1px solid rgba(196, 181, 253, .18);
  border-radius: 10px;
  background: rgba(38, 32, 47, .9);
  box-shadow: 0 18px 46px rgba(0, 0, 0, .34);
  backdrop-filter: blur(18px);
}

.participant-all[hidden] {
  display: none;
}

.participant-all span {
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(255, 255, 255, .06);
  color: var(--soft);
  font-size: 13px;
}

.sr-input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}

.section-title {
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.section-title h2 {
  margin-bottom: 0;
}

.section-title a,
.section-title span {
  color: var(--accent-3);
  font-size: 13px;
  font-weight: 900;
}

.queue-list,
.chat-list {
  display: grid;
  gap: 10px;
}

.queue-list {
  counter-reset: queue;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
}

.queue-item,
.chat-message {
  padding: 11px 12px;
  border: 1px solid rgba(226, 214, 255, .08);
  border-radius: 10px;
  background: rgba(34, 29, 41, .46);
}

.queue-item {
  position: relative;
  display: grid;
  gap: 9px;
  padding: 0;
  overflow: hidden;
}

.queue-item::before {
  counter-increment: queue;
  content: counter(queue);
  position: absolute;
  z-index: 2;
  left: 10px;
  top: 10px;
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 9px;
  background: rgba(8, 6, 12, .68);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  backdrop-filter: blur(10px);
}

.queue-item__thumb {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: rgba(36, 31, 44, .96);
  background-position: center;
  background-size: cover;
}

.queue-item__thumb::after {
  content: "Следующее";
  position: absolute;
  right: 8px;
  bottom: 8px;
  padding: 4px 7px;
  border-radius: 6px;
  background: rgba(7, 6, 10, .82);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
}

.queue-item strong {
  min-width: 0;
  padding: 0 12px;
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.25;
}

.queue-item span,
.chat-message p {
  color: var(--muted);
}

.queue-item span {
  padding: 0 12px 12px;
  font-size: 12px;
}

.chat-message,
.chat-message p,
.chat-message strong {
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.chat-message {
  display: grid;
  gap: 4px;
}

.chat-message strong {
  color: rgba(255, 255, 255, .88);
  font-size: 13px;
  font-weight: 600;
}

.chat-message p {
  white-space: pre-wrap;
  margin: 0;
  font-size: 14px;
  line-height: 1.42;
}

.chat-panel {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  width: 100%;
  height: calc(100vh - 138px);
  min-height: 560px;
  padding: 16px;
  border-color: rgba(226, 214, 255, .1);
  background: rgba(36, 30, 44, .72);
}

.chat-list {
  align-content: start;
  max-height: none;
  min-height: 0;
  overflow: auto;
  padding-right: 2px;
  overscroll-behavior: contain;
}

.chat-message--system {
  border-color: rgba(196, 181, 253, .16);
  background: rgba(139, 92, 246, .1);
}

.chat-reply {
  display: grid;
  gap: 2px;
  padding: 8px 10px;
  border-left: 2px solid rgba(168, 85, 247, .85);
  border-radius: 10px;
  background: rgba(139, 92, 246, .12);
}

.chat-reply b {
  color: rgba(255, 255, 255, .9);
  font-size: 12px;
}

.chat-reply span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.chat-reply-action {
  justify-self: start;
  padding: 4px 0 0;
  border: 0;
  background: transparent;
  color: rgba(196, 181, 253, .82);
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  font-weight: 600;
}

.chat-reply-action:hover,
.chat-reply-action:focus-visible {
  color: #fff;
}

.quick-actions {
  padding: 18px;
}

.quick-action-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.quick-action-card,
.quick-action-card button {
  display: grid;
  min-width: 0;
  min-height: 86px;
  align-content: center;
  gap: 4px;
  border: 1px solid rgba(196, 181, 253, .13);
  border-radius: 10px;
  background: rgba(34, 29, 41, .64);
  color: var(--text);
  text-align: left;
  cursor: pointer;
  transition: transform .18s ease, border-color .18s ease, background .18s ease;
}

.quick-action-card {
  padding: 14px;
}

.quick-action-card--form {
  padding: 0;
  border: 0;
  background: none;
}

.quick-action-card button {
  width: 100%;
  height: 100%;
  padding: 14px;
  font: inherit;
}

.quick-action-card:hover,
.quick-action-card:focus-visible,
.quick-action-card--form:focus-within {
  border-color: rgba(196, 181, 253, .34);
  background: rgba(55, 43, 70, .72);
  transform: translateY(-2px);
}

.quick-action-card span {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 10px;
  background: var(--accent);
  color: #fff;
  font-size: 20px;
  font-weight: 600;
}

.quick-action-card span img {
  width: 18px;
  height: 18px;
}

.quick-action-card strong {
  margin-top: 4px;
  font-size: 14px;
  font-weight: 600;
}

.quick-action-card small {
  color: var(--muted);
  font-size: 12px;
}

.quick-action-card button:disabled {
  cursor: not-allowed;
  opacity: .48;
}

.quick-settings {
  display: grid;
  gap: 12px;
  margin-top: 14px;
  padding: 14px;
  border: 1px solid rgba(196, 181, 253, .13);
  border-radius: 10px;
  background: rgba(34, 29, 41, .46);
  animation: settings-menu-in .18s cubic-bezier(.2, .8, .2, 1);
}

.quick-settings[hidden] {
  display: none;
}

.quick-settings form {
  display: grid;
  gap: 10px;
}

.access-switch {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  padding: 6px;
  border: 1px solid rgba(196, 181, 253, .14);
  border-radius: 10px;
  background: rgba(34, 29, 41, .56);
}

.access-switch label {
  cursor: pointer;
}

.access-switch input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.access-switch span {
  display: grid;
  min-height: 42px;
  place-items: center;
  border-radius: 10px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
  transition: background .18s ease, color .18s ease, box-shadow .18s ease;
}

.access-switch input:checked + span {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 10px 26px rgba(139, 92, 246, .28);
}

.chat-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 44px;
  gap: 8px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(226, 214, 255, .08);
}

.chat-reply-draft {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 34px;
  gap: 8px;
  align-items: center;
  padding: 10px 10px 10px 12px;
  border: 1px solid rgba(196, 181, 253, .28);
  border-left: 3px solid rgba(168, 85, 247, .95);
  border-radius: 12px;
  background: rgba(139, 92, 246, .2);
  box-shadow: 0 10px 26px rgba(0, 0, 0, .18);
}

.chat-reply-draft[hidden] {
  display: none;
}

.chat-reply-draft div {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.chat-reply-draft strong {
  color: #fff;
  font-size: 12px;
}

.chat-reply-draft strong::before {
  content: "Ответ на ";
  color: rgba(217, 204, 239, .7);
  font-weight: 600;
}

.chat-reply-draft span {
  color: var(--muted);
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-reply-draft button {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border: 0;
  border-radius: 10px;
  background: rgba(255, 255, 255, .06);
  color: #fff;
  cursor: pointer;
  font-size: 20px;
  line-height: 1;
}

.chat-reply-draft button img {
  width: 16px;
  height: 16px;
}

.chat-form.is-replying .chat-input-wrap input {
  border-color: rgba(168, 85, 247, .5);
}

.chat-input-wrap {
  position: relative;
  min-width: 0;
}

.chat-input-wrap input {
  padding-right: 44px;
}

.chat-emoji-button {
  position: absolute;
  top: 50%;
  right: 6px;
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: rgba(255, 255, 255, .68);
  cursor: pointer;
  transition: background .16s ease, color .16s ease;
  transform: translateY(-50%);
}

.chat-emoji-button img {
  width: 18px;
  height: 18px;
  opacity: .78;
}

.chat-emoji-button:hover,
.chat-emoji-button:focus-visible {
  background: rgba(255, 255, 255, .08);
  color: #fff;
}

.chat-emoji-panel {
  position: absolute;
  left: 0;
  right: 0;
  bottom: calc(100% + 8px);
  z-index: 12;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 4px;
  padding: 8px;
  border: 1px solid rgba(226, 214, 255, .12);
  border-radius: 10px;
  background: rgba(36, 31, 44, .96);
  box-shadow: 0 16px 38px rgba(0, 0, 0, .34);
}

.chat-emoji-panel[hidden] {
  display: none;
}

.chat-emoji-panel button {
  display: grid;
  min-height: 34px;
  place-items: center;
  border: 0;
  border-radius: 10px;
  background: transparent;
  cursor: pointer;
  font-size: 19px;
  transition: background .16s ease;
}

.chat-emoji-panel button:hover,
.chat-emoji-panel button:focus-visible {
  background: rgba(255, 255, 255, .08);
}

.chat-send-button {
  display: grid;
  min-width: 44px;
  width: 44px;
  padding: 0;
  border-radius: 10px;
  background: rgba(139, 92, 246, .88);
  place-items: center;
}

.chat-send-button img {
  width: 21px;
  height: 21px;
}

.settings-panel {
  display: grid;
  gap: 14px;
  padding: 18px;
}

.settings-panel form {
  gap: 10px;
}

.management-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.management-cards div {
  display: grid;
  min-height: 74px;
  place-items: center;
  gap: 4px;
  padding: 10px;
  border: 1px solid rgba(196, 181, 253, .14);
  border-radius: 10px;
  background: rgba(34, 29, 41, .5);
  text-align: center;
}

.management-cards strong {
  color: var(--accent-3);
  font-size: 18px;
  font-weight: 600;
}

.management-cards span {
  color: var(--muted);
  font-size: 12px;
}

.settings-panel .toggle-row {
  min-height: 44px;
  border-radius: 10px;
  background: rgba(34, 29, 41, .46);
}

.danger-form {
  margin-top: -2px;
}

.browser-search,
.browser-address {
  display: flex;
  gap: 10px;
}

.browser-shell--search {
  gap: 18px;
}

.browser-topline {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  padding: 18px;
  border: 1px solid rgba(196, 181, 253, .12);
  border-radius: 10px;
  background: rgba(42, 35, 52, .78);
}

.browser-topline .back-link {
  margin: 0;
}

.browser-topline h1 {
  margin: 0 0 4px;
}

.browser-topline p {
  margin: 0;
  color: var(--muted);
}

.browser-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 360px);
  gap: 16px;
  align-items: start;
}

.browser-search-panel,
.browser-side-panel {
  border: 1px solid rgba(196, 181, 253, .12);
  border-radius: 10px;
  background: rgba(42, 35, 52, .76);
  box-shadow: 0 18px 46px rgba(0, 0, 0, .22);
}

.browser-search-panel {
  display: grid;
  gap: 14px;
  padding: 16px;
}

.browser-address--search {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
}

.browser-source-tabs {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
}

.browser-source-tabs button {
  display: grid;
  min-height: 68px;
  gap: 4px;
  align-content: center;
  padding: 10px 12px;
  border: 1px solid rgba(196, 181, 253, .12);
  border-radius: 10px;
  background: rgba(34, 29, 41, .48);
  color: var(--text);
  text-align: left;
  cursor: pointer;
  transition: border-color .18s ease, background .18s ease, transform .18s ease;
}

.browser-source-tabs button:hover,
.browser-source-tabs button:focus-visible,
.browser-source-tabs button.is-active {
  border-color: rgba(168, 85, 247, .55);
  background: rgba(55, 39, 82, .68);
  transform: translateY(-1px);
}

.browser-source-tabs span {
  font-weight: 700;
}

.browser-source-tabs small {
  color: var(--muted);
}

.browser-status {
  min-height: 44px;
  padding: 12px 14px;
  border: 1px solid rgba(196, 181, 253, .1);
  border-radius: 10px;
  background: rgba(34, 29, 41, .42);
  color: var(--muted);
}

.browser-status.is-loading::before {
  content: "";
  display: inline-block;
  width: 12px;
  height: 12px;
  margin-right: 8px;
  border: 2px solid rgba(255, 255, 255, .28);
  border-top-color: #fff;
  border-radius: 999px;
  vertical-align: -2px;
  animation: player-spin .85s linear infinite;
}

.browser-search-app {
  --search-bg: #080808;
  --search-card: #111111;
  --search-border: #1c1c1e;
  --search-input: #161618;
  --search-input-border: #2c2c2e;
  --search-text: #e3e3e3;
  --search-muted: #66666a;
  --search-white: #ffffff;
  --search-hover: #202024;
  --search-accent: #7c5cff;
  --search-accent-2: #a78bfa;
  position: relative;
  width: min(1380px, calc(100vw - 40px));
  min-height: 0;
  padding: 18px 0 32px;
  color: var(--search-text);
  animation: browser-app-in .42s cubic-bezier(.16, 1, .3, 1);
}

.browser-search-app::before {
  display: none;
}

.browser-search-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 18px;
  padding: 0 2px;
}

.browser-search-head h1 {
  margin: 0;
  color: var(--search-white);
  font-size: 28px;
  font-weight: 800;
  letter-spacing: 0;
  line-height: 1.05;
}

.browser-mode-switch {
  position: relative;
  display: flex;
  gap: 2px;
  padding: 3px;
  border: 1px solid var(--search-input-border);
  border-radius: 14px;
  background: var(--search-input);
}

.browser-mode-indicator {
  position: absolute;
  top: 3px;
  left: 0;
  z-index: 0;
  height: calc(100% - 6px);
  border-radius: 11px;
  background: var(--search-accent);
  transition: transform .28s cubic-bezier(.65, 0, .35, 1), width .28s cubic-bezier(.65, 0, .35, 1);
}

.browser-mode-switch button {
  position: relative;
  z-index: 1;
  min-height: 34px;
  padding: 0 14px;
  border: 0;
  border-radius: 11px;
  background: transparent;
  color: var(--search-muted);
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
  transition: color .18s ease;
}

.browser-mode-switch button.is-active {
  color: var(--search-white);
}

.browser-search-app .browser-search-panel {
  gap: 14px;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.browser-search-app .browser-workspace {
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
  gap: 14px;
}

.browser-search-bar {
  align-items: center;
  gap: 10px;
  padding: 8px;
  border: 1px solid var(--search-border);
  border-radius: 18px;
  background: var(--search-card);
  transition: border-color .18s ease, box-shadow .18s ease;
}

.browser-search-bar:focus-within,
.browser-search-bar.is-loading {
  border-color: var(--search-accent);
  box-shadow: none;
}

.browser-search-bar input {
  min-height: 44px;
  padding: 0 14px;
  border: 0;
  background: transparent;
}

.browser-search-bar .button {
  min-height: 42px;
  border-radius: 14px;
  background: var(--search-accent);
  color: var(--search-white);
}

.browser-button-spinner {
  display: none;
  width: 15px;
  height: 15px;
  border: 2px solid rgba(255, 255, 255, .35);
  border-top-color: #fff;
  border-radius: 999px;
  animation: player-spin .75s linear infinite;
}

.browser-button-spinner.is-visible {
  display: inline-block;
}

.browser-search-app .browser-status {
  min-height: 0;
  padding: 12px 16px;
  border-radius: 14px;
  border-color: var(--search-border);
  background: var(--search-card);
  color: var(--search-muted);
  font-size: 13px;
  line-height: 1.45;
}

.browser-results {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 14px;
}

.browser-result-card {
  display: grid;
  gap: 0;
  min-width: 0;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--search-border);
  border-radius: 14px;
  background: var(--search-card);
  color: var(--search-text);
  text-align: left;
  cursor: pointer;
  opacity: 0;
  transform: translateY(12px) scale(.98);
  animation: browser-card-in .38s cubic-bezier(.16, 1, .3, 1) forwards;
  transition: border-color .18s ease, transform .18s ease, background .18s ease;
}

.browser-result-card:hover,
.browser-result-card:focus-visible {
  border-color: var(--search-muted);
  background: var(--search-hover);
  transform: translateY(-4px);
}

.browser-result-card__thumb {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #000;
  background-position: center;
  background-size: cover;
}

.browser-result-card__thumb::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0);
  transition: background .18s ease;
}

.browser-result-card:hover .browser-result-card__thumb::after,
.browser-result-card:focus-visible .browser-result-card__thumb::after {
  background: rgba(0, 0, 0, .18);
}

.browser-play-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  place-items: center;
  opacity: 0;
  transform: scale(.78);
  transition: opacity .18s ease, transform .18s ease;
}

.browser-result-card:hover .browser-play-overlay,
.browser-result-card:focus-visible .browser-play-overlay {
  opacity: 1;
  transform: scale(1);
}

.browser-play-overlay img {
  width: 42px;
  height: 42px;
  color: #fff;
  object-fit: contain;
  filter: drop-shadow(0 6px 14px rgba(0, 0, 0, .55));
}

.browser-play-overlay path {
  fill: currentColor;
}

.browser-result-card__thumb em {
  position: absolute;
  z-index: 3;
  right: 8px;
  bottom: 8px;
  padding: 4px 6px;
  border-radius: 6px;
  background: rgba(0, 0, 0, .78);
  color: #fff;
  font-size: 12px;
  font-style: normal;
}

.browser-result-card__body {
  display: grid;
  gap: 4px;
  padding: 10px 12px 12px;
}

.browser-result-card strong {
  padding: 0;
  overflow: hidden;
  color: var(--search-text);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.32;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.browser-result-card small {
  padding: 0;
  overflow: hidden;
  color: var(--search-muted);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.browser-skeleton-card {
  display: grid;
  gap: 10px;
  overflow: hidden;
  border: 1px solid var(--search-border);
  border-radius: 14px;
  background: var(--search-card);
}

.browser-skeleton-card span {
  display: block;
  aspect-ratio: 16 / 9;
  background: linear-gradient(90deg, var(--search-input) 25%, var(--search-hover) 50%, var(--search-input) 75%);
  background-size: 200% 100%;
  animation: browser-shimmer 1.15s infinite;
}

.browser-skeleton-card b,
.browser-skeleton-card i {
  display: block;
  height: 10px;
  margin: 0 12px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--search-input) 25%, var(--search-hover) 50%, var(--search-input) 75%);
  background-size: 200% 100%;
  animation: browser-shimmer 1.15s infinite;
}

.browser-skeleton-card i {
  width: 58%;
  margin-bottom: 13px;
}

@keyframes browser-app-in {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes browser-card-in {
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes browser-shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.browser-pagination {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  padding-top: 4px;
}

.browser-pagination button {
  display: grid;
  min-width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid rgba(196, 181, 253, .14);
  border-radius: 10px;
  background: rgba(34, 29, 41, .54);
  color: var(--text);
  cursor: pointer;
  font-weight: 600;
  transition: border-color .18s ease, background .18s ease, transform .18s ease;
}

.browser-pagination button:hover,
.browser-pagination button:focus-visible,
.browser-pagination button.is-active {
  border-color: rgba(168, 85, 247, .58);
  background: rgba(83, 52, 125, .58);
  transform: translateY(-1px);
}

.browser-search-app .browser-pagination button {
  border-color: var(--search-input-border);
  background: var(--search-input);
  color: var(--search-text);
}

.browser-search-app .browser-pagination button:hover,
.browser-search-app .browser-pagination button:focus-visible {
  border-color: var(--search-muted);
  background: var(--search-hover);
}

.browser-search-app .browser-pagination button.is-active {
  border-color: var(--search-accent);
  background: var(--search-accent);
  color: var(--search-white);
}

.browser-empty,
.browser-loading {
  grid-column: 1 / -1;
  display: grid;
  min-height: 180px;
  place-items: center;
  align-content: center;
  gap: 8px;
  padding: 28px;
  border: 1px dashed rgba(196, 181, 253, .18);
  border-radius: 10px;
  color: var(--muted);
  text-align: center;
}

.browser-empty strong,
.browser-loading strong {
  color: var(--text);
}

.browser-search-app .browser-empty,
.browser-search-app .browser-loading {
  border-color: var(--search-input-border);
  border-radius: 18px;
  background: rgba(17, 17, 17, .72);
  color: var(--search-muted);
}

.browser-search-app .browser-empty strong,
.browser-search-app .browser-loading strong {
  color: var(--search-text);
}

.browser-loading span {
  width: 34px;
  height: 34px;
  border: 3px solid rgba(255, 255, 255, .18);
  border-top-color: #fff;
  border-radius: 999px;
  animation: player-spin .85s linear infinite;
}

.browser-side-panel {
  position: sticky;
  top: 112px;
  display: grid;
  gap: 12px;
  padding: 14px;
}

.browser-mini-card {
  display: grid;
  gap: 6px;
  padding: 14px;
  border: 1px solid rgba(196, 181, 253, .1);
  border-radius: 10px;
  background: rgba(34, 29, 41, .42);
}

.browser-mini-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.browser-external-link {
  display: grid;
  min-height: 46px;
  place-items: center;
  border: 1px solid rgba(196, 181, 253, .16);
  border-radius: 10px;
  color: var(--text);
  background: rgba(255, 255, 255, .04);
}

.browser-window {
  display: grid;
  min-height: 700px;
  align-content: start;
  gap: 14px;
  padding: 14px;
  background: rgba(36, 31, 44, .96);
}

.browser-address {
  align-items: center;
  padding: 10px;
  border: 1px solid rgba(196, 181, 253, .18);
  border-radius: var(--radius-lg);
  background: rgba(34, 29, 41, .82);
}

.browser-address input {
  flex: 1;
  min-width: 0;
  height: 46px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: rgba(45, 38, 54, .95);
  color: var(--text);
  padding: 0 14px;
}

.browser-icon {
  display: inline-grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid rgba(196, 181, 253, .2);
  border-radius: 10px;
  background: rgba(255, 255, 255, .06);
  color: var(--text);
  font-size: 24px;
  font-weight: 900;
  cursor: pointer;
}

.browser-frame {
  position: relative;
  overflow: hidden;
  min-height: 520px;
  border: 1px solid rgba(196, 181, 253, .18);
  border-radius: var(--radius-lg);
  background: #14111a;
}

.browser-frame iframe {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  height: 620px;
  border: 0;
  background: white;
}

.browser-frame__fallback {
  position: absolute;
  inset: auto 18px 18px;
  z-index: 0;
  display: grid;
  gap: 8px;
  padding: 16px;
  border: 1px solid rgba(196, 181, 253, .2);
  border-radius: var(--radius-md);
  background: rgba(34, 29, 41, .92);
}

.browser-frame__fallback span {
  color: var(--muted);
  font-size: 13px;
}

.browser-auto-status {
  padding: 12px 14px;
  border: 1px solid rgba(196, 181, 253, .18);
  border-radius: var(--radius-md);
  background: rgba(34, 29, 41, .7);
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

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

.quick-sites button {
  min-height: 54px;
  border: 1px solid rgba(196, 181, 253, .24);
  border-radius: var(--radius-md);
  background: rgba(45, 38, 54, .9);
  color: var(--text);
  font-weight: 900;
  cursor: pointer;
  transition: border-color .18s ease, background .18s ease, transform .18s ease;
}

.quick-sites button:hover,
.quick-sites button.is-active {
  border-color: rgba(168, 85, 247, .7);
  background: rgba(83, 52, 125, .55);
  transform: translateY(-1px);
}

.browser-error[hidden] {
  display: none;
}

.source-strip {
  gap: 10px;
}

.source-strip img {
  width: 36px;
  height: 36px;
  padding: 8px;
  border-radius: 10px;
  background: white;
}

@keyframes content-reveal {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes home-rise {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes hero-breathe {
  0%,
  100% {
    opacity: .78;
  }
  50% {
    opacity: 1;
  }
}

@keyframes seek-feedback {
  0% {
    opacity: 0;
    transform: translateY(-50%) scale(.72);
  }
  18% {
    opacity: 1;
    transform: translateY(-50%) scale(1);
  }
  100% {
    opacity: 0;
    transform: translateY(-50%) scale(1.16);
  }
}

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

@keyframes player-buffer {
  0% {
    background-position: -40% 0, 0 0;
  }
  100% {
    background-position: 140% 0, 0 0;
  }
}

.toast-layer {
  position: fixed;
  top: 18px;
  right: 18px;
  z-index: 12000;
  display: grid;
  gap: 10px;
  width: min(390px, calc(100vw - 32px));
  pointer-events: none;
}

.toast {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  align-items: center;
  gap: 11px;
  min-height: 54px;
  padding: 12px 14px;
  overflow: hidden;
  border: 1px solid rgba(226, 214, 255, .14);
  border-radius: 14px;
  background: rgba(18, 15, 24, .92);
  color: #fff;
  box-shadow: 0 18px 46px rgba(0, 0, 0, .38);
  font-size: 14px;
  font-weight: 700;
  opacity: 0;
  transform: translateY(-10px) scale(.98);
  transition: opacity .18s ease, transform .18s ease;
  backdrop-filter: blur(18px);
}

.toast::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: #8b5cf6;
}

.toast__icon {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 9px;
  background: rgba(139, 92, 246, .2);
  color: #fff;
  font-size: 14px;
  line-height: 1;
}

.toast__text {
  min-width: 0;
  overflow-wrap: anywhere;
}

.toast.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.toast--success {
  border-color: rgba(52, 211, 153, .22);
}

.toast--success::before {
  background: #34d399;
}

.toast--success .toast__icon {
  background: rgba(52, 211, 153, .17);
  color: #bbf7d0;
}

.toast--error {
  border-color: rgba(248, 113, 113, .24);
}

.toast--error::before {
  background: #fb7185;
}

.toast--error .toast__icon {
  background: rgba(248, 113, 113, .16);
  color: #fecaca;
}

@media (max-width: 980px) {
  .rooms-grid,
  .about-layout,
  .about-grid,
  .about-split,
  .about-roadmap,
  .about-tech,
  .about-editorial,
  .about-process,
  .browser-workspace,
  .create-layout,
  .room-shell,
  .browser-layout,
  .home-story {
    grid-template-columns: 1fr;
  }

  .topbar {
    flex-wrap: wrap;
    gap: 10px 14px;
  }

  .topbar__nav {
    order: 3;
    flex-basis: 100%;
    justify-content: flex-start;
    overflow-x: auto;
    padding: 0 4px;
    scrollbar-width: none;
  }

  .topbar__nav::-webkit-scrollbar {
    display: none;
  }

  .room-sidebar {
    position: static;
    order: 2;
  }

  .room-main {
    display: contents;
  }

  .player-panel {
    order: 1;
  }

  .room-info {
    order: 3;
  }

  .queue-panel {
    order: 4;
  }

  .quick-actions {
    order: 5;
  }

  .quick-action-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .chat-panel {
    height: min(620px, calc(100svh - 300px));
    min-height: 360px;
  }

  .home-hero {
    min-height: 680px;
    align-items: end;
  }

  .home-hero__facts {
    position: static;
    width: min(420px, 100%);
    margin-top: 22px;
  }

  .page-hero {
    min-height: 620px;
  }

  .page-hero__facts {
    position: static;
    width: min(440px, 100%);
    margin-top: 22px;
  }

  .about-feature-list {
    grid-template-columns: 1fr;
  }

  .about-steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .site-footer {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 680px) {
  main {
    width: 100%;
    padding: 12px 10px 148px;
  }

  .topbar {
    position: fixed;
    top: auto;
    right: 10px;
    bottom: calc(10px + env(safe-area-inset-bottom));
    left: 10px;
    display: grid;
    grid-template-columns: minmax(0, 3fr) minmax(70px, 1fr);
    width: auto;
    align-items: center;
    gap: 6px;
    margin: 0;
    padding: 8px;
    border-radius: 10px;
  }

  .brand {
    display: none;
  }

  .topbar__nav {
    display: grid;
    grid-column: auto;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    order: initial;
    width: 100%;
    justify-content: space-between;
    gap: 4px;
    overflow: visible;
    padding: 0;
    border-bottom: 0;
    border-top: 0;
  }

  .topbar__nav a {
    display: grid;
    min-width: 0;
    min-height: 54px;
    place-items: center;
    gap: 4px;
    padding: 6px 2px;
    border-radius: 8px;
    color: rgba(217, 204, 239, .68);
    font-size: 11px;
    line-height: 1;
  }

  .topbar__nav a .nav-icon,
  .button--profile .nav-icon {
    display: block;
    width: 21px;
    height: 21px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
  }

  .topbar__nav a::after {
    display: none;
  }

  .topbar__nav a:hover,
  .topbar__nav a.is-active {
    background: rgba(255, 255, 255, .06);
    color: #fff;
    transform: none;
  }

  .topbar__actions {
    display: grid;
    grid-template-columns: 1fr;
    min-width: 0;
    width: 100%;
    margin-left: 0;
    padding-right: 0;
    gap: 6px;
  }

  .topbar__actions .button--login,
  .topbar__actions .button--create {
    display: none;
  }

  .button--profile {
    display: grid;
    width: 100%;
    min-height: 54px;
    place-items: center;
    gap: 4px;
    padding: 6px 2px;
    border: 0;
    border-radius: 8px;
    background: rgba(139, 92, 246, .16);
    color: rgba(239, 232, 250, .82);
    box-shadow: none;
    font-size: 11px;
    line-height: 1;
    white-space: nowrap;
  }

  .button--profile:hover {
    background: rgba(139, 92, 246, .24);
    color: #fff;
    transform: none;
  }

  .auth-modal {
    align-items: end;
    justify-items: stretch;
    padding: 0;
    background: rgba(5, 4, 8, .76);
  }

  .auth-modal__dialog {
    width: 100vw;
    max-height: 100svh;
    overflow-y: auto;
    border-right: 0;
    border-bottom: 0;
    border-left: 0;
    border-radius: 16px 16px 0 0;
    transform: translateY(100%);
    transition: transform .28s cubic-bezier(.2, .9, .2, 1);
  }

  .auth-modal.is-open .auth-modal__dialog {
    transform: translateY(0);
  }

  .auth-modal__art {
    height: 186px;
    padding: 8px 10px 0;
  }

  .auth-view {
    gap: 12px;
    padding: 20px 18px 22px;
  }

  .auth-view h2 {
    font-size: 28px;
  }

  .auth-view form {
    gap: 9px;
  }

  .page-heading,
  .page-head,
  .room-toolbar,
  .browser-search,
  .browser-address,
  .chat-form,
  .hero-actions,
  .page-hero__actions,
  .home-hero__actions,
  .cookie-modal__actions {
    align-items: stretch;
    flex-direction: column;
  }

  .home-hero {
    min-height: auto;
    padding: 28px 18px 18px;
    border-radius: 10px;
    background-position: 58% center;
  }

  .home-hero__content {
    gap: 16px;
    width: 100%;
  }

  .home-hero__content h1 {
    font-size: clamp(34px, 11vw, 46px);
    line-height: 1;
  }

  .home-hero__content p,
  .home-story p,
  .page-hero__copy p,
  .about-editorial p {
    font-size: 15px;
    line-height: 1.62;
  }

  .home-hero__actions .button,
  .page-hero__actions .button,
  .hero-actions .button {
    width: 100%;
    min-height: 46px;
  }

  .home-hero__facts {
    width: 100%;
    margin-top: 24px;
    gap: 0;
  }

  .home-hero__facts span {
    padding: 10px 0;
    font-size: 13px;
  }

  .page-hero {
    min-height: 570px;
    padding: 24px;
    border-radius: 10px;
  }

  .page-hero__copy {
    gap: 18px;
  }

  .page-hero__copy h1 {
    font-size: clamp(38px, 12vw, 56px);
  }

  .about-editorial,
  .about-process {
    padding: 42px 6px;
  }

  .about-editorial h2,
  .about-process h2 {
    font-size: 34px;
  }

  .about-editorial__lines article,
  .about-process li {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .about-editorial__lines span {
    grid-row: auto;
  }

  .home-story {
    gap: 24px;
    padding: 42px 4px;
  }

  .home-story h2 {
    font-size: 30px;
    line-height: 1.08;
  }

  .home-story__list p {
    padding: 16px 0;
  }

  .home-room-strip {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .home-room-mini {
    padding: 8px;
  }

  .rooms-section {
    gap: 12px;
    padding: 0 4px;
  }

  .section-title--quiet {
    padding: 0;
  }

  .section-title--quiet h2 {
    font-size: 24px;
  }

  .section-title--quiet span {
    font-size: 12px;
  }

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

  .room-tile {
    display: block;
    min-height: 0;
  }

  .room-tile__media {
    min-height: 0;
  }

  .room-tile__media > img,
  .room-tile__placeholder {
    height: auto;
    min-height: 0;
    aspect-ratio: 16 / 9;
  }

  .room-tile__online {
    top: 8px;
    right: auto;
    left: 8px;
    min-height: 20px;
    padding: 3px 6px;
    font-size: 10px;
  }

  .room-tile__body {
    align-content: start;
    gap: 6px;
    padding: 10px;
  }

  .room-tile__body h2 {
    display: -webkit-box;
    overflow: hidden;
    font-size: 15px;
    line-height: 1.18;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
  }

  .room-tile__body p {
    min-height: 0;
    font-size: 12px;
    line-height: 1.35;
    -webkit-line-clamp: 2;
  }

  .room-tile__details {
    gap: 8px;
    font-size: 11px;
  }

  .room-tile .meta-line {
    gap: 6px;
    font-size: 11px;
  }

  .room-tile .meta-line img {
    width: 15px;
    height: 15px;
  }

  .room-tile .meta-line b {
    padding: 3px 6px;
    font-size: 10px;
  }

  .room-tile .tile-actions .button {
    min-height: 34px;
    padding: 7px 10px;
    font-size: 12px;
  }

  .site-footer {
    width: calc(100% - 20px);
    margin-bottom: 24px;
  }

  .site-footer__top {
    justify-content: center;
    flex-direction: row;
    gap: 14px;
    text-align: center;
  }

  .site-footer__bottom {
    align-items: center;
    flex-direction: column;
    text-align: center;
  }

  .site-footer__links {
    width: 100%;
    gap: 12px 18px;
  }

  .cookie-modal {
    padding: 10px;
  }

  .cookie-modal__dialog {
    padding: 24px 18px 18px;
    border-radius: 10px;
  }

  .about-steps {
    grid-template-columns: 1fr;
  }

  .about-copy,
  .about-panel,
  .about-wide,
  .about-card,
  .about-roadmap div,
  .about-tech {
    padding: 20px;
  }

  .browser-address {
    display: grid;
    grid-template-columns: auto auto 1fr;
  }

  .browser-topline {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .browser-topline .button {
    grid-column: 1 / -1;
  }

  .browser-source-tabs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .browser-address--search {
    grid-template-columns: 1fr;
  }

  .browser-side-panel {
    position: static;
  }

  .browser-address .button {
    grid-column: 1 / -1;
  }

  .browser-frame iframe {
    height: 520px;
  }

  .chat-form {
    grid-template-columns: 1fr;
  }

  .room-shell {
    gap: 10px;
  }

  .player-panel {
    border-radius: 10px;
  }

  .watch-player {
    border-radius: 10px;
    touch-action: manipulation;
  }

  .watch-player::after {
    height: 70px;
  }

  .watch-player__mobile-title {
    display: flex;
  }

  .watch-player__media,
  .video-frame {
    min-height: 0;
    height: auto;
    aspect-ratio: 16 / 9;
  }

  .watch-player:fullscreen .watch-player__media {
    height: 100vh;
  }

  .watch-player__loader span {
    width: 44px;
    height: 44px;
    border-width: 4px;
  }

  .watch-player__playback-feedback {
    width: 72px;
    height: 72px;
  }

  .watch-player__seek-feedback {
    width: 68px;
    height: 68px;
    font-size: 15px;
  }

  .seek-feedback__arrow,
  .seek-feedback__icon {
    width: 42px;
    height: 42px;
  }

  .watch-player__up-next {
    gap: 9px;
    padding: 18px;
  }

  .watch-player__up-next strong {
    max-width: 94%;
    font-size: 18px;
    line-height: 1.18;
  }

  .up-next__brand {
    font-size: 15px;
  }

  .up-next__brand img {
    width: 28px;
    height: 28px;
  }

  .up-next__count {
    width: 54px;
    height: 54px;
    font-size: 24px;
  }

  .quick-action-grid,
  .management-cards {
    grid-template-columns: 1fr;
  }

  .watch-player__bar {
    flex-wrap: nowrap;
    overflow: hidden;
    gap: 7px;
    left: 8px;
    right: 8px;
    bottom: 8px;
    min-height: 48px;
    padding: 15px 8px 6px;
    border-radius: 10px;
  }

  .player-range {
    left: 8px;
    right: 8px;
    top: 7px;
    width: calc(100% - 16px);
    height: 3px;
  }

  .player-button {
    width: 30px;
    height: 30px;
  }

  .player-button img {
    width: 19px;
    height: 19px;
  }

  .player-icon--play {
    border-top-width: 7px;
    border-bottom-width: 7px;
    border-left-width: 11px;
  }

  .player-icon--pause {
    width: 12px;
    height: 15px;
    border-left-width: 4px;
    border-right-width: 4px;
  }

  .player-button--previous {
    display: none;
  }

  .player-time {
    flex: 0 0 auto;
    min-width: auto;
    margin-right: 0;
    font-size: 10px;
    white-space: nowrap;
  }

  .player-brand-mark {
    position: static;
    display: inline-flex;
    flex: 0 0 auto;
    gap: 5px;
    margin-left: auto;
    font-size: 11px;
    transform: none;
    white-space: nowrap;
  }

  .player-brand-mark img {
    width: 18px;
    height: 18px;
  }

  .player-volume {
    display: inline-flex;
    flex: 0 0 auto;
    gap: 2px;
    margin-left: 0;
  }

  .player-volume__range {
    width: 42px;
  }

  .player-settings-menu {
    right: 10px;
    bottom: 58px;
    width: min(280px, calc(100% - 20px));
  }

  .timeline-preview {
    width: auto;
    min-width: 58px;
    bottom: 58px;
  }

  .room-info,
  .queue-panel,
  .quick-actions,
  .chat-panel {
    border-radius: 10px;
    padding: 16px;
  }

  .room-info h2 {
    margin-top: 12px;
    font-size: 20px;
  }

  .room-info p {
    font-size: 14px;
  }

  .chat-panel {
    height: min(560px, 62svh);
    min-height: 430px;
    background: rgba(36, 30, 44, .72);
  }

  .chat-panel .section-title {
    margin-bottom: 8px;
  }

  .chat-message {
    padding: 10px;
    border-radius: 10px;
  }

  .chat-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 44px;
    gap: 8px;
  }

  .chat-form input[name="author"] {
    grid-column: 1 / -1;
  }

  .chat-send-button {
    min-width: 44px;
  }

  .quick-sites {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 420px) {
  .topbar {
    grid-template-columns: minmax(0, 3fr) minmax(70px, 1fr);
  }

  .topbar__actions {
    grid-template-columns: 1fr;
    width: 100%;
  }

  .topbar__nav {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    justify-content: space-between;
    gap: 4px;
  }

  .home-hero {
    padding: 24px 16px 16px;
  }

  .home-hero__content h1 {
    font-size: clamp(32px, 10.4vw, 40px);
  }
}

@media (max-width: 420px) {
  .player-time {
    font-size: 10px;
  }

  .watch-player__bar {
    gap: 3px;
  }

  .player-button {
    width: 27px;
    height: 30px;
  }

  .player-volume__range {
    width: 28px;
  }

  .player-brand-mark {
    gap: 3px;
    font-size: 11px;
  }

  .player-brand-mark img {
    width: 18px;
    height: 18px;
  }
}

/* Room polish overrides */
.player-settings-menu {
  background: rgba(36, 31, 44, .55);
}

.seek-feedback__arrow {
  display: grid;
  place-items: center;
}

.seek-feedback__arrow::before {
  inset: 7px;
  border-width: 4px;
  border-left-color: transparent;
}

.seek-feedback__arrow::after {
  top: 6px;
  right: 7px;
  width: 11px;
  height: 11px;
  border-top-width: 4px;
  border-right-width: 4px;
}

.seek-feedback__time {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 18px;
  font-weight: 700;
}

.watch-player__seek-feedback--left .seek-feedback__arrow::after {
  right: auto;
  left: 7px;
  transform: rotate(-155deg);
}

.settings-sheet__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.settings-sheet__head div {
  display: grid;
  gap: 4px;
}

.settings-sheet__head span,
.settings-group > strong,
.settings-field > span {
  color: rgba(239, 232, 250, .72);
  font-size: 13px;
  font-weight: 600;
}

.settings-sheet__head strong {
  color: #fff;
  font-size: 22px;
  line-height: 1.15;
}

.settings-sheet__head button {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 10px;
  background: rgba(255, 255, 255, .06);
  color: #fff;
  font: inherit;
  font-size: 22px;
  cursor: pointer;
}

.settings-group {
  display: grid;
  gap: 10px;
}

.settings-group--inline {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.settings-field {
  display: grid;
  gap: 8px;
}

.settings-field input {
  width: 100%;
  min-height: 48px;
  border: 1px solid rgba(196, 181, 253, .15);
  border-radius: 10px;
  background: rgba(9, 7, 14, .72);
  color: var(--text);
  padding: 0 14px;
  font: inherit;
}

.settings-check {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  padding: 10px 12px;
  border: 1px solid rgba(196, 181, 253, .13);
  border-radius: 10px;
  background: rgba(255, 255, 255, .04);
  color: var(--soft);
  font-size: 14px;
}

.settings-check input {
  accent-color: var(--accent);
}

body.room-settings-open,
body.participants-open {
  overflow: hidden;
}

body.room-settings-open::before,
body.participants-open::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 1090;
  display: block;
  background: rgba(5, 4, 8, .56);
  backdrop-filter: blur(10px);
}

.participant-all strong {
  padding: 6px 8px;
  color: #fff;
  font-size: 16px;
}

.participant-all {
  position: fixed;
  top: 50%;
  right: auto;
  left: 50%;
  z-index: 1100;
  display: grid;
  width: min(560px, calc(100vw - 32px));
  max-height: min(78vh, 720px);
  overflow: auto;
  gap: 10px;
  padding: 16px;
  border-radius: 16px;
  background: rgba(25, 21, 32, .96);
  box-shadow: 0 30px 90px rgba(0, 0, 0, .45);
  backdrop-filter: blur(18px);
  transform: translate(-50%, -50%);
}

.participant-all[hidden] {
  display: none;
}

@media (max-width: 680px) {
  main {
    padding-bottom: 28px;
  }

  .topbar {
    position: sticky;
    top: 8px;
    bottom: auto;
    left: auto;
    right: auto;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 4px;
    width: min(100% - 20px, 680px);
    margin: 8px auto 12px;
    padding: 6px;
    border-radius: 12px;
    background: rgba(36, 31, 44, .58);
    backdrop-filter: blur(18px);
  }

  .topbar__nav {
    grid-column: 1 / span 3;
    gap: 4px;
  }

  .topbar__nav a,
  .button--profile {
    min-height: 48px;
    border-radius: 9px;
    background: transparent;
    color: rgba(239, 232, 250, .68);
    font-size: 10px;
    font-weight: 600;
  }

  .topbar__nav a.is-active,
  .topbar__nav a:hover,
  .button--profile:hover {
    background: rgba(255, 255, 255, .07);
    color: #fff;
  }

  .topbar__actions {
    grid-column: 4;
  }

  .quick-actions {
    padding: 16px;
    background: rgba(42, 35, 52, .55);
  }

  .quick-action-grid {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(150px, 42vw);
    grid-template-columns: none;
    gap: 10px;
    margin: 0 -16px;
    overflow-x: auto;
    padding: 0 16px 4px;
    scroll-snap-type: x mandatory;
  }

  .quick-action-grid::-webkit-scrollbar {
    display: none;
  }

  .quick-action-card,
  .quick-action-card button {
    min-height: 118px;
    align-content: end;
    scroll-snap-align: start;
    background: rgba(45, 38, 55, .56);
  }

  .management-cards {
    grid-template-columns: 1fr;
  }

  .quick-settings,
  .participant-all {
    position: fixed;
    inset: auto 0 0;
    z-index: 1000;
    width: auto;
    max-height: min(82svh, 640px);
    overflow: auto;
    margin: 0;
    padding: 18px 16px calc(18px + env(safe-area-inset-bottom));
    border-radius: 18px 18px 0 0;
    background: rgba(36, 31, 44, .62);
    box-shadow: 0 -28px 70px rgba(0, 0, 0, .42);
    backdrop-filter: blur(16px);
    animation: mobile-sheet-up .24s cubic-bezier(.2, .9, .2, 1) both;
  }

  .quick-settings * ,
  .participant-all * {
    filter: none;
  }

  .participant-popover {
    display: none;
  }

  .participant-all {
    gap: 8px;
  }

  .participant-all span {
    min-height: 42px;
    display: flex;
    align-items: center;
  }

  .settings-group--inline {
    grid-template-columns: 1fr;
  }

  .player-volume {
    position: relative;
  }

  .player-volume__range {
    position: fixed;
    right: 22px;
    bottom: 86px;
    z-index: 8;
    width: 132px;
    height: 42px;
    padding: 0 16px;
    border-radius: 999px;
    background-color: rgba(255, 255, 255, .12);
    box-shadow: 0 18px 42px rgba(0, 0, 0, .34);
    transform: rotate(-90deg) translateX(24px);
    transform-origin: right center;
    opacity: 0;
    pointer-events: none;
    backdrop-filter: blur(16px);
    transition: opacity .16s ease, transform .18s ease;
  }

  .watch-player--volume-open .player-volume__range {
    opacity: 1;
    pointer-events: auto;
    transform: rotate(-90deg) translateX(0);
  }

  .player-settings-menu {
    right: 8px;
    bottom: 58px;
    width: min(310px, calc(100% - 16px));
    max-height: min(68svh, 430px);
    overflow: auto;
    border-radius: 12px;
    background: rgba(36, 31, 44, .55);
  }

  .settings-row,
  .settings-option,
  .settings-back {
    min-height: 48px;
    font-size: 14px;
  }

  .player-button--previous {
    display: none;
  }

  .room-shell {
    display: flex;
    flex-direction: column;
    gap: 10px;
  }

  .room-main,
  .room-sidebar {
    display: flex;
    flex-direction: column;
    gap: 10px;
  }

  .player-panel {
    order: 1;
  }

  .room-sidebar {
    order: 2;
  }

  .room-info {
    order: 3;
  }

  .queue-panel {
    order: 4;
  }

  .quick-actions {
    order: 5;
  }

  .room-shell .panel,
  .player-panel {
    background: rgba(42, 35, 52, .55);
    backdrop-filter: blur(18px);
  }

  .watch-player__mobile-title {
    min-height: 46px;
    background: rgba(7, 6, 10, .38);
  }

  .watch-player__mobile-title strong {
    font-size: 13px;
  }

  .chat-panel {
    height: min(68svh, 620px);
    min-height: 420px;
    padding: 16px;
    background: rgba(36, 30, 44, .55);
  }

  .chat-list {
    gap: 8px;
    padding-right: 0;
  }

  .chat-message {
    background: rgba(34, 29, 41, .55);
  }

  .chat-message--system {
    background: rgba(139, 92, 246, .16);
  }
}

/* Premium room experience */
.room-shell {
  grid-template-columns: minmax(0, 1fr) minmax(360px, 430px);
  gap: 18px;
}

.room-main {
  gap: 16px;
}

.room-shell .panel,
.player-panel {
  border-color: rgba(226, 214, 255, .12);
  border-radius: 14px;
  background: rgba(31, 27, 38, .62);
  box-shadow: 0 22px 70px rgba(0, 0, 0, .2);
}

.player-panel {
  overflow: hidden;
  padding: 0;
}

.watch-player {
  border: 0;
  border-radius: 14px;
  background: #050407;
}

.watch-player__bar {
  left: 14px;
  right: 14px;
  bottom: 14px;
  gap: 10px;
  border-color: rgba(255, 255, 255, .1);
  border-radius: 12px;
  background: rgba(8, 7, 11, .48);
  box-shadow: 0 16px 48px rgba(0, 0, 0, .28);
}

.player-button {
  border-radius: 10px;
  transition: background .16s ease, color .16s ease, transform .16s ease;
}

.player-button:hover,
.player-button:focus-visible {
  background: rgba(255, 255, 255, .12);
  transform: translateY(-1px);
}

.player-button--toggle {
  background: rgba(255, 255, 255, .12);
}

.player-button--next img {
  width: 18px;
  height: 18px;
}

.player-range,
.player-volume__range {
  background: linear-gradient(90deg, #fff 0 var(--range-fill, 0%), rgba(255, 255, 255, .25) var(--range-fill, 0%) 100%);
}

.player-range::-webkit-slider-thumb,
.player-volume__range::-webkit-slider-thumb {
  background: #fff;
  box-shadow: 0 0 0 4px rgba(255, 255, 255, .12);
}

.room-info {
  align-items: center;
}

.room-row__meta {
  gap: 8px;
}

.room-info h2 {
  max-width: 980px;
  font-weight: 700;
}

.participant-chip > span,
.participant-more {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  transition: transform .16s ease, border-color .16s ease, background .16s ease;
}

.participant-chip:hover > span,
.participant-more:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, .28);
}

.participant-sheet__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 4px 4px 10px;
}

.participant-sheet__head button {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 10px;
  background: rgba(255, 255, 255, .06);
  color: #fff;
  font: inherit;
  font-size: 20px;
  cursor: pointer;
}

.participant-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  padding: 10px;
  border: 1px solid rgba(226, 214, 255, .1);
  border-radius: 12px;
  background: rgba(255, 255, 255, .04);
}

.participant-row__avatar {
  display: grid;
  width: 44px;
  height: 44px;
  min-width: 44px;
  place-items: center;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  line-height: 1;
  text-align: center;
  text-transform: uppercase;
}

.participant-all .participant-row__avatar {
  padding: 0;
  background: var(--accent);
  color: #fff;
  border-radius: 999px;
}

.participant-row div {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.participant-row small {
  color: var(--muted);
}

.participant-row form {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.participant-row label {
  cursor: pointer;
}

.participant-row label input {
  position: absolute;
  opacity: 0;
}

.participant-row label span,
.participant-row button {
  display: grid;
  min-height: 34px;
  place-items: center;
  border: 1px solid rgba(226, 214, 255, .1);
  border-radius: 10px;
  background: rgba(255, 255, 255, .05);
  color: var(--soft);
  padding: 0 10px;
  font: inherit;
  font-size: 12px;
  font-weight: 650;
}

.participant-all .participant-row label span {
  padding: 0 10px;
  background: rgba(255, 255, 255, .05);
}

.participant-row label input:checked + span,
.participant-row button {
  border-color: rgba(139, 92, 246, .38);
  background: rgba(139, 92, 246, .22);
  color: #fff;
}

.chat-panel {
  height: calc(100svh - 124px);
  min-height: 640px;
  border-radius: 14px;
}

.chat-panel .section-title h2 {
  font-size: 24px;
}

.chat-message {
  position: relative;
  border-radius: 12px;
  background: rgba(20, 17, 26, .58);
  transition: transform .18s ease, border-color .18s ease, background .18s ease;
}

.chat-list {
  align-items: start;
}

.chat-message:not(.chat-message--system) {
  width: min(86%, 420px);
  justify-self: start;
}

.chat-message--own {
  justify-self: end;
  border-color: rgba(139, 92, 246, .26);
  background: rgba(139, 92, 246, .18);
}

.chat-message--own .chat-message__top,
.chat-message--own p {
  text-align: right;
}

.chat-message--own .chat-message__meta {
  flex-direction: row-reverse;
}

.chat-message:hover {
  border-color: rgba(226, 214, 255, .16);
  background: rgba(34, 29, 41, .72);
}

.chat-message__top,
.chat-message__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.chat-message__top span {
  color: rgba(217, 204, 239, .55);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.chat-message__meta {
  margin-top: 4px;
}

.chat-status {
  display: inline-grid;
  width: 22px;
  height: 22px;
  place-items: center;
  color: #9ee6c6;
}

.chat-status img,
.chat-reply-action img {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.chat-reply-action {
  display: inline-flex;
  width: auto;
  align-items: center;
  gap: 6px;
  margin: 0;
  padding: 5px 8px;
  border-radius: 9px;
}

.chat-form {
  align-items: end;
  border-top-color: rgba(226, 214, 255, .1);
}

.chat-input-wrap input {
  border-radius: 12px;
  background: rgba(7, 6, 10, .56);
}

.chat-emoji-panel {
  grid-template-columns: repeat(8, minmax(0, 1fr));
  border-radius: 14px;
  background: rgba(31, 27, 38, .92);
}

.chat-emoji-panel button {
  transition: transform .14s ease, background .14s ease;
}

.chat-emoji-panel button:hover,
.chat-emoji-panel button:focus-visible {
  transform: translateY(-2px) scale(1.08);
}

.chat-send-button {
  border-radius: 12px;
  transition: transform .16s ease, box-shadow .16s ease;
}

.chat-send-button:hover {
  box-shadow: 0 12px 26px rgba(139, 92, 246, .28);
  transform: translateY(-1px);
}

.queue-panel {
  overflow: hidden;
}

.queue-expand {
  border: 1px solid rgba(226, 214, 255, .1);
  border-radius: 10px;
  background: rgba(255, 255, 255, .05);
  color: var(--soft);
  padding: 9px 12px;
  font: inherit;
  font-size: 13px;
  font-weight: 650;
  cursor: pointer;
}

.queue-list {
  max-height: 365px;
  overflow: hidden;
  transition: max-height .24s ease;
}

.queue-panel.is-expanded .queue-list {
  max-height: 1200px;
  overflow: auto;
}

.queue-item {
  border-radius: 12px;
  transition: transform .18s ease, border-color .18s ease, background .18s ease;
}

.queue-item:hover {
  border-color: rgba(226, 214, 255, .2);
  transform: translateY(-2px);
}

.quick-action-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.quick-action-card {
  border-radius: 12px;
  background: rgba(20, 17, 26, .46);
}

.quick-action-card span {
  border-radius: 11px;
}

.settings-toggle-action {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 4px 12px;
  align-items: center;
  width: 100%;
  min-height: 62px;
  border: 1px solid rgba(226, 214, 255, .12);
  border-radius: 12px;
  background: rgba(255, 255, 255, .04);
  color: var(--text);
  padding: 12px;
  text-align: left;
  cursor: pointer;
  transition: border-color .16s ease, background .16s ease, opacity .16s ease, transform .16s ease;
}

.settings-toggle-action:hover,
.settings-toggle-action:focus-visible,
.settings-toggle-action:focus-within {
  border-color: rgba(196, 181, 253, .28);
  background: rgba(255, 255, 255, .06);
}

.settings-toggle-action:disabled {
  cursor: wait;
  opacity: .72;
}

.settings-toggle-action input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.settings-toggle-action > span {
  grid-row: span 2;
  position: relative;
  width: 46px;
  height: 26px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .14);
  transition: background .18s ease;
}

.settings-toggle-action > span::after {
  content: "";
  position: absolute;
  top: 4px;
  left: 4px;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background: #fff;
  transition: transform .18s ease, background .18s ease;
}

.settings-toggle-action.is-on > span {
  background: rgba(139, 92, 246, .8);
}

.settings-toggle-action.is-on > span::after {
  transform: translateX(20px);
}

.settings-toggle-action strong,
.settings-toggle-action small {
  min-width: 0;
}

.settings-toggle-action small {
  color: var(--muted);
}

.settings-toggle-action--check {
  min-height: 66px;
}

.settings-toggle-action--check.is-on {
  border-color: rgba(139, 92, 246, .36);
  background: rgba(139, 92, 246, .12);
}

.settings-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 10px;
}

.settings-actions .danger-form {
  display: grid;
  margin: 0;
}

@keyframes mobile-sheet-up {
  from {
    transform: translateY(100%);
  }
  to {
    transform: translateY(0);
  }
}

@media (max-width: 980px) {
  .room-shell {
    display: grid;
    grid-template-columns: 1fr;
  }

  .room-main {
    display: contents;
  }

  .player-panel {
    order: 1;
  }

  .room-sidebar {
    order: 2;
  }

  .room-info {
    order: 3;
  }

  .queue-panel {
    order: 4;
  }

  .quick-actions {
    order: 5;
  }
}

@media (max-width: 680px) {
  main {
    padding: 10px 10px calc(84px + env(safe-area-inset-bottom));
  }

  .topbar {
    position: fixed;
    top: auto;
    right: 8px;
    bottom: calc(8px + env(safe-area-inset-bottom));
    left: 8px;
    z-index: 900;
    display: grid;
    grid-template-columns: minmax(0, 3fr) minmax(64px, .82fr);
    width: auto;
    min-height: 52px;
    margin: 0;
    padding: 4px;
    border-radius: 12px;
    background: rgba(25, 21, 32, .94);
    box-shadow: 0 14px 38px rgba(0, 0, 0, .36);
    backdrop-filter: blur(18px);
  }

  .topbar__nav {
    grid-column: 1;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 2px;
    width: 100%;
    padding: 0;
    overflow: visible;
  }

  .topbar__actions {
    grid-column: 2;
    display: grid;
    width: 100%;
    gap: 0;
    margin: 0;
    padding: 0;
  }

  .topbar__nav a,
  .button--profile {
    min-height: 44px;
    gap: 2px;
    padding: 4px 2px;
    border-radius: 9px;
    background: transparent;
    font-size: 10px;
    line-height: 1;
  }

  .topbar__nav a .nav-icon,
  .button--profile .nav-icon {
    width: 18px;
    height: 18px;
  }

  .topbar__nav a.is-active,
  .topbar__nav a:hover,
  .button--profile:hover {
    background: rgba(255, 255, 255, .07);
  }

  .room-shell {
    gap: 8px;
  }

  .watch-player,
  .player-panel,
  .room-shell .panel {
    border-radius: 12px;
  }

  .watch-player__bar {
    left: 7px;
    right: 7px;
    bottom: 7px;
    gap: 5px;
    min-height: 46px;
    padding: 14px 7px 6px;
    border-radius: 10px;
  }

  .player-button {
    width: 30px;
    height: 30px;
  }

  .player-volume__range {
    position: absolute;
    left: 50%;
    right: auto;
    bottom: 38px;
    z-index: 20;
    display: block;
    width: 96px;
    height: 16px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background-color: transparent;
    box-shadow: none;
    opacity: 0;
    pointer-events: none;
    transform: translateX(-50%) translateY(8px) rotate(-90deg);
    transform-origin: center;
    transition: opacity .16s ease, transform .18s ease;
  }

  .watch-player--volume-open .player-volume__range {
    opacity: 1;
    pointer-events: auto;
    transform: translateX(-50%) translateY(0) rotate(-90deg);
  }

  .player-volume__range::-webkit-slider-runnable-track {
    height: 8px;
    border-radius: 999px;
    background: transparent;
  }

  .player-volume__range::-webkit-slider-thumb {
    width: 14px;
    height: 14px;
    margin-top: -3px;
    background: #fff;
    box-shadow: 0 0 0 2px rgba(255, 255, 255, .16);
  }

  .player-volume__range::-moz-range-track {
    height: 8px;
    border-radius: 999px;
    background: transparent;
  }

  .player-volume__range::-moz-range-thumb {
    width: 14px;
    height: 14px;
    border: 0;
    background: #fff;
  }

  .player-brand-mark {
    font-size: 10px;
  }

  .chat-panel {
    height: min(70svh, 640px);
    min-height: 460px;
  }

  .chat-message__top span {
    font-size: 11px;
  }

  .chat-emoji-panel {
    position: fixed;
    left: 12px;
    right: 12px;
    bottom: calc(78px + env(safe-area-inset-bottom));
    grid-template-columns: repeat(6, minmax(0, 1fr));
    z-index: 120;
  }

  .queue-list {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(210px, 72vw);
    grid-template-columns: none;
    max-height: none;
    overflow-x: auto;
    padding-bottom: 4px;
    scroll-snap-type: x mandatory;
  }

  .queue-panel.is-expanded {
    position: fixed;
    inset: auto 0 0;
    z-index: 1000;
    max-height: 86svh;
    overflow: auto;
    border-radius: 18px 18px 0 0;
    background: rgba(31, 27, 38, .94);
    animation: mobile-sheet-up .24s cubic-bezier(.2, .9, .2, 1) both;
  }

  .queue-panel.is-expanded .queue-list {
    grid-auto-flow: row;
    grid-auto-columns: initial;
    grid-template-columns: 1fr;
    overflow: visible;
  }

  .queue-item {
    scroll-snap-align: start;
  }

  .quick-action-grid {
    grid-auto-columns: minmax(150px, 43vw);
  }

  .participant-all {
    gap: 10px;
  }

  .participant-row {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .quick-settings,
  .participant-all,
  .queue-panel.is-expanded {
    z-index: 1100;
    max-height: min(82svh, 660px);
    background: rgba(25, 21, 32, .96);
    backdrop-filter: blur(18px);
  }

  .participant-all {
    top: auto;
    right: 0;
    bottom: 0;
    left: 0;
    width: auto;
    border-radius: 18px 18px 0 0;
    transform: none;
  }

  .quick-settings {
    padding-bottom: calc(18px + env(safe-area-inset-bottom));
  }

  .player-settings-menu {
    position: fixed;
    inset: auto 8px calc(60px + env(safe-area-inset-bottom)) auto;
    z-index: 1150;
    width: min(260px, calc(100vw - 16px));
    max-height: min(44svh, 320px);
    overflow-y: auto;
    padding: 6px;
    border-radius: 12px;
    background: rgba(36, 31, 44, .56);
    box-shadow: 0 18px 56px rgba(0, 0, 0, .38);
    backdrop-filter: blur(18px);
    transform-origin: bottom center;
  }

  .player-settings-menu .settings-panel-view {
    gap: 4px;
  }

  .player-settings-menu .settings-row,
  .player-settings-menu .settings-option,
  .player-settings-menu .settings-back {
    min-height: 36px;
    padding: 0 9px;
    border-radius: 9px;
    font-size: 12px;
  }

  .player-settings-menu .settings-row strong {
    max-width: 38%;
    overflow: hidden;
    font-size: 11px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .player-settings-menu .settings-option {
    padding-left: 32px;
  }
}

@media (max-width: 680px) {
  body:has(.auth-modal.is-open) .topbar,
  body.room-settings-open .topbar,
  body.participants-open .topbar {
    opacity: 0;
    pointer-events: none;
    transform: translateY(16px);
  }
}

/* Chat styling aligned with SkinzPay support chat */
.chat-list {
  align-content: start;
  align-items: stretch;
  gap: 11px;
  padding: 16px 12px;
  border-radius: 12px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .025), rgba(255, 255, 255, .01)),
    rgba(10, 8, 14, .24);
}

.chat-message {
  display: grid;
  width: fit-content;
  max-width: min(86%, 520px);
  gap: 6px;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  justify-self: start;
  user-select: none;
}

.chat-message:hover {
  border-color: transparent;
  background: transparent;
}

.chat-message.is-new,
.chat-message:last-child {
  animation: chat-message-in .24s ease;
}

.chat-message--own {
  justify-self: end;
  border-color: transparent;
  background: transparent;
}

.chat-message--system {
  justify-self: center;
  max-width: min(92%, 560px);
  border: 0;
  background: transparent;
  box-shadow: none;
}

.chat-message__top {
  display: flex;
  align-items: center;
  gap: 8px;
  color: rgba(217, 204, 239, .66);
  font-size: 11px;
  line-height: 1.2;
}

.chat-message--own .chat-message__top {
  justify-content: flex-end;
}

.chat-message__top strong {
  color: rgba(255, 255, 255, .78);
  font-size: 12px;
  font-weight: 650;
}

.chat-message__top span {
  color: rgba(217, 204, 239, .52);
  font-size: 11px;
}

.chat-message p {
  display: inline-flex;
  width: fit-content;
  max-width: 100%;
  margin: 0;
  padding: 12px 15px;
  border: 1px solid rgba(226, 214, 255, .1);
  border-radius: 18px 18px 18px 7px;
  background: rgba(255, 255, 255, .92);
  color: #211b2a;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.42;
  white-space: pre-wrap;
  word-break: break-word;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .16);
}

.chat-message--own p {
  justify-self: end;
  border-color: rgba(139, 92, 246, .34);
  border-radius: 18px 18px 7px 18px;
  background: linear-gradient(135deg, #7c3aed, #9b5cf6);
  color: #fff;
  text-align: left;
}

.chat-message--system p {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: rgba(217, 204, 239, .76);
  text-align: center;
  box-shadow: none;
}

.chat-collapse-button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 34px;
  padding: 0 10px;
  border: 1px solid rgba(226, 214, 255, .12);
  border-radius: 10px;
  background: rgba(255, 255, 255, .05);
  color: rgba(239, 232, 250, .82);
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
}

.chat-collapse-button img {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform .18s ease;
}

.chat-panel--collapsed .chat-collapse-button img {
  transform: rotate(180deg);
}

.player-chat-notice {
  position: absolute;
  top: 48px;
  right: 10px;
  z-index: 7;
  display: grid;
  width: min(320px, calc(100% - 20px));
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 14px;
  background: rgba(24, 20, 32, .9);
  color: #fff;
  box-shadow: 0 18px 46px rgba(0, 0, 0, .34);
  opacity: 0;
  pointer-events: none;
  transform: translateX(10px);
  transition: opacity .18s ease, transform .18s ease;
  backdrop-filter: blur(18px);
}

.player-chat-notice.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(0);
}

.player-chat-notice[hidden] {
  display: none;
}

.player-chat-notice__head button,
.player-chat-notice form {
  display: flex;
  align-items: center;
}

.player-chat-notice__head button {
  width: 100%;
  justify-content: space-between;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  font-weight: 800;
}

.player-chat-notice strong {
  color: #c4b5fd;
}

.player-chat-notice p {
  display: grid;
  gap: 3px;
  margin: 0;
  color: rgba(239, 232, 250, .82);
  font-size: 12px;
  line-height: 1.35;
}

.player-chat-notice p b,
.player-chat-notice p span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.player-chat-notice form {
  gap: 8px;
}

.player-chat-notice input {
  min-width: 0;
  flex: 1;
  height: 36px;
  padding: 0 11px;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 10px;
  background: rgba(7, 5, 10, .72);
  color: #fff;
  outline: none;
}

.player-chat-notice form button {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border: 0;
  border-radius: 10px;
  background: #8b5cf6;
  color: #fff;
  cursor: pointer;
}

.player-chat-notice form img {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.chat-reply {
  display: grid;
  gap: 2px;
  width: min(100%, 360px);
  min-width: 180px;
  padding: 8px 10px;
  border: 0;
  border-left: 3px solid currentColor;
  border-radius: 9px;
  background: rgba(255, 255, 255, .08);
  color: rgba(196, 181, 253, .95);
  cursor: pointer;
  font: inherit;
  text-align: left;
}

button.chat-reply {
  appearance: none;
}

.chat-message--own .chat-reply {
  justify-self: end;
  color: rgba(255, 255, 255, .92);
  background: rgba(255, 255, 255, .14);
}

.chat-reply b {
  color: inherit;
  font-size: 12px;
  font-weight: 700;
}

.chat-reply span {
  overflow: hidden;
  color: inherit;
  font-size: 12px;
  line-height: 1.35;
  opacity: .8;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-message__meta {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  min-height: 22px;
}

.chat-message--own .chat-message__meta {
  justify-content: flex-end;
}

.chat-reply-action {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 26px;
  margin: 0;
  padding: 0 8px;
  border: 0;
  border-radius: 9px;
  background: rgba(255, 255, 255, .06);
  color: rgba(217, 204, 239, .7);
  font-size: 12px;
  font-weight: 650;
}

.chat-reply-action:hover,
.chat-reply-action:focus-visible {
  background: rgba(255, 255, 255, .1);
  color: #fff;
}

.chat-status {
  color: #a7f3d0;
  opacity: .88;
}

.chat-form {
  padding: 10px 10px 0;
}

.chat-input-wrap input {
  min-height: 46px;
  border-radius: 14px;
  background: rgba(7, 6, 10, .74);
}

.chat-emoji-panel {
  border-radius: 16px;
  background: rgba(25, 21, 32, .96);
}

.chat-send-button {
  width: 46px;
  min-width: 46px;
  min-height: 46px;
  border-radius: 14px;
}

@keyframes chat-message-in {
  from {
    opacity: 0;
    transform: translateY(8px) scale(.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@media (max-width: 680px) {
  .chat-list {
    gap: 9px;
    padding: 12px 8px;
  }

  .chat-message {
    max-width: min(88%, 360px);
  }

  .chat-message p {
    padding: 10px 13px;
    font-size: 13px;
  }

  .chat-reply {
    min-width: 150px;
  }
}

.chat-message:not(.chat-message--system) {
  width: fit-content;
  max-width: min(86%, 520px);
}

.chat-message--own {
  justify-self: end !important;
  justify-items: end;
}

.chat-message.is-highlighted p {
  box-shadow: 0 0 0 3px rgba(196, 181, 253, .34), 0 10px 28px rgba(139, 92, 246, .24);
}

.chat-message--own .chat-message__meta {
  width: fit-content;
  justify-self: end;
  justify-content: flex-end;
  flex-direction: row;
}

.chat-message--own .chat-reply-action {
  order: 1;
}

.chat-message--own .chat-status {
  order: 2;
}

.chat-message:not(.chat-message--own):not(.chat-message--system) .chat-message__meta {
  width: fit-content;
  justify-self: start;
}

.room-sidebar .chat-list {
  display: grid;
  align-content: end;
  gap: 12px;
}

.room-sidebar .chat-message {
  width: fit-content !important;
  max-width: min(84%, 520px) !important;
  justify-self: start !important;
  justify-items: start !important;
}

.room-sidebar .chat-message--own {
  justify-self: end !important;
  justify-items: end !important;
}

.room-sidebar .chat-message--system {
  justify-self: stretch !important;
  width: auto !important;
  max-width: 100% !important;
  justify-items: center !important;
}

.room-sidebar .chat-message p {
  max-width: 100%;
  padding: 10px 13px !important;
  border: 1px solid rgba(226, 214, 255, .1) !important;
  border-radius: 16px 16px 16px 6px !important;
  background: rgba(42, 35, 54, .86) !important;
  color: rgba(246, 241, 255, .94) !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  line-height: 1.42 !important;
  box-shadow: 0 10px 22px rgba(0, 0, 0, .18) !important;
}

.room-sidebar .chat-message--own p {
  border-color: rgba(139, 92, 246, .34) !important;
  border-radius: 16px 16px 6px 16px !important;
  background: #8b5cf6 !important;
  color: #fff !important;
}

.room-sidebar .chat-message--system p {
  padding: 9px 12px !important;
  border: 1px solid rgba(196, 181, 253, .16) !important;
  border-radius: 12px !important;
  background: rgba(48, 39, 61, .82) !important;
  color: rgba(217, 204, 239, .82) !important;
  text-align: left !important;
  box-shadow: none !important;
}

.room-sidebar .chat-message__top {
  width: fit-content !important;
  max-width: 100% !important;
}

.room-sidebar .chat-message--own .chat-message__top {
  justify-content: flex-end !important;
}

.room-sidebar .chat-reply {
  width: min(100%, 320px) !important;
  min-width: 0 !important;
  border-left: 3px solid rgba(196, 181, 253, .85) !important;
  background: rgba(255, 255, 255, .08) !important;
}

.room-sidebar .chat-message--own .chat-reply {
  background: rgba(255, 255, 255, .14) !important;
}

.room-sidebar .chat-message--own .chat-message__top,
.room-sidebar .chat-message--own .chat-message__meta,
.room-sidebar .chat-message--own .chat-reply,
.room-sidebar .chat-message--own p {
  justify-self: end !important;
}

.room-sidebar .chat-message:not(.chat-message--own):not(.chat-message--system) .chat-message__top,
.room-sidebar .chat-message:not(.chat-message--own):not(.chat-message--system) .chat-message__meta,
.room-sidebar .chat-message:not(.chat-message--own):not(.chat-message--system) .chat-reply,
.room-sidebar .chat-message:not(.chat-message--own):not(.chat-message--system) p {
  justify-self: start !important;
}

.room-sidebar .chat-message__meta {
  width: fit-content !important;
  max-width: 100%;
}

.room-sidebar .chat-message--own .chat-message__meta {
  justify-content: flex-end !important;
}

.room-sidebar .chat-message:not(.chat-message--own):not(.chat-message--system) .chat-message__meta {
  justify-content: flex-start !important;
}

.room-sidebar .chat-reply-action {
  position: static;
  background: rgba(255, 255, 255, .07) !important;
  color: rgba(217, 204, 239, .78) !important;
}

.room-sidebar .chat-status {
  color: #a7f3d0 !important;
}

.room-sidebar .chat-panel {
  display: flex;
  flex-direction: column;
  height: calc(100vh - 118px);
  min-height: 560px;
  padding: 0;
  overflow: hidden;
  border-radius: 18px;
  background: rgba(17, 14, 23, .94);
}

.room-sidebar .chat-panel > .section-title {
  flex: 0 0 auto;
  padding: 16px 18px;
  border-bottom: 1px solid rgba(196, 181, 253, .1);
}

.room-sidebar .chat-panel > .section-title h2 {
  font-size: 17px;
}

.room-sidebar .chat-list {
  flex: 1 1 auto;
  align-content: end;
  gap: 13px;
  min-height: 0;
  padding: 16px 18px;
  overflow-y: auto;
  overflow-x: hidden;
}

.room-sidebar .chat-message {
  gap: 5px !important;
  max-width: 82% !important;
}

.room-sidebar .chat-message__top {
  gap: 6px;
  color: rgba(217, 204, 239, .5);
  font-size: 11px;
}

.room-sidebar .chat-message__top strong {
  color: rgba(217, 204, 239, .72);
  font-size: 11px;
  font-weight: 700;
}

.room-sidebar .chat-message p {
  padding: 9px 13px !important;
  border-radius: 15px 15px 15px 4px !important;
  background: rgba(24, 20, 32, .96) !important;
  color: rgba(239, 232, 250, .94) !important;
  font-size: 13.5px !important;
  font-weight: 600 !important;
  box-shadow: none !important;
}

.room-sidebar .chat-message--own p {
  border-color: transparent !important;
  border-radius: 15px 15px 4px 15px !important;
  background: #8b5cf6 !important;
  color: #fff !important;
}

.room-sidebar .chat-message--system {
  max-width: 100% !important;
  justify-self: center !important;
}

.room-sidebar .chat-message--system p {
  padding: 0 10px !important;
  border: 0 !important;
  background: transparent !important;
  color: rgba(217, 204, 239, .58) !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  line-height: 1.5 !important;
  text-align: center !important;
}

.room-sidebar .chat-message--system strong,
.room-sidebar .chat-message--system b {
  color: rgba(239, 232, 250, .8);
}

.room-sidebar .chat-message__meta {
  gap: 10px;
  min-height: 18px;
  color: rgba(217, 204, 239, .46);
  font-size: 11px;
}

.room-sidebar .chat-reply-action {
  min-height: 0;
  padding: 0;
  background: transparent !important;
  color: rgba(217, 204, 239, .52) !important;
  font-size: 11px;
}

.room-sidebar .chat-reply-action:hover,
.room-sidebar .chat-reply-action:focus-visible {
  color: rgba(239, 232, 250, .9) !important;
}

.room-sidebar .chat-reply {
  padding: 7px 9px !important;
  border-radius: 10px !important;
  background: rgba(255, 255, 255, .06) !important;
  color: rgba(217, 204, 239, .78) !important;
}

.room-sidebar .chat-form {
  flex: 0 0 auto;
  grid-template-columns: minmax(0, 1fr) 42px;
  gap: 8px;
  margin: 0;
  padding: 14px;
  border-top: 1px solid rgba(196, 181, 253, .1);
}

.room-sidebar .chat-input-wrap input {
  min-height: 42px;
  border-radius: 999px;
  background: rgba(24, 20, 32, .96);
}

.room-sidebar .chat-send-button {
  width: 42px;
  min-width: 42px;
  min-height: 42px;
  border-radius: 999px;
}

@media (max-width: 680px) {
  body.room-settings-open::before,
  body.participants-open::before {
    z-index: 1190 !important;
    background: rgba(5, 4, 8, .62) !important;
    backdrop-filter: none !important;
  }

  .quick-settings {
    position: fixed !important;
    inset: auto 0 0 0 !important;
    z-index: 1300 !important;
    display: grid !important;
    width: 100vw !important;
    max-height: min(84svh, 680px) !important;
    overflow-y: auto !important;
    margin: 0 !important;
    padding: 18px 16px calc(20px + env(safe-area-inset-bottom)) !important;
    border-radius: 18px 18px 0 0 !important;
    background: #191520 !important;
    box-shadow: 0 -28px 76px rgba(0, 0, 0, .52) !important;
    backdrop-filter: none !important;
    filter: none !important;
    transform: translateY(0) !important;
  }

  .quick-settings[hidden] {
    display: none !important;
  }

  .topbar {
    position: fixed !important;
    inset: auto auto calc(12px + env(safe-area-inset-bottom)) 50% !important;
    width: min(344px, calc(100vw - 28px));
    max-width: calc(100vw - 28px) !important;
    transform: translateX(-50%) !important;
    z-index: 900 !important;
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 2px;
    min-height: 58px;
    padding: 5px;
    border: 1px solid rgba(196, 181, 253, .18);
    background:
      linear-gradient(180deg, rgba(255, 255, 255, .1), rgba(255, 255, 255, .04)),
      rgba(24, 20, 32, .76);
    box-shadow:
      0 16px 36px rgba(0, 0, 0, .34),
      inset 0 1px 0 rgba(255, 255, 255, .12);
  }

  .topbar__nav {
    display: grid !important;
    grid-column: 1 / span 3;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 3px;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: visible !important;
  }

  .topbar__actions {
    display: grid !important;
    grid-column: 4;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    gap: 0 !important;
  }

  .topbar__actions .button--login,
  .topbar__actions .button--create {
    display: none !important;
  }

  .topbar__nav a,
  .button--profile {
    display: grid !important;
    width: 100%;
    min-height: 48px;
    padding: 5px 1px;
    justify-items: center;
    align-content: center;
    gap: 2px;
    border-radius: 10px;
    background: transparent !important;
    box-shadow: none !important;
    color: rgba(239, 232, 250, .7);
    font-size: 9px;
    font-weight: 800;
    line-height: 1;
    transform: none;
  }

  .topbar__nav a .nav-icon,
  .button--profile .nav-icon {
    width: 19px;
    height: 19px;
  }

  .topbar__nav a.is-active,
  .topbar__nav a:hover,
  .button--profile:hover {
    background: transparent !important;
    color: #fff;
    transform: translateY(-1px);
  }

  .topbar__nav a.is-active .nav-icon,
  .button--profile:hover .nav-icon {
    color: #fff;
    transform: scale(1.04);
  }

  .topbar__nav a::after,
  .button--profile::after {
    display: none !important;
  }

  body.room-settings-open .topbar,
  body.participants-open .topbar,
  body:has(.auth-modal.is-open) .topbar {
    opacity: 0 !important;
    pointer-events: none !important;
    transform: translateX(-50%) translateY(16px) !important;
  }

  .chat-message:not(.chat-message--system) {
    max-width: min(88%, 360px);
  }

  .chat-message {
    display: grid !important;
    width: fit-content !important;
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
  }

  .chat-message--own {
    justify-self: end !important;
    justify-items: end !important;
  }

  .chat-message:not(.chat-message--own):not(.chat-message--system) {
    justify-self: start !important;
    justify-items: start !important;
  }

  .chat-message__meta {
    width: fit-content !important;
    max-width: 100% !important;
  }

  .chat-message--own .chat-message__meta {
    justify-self: end !important;
    justify-content: flex-end !important;
    flex-direction: row !important;
  }

  .chat-message:not(.chat-message--own):not(.chat-message--system) .chat-message__meta {
    justify-self: start !important;
    justify-content: flex-start !important;
  }

  .chat-reply-action {
    display: none !important;
  }
}

.room-settings-modal {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: grid;
  align-items: center;
  justify-items: center;
  padding: 24px;
  background: rgba(5, 4, 8, .7);
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease;
}

.participants-modal {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: grid;
  align-items: center;
  justify-items: center;
  padding: 24px;
  background: rgba(5, 4, 8, .7);
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease;
}

.room-settings-modal[hidden] {
  display: none !important;
}

.participants-modal[hidden] {
  display: none !important;
}

.room-settings-modal.is-open {
  opacity: 1;
  pointer-events: auto;
}

.participants-modal.is-open {
  opacity: 1;
  pointer-events: auto;
}

.room-settings-modal .quick-settings {
  position: relative !important;
  inset: auto !important;
  z-index: 1 !important;
  display: grid !important;
  width: min(560px, calc(100vw - 48px)) !important;
  max-height: min(82svh, 720px) !important;
  overflow-y: auto !important;
  gap: 12px;
  margin: 0 !important;
  padding: 20px !important;
  border: 1px solid rgba(196, 181, 253, .16) !important;
  border-radius: 18px !important;
  background: #191520 !important;
  box-shadow: 0 28px 80px rgba(0, 0, 0, .5) !important;
  backdrop-filter: none !important;
  filter: none !important;
  transform: translateY(14px) scale(.98) !important;
  transition: transform .28s cubic-bezier(.2, .9, .2, 1), opacity .2s ease;
}

.participants-modal .participant-all {
  position: relative !important;
  inset: auto !important;
  z-index: 1 !important;
  display: grid !important;
  width: min(560px, calc(100vw - 48px)) !important;
  max-height: min(82svh, 720px) !important;
  overflow-y: auto !important;
  gap: 12px;
  margin: 0 !important;
  padding: 20px !important;
  border: 1px solid rgba(196, 181, 253, .16) !important;
  border-radius: 18px !important;
  background: #191520 !important;
  box-shadow: 0 28px 80px rgba(0, 0, 0, .5) !important;
  backdrop-filter: none !important;
  filter: none !important;
  transform: translateY(14px) scale(.98) !important;
  transition: transform .28s cubic-bezier(.2, .9, .2, 1), opacity .2s ease;
}

.room-settings-modal.is-open .quick-settings {
  transform: translateY(0) scale(1) !important;
}

.participants-modal.is-open .participant-all {
  transform: translateY(0) scale(1) !important;
}

body.room-settings-open::before,
body.participants-open::before {
  display: none !important;
}

body.room-settings-open,
body.participants-open {
  overflow: hidden !important;
}

body.room-settings-open .room-settings-modal,
body.participants-open .participants-modal {
  isolation: isolate;
}

@media (max-width: 680px) {
  html,
  body {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
  }

  main {
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
  }

  .auth-code-cells {
    gap: 6px;
  }

  .auth-code-panel {
    padding: 14px;
    border-radius: 13px;
  }

  .auth-code-panel::before {
    top: 14px;
    right: 14px;
    width: 36px;
    height: 36px;
    border-radius: 11px;
  }

  .auth-code-panel::after {
    top: 25px;
    right: 25px;
  }

  .auth-code-panel > strong {
    font-size: 16px;
  }

  .auth-code-cells input {
    height: 52px;
    border-radius: 10px;
    font-size: 22px;
  }

  .auth-code-resend {
    align-items: flex-start;
    flex-direction: column;
    gap: 6px;
  }

  .room-settings-modal {
    position: fixed !important;
    inset: 0 !important;
    z-index: 10000 !important;
    align-items: end;
    justify-items: stretch;
    padding: 0;
    background: rgba(5, 4, 8, .76);
  }

  .participants-modal {
    position: fixed !important;
    inset: 0 !important;
    z-index: 10000 !important;
    align-items: end;
    justify-items: stretch;
    padding: 0;
    background: rgba(5, 4, 8, .76);
  }

  .room-settings-modal .quick-settings {
    width: 100vw !important;
    max-height: min(94svh, 760px) !important;
    padding: 18px 16px calc(18px + env(safe-area-inset-bottom)) !important;
    border-right: 0 !important;
    border-bottom: 0 !important;
    border-left: 0 !important;
    border-radius: 18px 18px 0 0 !important;
    transform: translateY(100%) !important;
  }

  .participants-modal .participant-all {
    width: 100vw !important;
    max-height: min(94svh, 760px) !important;
    padding: 18px 16px calc(18px + env(safe-area-inset-bottom)) !important;
    border-right: 0 !important;
    border-bottom: 0 !important;
    border-left: 0 !important;
    border-radius: 18px 18px 0 0 !important;
    transform: translateY(100%) !important;
  }

  .room-settings-modal.is-open .quick-settings {
    transform: translateY(0) !important;
  }

  .participants-modal.is-open .participant-all {
    transform: translateY(0) !important;
  }

  .watch-player .player-volume {
    position: static !important;
    display: inline-flex !important;
    flex: 0 0 auto !important;
    align-items: center !important;
    gap: 5px !important;
    margin-left: 0 !important;
  }

  .watch-player .player-volume__range,
  .watch-player.watch-player--volume-open .player-volume__range {
    position: static !important;
    left: auto !important;
    right: auto !important;
    bottom: auto !important;
    z-index: auto !important;
    display: block !important;
    width: clamp(42px, 13vw, 58px) !important;
    height: 4px !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 999px !important;
    background-color: transparent !important;
    box-shadow: none !important;
    opacity: 1 !important;
    pointer-events: auto !important;
    transform: none !important;
    backdrop-filter: none !important;
  }

  .watch-player .player-volume__range::-webkit-slider-runnable-track {
    height: 4px !important;
  }

  .watch-player .player-volume__range::-webkit-slider-thumb {
    width: 12px !important;
    height: 12px !important;
    margin-top: -4px !important;
    box-shadow: none !important;
  }

  .watch-player .player-volume__range::-moz-range-track {
    height: 4px !important;
  }

  .watch-player .player-volume__range::-moz-range-thumb {
    width: 12px !important;
    height: 12px !important;
  }

  .room-shell {
    width: 100% !important;
    max-width: 100% !important;
    gap: 10px !important;
    margin-right: 0 !important;
    margin-left: 0 !important;
    padding: 0 !important;
    overflow-x: hidden !important;
  }

  .room-main {
    width: 100% !important;
    max-width: none !important;
    gap: 10px !important;
  }

  .player-panel {
    width: 100% !important;
    max-width: 100% !important;
    margin-right: 0 !important;
    margin-left: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    overflow: hidden !important;
  }

  .player-panel--active {
    position: relative !important;
    height: clamp(196px, 56.25vw, 232px) !important;
    min-height: 0 !important;
    max-height: clamp(196px, 56.25vw, 232px) !important;
    aspect-ratio: auto !important;
  }

  .player-panel--active > .watch-player {
    position: absolute !important;
    inset: 0 !important;
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    height: 100% !important;
    min-height: 0 !important;
    max-height: none !important;
    aspect-ratio: auto !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: #000 !important;
    box-shadow: none !important;
    overflow: hidden !important;
  }

  .room-sidebar,
  .room-shell .panel,
  .chat-panel,
  .room-info,
  .queue-panel,
  .quick-actions {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  .player-panel .watch-player__media,
  .player-panel .watch-player__poster {
    position: absolute !important;
    inset: 0 !important;
    width: 100% !important;
    height: 100% !important;
    min-height: 0 !important;
    max-height: none !important;
    aspect-ratio: auto !important;
    border-radius: 0 !important;
  }

  .player-panel .watch-player__media {
    object-fit: contain !important;
  }

  .watch-player__mobile-title {
    top: 0 !important;
    right: 0 !important;
    left: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    min-height: 40px !important;
    padding: 7px 12px !important;
    border-radius: 0 !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
  }

  .watch-player__mobile-title strong {
    min-width: 0 !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }

  .watch-player__bar {
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100% !important;
    min-height: 42px !important;
    gap: 3px !important;
    padding: 12px 5px 5px !important;
    border-right: 0 !important;
    border-bottom: 0 !important;
    border-left: 0 !important;
    border-radius: 0 !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
  }

  .player-range {
    left: 5px !important;
    right: 5px !important;
    top: 4px !important;
    width: calc(100% - 10px) !important;
  }

  .player-button {
    width: 28px !important;
    height: 28px !important;
    min-width: 28px !important;
    flex: 0 0 28px !important;
  }

  .player-button img {
    width: 17px !important;
    height: 17px !important;
  }

  .player-time {
    min-width: 72px !important;
    max-width: 82px !important;
    margin-right: 0 !important;
    overflow: hidden !important;
    font-size: 10px !important;
    white-space: nowrap !important;
  }

  .player-brand-mark {
    position: static !important;
    flex: 0 1 auto !important;
    min-width: 0 !important;
    gap: 4px !important;
    margin-left: auto !important;
    font-size: 10px !important;
    transform: none !important;
  }

  .player-brand-mark img {
    width: 16px !important;
    height: 16px !important;
  }

  .player-volume {
    flex: 0 0 auto !important;
    gap: 0 !important;
  }

  .player-volume__range {
    display: none !important;
  }

  .watch-player--volume-open .player-volume__range {
    display: block !important;
  }

  .quick-action-grid {
    grid-auto-flow: column !important;
    grid-auto-columns: minmax(158px, 48%) !important;
    grid-template-columns: none !important;
    gap: 10px !important;
    margin-right: 0 !important;
    margin-left: 0 !important;
    padding-right: 16px !important;
    padding-left: 0 !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    scroll-snap-type: x mandatory !important;
  }

  .quick-action-card,
  .quick-action-card button {
    min-width: 0 !important;
    min-height: 104px !important;
    align-content: end !important;
    gap: 5px !important;
    padding: 13px !important;
    overflow: hidden !important;
    scroll-snap-align: start !important;
  }

  .quick-action-card strong,
  .quick-action-card small {
    min-width: 0 !important;
    max-width: 100% !important;
    overflow-wrap: normal !important;
    word-break: normal !important;
    hyphens: none !important;
    line-height: 1.25 !important;
  }

  .quick-action-card strong {
    font-size: 13px !important;
  }

  .quick-action-card small {
    font-size: 12px !important;
  }

  .topbar {
    width: min(372px, calc(100vw - 12px)) !important;
    max-width: calc(100vw - 12px) !important;
    min-height: 62px !important;
    padding: 6px !important;
  }

  .topbar__nav a,
  .button--profile {
    min-height: 50px !important;
    font-size: 10px !important;
    font-weight: 650 !important;
  }

  .topbar__nav a .nav-icon,
  .button--profile .nav-icon {
    width: 21px !important;
    height: 21px !important;
  }

  .button--profile span {
    font-size: 14px !important;
    font-weight: 650 !important;
  }
}

@media (max-width: 920px) {
  html,
  body {
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: hidden !important;
  }

  body {
    overscroll-behavior-x: none;
  }

  main {
    width: 100% !important;
    max-width: 100vw !important;
    overflow-x: clip !important;
    padding: 6px 6px calc(80px + env(safe-area-inset-bottom)) !important;
  }

  .room-shell {
    display: flex !important;
    width: 100% !important;
    max-width: 100% !important;
    flex-direction: column !important;
    gap: 8px !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow-x: clip !important;
  }

  .room-main {
    display: contents !important;
  }

  .room-sidebar {
    position: static !important;
    display: contents !important;
    width: 100% !important;
  }

  .player-panel {
    order: 1 !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: #050407 !important;
    box-shadow: none !important;
    overflow: hidden !important;
  }

  .player-panel--active {
    position: relative !important;
    height: clamp(220px, 64vw, 330px) !important;
    min-height: 0 !important;
    max-height: 330px !important;
    aspect-ratio: auto !important;
    contain: layout paint !important;
  }

  .player-panel--active > .watch-player {
    position: absolute !important;
    inset: 0 !important;
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    min-width: 0 !important;
    min-height: 0 !important;
    max-width: 100% !important;
    max-height: 100% !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: #050407 !important;
    box-shadow: none !important;
    overflow: hidden !important;
  }

  .player-panel--active .watch-player__media,
  .player-panel--active .watch-player__poster {
    position: absolute !important;
    inset: 0 !important;
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    min-width: 0 !important;
    min-height: 0 !important;
    max-width: 100% !important;
    max-height: 100% !important;
    aspect-ratio: auto !important;
    border: 0 !important;
    border-radius: 0 !important;
    object-fit: cover !important;
  }

  .player-panel--active iframe.watch-player__media {
    object-fit: initial !important;
  }

  .watch-player__mobile-title {
    top: 0 !important;
    right: 0 !important;
    left: 0 !important;
    z-index: 4 !important;
    display: flex !important;
    width: 100% !important;
    min-height: 36px !important;
    max-height: 36px !important;
    align-items: center !important;
    gap: 8px !important;
    padding: 7px 12px !important;
    border-radius: 0 !important;
    background: rgba(8, 6, 12, .68) !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
  }

  .watch-player__mobile-title span {
    display: none !important;
  }

  .watch-player__mobile-title strong {
    min-width: 0 !important;
    width: 100% !important;
    overflow: hidden !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    line-height: 1.15 !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }

  .watch-player__bar {
    right: 0 !important;
    bottom: 0 !important;
    left: 0 !important;
    z-index: 5 !important;
    display: grid !important;
    grid-template-columns: 30px 30px minmax(74px, auto) minmax(0, 1fr) 30px 30px 30px !important;
    width: 100% !important;
    min-height: 44px !important;
    max-height: 44px !important;
    align-items: center !important;
    gap: 2px !important;
    padding: 13px 5px 4px !important;
    border: 0 !important;
    border-top: 1px solid rgba(255, 255, 255, .12) !important;
    border-radius: 0 !important;
    background: rgba(8, 6, 12, .82) !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
    backdrop-filter: none !important;
  }

  .player-range {
    position: absolute !important;
    top: 4px !important;
    right: 5px !important;
    left: 5px !important;
    width: calc(100% - 10px) !important;
    height: 3px !important;
  }

  .player-button {
    width: 28px !important;
    min-width: 28px !important;
    height: 28px !important;
    min-height: 28px !important;
    padding: 0 !important;
  }

  .player-button img {
    width: 17px !important;
    height: 17px !important;
  }

  .player-inline-form {
    display: block !important;
    width: 28px !important;
    min-width: 28px !important;
    height: 28px !important;
  }

  .player-time {
    min-width: 70px !important;
    max-width: 86px !important;
    margin: 0 !important;
    overflow: hidden !important;
    font-size: 10px !important;
    line-height: 1 !important;
    white-space: nowrap !important;
  }

  .player-brand-mark {
    position: static !important;
    display: inline-flex !important;
    min-width: 0 !important;
    justify-content: center !important;
    gap: 4px !important;
    margin: 0 !important;
    overflow: hidden !important;
    font-size: 10px !important;
    line-height: 1 !important;
    white-space: nowrap !important;
    transform: none !important;
  }

  .player-brand-mark img {
    width: 16px !important;
    height: 16px !important;
  }

  .player-volume {
    display: inline-grid !important;
    width: 28px !important;
    min-width: 28px !important;
    height: 28px !important;
    place-items: center !important;
    margin: 0 !important;
  }

  .player-volume__range {
    display: none !important;
  }

  .watch-player.watch-player--volume-open .player-volume__range {
    position: absolute !important;
    right: 42px !important;
    bottom: 46px !important;
    z-index: 8 !important;
    display: block !important;
    width: 92px !important;
    height: 4px !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 999px !important;
    background: linear-gradient(90deg, #fff 0 var(--range-fill, 0%), rgba(255, 255, 255, .32) var(--range-fill, 0%) 100%) !important;
    box-shadow: 0 10px 28px rgba(0, 0, 0, .32) !important;
    transform: rotate(-90deg) !important;
    transform-origin: right center !important;
  }

  .player-settings-menu {
    right: 10px !important;
    bottom: 50px !important;
    left: auto !important;
    width: min(270px, calc(100vw - 28px)) !important;
    max-height: min(42svh, 248px) !important;
    padding: 5px !important;
    border: 1px solid rgba(226, 214, 255, .12) !important;
    border-radius: 10px !important;
    background: rgba(18, 15, 24, .92) !important;
    box-shadow: 0 18px 48px rgba(0, 0, 0, .42) !important;
    overflow-y: auto !important;
    backdrop-filter: none !important;
  }

  .player-settings-menu .settings-row,
  .player-settings-menu .settings-option,
  .player-settings-menu .settings-back {
    min-height: 32px !important;
    padding: 0 8px !important;
    border-radius: 8px !important;
    font-size: 11px !important;
    line-height: 1.1 !important;
  }

  .player-settings-menu .settings-row {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto !important;
    gap: 10px !important;
  }

  .player-settings-menu .settings-row strong {
    max-width: 104px !important;
    overflow: hidden !important;
    font-size: 10px !important;
    font-weight: 600 !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }

  .player-settings-menu .settings-options {
    gap: 2px !important;
  }

  .chat-panel {
    order: 2 !important;
    display: grid !important;
    grid-template-rows: auto minmax(0, 1fr) auto !important;
    width: 100% !important;
    min-height: 520px !important;
    height: max(520px, calc(100svh - clamp(220px, 64vw, 330px) - 84px)) !important;
    max-height: none !important;
    margin: 0 !important;
    padding: 16px !important;
    border-radius: 10px !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
  }

  .chat-panel--collapsed {
    min-height: 58px !important;
    height: 58px !important;
    padding: 12px 14px !important;
  }

  .chat-panel--collapsed .chat-list,
  .chat-panel--collapsed .chat-form {
    display: none !important;
  }

  .chat-panel .section-title {
    align-items: center !important;
    margin-bottom: 10px !important;
  }

  .chat-panel .section-title h2 {
    font-size: 28px !important;
  }

  .chat-list {
    gap: 12px !important;
    padding: 12px 8px !important;
  }

  .chat-message p {
    padding: 12px 14px !important;
    font-size: 15px !important;
    line-height: 1.42 !important;
  }

  .chat-message--system p {
    padding: 0 !important;
    background: transparent !important;
    font-size: 13px !important;
  }

  .chat-input-wrap input {
    min-height: 50px !important;
    font-size: 15px !important;
  }

  .chat-send-button {
    width: 50px !important;
    min-width: 50px !important;
    min-height: 50px !important;
  }

  .chat-list {
    min-height: 0 !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
  }

  .room-info {
    order: 3 !important;
  }

  .queue-panel {
    order: 4 !important;
  }

  .quick-actions {
    order: 5 !important;
  }

  .room-info,
  .queue-panel,
  .quick-actions {
    width: 100% !important;
    margin: 0 !important;
    padding: 16px !important;
    border-radius: 10px !important;
    box-sizing: border-box !important;
  }

  .quick-action-grid {
    display: grid !important;
    grid-auto-flow: column !important;
    grid-auto-columns: minmax(158px, 48%) !important;
    grid-template-columns: none !important;
    gap: 10px !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    padding: 0 10px 2px 0 !important;
    scroll-snap-type: x mandatory !important;
  }

  .quick-action-card,
  .quick-action-card button {
    min-height: 104px !important;
    padding: 13px !important;
    overflow: hidden !important;
    scroll-snap-align: start !important;
  }

  .watch-player:not(.watch-player--volume-open) .player-volume__range {
    display: none !important;
    opacity: 0 !important;
    pointer-events: none !important;
  }

  .browser-shell--search {
    display: grid !important;
    width: 100% !important;
    max-width: 100% !important;
    gap: 10px !important;
    margin: 0 !important;
    overflow-x: hidden !important;
  }

  .browser-search-head {
    display: grid !important;
    grid-template-columns: 38px minmax(0, 1fr) !important;
    gap: 10px !important;
    align-items: center !important;
  }

  .browser-search-head h1 {
    font-size: 22px !important;
  }

  .browser-mode-switch {
    grid-column: 1 / -1 !important;
    width: 100% !important;
  }

  .browser-mode-switch button {
    flex: 1 !important;
  }

  .browser-topline {
    display: grid !important;
    grid-template-columns: 38px minmax(0, 1fr) !important;
    gap: 10px !important;
    padding: 14px !important;
    border-radius: 10px !important;
  }

  .browser-topline h1 {
    font-size: 26px !important;
    line-height: 1.05 !important;
  }

  .browser-topline p {
    display: none !important;
  }

  .browser-topline .button {
    display: none !important;
  }

  .browser-workspace {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 10px !important;
  }

  .browser-search-panel {
    gap: 12px !important;
    padding: 12px !important;
    border-radius: 10px !important;
  }

  .browser-address--search {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 8px !important;
  }

  .browser-address--search input {
    min-height: 50px !important;
    font-size: 15px !important;
  }

  .browser-address--search .button {
    min-height: 46px !important;
  }

  .browser-status {
    min-height: 0 !important;
    padding: 10px 12px !important;
    font-size: 13px !important;
    line-height: 1.35 !important;
  }

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

  .browser-result-card {
    display: grid !important;
    grid-template-columns: 1fr !important;
    grid-template-rows: auto auto !important;
    gap: 0 !important;
    min-height: 0 !important;
    padding: 0 !important;
    border-radius: 14px !important;
  }

  .browser-result-card__thumb {
    grid-row: auto !important;
    width: 100% !important;
    min-height: 0 !important;
    border-radius: 0 !important;
    overflow: hidden !important;
  }

  .browser-result-card__body {
    padding: 9px 10px 10px !important;
  }

  .browser-result-card strong {
    align-self: end !important;
    padding: 0 !important;
    overflow: hidden !important;
    font-size: 14px !important;
    line-height: 1.25 !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
  }

  .browser-result-card small {
    align-self: start !important;
    padding: 0 !important;
    font-size: 12px !important;
  }

  .browser-pagination {
    justify-content: flex-start !important;
    overflow-x: auto !important;
    flex-wrap: nowrap !important;
    padding: 4px 0 2px !important;
  }

  .browser-pagination button {
    flex: 0 0 auto !important;
    min-width: 38px !important;
  }

  .browser-side-panel {
    display: none !important;
  }
}

/* Final mobile header lock: logo + three links + profile/login always fit. */
@media (max-width: 920px) {
  body {
    padding-top: calc(70px + env(safe-area-inset-top)) !important;
  }

  .topbar {
    position: fixed !important;
    inset: calc(8px + env(safe-area-inset-top)) 8px auto 8px !important;
    z-index: 1200 !important;
    display: grid !important;
    grid-template-columns: 34px minmax(0, 1fr) 54px !important;
    gap: 6px !important;
    width: calc(100dvw - 16px) !important;
    max-width: calc(100dvw - 16px) !important;
    height: 56px !important;
    min-height: 56px !important;
    padding: 7px 8px !important;
    overflow: hidden !important;
    border-radius: 12px !important;
  }

  .topbar .brand {
    display: grid !important;
    width: 34px !important;
    height: 42px !important;
    place-items: center !important;
    padding: 0 !important;
  }

  .topbar .brand img {
    width: 26px !important;
    height: 26px !important;
  }

  .topbar .brand span,
  .topbar__logout,
  .topbar__actions .button:not(.button--profile) {
    display: none !important;
  }

  .topbar__nav {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 2px !important;
    width: 100% !important;
    height: 42px !important;
    padding: 0 !important;
    overflow: hidden !important;
    border: 0 !important;
    background: transparent !important;
  }

  .topbar__actions {
    display: grid !important;
    width: 54px !important;
    height: 42px !important;
    padding: 0 !important;
    overflow: hidden !important;
  }

  .topbar__nav a,
  .topbar .button--profile {
    display: grid !important;
    grid-template-rows: 18px 12px !important;
    align-content: center !important;
    justify-items: center !important;
    gap: 2px !important;
    width: 100% !important;
    height: 42px !important;
    min-height: 42px !important;
    padding: 4px 2px !important;
    border: 0 !important;
    border-radius: 9px !important;
    background: transparent !important;
    box-shadow: none !important;
    color: rgba(239, 232, 250, .78) !important;
    text-align: center !important;
  }

  .topbar__nav a.is-active,
  .topbar__nav a:hover,
  .topbar__nav a:focus-visible,
  .topbar .button--profile:hover,
  .topbar .button--profile:focus-visible {
    background: rgba(255, 255, 255, .08) !important;
    color: #fff !important;
  }

  .topbar__nav img.nav-icon,
  .topbar .button--profile img.nav-icon,
  .topbar .button--profile .profile-mini-avatar {
    display: block !important;
    width: 17px !important;
    height: 17px !important;
    min-width: 17px !important;
    min-height: 17px !important;
  }

  .topbar__nav a span,
  .topbar .button--profile > span:not(.profile-mini-avatar) {
    display: block !important;
    width: 100% !important;
    overflow: hidden !important;
    font-size: 8.5px !important;
    font-weight: 600 !important;
    line-height: 1 !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }
}

@media (max-width: 380px) {
  .watch-player__bar {
    grid-template-columns: 28px 28px minmax(58px, auto) minmax(0, 1fr) 28px 28px !important;
  }

  .player-time {
    min-width: 58px !important;
    max-width: 70px !important;
  }

  .player-button--settings {
    display: none !important;
  }

  .player-brand-mark span {
    display: none !important;
  }
}

/* Final layout fixes for the video search page and room chat. */
.browser-search-app {
  width: min(1240px, calc(100vw - 32px));
  min-height: auto;
  margin-inline: auto;
  padding: 18px 0 34px;
}

.browser-search-app .browser-search-head {
  margin-bottom: 16px;
}

.browser-search-app .browser-workspace {
  gap: 12px;
}

.browser-search-app .browser-search-panel {
  padding: 0;
}

.browser-search-app .browser-search-bar {
  border-color: rgba(124, 92, 255, .72);
  background: rgba(17, 17, 17, .86);
}

.browser-search-app .browser-status {
  background: rgba(17, 17, 17, .62);
}

.browser-search-app .browser-empty,
.browser-search-app .browser-loading {
  min-height: 168px;
  background: rgba(17, 17, 17, .58);
}

button.home-room-mini {
  width: 100%;
  border: 0;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.queue-panel.is-empty .queue-expand {
  display: none !important;
}

.queue-panel.is-empty {
  cursor: default;
}

.queue-panel.is-empty .queue-list {
  display: none !important;
  max-height: 0 !important;
  overflow: hidden !important;
}

.profile-hero {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) minmax(320px, .75fr);
  align-items: end;
  gap: 22px;
  padding: 30px 0 26px;
}

.profile-hero__avatar {
  display: grid;
  width: 92px;
  height: 92px;
  place-items: center;
  border: 1px solid rgba(226, 214, 255, .14);
  border-radius: 18px;
  background: #8b5cf6;
  color: #fff;
  font-size: 38px;
  font-weight: 800;
  text-transform: uppercase;
  box-shadow: 0 18px 44px rgba(139, 92, 246, .22);
}

.profile-hero__avatar img,
.profile-hero__avatar span {
  display: block;
  width: 100%;
  height: 100%;
}

.profile-hero__avatar img {
  border-radius: inherit;
  object-fit: cover;
}

.profile-hero__avatar span {
  display: grid;
  place-items: center;
}

.profile-hero span,
.profile-panel__head span,
.profile-history .section-title span {
  color: rgba(217, 204, 239, .68);
  font-size: 13px;
  font-weight: 700;
}

.profile-hero h1 {
  margin: 4px 0 6px;
  font-size: clamp(36px, 5vw, 58px);
}

.profile-hero p {
  margin: 0;
  color: rgba(217, 204, 239, .74);
}

.profile-hero__stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.profile-hero__stats div {
  display: grid;
  gap: 5px;
  min-width: 0;
  padding: 14px;
  border: 1px solid rgba(226, 214, 255, .1);
  border-radius: 12px;
  background: rgba(36, 31, 44, .52);
}

.profile-hero__stats strong {
  overflow: hidden;
  color: #fff;
  font-size: 18px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-hero__stats span {
  overflow: hidden;
  color: rgba(217, 204, 239, .62);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, .72fr);
  gap: 16px;
  align-items: start;
}

.profile-stack {
  display: grid;
  gap: 16px;
}

.profile-panel,
.profile-history {
  display: grid;
  gap: 14px;
  padding: 18px;
  border: 1px solid rgba(226, 214, 255, .12);
  border-radius: 14px;
  background: rgba(36, 31, 44, .72);
}

.profile-panel--identity {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.profile-panel--identity .profile-panel__head,
.profile-panel--identity .profile-theme,
.profile-panel--identity .button--full {
  grid-column: 1 / -1;
}

.profile-panel--logout {
  align-self: start;
}

.profile-panel__head h2,
.profile-history h2 {
  margin: 0;
}

.profile-panel label,
.profile-theme legend {
  color: rgba(239, 232, 250, .84);
  font-size: 13px;
  font-weight: 700;
}

.profile-panel input {
  width: 100%;
  min-height: 48px;
  padding: 0 14px;
  border: 1px solid rgba(226, 214, 255, .12);
  border-radius: 10px;
  background: rgba(10, 8, 14, .58);
  color: var(--text);
  outline: none;
}

.profile-panel input:focus-visible {
  border-color: rgba(139, 92, 246, .7);
  box-shadow: 0 0 0 3px rgba(139, 92, 246, .18);
}

.profile-theme {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  padding: 0;
  border: 0;
}

.profile-theme legend {
  grid-column: 1 / -1;
  margin-bottom: 2px;
}

.profile-theme label {
  cursor: pointer;
}

.profile-theme input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.profile-theme span {
  display: grid;
  min-height: 46px;
  place-items: center;
  border: 1px solid rgba(226, 214, 255, .12);
  border-radius: 10px;
  background: rgba(255, 255, 255, .04);
}

.profile-theme input:checked + span {
  border-color: rgba(139, 92, 246, .62);
  background: rgba(139, 92, 246, .22);
  color: #fff;
}

.profile-history {
  margin-top: 16px;
}

.profile-history__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
}

.profile-history__item {
  display: grid;
  overflow: hidden;
  border: 1px solid rgba(226, 214, 255, .1);
  border-radius: 12px;
  background: rgba(10, 8, 14, .42);
  transition: transform .18s ease, border-color .18s ease, background .18s ease;
}

.profile-history__item:hover {
  border-color: rgba(226, 214, 255, .18);
  background: rgba(28, 23, 36, .58);
  transform: translateY(-2px);
}

.profile-history__thumb {
  display: grid;
  width: 100%;
  aspect-ratio: 16 / 9;
  place-items: center;
  overflow: hidden;
  background: rgba(139, 92, 246, .14);
}

.profile-history__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-history__thumb span {
  color: rgba(239, 232, 250, .66);
  font-size: 13px;
  font-weight: 800;
}

.profile-history__body {
  display: grid;
  gap: 7px;
  padding: 12px;
}

.profile-history__item strong {
  font-size: 14px;
  line-height: 1.25;
}

.profile-history__item span {
  color: rgba(217, 204, 239, .58);
  font-size: 12px;
}

.profile-history__empty {
  min-height: 120px;
  display: grid;
  place-items: center;
  border: 1px dashed rgba(226, 214, 255, .14);
  border-radius: 12px;
  color: rgba(217, 204, 239, .68);
  text-align: center;
}

.room-sidebar .chat-message {
  max-width: min(88%, 560px) !important;
}

.room-sidebar .chat-message p {
  padding: 12px 15px !important;
  font-size: 15px !important;
  line-height: 1.44 !important;
}

.room-sidebar .chat-message__top strong {
  font-size: 12px !important;
}

@media (min-width: 921px) {
  .room-sidebar .chat-panel {
    min-height: 680px;
  }
}

@media (max-width: 920px) {
  html,
  body {
    overflow-x: hidden !important;
  }

  main {
    width: 100% !important;
    max-width: 100vw !important;
    padding: 8px 8px calc(82px + env(safe-area-inset-bottom)) !important;
    overflow-x: hidden !important;
  }

  .topbar {
    position: fixed !important;
    top: auto !important;
    right: 8px !important;
    bottom: calc(8px + env(safe-area-inset-bottom)) !important;
    left: 8px !important;
    z-index: 80 !important;
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    width: auto !important;
    max-width: none !important;
    min-height: 58px !important;
    margin: 0 !important;
    padding: 5px !important;
    border-radius: 12px !important;
    background: rgba(31, 27, 39, .92) !important;
    backdrop-filter: blur(18px) !important;
  }

  .brand,
  .topbar__logout,
  .topbar__actions .button:not(.button--profile),
  body.auth-open .topbar {
    display: none !important;
  }

  .topbar__nav {
    display: contents !important;
  }

  .topbar__actions {
    display: contents !important;
  }

  .topbar__nav a,
  .button--profile {
    display: grid !important;
    min-width: 0 !important;
    min-height: 48px !important;
    place-items: center !important;
    gap: 2px !important;
    padding: 6px 4px !important;
    border-radius: 9px !important;
    background: transparent !important;
    color: rgba(239, 232, 250, .76) !important;
    font-size: 10px !important;
    font-weight: 600 !important;
    line-height: 1 !important;
  }

  .topbar__nav a:hover,
  .topbar__nav a:focus-visible,
  .button--profile:hover,
  .button--profile:focus-visible {
    background: rgba(255, 255, 255, .06) !important;
    color: #fff !important;
  }

  .topbar__nav a .nav-icon,
  .button--profile .nav-icon {
    display: block !important;
    width: 20px !important;
    height: 20px !important;
    fill: none !important;
    stroke: currentColor !important;
    stroke-width: 2 !important;
  }

  .button--profile {
    grid-column: auto !important;
    width: auto !important;
    border: 0 !important;
    box-shadow: none !important;
  }

  .button--profile span {
    font-size: 10px !important;
    font-weight: 600 !important;
  }

  .browser-search-app {
    width: 100% !important;
    max-width: 100% !important;
    padding: 10px 0 18px !important;
  }

  .browser-search-app .browser-search-head {
    grid-template-columns: 38px minmax(0, 1fr) !important;
    margin-bottom: 12px !important;
  }

  .browser-search-app .browser-search-head h1 {
    overflow: hidden !important;
    font-size: 22px !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }

  .browser-search-app .browser-mode-switch {
    grid-column: 1 / -1 !important;
  }

  .browser-search-app .browser-search-bar {
    grid-template-columns: 1fr !important;
    gap: 8px !important;
    padding: 7px !important;
    border-radius: 14px !important;
  }

  .browser-search-app .browser-search-bar input,
  .browser-search-app .browser-search-bar .button {
    min-height: 46px !important;
    border-radius: 10px !important;
  }

  .browser-search-app .browser-results {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 10px !important;
  }

  .browser-search-app .browser-empty,
  .browser-search-app .browser-loading {
    min-height: 150px !important;
    padding: 20px !important;
  }

  .room-shell {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    overflow-x: hidden !important;
  }

  .player-panel--active {
    height: clamp(238px, 62vw, 340px) !important;
    max-height: 340px !important;
  }

  .watch-player__mobile-title {
    min-height: 34px !important;
    max-height: 34px !important;
    padding: 6px 10px !important;
  }

  .watch-player__mobile-title strong {
    font-size: 13px !important;
  }

  .watch-player__bar {
    grid-template-columns: 30px 30px minmax(72px, auto) minmax(0, 1fr) 30px 30px 30px !important;
    min-height: 44px !important;
    max-height: 44px !important;
    padding: 13px 5px 4px !important;
  }

  .player-volume {
    position: relative !important;
  }

  .watch-player.watch-player--volume-open .player-volume__range {
    right: auto !important;
    bottom: 42px !important;
    left: 50% !important;
    width: 86px !important;
    height: 4px !important;
    transform: translateX(-50%) rotate(-90deg) !important;
    transform-origin: center !important;
  }

  .chat-panel {
    min-height: 580px !important;
    height: max(580px, calc(100svh - clamp(238px, 62vw, 340px) - 86px)) !important;
    padding: 14px !important;
  }

  .chat-panel.chat-panel--collapsed {
    display: grid !important;
    grid-template-rows: auto !important;
    min-height: 58px !important;
    height: 58px !important;
    max-height: 58px !important;
    padding: 12px 14px !important;
    overflow: hidden !important;
  }

  .chat-panel.chat-panel--collapsed .chat-list,
  .chat-panel.chat-panel--collapsed .chat-form {
    display: none !important;
  }

  .chat-panel .section-title h2 {
    font-size: 26px !important;
  }

  .chat-message {
    max-width: 86% !important;
  }

  .chat-message p {
    font-size: 15px !important;
  }

  .player-chat-notice {
    top: 42px !important;
    right: 8px !important;
    width: min(280px, calc(100% - 16px)) !important;
    gap: 8px !important;
    padding: 10px !important;
    border-radius: 12px !important;
  }

  .player-chat-notice p {
    font-size: 11px !important;
  }

  .player-chat-notice input {
    height: 34px !important;
  }

  .player-chat-notice form button {
    width: 34px !important;
    height: 34px !important;
  }

  .profile-hero {
    grid-template-columns: 64px minmax(0, 1fr) !important;
    align-items: center !important;
    gap: 14px !important;
    padding: 12px 4px 18px !important;
  }

  .profile-hero__stats {
    grid-column: 1 / -1 !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 6px !important;
  }

  .profile-hero__stats div {
    padding: 10px 8px !important;
    border-radius: 10px !important;
  }

  .profile-hero__stats strong {
    font-size: 14px !important;
  }

  .profile-hero__stats span {
    font-size: 9px !important;
  }

  .profile-hero__avatar {
    width: 64px !important;
    height: 64px !important;
    border-radius: 14px !important;
    font-size: 26px !important;
  }

  .profile-hero h1 {
    font-size: 32px !important;
  }

  .profile-layout {
    grid-template-columns: 1fr !important;
    gap: 12px !important;
  }

  .profile-stack {
    gap: 12px !important;
  }

  .profile-panel,
  .profile-history {
    padding: 14px !important;
    border-radius: 12px !important;
  }

  .profile-panel--identity {
    grid-template-columns: 1fr !important;
  }

  .profile-history__grid {
    grid-template-columns: 1fr !important;
  }
}

@media (max-width: 430px) {
  .browser-search-app .browser-results {
    grid-template-columns: 1fr !important;
  }

  .player-brand-mark span {
    display: inline !important;
  }

  .watch-player__bar {
    grid-template-columns: 30px 30px minmax(68px, auto) minmax(0, 1fr) 30px 30px 30px !important;
  }
}

@media (max-width: 680px) {
  body.auth-open,
  body.cookie-open,
  body.room-settings-open,
  body.participants-open {
    overflow: hidden !important;
    touch-action: none;
  }

  body.auth-open .topbar,
  body.cookie-open .topbar,
  body.room-settings-open .topbar,
  body.participants-open .topbar {
    opacity: 0 !important;
    pointer-events: none !important;
    transform: translateY(18px) !important;
  }

  .auth-modal,
  .cookie-modal,
  .room-settings-modal,
  .participants-modal {
    align-items: end !important;
    justify-items: stretch !important;
    padding: 0 !important;
    background: rgba(5, 4, 8, .78) !important;
  }

  .auth-modal__dialog,
  .cookie-modal__dialog,
  .room-settings-modal .quick-settings,
  .participants-modal .participant-all {
    width: 100vw !important;
    max-height: min(94svh, 760px) !important;
    margin: 0 !important;
    overflow-y: auto !important;
    border-right: 0 !important;
    border-bottom: 0 !important;
    border-left: 0 !important;
    border-radius: 18px 18px 0 0 !important;
    box-shadow: 0 -18px 60px rgba(0, 0, 0, .45) !important;
    transform: translateY(100%) !important;
    transition: transform .28s cubic-bezier(.2, .9, .2, 1), opacity .18s ease !important;
    -webkit-overflow-scrolling: touch;
  }

  .auth-modal__dialog,
  .cookie-modal__dialog {
    padding-bottom: calc(18px + env(safe-area-inset-bottom)) !important;
  }

  .auth-modal.is-open .auth-modal__dialog,
  .cookie-modal.is-open .cookie-modal__dialog,
  .room-settings-modal.is-open .quick-settings,
  .participants-modal.is-open .participant-all {
    transform: translateY(0) !important;
  }

  .player-button img {
    width: 17px !important;
    height: 17px !important;
  }

  .topbar__nav a .nav-icon,
  .button--profile .nav-icon {
    display: block !important;
    width: 20px !important;
    height: 20px !important;
    opacity: .82;
  }

  .topbar__nav a.is-active .nav-icon,
  .topbar__nav a:hover .nav-icon,
  .button--profile:hover .nav-icon,
  .button--profile:focus-visible .nav-icon {
    opacity: 1;
  }

  .chat-panel.chat-panel--collapsed {
    display: grid !important;
    grid-template-rows: auto !important;
    min-height: 56px !important;
    height: 56px !important;
    max-height: 56px !important;
    padding: 10px 12px !important;
    overflow: hidden !important;
  }

  .chat-panel.chat-panel--collapsed .section-title {
    margin: 0 !important;
  }

  .chat-panel.chat-panel--collapsed .chat-list,
  .chat-panel.chat-panel--collapsed .chat-form {
    display: none !important;
  }

  .queue-panel.is-empty {
    max-height: 96px !important;
    overflow: hidden !important;
  }
}

/* Installed page backgrounds */
main:has(.home-hero),
main:has(.page-hero--rooms),
main:has(.page-hero--about),
main:has(.create-hero),
main:has(.browser-search-app) {
  position: relative;
  isolation: isolate;
  overflow-x: clip;
  background: var(--bg);
}

main:has(.home-hero)::before,
main:has(.page-hero--rooms)::before,
main:has(.page-hero--about)::before,
main:has(.create-hero)::before,
main:has(.browser-search-app)::before {
  content: none;
  display: none;
  background: none !important;
}

main:has(.home-hero)::after,
main:has(.page-hero--rooms)::after,
main:has(.page-hero--about)::after,
main:has(.create-hero)::after,
main:has(.browser-search-app)::after {
  content: none;
  display: none;
  background: none !important;
}

.home-hero {
  --hero-bg: url("/static/assets/background/photo-1524985069026-dd778a71c7b4.avif");
  background-image: none !important;
}

.page-hero--rooms {
  --hero-bg: url("/static/assets/background/photo-1440404653325-ab127d49abc1.avif");
  background-image: none !important;
}

.page-hero--about {
  --hero-bg: url("/static/assets/background/photo-1688678004647-945d5aaf91c1.avif");
  background-image: none !important;
}

.home-hero,
.page-hero {
  overflow: hidden;
  background-clip: border-box;
  contain: paint;
  clip-path: inset(0 round 10px);
}

.create-hero {
  position: relative;
  overflow: hidden;
  max-width: none;
  min-height: clamp(260px, 32vw, 440px);
  align-items: end;
  margin: 0 0 clamp(22px, 4vw, 44px);
  padding: clamp(22px, 4vw, 46px);
  border: 1px solid rgba(226, 214, 255, .11);
  border-radius: 10px;
  background: rgba(18, 14, 24, .62) url("/static/assets/background/photo-1688678004647-945d5aaf91c1.avif") center / cover no-repeat;
  box-shadow: 0 24px 64px rgba(0, 0, 0, .34);
  isolation: isolate;
  contain: paint;
  clip-path: inset(0 round 10px);
}

.home-story,
.home-open-rooms,
.rooms-section,
.about-editorial,
.about-process {
  position: relative;
  z-index: 1;
  background: var(--bg);
}

.create-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: rgba(10, 8, 14, .62);
}

.browser-search-app {
  width: min(1380px, calc(100vw - 40px));
  min-height: calc(100svh - 220px);
}

.browser-workspace,
.browser-search-app .browser-results {
  position: relative;
}

@media (max-width: 680px) {
  main:has(.home-hero)::before,
  main:has(.page-hero--rooms)::before,
  main:has(.page-hero--about)::before,
  main:has(.create-hero)::before,
  main:has(.browser-search-app)::before {
    opacity: .34;
  }

  main:has(.home-hero)::after,
  main:has(.page-hero--rooms)::after,
  main:has(.page-hero--about)::after,
  main:has(.create-hero)::after,
  main:has(.browser-search-app)::after {
    background: rgba(8, 6, 12, .76);
  }

  main:has(.home-hero),
  main:has(.page-hero--rooms),
  main:has(.page-hero--about),
  main:has(.create-hero),
  main:has(.browser-search-app) {
    background-attachment: scroll;
  }

  .create-hero {
    min-height: 300px;
    padding: 20px;
  }

  .browser-search-app {
    width: 100%;
    min-height: auto;
  }
}

/* Final modal placement contract: desktop centered, mobile bottom sheet. */
.auth-modal,
.cookie-modal,
.room-settings-modal,
.participants-modal {
  position: fixed !important;
  inset: 0 !important;
  z-index: 10000 !important;
  display: grid !important;
  align-items: center !important;
  justify-items: center !important;
  padding: 24px !important;
  background: rgba(5, 4, 8, .68) !important;
  opacity: 0;
  pointer-events: none;
  backdrop-filter: blur(14px);
  transition: opacity .2s ease !important;
}

.auth-modal[hidden],
.cookie-modal[hidden],
.room-settings-modal[hidden],
.participants-modal[hidden] {
  display: none !important;
}

.auth-modal.is-open,
.cookie-modal.is-open,
.room-settings-modal.is-open,
.participants-modal.is-open {
  opacity: 1 !important;
  pointer-events: auto !important;
}

.auth-modal__dialog,
.cookie-modal__dialog,
.room-settings-modal .quick-settings,
.participants-modal .participant-all {
  position: relative !important;
  inset: auto !important;
  width: min(560px, calc(100vw - 48px)) !important;
  max-height: min(84svh, 760px) !important;
  overflow-y: auto !important;
  margin: 0 !important;
  border-radius: 18px !important;
  transform: translateY(14px) scale(.98) !important;
  transition: transform .26s cubic-bezier(.2, .9, .2, 1), opacity .2s ease !important;
  -webkit-overflow-scrolling: touch;
}

.cookie-modal__dialog {
  width: min(620px, calc(100vw - 48px)) !important;
}

.auth-modal.is-open .auth-modal__dialog,
.cookie-modal.is-open .cookie-modal__dialog,
.room-settings-modal.is-open .quick-settings,
.participants-modal.is-open .participant-all {
  transform: translateY(0) scale(1) !important;
}

body.auth-open,
body.cookie-open,
body.room-settings-open,
body.participants-open {
  overflow: hidden !important;
}

@media (max-width: 680px) {
  .auth-modal,
  .cookie-modal,
  .room-settings-modal,
  .participants-modal {
    align-items: end !important;
    justify-items: stretch !important;
    padding: 0 !important;
    background: rgba(5, 4, 8, .78) !important;
  }

  .auth-modal__dialog,
  .cookie-modal__dialog,
  .room-settings-modal .quick-settings,
  .participants-modal .participant-all {
    width: 100vw !important;
    max-height: min(94svh, 760px) !important;
    border-right: 0 !important;
    border-bottom: 0 !important;
    border-left: 0 !important;
    border-radius: 18px 18px 0 0 !important;
    box-shadow: 0 -18px 60px rgba(0, 0, 0, .45) !important;
    transform: translateY(100%) !important;
  }

  .auth-modal.is-open .auth-modal__dialog,
  .cookie-modal.is-open .cookie-modal__dialog,
  .room-settings-modal.is-open .quick-settings,
  .participants-modal.is-open .participant-all {
    transform: translateY(0) !important;
  }

  body.auth-open,
  body.cookie-open,
  body.room-settings-open,
  body.participants-open {
    touch-action: none;
  }

  body.auth-open .topbar,
  body.cookie-open .topbar,
  body.room-settings-open .topbar,
  body.participants-open .topbar {
    opacity: 0 !important;
    pointer-events: none !important;
    transform: translateY(18px) !important;
  }
}

/* Final header icon contract: desktop text nav, mobile compact icon nav. */
.topbar__nav img.nav-icon {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
}

.topbar__nav a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0;
}

@media (max-width: 920px) {
  .topbar {
    position: fixed !important;
    top: auto !important;
    right: 8px !important;
    bottom: calc(8px + env(safe-area-inset-bottom)) !important;
    left: 8px !important;
    z-index: 80 !important;
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    align-items: center !important;
    gap: 0 !important;
    width: auto !important;
    max-width: none !important;
    min-height: 58px !important;
    margin: 0 !important;
    padding: 5px !important;
    border: 1px solid rgba(226, 214, 255, .12) !important;
    border-radius: 12px !important;
    background: rgba(31, 27, 39, .94) !important;
    box-shadow: 0 12px 34px rgba(0, 0, 0, .32) !important;
    backdrop-filter: blur(18px) !important;
  }

  .topbar::before,
  .topbar::after,
  .topbar .brand,
  .topbar__logout,
  .topbar__actions .button:not(.button--profile) {
    display: none !important;
  }

  .topbar__nav,
  .topbar__actions {
    display: contents !important;
  }

  .topbar__nav img.nav-icon,
  .button--profile img.nav-icon {
    display: block !important;
    width: 20px !important;
    min-width: 20px !important;
    max-width: 20px !important;
    height: 20px !important;
    min-height: 20px !important;
    max-height: 20px !important;
    object-fit: contain !important;
    opacity: .82 !important;
    filter: none !important;
  }

  .topbar__nav a,
  .button--profile {
    display: grid !important;
    grid-auto-rows: min-content !important;
    place-items: center !important;
    gap: 3px !important;
    min-width: 0 !important;
    min-height: 48px !important;
    padding: 5px 3px !important;
    border: 0 !important;
    border-radius: 9px !important;
    background: transparent !important;
    box-shadow: none !important;
    color: rgba(239, 232, 250, .74) !important;
    font-size: 10px !important;
    font-weight: 600 !important;
    line-height: 1 !important;
    text-align: center !important;
    transform: none !important;
  }

  .topbar__nav a::after {
    display: none !important;
  }

  .topbar__nav a:hover,
  .topbar__nav a:focus-visible,
  .topbar__nav a.is-active,
  .button--profile:hover,
  .button--profile:focus-visible {
    background: rgba(255, 255, 255, .07) !important;
    color: #fff !important;
    transform: none !important;
  }

  .topbar__nav a span,
  .button--profile span {
    display: block !important;
    max-width: 100% !important;
    overflow: hidden !important;
    font-size: 10px !important;
    font-weight: 600 !important;
    line-height: 1.05 !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }

  .button--profile {
    width: auto !important;
    justify-self: stretch !important;
  }
}

/* Final mobile layout contract: every primary page fits 320px without side scroll. */
@media (max-width: 920px) {
  html,
  body {
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: hidden !important;
  }

  body {
    min-width: 0 !important;
    overscroll-behavior-x: none;
  }

  main {
    width: 100% !important;
    max-width: 100vw !important;
    margin: 0 !important;
    padding: 8px 8px calc(82px + env(safe-area-inset-bottom)) !important;
    overflow-x: clip !important;
  }

  .home-hero,
  .page-hero,
  .create-hero,
  .home-story,
  .about-editorial,
  .about-process,
  .rooms-section,
  .home-open-rooms,
  .profile-hero,
  .profile-layout,
  .profile-history,
  .create-layout,
  .browser-shell,
  .browser-workspace,
  .room-shell,
  .room-main,
  .room-sidebar,
  .site-footer {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    margin-right: 0 !important;
    margin-left: 0 !important;
    box-sizing: border-box !important;
    overflow-x: clip !important;
  }

  .home-hero,
  .page-hero,
  .create-hero {
    display: grid !important;
    grid-template-columns: 1fr !important;
    min-height: auto !important;
    gap: 22px !important;
    padding: 28px 16px !important;
    border-radius: 14px !important;
    background-size: cover !important;
    background-position: center !important;
  }

  .home-hero__content,
  .page-hero__copy,
  .create-hero,
  .home-story,
  .about-editorial,
  .about-process {
    min-width: 0 !important;
  }

  .home-hero h1,
  .page-hero h1,
  .create-hero h1,
  .profile-hero h1 {
    max-width: 100% !important;
    font-size: clamp(34px, 10vw, 48px) !important;
    line-height: .98 !important;
    overflow-wrap: anywhere !important;
  }

  .home-hero p,
  .page-hero p,
  .create-hero p,
  .home-story p,
  .about-editorial p,
  .about-process p,
  .profile-hero p {
    max-width: 64ch !important;
    font-size: 15px !important;
    line-height: 1.5 !important;
  }

  .home-hero__actions,
  .page-hero__actions {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 10px !important;
    width: 100% !important;
  }

  .home-hero__actions .button,
  .page-hero__actions .button,
  .create-layout .button,
  .profile-layout .button,
  .browser-search-bar .button {
    width: 100% !important;
    min-height: 48px !important;
  }

  .home-hero__facts,
  .page-hero__facts,
  .home-story__list,
  .about-editorial__lines,
  .about-process,
  .rooms-grid,
  .profile-layout,
  .profile-stack,
  .profile-history__grid,
  .create-layout,
  .type-list,
  .browser-workspace,
  .browser-results {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 12px !important;
  }

  .home-room-strip,
  .quick-action-grid {
    display: grid !important;
    grid-auto-flow: column !important;
    grid-auto-columns: minmax(164px, 72%) !important;
    grid-template-columns: none !important;
    gap: 10px !important;
    padding: 0 8px 4px 0 !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    scroll-snap-type: x mandatory !important;
    -webkit-overflow-scrolling: touch;
  }

  .home-room-mini,
  .quick-action-card {
    min-width: 0 !important;
    scroll-snap-align: start !important;
  }

  .room-tile,
  .create-card,
  .profile-panel,
  .profile-history,
  .browser-search-panel,
  .room-info,
  .queue-panel,
  .quick-actions,
  .chat-panel {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    padding: 14px !important;
    border-radius: 12px !important;
    box-sizing: border-box !important;
  }

  .room-tile {
    display: grid !important;
    grid-template-columns: minmax(108px, 36%) minmax(0, 1fr) !important;
    gap: 10px !important;
    min-height: 154px !important;
    overflow: hidden !important;
  }

  .room-tile__media {
    width: 100% !important;
    height: 100% !important;
    min-height: 138px !important;
    aspect-ratio: auto !important;
    border-radius: 10px !important;
  }

  .room-tile__media img,
  .profile-history__thumb img,
  .browser-result-card__thumb img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
  }

  .room-tile__body,
  .profile-history__body,
  .browser-result-card__body,
  .queue-item strong,
  .quick-action-card strong,
  .quick-action-card small {
    min-width: 0 !important;
  }

  .room-tile h2,
  .room-tile h3,
  .profile-history__item h3,
  .browser-result-card strong,
  .queue-item strong {
    display: -webkit-box !important;
    overflow: hidden !important;
    -webkit-box-orient: vertical !important;
    -webkit-line-clamp: 2 !important;
  }

  .profile-hero {
    display: grid !important;
    grid-template-columns: 68px minmax(0, 1fr) !important;
    align-items: center !important;
    gap: 14px !important;
    padding: 18px 6px !important;
  }

  .profile-hero__avatar {
    width: 68px !important;
    height: 68px !important;
    border-radius: 14px !important;
  }

  .profile-hero__stats {
    grid-column: 1 / -1 !important;
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 8px !important;
  }

  .profile-panel--identity {
    grid-template-columns: 1fr !important;
  }

  .browser-search-head,
  .browser-topline {
    display: grid !important;
    grid-template-columns: 42px minmax(0, 1fr) !important;
    gap: 10px !important;
    align-items: center !important;
  }

  .browser-search-head h1,
  .browser-topline h1 {
    min-width: 0 !important;
    overflow: hidden !important;
    font-size: clamp(22px, 7vw, 32px) !important;
    line-height: 1.08 !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }

  .browser-mode-switch {
    grid-column: 1 / -1 !important;
    width: 100% !important;
  }

  .browser-search-bar {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 8px !important;
    padding: 7px !important;
    border-radius: 12px !important;
  }

  .browser-results {
    min-height: 0 !important;
  }

  .browser-result-card {
    min-width: 0 !important;
    border-radius: 12px !important;
    overflow: hidden !important;
  }

  .site-footer {
    padding: 28px 8px calc(94px + env(safe-area-inset-bottom)) !important;
  }

  .site-footer__top,
  .site-footer__links,
  .site-footer__bottom {
    display: flex !important;
    flex-wrap: wrap !important;
    justify-content: center !important;
    gap: 12px !important;
    text-align: center !important;
  }
}

/* Final mobile room contract: player first, readable chat second, no horizontal drift. */
@media (max-width: 920px) {
  .room-shell {
    display: flex !important;
    flex-direction: column !important;
    gap: 10px !important;
  }

  .room-main,
  .room-sidebar {
    display: contents !important;
  }

  .player-panel {
    order: 1 !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: #050407 !important;
    overflow: hidden !important;
  }

  .player-panel--active {
    position: relative !important;
    width: 100% !important;
    height: clamp(236px, 64vw, 360px) !important;
    min-height: 236px !important;
    max-height: 360px !important;
    aspect-ratio: auto !important;
    contain: layout paint !important;
  }

  .player-panel--active > .watch-player,
  .player-panel--active .watch-player__media,
  .player-panel--active .watch-player__poster {
    position: absolute !important;
    inset: 0 !important;
    width: 100% !important;
    height: 100% !important;
    min-width: 0 !important;
    min-height: 0 !important;
    max-width: 100% !important;
    max-height: 100% !important;
    border: 0 !important;
    border-radius: 0 !important;
  }

  .player-panel--active .watch-player__media,
  .player-panel--active .watch-player__poster {
    object-fit: cover !important;
  }

  .watch-player__mobile-title {
    top: 0 !important;
    right: 0 !important;
    left: 0 !important;
    z-index: 6 !important;
    display: flex !important;
    min-height: 34px !important;
    max-height: 34px !important;
    align-items: center !important;
    padding: 6px 10px !important;
    border-radius: 0 !important;
    background: rgba(8, 6, 12, .72) !important;
    overflow: hidden !important;
  }

  .watch-player__mobile-title span {
    display: none !important;
  }

  .watch-player__mobile-title strong {
    min-width: 0 !important;
    overflow: hidden !important;
    font-size: 13px !important;
    line-height: 1.1 !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }

  .watch-player__bar {
    right: 0 !important;
    bottom: 0 !important;
    left: 0 !important;
    z-index: 7 !important;
    display: grid !important;
    grid-template-columns: 30px 30px minmax(72px, auto) minmax(0, 1fr) 30px 30px 30px !important;
    width: 100% !important;
    min-height: 45px !important;
    max-height: 45px !important;
    align-items: center !important;
    gap: 2px !important;
    padding: 14px 5px 4px !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: rgba(8, 6, 12, .84) !important;
    box-sizing: border-box !important;
    overflow: visible !important;
  }

  .player-range {
    position: absolute !important;
    top: 4px !important;
    right: 6px !important;
    left: 6px !important;
    width: calc(100% - 12px) !important;
    height: 4px !important;
    margin: 0 !important;
  }

  .player-button,
  .player-inline-form {
    width: 30px !important;
    min-width: 30px !important;
    height: 30px !important;
    min-height: 30px !important;
  }

  .player-button img {
    width: 17px !important;
    height: 17px !important;
  }

  .player-time {
    min-width: 72px !important;
    max-width: 86px !important;
    overflow: hidden !important;
    font-size: 10px !important;
    line-height: 1 !important;
    white-space: nowrap !important;
  }

  .player-brand-mark {
    position: static !important;
    min-width: 0 !important;
    justify-content: center !important;
    gap: 4px !important;
    overflow: hidden !important;
    font-size: 10px !important;
    transform: none !important;
  }

  .player-brand-mark img {
    width: 16px !important;
    height: 16px !important;
  }

  .player-volume {
    position: relative !important;
    display: grid !important;
    width: 30px !important;
    min-width: 30px !important;
    height: 30px !important;
    place-items: center !important;
  }

  .watch-player:not(.watch-player--volume-open) .player-volume__range {
    display: none !important;
  }

  .watch-player.watch-player--volume-open .player-volume__range {
    position: absolute !important;
    right: auto !important;
    bottom: 48px !important;
    left: 50% !important;
    z-index: 12 !important;
    display: block !important;
    width: 92px !important;
    height: 4px !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 999px !important;
    background: linear-gradient(90deg, #fff 0 var(--range-fill, 0%), rgba(255, 255, 255, .3) var(--range-fill, 0%) 100%) !important;
    transform: translateX(-50%) rotate(-90deg) !important;
    transform-origin: center !important;
  }

  .player-settings-menu {
    right: 8px !important;
    bottom: 54px !important;
    left: auto !important;
    z-index: 15 !important;
    width: min(276px, calc(100vw - 24px)) !important;
    max-height: min(46svh, 286px) !important;
    padding: 6px !important;
    border-radius: 12px !important;
    overflow-y: auto !important;
  }

  .player-chat-notice {
    top: 42px !important;
    right: 8px !important;
    left: auto !important;
    width: min(292px, calc(100% - 16px)) !important;
    max-width: calc(100% - 16px) !important;
  }

  .chat-panel {
    order: 2 !important;
    display: grid !important;
    grid-template-rows: auto minmax(0, 1fr) auto !important;
    min-height: 560px !important;
    height: max(560px, calc(100svh - clamp(236px, 64vw, 360px) - 88px)) !important;
    max-height: none !important;
    overflow: hidden !important;
  }

  .chat-list {
    min-height: 0 !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch;
  }

  .chat-panel.chat-panel--collapsed {
    min-height: 56px !important;
    height: 56px !important;
    max-height: 56px !important;
    overflow: hidden !important;
  }

  .chat-panel.chat-panel--collapsed .chat-list,
  .chat-panel.chat-panel--collapsed .chat-form {
    display: none !important;
  }

  .room-info {
    order: 3 !important;
  }

  .queue-panel {
    order: 4 !important;
  }

  .quick-actions {
    order: 5 !important;
  }
}

@media (max-width: 520px) {
  main {
    padding-right: 6px !important;
    padding-left: 6px !important;
  }

  .home-hero,
  .page-hero,
  .create-hero {
    padding: 24px 14px !important;
  }

  .room-tile {
    grid-template-columns: 112px minmax(0, 1fr) !important;
    min-height: 146px !important;
    padding: 8px !important;
  }

  .room-tile__media {
    min-height: 128px !important;
  }

  .room-tile .button,
  .tile-actions .button {
    min-height: 40px !important;
    padding: 0 12px !important;
    font-size: 13px !important;
  }

  .player-panel--active {
    height: clamp(250px, 68vw, 330px) !important;
    min-height: 250px !important;
  }

  .chat-panel {
    min-height: 600px !important;
    height: max(600px, calc(100svh - clamp(250px, 68vw, 330px) - 88px)) !important;
  }
}

@media (max-width: 380px) {
  .watch-player__bar {
    grid-template-columns: 29px 29px minmax(66px, auto) minmax(0, 1fr) 29px 29px 29px !important;
    gap: 1px !important;
  }

  .player-brand-mark span {
    display: none !important;
  }

  .player-time {
    min-width: 66px !important;
    max-width: 70px !important;
  }
}

/* Final mobile header: compact top bar, no bottom navigation overlap. */
@media (max-width: 920px) {
  body {
    padding-top: calc(70px + env(safe-area-inset-top)) !important;
  }

  main {
    padding-top: 10px !important;
    padding-bottom: 34px !important;
  }

  .topbar {
    position: fixed !important;
    top: env(safe-area-inset-top) !important;
    right: 8px !important;
    bottom: auto !important;
    left: 8px !important;
    z-index: 90 !important;
    display: grid !important;
    grid-template-columns: auto minmax(0, 1fr) auto !important;
    align-items: center !important;
    gap: 8px !important;
    width: auto !important;
    min-height: 58px !important;
    padding: 8px 10px !important;
    border: 1px solid rgba(226, 214, 255, .12) !important;
    border-radius: 14px !important;
    background: rgba(20, 17, 27, .96) !important;
    box-shadow: 0 16px 36px rgba(0, 0, 0, .34) !important;
    backdrop-filter: blur(18px) !important;
  }

  .topbar::before,
  .topbar::after {
    display: none !important;
  }

  .topbar .brand {
    display: flex !important;
    min-width: 0 !important;
    gap: 7px !important;
  }

  .topbar .brand img {
    width: 26px !important;
    height: 26px !important;
  }

  .topbar .brand span {
    display: none !important;
  }

  .topbar__nav {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 2px !important;
    width: 100% !important;
    min-width: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
  }

  .topbar__actions {
    display: block !important;
    min-width: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  .topbar__logout,
  .topbar__actions .button:not(.button--profile) {
    display: none !important;
  }

  .topbar__nav a,
  .button--profile {
    display: grid !important;
    grid-template-rows: 20px 13px !important;
    place-items: center !important;
    gap: 2px !important;
    width: 100% !important;
    min-width: 0 !important;
    min-height: 42px !important;
    padding: 4px 3px !important;
    border: 0 !important;
    border-radius: 10px !important;
    background: transparent !important;
    box-shadow: none !important;
    color: rgba(239, 232, 250, .72) !important;
    font-size: 10px !important;
    font-weight: 600 !important;
    line-height: 1 !important;
    text-align: center !important;
    transform: none !important;
  }

  .topbar__nav a.is-active,
  .topbar__nav a:hover,
  .topbar__nav a:focus-visible,
  .button--profile:hover,
  .button--profile:focus-visible {
    background: rgba(255, 255, 255, .075) !important;
    color: #fff !important;
  }

  .topbar__nav a::after {
    display: none !important;
  }

  .topbar__nav img.nav-icon,
  .button--profile img.nav-icon {
    display: block !important;
    width: 19px !important;
    min-width: 19px !important;
    max-width: 19px !important;
    height: 19px !important;
    min-height: 19px !important;
    max-height: 19px !important;
    object-fit: contain !important;
    opacity: .86 !important;
    filter: none !important;
  }

  .topbar__nav a span,
  .button--profile span {
    display: block !important;
    max-width: 100% !important;
    overflow: hidden !important;
    font-size: 10px !important;
    font-weight: 600 !important;
    line-height: 1 !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }

  .button--profile {
    min-width: 54px !important;
    padding-inline: 6px !important;
  }

  body.auth-open .topbar,
  body.cookie-open .topbar,
  body.room-settings-open .topbar,
  body.participants-open .topbar {
    display: none !important;
  }
}

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

/* Mobile header hard override. Keep this block last. */
@media (max-width: 920px) {
  body {
    padding-top: calc(68px + env(safe-area-inset-top)) !important;
  }

  .topbar {
    position: fixed !important;
    top: calc(6px + env(safe-area-inset-top)) !important;
    right: auto !important;
    bottom: auto !important;
    left: 8px !important;
    display: grid !important;
    grid-template-columns: 34px minmax(0, 1fr) 52px !important;
    align-items: center !important;
    gap: 6px !important;
    width: calc(100vw - 16px) !important;
    min-width: 0 !important;
    max-width: calc(100vw - 16px) !important;
    min-height: 56px !important;
    padding: 7px 8px !important;
    overflow: hidden !important;
    border-radius: 12px !important;
  }

  .topbar .brand {
    display: grid !important;
    width: 34px !important;
    min-width: 34px !important;
    height: 42px !important;
    place-items: center !important;
    padding: 0 !important;
  }

  .topbar .brand img {
    width: 26px !important;
    height: 26px !important;
  }

  .topbar .brand span {
    display: none !important;
  }

  .topbar__nav {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 1px !important;
    min-width: 0 !important;
    width: 100% !important;
  }

  .topbar__actions {
    display: grid !important;
    width: 52px !important;
    min-width: 52px !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  .topbar__actions .button:not(.button--profile),
  .topbar__logout {
    display: none !important;
  }

  .topbar__nav a,
  .topbar .button--profile {
    display: grid !important;
    grid-template-rows: 19px 12px !important;
    align-content: center !important;
    justify-items: center !important;
    gap: 2px !important;
    width: 100% !important;
    min-width: 0 !important;
    min-height: 42px !important;
    padding: 4px 2px !important;
    overflow: hidden !important;
    border-radius: 8px !important;
    font-size: 9px !important;
    font-weight: 600 !important;
    line-height: 1 !important;
  }

  .topbar__nav img.nav-icon,
  .topbar .button--profile img.nav-icon {
    width: 18px !important;
    min-width: 18px !important;
    height: 18px !important;
    min-height: 18px !important;
  }

  .topbar__nav a span,
  .topbar .button--profile span {
    display: block !important;
    width: 100% !important;
    overflow: hidden !important;
    color: inherit !important;
    font-size: 9px !important;
    font-weight: 600 !important;
    line-height: 1 !important;
    text-align: center !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }
}

/* Final page fit fixes. Keep create/search pages inside the viewport. */
main:has(.create-layout),
main:has(.browser-search-app) {
  width: min(100%, 1560px) !important;
  max-width: calc(100vw - 48px) !important;
  margin-inline: auto !important;
  overflow-x: clip !important;
}

.create-layout.create-layout--premium {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 430px) !important;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  box-sizing: border-box !important;
}

.create-card,
.create-layout--premium .choice-card,
.create-layout--premium .access-field label {
  min-width: 0 !important;
  box-sizing: border-box !important;
}

.browser-search-app {
  width: 100% !important;
  max-width: 100% !important;
  min-height: auto !important;
  padding: clamp(18px, 3vw, 34px) 0 28px !important;
  box-sizing: border-box !important;
}

.browser-search-app .browser-search-head {
  min-height: auto !important;
  margin-bottom: clamp(18px, 4vw, 34px) !important;
}

.browser-search-app .browser-workspace,
.browser-search-app .browser-search-panel {
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
}

.browser-search-app .browser-results {
  min-height: 0 !important;
}

.browser-search-app .browser-empty,
.browser-search-app .browser-loading {
  min-height: 136px !important;
}

/* Final volume positioning: the slider opens directly above the sound icon. */
.watch-player .player-volume {
  position: relative !important;
  display: grid !important;
  width: 34px !important;
  min-width: 34px !important;
  height: 34px !important;
  place-items: center !important;
}

.watch-player .player-volume__range {
  position: absolute !important;
  right: auto !important;
  bottom: calc(100% + 58px) !important;
  left: 50% !important;
  z-index: 30 !important;
  display: block !important;
  width: 112px !important;
  height: 5px !important;
  margin: 0 !important;
  opacity: 0 !important;
  pointer-events: none !important;
  transform: translateX(-50%) rotate(-90deg) !important;
  transform-origin: center !important;
  transition: opacity .16s ease, transform .16s ease !important;
}

.watch-player .player-volume:hover .player-volume__range,
.watch-player .player-volume:focus-within .player-volume__range,
.watch-player.watch-player--volume-open .player-volume__range {
  opacity: 1 !important;
  pointer-events: auto !important;
  transform: translateX(-50%) rotate(-90deg) scale(1.02) !important;
}

@media (max-width: 920px) {
  main:has(.create-layout),
  main:has(.browser-search-app) {
    max-width: calc(100vw - 16px) !important;
  }

  .create-layout.create-layout--premium,
  .create-layout--premium .type-list {
    grid-template-columns: 1fr !important;
  }

  .browser-search-app .browser-search-head {
    display: grid !important;
    grid-template-columns: 40px 1fr !important;
    gap: 10px !important;
    align-items: center !important;
  }

  .browser-search-app .browser-search-head h1 {
    grid-column: 2 !important;
    margin: 0 !important;
    font-size: 22px !important;
    text-align: left !important;
  }

  .browser-search-app .browser-mode-switch {
    grid-column: 1 / -1 !important;
    justify-self: stretch !important;
  }

  .browser-search-bar {
    grid-template-columns: 1fr !important;
  }

  .watch-player .player-volume {
    position: relative !important;
    overflow: visible !important;
  }

  .watch-player .player-volume__range {
    bottom: calc(100% + 58px) !important;
    left: 50% !important;
    width: 112px !important;
    height: 5px !important;
    transform: translateX(-50%) rotate(-90deg) !important;
    transform-origin: center !important;
  }

  .watch-player .player-volume:hover .player-volume__range,
  .watch-player .player-volume:focus-within .player-volume__range,
  .watch-player.watch-player--volume-open .player-volume__range {
    transform: translateX(-50%) rotate(-90deg) scale(1.02) !important;
  }
}

/* 2026-07-09 real last layout fix: header/profile/search/create/rooms. */
.topbar {
  box-sizing: border-box !important;
  width: min(100% - 32px, 1560px) !important;
  max-width: 1560px !important;
  margin-inline: auto !important;
  overflow: visible !important;
}

.topbar__actions {
  display: flex !important;
  align-items: center !important;
  justify-content: flex-end !important;
  min-width: 0 !important;
}

.topbar .profile-menu {
  position: relative !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-width: 0 !important;
}

.topbar .profile-menu > summary.button--profile {
  display: inline-flex !important;
  width: auto !important;
  min-width: 122px !important;
  height: 48px !important;
  min-height: 48px !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 10px !important;
  padding: 0 15px !important;
  border: 1px solid rgba(226, 214, 255, .16) !important;
  border-radius: 12px !important;
  background: rgba(255, 255, 255, .04) !important;
  color: #fff !important;
  box-shadow: none !important;
}

.profile-mini-avatar,
.profile-menu__avatar,
.participant-chip__avatar,
.participant-row__avatar,
.chat-message__avatar,
.profile-hero__avatar span {
  display: grid !important;
  place-items: center !important;
  line-height: 1 !important;
  text-align: center !important;
}

.profile-mini-avatar {
  flex: 0 0 auto !important;
  width: 28px !important;
  height: 28px !important;
  min-width: 28px !important;
  min-height: 28px !important;
  overflow: hidden !important;
  border-radius: 50% !important;
  object-fit: cover !important;
  font-size: 12px !important;
  font-weight: 700 !important;
}

.profile-mini-avatar--initial,
.profile-menu__avatar--initial {
  background: #8b5cf6 !important;
  color: #fff !important;
}

.topbar .profile-menu > summary.button--profile > span:not(.profile-mini-avatar) {
  display: inline-block !important;
  font-size: 14px !important;
  font-weight: 700 !important;
  line-height: 1 !important;
}

main:has(.browser-search-app),
main:has(.create-layout),
main:has(.rooms-section),
main:has(.empty-state) {
  width: min(1560px, calc(100vw - 48px)) !important;
  max-width: calc(100vw - 48px) !important;
  min-height: 0 !important;
  margin-inline: auto !important;
  padding-top: 26px !important;
  padding-bottom: 24px !important;
  overflow: clip !important;
  background: transparent !important;
}

.browser-search-app {
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
  min-height: 0 !important;
  padding: 18px 0 20px !important;
  margin: 0 !important;
  border-bottom: 1px solid rgba(226, 214, 255, .1) !important;
}

.browser-search-app::before,
.browser-search-app::after {
  display: none !important;
  content: none !important;
}

.browser-search-head {
  display: grid !important;
  grid-template-columns: 42px minmax(0, 1fr) auto !important;
  min-height: 0 !important;
  align-items: center !important;
  gap: 14px !important;
  margin: 0 0 28px !important;
  padding: 0 !important;
}

.browser-search-head h1 {
  margin: 0 !important;
  font-size: clamp(24px, 2.2vw, 34px) !important;
  text-align: center !important;
}

.browser-workspace,
.browser-search-panel {
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
}

.browser-search-bar {
  width: 100% !important;
  max-width: 100% !important;
}

.browser-search-app .browser-status {
  min-height: 42px !important;
}

.browser-search-app .browser-results {
  width: 100% !important;
  min-height: 132px !important;
  margin-top: 10px !important;
}

.browser-search-app .browser-empty,
.browser-search-app .browser-loading {
  min-height: 132px !important;
}

.create-hero {
  min-height: 240px !important;
  margin-bottom: 18px !important;
}

.create-layout.create-layout--premium {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 430px) !important;
  gap: 16px !important;
  width: 100% !important;
  max-width: 100% !important;
  min-height: 0 !important;
  margin: 0 !important;
}

.create-card {
  min-height: 0 !important;
  align-content: start !important;
  padding: 18px !important;
}

.create-layout--premium .choice-card,
.create-layout--premium .access-field label {
  min-height: 84px !important;
}

.rooms-section,
.home-open-rooms {
  width: 100% !important;
  max-width: 100% !important;
  overflow: hidden !important;
}

.rooms-grid {
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(230px, 280px)) !important;
  justify-content: start !important;
  gap: 16px !important;
  width: 100% !important;
  max-width: 100% !important;
}

.room-tile {
  width: 100% !important;
  min-width: 0 !important;
  max-width: 280px !important;
  overflow: hidden !important;
}

.room-tile__media {
  aspect-ratio: 16 / 9 !important;
  min-height: 0 !important;
}

.room-tile__media img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
}

@media (max-width: 920px) {
  body {
    padding-top: calc(64px + env(safe-area-inset-top)) !important;
  }

  body.auth-open .topbar,
  body.cookie-open .topbar,
  body.room-settings-open .topbar,
  body.participants-open .topbar {
    display: none !important;
  }

  .topbar {
    position: fixed !important;
    inset: calc(6px + env(safe-area-inset-top)) 8px auto 8px !important;
    z-index: 1200 !important;
    display: grid !important;
    grid-template-columns: 30px minmax(0, 1fr) 48px !important;
    gap: 5px !important;
    align-items: center !important;
    width: calc(100dvw - 16px) !important;
    min-width: 0 !important;
    max-width: calc(100dvw - 16px) !important;
    height: 54px !important;
    min-height: 54px !important;
    max-height: 54px !important;
    margin: 0 !important;
    padding: 6px 7px !important;
    border-radius: 12px !important;
    overflow: visible !important;
  }

  .topbar::before,
  .topbar::after,
  .topbar .brand span,
  .topbar__actions .button:not(.button--profile),
  .topbar__logout {
    display: none !important;
  }

  .topbar .brand {
    display: grid !important;
    width: 30px !important;
    min-width: 30px !important;
    height: 42px !important;
    place-items: center !important;
    padding: 0 !important;
  }

  .topbar .brand img {
    width: 24px !important;
    height: 24px !important;
  }

  .topbar__nav {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 1px !important;
    width: 100% !important;
    min-width: 0 !important;
    height: 42px !important;
    padding: 0 !important;
    overflow: hidden !important;
    border: 0 !important;
    background: transparent !important;
    opacity: 1 !important;
    visibility: visible !important;
  }

  .topbar__actions,
  .topbar .profile-menu {
    display: grid !important;
    width: 48px !important;
    min-width: 48px !important;
    height: 42px !important;
    margin: 0 !important;
    padding: 0 !important;
    opacity: 1 !important;
    visibility: visible !important;
  }

  .topbar__nav a,
  .topbar .profile-menu > summary.button--profile,
  .topbar .button--profile {
    display: grid !important;
    grid-template-rows: 18px 11px !important;
    align-content: center !important;
    justify-items: center !important;
    gap: 2px !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    height: 42px !important;
    min-height: 42px !important;
    max-height: 42px !important;
    padding: 4px 1px !important;
    overflow: hidden !important;
    border: 0 !important;
    border-radius: 8px !important;
    background: transparent !important;
    box-shadow: none !important;
    color: rgba(239, 232, 250, .78) !important;
    text-align: center !important;
    transform: none !important;
  }

  .topbar__nav a.is-active,
  .topbar__nav a:hover,
  .topbar__nav a:focus-visible,
  .topbar .profile-menu > summary.button--profile:hover,
  .topbar .profile-menu > summary.button--profile:focus-visible,
  .topbar .button--profile:hover,
  .topbar .button--profile:focus-visible {
    background: rgba(255, 255, 255, .08) !important;
    color: #fff !important;
  }

  .topbar__nav a::after,
  .topbar .button--profile::after {
    display: none !important;
  }

  .topbar__nav img.nav-icon,
  .topbar .button--profile img.nav-icon,
  .topbar .profile-mini-avatar {
    display: grid !important;
    width: 17px !important;
    min-width: 17px !important;
    max-width: 17px !important;
    height: 17px !important;
    min-height: 17px !important;
    max-height: 17px !important;
    place-items: center !important;
    object-fit: cover !important;
    border-radius: 50% !important;
    font-size: 9px !important;
    line-height: 1 !important;
  }

  .topbar__nav a span,
  .topbar .button--profile > span:not(.profile-mini-avatar) {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    overflow: hidden !important;
    font-size: 8.5px !important;
    font-weight: 600 !important;
    line-height: 1 !important;
    text-align: center !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }

  .topbar .profile-menu__panel {
    position: fixed !important;
    top: auto !important;
    right: 8px !important;
    bottom: calc(8px + env(safe-area-inset-bottom)) !important;
    left: 8px !important;
    z-index: 1400 !important;
    width: auto !important;
    max-height: min(78dvh, 420px) !important;
    padding: 16px !important;
    overflow-y: auto !important;
    border-radius: 18px !important;
  }

  main:has(.browser-search-app),
  main:has(.create-layout),
  main:has(.rooms-section),
  main:has(.empty-state) {
    width: calc(100vw - 16px) !important;
    max-width: calc(100vw - 16px) !important;
    padding-top: 12px !important;
  }

  .browser-search-head {
    grid-template-columns: 38px minmax(0, 1fr) !important;
    gap: 8px !important;
    margin-bottom: 16px !important;
  }

  .browser-mode-switch {
    grid-column: 1 / -1 !important;
    justify-self: stretch !important;
  }

  .browser-search-bar {
    grid-template-columns: 1fr !important;
  }

  .create-hero {
    min-height: 220px !important;
  }

  .create-layout.create-layout--premium,
  .create-layout--premium .type-list {
    grid-template-columns: 1fr !important;
  }

  .rooms-grid {
    grid-template-columns: 1fr !important;
  }

  .room-tile {
    max-width: none !important;
  }
}

/* 2026-07-09 ultimate layout fix: this block intentionally stays last. */
html,
body {
  max-width: 100%;
  overflow-x: hidden;
}

.topbar {
  box-sizing: border-box !important;
  width: min(100% - 32px, 1560px) !important;
  max-width: 1560px !important;
  margin-inline: auto !important;
  overflow: visible !important;
}

.topbar__actions {
  display: flex !important;
  align-items: center !important;
  justify-content: flex-end !important;
  min-width: 0 !important;
}

.topbar .profile-menu {
  position: relative !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
}

.topbar .profile-menu > summary.button--profile {
  display: inline-flex !important;
  width: auto !important;
  min-width: 122px !important;
  height: 48px !important;
  min-height: 48px !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 10px !important;
  padding: 0 15px !important;
  border: 1px solid rgba(226, 214, 255, .16) !important;
  border-radius: 12px !important;
  background: rgba(255, 255, 255, .04) !important;
  color: #fff !important;
  box-shadow: none !important;
}

.profile-mini-avatar,
.profile-menu__avatar,
.participant-chip__avatar,
.participant-row__avatar,
.chat-message__avatar,
.profile-hero__avatar span {
  display: grid !important;
  place-items: center !important;
  line-height: 1 !important;
  text-align: center !important;
}

.profile-mini-avatar {
  flex: 0 0 auto !important;
  width: 28px !important;
  height: 28px !important;
  min-width: 28px !important;
  min-height: 28px !important;
  overflow: hidden !important;
  border-radius: 50% !important;
  object-fit: cover !important;
  font-size: 12px !important;
  font-weight: 700 !important;
}

.profile-mini-avatar--initial,
.profile-menu__avatar--initial {
  background: #8b5cf6 !important;
  color: #fff !important;
}

.topbar .profile-menu > summary.button--profile > span:not(.profile-mini-avatar) {
  display: inline-block !important;
  font-size: 14px !important;
  font-weight: 700 !important;
  line-height: 1 !important;
}

main:has(.browser-search-app),
main:has(.create-layout),
main:has(.rooms-section),
main:has(.empty-state) {
  width: min(1560px, calc(100vw - 48px)) !important;
  max-width: calc(100vw - 48px) !important;
  min-height: 0 !important;
  margin-inline: auto !important;
  padding-top: 26px !important;
  padding-bottom: 24px !important;
  overflow: clip !important;
  background: transparent !important;
}

.browser-search-app {
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
  min-height: 0 !important;
  padding: 18px 0 20px !important;
  margin: 0 !important;
  border-bottom: 1px solid rgba(226, 214, 255, .1) !important;
}

.browser-search-app::before,
.browser-search-app::after {
  display: none !important;
  content: none !important;
}

.browser-search-head {
  display: grid !important;
  grid-template-columns: 42px minmax(0, 1fr) auto !important;
  min-height: 0 !important;
  align-items: center !important;
  gap: 14px !important;
  margin: 0 0 28px !important;
  padding: 0 !important;
}

.browser-search-head h1 {
  margin: 0 !important;
  font-size: clamp(24px, 2.2vw, 34px) !important;
  text-align: center !important;
}

.browser-workspace,
.browser-search-panel {
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
}

.browser-search-bar {
  width: 100% !important;
  max-width: 100% !important;
}

.browser-search-app .browser-status {
  min-height: 42px !important;
}

.browser-search-app .browser-results {
  width: 100% !important;
  min-height: 132px !important;
  margin-top: 10px !important;
}

.browser-search-app .browser-empty,
.browser-search-app .browser-loading {
  min-height: 132px !important;
}

.create-hero {
  min-height: 240px !important;
  margin-bottom: 18px !important;
}

.create-layout.create-layout--premium {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 430px) !important;
  gap: 16px !important;
  width: 100% !important;
  max-width: 100% !important;
  min-height: 0 !important;
  margin: 0 !important;
}

.create-card {
  min-height: 0 !important;
  align-content: start !important;
  padding: 18px !important;
}

.create-layout--premium .choice-card,
.create-layout--premium .access-field label {
  min-height: 84px !important;
}

.rooms-section,
.home-open-rooms {
  width: 100% !important;
  max-width: 100% !important;
  overflow: hidden !important;
}

.rooms-grid {
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(230px, 280px)) !important;
  justify-content: start !important;
  gap: 16px !important;
  width: 100% !important;
  max-width: 100% !important;
}

.room-tile {
  width: 100% !important;
  min-width: 0 !important;
  max-width: 280px !important;
  overflow: hidden !important;
}

.room-tile__media {
  aspect-ratio: 16 / 9 !important;
  min-height: 0 !important;
}

.room-tile__media img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
}

@media (max-width: 920px) {
  body {
    padding-top: calc(64px + env(safe-area-inset-top)) !important;
  }

  body.auth-open .topbar,
  body.cookie-open .topbar,
  body.room-settings-open .topbar,
  body.participants-open .topbar {
    display: none !important;
  }

  .topbar {
    position: fixed !important;
    inset: calc(6px + env(safe-area-inset-top)) 8px auto 8px !important;
    z-index: 1200 !important;
    display: grid !important;
    grid-template-columns: 30px minmax(0, 1fr) 48px !important;
    gap: 5px !important;
    align-items: center !important;
    width: calc(100dvw - 16px) !important;
    min-width: 0 !important;
    max-width: calc(100dvw - 16px) !important;
    height: 54px !important;
    min-height: 54px !important;
    max-height: 54px !important;
    margin: 0 !important;
    padding: 6px 7px !important;
    border-radius: 12px !important;
    overflow: visible !important;
  }

  .topbar::before,
  .topbar::after,
  .topbar .brand span,
  .topbar__actions .button:not(.button--profile),
  .topbar__logout {
    display: none !important;
  }

  .topbar .brand {
    display: grid !important;
    width: 30px !important;
    min-width: 30px !important;
    height: 42px !important;
    place-items: center !important;
    padding: 0 !important;
  }

  .topbar .brand img {
    width: 24px !important;
    height: 24px !important;
  }

  .topbar__nav {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 1px !important;
    width: 100% !important;
    min-width: 0 !important;
    height: 42px !important;
    padding: 0 !important;
    overflow: hidden !important;
    border: 0 !important;
    background: transparent !important;
    opacity: 1 !important;
    visibility: visible !important;
  }

  .topbar__actions,
  .topbar .profile-menu {
    display: grid !important;
    width: 48px !important;
    min-width: 48px !important;
    height: 42px !important;
    margin: 0 !important;
    padding: 0 !important;
    opacity: 1 !important;
    visibility: visible !important;
  }

  .topbar__nav a,
  .topbar .profile-menu > summary.button--profile,
  .topbar .button--profile {
    display: grid !important;
    grid-template-rows: 18px 11px !important;
    align-content: center !important;
    justify-items: center !important;
    gap: 2px !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    height: 42px !important;
    min-height: 42px !important;
    max-height: 42px !important;
    padding: 4px 1px !important;
    overflow: hidden !important;
    border: 0 !important;
    border-radius: 8px !important;
    background: transparent !important;
    box-shadow: none !important;
    color: rgba(239, 232, 250, .78) !important;
    text-align: center !important;
    transform: none !important;
  }

  .topbar__nav a.is-active,
  .topbar__nav a:hover,
  .topbar__nav a:focus-visible,
  .topbar .profile-menu > summary.button--profile:hover,
  .topbar .profile-menu > summary.button--profile:focus-visible,
  .topbar .button--profile:hover,
  .topbar .button--profile:focus-visible {
    background: rgba(255, 255, 255, .08) !important;
    color: #fff !important;
  }

  .topbar__nav a::after,
  .topbar .button--profile::after {
    display: none !important;
  }

  .topbar__nav img.nav-icon,
  .topbar .button--profile img.nav-icon,
  .topbar .profile-mini-avatar {
    display: grid !important;
    width: 17px !important;
    min-width: 17px !important;
    max-width: 17px !important;
    height: 17px !important;
    min-height: 17px !important;
    max-height: 17px !important;
    place-items: center !important;
    object-fit: cover !important;
    border-radius: 50% !important;
    font-size: 9px !important;
    line-height: 1 !important;
  }

  .topbar__nav a span,
  .topbar .button--profile > span:not(.profile-mini-avatar) {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    overflow: hidden !important;
    font-size: 8.5px !important;
    font-weight: 600 !important;
    line-height: 1 !important;
    text-align: center !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }

  .topbar .profile-menu__panel {
    position: fixed !important;
    top: auto !important;
    right: 8px !important;
    bottom: calc(8px + env(safe-area-inset-bottom)) !important;
    left: 8px !important;
    z-index: 1400 !important;
    width: auto !important;
    max-height: min(78dvh, 420px) !important;
    padding: 16px !important;
    overflow-y: auto !important;
    border-radius: 18px !important;
  }

  main:has(.browser-search-app),
  main:has(.create-layout),
  main:has(.rooms-section),
  main:has(.empty-state) {
    width: calc(100vw - 16px) !important;
    max-width: calc(100vw - 16px) !important;
    padding-top: 12px !important;
  }

  .browser-search-head {
    grid-template-columns: 38px minmax(0, 1fr) !important;
    gap: 8px !important;
    margin-bottom: 16px !important;
  }

  .browser-mode-switch {
    grid-column: 1 / -1 !important;
    justify-self: stretch !important;
  }

  .browser-search-bar {
    grid-template-columns: 1fr !important;
  }

  .create-hero {
    min-height: 220px !important;
  }

  .create-layout.create-layout--premium,
  .create-layout--premium .type-list {
    grid-template-columns: 1fr !important;
  }

  .rooms-grid {
    grid-template-columns: 1fr !important;
  }

  .room-tile {
    max-width: none !important;
  }
}

/* 2026-07-09 header profile hard fix: desktop avatar menu and mobile full header. */
.topbar .profile-menu {
  position: relative !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-width: 0 !important;
}

.topbar .profile-menu > summary.button--profile {
  display: inline-flex !important;
  width: auto !important;
  min-width: 48px !important;
  height: 48px !important;
  min-height: 48px !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 9px !important;
  padding: 0 14px !important;
  border: 1px solid rgba(226, 214, 255, .16) !important;
  border-radius: 12px !important;
  background: rgba(255, 255, 255, .035) !important;
  color: #fff !important;
  box-shadow: none !important;
  text-decoration: none !important;
}

.topbar .profile-menu > summary.button--profile:hover,
.topbar .profile-menu > summary.button--profile:focus-visible {
  border-color: rgba(178, 134, 255, .5) !important;
  background: rgba(139, 92, 246, .16) !important;
}

.profile-mini-avatar,
.profile-menu__avatar,
.participant-chip__avatar,
.participant-row__avatar,
.chat-message__avatar,
.profile-hero__avatar span {
  display: grid !important;
  place-items: center !important;
  line-height: 1 !important;
  text-align: center !important;
}

.profile-mini-avatar {
  flex: 0 0 auto !important;
  width: 28px !important;
  height: 28px !important;
  min-width: 28px !important;
  min-height: 28px !important;
  border-radius: 50% !important;
  overflow: hidden !important;
  object-fit: cover !important;
  font-size: 12px !important;
  font-weight: 700 !important;
}

.profile-mini-avatar--initial {
  background: #8b5cf6 !important;
  color: #fff !important;
}

.topbar .profile-menu > summary.button--profile > span:not(.profile-mini-avatar) {
  display: inline-block !important;
  font-size: 14px !important;
  font-weight: 700 !important;
  line-height: 1 !important;
}

@media (min-width: 921px) {
  .topbar__actions {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-end !important;
    min-width: 0 !important;
  }

  .topbar .profile-menu > summary.button--profile {
    min-width: 118px !important;
  }

  .topbar .profile-menu__panel {
    display: grid !important;
  }
}

@media (max-width: 920px) {
  html,
  body {
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: hidden !important;
  }

  body {
    padding-top: calc(64px + env(safe-area-inset-top)) !important;
  }

  body.auth-open .topbar,
  body.cookie-open .topbar,
  body.room-settings-open .topbar,
  body.participants-open .topbar {
    display: none !important;
  }

  .topbar {
    box-sizing: border-box !important;
    position: fixed !important;
    inset: calc(6px + env(safe-area-inset-top)) 8px auto 8px !important;
    z-index: 1200 !important;
    display: grid !important;
    grid-template-columns: 30px minmax(0, 1fr) 48px !important;
    gap: 5px !important;
    align-items: center !important;
    width: calc(100dvw - 16px) !important;
    min-width: 0 !important;
    max-width: calc(100dvw - 16px) !important;
    height: 54px !important;
    min-height: 54px !important;
    max-height: 54px !important;
    margin: 0 !important;
    padding: 6px 7px !important;
    overflow: visible !important;
    border: 1px solid rgba(226, 214, 255, .12) !important;
    border-radius: 12px !important;
    background: rgba(20, 17, 27, .96) !important;
    box-shadow: 0 14px 34px rgba(0, 0, 0, .32) !important;
    transform: none !important;
  }

  .topbar::before,
  .topbar::after {
    display: none !important;
  }

  .topbar .brand {
    display: grid !important;
    width: 30px !important;
    min-width: 30px !important;
    height: 42px !important;
    min-height: 42px !important;
    place-items: center !important;
    padding: 0 !important;
  }

  .topbar .brand img {
    display: block !important;
    width: 24px !important;
    height: 24px !important;
    object-fit: contain !important;
  }

  .topbar .brand span,
  .topbar__actions .button:not(.button--profile),
  .topbar__logout {
    display: none !important;
  }

  .topbar__nav {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 1px !important;
    width: 100% !important;
    min-width: 0 !important;
    height: 42px !important;
    padding: 0 !important;
    overflow: hidden !important;
    border: 0 !important;
    background: transparent !important;
    opacity: 1 !important;
    visibility: visible !important;
  }

  .topbar__actions {
    display: grid !important;
    width: 48px !important;
    min-width: 48px !important;
    height: 42px !important;
    min-height: 42px !important;
    margin: 0 !important;
    padding: 0 !important;
    opacity: 1 !important;
    visibility: visible !important;
  }

  .topbar .profile-menu {
    display: grid !important;
    width: 48px !important;
    min-width: 48px !important;
    height: 42px !important;
  }

  .topbar__nav a,
  .topbar .profile-menu > summary.button--profile,
  .topbar .button--profile {
    display: grid !important;
    grid-template-rows: 18px 11px !important;
    align-content: center !important;
    justify-items: center !important;
    gap: 2px !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    height: 42px !important;
    min-height: 42px !important;
    max-height: 42px !important;
    padding: 4px 1px !important;
    overflow: hidden !important;
    border: 0 !important;
    border-radius: 8px !important;
    background: transparent !important;
    box-shadow: none !important;
    color: rgba(239, 232, 250, .78) !important;
    text-align: center !important;
    transform: none !important;
  }

  .topbar__nav a.is-active,
  .topbar__nav a:hover,
  .topbar__nav a:focus-visible,
  .topbar .profile-menu > summary.button--profile:hover,
  .topbar .profile-menu > summary.button--profile:focus-visible,
  .topbar .button--profile:hover,
  .topbar .button--profile:focus-visible {
    background: rgba(255, 255, 255, .08) !important;
    color: #fff !important;
  }

  .topbar__nav a::after,
  .topbar .button--profile::after {
    display: none !important;
  }

  .topbar__nav img.nav-icon,
  .topbar .button--profile img.nav-icon,
  .topbar .profile-mini-avatar {
    display: grid !important;
    width: 17px !important;
    min-width: 17px !important;
    max-width: 17px !important;
    height: 17px !important;
    min-height: 17px !important;
    max-height: 17px !important;
    place-items: center !important;
    object-fit: cover !important;
    border-radius: 50% !important;
    font-size: 9px !important;
    line-height: 1 !important;
  }

  .topbar__nav a span,
  .topbar .button--profile > span:not(.profile-mini-avatar) {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    overflow: hidden !important;
    font-size: 8.5px !important;
    font-weight: 600 !important;
    line-height: 1 !important;
    text-align: center !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }

  .profile-menu[open]::before {
    position: fixed !important;
    inset: 0 !important;
    z-index: 1390 !important;
    content: "" !important;
    background: rgba(8, 6, 12, .56) !important;
  }

  .topbar .profile-menu__panel {
    position: fixed !important;
    top: auto !important;
    right: 8px !important;
    bottom: calc(8px + env(safe-area-inset-bottom)) !important;
    left: 8px !important;
    z-index: 1400 !important;
    display: grid !important;
    width: auto !important;
    max-height: min(78dvh, 420px) !important;
    padding: 16px !important;
    overflow-y: auto !important;
    border-radius: 18px !important;
    opacity: 0 !important;
    pointer-events: none !important;
    transform: translateY(24px) !important;
  }

  .topbar .profile-menu[open] .profile-menu__panel {
    opacity: 1 !important;
    pointer-events: auto !important;
    transform: translateY(0) !important;
  }
}

/* 2026-07-09 final UI corrections: profile menu, compact create/search, visible mobile header. */
.profile-menu {
  position: relative;
  display: inline-grid;
}

.profile-menu summary {
  list-style: none;
  cursor: pointer;
}

.profile-menu summary::-webkit-details-marker {
  display: none;
}

.profile-menu__panel {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 1400;
  display: grid;
  width: 260px;
  gap: 6px;
  padding: 12px;
  border: 1px solid rgba(226, 214, 255, .14);
  border-radius: 14px;
  background: rgba(24, 20, 31, .96);
  box-shadow: 0 24px 64px rgba(0, 0, 0, .36);
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity .16s ease, transform .16s ease;
}

.profile-menu:hover .profile-menu__panel,
.profile-menu:focus-within .profile-menu__panel,
.profile-menu[open] .profile-menu__panel {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.profile-menu__identity {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 6px 6px 12px;
  border-bottom: 1px solid rgba(226, 214, 255, .1);
}

.profile-menu__avatar {
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  overflow: hidden;
  border-radius: 14px;
  background: #8b5cf6;
  color: #fff;
  object-fit: cover;
  font-size: 18px;
  font-weight: 700;
  text-transform: uppercase;
}

.profile-menu__identity strong,
.profile-menu__identity span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-menu__identity strong {
  color: #fff;
  font-size: 15px;
}

.profile-menu__identity span {
  margin-top: 2px;
  color: rgba(217, 204, 239, .66);
  font-size: 13px;
}

.profile-menu__panel a,
.profile-menu__panel button {
  display: flex;
  width: 100%;
  min-height: 40px;
  align-items: center;
  padding: 0 10px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: rgba(248, 245, 255, .9);
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}

.profile-menu__panel a:hover,
.profile-menu__panel button:hover {
  background: rgba(255, 255, 255, .08);
  color: #fff;
}

main:has(.browser-search-app) {
  max-width: calc(100vw - 48px) !important;
}

.browser-search-app {
  min-height: 0 !important;
  padding-top: 18px !important;
  padding-bottom: 22px !important;
}

.browser-search-app .browser-search-head {
  min-height: 0 !important;
  margin-bottom: 22px !important;
}

.browser-search-app .browser-workspace {
  display: block !important;
}

.browser-search-app .browser-search-panel {
  display: grid !important;
  gap: 10px !important;
}

.browser-search-app .browser-empty,
.browser-search-app .browser-loading {
  min-height: 120px !important;
}

main:has(.create-layout) {
  max-width: calc(100vw - 48px) !important;
}

.create-layout.create-layout--premium {
  grid-template-columns: minmax(0, 1fr) minmax(320px, 430px) !important;
  gap: 16px !important;
}

.create-card {
  align-content: start !important;
  padding: 18px !important;
}

.create-layout--premium .choice-card,
.create-layout--premium .access-field label {
  min-height: 86px !important;
}

@media (max-width: 920px) {
  body:not(.auth-open) .topbar {
    position: fixed !important;
    inset: calc(8px + env(safe-area-inset-top)) 8px auto 8px !important;
    display: grid !important;
    grid-template-columns: 30px minmax(0, 1fr) 54px !important;
    gap: 6px !important;
    width: calc(100dvw - 16px) !important;
    max-width: calc(100dvw - 16px) !important;
    height: 56px !important;
    padding: 7px 8px !important;
    overflow: visible !important;
  }

  body:not(.auth-open) .topbar .brand {
    display: grid !important;
    width: 30px !important;
    height: 42px !important;
    place-items: center !important;
  }

  body:not(.auth-open) .topbar .brand img {
    display: block !important;
    width: 24px !important;
    height: 24px !important;
  }

  body:not(.auth-open) .topbar .brand span {
    display: none !important;
  }

  body:not(.auth-open) .topbar__nav {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    width: 100% !important;
    height: 42px !important;
    opacity: 1 !important;
    visibility: visible !important;
  }

  body:not(.auth-open) .topbar__actions {
    display: grid !important;
    width: 54px !important;
    height: 42px !important;
    opacity: 1 !important;
    visibility: visible !important;
  }

  body:not(.auth-open) .topbar__nav a,
  body:not(.auth-open) .topbar .button--profile,
  body:not(.auth-open) .profile-menu summary {
    display: grid !important;
    grid-template-rows: 18px 12px !important;
    justify-items: center !important;
    align-content: center !important;
    gap: 2px !important;
    height: 42px !important;
    min-height: 42px !important;
    padding: 4px 1px !important;
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
  }

  body:not(.auth-open) .topbar__nav img.nav-icon,
  body:not(.auth-open) .topbar .button--profile img.nav-icon,
  body:not(.auth-open) .topbar .profile-mini-avatar {
    width: 17px !important;
    height: 17px !important;
    min-width: 17px !important;
    min-height: 17px !important;
    border-radius: 7px !important;
  }

  body:not(.auth-open) .topbar__nav a span,
  body:not(.auth-open) .topbar .button--profile > span:not(.profile-mini-avatar) {
    display: block !important;
    width: 100% !important;
    overflow: hidden !important;
    font-size: 8.5px !important;
    font-weight: 600 !important;
    line-height: 1 !important;
    text-align: center !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }

  .profile-menu[open]::before {
    position: fixed;
    inset: 0;
    z-index: 1390;
    content: "";
    background: rgba(8, 6, 12, .54);
  }

  .profile-menu__panel {
    position: fixed !important;
    top: auto !important;
    right: 8px !important;
    bottom: calc(8px + env(safe-area-inset-bottom)) !important;
    left: 8px !important;
    z-index: 1400 !important;
    width: auto !important;
    padding: 16px !important;
    border-radius: 18px 18px 14px 14px !important;
    opacity: 0;
    transform: translateY(24px);
  }

  .profile-menu[open] .profile-menu__panel {
    opacity: 1 !important;
    pointer-events: auto !important;
    transform: translateY(0) !important;
  }

  .profile-menu__identity {
    grid-template-columns: 58px minmax(0, 1fr);
    padding: 2px 2px 14px;
  }

  .profile-menu__avatar {
    width: 58px;
    height: 58px;
    border-radius: 16px;
  }

  main:has(.browser-search-app),
  main:has(.create-layout) {
    max-width: calc(100vw - 16px) !important;
  }

  .browser-search-app,
  .create-layout.create-layout--premium {
    width: 100% !important;
    max-width: 100% !important;
  }
}

/* Final volume positioning: the slider is anchored to the volume icon. */
.watch-player .player-volume {
  position: relative !important;
  display: grid !important;
  place-items: center !important;
}

.watch-player .player-volume__range {
  position: absolute !important;
  right: auto !important;
  bottom: calc(100% + 12px) !important;
  left: 50% !important;
  z-index: 18 !important;
  width: 92px !important;
  height: 4px !important;
  margin: 0 !important;
  padding: 0 !important;
  border-radius: 999px !important;
  opacity: 0 !important;
  pointer-events: none !important;
  transform: translateX(-50%) rotate(-90deg) !important;
  transform-origin: center !important;
  transition: opacity .16s ease, transform .16s ease !important;
}

.watch-player .player-volume:hover .player-volume__range,
.watch-player .player-volume:focus-within .player-volume__range,
.watch-player.watch-player--volume-open .player-volume__range {
  opacity: 1 !important;
  pointer-events: auto !important;
  transform: translateX(-50%) rotate(-90deg) scale(1.02) !important;
}

@media (max-width: 920px) {
  .watch-player .player-volume {
    width: 32px !important;
    min-width: 32px !important;
    height: 32px !important;
  }

  .watch-player .player-volume__range {
    bottom: calc(100% + 16px) !important;
    width: 96px !important;
    height: 5px !important;
  }
}

/* Final-final mobile header: use flex so the nav cannot collapse to the logo only. */
@media (max-width: 920px) {
  body {
    padding-top: calc(64px + env(safe-area-inset-top)) !important;
  }

  .topbar {
    position: fixed !important;
    top: calc(6px + env(safe-area-inset-top)) !important;
    right: 8px !important;
    bottom: auto !important;
    left: 8px !important;
    z-index: 1200 !important;
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 6px !important;
    width: calc(100vw - 16px) !important;
    width: calc(100dvw - 16px) !important;
    min-width: calc(100vw - 16px) !important;
    max-width: calc(100vw - 16px) !important;
    height: 54px !important;
    min-height: 54px !important;
    max-height: 54px !important;
    margin: 0 !important;
    padding: 6px 8px !important;
    overflow: hidden !important;
    border-radius: 12px !important;
  }

  .topbar .brand {
    display: flex !important;
    flex: 0 0 30px !important;
    width: 30px !important;
    min-width: 30px !important;
    height: 40px !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 !important;
  }

  .topbar .brand img {
    width: 24px !important;
    height: 24px !important;
  }

  .topbar .brand span,
  .topbar__logout,
  .topbar__actions .button:not(.button--profile) {
    display: none !important;
  }

  .topbar__nav {
    display: flex !important;
    flex: 1 1 auto !important;
    min-width: 0 !important;
    height: 40px !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 2px !important;
    padding: 0 !important;
    overflow: hidden !important;
    border: 0 !important;
    background: transparent !important;
  }

  .topbar__actions {
    display: flex !important;
    flex: 0 0 44px !important;
    width: 44px !important;
    min-width: 44px !important;
    height: 40px !important;
    align-items: center !important;
    justify-content: center !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  .topbar__nav a,
  .topbar .button--profile {
    display: flex !important;
    flex: 1 1 0 !important;
    min-width: 0 !important;
    height: 40px !important;
    min-height: 40px !important;
    align-items: center !important;
    justify-content: center !important;
    flex-direction: column !important;
    gap: 2px !important;
    padding: 3px 1px !important;
    overflow: hidden !important;
    border: 0 !important;
    border-radius: 8px !important;
    background: transparent !important;
    box-shadow: none !important;
    color: rgba(239, 232, 250, .78) !important;
    transform: none !important;
  }

  .topbar .button--profile {
    flex: 0 0 44px !important;
    width: 44px !important;
  }

  .topbar__nav img.nav-icon,
  .topbar .button--profile img.nav-icon {
    display: block !important;
    flex: 0 0 auto !important;
    width: 17px !important;
    min-width: 17px !important;
    height: 17px !important;
    min-height: 17px !important;
  }

  .topbar__nav a span,
  .topbar .button--profile span {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    overflow: hidden !important;
    font-size: 8px !important;
    font-weight: 600 !important;
    line-height: 1 !important;
    text-align: center !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }
}

/* Absolute final overrides for create/search pages and player volume. */
main:has(.create-layout),
main:has(.browser-search-app) {
  width: min(100%, 1560px) !important;
  max-width: calc(100vw - 48px) !important;
  margin-inline: auto !important;
  overflow-x: clip !important;
}

.create-layout.create-layout--premium {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 430px) !important;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  box-sizing: border-box !important;
}

.create-card,
.create-layout--premium .choice-card,
.create-layout--premium .access-field label {
  min-width: 0 !important;
  box-sizing: border-box !important;
}

.browser-search-app {
  width: 100% !important;
  max-width: 100% !important;
  min-height: auto !important;
  padding: clamp(18px, 3vw, 34px) 0 28px !important;
  box-sizing: border-box !important;
}

.browser-search-app .browser-search-head {
  min-height: auto !important;
  margin-bottom: clamp(18px, 4vw, 34px) !important;
}

.browser-search-app .browser-workspace,
.browser-search-app .browser-search-panel {
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
}

.browser-search-app .browser-results {
  min-height: 0 !important;
}

.browser-search-app .browser-empty,
.browser-search-app .browser-loading {
  min-height: 136px !important;
}

.watch-player .player-volume {
  position: relative !important;
  display: grid !important;
  width: 34px !important;
  min-width: 34px !important;
  height: 34px !important;
  place-items: center !important;
}

.watch-player .player-volume__range {
  position: absolute !important;
  right: auto !important;
  bottom: calc(100% + 58px) !important;
  left: 50% !important;
  z-index: 30 !important;
  display: block !important;
  width: 112px !important;
  height: 5px !important;
  margin: 0 !important;
  opacity: 0 !important;
  pointer-events: none !important;
  transform: translateX(-50%) rotate(-90deg) !important;
  transform-origin: center !important;
  transition: opacity .16s ease, transform .16s ease !important;
}

.watch-player .player-volume:hover .player-volume__range,
.watch-player .player-volume:focus-within .player-volume__range,
.watch-player.watch-player--volume-open .player-volume__range {
  opacity: 1 !important;
  pointer-events: auto !important;
  transform: translateX(-50%) rotate(-90deg) scale(1.02) !important;
}

@media (max-width: 920px) {
  main:has(.create-layout),
  main:has(.browser-search-app) {
    max-width: calc(100vw - 16px) !important;
  }

  .create-layout.create-layout--premium,
  .create-layout--premium .type-list {
    grid-template-columns: 1fr !important;
  }

  .browser-search-app .browser-search-head {
    display: grid !important;
    grid-template-columns: 40px 1fr !important;
    gap: 10px !important;
    align-items: center !important;
  }

  .browser-search-app .browser-search-head h1 {
    grid-column: 2 !important;
    margin: 0 !important;
    font-size: 22px !important;
    text-align: left !important;
  }

  .browser-search-app .browser-mode-switch {
    grid-column: 1 / -1 !important;
    justify-self: stretch !important;
  }

  .browser-search-bar {
    grid-template-columns: 1fr !important;
  }
}

/* Absolute last mobile header rule: full-width top navigation. */
@media (max-width: 920px) {
  html,
  body {
    overflow-x: hidden !important;
  }

  body {
    padding-top: calc(66px + env(safe-area-inset-top)) !important;
  }

  .topbar {
    box-sizing: border-box !important;
    position: fixed !important;
    inset: calc(6px + env(safe-area-inset-top)) 8px auto 8px !important;
    z-index: 1200 !important;
    display: grid !important;
    grid-template-columns: 32px minmax(0, 1fr) 48px !important;
    column-gap: 6px !important;
    align-items: center !important;
    width: calc(100dvw - 16px) !important;
    min-width: 0 !important;
    max-width: calc(100dvw - 16px) !important;
    height: 56px !important;
    min-height: 56px !important;
    max-height: 56px !important;
    margin: 0 !important;
    padding: 7px 8px !important;
    overflow: hidden !important;
    border-radius: 12px !important;
    transform: none !important;
  }

  .topbar .brand,
  .topbar__nav,
  .topbar__actions,
  .topbar__nav a,
  .topbar .button--profile {
    box-sizing: border-box !important;
    min-width: 0 !important;
    transform: none !important;
  }

  .topbar .brand {
    display: flex !important;
    width: 32px !important;
    height: 42px !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 !important;
  }

  .topbar .brand img {
    width: 25px !important;
    height: 25px !important;
  }

  .topbar .brand span,
  .topbar__logout,
  .topbar__actions .button:not(.button--profile) {
    display: none !important;
  }

  .topbar__nav {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 1px !important;
    width: 100% !important;
    height: 42px !important;
    padding: 0 !important;
    overflow: hidden !important;
    border: 0 !important;
    background: transparent !important;
  }

  .topbar__actions {
    display: grid !important;
    width: 48px !important;
    height: 42px !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  .topbar__nav a,
  .topbar .button--profile {
    display: grid !important;
    grid-template-rows: 18px 11px !important;
    align-content: center !important;
    justify-items: center !important;
    gap: 2px !important;
    width: 100% !important;
    height: 42px !important;
    min-height: 42px !important;
    padding: 4px 1px !important;
    overflow: hidden !important;
    border: 0 !important;
    border-radius: 8px !important;
    background: transparent !important;
    box-shadow: none !important;
    color: rgba(239, 232, 250, .76) !important;
    text-align: center !important;
  }

  .topbar__nav a.is-active,
  .topbar__nav a:hover,
  .topbar__nav a:focus-visible,
  .topbar .button--profile:hover,
  .topbar .button--profile:focus-visible {
    background: rgba(255, 255, 255, .08) !important;
    color: #fff !important;
  }

  .topbar__nav a::after {
    display: none !important;
  }

  .topbar__nav img.nav-icon,
  .topbar .button--profile img.nav-icon {
    display: block !important;
    width: 17px !important;
    min-width: 17px !important;
    height: 17px !important;
    min-height: 17px !important;
    object-fit: contain !important;
  }

  .topbar__nav a span,
  .topbar .button--profile span {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    overflow: hidden !important;
    font-size: 8.5px !important;
    font-weight: 600 !important;
    line-height: 1 !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }
}

/* Absolute final overrides for create/search pages and player volume. */
main:has(.create-layout),
main:has(.browser-search-app) {
  width: min(100%, 1560px) !important;
  max-width: calc(100vw - 48px) !important;
  margin-inline: auto !important;
  overflow-x: clip !important;
}

.create-layout.create-layout--premium {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 430px) !important;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  box-sizing: border-box !important;
}

.create-card,
.create-layout--premium .choice-card,
.create-layout--premium .access-field label {
  min-width: 0 !important;
  box-sizing: border-box !important;
}

.browser-search-app {
  width: 100% !important;
  max-width: 100% !important;
  min-height: auto !important;
  padding: clamp(18px, 3vw, 34px) 0 28px !important;
  box-sizing: border-box !important;
}

.browser-search-app .browser-search-head {
  min-height: auto !important;
  margin-bottom: clamp(18px, 4vw, 34px) !important;
}

.browser-search-app .browser-workspace,
.browser-search-app .browser-search-panel {
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
}

.browser-search-app .browser-results {
  min-height: 0 !important;
}

.browser-search-app .browser-empty,
.browser-search-app .browser-loading {
  min-height: 136px !important;
}

.watch-player .player-volume {
  position: relative !important;
  display: grid !important;
  width: 34px !important;
  min-width: 34px !important;
  height: 34px !important;
  place-items: center !important;
}

.watch-player .player-volume__range {
  position: absolute !important;
  right: auto !important;
  bottom: calc(100% + 58px) !important;
  left: 50% !important;
  z-index: 30 !important;
  display: block !important;
  width: 112px !important;
  height: 5px !important;
  margin: 0 !important;
  opacity: 0 !important;
  pointer-events: none !important;
  transform: translateX(-50%) rotate(-90deg) !important;
  transform-origin: center !important;
  transition: opacity .16s ease, transform .16s ease !important;
}

.watch-player .player-volume:hover .player-volume__range,
.watch-player .player-volume:focus-within .player-volume__range,
.watch-player.watch-player--volume-open .player-volume__range {
  opacity: 1 !important;
  pointer-events: auto !important;
  transform: translateX(-50%) rotate(-90deg) scale(1.02) !important;
}

@media (max-width: 920px) {
  main:has(.create-layout),
  main:has(.browser-search-app) {
    max-width: calc(100vw - 16px) !important;
  }

  .create-layout.create-layout--premium,
  .create-layout--premium .type-list {
    grid-template-columns: 1fr !important;
  }

  .browser-search-app .browser-search-head {
    display: grid !important;
    grid-template-columns: 40px 1fr !important;
    gap: 10px !important;
    align-items: center !important;
  }

  .browser-search-app .browser-search-head h1 {
    grid-column: 2 !important;
    margin: 0 !important;
    font-size: 22px !important;
    text-align: left !important;
  }

  .browser-search-app .browser-mode-switch {
    grid-column: 1 / -1 !important;
    justify-self: stretch !important;
  }

  .browser-search-bar {
    grid-template-columns: 1fr !important;
  }
}
