:root,
html[data-theme="dark"] {
  --purple: #6b2fd6;
  --tile: #4b1ba6;
  --bright: #8a5cf0;
  --glow: rgba(107, 47, 214, 0.55);
  --afterburner: #8a5cf0;
  --signal: #8a5cf0;
  --radar: #2bd67b;
  --sky: #22c3e6;
  --deck-red: #f0384c;
  --navy: #1e3a5f;
  --gunmetal: #3a4452;
  --gold: #d4a73a;
  --deck: #0F0F13;
  --deck-card: #17171D;
  --deck-text: #ECECF1;
  --deck-muted: #A3A3AE;
  --kicker: #8a5cf0;
  --cleared-text: #2bd67b;
  --meta-accent: #22c3e6;
  --hud: rgba(34, 195, 230, 0.22);
  --purple-dark: #4b1ba6;
  --accent-line: #8a5cf0;
  --nav-active: #ECECF1;
  --nav-mark: #8A5CF0;
  --nav-hover: rgba(255, 255, 255, 0.06);
  --bg: #0F0F13;
  --raised: #1E1E26;
  --text: #ECECF1;
  --muted: #A3A3AE;
  --accent-text: #ECECF1;
  --line: #2A2A33;
  --hover: rgba(236, 236, 241, 0.08);
  --field: var(--raised);
  --link: #ECECF1;
  --pill: #eff3f4;
  --pill-text: #0f1419;
  --search: var(--raised);
  --card: #17171D;
  --mast: color-mix(in srgb, var(--bg) 85%, transparent);
  --backdrop: color-mix(in srgb, var(--bg) 92%, black);
  --composer-fill: var(--raised);
  --composer-line: var(--line);
  color-scheme: dark;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

html[data-theme="light"] {
  --accent-line: #6b2fd6;
  --nav-active: #0f1419;
  --nav-mark: #6B2FD6;
  --nav-hover: rgba(15, 20, 25, 0.06);
  --deck: #f4f7fb;
  --deck-card: #ffffff;
  --deck-text: #0f1419;
  --deck-muted: #3d4a5c;
  --kicker: #6b2fd6;
  --cleared-text: #0e4a32;
  --meta-accent: #0a5a6e;
  --hud: rgba(30, 58, 95, 0.18);
  --bg: #ffffff;
  --text: #0f1419;
  --muted: #536471;
  --accent-text: #4b1ba6;
  --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);
  --raised: #ffffff;
  --composer-fill: #f4f5f7;
  --composer-line: #5c6770;
  color-scheme: light;
}

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

*::-webkit-scrollbar {
  width: 0;
  height: 0;
  display: none;
}

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: 16px;
  line-height: 1.5;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

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

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

::placeholder {
  color: var(--muted);
  opacity: 1;
}

::-webkit-input-placeholder {
  color: var(--muted);
  opacity: 1;
}

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(--bg);
  border-bottom: 1px solid var(--line);
}

.mast-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  height: auto;
  min-height: 53px;
  padding: 6px 12px 6px 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-stack {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: min(148px, 40vw);
  max-width: 100%;
}

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

.brand .wm {
  width: 100%;
  height: auto;
  max-width: 100%;
  flex: none;
}

/* One wordmark only. The unused theme file must stay hidden, or its purple S
   sits beside the lockup and the name reads as “splitcres”. */
.brand .wm-on-light {
  display: none;
}

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

html[data-theme="light"] .brand .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;
  position: relative;
}

.notify-btn {
  position: relative;
}

.notify-count {
  position: absolute;
  top: 4px;
  right: 2px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--purple);
  color: #ffffff;
  font-size: 11px;
  font-weight: 700;
  line-height: 18px;
  text-align: center;
}

.notify-panel {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 40;
  width: min(360px, calc(100vw - 24px));
  max-height: min(70vh, 480px);
  overflow: auto;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--bg);
  color: var(--text);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
}

.notify-head,
.notify-empty,
.notify-item {
  color: var(--text);
}

.notify-head {
  margin: 8px 10px;
  font-weight: 700;
}

.notify-empty {
  margin: 8px 10px 12px;
}

.notify-item {
  display: block;
  width: 100%;
  margin: 0;
  padding: 12px 10px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  text-align: left;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.notify-item:hover,
.notify-item:focus-visible {
  background: var(--hover);
}

.notify-item.is-read {
  font-weight: 500;
}

.reply-target {
  outline: 2px solid var(--purple);
  border-radius: 8px;
  padding: 4px;
}

.rail-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  width: 190px;
  max-width: calc(100% - 24px);
  margin: 4px 12px 10px;
  padding: 8px 8px 12px;
}

.rail-brand .wm {
  width: 100%;
  height: auto;
  max-width: 100%;
}

.theme-switch {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  min-width: 40px;
  min-height: 40px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  border-radius: 999px;
}

.theme-switch .ico {
  width: 20px;
  height: 20px;
  stroke-width: 2;
}

.theme-switch .theme-sun {
  display: none;
}

html[data-theme="light"] .theme-switch .theme-moon {
  display: none;
}

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

.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: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.room-chip,
.room-chip:link,
.room-chip:visited,
.room-chip:hover,
.room-chip:active {
  color: var(--accent-text);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-decoration: none;
}

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

.aside {
  min-width: 0;
}

.view {
  display: none;
  scroll-margin-top: 140px;
}

.legacy-room {
  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(--bg);
  border-bottom: 1px solid var(--line);
}

.topbar {
  position: sticky;
  top: 53px;
  z-index: 4;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  min-height: 52px;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}

.topbar .scope-wrap {
  order: 2;
  flex: 0 0 auto;
  min-width: max-content;
  margin-left: auto;
  padding: 0 16px;
}

.topbar .feed-tabs {
  order: 1;
  flex: 0 1 auto;
  border-top: 0;
  height: 52px;
}

.topbar .feed-tabs a[aria-current="page"]::after {
  content: none;
}

.topbar .feed-tabs a span {
  position: relative;
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  height: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}

.topbar .feed-tabs a[aria-current="page"] span::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  border-radius: 999px;
  background: #8A5CF0;
}

#home > .colhead {
  position: static;
  border-bottom: 0;
}

.view > .colhead > .feed-tabs {
  display: none;
}

.feed-tabs {
  display: flex;
  height: 52px;
  max-width: 100%;
  min-width: 0;
  overflow-x: auto;
  overscroll-behavior-x: contain;
}

.topbar .feed-tabs a {
  flex: 0 0 auto;
  padding: 0 16px;
  color: #A3A3AE;
  font-family: "Barlow Semi Condensed", "Arial Narrow", sans-serif;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.topbar .feed-tabs a[aria-current="page"] {
  color: #ffffff;
  font-weight: 700;
}

html[data-theme="light"] .topbar .feed-tabs a {
  color: #4F4F59;
}

html[data-theme="light"] .topbar .feed-tabs a[aria-current="page"] {
  color: #111111;
}

.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: 14px 16px 8px;
  border-bottom: 1px solid var(--line);
}

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

.post.is-filtered,
.moving-card.is-filtered,
.moving.is-filtered,
.rumor-pin.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;
}

.meta .name,
.js-sign {
  min-width: 0;
  overflow-wrap: anywhere;
}

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

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

.post-text,
.thread-body,
.reply-body,
.reply article > p:not(.meta) {
  margin: 8px 0 6px;
  color: var(--text);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

@media (min-width: 1000px) {
  .post-text,
  .thread-body,
  .reply-body,
  .reply article > p:not(.meta) {
    font-size: 16px;
    font-weight: 400;
    line-height: 1.5;
  }
}

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

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

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  max-width: 100%;
  margin: 0 0 2px;
}

.actions a,
.actions button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 32px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
}

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

.actions svg {
  display: block;
}

.like-btn {
  white-space: nowrap;
}

.like-btn svg {
  transform-origin: center;
}

.like-btn[aria-pressed="true"],
.like-btn[aria-pressed="true"]:hover {
  color: #f91880;
}

html[data-theme="light"] .like-btn[aria-pressed="true"],
html[data-theme="light"] .like-btn[aria-pressed="true"]:hover {
  color: #e31674;
}

.like-btn[aria-pressed="true"] svg path {
  fill: currentColor;
  stroke: currentColor;
}

.like-btn.is-pop svg {
  animation: like-pop 280ms ease;
}

@keyframes like-pop {
  0% { transform: scale(1); }
  40% { transform: scale(1.32); }
  100% { transform: scale(1); }
}

@media (prefers-reduced-motion: reduce) {
  .like-btn.is-pop svg {
    animation: none;
  }
}

.bookmark-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 44px;
  height: 44px;
  min-width: 44px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.bookmark-btn svg {
  display: block;
}

.bookmark-btn[aria-pressed="true"],
.bookmark-btn[aria-pressed="true"]:hover {
  color: #8a5cf0;
}

html[data-theme="light"] .bookmark-btn[aria-pressed="true"],
html[data-theme="light"] .bookmark-btn[aria-pressed="true"]:hover {
  color: #4b1ba6;
}

.bookmark-btn[aria-pressed="true"] svg path {
  fill: currentColor;
}

.actions .bookmark-btn {
  width: 32px;
  min-width: 32px;
  height: 32px;
}

.op-badge {
  display: inline-block;
  flex: none;
  align-self: center;
  margin: 0 2px;
  padding: 1px 5px 0;
  border: 1px solid #4b1ba6;
  border-radius: 999px;
  background: transparent;
  color: #4b1ba6;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1.35;
  text-transform: uppercase;
  vertical-align: middle;
  white-space: nowrap;
}

html[data-theme="dark"] .op-badge {
  border-color: #c4b5fd;
  color: #c4b5fd;
}

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

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

.rail a.item .ico {
  width: 24px;
  height: 24px;
  stroke-width: 2;
}

.rail a.item span {
  font-size: 16px;
  font-weight: 500;
  letter-spacing: 0;
  line-height: 1.2;
  text-transform: none;
}

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

.rail a.item[aria-current="page"] {
  background: transparent;
  color: var(--nav-active);
  font-weight: 600;
}

.rail a.item[aria-current="page"]::before {
  content: "";
  position: absolute;
  left: 0;
  top: 10px;
  bottom: 10px;
  width: 3px;
  border-radius: 2px;
  background: var(--nav-mark);
}

