:root,
html[data-theme="dark"] {
  --purple: #6b2fd6;
  --tile: #4b1ba6;
  --bright: #8a5cf0;
  --glow: rgba(107, 47, 214, 0.55);
  --purple-dark: #4b1ba6;
  --accent-line: #8a5cf0;
  --bg: #000000;
  --text: #e7e9ea;
  --muted: #71767b;
  --line: #2f3336;
  --hover: rgba(231, 233, 234, 0.08);
  --field: #000000;
  --link: #8a5cf0;
  --pill: #eff3f4;
  --pill-text: #0f1419;
  --search: #202327;
  --card: #000000;
  --mast: rgba(0, 0, 0, 0.85);
  color-scheme: dark;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

html[data-theme="light"] {
  --accent-line: #6b2fd6;
  --bg: #ffffff;
  --text: #0f1419;
  --muted: #536471;
  --line: #eff3f4;
  --hover: rgba(15, 20, 25, 0.06);
  --field: #ffffff;
  --link: #6b2fd6;
  --pill: #0f1419;
  --pill-text: #ffffff;
  --search: #eff3f4;
  --card: #ffffff;
  --mast: rgba(255, 255, 255, 0.92);
  color-scheme: light;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: auto;
  overflow-x: clip;
}

body {
  margin: 0;
  max-width: 100%;
  overflow-x: clip;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.35;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

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

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

a {
  color: var(--link);
  text-underline-offset: 0.15em;
}

a:hover {
  text-decoration-thickness: 2px;
}

:focus-visible {
  outline: 2px solid var(--bright);
  outline-offset: 2px;
  box-shadow: 0 0 0 4px var(--glow);
}

::selection {
  background: var(--purple);
  color: #fff;
}

[hidden] {
  display: none !important;
}

.skip {
  position: absolute;
  left: 12px;
  top: 0;
  z-index: 30;
  transform: translateY(-120%);
  background: var(--bg);
  color: var(--text);
  padding: 8px 12px;
  font-weight: 700;
  text-decoration: none;
}

.skip:focus {
  transform: none;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.mast {
  position: sticky;
  top: 0;
  z-index: 8;
  background: var(--mast);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
}

.mast-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  height: 53px;
  padding: 0 12px 0 10px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  min-height: 44px;
  max-width: 100%;
  color: var(--text);
  text-decoration: none;
}

.brand:hover,
.brand:visited {
  color: var(--text);
  text-decoration: none;
}

.brand .wm {
  display: block;
  width: auto;
  height: 22px;
  max-width: min(148px, 40vw);
  flex: none;
}

.wm-on-light {
  display: none;
}

html[data-theme="light"] .wm-on-dark {
  display: none;
}

html[data-theme="light"] .wm-on-light {
  display: block;
}

.rail-brand .wm {
  height: 30px;
  max-width: 220px;
}

.mast-tools {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
}

.rail-brand {
  display: inline-flex;
  margin: 2px 8px 8px;
  padding: 4px 8px;
}

.theme-switch {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 8px;
  border: 0;
  background: transparent;
  color: var(--text);
  font-weight: 700;
  cursor: pointer;
  border-radius: 999px;
}

.theme-switch:hover {
  background: var(--hover);
}

.switch-text {
  font-size: 13px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.switch-track {
  position: relative;
  width: 40px;
  height: 22px;
  border-radius: 999px;
  background: #3e4144;
  flex: none;
}

html[data-theme="dark"] .switch-track {
  background: var(--purple);
  box-shadow: 0 0 12px var(--glow);
}

.switch-thumb {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
}

html[data-theme="dark"] .switch-thumb {
  transform: translateX(18px);
}

@media (prefers-reduced-motion: no-preference) {
  .switch-thumb {
    transition: transform 160ms ease;
  }
}

.account-btn,
.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 44px;
  min-width: 44px;
  padding: 0 10px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--text);
  font-weight: 700;
  cursor: pointer;
}

.account-btn:hover,
.icon-btn:hover,
.chip-more:hover {
  background: var(--hover);
}

.account-btn .ico,
.icon-btn .ico {
  width: 20px;
  height: 20px;
}

.shell {
  min-width: 0;
  padding-bottom: calc(64px + env(safe-area-inset-bottom));
}

.nav-scrim {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 25;
  background: rgba(0, 0, 0, 0.62);
}

body.nav-open .nav-scrim {
  display: block;
}

.rail {
  display: flex;
  flex-direction: column;
  position: fixed;
  z-index: 30;
  top: 0;
  bottom: 0;
  left: 0;
  width: min(320px, 88vw);
  background: var(--bg);
  border-right: 1px solid var(--line);
  transform: translateX(-105%);
}

body.nav-open .rail {
  transform: none;
}

.rail-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 52px;
  padding: 4px 8px 0 12px;
}

