:root {
  color-scheme: light;
  --page-bg: #fff;
  --page-text: #000;
  --page-muted: #666;
  --page-line: #000;
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html {
  min-height: 100%;
  background: var(--page-bg);
  overflow-x: hidden;
}

body {
  margin: 0;
  background: var(--page-bg);
  color: var(--page-text);
  overflow-x: hidden;
  font-family:
    -apple-system,
    BlinkMacSystemFont,
    "SF Pro Display",
    "SF Pro Text",
    "Helvetica Neue",
    Helvetica,
    Arial,
    sans-serif;
}

button,
a {
  font: inherit;
}

.view-toggle {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 20;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  pointer-events: none;
}

.view-toggle-left {
  display: flex;
  gap: 0;
  pointer-events: auto;
}

.toggle-button {
  appearance: none;
  -webkit-appearance: none;
  border: 1px solid var(--page-line);
  background: #fff;
  color: #000;
  font: inherit;
  font-size: 13px;
  padding: 10px 14px;
  min-height: 39px;
  border-radius: 0;
  cursor: pointer;
  margin-right: -1px;
  text-decoration: none;
}

.toggle-button.is-active {
  background: #000;
  color: #fff;
}

.refresh-toggle {
  min-width: 39px;
  padding-left: 12px;
  padding-right: 12px;
  font-size: 16px;
  line-height: 1;
}

.refresh-toggle-icon {
  display: inline-block;
  transform-origin: 50% 50%;
}

.refresh-toggle-icon.is-spinning {
  animation: refresh-once 520ms ease-in-out;
}

.toggle-button:not(.is-active):hover,
.toggle-button:not(.is-active):focus-visible {
  background: #d9d9d9;
  color: #000;
  outline: none;
}

.toggle-button:not(.is-active):active {
  background: #000;
  color: #fff;
}

.rooms-shell {
  width: calc(100vw - 32px);
  margin: 58px 16px 64px;
}

.rooms-hero {
  padding: 10px 0 clamp(24px, 4vw, 56px);
}

.rooms-status,
.room-meta,
.room-curator-link {
  margin: 0;
  line-height: 1;
  text-transform: lowercase;
}

.rooms-status {
  color: var(--page-muted);
  font-size: 13px;
}

.rooms-total-link {
  color: #000;
  text-decoration: underline;
  text-decoration-thickness: 0.055em;
  text-underline-offset: 0.09em;
}

.rooms-total-link:hover,
.rooms-total-link:focus-visible {
  background: #000;
  color: #fff;
  outline: none;
  text-decoration: none;
}

.rooms-status[hidden] {
  display: none;
}

.rooms-grid {
  display: block;
}

.room-card {
  min-width: 0;
  margin: 0 0 clamp(32px, 5vw, 72px);
}

.room-name {
  display: inline;
  color: #000;
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: clamp(56px, 4.9vw, 88px);
  font-weight: 400;
  line-height: 0.94;
  letter-spacing: 0.01em;
  text-decoration-thickness: 0.055em;
  text-underline-offset: 0.09em;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.room-name:hover,
.room-name:focus-visible {
  background: #000;
  color: #fff;
  outline: none;
  text-decoration: none;
}

.room-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 14px;
  margin-top: 10px;
  color: var(--page-muted);
  font-size: clamp(18px, 2vw, 28px);
}

.room-curators {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0 0.28em;
  align-items: baseline;
}

.room-curator-link {
  color: inherit;
  text-decoration: underline;
  text-decoration-thickness: 0.055em;
  text-underline-offset: 0.09em;
  cursor: pointer;
}

.room-curator-link:hover,
.room-curator-link:focus-visible {
  background: #000;
  color: #fff;
  outline: none;
  text-decoration: none;
}

.room-stamps {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0 8px;
  color: var(--page-muted);
  font-size: 13px;
  line-height: 1;
}

.room-count,
.room-updated {
  color: inherit;
}

.room-updated {
  color: #c40000;
}

@keyframes refresh-once {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 760px) {
  .rooms-shell {
    width: calc(100vw - 16px);
    margin: 52px 8px 48px;
  }

  .rooms-status,
  .room-meta,
  .room-curator-link {
    font-size: clamp(17px, 4.8vw, 24px);
  }

  .rooms-status {
    font-size: 13px;
  }

  .room-name {
    font-size: clamp(52px, 14vw, 74px);
  }

  .room-card {
    margin-bottom: clamp(30px, 9vw, 56px);
  }
}

/* The parent panel owns the fixed chat/music/rooms navigation. Everything
   inside this document remains part of the ordinary directory scroller. */
html.rooms-embedded .view-toggle {
  display: none;
}

html.rooms-embedded .rooms-shell {
  width: auto;
  margin: 0;
  padding: 22px 22px 40px;
}

/* Keep the directory's large room names; give their supporting information
   the quieter scale and inset spacing of the personal-history panel. */
html.rooms-embedded .rooms-hero {
  padding: 0 0 32px;
}

html.rooms-embedded .rooms-status {
  color: #777;
  font-size: 11px;
  line-height: 1.45;
}

html.rooms-embedded .room-card {
  margin-bottom: 44px;
}

html.rooms-embedded .room-card:last-child {
  margin-bottom: 0;
}

html.rooms-embedded .room-meta {
  display: grid;
  gap: 6px;
  margin-top: 12px;
  color: #777;
  font-size: 14px;
  line-height: 1.4;
}

html.rooms-embedded .room-curator-link {
  font-size: inherit;
  line-height: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

html.rooms-embedded .room-stamps {
  gap: 4px 12px;
  color: inherit;
  font-size: 11px;
  line-height: 1.4;
}

html.rooms-embedded .room-updated {
  color: inherit;
}

@media (max-width: 420px) {
  html.rooms-embedded .rooms-shell {
    padding: 20px 20px 36px;
  }
}

html.rooms-embedded .rooms-retry {
  appearance: none;
  -webkit-appearance: none;
  border: 0;
  padding: 0;
  background: transparent;
  color: #000;
  text-decoration: underline;
  cursor: pointer;
}

html.rooms-embedded .rooms-retry:hover,
html.rooms-embedded .rooms-retry:focus-visible {
  background: #000;
  color: #fff;
}