.rail a.item[aria-current="page"] .ico {
  color: var(--nav-mark);
  stroke: var(--nav-mark);
}

.rail a.item[aria-current="page"] span {
  color: var(--nav-active);
  font-weight: 600;
}

.rail a.item[aria-current="page"]:hover {
  background: var(--nav-hover);
}

.rail a.item:focus-visible {
  outline: 2px solid #f7f7f5;
  outline-offset: 3px;
}

.btn[hidden] {
  display: none !important;
}

.join-card .btn {
  margin: 22px 0;
}

.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: 4px;
  flex: 1;
  min-width: 0;
  padding: 4px 4px 4px 4px;
  color: var(--text);
  text-decoration: none;
}

.chip-face {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: inherit;
  cursor: pointer;
  flex: none;
}

.chip-face:hover {
  background: var(--hover);
}

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

.chip-id:hover,
.chip-id:visited {
  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;
  gap: 1px;
}

.chip-name-row {
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
}

.chip-name-row strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.2;
}

#chip-handle {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.2;
}

.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: 600;
  letter-spacing: -0.02em;
}

.join-card h2 {
  margin-bottom: 14px;
}

.join-steps {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.join-steps li {
  color: var(--text);
  font-size: 15px;
  font-weight: 400;
  line-height: 1.45;
}

.join-card .btn {
  margin: 22px 0;
}

.join-note {
  margin: 0;
  font-weight: 400;
}

.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: flex;
  align-items: center;
  gap: 6px;
  color: var(--text);
  font-size: 13px;
  font-weight: 500;
}

.news-item strong::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: var(--room-bar, #6b2fd6);
  flex: none;
}

.news-item span {
  display: block;
  font-size: 15px;
  font-weight: 400;
  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(2, minmax(0, 1fr));
  min-height: calc(56px + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  background: var(--bg);
  border-top: 1px solid var(--line);
}

.tabbar a,
.tabbar button {
  position: relative;
  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 a:hover,
.tabbar button:hover {
  background: var(--nav-hover);
  text-decoration: none;
}

.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 {
  background: transparent;
  color: var(--nav-active);
  font-weight: 600;
}

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

.tabbar a[aria-current="page"]::before,
body.nav-open .tabbar .tab-more::before {
  content: "";
  position: absolute;
  left: 0;
  top: 10px;
  bottom: 10px;
  width: 3px;
  border-radius: 2px;
  background: var(--nav-mark);
}

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

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

.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;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.admin-only {
  display: none !important;
}

html[data-role="admin"] .rail a.item.admin-only {
  display: flex !important;
}

html:not([data-role="admin"]):not([data-admin-gate="token"]) #applications {
  display: none !important;
}

#request .dek,
#applications .dek,
#request .prose,
#request .field-note,
#applications .field-note,
#access-form label,
#admin-token-form label,
.application-card,
.invite-error {
  font-size: 16px;
  font-weight: 400;
}

#applications .colhead .dek {
  max-width: 28rem;
  font-size: 15px;
  font-weight: 400;
  line-height: 1.45;
}

#admin-live {
  padding: 12px 16px 0;
}

#request .prose,
#request .form,
#applications .form,
.application-list {
  padding: 12px 16px 0;
}

#request .success-panel {
  margin: 12px 16px 24px;
}

.application-list {
  display: grid;
  gap: 12px;
  padding-bottom: 24px;
}

.application-card {
  margin: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--card);
  overflow-wrap: anywhere;
}

.application-card h2 {
  margin: 0 0 8px;
  font-size: 18px;
  line-height: 1.3;
}

.application-card p {
  margin: 0 0 6px;
}

.application-card .btn {
  margin-top: 8px;
}

.verify-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.verify-actions .btn {
  margin-top: 0;
  max-width: 100%;
  height: auto;
  min-height: var(--btn-h-sm, 44px);
  white-space: normal;
  text-align: center;
  padding-top: 10px;
  padding-bottom: 10px;
}

.invite-url {
  display: block;
  margin-top: 8px;
  overflow-wrap: anywhere;
  font-size: 16px;
  color: var(--text);
}

.status.is-error {
  color: #ff8088;
}

html[data-theme="light"] .status.is-error {
  color: #9f1239;
}

.invite-error {
  margin: 16px auto 0;
  max-width: min(480px, 100%);
  color: #ff8088;
  font-weight: 700;
  line-height: 1.4;
}

.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-name-line {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

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

.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(--card);
  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;
}

.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: 40px;
  }
}

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

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

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

  .verify-actions {
    display: grid;
  }

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

  .actions a,
  .actions button {
    min-height: 44px;
    padding: 0 4px;
  }

  .actions .bookmark-btn {
    width: 44px;
    min-width: 44px;
    height: 44px;
  }

  .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: 999px) {
  .brand-stack {
    width: min(190px, 46vw);
  }

  .mast .wm {
    height: auto;
    max-width: 100%;
  }
}

@media (max-width: 719px) {
  .topbar {
    flex-direction: column;
    align-items: stretch;
  }

  .topbar .scope-wrap {
    display: flex;
    justify-content: flex-end;
    width: 100%;
    min-width: 0;
    margin-left: 0;
    padding: 0 16px 8px;
  }

  .topbar .scope-chip {
    max-width: 100%;
  }
}

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

  .mast {
    flex: none;
  }

  .shell {
    flex: 1;
    min-height: 0;
    display: grid;
    grid-template-columns: 76px minmax(0, 1fr);
    grid-template-rows: auto minmax(0, 1fr);
    grid-template-areas:
      "rail search"
      "rail main";
    width: min(1288px, 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,
  .topbar {
    top: 0;
  }

  .tabbar {
    display: none;
  }

  .mast .brand {
    display: none;
  }

  .rail-brand {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (min-width: 1280px) {
  .rail-brand {
    align-items: center;
    gap: 4px;
    width: 266px;
    margin: 8px 12px 2px;
    padding: 4px 4px 6px;
  }

  .rail-brand .wm {
    width: 100%;
    height: auto;
    max-width: 100%;
  }

  .rail a.item span {
    font-size: 17px;
  }

  .mast-inner,
  .shell {
    width: min(1288px, 100%);
  }

  .mast-inner {
    display: grid;
    grid-template-columns: 292px minmax(640px, 680px) minmax(260px, 1fr);
    padding: 0;
  }

  .brand {
    padding-left: 12px;
  }

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

  .shell {
    grid-template-columns: 292px minmax(640px, 680px) minmax(260px, 1fr);
    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 - 1288px) / 2));
    width: calc(min(1288px, 100vw) - 972px);
    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;
  }

  body {
    font-size: 17px;
  }

  .post-text,
  .thread-body,
  .reply-body,
  .reply article > p:not(.meta) {
    font-size: 16px;
    font-weight: 400;
    line-height: 1.5;
  }
}

@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) {
  .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 8px;
}

.gate-tag {
  width: min(420px, 100%);
  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;
}

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

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

#login-dialog,
#join-dialog {
  opacity: 1;
  filter: none;
  background-color: var(--card);
  color: var(--text);
}

#login-dialog::backdrop,
#join-dialog::backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.96);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}

#post-dialog {
  width: min(600px, calc(100vw - 32px));
  opacity: 1;
  filter: none;
  background-color: var(--card);
  color: var(--text);
}

#post-dialog .feed-composer.is-modal {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

#post-dialog .dialog-head .composer-title {
  flex: 1;
  margin: 0;
  padding: 0 8px;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.2;
}

#post-dialog .composer-row {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}

#post-dialog .composer-bar {
  flex-direction: row;
  align-items: center;
}

#post-dialog .composer-actions {
  flex: 1 1 220px;
}

#post-dialog .icon-btn {
  margin-left: auto;
}

html.show-access .app {
  position: relative;
  z-index: 1;
  min-height: 100dvh;
  background: var(--bg);
  color: var(--text);
}

@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;
  }
}

html.show-forum #home {
  display: none;
}

html.show-forum #forum {
  display: block;
}

html.forum-thread #home {
  display: none;
}

html.forum-thread #forum-thread {
  display: block;
}

.feed-tabs a {
  min-width: max-content;
  white-space: nowrap;
  padding: 0 10px;
  font-size: 15px;
}

.forum-bar h1,
.forum-bar .dek {
  padding-left: 16px;
  padding-right: 16px;
}

.forum-tools .btn {
  flex: none;
  width: 100%;
}

.forum-tools {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
  max-width: 100%;
  min-width: 0;
  padding: 8px 12px;
  border-bottom: 1px solid var(--line);
}

.forum-filters {
  display: flex;
  align-items: center;
  gap: 4px;
  max-width: 100%;
  min-width: 0;
  overflow-x: auto;
  overscroll-behavior-x: contain;
}

.forum-filters button,
.room-filters button {
  border: 0;
  background: transparent;
  color: var(--muted);
  font-weight: 700;
  cursor: pointer;
}

.forum-filters button {
  flex: none;
  min-height: 40px;
  padding: 0 12px;
  border-radius: 999px;
  font-size: 15px;
}

.forum-filters button[aria-pressed="true"],
.room-filters button[aria-pressed="true"] {
  background: var(--purple);
  color: #fff;
}

.forum-search {
  width: 100%;
  min-width: 0;
}

.forum-search input {
  min-height: 40px;
  border-radius: 999px;
  background: var(--search);
  color: var(--text);
}

.room-filters {
  display: flex;
  gap: 8px;
  max-width: 100%;
  min-width: 0;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  padding: 10px 16px;
  border-bottom: 1px solid var(--line);
}

.room-filters button {
  flex: none;
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--text);
  font-size: 13px;
}

.room-filters button[aria-pressed="true"] {
  border-color: var(--purple);
}

.topic-form h2 {
  margin: 8px 0 0;
  font-size: 18px;
}

#forum,
#forum-thread {
  max-width: 100%;
  min-width: 0;
  background: var(--bg);
  color: var(--text);
  opacity: 1;
  filter: none;
}

.board {
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

.board-head {
  display: none;
}

.topic-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-width: 100%;
  min-width: 0;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
}

.topic-row:hover {
  background: var(--hover);
}

.topic-main,
.topic-last {
  min-width: 0;
  max-width: 100%;
}

.topic-title,
.topic-title:link,
.topic-title:visited,
.topic-title:hover,
.topic-title:active {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  color: var(--text);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.5;
  overflow-wrap: anywhere;
  text-decoration: none;
}