.rail-close {
  display: inline-flex;
}

.rail-scroll {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding-top: 4px;
}

.type-row {
  display: flex;
  align-items: center;
  margin: 1px 8px;
}

.type-row .item {
  flex: 1;
  margin: 0;
}

.type-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  flex: none;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--text);
  cursor: pointer;
}

.type-toggle:hover {
  background: var(--hover);
}

.type-toggle .chev {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.type-toggle[aria-expanded="true"] .chev {
  transform: rotate(180deg);
}

.type-subs .item.sub {
  min-height: 44px;
  margin-left: 22px;
}

.rail-label {
  margin: 16px 22px 2px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.room-chip {
  color: var(--bright);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-variant-caps: all-small-caps;
  text-decoration: none;
}

html[data-theme="light"] .room-chip {
  color: var(--purple);
}

.main {
  min-width: 0;
  background: var(--bg);
}

.aside {
  min-width: 0;
}

.view {
  display: none;
}

#home {
  display: block;
}

.view:target {
  display: block;
}

body:has(.view:target) #home {
  display: none;
}

body:has(#home:target) #home {
  display: block;
}

.colhead {
  position: sticky;
  top: 53px;
  z-index: 3;
  background: var(--mast);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
}

.feed-tabs {
  display: flex;
  height: 53px;
}

.feed-tabs a {
  position: relative;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-weight: 600;
  text-decoration: none;
}

.feed-tabs a:hover {
  background: var(--hover);
  text-decoration: none;
}

.feed-tabs a[aria-current="page"] {
  color: var(--text);
  font-weight: 800;
}

.feed-tabs a[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 64px;
  height: 4px;
  border-radius: 999px;
  background: var(--bright);
  box-shadow: 0 0 10px var(--glow);
  transform: translateX(-50%);
}

.kicker {
  margin: 0;
  padding: 6px 16px 8px;
  color: var(--muted);
  font-size: 13px;
}

.colhead h1,
.prose h1,
.empty h1,
.profile h1 {
  margin: 0;
  padding: 12px 16px 0;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.colhead .dek,
.colhead .sample,
.dek,
.sample {
  margin: 2px 0 0;
  padding: 0 16px 10px;
  color: var(--muted);
  font-size: 13px;
}

.composer {
  display: flex;
  gap: 12px;
  align-items: center;
  min-height: 72px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  color: var(--text);
  text-decoration: none;
}

.composer:hover {
  background: var(--hover);
  text-decoration: none;
}

.composer strong {
  display: block;
  font-size: 15px;
  font-weight: 700;
}

.composer-copy span {
  display: block;
  color: var(--muted);
  font-size: 13px;
}

.seat,
.avatar {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  flex: none;
  border-radius: 999px;
  overflow: hidden;
  background-color: var(--purple-dark);
  background-size: cover;
  background-position: center;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0;
  text-decoration: none;
}

.seat {
  border: 1px dashed var(--muted);
  background-color: transparent;
  color: var(--muted);
}

.js-seat {
  border: 0;
  color: #fff;
}

.seat.has-photo {
  border-style: none;
  color: transparent;
}

.avatar.alt {
  background-color: var(--purple);
}

.avatar.xl {
  width: 72px;
  height: 72px;
  font-size: 22px;
}

.avatar:hover,
.avatar:visited {
  color: #fff;
  text-decoration: none;
}

.post {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  gap: 12px;
  padding: 10px 16px 4px;
  border-bottom: 1px solid var(--line);
}

.post:hover {
  background: var(--hover);
}

.post.is-filtered {
  display: none;
}

.post-main {
  min-width: 0;
}

.meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  align-items: baseline;
  margin: 0;
  color: var(--muted);
  font-size: 15px;
}

.name {
  color: var(--text);
  font-weight: 700;
  text-decoration: none;
}

.name:hover,
.name:visited {
  color: var(--text);
}

.handle,
.time,
.dot {
  color: var(--muted);
  text-decoration: none;
}

.post-text {
  margin: 2px 0 6px;
  font-size: 15px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

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

.post-text a:hover {
  text-decoration: underline;
}

.actions {
  display: flex;
  gap: 18px;
  margin: 0 0 2px;
}

.actions a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 32px;
  color: var(--muted);
  font-size: 13px;
  text-decoration: none;
}

.actions a:hover {
  color: var(--accent-line);
}

.actions svg {
  display: block;
}

.ico {
  width: 24px;
  height: 24px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.rail a.item {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 50px;
  margin: 1px 8px;
  padding: 0 14px;
  border-radius: 999px;
  color: var(--text);
  font-weight: 500;
  text-decoration: none;
}

.rail a.item span {
  font-variant-caps: all-small-caps;
  font-feature-settings: "smcp" 1, "c2sc" 1;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 13px;
  font-weight: 700;
}

.rail a.item:hover {
  background: var(--hover);
  text-decoration: none;
}

.rail a.item[aria-current="page"] {
  font-weight: 800;
}

.rail a.item[aria-current="page"] span {
  font-weight: 800;
}

.pill,
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 16px;
  border: 0;
  border-radius: 999px;
  background: var(--pill);
  color: var(--pill-text);
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
}

.pill:hover,
.pill:visited,
.btn:hover,
.btn:visited,
.btn:active {
  filter: brightness(0.92);
  color: var(--pill-text);
  text-decoration: none;
}

.rail .pill {
  width: calc(100% - 32px);
  min-height: 52px;
  margin: 8px 16px 4px;
  font-size: 16px;
}

.card .pill {
  width: 100%;
  min-height: 44px;
  margin: 8px 0;
}

.btn.ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--line);
  font-weight: 700;
}

.btn.ghost:hover,
.btn.ghost:visited {
  background: var(--hover);
  color: var(--text);
  filter: none;
}

.account-dock {
  display: flex;
  align-items: center;
  margin: 8px;
  border-radius: 999px;
}

.account-dock:hover {
  background: var(--hover);
}

.account-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 0;
  padding: 8px 4px 8px 8px;
  color: var(--text);
  text-decoration: none;
}

.account-chip:hover,
.account-chip:visited {
  color: var(--text);
  text-decoration: none;
}

.chip-copy {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.chip-copy strong,
.chip-copy span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chip-copy strong {
  font-size: 15px;
}

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

.chip-more {
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--text);
  font-size: 18px;
  letter-spacing: 0.12em;
  cursor: pointer;
}

.room-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.room-list a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  min-height: 52px;
  padding: 0 16px;
  border-bottom: 1px solid var(--line);
  color: var(--text);
  text-decoration: none;
}

.room-name {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-variant-caps: all-small-caps;
  font-feature-settings: "smcp" 1, "c2sc" 1;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 13px;
  font-weight: 700;
}

.room-list a .count {
  color: var(--muted);
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
  font-variant: normal;
}

.room-list a:hover {
  background: var(--hover);
}

.search-wrap {
  position: sticky;
  top: 0;
  z-index: 2;
  padding: 8px 16px 4px;
  background: var(--bg);
}

.search {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 44px;
  padding: 0 16px;
  border-radius: 999px;
  background: var(--search);
  border: 1px solid transparent;
}

.search:focus-within {
  background: var(--bg);
  border-color: var(--bright);
  box-shadow: 0 0 0 3px var(--glow);
}

.search .ico {
  width: 18px;
  height: 18px;
  color: var(--muted);
}

.search input {
  width: 100%;
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.search input:focus {
  outline: none;
}

.search-note {
  min-height: 1.2em;
  margin: 6px 4px 0;
  color: var(--muted);
  font-size: 13px;
}

.card {
  margin: 12px 16px;
  padding: 12px 16px 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--card);
}