.topic-title:hover {
  text-decoration: underline;
}

.topic-head {
  display: flex;
  align-items: flex-start;
  gap: 4px;
  max-width: 100%;
  min-width: 0;
}

.topic-head .topic-title {
  flex: 1 1 auto;
  min-width: 0;
}

.topic-head .bookmark-btn {
  margin-top: -6px;
}

.thread-tools {
  display: flex;
  max-width: 100%;
  margin-top: 4px;
}

.bookmark-card {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  max-width: 100%;
  min-width: 0;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
}

.bookmark-copy {
  flex: 1 1 auto;
  min-width: 0;
}

.bookmark-card .topic-title {
  margin: 4px 0 0;
}

#bookmarks .post {
  max-width: 100%;
}

.topic-by {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.topic-by .room-chip,
.thread-op .meta .room-chip {
  margin-left: 6px;
  color: var(--accent-text);
  font-size: 13px;
  font-weight: 500;
}

.topic-last {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
  text-align: left;
}

.topic-last time,
.topic-last span {
  display: inline;
}

.topic-last time {
  color: var(--muted);
}

.topic-last time::after {
  content: " · ";
}

.topic-last span {
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
}

.forum-empty {
  margin: 0;
  padding: 16px;
}

.thread-op {
  padding: 12px 16px 16px;
  border-bottom: 1px solid var(--line);
}

.thread-op h2 {
  margin: 12px 0 8px;
  color: var(--text);
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.thread-body,
.reply-body {
  margin: 8px 0 0;
  white-space: pre-wrap;
}

.thread-replies {
  margin: 0;
  padding: 0 16px;
}

.thread-missing {
  margin: 0;
  padding: 16px;
}

.reply-form {
  border-top: 1px solid var(--line);
  margin-top: 8px;
}

@media (min-width: 760px) {
  .forum-tools {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 12px;
  }

  .forum-search {
    flex: 1 1 180px;
    width: auto;
  }

  .forum-tools .btn {
    width: auto;
  }
}

.topic-last {
  display: none;
}

#forum .forum-tools {
  display: none;
}

@media (min-width: 1200px) {
  .board-head,
  .topic-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 8.5rem;
    column-gap: 16px;
    align-items: start;
  }

  .board-head {
    display: grid;
    padding: 10px 16px;
    background: var(--card);
    color: var(--muted);
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.06em;
    line-height: 1.3;
    text-transform: uppercase;
    border-bottom: 1px solid var(--line);
  }

  .board-head span:last-child,
  .topic-last {
    text-align: right;
  }

  .topic-last {
    display: block;
  }

  .topic-when {
    display: none;
  }

  .topic-last time,
  .topic-last span {
    display: block;
  }

  .topic-last time::after {
    content: none;
  }
}

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

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


.callsign-current {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.account-sign-row {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.account-sign {
  margin: 0;
  color: var(--text);
  font-size: 22px;
  font-weight: 800;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

#account-lock {
  margin: 4px 0 0;
  color: var(--text);
  font-size: 16px;
  line-height: 1.35;
}

.admin-private {
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
}

.admin-private h3 {
  margin: 0 0 6px;
  font-size: 16px;
}

.admin-private p {
  margin: 0 0 6px;
  overflow-wrap: anywhere;
  font-size: 16px;
  line-height: 1.4;
}

#admin-license {
  max-height: 8rem;
  overflow: auto;
}

.avatar.has-patch,
.seat.has-patch {
  border: 0;
  border-radius: 999px;
  overflow: visible;
  background: transparent;
  color: inherit;
  box-shadow: none;
  filter: none;
}

.avatar.has-patch > svg,
.seat.has-patch > svg,
.author-patch > svg,
.mini-patch > svg,
.patch-face > svg,
.emblem-face > svg {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
  shape-rendering: geometricPrecision;
  box-shadow: none;
  filter: none;
}

.author-patch {
  display: block;
  width: 40px;
  height: 40px;
  flex: none;
}

.mini-patch {
  display: inline-block;
  width: 22px;
  height: 22px;
  flex: none;
  vertical-align: -4px;
}

.patch-face {
  display: block;
  width: 56px;
  height: 56px;
}

.topic-last .mini-patch {
  display: block;
  width: 22px;
  height: 22px;
}

.meta.author-row,
.topic-by {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 6px;
}

.topic-by .name {
  color: var(--text);
  font-size: 15px;
}

.author-row .name,
.topic-by .name {
  overflow-wrap: anywhere;
}

.name-lock {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  min-width: 0;
  max-width: 100%;
}

.verified {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 16px;
  height: 16px;
  line-height: 0;
}

.verified svg {
  display: block;
  width: 16px;
  height: 16px;
}

.meta .verified,
.topic-by .verified,
.author-row .verified,
.reply .verified {
  width: 14px;
  height: 14px;
}

.meta .verified svg,
.topic-by .verified svg,
.author-row .verified svg,
.reply .verified svg {
  width: 14px;
  height: 14px;
}

.topic-last .last-who {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  vertical-align: middle;
}

.callsign-dialog {
  width: min(560px, calc(100vw - 24px));
  max-height: min(900px, calc(100vh - 24px));
  margin: auto;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--card);
  color: var(--text);
  font-size: 16px;
  overflow-x: hidden;
}

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

.callsign-dialog .dialog-body {
  gap: 8px;
  padding: 12px 16px 16px;
  max-width: 100%;
}

.callsign-dialog .dialog-body > label,
.callsign-dialog legend,
.callsign-dialog .callsign-lead,
.callsign-dialog .sign-hint,
.callsign-dialog .dialog-error {
  font-size: 16px;
  line-height: 1.35;
}

.callsign-dialog .callsign-lead,
.callsign-dialog .sign-hint {
  margin: 0;
}

.callsign-dialog .sign-hint {
  color: var(--muted);
}

.callsign-dialog fieldset {
  min-width: 0;
  max-width: 100%;
  margin: 0;
  padding: 0;
  border: 0;
}

.callsign-dialog legend {
  margin: 0 0 6px;
  padding: 0;
  color: var(--text);
  font-weight: 700;
}

.sign-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  min-width: 0;
}

.callsign-dialog .sign-option {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  min-height: 48px;
  margin: 0;
  padding: 8px 12px;
  border: 2px solid var(--muted);
  border-radius: 12px;
  background: transparent;
  color: var(--text);
  font-size: 22px;
  font-weight: 700;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.callsign-dialog .sign-option input {
  width: 22px;
  height: 22px;
  min-height: 22px;
  flex: none;
  margin: 0;
  padding: 0;
}

.sign-option:has(input:checked) {
  border-color: var(--accent-text);
}

.patch-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  min-width: 0;
}

.callsign-dialog .patch-option {
  position: relative;
  display: grid;
  place-items: center;
  min-width: 0;
  min-height: 76px;
  margin: 0;
  padding: 6px;
  border: 2px solid var(--muted);
  border-radius: 12px;
  background: transparent;
}

.callsign-dialog .patch-option input {
  position: absolute;
  width: 1px;
  height: 1px;
  min-height: 0;
  margin: 0;
  padding: 0;
  opacity: 0;
}

.patch-option:has(input:checked),
.patch-option:focus-within {
  border-color: var(--accent-text);
}

.callsign-dialog .dialog-error {
  color: #ff8088;
  font-size: 16px;
  font-weight: 700;
}

html[data-theme="light"] .callsign-dialog .dialog-error {
  color: #9f1239;
}

.callsign-dialog input[type="text"] {
  border-color: var(--muted);
  font-size: 16px;
}

@media (min-width: 760px) {
  .topic-last .last-who {
    display: flex;
    justify-content: flex-end;
  }
}

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

  .callsign-dialog .dialog-body,
  .locale-dialog .dialog-body {
    max-height: calc(100dvh - 64px);
    overflow-x: hidden;
    overflow-y: auto;
  }
}

.is-scoped-out {
  display: none !important;
}

.scope-wrap {
  position: relative;
  min-width: 0;
  padding: 4px 16px 0;
}

.scope-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 100%;
  height: 36px;
  min-height: 36px;
  padding: 0 12px 0 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--text);
  font-size: 14px;
  font-weight: 500;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
}

.scope-chip:focus-visible {
  background: var(--hover);
  border-color: var(--text);
  outline: 2px solid var(--bright);
  outline-offset: 2px;
}

@media (hover: hover) {
  .scope-chip:hover {
    background: var(--hover);
    border-color: var(--text);
  }
}

.scope-pin,
.scope-chevron {
  flex: none;
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
}

.scope-copy {
  display: flex;
  align-items: center;
  min-width: 0;
  text-align: left;
}

.scope-kicker {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  line-height: 1.1;
  text-transform: uppercase;
}

.scope-label {
  max-width: 100%;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.2;
}

.scope-menu {
  position: absolute;
  z-index: 4;
  top: calc(100% - 4px);
  left: 16px;
  width: min(280px, calc(100vw - 32px));
  max-height: min(520px, calc(100dvh - 220px));
  overflow: auto;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--card);
}

.scope-option {
  display: block;
  width: 100%;
  min-height: 44px;
  padding: 8px 12px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--text);
  font-size: 16px;
  font-weight: 700;
  line-height: 1.3;
  text-align: left;
  overflow-wrap: anywhere;
}

.scope-option[aria-selected="true"] {
  background: #4b1ba6;
  color: #ffffff;
}

.locale-dialog {
  width: min(560px, calc(100vw - 24px));
  max-height: min(900px, calc(100vh - 24px));
  margin: auto;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--card);
  color: var(--text);
  font-size: 16px;
  overflow-x: hidden;
}

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

.locale-dialog .dialog-body {
  gap: 8px;
  max-width: 100%;
  padding: 12px 16px 16px;
}

.locale-dialog .dialog-body > p,
.locale-dialog legend,
.locale-dialog .dialog-error {
  font-size: 16px;
  line-height: 1.35;
}

.locale-dialog fieldset {
  min-width: 0;
  max-width: 100%;
  margin: 0;
  padding: 0;
  border: 0;
}

.locale-dialog legend {
  margin: 0 0 6px;
  padding: 0;
  color: var(--text);
  font-weight: 700;
}