.card h2 {
  margin: 0 0 8px;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.card p,
.prose p,
.empty p,
.profile p,
.reply p {
  margin: 0 0 8px;
}

.card p:last-child,
.prose p:last-child {
  margin-bottom: 0;
}

.launch {
  margin-top: 8px;
  font-weight: 700;
}

.quiet {
  color: var(--muted);
  font-size: 13px;
}

.news-item {
  display: block;
  padding: 10px 0;
  border-top: 1px solid var(--line);
  color: var(--text);
  text-decoration: none;
}

.news-item strong {
  display: block;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.news-item span {
  display: block;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.3;
}

.news-item:hover {
  text-decoration: none;
}

.news-item:hover span {
  text-decoration: underline;
}

.rule-list {
  margin: 0;
  padding-left: 1.1rem;
}

.rule-list li {
  margin: 0 0 8px;
}

.tabbar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  min-height: calc(56px + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  background: var(--mast);
  border-top: 1px solid var(--line);
  backdrop-filter: blur(12px);
}

.tabbar a,
.tabbar button {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  min-width: 44px;
  min-height: 48px;
  padding: 4px 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}

.tabbar span {
  font-variant-caps: all-small-caps;
  font-feature-settings: "smcp" 1, "c2sc" 1;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 11px;
  font-weight: 700;
}

.tabbar .ico {
  width: 22px;
  height: 22px;
}

.tabbar a[aria-current="page"],
body.nav-open .tabbar .tab-more {
  color: var(--text);
}

.tabbar a[aria-current="page"] .ico {
  stroke: var(--bright);
}

.prose,
.empty,
.form,
.profile {
  padding: 4px 16px 28px;
}

.prose h1,
.empty h1 {
  padding-left: 0;
  padding-right: 0;
}

.back {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  margin-left: 8px;
  color: var(--text);
  font-weight: 700;
  text-decoration: none;
}

.replies {
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
}

.reply {
  padding: 12px 0;
  border-top: 1px solid var(--line);
}

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

.form label,
.dialog-body label {
  display: grid;
  gap: 6px;
  font-size: 13px;
  font-weight: 700;
}

.field-note {
  margin: -4px 0 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.4;
}

input,
select,
textarea {
  width: 100%;
  max-width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--field);
  color: var(--text);
}

textarea {
  min-height: 120px;
  resize: vertical;
}

.was-validated input:invalid,
.was-validated select:invalid,
.was-validated textarea:invalid {
  border-color: #f4212e;
}

.hp {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.status,
.success-panel,
.fallback {
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--hover);
}

.success-panel h2 {
  margin: 0 0 6px;
  font-size: 20px;
}

.fallback textarea {
  margin: 8px 0;
  min-height: 160px;
}

.fallback-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.profile-top {
  display: flex;
  gap: 14px;
  align-items: center;
  padding-top: 16px;
}

.profile-top h2 {
  margin: 0;
  font-size: 20px;
}

.profile-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.colophon {
  margin: 4px 16px 24px;
  color: var(--muted);
  font-size: 13px;
}

.colophon a {
  color: var(--muted);
}

.colophon p {
  margin: 0 0 4px;
}

.prose ul {
  margin: 0 0 12px;
  padding-left: 1.15rem;
}

.prose li {
  margin: 0 0 8px;
}

.account-dialog {
  width: min(600px, calc(100vw - 24px));
  max-height: min(860px, calc(100vh - 24px));
  margin: auto;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--bg);
  color: var(--text);
}

.account-dialog::backdrop {
  background: rgba(91, 112, 131, 0.45);
}

.dialog-head {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 53px;
  padding: 0 8px;
  border-bottom: 1px solid var(--line);
}

.dialog-head h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 800;
}

.dialog-body {
  display: grid;
  gap: 14px;
  padding: 16px;
  overflow: auto;
  max-height: calc(100vh - 140px);
}

.avatar-row {
  display: flex;
  align-items: center;
  gap: 14px;
}