.locale-dialog .sign-option {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  min-height: 48px;
  margin: 0;
  padding: 8px 12px;
  border: 2px solid var(--muted);
  border-radius: 12px;
  background: transparent;
  color: var(--text);
  font-size: 18px;
  font-weight: 700;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.locale-dialog .sign-option input {
  width: 22px;
  height: 22px;
  min-height: 22px;
  flex: none;
  margin: 0;
  padding: 0;
}

.locale-dialog .dialog-error {
  color: #ff8088;
  font-weight: 700;
}

html[data-theme="light"] .locale-dialog .dialog-error {
  color: #9f1239;
}

.account-home {
  margin: 0;
  color: var(--text);
  font-size: 16px;
  font-weight: 700;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.avatar-block,
.avatar-actions {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.avatar-block {
  grid-template-columns: 72px minmax(0, 1fr);
  align-items: center;
}

.avatar-actions .btn {
  width: 100%;
}

.avatar.has-photo,
.seat.has-photo,
.author-patch.has-photo,
.mini-patch.has-photo,
.patch-face.has-photo,
#picker-face.has-photo,
#account-patch.has-photo {
  border: 0;
  border-radius: 999px;
  overflow: hidden;
  background: transparent;
}

.avatar.has-photo img,
.seat.has-photo img,
.author-patch.has-photo img,
.mini-patch.has-photo img,
.patch-face.has-photo img,
#picker-face.has-photo img,
#account-patch.has-photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 999px;
}

.crop-panel {
  display: grid;
  gap: 12px;
  min-width: 0;
}

.crop-panel[hidden] {
  display: none !important;
}

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

.crop-panel .sign-hint,
.crop-panel label,
.crop-panel .dialog-error {
  font-size: 16px;
  line-height: 1.35;
}

.crop-stage {
  width: min(256px, 100%);
  margin: 0 auto;
}

#crop-canvas {
  display: block;
  width: 100%;
  height: auto;
  touch-action: none;
  cursor: grab;
  background: #000;
  border-radius: 12px;
}

dialog:not([open]) {
  display: none !important;
}

.onboard-dialog {
  display: flex;
  flex-direction: column;
  width: min(560px, calc(100vw - 48px));
  height: min(860px, calc(100dvh - 48px));
  max-height: min(860px, calc(100dvh - 48px));
  margin: auto;
  padding: 0;
  border: 0;
  border-radius: 20px;
  background: var(--deck-card);
  color: var(--deck-text);
  font-size: 16px;
  overflow: hidden;
  position: relative;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.45);
}

.onboard-dialog::backdrop {
  background: var(--deck);
}

.onboard-dialog::before {
  content: none;
}

.onboard-dialog form {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 0;
  flex: 1;
  height: 100%;
  min-height: 0;
  padding: 0;
  background: var(--deck-card);
}

.onboard-dialog .deck-panel {
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.onboard-dialog .dialog-head {
  display: block;
  height: auto;
  flex: none;
  position: sticky;
  top: 0;
  z-index: 2;
  padding: 16px 16px 12px;
  border-bottom: 1px solid var(--hud);
  background: var(--deck-card);
}

.onboard-dialog .dialog-head h2 {
  margin: 0;
  padding: 0;
  color: var(--deck-text);
  font-size: 32px;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
  overflow-wrap: anywhere;
}

.preflight-kicker,
.flight-card-kicker {
  margin: 0 0 4px;
  color: var(--deck-muted);
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 0.12em;
  line-height: 1.2;
  text-transform: uppercase;
}

.preflight {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 4px;
  margin: 12px 0 8px;
  padding: 0;
  list-style: none;
}

.preflight li {
  min-width: 0;
  color: var(--deck-muted);
  font-size: 16px;
  font-weight: 700;
  line-height: 1.15;
  text-align: center;
  overflow-wrap: anywhere;
}

.preflight .is-now,
.preflight .is-done {
  color: var(--deck-text);
}

.preflight .tick {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  margin: 0 auto 4px;
  border: 2px solid var(--gunmetal);
  border-radius: 999px;
  background: transparent;
}

.preflight .is-now .tick {
  border-color: #6b2fd6;
  background: #6b2fd6;
  box-shadow: none;
}

.preflight .is-done .tick {
  border-color: var(--deck-text);
  background: var(--deck-text);
}

.preflight .is-done .tick::after {
  content: "";
  width: 5px;
  height: 9px;
  border: solid var(--deck);
  border-width: 0 2px 2px 0;
  transform: translateY(-1px) rotate(45deg);
}

.flight-card {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  flex: none;
  min-width: 0;
  padding: 14px 16px;
  overflow: hidden;
}

.flight-card-copy {
  min-width: 0;
}

.flight-card-sign {
  margin: 0;
  color: var(--deck-text);
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
  overflow-wrap: anywhere;
}

.flight-card-meta {
  margin: 2px 0 0;
  color: var(--deck-muted);
  font-size: 16px;
  font-weight: 700;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.avatar.xl.flight-face {
  width: 104px;
  height: 104px;
  flex: none;
}

.flight-card.is-cleared .flight-face {
  animation: patch-stamp 400ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.flight-card.is-cleared::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent 35%, rgba(255, 255, 255, 0.42) 50%, transparent 65%);
  transform: translateX(-120%);
  animation: patch-shine 800ms ease 200ms both;
  pointer-events: none;
}

.cleared-line {
  margin: 0;
  color: var(--deck-text);
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.onboard-dialog .dialog-body {
  flex: 1;
  min-height: 0;
  max-height: none;
  gap: 12px;
  padding: 14px 16px 16px;
  overflow-x: hidden;
  overflow-y: auto;
  background: var(--deck-card);
}

.onboard-dialog .callsign-lead,
.onboard-dialog .sign-hint,
.onboard-dialog legend,
.onboard-dialog label,
.onboard-dialog .dialog-error,
#onboard-progress,
#onboard-code-copy,
#onboard-done-wide {
  font-size: 16px;
  line-height: 1.35;
}

#onboard-progress {
  margin: 0;
  color: var(--deck-text);
  font-weight: 700;
}

.stepper-bar {
  height: 6px;
  margin-top: 8px;
  border-radius: 999px;
  background: var(--gunmetal);
  overflow: hidden;
}

.stepper-bar span {
  display: block;
  height: 100%;
  background: #8a5cf0;
  transition: width 180ms ease;
}

.onboard-dialog fieldset {
  min-width: 0;
  max-width: 100%;
  margin: 0;
  padding: 0;
  border: 0;
}

.onboard-dialog legend {
  margin: 0 0 6px;
  padding: 0;
  color: var(--deck-text);
  font-weight: 700;
}

.onboard-dialog .callsign-lead,
.onboard-dialog .sign-hint,
#onboard-code-copy,
#onboard-done-wide {
  margin: 0;
  color: var(--deck-text);
}

.onboard-dialog .sign-option {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  min-height: 48px;
  margin: 0;
  padding: 8px 12px;
  border: 2px solid var(--gunmetal);
  border-radius: 12px;
  background: var(--deck);
  color: var(--deck-text);
  font-size: 18px;
  font-weight: 700;
  line-height: 1.2;
  overflow-wrap: anywhere;
  transition: border-color 180ms ease, box-shadow 180ms ease;
}

#onboard-sign .sign-option {
  font-size: 22px;
}

.onboard-dialog .sign-option input {
  width: 22px;
  height: 22px;
  min-height: 22px;
  flex: none;
  margin: 0;
  padding: 0;
}

.onboard-dialog .patch-option {
  position: relative;
  display: grid;
  place-items: center;
  min-width: 0;
  min-height: 76px;
  margin: 0;
  padding: 6px;
  border: 2px solid var(--muted);
  border-radius: 12px;
  background: transparent;
}

.onboard-dialog .patch-option input {
  position: absolute;
  width: 1px;
  height: 1px;
  min-height: 0;
  margin: 0;
  padding: 0;
  opacity: 0;
}

.onboard-dialog .sign-option:has(input:checked),
.onboard-dialog .shape-option:has(input:checked),
.onboard-dialog .color-option:has(input:checked),
.onboard-dialog .emblem-option:has(input:checked) {
  border-color: #8a5cf0;
  background: #6b2fd6;
  color: #ffffff;
  box-shadow: 0 0 0 3px rgba(138, 92, 240, 0.45);
}

.onboard-dialog .color-option:has(input:checked) {
  background: var(--deck);
  color: var(--deck-text);
}

.onboard-dialog .sign-option:focus-within,
.onboard-dialog .shape-option:focus-within,
.onboard-dialog .color-option:focus-within,
.onboard-dialog .emblem-option:focus-within {
  outline: 3px solid #8a5cf0;
  outline-offset: 2px;
}

#onboard-signs {
  perspective: 640px;
}

#onboard-signs .sign-option.is-flap {
  transform-origin: center bottom;
  animation: flap-in 180ms ease both;
}

#onboard-signs .sign-option:nth-child(2).is-flap { animation-delay: 40ms; }
#onboard-signs .sign-option:nth-child(3).is-flap { animation-delay: 80ms; }
#onboard-signs .sign-option:nth-child(4).is-flap { animation-delay: 120ms; }

.choice-grid {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.choice-grid.shapes {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

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

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

.onboard-dialog .shape-option,
.onboard-dialog .color-option,
.onboard-dialog .emblem-option {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  min-height: 64px;
  margin: 0;
  padding: 8px;
  border: 2px solid var(--gunmetal);
  border-radius: 12px;
  background: var(--deck);
  color: var(--deck-text);
  font-size: 16px;
  font-weight: 700;
  line-height: 1.2;
  overflow-wrap: anywhere;
  transition: border-color 180ms ease, box-shadow 180ms ease;
}

.onboard-dialog .shape-option {
  justify-content: center;
  min-height: 76px;
}

.onboard-dialog .shape-option input,
.onboard-dialog .color-option input,
.onboard-dialog .emblem-option input {
  position: absolute;
  width: 1px;
  height: 1px;
  min-height: 0;
  margin: 0;
  padding: 0;
  opacity: 0;
}

.shape-face,
.emblem-face {
  display: block;
  width: 48px;
  height: 48px;
  flex: none;
}

.swatch {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  flex: none;
  border: 2px solid #1a1208;
  border-radius: 999px;
}

.swatch span {
  width: 16px;
  height: 16px;
  border-radius: 999px;
}

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

.onboard-dialog .dialog-error {
  min-height: 0;
  margin: 0;
  padding: 8px 16px;
  border-radius: 12px;
  background: var(--deck-card);
  color: #ff8088;
  font-weight: 700;
}

.onboard-dialog .dialog-error:empty {
  display: none;
}

html[data-theme="light"] .onboard-dialog .dialog-error {
  color: #9f1239;
}

.onboard-dialog input[type="text"] {
  border-color: var(--gunmetal);
  background: var(--deck);
  color: var(--deck-text);
  font-size: 16px;
}

.onboard-preview,
.onboard-sign {
  margin: 0;
  color: var(--deck-text);
  font-size: 28px;
  font-weight: 800;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.onboard-cleared {
  display: grid;
  justify-items: center;
  gap: 8px;
  text-align: center;
}

.onboard-dialog .onboard-foot {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: none;
  position: sticky;
  bottom: 0;
  z-index: 2;
  padding: 12px 12px calc(12px + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid var(--hud);
  border-radius: 0;
  background: var(--deck-card);
}

.onboard-foot .dialog-actions {
  display: flex;
  gap: 8px;
}

.onboard-foot .dialog-actions .btn {
  flex: 1;
  min-height: 44px;
}

#onboard-face.has-photo,
#onboard-card-face.has-photo,
#onboard-done-face.has-photo {
  border: 0;
  border-radius: 999px;
  overflow: hidden;
  background: transparent;
}

@keyframes flap-in {
  from { transform: rotateX(-90deg); }
  to { transform: rotateX(0deg); }
}

@keyframes patch-stamp {
  0% { transform: scale(1.4) rotate(-8deg); }
  70% { transform: scale(0.96) rotate(0deg); }
  100% { transform: scale(1) rotate(0deg); }
}

@keyframes patch-shine {
  from { transform: translateX(-120%); }
  to { transform: translateX(120%); }
}

@media (prefers-reduced-motion: reduce) {
  .onboard-dialog *,
  .onboard-dialog *::before,
  .onboard-dialog *::after {
    animation: none !important;
    transition: none !important;
  }
}

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

  .onboard-dialog form {
    padding: 0;
    gap: 0;
  }

  .onboard-dialog .dialog-head h2,
  .flight-card-sign,
  .cleared-line {
    font-size: 28px;
  }
}

html[data-theme="light"] .onboard-dialog {
  box-shadow: 0 24px 48px rgba(30, 58, 95, 0.16);
}

html[data-theme="light"] .onboard-dialog .deck-panel {
  border: 0;
  box-shadow: none;
}

.brand-lockup {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-width: 100%;
}

.brand-tag {
  display: block;
  width: 100%;
  color: var(--muted);
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0;
  line-height: 1.3;
  text-align: center;
}

.rail-rule {
  height: 1px;
  margin: 2px 16px 8px;
  background: var(--line);
}

#rail-post {
  width: calc(100% - 24px);
  margin: 4px 12px 12px;
}

.rail-label {
  margin: 14px 18px 4px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: none;
}

.preview-note {
  margin: 0;
  padding: 8px 16px 4px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 400;
}

#home > .colhead h1 {
  padding: 2px 16px 8px;
}

html[data-role="member"] .preview-note,
html[data-role="admin"] .preview-note,
html[data-role="member"] #home > article.post:not(.user-post),
html[data-role="admin"] #home > article.post:not(.user-post),
html[data-role="member"] .join-card,
html[data-role="admin"] .join-card {
  display: none;
}

.composer,
.prose p.is-sample-copy {
  display: none;
}

.feed-composer {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  align-items: start;
  gap: 12px;
  margin: 0;
  padding: 14px 16px 12px;
  border-bottom: 1px solid var(--line);
  background: var(--card);
}

.composer-title {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--text);
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.2;
}

.feed-composer .avatar,
#composer-face {
  width: 48px;
  height: 48px;
  margin-top: 4px;
  font-size: 16px;
}

.composer-field {
  width: 100%;
  min-height: calc(3 * 1.45em + 20px);
  margin: 0;
  padding: 10px 12px;
  border: 1px solid var(--composer-line);
  border-radius: 12px;
  resize: vertical;
  background: var(--composer-fill);
  color: var(--text);
  caret-color: var(--text);
  font: inherit;
  font-size: 16px;
  line-height: 1.45;
}

.composer-field:focus {
  outline: 2px solid var(--bright);
  outline-offset: 2px;
  border-color: var(--bright);
  color: var(--text);
}

.feed-composer:not(.is-open) .composer-bar,
.feed-composer:not(.is-open) .rules-note,
.feed-composer:not(.is-open) .composer-error {
  display: none;
}

.composer-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.feed-composer .composer-bar {
  flex-direction: column;
  align-items: stretch;
}

.composer-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.composer-tag {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 0;
  color: var(--text);
  font-size: 15px;
  font-weight: 800;
}

.composer-tag-label {
  flex: none;
}

.feed-composer .composer-room {
  flex: 1;
  width: auto;
  min-width: 0;
  background: var(--composer-fill);
  border-color: var(--composer-line);
  color: var(--text);
}

.feed-composer .attach-btn {
  align-self: flex-start;
}

.composer-room,
.attach-btn {
  min-height: 40px;
  border-radius: 999px;
}

.composer-room {
  max-width: 100%;
  padding: 0 12px;
  border: 1px solid var(--line);
  background: var(--field);
  color: var(--text);
  font: inherit;
  font-size: 15px;
  font-weight: 700;
}

.attach-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 40px;
  padding: 0 10px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--text);
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
}

.attach-btn svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
}

.attach-btn:hover,
.composer-drop {
  background: var(--hover);
}

.composer-bar .btn {
  margin-left: auto;
  min-width: 88px;
}

.feed-composer .composer-bar .btn {
  margin-left: 0;
  flex: none;
}