.avatar-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.file-btn {
  position: relative;
  overflow: hidden;
}

.file-btn input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.swatches {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.swatch {
  width: 44px;
  height: 44px;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 999px;
  cursor: pointer;
}

.swatch.is-on {
  border-color: var(--text);
}

.dialog-error {
  margin: 0;
  color: #f4212e;
  font-size: 13px;
  font-weight: 700;
}

.dialog-save {
  justify-self: start;
  min-height: 44px;
  min-width: 88px;
}

.back {
  min-height: 44px;
}

@media (max-width: 519px) {
  .switch-text,
  .account-btn > span {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
  }

  .account-btn,
  .theme-switch {
    padding: 0;
    width: 44px;
  }
}

@media (max-width: 1099px) {
  body.nav-open {
    overflow: hidden;
  }

  input,
  select,
  textarea {
    font-size: 16px;
  }

  .form .btn,
  .fallback-actions,
  .fallback-actions .btn,
  .profile-actions,
  .profile-actions .btn {
    width: 100%;
  }

  .fallback-actions,
  .profile-actions {
    display: grid;
  }

  .actions a {
    min-height: 44px;
    padding: 0 6px;
  }

  .account-dialog {
    width: 100%;
    max-width: 100%;
    height: 100%;
    max-height: 100%;
    margin: 0;
    border: 0;
    border-radius: 0;
  }

  .dialog-body {
    max-height: calc(100dvh - 64px);
  }

  .shell {
    display: flex;
    flex-direction: column;
  }

  .aside {
    order: -1;
  }

  .aside .card,
  .aside .colophon {
    display: none;
  }

  .search-wrap {
    position: static;
  }
}

@media (min-width: 520px) and (max-width: 1099px) {
  .mast .wm {
    height: 26px;
    max-width: 190px;
  }
}

@media (min-width: 1100px) {
  body:has(.shell) {
    height: 100dvh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
  }

  .mast {
    flex: none;
  }

  .shell {
    flex: 1;
    min-height: 0;
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr);
    grid-template-rows: auto minmax(0, 1fr);
    grid-template-areas:
      "rail search"
      "rail main";
    width: min(1225px, 100%);
    margin: 0 auto;
    padding-bottom: 0;
  }

  .rail {
    grid-area: rail;
    position: static;
    transform: none;
    width: auto;
    z-index: auto;
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
    border-right: 0;
  }

  .nav-scrim,
  .nav-toggle,
  .rail-top,
  .tabbar {
    display: none !important;
  }

  .rail-scroll {
    flex: 1;
    overflow: auto;
    padding-top: 4px;
  }

  .aside {
    grid-area: search;
    overflow: auto;
  }

  .main {
    grid-area: main;
    overflow: auto;
    border-left: 1px solid var(--line);
    border-right: 1px solid var(--line);
  }

  .aside .card,
  .aside .colophon {
    display: none;
  }

  .colhead {
    top: 0;
  }

  .tabbar {
    display: none;
  }

  .mast .brand {
    display: none;
  }

  .rail-brand {
    display: inline-flex;
  }
}

@media (min-width: 1280px) {
  .mast-inner,
  .shell {
    width: min(1225px, 100%);
  }

  .mast-inner {
    display: grid;
    grid-template-columns: 275px minmax(0, 600px) 350px;
    padding: 0;
  }

  .brand {
    padding-left: 12px;
  }

  .mast-tools {
    grid-column: 3;
    justify-self: end;
    padding-right: 8px;
  }

  .shell {
    grid-template-columns: 275px minmax(0, 600px) 350px;
    grid-template-rows: minmax(0, 1fr);
    grid-template-areas: "rail main aside";
  }

  .aside {
    grid-area: aside;
    border-right: 1px solid transparent;
  }

  .aside .card,
  .aside .colophon {
    display: block;
  }

  body:has(.shell) {
    display: block;
  }

  .shell {
    height: 100dvh;
  }

  .mast {
    position: absolute;
    top: 0;
    right: max(0px, calc((100vw - 1225px) / 2));
    width: 350px;
    height: auto;
    border: 0;
    background: var(--bg);
    z-index: 9;
  }

  .mast-inner {
    display: flex;
    width: 100%;
    height: 48px;
    padding-right: 8px;
  }

  .search-wrap {
    padding-top: 52px;
  }
}