.composer-note,
.composer-error {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.composer-error {
  color: #FF8A8A;
  font-weight: 500;
}

html[data-theme="light"] .composer-error {
  color: #9f1c2c;
  font-weight: 500;
}

.composer-images,
.post-images {
  display: grid;
  gap: 6px;
  margin-top: 8px;
}

.composer-images {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.composer-images:empty,
.composer-error:empty {
  display: none;
}

.composer-shot {
  position: relative;
  margin: 0;
}

.composer-shot img,
.post-image img {
  display: block;
  width: 100%;
  height: 84px;
  object-fit: cover;
  border-radius: 12px;
}

.shot-remove {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 999px;
  background: #1a1208;
  color: #ffffff;
  font-weight: 800;
  cursor: pointer;
}

.post-images.count-1 {
  grid-template-columns: 1fr;
}

.post-images.count-2,
.post-images.count-4 {
  grid-template-columns: 1fr 1fr;
}

.post-images.count-3 {
  grid-template-columns: 1fr 1fr;
}

.post-images.count-3 .post-image:first-child {
  grid-column: 1 / -1;
}

.post-image {
  display: block;
  padding: 0;
  border: 0;
  border-radius: 16px;
  background: transparent;
  cursor: pointer;
}

.post-images .post-image img {
  height: 180px;
  border-radius: 16px;
}

.post-images.count-1 .post-image img {
  height: 280px;
}

.room-chip,
.room-chip:link,
.room-chip:visited,
.room-chip:hover,
.room-chip:active {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 24px;
  padding: 0;
  border-radius: 0;
  background: transparent;
  color: var(--text);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0;
  text-decoration: none;
}

.room-chip::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: var(--room-bar, #6b2fd6);
  flex: none;
}

.post[data-room] {
  box-shadow: inset 2px 0 0 var(--room-bar, transparent);
}

.room-needs { --room-bar: #0b7a3b; }
.room-offmarket { --room-bar: #e10600; }
.room-capital { --room-bar: #f5c400; }
.room-news { --room-bar: #1239c7; }
.room-subs { --room-bar: #8a5cf0; }
.room-deals { --room-bar: #e10600; }
.room-general { --room-bar: #6b2fd6; }
.room-intros { --room-bar: #1239c7; }
.room-industrial { --room-bar: #8a5cf0; }
.room-office { --room-bar: #6b2fd6; }
.room-retail { --room-bar: #e10600; }
.room-land { --room-bar: #0b7a3b; }
.room-multifamily { --room-bar: #f5c400; }
.room-special { --room-bar: #6b2fd6; }

.moving {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  padding: 12px 16px 8px;
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}

.moving h2,
.rumor-pin p {
  margin: 0;
}

.moving h2 {
  padding: 0 0 8px;
  font-size: 16px;
  font-weight: 600;
}

.moving-strip {
  display: flex;
  gap: 8px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  padding: 0 0 8px;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: 0;
  touch-action: pan-x;
}

.moving-strip.is-overflow:not(.is-ended) {
  -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 28px), transparent);
  mask-image: linear-gradient(to right, #000 calc(100% - 28px), transparent);
}

.moving-card {
  flex: 0 0 220px;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  min-width: 0;
  min-height: 92px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--card);
  color: var(--text);
  text-align: left;
  text-decoration: none;
}

.moving-dots {
  display: none;
  justify-content: center;
  gap: 6px;
  margin: 0 0 4px;
}

.moving-dot {
  width: 5px;
  height: 5px;
  border-radius: 999px;
  background: var(--line);
}

.moving-dot.is-on {
  background: #6b2fd6;
}

.moving-card strong {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
  padding: 0;
  background: transparent;
  color: var(--text);
  font-size: 13px;
  line-height: 1.2;
}

.moving-card strong::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: var(--room-bar, #6b2fd6);
}

.moving-card span {
  display: block;
  color: var(--text);
  font-size: 15px;
  font-weight: 650;
  line-height: 1.35;
}

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

.rumor-pin a {
  color: var(--text);
  font-weight: 500;
  text-decoration: none;
}

.rumor-kicker {
  margin: 0 0 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.rumor-flag {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  margin: 0;
  padding: 0 8px;
  border: 1px solid #d4a73a;
  border-radius: 999px;
  background: transparent;
  color: #d4a73a;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0;
  line-height: 1.2;
}

html[data-theme="light"] .rumor-flag {
  border-color: #6b4a00;
  color: #6b4a00;
}

.actions .rumor-btn,
.rumor-btn {
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0;
}

.actions .rumor-btn[aria-pressed="true"],
.rumor-btn[aria-pressed="true"] {
  background: transparent;
  color: var(--text);
}

#post-fab {
  position: fixed;
  z-index: 20;
  right: 16px;
  bottom: calc(76px + env(safe-area-inset-bottom));
}

#rail-post.is-launching svg,
#post-fab.is-launching svg {
  opacity: 0;
}

#post-fab.is-launching {
  color: transparent;
}

.launch-layer {
  position: fixed;
  inset: 0;
  z-index: 30;
  overflow: hidden;
  pointer-events: none;
}

.launch-contrail,
.launch-rig {
  position: fixed;
  left: 0;
  top: 0;
  pointer-events: none;
  will-change: transform, opacity;
}

.launch-contrail {
  width: 3px;
  height: 168px;
  margin-left: -1.5px;
  border-radius: 999px;
  background: linear-gradient(to top, rgba(247, 247, 245, 0), rgba(247, 247, 245, 0.55));
  transform-origin: center bottom;
  transform: translate3d(var(--x), calc(var(--y) - 168px), 0) scaleY(0.05);
  opacity: 0;
  animation: contrail-rise 560ms ease-out forwards;
}

.launch-rig {
  width: 36px;
  height: 36px;
  margin-left: -18px;
  margin-top: -18px;
  transform: translate3d(var(--x), var(--y), 0);
  animation: jet-rise 560ms cubic-bezier(0.16, 0.72, 0.24, 1) forwards;
}

.launch-jet {
  display: block;
  width: 36px;
  height: 36px;
  transform: rotate(-90deg);
}

.launch-flame {
  position: absolute;
  left: 50%;
  bottom: -14px;
  width: 7px;
  height: 18px;
  margin-left: -3.5px;
  border-radius: 0 0 8px 8px;
  background: linear-gradient(to bottom, #6b2fd6 0%, #f5c400 52%, #f7f7f5 100%);
  transform-origin: center top;
  animation: flame-flicker 70ms linear infinite;
}

.user-post.is-arriving {
  position: relative;
  animation: post-arrive 420ms cubic-bezier(0.16, 0.84, 0.28, 1) both;
}

.arrive-flash {
  position: absolute;
  inset: 0;
  background: #6b2fd6;
  opacity: 0;
  pointer-events: none;
  animation: arrive-flash 420ms ease-out both;
}

@keyframes jet-rise {
  0% {
    transform: translate3d(var(--x), var(--y), 0);
    opacity: 1;
  }
  72% {
    opacity: 1;
  }
  100% {
    transform: translate3d(var(--x), calc(var(--y) - 188px), 0);
    opacity: 0;
  }
}

@keyframes contrail-rise {
  0% {
    transform: translate3d(var(--x), calc(var(--y) - 168px), 0) scaleY(0.08);
    opacity: 0;
  }
  28% {
    opacity: 0.42;
  }
  100% {
    transform: translate3d(var(--x), calc(var(--y) - 168px), 0) scaleY(1);
    opacity: 0;
  }
}

@keyframes flame-flicker {
  0% { opacity: 1; transform: scaleY(1); }
  45% { opacity: 0.35; transform: scaleY(0.72); }
  100% { opacity: 0.95; transform: scaleY(1.08); }
}

@keyframes post-arrive {
  from { transform: translate3d(0, -16px, 0); opacity: 0; }
  to { transform: translate3d(0, 0, 0); opacity: 1; }
}

@keyframes arrive-flash {
  from { opacity: 0.34; }
  to { opacity: 0; }
}

@keyframes post-fade {
  from { opacity: 0; }
  to { opacity: 1; }
}

@media (max-width: 999px) {
  .moving-card {
    flex-basis: calc(85% - 8px);
    max-width: calc(85% - 8px);
  }

  .moving-dots {
    display: flex;
  }
}

@media (prefers-reduced-motion: reduce) {
  .launch-layer {
    display: none;
  }

  #rail-post.is-launching svg {
    opacity: 1;
  }

  #post-fab.is-launching {
    color: var(--btn-text, #ffffff);
  }

  .user-post.is-arriving {
    animation: post-fade 180ms linear both;
  }

  .arrive-flash {
    animation: none;
    opacity: 0;
  }
}

.photo-lightbox {
  width: min(960px, calc(100vw - 24px));
  max-height: calc(100dvh - 24px);
  padding: 12px;
  border: 0;
  border-radius: 16px;
  background: #0f1419;
}

.photo-lightbox img {
  display: block;
  width: 100%;
  max-height: calc(100dvh - 88px);
  object-fit: contain;
  border-radius: 12px;
}

.photo-lightbox .icon-btn {
  color: #ffffff;
}

.is-fade-top,
.is-fade-bottom {
  --edge: 10px;
}

.is-fade-top:not(.is-fade-bottom) {
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 var(--edge));
  mask-image: linear-gradient(to bottom, transparent, #000 var(--edge));
}

.is-fade-bottom:not(.is-fade-top) {
  -webkit-mask-image: linear-gradient(to bottom, #000 calc(100% - var(--edge)), transparent);
  mask-image: linear-gradient(to bottom, #000 calc(100% - var(--edge)), transparent);
}

.is-fade-top.is-fade-bottom {
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 var(--edge), #000 calc(100% - var(--edge)), transparent);
  mask-image: linear-gradient(to bottom, transparent, #000 var(--edge), #000 calc(100% - var(--edge)), transparent);
}

.main.is-fade-top,
.main.is-fade-bottom {
  -webkit-mask-image: none;
  mask-image: none;
}

.main {
  position: relative;
}

.main-edge {
  position: sticky;
  z-index: 5;
  display: none;
  height: 10px;
  margin: 0;
  pointer-events: none;
}

.main-edge.top {
  top: 0;
  background: linear-gradient(var(--bg), transparent);
}

.main-edge.bottom {
  bottom: 0;
  background: linear-gradient(transparent, var(--bg));
}

.main.is-fade-top .main-edge.top,
.main.is-fade-bottom .main-edge.bottom {
  display: block;
}

@media (min-width: 1000px) and (max-width: 1279px) {
  .rail-brand .wm,
  .brand-lockup,
  .rail-rule,
  .rail-label,
  .rail a.item span,
  #rail-post span,
  .chip-copy,
  .chip-more {
    display: none;
  }

  .rail-brand {
    margin: 8px auto;
    padding: 0;
  }

  #rail-post {
    width: var(--btn-h-lg, 52px);
    margin: 4px auto 10px;
    padding: 0;
  }

  .rail a.item {
    justify-content: center;
    gap: 0;
    margin: 2px 6px;
    padding: 0;
  }

  .account-chip {
    justify-content: center;
    padding: 8px;
  }

  .main {
    max-width: 680px;
    margin-right: auto;
    margin-left: auto;
  }
}

@media (min-width: 1000px) {
  #post-fab {
    display: none;
  }
}

@media (max-width: 999px) {
  .brand-tag {
    font-size: 13px;
  }
}

.avatar.has-patch,
.seat.has-patch {
  border-radius: 999px;
  overflow: hidden;
}

.patch-sizes {
  display: flex;
  align-items: flex-end;
  gap: 16px;
  margin: 0 0 8px;
}

.patch-sizes figure {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  margin: 0;
}

.patch-sizes figcaption {
  color: var(--deck-muted);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.patch-96 { width: 96px; height: 96px; }
.patch-40 { width: 40px; height: 40px; }
.patch-32 { width: 32px; height: 32px; }

.onboard-dialog .choice-grid.emblems {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.onboard-dialog .choice-grid.presets {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.onboard-dialog .choice-grid.colors {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.onboard-dialog .color-option {
  justify-content: center;
  width: 44px;
  min-width: 44px;
  min-height: 44px;
  padding: 4px;
}

.onboard-dialog .emblem-face {
  width: 40px;
  height: 40px;
}

.onboard-dialog .emblem-option,
.onboard-dialog .preset-option {
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  min-height: 84px;
  padding: 8px 4px;
  text-align: center;
}

.onboard-dialog .preset-option {
  width: 100%;
  border: 2px solid var(--gunmetal);
  border-radius: 12px;
  background: var(--deck);
  color: var(--deck-text);
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.onboard-dialog .preset-option:hover,
.onboard-dialog .emblem-option:hover,
.onboard-dialog .color-option:hover {
  border-color: #6b2fd6;
}

label.slash-toggle {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  color: var(--deck-text);
  font-size: 16px;
  font-weight: 400;
}

label.slash-toggle input {
  width: 18px;
  min-width: 18px;
  height: 18px;
  min-height: 18px;
  flex: none;
  margin: 0;
  padding: 0;
  accent-color: #6b2fd6;
}

.feed-composer {
  margin: 8px 12px 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
}

.moving h2,
.colhead h1 {
  letter-spacing: -0.03em;
}

.rules-note {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.rules-note summary {
  cursor: pointer;
  color: var(--text);
}

.rules-note[open] > summary {
  margin-bottom: 8px;
}

.rules-note p,
.rules-note ul {
  margin: 0 0 8px;
}

.rules-note ul {
  padding-left: 1.15rem;
}

.policy-check {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin: 12px 0;
  font-size: 15px;
  line-height: 1.4;
}

.policy-check input {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  flex: none;
}

.gate-report {
  margin: 18px 0 0;
  font-size: 14px;
}

.gate-report a,
.legal-foot a,
body.legal a {
  color: #f7f7f5;
}

html[data-theme="light"] .legal-foot a,
html[data-theme="light"] body.legal a {
  color: #0f1419;
}

.config-error {
  margin: 12px 16px;
  color: var(--text);
}

.admin-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 16px;
}

.test-applicant-form {
  display: grid;
  gap: 10px;
  max-width: 440px;
  margin: 0 0 16px;
}

.test-applicant-form label {
  display: grid;
  gap: 6px;
  font-size: 13px;
  font-weight: 500;
}

.test-applicant-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.test-ghost {
  min-height: 44px;
  margin: 0;
  padding: 0 4px;
  border: 0;
  background: transparent;
  color: var(--link);
  font: inherit;
  font-size: 13px;
  font-weight: 500;
  text-decoration: underline;
  cursor: pointer;
}

.invite-url {
  overflow-wrap: anywhere;
}

.invite-url a {
  color: var(--text);
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 80;
  transform: translateX(-50%);
  max-width: min(440px, calc(100vw - 32px));
  margin: 0;
  padding: 12px 16px;
  border-radius: 12px;
  background: #3a1c22;
  color: #FF8A8A;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.4;
  text-align: center;
}

html[data-theme="light"] .toast {
  background: #fff4f4;
  color: #9f1c2c;
  border: 1px solid #9f1c2c;
}

.toast[hidden] {
  display: none;
}

.password-field {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.password-field input {
  flex: 1 1 auto;
  width: auto;
  min-width: 0;
}

.password-toggle {
  display: inline-flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  margin: 0;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--field);
  color: var(--text);
  cursor: pointer;
}

.password-toggle svg {
  width: 22px;
  height: 22px;
}

.password-toggle .eye-off {
  display: none;
}

.password-toggle[aria-pressed="true"] .eye-on {
  display: none;
}

.password-toggle[aria-pressed="true"] .eye-off {
  display: block;
}

.admin-subhead {
  margin: 20px 0 8px;
  font-size: 18px;
}

.report-btn {
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}

body.legal {
  margin: 0;
  background: var(--bg);
  color: var(--text);
}

.legal-wrap {
  max-width: 42rem;
  margin: 0 auto;
  padding: 28px 20px 48px;
}

.legal-wrap h1 {
  font-size: 1.7rem;
  line-height: 1.2;
  letter-spacing: -0.03em;
}

.legal-wrap h2 {
  margin-top: 1.6rem;
  font-size: 1.15rem;
}

.legal-wrap p,
.legal-wrap li {
  font-size: 16px;
  line-height: 1.55;
}

.legal-foot {
  max-width: 42rem;
  margin: 0 auto;
  padding: 8px 20px 48px;
  color: var(--muted);
  font-size: 14px;
}

#turnstile-slot {
  margin: 12px 0;
}

.login-dialog,
.account-dialog,
.callsign-dialog,
.locale-dialog,
.avatar-dialog,
#post-dialog {
  display: flex;
  flex-direction: column;
  max-height: calc(100dvh - 32px);
  overflow: hidden;
}

.login-dialog > form,
.account-dialog > form,
.callsign-dialog > form,
.locale-dialog > form,
.avatar-dialog > form,
#post-dialog > form {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  max-height: 100%;
  overflow: hidden;
}

.dialog-head {
  flex: none;
  height: auto;
  min-height: 53px;
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--card);
}

.dialog-head h2 {
  flex: 1;
  min-width: 0;
}

.dialog-head > .btn--ghost,
.dialog-tools > .btn--ghost {
  flex: none;
}

.dialog-body {
  flex: 1 1 auto;
  min-height: 0;
  max-height: none;
  overflow: auto;
  overscroll-behavior: contain;
}

.dialog-body > [data-join-step],
.dialog-body > [data-picker-step] {
  display: grid;
  gap: 14px;
  min-width: 0;
}

.callsign-dialog .dialog-body > [data-picker-step] {
  gap: 8px;
}

.dialog-body > [hidden] {
  display: none !important;
}

.dialog-foot {
  display: grid;
  gap: 8px;
  flex: none;
  position: sticky;
  bottom: 0;
  z-index: 2;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid var(--line);
  background: var(--card);
}

.dialog-foot .dialog-error {
  margin: 0;
}

.dialog-foot .dialog-error:empty {
  display: none;
}

.dialog-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.dialog-actions .btn {
  min-height: 44px;
}

.dialog-actions .foot-back {
  margin-right: auto;
}

.dialog-actions [hidden] {
  display: none !important;
}

#locale-choices.city-grid,
#onboard-cities.city-grid {
  gap: 6px;
}

#locale-choices .sign-option,
#onboard-cities .sign-option {
  min-height: 40px;
  padding: 4px 10px;
  font-size: 16px;
}

.onboard-dialog .dialog-tools {
  display: flex;
  align-items: center;
  gap: 4px;
  min-height: 44px;
  margin: -4px -4px 8px;
}

.onboard-dialog .dialog-tools .icon-btn {
  margin-left: auto;
  color: var(--deck-text);
}

.onboard-dialog .dialog-tools .icon-btn:hover {
  background: rgba(255, 255, 255, 0.08);
}

html[data-theme="light"] .onboard-dialog .dialog-tools .icon-btn:hover {
  background: rgba(0, 0, 0, 0.06);
}

@media (min-width: 720px) {
  #locale-choices.city-grid,
  #onboard-cities.city-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 719px) {
  .login-dialog,
  .account-dialog,
  .callsign-dialog,
  .locale-dialog,
  .onboard-dialog,
  .avatar-dialog,
  #post-dialog {
    width: 100%;
    max-width: 100%;
    height: 100dvh;
    max-height: 100dvh;
    margin: 0;
    border: 0;
    border-radius: 0;
    padding-top: env(safe-area-inset-top, 0px);
  }

  .login-dialog .dialog-body,
  .account-dialog .dialog-body,
  .callsign-dialog .dialog-body,
  .locale-dialog .dialog-body,
  .onboard-dialog .dialog-body,
  .avatar-dialog .dialog-body {
    max-height: none;
  }

  #login-dialog,
  #join-dialog {
    position: fixed;
    top: var(--auth-top, 0px);
    right: 0;
    bottom: auto;
    left: 0;
    width: 100%;
    max-width: 100%;
    height: auto;
    max-height: var(--auth-vv, 100dvh);
    margin: 0;
    border: 0;
    border-radius: 0 0 16px 16px;
    padding-top: env(safe-area-inset-top, 0px);
    overflow: hidden;
  }

  #login-dialog > form,
  #join-dialog > form {
    flex: 1 1 auto;
    height: auto;
    min-height: 0;
    max-height: 100%;
    overflow: hidden;
  }

  #login-dialog .dialog-head,
  #join-dialog .dialog-head {
    min-height: 48px;
    padding: 0 8px 0 16px;
  }

  #login-dialog .dialog-body,
  #join-dialog .dialog-body {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 12px;
    flex: 1 1 auto;
    min-height: 0;
    padding: 8px 16px 12px;
    overflow: auto;
  }

  #login-dialog .dialog-body label:not(.policy-check),
  #join-dialog .dialog-body label:not(.policy-check) {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
    margin: 0;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.2;
  }

  #login-dialog .auth-help,
  #join-dialog .auth-help {
    margin: 0;
    color: var(--muted);
    font-size: 15px;
    font-weight: 400;
    line-height: 1.3;
  }

  #login-dialog input,
  #join-dialog input,
  #join-dialog select {
    height: 48px;
    min-height: 48px;
    padding: 8px 12px;
    font-size: 16px;
  }

  #login-dialog .password-toggle,
  #join-dialog .password-toggle {
    width: 48px;
    height: 48px;
    min-width: 48px;
    min-height: 48px;
  }

  #login-dialog .dialog-foot,
  #join-dialog .dialog-foot {
    padding: 8px 16px calc(8px + env(safe-area-inset-bottom, 0px));
  }

  #login-dialog .dialog-actions .btn,
  #join-dialog .dialog-actions .btn {
    min-height: 48px;
  }

  #join-dialog .dialog-body > [data-join-step] {
    gap: 10px;
  }

  #join-dialog .rules-note {
    margin: 0;
  }
}

html[data-theme="dark"] .login-dialog::backdrop,
html[data-theme="dark"] .account-dialog::backdrop,
html[data-theme="dark"] .callsign-dialog::backdrop,
html[data-theme="dark"] .locale-dialog::backdrop,
html[data-theme="dark"] #login-dialog::backdrop,
html[data-theme="dark"] #join-dialog::backdrop {
  background: var(--backdrop);
}

html[data-theme="dark"] .onboard-dialog .sign-option,
html[data-theme="dark"] .onboard-dialog .emblem-option,
html[data-theme="dark"] .onboard-dialog .preset-option,
html[data-theme="dark"] .onboard-dialog input[type="text"] {
  background: var(--raised);
}

html[data-theme="dark"] .onboard-dialog .color-option:has(input:checked) {
  background: var(--card);
}

html[data-theme="dark"] .post-text,
html[data-theme="dark"] .thread-body,
html[data-theme="dark"] .reply-body,
html[data-theme="dark"] .reply article > p:not(.meta) {
  font-size: 16px;
  font-weight: 400;
  line-height: 1.5;
}

html[data-theme="dark"] .post {
  padding: 18px 16px 14px;
}

html[data-theme="dark"] .topic-row {
  padding: 16px;
}

html[data-theme="dark"] .topic-title,
html[data-theme="dark"] .topic-title:link,
html[data-theme="dark"] .topic-title:visited,
html[data-theme="dark"] .topic-title:hover,
html[data-theme="dark"] .topic-title:active {
  font-weight: 400;
  color: var(--text);
}

html[data-theme="dark"] .colhead h1,
html[data-theme="dark"] .prose h1,
html[data-theme="dark"] .empty h1,
html[data-theme="dark"] .card h2,
html[data-theme="dark"] .composer-title,
html[data-theme="dark"] #post-dialog .dialog-head .composer-title,
html[data-theme="dark"] .dialog-head h2,
html[data-theme="dark"] .moving h2,
html[data-theme="dark"] .feed-tabs a[aria-current="page"] {
  font-weight: 600;
}

html[data-theme="dark"] .rail-label,
html[data-theme="dark"] .rail a.item,
html[data-theme="dark"] .rail a.item span {
  font-weight: 500;
}

html[data-theme="dark"] .rail a.item[aria-current="page"],
html[data-theme="dark"] .rail a.item[aria-current="page"] span {
  font-weight: 600;
  color: var(--nav-active);
}

html[data-theme="dark"] .rumor-pin a {
  font-weight: 500;
}

html[data-theme="dark"] .meta,
html[data-theme="dark"] .topic-by,
html[data-theme="dark"] .actions,
html[data-theme="dark"] .actions a,
html[data-theme="dark"] .actions button {
  font-weight: 400;
  color: var(--muted);
}

html[data-theme="dark"] .meta .name,
html[data-theme="dark"] .topic-meta .name,
html[data-theme="dark"] .author-row .name,
html[data-theme="dark"] .reply .name {
  font-weight: 500;
  color: var(--text);
}

html[data-theme="dark"] .news-item strong,
html[data-theme="dark"] .moving-card strong {
  font-weight: 500;
}

html[data-theme="dark"] .news-item span,
html[data-theme="dark"] .moving-card span {
  font-weight: 400;
}