@media (prefers-reduced-motion: no-preference) {
  .rail {
    transition: transform 180ms ease;
  }

  .view:target {
    animation: rise 140ms ease;
  }

  @keyframes rise {
    from {
      opacity: 0;
    }
    to {
      opacity: 1;
    }
  }
}

@media (forced-colors: active) {
  .btn,
  .pill,
  .theme-switch,
  .avatar,
  .seat,
  .switch-track {
    border: 1px solid ButtonText;
  }
}

.app {
  display: none;
}

html[data-auth="member"] .app {
  display: contents;
}

html[data-auth="guest"].show-access .app {
  display: block;
}

html[data-auth="guest"] body:has(.shell),
html.show-access body:has(.shell) {
  height: auto;
  min-height: 100dvh;
  overflow: auto;
  display: block;
}

html.show-access .shell {
  display: block;
  height: auto;
  padding-bottom: 32px;
}

html.show-access .rail,
html.show-access .aside,
html.show-access .tabbar,
html.show-access .nav-scrim,
html.show-access .nav-toggle,
html.show-access .account-btn {
  display: none !important;
}

html.show-access .view {
  display: none !important;
}

html.show-access #request {
  display: block !important;
}

html.show-access .mast .brand {
  display: inline-flex !important;
}

html.show-access .mast {
  position: sticky;
  top: 0;
  right: auto;
  width: auto;
  border-bottom: 1px solid var(--line);
  background: var(--mast);
}

.back-gate {
  display: none;
  align-items: center;
  min-height: 44px;
  padding: 0 8px;
  color: var(--text);
  font-weight: 800;
  text-decoration: none;
}

html.show-access .back-gate {
  display: inline-flex;
}

.gate {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 100dvh;
  padding: 72px 20px 32px;
  background: #000;
  color: #e7e9ea;
}

html[data-auth="member"] .gate,
html.show-access .gate {
  display: none;
}

.gate-tools {
  position: absolute;
  top: 8px;
  right: 8px;
}

.gate .theme-switch {
  color: #e7e9ea;
}

.gate-inner {
  width: min(480px, 100%);
  text-align: center;
}

.gate-tile {
  width: 96px;
  height: 96px;
  margin: 0 auto 22px;
  filter: drop-shadow(0 0 28px rgba(107, 47, 214, 0.55));
}

.gate-word {
  width: min(420px, 100%);
  height: auto;
  margin: 0 auto 28px;
}

.gate-line {
  margin: 0 0 28px;
  color: #71767b;
  font-size: 15px;
  line-height: 1.45;
}

.gate-line span {
  display: block;
}

.gate-actions {
  display: grid;
  gap: 12px;
}

.gate-actions .btn {
  width: 100%;
  min-height: 52px;
  font-size: 16px;
}

.gate .btn {
  background: #fff;
  color: #000;
}

.gate .btn.ghost {
  background: transparent;
  color: #fff;
  border: 1px solid #fff;
}

.gate .btn.ghost:hover,
.gate .btn.ghost:visited {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  filter: none;
}

.login-dialog {
  width: min(440px, calc(100vw - 24px));
  margin: auto;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--bg);
  color: var(--text);
}

.login-dialog::backdrop {
  background: rgba(0, 0, 0, 0.72);
}

@media (min-width: 900px) {
  .gate-tile {
    width: 132px;
    height: 132px;
  }

  .gate-word {
    width: min(520px, 100%);
  }

  .gate-actions {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 719px) {
  .login-dialog {
    width: 100%;
    max-width: 100%;
    height: 100%;
    max-height: 100%;
    margin: 0;
    border: 0;
    border-radius: 0;
  }
}

@media print {
  .mast,
  .tabbar,
  .nav-scrim,
  .rail,
  .aside,
  .composer,
  .actions,
  .account-dialog {
    display: none !important;
  }

  body,
  .shell,
  .main {
    height: auto;
    overflow: visible;
    display: block;
    background: #fff;
    color: #000;
  }
}