.meta .name,
.topic-meta .name,
.author-row .name,
.reply .name {
  font-weight: 500;
  color: var(--text);
}

.topic-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 14px;
  font-weight: 400;
  line-height: 1.4;
}

.sign-extra,
.topic-when {
  color: var(--muted);
  font-weight: 400;
}

.sign-extra:empty,
.sign-extra[hidden] {
  display: none;
}

.topic-when::before {
  content: "· ";
}

.topic-stats {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 14px;
  font-weight: 400;
  line-height: 1.2;
}

.topic-stat {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-weight: 400;
}

.topic-stat svg {
  display: block;
  width: 16px;
  height: 16px;
}

.topic-like.is-on {
  color: #f91880;
}

.topic-like.is-on svg path {
  fill: currentColor;
}

.topic-stats .room-chip,
.topic-stats .room-chip:link,
.topic-stats .room-chip:visited,
.topic-stats .room-chip:hover,
.topic-stats .room-chip:active {
  margin: 0;
  min-height: 26px;
  padding: 2px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 400;
}

.topic-stats .room-chip::before {
  display: none;
}

#post-dialog,
#reply-dialog {
  width: min(600px, calc(100vw - 32px));
  max-width: calc(100vw - 32px);
}

#post-dialog > form,
#reply-dialog > form,
.onboard-dialog form {
  width: 100%;
  min-width: 0;
}

#post-dialog .feed-composer.is-modal {
  display: flex;
  flex-direction: column;
  width: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  gap: 0;
}

#post-dialog .dialog-head {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 56px;
  height: auto;
  padding: 8px 12px 8px 20px;
  border-bottom: 1px solid var(--line);
  box-sizing: border-box;
}

#post-dialog .dialog-head .composer-title {
  flex: 1;
  margin: 0;
  padding: 0;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: 0;
  line-height: 1.2;
}

#post-dialog .dialog-head .icon-btn {
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  margin-left: auto;
  flex: none;
  padding: 0;
  color: var(--text);
}

#post-dialog .dialog-body {
  display: block;
  width: 100%;
  padding: 16px 20px 12px;
  box-sizing: border-box;
}

#post-dialog .composer-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  width: 100%;
  min-width: 0;
}

#post-dialog .avatar,
#post-dialog #post-face {
  width: 40px;
  height: 40px;
  margin: 0;
  flex: none;
  font-size: 14px;
}

#post-dialog .composer-main {
  flex: 1 1 auto;
  min-width: 0;
  width: auto;
}

#post-dialog .composer-field {
  display: block;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
  min-height: 160px;
  max-height: 50vh;
  margin: 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  resize: none;
  overflow: auto;
  background: transparent;
  color: var(--text);
  font-size: 16px;
  line-height: 1.5;
}

#post-dialog .composer-images {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

#post-dialog .composer-images:empty {
  display: none;
}

#post-dialog .composer-shot {
  width: 72px;
}

#post-dialog .composer-shot img {
  width: 72px;
  height: 72px;
}

#post-dialog .rules-note {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 400;
  line-height: 1.45;
}

#post-dialog .rules-note summary {
  color: var(--muted);
  font-weight: 500;
}

#post-dialog .dialog-foot {
  display: block;
  width: 100%;
  box-sizing: border-box;
  padding: 12px 20px calc(12px + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid var(--line);
}

#post-dialog .composer-bar {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  width: 100%;
  gap: 8px;
}

#post-dialog .composer-actions {
  display: flex;
  flex: 1 1 auto;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

#post-dialog .attach-btn {
  width: 40px;
  height: 40px;
  min-width: 40px;
  min-height: 40px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  align-self: center;
}

#post-dialog .composer-tag {
  flex: none;
  gap: 0;
  font-weight: 500;
}

#post-dialog .composer-tag-label {
  display: none;
}

#post-dialog .composer-room {
  width: auto;
  min-width: 7.5rem;
  max-width: 11rem;
  min-height: 36px;
  padding: 0 28px 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--text);
  font-size: 14px;
  font-weight: 500;
}

#post-dialog .composer-bar .btn {
  margin-left: auto;
  flex: none;
}

#reply-dialog textarea,
.onboard-dialog textarea,
.onboard-dialog input[type="text"],
.onboard-dialog input[type="email"],
.onboard-dialog select {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}

#reply-dialog textarea {
  min-height: 160px;
  font-size: 16px;
  line-height: 1.5;
}

#post-dialog::backdrop,
#reply-dialog::backdrop,
.onboard-dialog::backdrop {
  position: fixed;
  inset: 0;
  background: rgba(10, 10, 14, 0.6);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

@media (max-width: 719px) {
  #post-dialog,
  #reply-dialog {
    width: 100%;
    max-width: 100%;
    height: 100dvh;
    max-height: 100dvh;
    margin: 0;
    border: 0;
    border-radius: 0;
  }

  #post-dialog > form {
    height: 100%;
    min-height: 0;
  }

  #post-dialog .dialog-body {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
  }

  #post-dialog .composer-row,
  #post-dialog .composer-main {
    flex: 1 1 auto;
    min-height: 0;
    align-items: stretch;
  }

  #post-dialog .composer-main {
    display: flex;
    flex-direction: column;
  }

  #post-dialog .composer-field {
    flex: 1 1 auto;
    min-height: 160px;
    max-height: none;
  }

  #post-dialog .dialog-foot {
    flex: none;
  }
}

.avatar-dialog {
  width: min(1080px, calc(100vw - 16px));
  height: auto;
  max-height: calc(100dvh - 12px);
  margin: auto;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--card);
  color: var(--text);
  overflow: hidden;
}

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

.avatar-dialog .dialog-head h2 {
  font-weight: 600;
}

.avatar-tabs {
  display: flex;
  gap: 8px;
  border-bottom: 1px solid var(--line);
}

.avatar-tabs button {
  min-height: 44px;
  margin: 0;
  padding: 0 12px;
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: var(--muted);
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
}

.avatar-tabs button[aria-selected="true"] {
  color: var(--text);
  font-weight: 600;
  border-bottom-color: var(--bright);
}

.avatar-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 176px;
  gap: 12px;
  align-items: start;
}

.avatar-controls,
#avatar-panel-photo,
#avatar-panel-patch {
  display: grid;
  gap: 8px;
  min-width: 0;
}

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

.avatar-preview {
  display: grid;
  gap: 14px;
  justify-items: start;
  min-width: 0;
}

.avatar-preview figure {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
}

.avatar-preview figcaption {
  color: var(--muted);
  font-size: 13px;
  font-weight: 400;
}

.avatar-sample {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
}

.avatar-sample-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
  margin: 0;
  min-width: 0;
  color: var(--text);
  font-size: 15px;
  font-weight: 500;
  line-height: 1.3;
}

.avatar-dialog .dialog-actions {
  flex-wrap: nowrap;
}

.avatar-dialog .dialog-actions .btn {
  flex: 1 1 0;
}

.avatar-dialog .choice-grid.emblems {
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 4px;
}

.avatar-dialog .choice-grid.presets {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.avatar-dialog .choice-grid.colors {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  max-width: 194px;
}

.avatar-dialog .emblem-option,
.avatar-dialog .color-option,
.avatar-dialog .preset-option {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  min-width: 0;
  min-height: 48px;
  margin: 0;
  padding: 2px 2px 4px;
  border: 2px solid var(--line);
  border-radius: 12px;
  background: var(--raised);
  color: var(--text);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.2;
  text-align: center;
  cursor: pointer;
  overflow-wrap: anywhere;
}

.avatar-dialog .color-option {
  width: 44px;
  min-width: 44px;
  min-height: 44px;
  padding: 4px;
}

.avatar-dialog .emblem-option input,
.avatar-dialog .color-option input {
  position: absolute;
  width: 1px;
  height: 1px;
  min-height: 0;
  margin: 0;
  padding: 0;
  opacity: 0;
}

.avatar-dialog .emblem-option:has(input:checked),
.avatar-dialog .color-option:has(input:checked),
.avatar-dialog .preset-option.is-on {
  border-color: var(--bright);
}

.avatar-dialog .emblem-face {
  width: 28px;
  height: 28px;
}

.avatar-dialog .patch-options {
  display: grid;
  grid-template-columns: max-content max-content minmax(108px, 1fr);
  align-items: end;
  gap: 8px 12px;
}

.avatar-dialog .patch-options .slash-toggle {
  margin: 0 0 4px;
}

.avatar-dialog .preset-option {
  width: 100%;
  flex-direction: row;
  gap: 6px;
  font: inherit;
  font-size: 13px;
  font-weight: 500;
}

.avatar-dialog .slash-toggle {
  color: var(--text);
  font-weight: 400;
}

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

.avatar-dialog legend {
  margin: 0 0 4px;
  font-size: 15px;
  font-weight: 500;
}

.crop-panel.is-embedded .fallback-actions,
.crop-panel.is-embedded h2 {
  display: none;
}

.avatar-dialog #crop-canvas {
  background: transparent;
}

.avatar-dialog > form {
  height: 100%;
  max-height: 100%;
  min-height: 0;
  overflow: hidden;
}

.avatar-dialog .dialog-body {
  min-height: 0;
  max-height: none;
  overflow: hidden;
  padding-top: 10px;
  padding-bottom: 8px;
  gap: 8px;
}

.avatar-dialog .dialog-foot {
  position: static;
}

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

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

  .avatar-preview {
    order: -1;
    grid-template-columns: auto minmax(0, 1fr);
    grid-template-areas:
      "profile profile"
      "feed sample";
    align-items: center;
    width: 100%;
    max-width: 100%;
  }

  .avatar-preview figure:nth-child(1) {
    grid-area: feed;
  }

  .avatar-preview figure:nth-child(2) {
    grid-area: profile;
  }

  .avatar-preview figure,
  .avatar-sample,
  .avatar-sample-meta {
    min-width: 0;
    max-width: 100%;
  }

  .avatar-sample {
    grid-area: sample;
    width: auto;
  }

  .avatar-dialog .dialog-body {
    overflow-x: hidden;
    overflow-y: auto;
    padding-bottom: 28px;
  }

  .avatar-dialog .choice-grid.emblems {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .avatar-dialog .choice-grid.presets {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .avatar-dialog .patch-options {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
  }

  .avatar-dialog .choice-grid.colors {
    max-width: none;
  }
}
