/* SocialOrbit+ — modern chrome, layout, collections */

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

.skip-link {
  position: absolute;
  left: 12px;
  top: -40px;
  z-index: 100;
  background: #111;
  color: #fff;
  padding: 8px 12px;
  border-radius: 8px;
}
.skip-link:focus {
  top: 12px;
}

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

.site-wrap {
  padding: 0;
}

.app {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--ms-bg);
  color: var(--ms-text);
}

.app-header {
  position: sticky;
  top: 0;
  z-index: 50;
  padding: 8px 20px;
  background: var(--ms-panel);
  border-bottom: 1px solid var(--ms-border);
  color: var(--ms-text);
}

.header-shell {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 16px;
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
}

.header-account {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  overflow: visible;
}

.header-user {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--ms-text);
  text-decoration: none !important;
  font-weight: 600;
  font-size: 13px;
}

.header-link {
  font-size: 13px;
  font-weight: 600;
  color: var(--ms-text);
  text-decoration: none;
}

.header-auth {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.header-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--ms-text);
  color: var(--ms-bg) !important;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none !important;
  line-height: 1;
}

.header-cta:hover {
  opacity: 0.88;
  color: var(--ms-bg) !important;
}

.in-native-app .get-app {
  display: none !important;
}

html.in-native-app {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  -webkit-tap-highlight-color: rgba(17, 17, 17, 0.08);
  height: auto !important;
  overflow-y: auto !important;
}

.in-native-app body {
  height: auto !important;
  min-height: 100%;
  overflow-y: auto !important;
  overflow-x: visible;
}

.in-native-app .app,
.in-native-app .app-frame,
.in-native-app .app-main {
  overflow: visible;
  height: auto;
  max-width: 100%;
}

.in-native-app img,
.in-native-app video {
  max-width: 100%;
}

.in-native-app .compose-fab,
.in-native-app .nav-toggle,
.in-native-app button {
  touch-action: manipulation;
}

.in-native-app .footer-bar {
  padding-bottom: max(20px, env(safe-area-inset-bottom, 0px));
}

body.img-lite-lock {
  overflow: hidden;
}

.img-lite {
  position: fixed;
  inset: 0;
  z-index: 220;
  display: none;
  flex-direction: column;
  background: rgba(8, 8, 8, 0.88);
}

.img-lite.is-open {
  display: flex;
}

.img-lite-close {
  position: absolute;
  top: max(10px, env(safe-area-inset-top, 0px));
  right: max(10px, env(safe-area-inset-right, 0px));
  z-index: 2;
  width: 44px;
  height: 44px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
}

.img-lite-stage {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 0;
  padding: 56px 16px 24px;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}

.img-lite-img {
  display: block;
  max-width: min(96vw, 100%);
  max-height: min(88vh, calc(100dvh - 80px));
  width: auto;
  height: auto;
  object-fit: contain;
  touch-action: pinch-zoom;
}

.profile-avatar-frame img {
  cursor: zoom-in;
}

.in-native-app .pull-refresh {
  position: fixed;
  top: env(safe-area-inset-top, 0px);
  left: 0;
  right: 0;
  z-index: 120;
  display: flex;
  justify-content: center;
  height: 0;
  overflow: visible;
  pointer-events: none;
}

.in-native-app .pull-refresh-knob {
  width: 38px;
  height: 38px;
  margin-top: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--ms-panel);
  border: 1px solid var(--ms-border);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.14);
  opacity: 0;
  transform: translateY(-40px);
}

.in-native-app .pull-refresh.is-visible .pull-refresh-knob,
.in-native-app .pull-refresh.is-refreshing .pull-refresh-knob {
  opacity: 1;
}

.in-native-app .pull-refresh-spinner {
  width: 16px;
  height: 16px;
  border: 2px solid var(--ms-border);
  border-top-color: var(--ms-text);
  border-radius: 50%;
}

.in-native-app .pull-refresh.is-refreshing .pull-refresh-spinner {
  animation: pull-refresh-spin 0.7s linear infinite;
}

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

.get-app-page {
  display: flex;
  justify-content: center;
  padding: 24px 8px 48px;
}

.get-app-card {
  width: 100%;
  max-width: 380px;
  text-align: center;
  background: var(--ms-panel);
  border: 1px solid var(--ms-border);
  border-radius: 24px;
  padding: 40px 28px 36px;
}

.get-app-icon {
  display: block;
  width: 96px;
  height: 96px;
  margin: 0 auto 20px;
  object-fit: contain;
  background: #fff;
  border: 1px solid var(--ms-border);
  border-radius: 22px;
  padding: 14px;
  box-sizing: border-box;
}

.get-app-name {
  margin: 0 0 6px;
  font-family: "Space Grotesk", system-ui, sans-serif;
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -0.03em;
  color: var(--ms-text);
}

.get-app-meta {
  margin: 0 0 28px;
  font-size: 14px;
  font-weight: 500;
  color: var(--ms-muted);
}

.get-app-download {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 52px;
  padding: 14px 20px;
  border-radius: 999px;
  background: var(--ms-text);
  color: var(--ms-bg) !important;
  font-size: 16px;
  font-weight: 700;
  text-decoration: none !important;
  line-height: 1.2;
  box-sizing: border-box;
}

.get-app-download:hover {
  opacity: 0.88;
  color: var(--ms-bg) !important;
}

.get-app-soon {
  margin: 16px 0 0;
  font-size: 13px;
  font-weight: 500;
  color: var(--ms-muted);
}

.app-frame {
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr);
  gap: 8px;
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  flex: 1;
  align-items: start;
}

.app-nav {
  position: sticky;
  top: 84px;
  padding: 16px 8px 32px 12px;
}

.app-main {
  min-width: 0;
  padding: 18px 16px 48px;
}

.brand-link {
  display: inline-flex;
  align-items: center;
  text-decoration: none !important;
  min-width: 0;
}

.brand-logo {
  display: inline-flex;
  align-items: center;
}

.brand-logo img {
  display: block;
  height: 60px;
  width: auto;
  max-width: min(330px, 62vw);
  object-fit: contain;
  filter: none;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
  margin-left: auto;
}

.header-tools {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.banner-greet {
  margin: 0;
  color: var(--ms-muted);
  font-size: 13px;
  font-weight: 500;
}

/* Nav */
.nav-toggle {
  display: none;
}

.app-nav .nav-list {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 2px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-item {
  border: none;
  padding: 0;
  font-size: 14px;
  font-weight: 500;
}

.nav-item-support {
  padding: 2px 0 6px;
  align-self: flex-start;
  width: auto;
}

.nav-item-support .support-chip {
  display: inline-flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  width: auto;
  max-width: 100%;
  justify-content: flex-start;
  height: auto;
  min-height: 40px;
  padding: 8px 12px;
  border-radius: 12px;
}

.nav-item a {
  display: flex;
  align-items: center;
  color: var(--ms-text);
  padding: 10px 12px;
  border-radius: 12px;
  text-decoration: none;
}

.nav-item a:hover {
  background: var(--ms-soft);
  color: var(--ms-text);
  box-shadow: none;
  text-decoration: none;
}

.nav-item-action form {
  display: inline;
  margin: 0;
}

.nav-btn {
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  background: var(--ms-panel);
  border: 1px solid var(--ms-border);
  border-radius: 999px;
  cursor: pointer;
  padding: 7px 12px;
  color: var(--ms-text);
}

.nav-btn:hover {
  border-color: var(--ms-border);
  background: var(--ms-soft);
}

.theme-toolbar {
  display: inline-flex;
  gap: 4px;
}

.theme-btn {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  background: var(--ms-panel);
  border: 1px solid var(--ms-border);
  color: var(--ms-text);
}

.header-alerts {
  position: relative;
  display: inline-flex;
  flex-shrink: 0;
  overflow: visible;
}

.alert-bell {
  --bell-outline: var(--ms-border);
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 1px solid var(--bell-outline);
  border-radius: 50%;
  background: transparent;
  color: var(--ms-text);
  cursor: pointer;
  line-height: 1;
  box-sizing: border-box;
}

.alert-bell:hover {
  background: var(--ms-soft);
}

.alert-bell-icon {
  display: block;
  overflow: visible;
}

.alert-bell-dot {
  position: absolute;
  top: -5px;
  right: -6px;
  z-index: 2;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border: 1px solid var(--ms-panel);
  border-radius: 999px;
  background: #e11d48;
  color: #ffffff;
  font-size: 10px;
  font-weight: 700;
  line-height: 14px;
  text-align: center;
  pointer-events: none;
}

.alert-bell-dot[hidden] {
  display: none !important;
}

.alert-scrim {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: rgba(17, 17, 17, 0.28);
}

.alert-panel[hidden],
.alert-scrim[hidden] {
  display: none !important;
}

.alert-panel {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 81;
  width: min(360px, calc(100vw - 32px));
  max-height: min(70vh, 480px);
  display: flex;
  flex-direction: column;
  background: var(--ms-panel);
  border: 1px solid var(--ms-border);
  border-radius: 12px;
  box-shadow: 0 16px 40px rgba(17, 17, 17, 0.18);
  overflow: hidden;
}

.alert-panel-head {
  padding: 10px 12px 8px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ms-muted);
}

.alert-panel-list {
  flex: 1;
  min-height: 0;
  max-height: none;
  overflow-y: auto;
}

.alert-panel-empty {
  padding: 16px 12px 18px;
  color: var(--ms-muted);
  font-size: 13px;
  line-height: 1.4;
}

.alert-row {
  display: flex;
  align-items: flex-start;
  border-top: 1px solid var(--ms-border);
}

.alert-row:hover {
  background: var(--ms-soft);
}

.alert-row.is-unread {
  background: #fafaf7;
}

.alert-item {
  display: flex;
  flex: 1;
  gap: 10px;
  align-items: flex-start;
  min-width: 0;
  padding: 10px 8px 10px 12px;
  text-decoration: none !important;
  color: inherit;
}

.alert-item:hover {
  color: inherit;
}

.alert-dismiss {
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  margin: 8px 8px 0 0;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--ms-muted);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}

.alert-dismiss:hover {
  background: var(--ms-soft);
  color: var(--ms-text);
}

.post-sheet-scrim {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(17, 17, 17, 0.28);
}

.post-sheet-scrim[hidden] {
  display: none !important;
}

.post-sheet {
  width: min(420px, 100%);
  max-height: min(80vh, 560px);
  overflow: auto;
  background: var(--ms-panel);
  border: 1px solid var(--ms-border);
  border-radius: 12px;
  box-shadow: 0 16px 40px rgba(17, 17, 17, 0.18);
  padding: 14px 14px 16px;
}

.post-sheet-head {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ms-muted);
  margin-bottom: 10px;
}

.post-sheet-url {
  margin: 0 0 10px;
  padding: 8px 10px;
  border-radius: 8px;
  background: var(--ms-soft);
  font-size: 13px;
  word-break: break-all;
}

.post-sheet-status {
  margin: 0 0 10px;
  font-size: 13px;
  font-weight: 600;
}

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

.post-sheet-repost textarea {
  width: 100%;
  box-sizing: border-box;
  margin-bottom: 10px;
}

.repost-sheet-quote .feed-repost-card {
  margin: 0 0 12px;
  cursor: default;
}

.alert-item-avatar {
  width: 32px;
  height: 32px;
  min-width: 32px;
  border-radius: 50%;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--ms-soft);
  font-size: 11px;
}

.alert-item-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.alert-item-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.alert-item-line {
  font-size: 13px;
  line-height: 1.35;
}

.alert-item-preview {
  font-size: 12px;
  color: var(--ms-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.alert-item-when {
  font-size: 11px;
  color: var(--ms-muted);
}

.alert-panel-more {
  display: block;
  padding: 10px 12px;
  border-top: 1px solid var(--ms-border);
  font-size: 13px;
  font-weight: 600;
  text-align: center;
  text-decoration: none !important;
}

.mention-link {
  font-weight: 600;
  color: var(--ms-link);
  text-decoration: none;
}

.mention-link:hover {
  text-decoration: underline;
}

/* Main layout leftovers */
.main-layout {
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
  min-height: 520px;
}

.sidebar {
  background: var(--ms-soft);
  border-right: 1px solid var(--ms-border);
  padding: 16px 14px 24px;
}

.content,
.app-main {
  background: transparent;
  min-height: 460px;
}

.panel {
  display: block;
  border: 1px solid var(--ms-border) !important;
  background: var(--ms-panel);
  border-collapse: separate;
  border-radius: 12px;
  overflow: hidden;
  margin: 0 0 14px;
  box-shadow: none;
}

.panel-title {
  display: block;
  margin: 0;
  background: var(--ms-panel) !important;
  color: var(--ms-muted) !important;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-shadow: none;
  padding: 10px 14px 0 !important;
  border: none !important;
}

.panel-body {
  padding: 10px 14px 14px;
  background: var(--ms-panel);
}

.panel-links a,
.panel-body.panel-links a {
  display: block;
  padding: 6px 0;
  color: var(--ms-text);
  text-decoration: none;
  border-bottom: 1px solid #f0f0ec;
}

.panel-links a:last-child {
  border-bottom: none;
}

.panel-links a:hover {
  color: #000;
}

.sidebar-search {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sidebar-user {
  display: flex;
  align-items: center;
  gap: 8px;
}

.sidebar-cta {
  margin: 0 0 8px;
  color: var(--ms-muted);
  font-size: 13px;
}

.sidebar-signup {
  display: inline-block;
}

/* Cards / sections */
.ms-box {
  border: 1px solid var(--ms-border);
  background: var(--ms-panel);
  margin-bottom: 14px;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: none;
}

.ms-box:has(.post-menu.is-open),
.forum-thread-head:has(.post-menu.is-open) {
  overflow: visible;
  position: relative;
  z-index: 2;
}

.section-bar:has(.post-menu) {
  position: relative;
  z-index: 1;
  overflow: visible;
}

.section-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: var(--ms-panel);
  color: var(--ms-text);
  font-weight: 600;
  font-size: 13px;
  padding: 12px 16px 0;
  border-bottom: none;
  letter-spacing: 0;
  text-transform: none;
  text-shadow: none;
}

.section-more {
  font-size: 12px;
  font-weight: 500;
  color: var(--ms-muted);
}

.section-count {
  font-weight: 500;
  color: var(--ms-muted);
  font-size: 12px;
}

.section-bar-title {
  flex: 1;
  min-width: 0;
}

.post-menu {
  position: relative;
  flex-shrink: 0;
}

.feed-post-main > .post-menu {
  position: absolute;
  top: 0;
  right: 0;
  z-index: 2;
}

.post-menu-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--ms-muted);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}

.post-menu-trigger:hover,
.post-menu.is-open .post-menu-trigger {
  background: var(--ms-soft);
  color: var(--ms-text);
}

.post-menu.is-open {
  z-index: 30;
}

.post-menu-panel {
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  z-index: 20;
  width: max-content;
  min-width: 112px;
  max-width: min(200px, calc(100vw - 24px));
  padding: 4px;
  border: 1px solid var(--ms-border);
  border-radius: 10px;
  background: var(--ms-panel);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  box-sizing: border-box;
}

.post-menu-delete {
  margin: 0;
  width: auto;
  display: block;
}

.post-menu-item {
  display: block;
  width: auto;
  min-width: 104px;
  padding: 8px 12px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--ms-text);
  font: inherit;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.2;
  text-align: left;
  text-decoration: none !important;
  white-space: nowrap;
  cursor: pointer;
  box-sizing: border-box;
}

.post-menu-item:hover {
  background: var(--ms-soft);
}

.post-menu-item-danger {
  color: #e11d48;
}

.forum-post-body > .post-menu {
  position: absolute;
  top: 10px;
  right: 10px;
}

.forum-thread-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.forum-thread-head .page-title {
  margin: 0;
  flex: 1;
  min-width: 0;
}

.ms-box-body {
  padding: 12px 16px 16px;
  background: var(--ms-panel);
}

.page-title {
  font-family: "Space Grotesk", system-ui, sans-serif;
  font-size: 28px;
  font-weight: 600;
  margin: 0 0 10px;
  color: var(--ms-text);
  border-bottom: none;
  padding-bottom: 0;
  letter-spacing: -0.03em;
}

.eyebrow {
  margin: 0 0 6px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ms-muted);
}

.home-hero,
.page-hero {
  background: var(--ms-soft);
  border: 1px solid var(--ms-border);
  border-radius: 16px;
  padding: 28px 26px;
  margin-bottom: 18px;
}

.home-hero h1 {
  font-family: "Space Grotesk", system-ui, sans-serif;
  font-size: 32px;
  font-weight: 600;
  margin: 0 0 10px;
  color: var(--ms-text);
  letter-spacing: -0.04em;
  text-shadow: none;
}

.hero-lead {
  margin: 0 0 16px;
  color: var(--ms-muted);
  font-size: 15px;
  max-width: 42em;
}

.hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.pill-stat,
.counter {
  background: var(--ms-panel);
  border: 1px solid var(--ms-border);
  color: var(--ms-muted);
  border-radius: 999px;
}

.bevel-btn,
.ms-btn {
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  background: var(--ms-text);
  color: var(--ms-panel) !important;
  border: 1px solid var(--ms-text);
  border-radius: 999px;
  padding: 8px 16px;
  box-shadow: none;
}

.bevel-btn:hover,
.ms-btn:hover {
  filter: none;
  background: var(--ms-orange-dark);
  border-color: var(--ms-orange-dark);
  box-shadow: none;
}

.bevel-in {
  font-family: inherit;
  font-size: 14px;
  border: 1px solid var(--ms-border);
  border-radius: 10px;
  background: var(--ms-panel);
  color: var(--ms-text);
  padding: 8px 10px;
  box-shadow: none;
}

select.bevel-in {
  appearance: none;
  -webkit-appearance: none;
  min-height: 42px;
  padding-right: 36px;
  cursor: pointer;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--ms-text) 50%),
    linear-gradient(135deg, var(--ms-text) 50%, transparent 50%);
  background-position:
    calc(100% - 18px) calc(50% - 3px),
    calc(100% - 13px) calc(50% - 3px);
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
}

.file-pick {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  cursor: pointer;
}

.file-pick input[type="file"] {
  position: absolute;
  width: 1px !important;
  max-width: 1px !important;
  height: 1px;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.file-pick-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 8px 14px;
  border: 1px solid var(--ms-border);
  border-radius: 999px;
  background: var(--ms-soft);
  color: var(--ms-text);
  font-size: 13px;
  font-weight: 600;
  line-height: 1;
}

.file-pick:hover .file-pick-btn,
.file-pick:focus-within .file-pick-btn {
  background: var(--ms-panel);
}

.file-pick-name {
  font-size: 13px;
  color: var(--ms-muted);
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-pick-actions {
  margin-top: 10px;
}

.edit-field-row {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 24px;
  align-items: flex-end;
  margin: 0 0 16px;
}

.edit-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 160px;
  font-size: 13px;
  font-weight: 600;
}

.edit-field select.bevel-in {
  min-width: 180px;
}

.color-pick input[type="color"] {
  -webkit-appearance: none;
  appearance: none;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--ms-border);
  border-radius: 12px;
  background: transparent;
  cursor: pointer;
}

.color-pick input[type="color"]::-webkit-color-swatch-wrapper {
  padding: 3px;
}

.color-pick input[type="color"]::-webkit-color-swatch {
  border: none;
  border-radius: 8px;
}

.color-pick input[type="color"]::-moz-color-swatch {
  border: none;
  border-radius: 8px;
}

.flash {
  margin: 12px 16px 0;
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 13px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.flash-text {
  min-width: 0;
  flex: 1;
}

.flash-close {
  flex: 0 0 auto;
  margin: -4px -6px -4px 0;
  padding: 0 8px;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  font-size: 20px;
  line-height: 1.1;
  cursor: pointer;
  opacity: 0.7;
  border-radius: 8px;
}

.flash-close:hover,
.flash-close:focus-visible {
  opacity: 1;
  background: rgba(0, 0, 0, 0.06);
}

.flash.is-leaving {
  opacity: 0;
  transform: translateY(-6px);
  transition: opacity 0.16s ease, transform 0.16s ease;
  pointer-events: none;
}

/* Collections */
.collection-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.collection-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px;
  background: var(--ms-soft);
  border: 1px solid var(--ms-border);
  border-radius: 14px;
  color: inherit;
  min-height: 88px;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.collection-card:hover {
  transform: translateY(-2px);
  border-color: #cfcfc8;
  box-shadow: 0 10px 24px rgba(17, 17, 17, 0.08);
  color: inherit;
}

.collection-card-link {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  min-width: 0;
  text-decoration: none !important;
  color: inherit;
}

.collection-card-link:hover {
  color: inherit;
}

.collection-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-top: 2px;
  margin-left: 56px;
}

.collection-visits {
  font-size: 11px;
  color: #8a8a84;
}

.collection-like-form {
  margin: 0;
}

button.collection-like,
a.collection-like {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin: 0;
  padding: 3px 8px;
  border: 1px solid var(--ms-border);
  border-radius: 999px;
  background: var(--ms-panel);
  color: var(--ms-muted);
  font: inherit;
  font-size: 11px;
  line-height: 1;
  text-decoration: none !important;
  cursor: pointer;
  appearance: none;
}

button.collection-like:disabled {
  opacity: 0.65;
  cursor: default;
}

button.collection-like:hover,
a.collection-like:hover {
  color: var(--ms-text);
  border-color: #cfcfc8;
}

button.collection-like.is-liked,
a.collection-like.is-liked {
  color: #b42318;
  border-color: #f0c4c0;
  background: #fff6f5;
}

.collection-like-heart {
  font-size: 12px;
}

.collection-icon {
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--ms-panel);
  border: 1px solid var(--ms-border);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.collection-icon img {
  width: 28px;
  height: 28px;
  object-fit: contain;
}

.collection-copy {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.collection-name {
  font-weight: 600;
  font-size: 15px;
  color: var(--ms-text);
}

.collection-blurb {
  font-size: 13px;
  color: var(--ms-muted);
  line-height: 1.4;
}

.collection-host {
  font-size: 11px;
  color: #8a8a84;
  letter-spacing: 0.01em;
}

/* Home grids */
.home-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.stack-row {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-bottom: 10px;
}

.ms-box-body .stack-row:last-child {
  margin-bottom: 0;
}

.stack-row-split {
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.stack-row-split .member-link {
  min-width: 0;
  flex: 1;
  overflow: hidden;
}

.stack-row-split .member-link b {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stack-row-split .cool-count {
  flex-shrink: 0;
}

.friend-list-tools {
  padding-bottom: 4px;
}

.friend-list-more {
  display: flex;
  justify-content: center;
  padding: 4px 16px 16px;
}

.friend-list-more[hidden],
[data-friend-empty][hidden] {
  display: none !important;
}

.person-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 12px;
  padding: 8px 16px 16px;
  align-items: start;
}

.friend-list-box .person-grid {
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
}

.person-card {
  min-width: 0;
  max-width: 100%;
  text-align: center;
  font-size: 12px;
  padding: 8px 4px;
}

.person-card b {
  display: block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.person-card .nav-btn {
  margin-top: 6px;
  max-width: 100%;
}

.person-card a {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  text-decoration: none;
  color: inherit;
}

.person-mood,
.person-pm {
  color: var(--ms-muted);
  font-size: 11px;
}

.profiles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 10px;
  padding: 12px 16px 16px;
}

.profile-tile {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--ms-border);
  border-radius: 14px;
  background: var(--ms-soft);
  text-decoration: none !important;
  color: inherit;
}

.profile-tile:hover {
  border-color: var(--ms-text);
  color: inherit;
}

.profile-tile-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.profile-tile-copy b {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.online-dot {
  color: #16a34a;
  text-shadow: none;
}

.presence-dot {
  background: #16a34a;
  border-color: #fff;
  box-shadow: none;
}

.nav-badge {
  background: #111;
  color: #fff;
  box-shadow: none;
}

.footer-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  margin-top: auto;
  padding: 16px 22px 20px;
  background: var(--ms-soft);
  border-top: 1px solid var(--ms-border);
  color: var(--ms-muted);
  font-size: 12px;
  text-align: center;
}

.footer-copy {
  margin: 0;
  width: 100%;
  text-align: center;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
}

.footer-nav a {
  color: var(--ms-muted);
  text-decoration: none;
  font-weight: 500;
}

.footer-nav a:hover {
  color: var(--ms-text);
  text-decoration: underline;
}

.cookie-consent {
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: max(12px, env(safe-area-inset-bottom, 0px));
  z-index: 90;
  max-width: 640px;
  margin: 0 auto;
}

.cookie-consent[hidden] {
  display: none !important;
}

.cookie-consent-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 12px 16px;
  padding: 14px 16px;
  border: 1px solid var(--ms-border);
  border-radius: 14px;
  background: var(--ms-panel);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.16);
}

.cookie-consent-copy {
  flex: 1 1 220px;
  min-width: 0;
}

.cookie-consent-title {
  margin: 0 0 4px;
  font-size: 14px;
  font-weight: 600;
  color: var(--ms-text);
}

.cookie-consent-text {
  margin: 0;
  font-size: 13px;
  line-height: 1.45;
  color: var(--ms-muted);
}

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

.hp-field {
  position: absolute !important;
  left: -10000px !important;
  top: auto !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

.support-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 32px;
  padding: 0 10px 0 8px;
  border: 1px solid var(--ms-border);
  border-radius: 999px;
  background: var(--ms-panel);
  color: var(--ms-text) !important;
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
  text-decoration: none !important;
  white-space: nowrap;
}

.support-chip:hover {
  color: var(--ms-text) !important;
  background: var(--ms-soft);
}

.support-chip-coin {
  display: block;
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  object-fit: contain;
}

.support-thanks {
  position: fixed;
  inset: 0;
  z-index: 180;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(10, 10, 10, 0.28);
  opacity: 0;
  pointer-events: none;
}

.support-thanks.is-wait {
  pointer-events: auto;
}

.support-thanks.is-on {
  opacity: 1;
  animation: support-thanks-in 0.35s ease;
}

.support-thanks.is-out {
  animation: support-thanks-out 0.3s ease forwards;
}

.support-thanks-card {
  position: relative;
  min-width: 220px;
  padding: 28px 28px 24px;
  text-align: center;
  background: var(--ms-panel);
  border: 1px solid var(--ms-border);
  border-radius: 20px;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.18);
}

.support-thanks-orbit {
  position: absolute;
  left: 50%;
  top: 34px;
  width: 72px;
  height: 72px;
  margin-left: -36px;
  border: 1px solid var(--ms-border);
  border-radius: 50%;
  opacity: 0.55;
  animation: support-orbit 1.35s ease-out;
}

.support-thanks-coin {
  display: inline-flex;
  animation: support-coin 0.7s cubic-bezier(0.22, 1.2, 0.36, 1);
}

.support-thanks-coin img {
  display: block;
  width: 56px;
  height: 56px;
}

.support-thanks-title {
  margin: 12px 0 4px;
  font-family: "Space Grotesk", system-ui, sans-serif;
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.03em;
}

.support-thanks-pray {
  display: inline-block;
  font-size: 22px;
  line-height: 1;
  animation: support-pray 0.8s cubic-bezier(0.22, 1.2, 0.36, 1) 0.15s both;
}

.support-thanks-lead {
  margin: 0;
  font-size: 13px;
  color: var(--ms-muted);
}

.support-thanks-go {
  font-weight: 600;
  color: var(--ms-text) !important;
}

.support-thanks-bit {
  position: absolute;
  bottom: 28%;
  color: var(--ms-text);
  font-size: 14px;
  font-weight: 600;
  opacity: 0;
  animation: support-bit 1.2s ease forwards;
}

@keyframes support-thanks-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes support-thanks-out {
  to { opacity: 0; }
}

@keyframes support-coin {
  0% { transform: scale(0.55) rotate(-12deg); opacity: 0; }
  60% { transform: scale(1.08) rotate(4deg); opacity: 1; }
  100% { transform: scale(1) rotate(0deg); opacity: 1; }
}

@keyframes support-pray {
  0% { transform: scale(0.4) translateY(6px); opacity: 0; }
  70% { transform: scale(1.18) translateY(0); opacity: 1; }
  100% { transform: scale(1) translateY(0); opacity: 1; }
}

@keyframes support-orbit {
  0% { transform: scale(0.4); opacity: 0; }
  40% { opacity: 0.6; }
  100% { transform: scale(1.35); opacity: 0; }
}

@keyframes support-bit {
  0% { transform: translateY(12px); opacity: 0; }
  20% { opacity: 0.7; }
  100% { transform: translateY(-72px); opacity: 0; }
}

.user-avatar {
  background: var(--ms-panel);
  border-color: var(--avatar-ring);
}

.shout-row {
  border-bottom-color: var(--ms-border);
}

.accent-text {
  color: var(--ms-text);
  text-shadow: none;
}

.feed-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 20px;
  align-items: start;
}

/* Discover: feed wall (no right rail) */
.page-discover .feed-layout {
  grid-template-columns: minmax(0, 1fr);
}
.page-discover .feed-extras {
  display: none;
}

.discover-toolbar {
  position: relative;
  margin: 0 0 14px;
}

.discover-search-row {
  display: flex;
  gap: 8px;
  align-items: stretch;
  padding: 10px;
  background: var(--ms-panel);
  border: 1px solid var(--ms-border);
  border-radius: 16px;
}

.discover-search-input {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 44px;
  font-size: 16px;
}

.discover-search-btn {
  flex: 0 0 auto;
  min-height: 44px;
  padding-left: 16px;
  padding-right: 16px;
  white-space: nowrap;
}

.discover-filters-btn {
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  margin: 0;
  padding: 0;
  border: 1px solid var(--ms-border);
  border-radius: 12px;
  background: var(--ms-soft);
  color: var(--ms-text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  position: relative;
  -webkit-tap-highlight-color: transparent;
}

.discover-filters-btn.is-active {
  border-color: #111111;
  background: #111111;
  color: #ffffff;
}

.discover-filters-btn.is-active::after {
  content: '';
  position: absolute;
  top: 6px;
  right: 6px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #ff6b6b;
  border: 1.5px solid #111111;
}

.discover-active-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
}

.discover-chip {
  display: inline-flex;
  align-items: center;
  padding: 5px 10px;
  border-radius: 999px;
  background: var(--ms-soft);
  border: 1px solid var(--ms-border);
  font-size: 12px;
  font-weight: 600;
  color: var(--ms-text);
}

.discover-filter-clear {
  font-size: 13px;
  font-weight: 600;
  margin-left: auto;
}

.discover-filters-scrim {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: rgba(0, 0, 0, 0.45);
  border: 0;
  margin: 0;
  padding: 0;
  cursor: pointer;
}

.discover-filters-scrim[hidden],
.discover-filters-panel[hidden] {
  display: none !important;
}

.discover-filters-panel {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 95;
  width: min(360px, calc(100vw - 24px));
  max-height: min(70vh, 520px);
  display: flex;
  flex-direction: column;
  background: var(--ms-panel);
  border: 1px solid var(--ms-border);
  border-radius: 16px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.14);
  overflow: hidden;
}

.discover-filters-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--ms-border);
}

.discover-filters-title {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
}

.discover-filters-close {
  width: 32px;
  height: 32px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--ms-soft);
  color: var(--ms-text);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

.discover-filters-body {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 12px 16px 8px;
  -webkit-overflow-scrolling: touch;
}

.discover-fieldset {
  margin: 0 0 16px;
  padding: 0;
  border: 0;
}

.discover-fieldset legend {
  margin: 0 0 8px;
  padding: 0;
  font-size: 13px;
  font-weight: 700;
  color: var(--ms-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.discover-option-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.discover-option-grid-2 {
  grid-template-columns: 1fr 1fr;
}

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

.discover-option {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 8px 10px;
  border: 1px solid var(--ms-border);
  border-radius: 999px;
  background: var(--ms-soft);
  font-size: 13px;
  font-weight: 600;
  text-align: center;
  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.discover-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.discover-option.is-on {
  background: #111111;
  border-color: #111111;
  color: #ffffff;
}

.discover-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid var(--ms-border);
  border-radius: 12px;
  background: var(--ms-soft);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.discover-toggle input {
  width: 18px;
  height: 18px;
  margin: 0;
  flex-shrink: 0;
}

.discover-filters-foot {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px 16px;
  border-top: 1px solid var(--ms-border);
  background: var(--ms-panel);
}

.discover-filters-reset {
  flex: 0 0 auto;
}

.discover-filters-apply {
  flex: 1 1 auto;
  min-height: 44px;
}

body.discover-filters-open {
  overflow: hidden;
}

@media (max-width: 820px) {
  .discover-search-row {
    border-radius: 14px;
    padding: 8px;
  }

  .discover-search-btn {
    padding-left: 12px;
    padding-right: 12px;
  }

  .discover-filters-panel {
    position: fixed;
    top: auto;
    right: 0;
    left: 0;
    bottom: 0;
    width: auto;
    max-height: min(85vh, 640px);
    border-radius: 16px 16px 0 0;
    box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.18);
  }

  .discover-option-grid {
    grid-template-columns: 1fr;
  }

  .discover-option-grid-2,
  .discover-option-grid-3 {
    grid-template-columns: 1fr 1fr;
  }

  .discover-filters-foot {
    flex-direction: column-reverse;
    align-items: stretch;
  }

  .discover-filters-apply,
  .discover-filters-reset {
    width: 100%;
    text-align: center;
    justify-content: center;
  }
}

.feed-extras {
  display: contents;
}

.feed-rail {
  position: sticky;
  top: 88px;
}

.home-active-strip {
  display: none;
}

.home-active-block {
  display: none;
}

.feed-rail .collection-grid {
  grid-template-columns: 1fr;
}

.rail-stats {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
}

.rail-people {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  padding: 8px;
}

.rail-more {
  display: block;
  width: 100%;
  margin: 0;
  padding: 10px 16px 14px;
  border: 0;
  background: none;
  appearance: none;
  -webkit-appearance: none;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  color: var(--ms-link);
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.rail-more:hover,
.rail-more:focus-visible {
  color: var(--ms-link);
  text-decoration: underline;
}

body.rail-dialog-lock {
  overflow: hidden;
}

.rail-dialog {
  position: fixed;
  inset: 0;
  z-index: 210;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  padding-top: max(16px, env(safe-area-inset-top, 0px));
  padding-bottom: max(16px, env(safe-area-inset-bottom, 0px));
  background: rgba(8, 8, 8, 0.5);
}

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

.rail-dialog-panel {
  width: min(420px, 100%);
  max-height: min(80vh, 560px);
  display: flex;
  flex-direction: column;
  background: var(--ms-panel);
  border: 1px solid var(--ms-border);
  border-radius: 16px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.2);
  overflow: hidden;
}

.rail-dialog-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--ms-border);
}

.rail-dialog-title {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
}

.rail-dialog-close {
  width: 32px;
  height: 32px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--ms-soft);
  color: var(--ms-text);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

.rail-dialog-copy {
  padding: 16px;
  font-size: 14px;
  line-height: 1.5;
  color: var(--ms-text);
}

.rail-dialog-copy p {
  margin: 0 0 10px;
}

.rail-dialog-copy p:last-child {
  margin-bottom: 0;
  color: var(--ms-muted);
}

.rail-dialog-actions {
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0 16px 16px;
}

.rail-dialog-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  text-decoration: none !important;
  color: inherit;
}

.rail-dialog-row:hover {
  background: var(--ms-soft);
  color: var(--ms-text);
}

.rail-dialog-avatar {
  position: relative;
  flex-shrink: 0;
  display: inline-flex;
}

.rail-dialog-avatar .presence-dot {
  right: 0;
  bottom: 0;
  width: 10px;
  height: 10px;
}

.rail-dialog-copy {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.rail-dialog-copy b {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rail-dialog-row .cool-count {
  flex-shrink: 0;
}

.composer {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 14px;
  margin-bottom: 12px;
  background: var(--ms-panel);
  border: 1px solid var(--ms-border);
  border-radius: 16px;
  position: relative;
}

.composer-close,
.compose-fab,
.compose-scrim {
  display: none;
}

.composer-form {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}

.composer-form textarea.bevel-in {
  width: 100%;
  min-height: 72px;
  resize: vertical;
  box-sizing: border-box;
  font-size: 15px;
  line-height: 1.45;
}

.composer-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.composer-photo {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: auto;
  overflow: hidden;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--ms-border);
  background: var(--ms-soft);
  color: var(--ms-text);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}

.composer-photo input,
.composer-photo input[type="file"] {
  position: absolute !important;
  inset: 0;
  width: 100% !important;
  height: 100% !important;
  min-width: 0 !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 0 !important;
  opacity: 0;
  cursor: pointer;
  font-size: 0;
}

.composer-preview img {
  display: block;
  max-height: 180px;
  width: auto;
  max-width: 100%;
  border-radius: 12px;
}

.feed {
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: transparent;
  border: none;
  overflow: visible;
}

.feed-more-wrap {
  position: relative;
  display: flex;
  justify-content: center;
  padding: 4px 0 8px;
  overflow: hidden;
}

.feed-more-wrap.is-infinite:not(.is-retry) {
  height: 48px;
  min-height: 48px;
  padding: 0;
  margin: 0;
  pointer-events: none;
}

.feed-more-wrap.is-infinite:not(.is-retry) .feed-more-btn {
  position: absolute;
  top: 0;
  left: 0;
  width: 1px;
  height: 1px;
  margin: 0;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.feed-more-wrap.is-busy {
  height: auto;
  min-height: 0;
  padding: 0;
}

.feed-loading {
  overflow-anchor: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.feed-skeleton-stack {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.feed-post.feed-skeleton {
  pointer-events: none;
  animation: none;
}

.feed-skel-head {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 10px;
}

.skel {
  display: block;
  background-color: #e8e8e4;
  background-image: linear-gradient(
    90deg,
    #e8e8e4 0%,
    #f6f6f3 45%,
    #e8e8e4 90%
  );
  background-size: 200% 100%;
  animation: skel-shimmer 1.35s ease-in-out infinite;
  border-radius: 8px;
}

.skel-avatar {
  flex: 0 0 40px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
}

.skel-name {
  width: 112px;
  height: 12px;
}

.skel-name-sm {
  width: 78px;
}

.skel-meta {
  width: 64px;
  height: 10px;
}

.skel-meta-lg {
  width: 88px;
}

.skel-line {
  width: 100%;
  height: 10px;
  margin-top: 8px;
}

.skel-line-mid {
  width: 78%;
}

.skel-line-short {
  width: 52%;
}

.skel-media {
  width: 100%;
  height: 168px;
  margin-top: 14px;
  border-radius: 12px;
}

.skel-media-sm {
  height: 112px;
}

.feed-post-photo.is-loading {
  min-height: 180px;
  background-color: #e8e8e4;
  background-image: linear-gradient(
    90deg,
    #e8e8e4 0%,
    #f6f6f3 45%,
    #e8e8e4 90%
  );
  background-size: 200% 100%;
  animation: skel-shimmer 1.35s ease-in-out infinite;
}

.feed-post-photo.is-loading img {
  opacity: 0;
  min-height: 180px;
}

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

.feed-more-btn {
  min-width: 140px;
}

.feed-empty {
  padding: 28px 16px;
  color: var(--ms-muted);
  text-align: center;
  background: var(--ms-panel);
  border: 1px solid var(--ms-border);
  border-radius: 16px;
}

.feed-post {
  display: flex;
  gap: 12px;
  padding: 14px 16px 16px;
  background: var(--ms-panel);
  border: 1px solid var(--ms-border);
  border-radius: 16px;
  scroll-margin-top: 88px;
}

.feed-post:last-child {
  border-bottom: 1px solid var(--ms-border);
}

.feed-post-main {
  position: relative;
  min-width: 0;
  flex: 1;
  padding-right: 28px;
}

.feed-post-head {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 8px;
  align-items: baseline;
}

.feed-post-head a.table-sub {
  text-decoration: none;
}

.feed-post-head a.table-sub:hover {
  text-decoration: underline;
}

.feed-repost-label {
  margin: 0 0 6px;
  font-size: 12px;
  color: var(--ms-muted);
}

.feed-repost-card {
  margin-top: 4px;
  padding: 10px 12px 12px;
  border: 1px solid var(--ms-border);
  border-radius: 12px;
  background: var(--ms-soft);
  cursor: pointer;
}

.feed-repost-card:hover {
  border-color: var(--ms-text);
}

.feed-repost-gone {
  margin: 8px 0 0;
  font-size: 14px;
  color: var(--ms-muted);
}

.feed-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}

.feed-action-form {
  margin: 0;
}

button.feed-action,
a.feed-action,
span.feed-action {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin: 0;
  padding: 5px 9px;
  border: 1px solid var(--ms-border);
  border-radius: 999px;
  background: var(--ms-panel);
  color: var(--ms-muted);
  font: inherit;
  font-size: 12px;
  line-height: 1;
  text-decoration: none !important;
  cursor: pointer;
  appearance: none;
}

span.feed-action {
  cursor: default;
}

button.feed-action:disabled {
  opacity: 0.65;
  cursor: default;
}

button.feed-action:hover,
a.feed-action:hover {
  color: var(--ms-text);
  border-color: #cfcfc8;
}

button.feed-action.is-on,
a.feed-action.is-on {
  color: #b42318;
  border-color: #f0c4c0;
  background: #fff6f5;
}

button.feed-action[aria-label="Undo repost"].is-on,
button.feed-action.is-on[aria-label="Undo repost"] {
  color: #1f6a3a;
  border-color: #c6e4d0;
  background: #f3fbf6;
}

.feed-action-count {
  font-variant-numeric: tabular-nums;
}

.feed-action.is-copied {
  color: var(--ms-text);
}

.post-page {
  max-width: 720px;
}

.post-back {
  margin: 14px 0 0;
  font-size: 13px;
}

.feed-post-body {
  margin: 8px 0 0;
  font-size: 16px;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
}

.feed-post-body a {
  color: var(--ms-link);
  word-break: break-all;
}

.feed-post-photo {
  display: block;
  margin-top: 12px;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--ms-border);
  background: var(--ms-soft);
}

.feed-post-photo img {
  display: block;
  width: 100%;
  max-height: 520px;
  object-fit: cover;
}

.attached-photo {
  max-width: 420px;
}

.chat-line .chat-photo {
  max-width: 240px;
  margin: 8px 0 4px 0;
}

.chat-photo-preview {
  flex-basis: 100%;
}

.collection-icon-letter {
  font-size: 18px;
  font-weight: 700;
  color: var(--ms-muted);
}

.shout-history-photo {
  margin-top: 8px;
}

.shout-history-photo img {
  max-height: 180px;
}

.shout-history-item {
  padding: 10px 0;
  border-bottom: 1px solid var(--ms-border);
}

.shout-history-item:last-child {
  border-bottom: none;
}

.shout-history-time {
  display: block;
  margin-top: 6px;
  color: var(--ms-muted);
  font-size: 12px;
}

.feed-link-card {
  display: block;
  margin-top: 12px;
  padding: 12px 14px;
  border: 1px solid var(--ms-border);
  border-radius: 12px;
  background: var(--ms-soft);
  text-decoration: none;
  color: inherit;
}

.feed-link-card:hover {
  border-color: var(--ms-text);
}

.feed-link-host {
  display: block;
  font-size: 12px;
  color: var(--ms-muted);
  text-transform: lowercase;
}

.feed-link-url {
  display: block;
  margin-top: 2px;
  font-size: 14px;
  color: var(--ms-text);
  word-break: break-all;
}

.feed-post:target {
  box-shadow: 0 0 0 2px var(--ms-border);
}

.feed-comments {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--ms-border);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.feed-comments-more {
  font-size: 11px;
  color: var(--ms-muted);
}

.feed-comment {
  display: flex;
  gap: 8px;
  align-items: flex-start;
}

.feed-comment-main {
  min-width: 0;
  flex: 1;
  font-size: 13px;
  line-height: 1.4;
}

.feed-comment-main p {
  margin: 2px 0 0;
}

.feed-comment-delete {
  display: inline;
  margin: 0;
}

.feed-comment-form {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-top: 4px;
}

.feed-comment-form .bevel-in {
  flex: 1;
  min-width: 0;
}

.feed-comment-login {
  margin: 0;
  font-size: 12px;
  color: var(--ms-muted);
}

button.link-quiet {
  border: 0;
  background: none;
  padding: 0;
  font: inherit;
  font-size: 11px;
  color: var(--ms-muted);
  cursor: pointer;
}

button.link-quiet:hover {
  color: var(--ms-text);
  text-decoration: underline;
}

.whats-new-list {
  display: flex;
  flex-direction: column;
}

.whats-new-clear {
  margin: 0;
}

.whats-new-row {
  display: flex;
  align-items: stretch;
  border-top: 1px solid var(--ms-border);
}

.whats-new-row:first-child {
  border-top: none;
}

.whats-new-row:hover {
  background: var(--ms-soft);
}

.whats-new-row.is-unread {
  background: #fafaf7;
}

.whats-new-item {
  display: flex;
  flex: 1;
  gap: 12px;
  align-items: flex-start;
  min-width: 0;
  padding: 12px 14px;
  border-top: none;
  text-decoration: none !important;
  color: inherit;
}

.whats-new-item:first-child {
  border-top: none;
}

.whats-new-item:hover {
  background: transparent;
  color: inherit;
}

.whats-new-dismiss-form {
  display: flex;
  align-items: flex-start;
  margin: 0;
  padding: 8px 8px 0 0;
}

.whats-new-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.whats-new-line {
  font-size: 14px;
}

.whats-new-preview {
  font-size: 13px;
  color: var(--ms-muted);
}

.onboard-card {
  margin-bottom: 12px;
}

.onboard-lead,
.onboard-done {
  margin: 0 0 10px;
  color: var(--ms-muted);
  font-size: 13px;
}

.onboard-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.onboard-item {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

.onboard-check {
  flex: 0 0 22px;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  border: 1px solid var(--ms-border);
  background: var(--ms-panel);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
}

.onboard-item.is-done .onboard-check {
  background: #111;
  border-color: #111;
  color: #fff;
}

.onboard-item.is-done .onboard-label {
  color: var(--ms-muted);
  text-decoration: line-through;
}

.onboard-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.onboard-hint {
  font-size: 12px;
  color: var(--ms-muted);
}

.onboard-actions,
.onboard-dismiss {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-top: 12px;
}

.onboard-dismiss {
  margin-top: 14px;
}

.onboard-celebrate,
.onboard-next {
  position: relative;
  text-align: center;
  padding: 8px 4px 4px;
}

.onboard-hero {
  margin: 0 0 6px;
  font-family: "Space Grotesk", system-ui, sans-serif;
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.03em;
  color: var(--ms-text);
}

.onboard-next-list {
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  text-align: left;
}

.onboard-next-list a {
  display: block;
  padding: 10px 12px;
  border: 1px solid var(--ms-border);
  border-radius: 12px;
  background: var(--ms-soft);
  color: var(--ms-text);
  text-decoration: none !important;
  font-weight: 600;
  font-size: 14px;
}

.onboard-next-list a:hover {
  background: var(--ms-panel);
}

.onboard-confetti {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.confetti-piece {
  position: absolute;
  top: -12px;
  width: 8px;
  height: 12px;
  border-radius: 2px;
  animation-name: confetti-fall;
  animation-timing-function: ease-in;
  animation-fill-mode: forwards;
}

@keyframes confetti-fall {
  to {
    transform: translateY(240px) rotate(420deg);
    opacity: 0;
  }
}

.about-donate-note {
  margin: 0 0 16px;
  max-width: 44em;
  font-size: 13px;
  line-height: 1.5;
  color: var(--ms-muted);
}

.about-support-chip {
  margin-top: 14px;
}

.about-stack {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 44em;
}

.about-prose p {
  margin: 0 0 12px;
  font-size: 15px;
  line-height: 1.65;
}

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

.about-list {
  margin: 0;
  padding-left: 1.2em;
}

.about-list li {
  margin: 0 0 10px;
  font-size: 15px;
  line-height: 1.55;
}

.about-list li:last-child {
  margin-bottom: 0;
}

/* Dark theme */
[data-theme="dark"] {
  --ms-orange: #ff9a62;
  --ms-orange-dark: #ffd0b0;
  --ms-link: #ffb078;
  --ms-bg: #120814;
  --ms-panel: #1c1024;
  --ms-soft: #2a1630;
  --ms-border: #5a3060;
  --ms-text: #f6ecff;
  --ms-muted: #c4a0b8;
  --avatar-ring: #8b6cff;
}

[data-theme="dark"] html,
[data-theme="dark"] body {
  background-color: transparent;
  color: var(--ms-text);
}

[data-theme="dark"] .shell,
[data-theme="dark"] .site-header,
[data-theme="dark"] .content {
  background: transparent;
  color: var(--ms-text);
}

[data-theme="dark"] .ms-box,
[data-theme="dark"] .ms-box-body,
[data-theme="dark"] .panel,
[data-theme="dark"] .panel-body,
[data-theme="dark"] .section-bar,
[data-theme="dark"] .composer,
[data-theme="dark"] .feed-post,
[data-theme="dark"] .feed-empty,
[data-theme="dark"] .footer-bar {
  background: rgba(28, 16, 36, 0.88);
  color: var(--ms-text);
}

[data-theme="dark"] .compose-fab {
  background: var(--ms-orange-dark);
  color: var(--ms-bg);
}

[data-theme="dark"] .cookie-consent-inner {
  background: var(--ms-panel);
  border-color: var(--ms-border);
  box-shadow: 0 10px 30px rgba(40, 8, 28, 0.5);
}

.page-messages .dm-new-start {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 16px;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  cursor: pointer;
}

.page-messages .dm-new-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--ms-text);
}

.page-messages .compose-fab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: static;
  z-index: 1;
  width: 44px;
  height: 44px;
  margin: 0;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: #111111;
  color: #ffffff;
  font-size: 28px;
  font-weight: 400;
  line-height: 1;
  box-shadow: none;
}

.page-messages .compose-fab.is-open {
  font-size: 28px;
}

.page-messages .compose-scrim {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 70;
  margin: 0;
  padding: 0;
  border: 0;
  background: rgba(0, 0, 0, 0.4);
  cursor: pointer;
}

.page-messages .compose-scrim.is-open {
  display: block;
}

.dm-friend-picker {
  display: none;
}

.dm-friend-picker.is-open {
  display: block;
  position: fixed;
  box-sizing: border-box;
  left: 12px;
  right: 12px;
  top: max(72px, calc(env(safe-area-inset-top) + 56px));
  z-index: 75;
  max-height: calc(100dvh - 140px);
  overflow: auto;
  margin: 0;
  padding-top: 40px;
  background: var(--ms-panel);
  border: 1px solid var(--ms-border);
  border-radius: 16px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.18);
}

.dm-friend-picker .composer-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: absolute;
  top: 8px;
  right: 8px;
  width: 32px;
  height: 32px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: var(--ms-soft);
  color: var(--ms-text);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

.dm-friend-list {
  display: flex;
  flex-direction: column;
  max-height: min(420px, 55dvh);
  overflow: auto;
}

@media (min-width: 821px) {
  .dm-friend-picker.is-open {
    left: 50%;
    right: auto;
    transform: translateX(-50%);
    width: min(400px, calc(100vw - 48px));
  }
}

[data-theme="dark"] .page-messages .compose-fab {
  background: var(--ms-orange-dark);
  color: var(--ms-bg);
}

[data-theme="dark"] .app-header {
  background: rgba(18, 8, 20, 0.78);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  border-bottom: none;
  color: var(--ms-text);
}

[data-theme="dark"] .app-header .brand-logo img {
  filter: invert(1);
}

[data-theme="dark"] .app-header .header-user,
[data-theme="dark"] .app-header .header-link {
  color: var(--ms-text);
}

[data-theme="dark"] .app-header .header-cta {
  background: var(--ms-orange-dark);
  color: var(--ms-bg) !important;
}

[data-theme="dark"] .app-header .alert-bell {
  --bell-outline: #ffffff;
  color: #ffffff;
  background: transparent;
  border: 1px solid var(--bell-outline);
}

[data-theme="dark"] .app-header .alert-bell-icon {
  filter: none;
}

[data-theme="dark"] .app-header .alert-bell:hover {
  background: rgba(242, 241, 236, 0.1);
}

[data-theme="dark"] .app-header .nav-toggle {
  background: var(--ms-soft);
  color: var(--ms-text);
  border-color: var(--ms-border);
}

[data-theme="dark"] .app-header .nav-toggle:hover,
[data-theme="dark"] .app-header .nav-toggle:focus,
[data-theme="dark"] .app-header .nav-toggle:active,
[data-theme="dark"] .app-header .nav-toggle.is-open {
  background: var(--ms-panel);
  color: var(--ms-text);
}

[data-theme="dark"] .skel,
[data-theme="dark"] .feed-post-photo.is-loading {
  background-color: var(--ms-soft);
  background-image: linear-gradient(
    90deg,
    var(--ms-soft) 0%,
    #3a2044 45%,
    var(--ms-soft) 90%
  );
}

[data-theme="dark"] .nav-shell,
[data-theme="dark"] .sidebar,
[data-theme="dark"] .footer-bar,
[data-theme="dark"] .home-hero,
[data-theme="dark"] .page-hero {
  background: rgba(28, 16, 36, 0.88);
}

[data-theme="dark"] .collection-icon {
  background: #ffffff;
  border-color: #e6e6e2;
}

[data-theme="dark"] button.collection-like,
[data-theme="dark"] a.collection-like {
  background: var(--ms-bg);
  color: var(--ms-muted);
  border-color: var(--ms-border);
}

[data-theme="dark"] button.collection-like.is-liked,
[data-theme="dark"] a.collection-like.is-liked {
  color: #ff8a80;
  border-color: #5a2a28;
  background: #2a1615;
}

[data-theme="dark"] .feed-repost-card {
  background: var(--ms-bg);
}

[data-theme="dark"] button.feed-action,
[data-theme="dark"] a.feed-action,
[data-theme="dark"] span.feed-action {
  background: var(--ms-bg);
  color: var(--ms-muted);
  border-color: var(--ms-border);
}

[data-theme="dark"] button.feed-action.is-on,
[data-theme="dark"] a.feed-action.is-on {
  color: #ff8a80;
  border-color: #5a2a28;
  background: #2a1615;
}

[data-theme="dark"] button.feed-action.is-on[aria-label="Undo repost"] {
  color: #8fd4a8;
  border-color: #2a4a34;
  background: #142018;
}

[data-theme="dark"] .collection-card,
[data-theme="dark"] .pill-stat,
[data-theme="dark"] .counter,
[data-theme="dark"] .bevel-in,
[data-theme="dark"] .nav-btn,
[data-theme="dark"] .theme-btn,
[data-theme="dark"] .nav-toggle,
[data-theme="dark"] .file-pick-btn {
  background: var(--ms-soft);
  color: var(--ms-text);
  border-color: var(--ms-border);
}

[data-theme="dark"] select.bevel-in {
  background-color: var(--ms-bg);
  background-image:
    linear-gradient(45deg, transparent 50%, var(--ms-text) 50%),
    linear-gradient(135deg, var(--ms-text) 50%, transparent 50%);
  background-position:
    calc(100% - 18px) calc(50% - 3px),
    calc(100% - 13px) calc(50% - 3px);
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
}

[data-theme="dark"] .nav-item a {
  color: var(--ms-text);
}

[data-theme="dark"] .nav-item a:hover {
  background: var(--ms-soft);
}

[data-theme="dark"] .bevel-btn,
[data-theme="dark"] .ms-btn {
  background: var(--ms-orange-dark);
  color: var(--ms-bg) !important;
  border-color: var(--ms-orange-dark);
}

[data-theme="dark"] .home-hero h1,
[data-theme="dark"] .page-title,
[data-theme="dark"] .collection-name,
[data-theme="dark"] .panel-title {
  color: var(--ms-text) !important;
}

[data-theme="dark"] a {
  color: var(--ms-link);
}

[data-theme="dark"] #profile-root {
  background: var(--ms-bg) !important;
  color: var(--ms-text) !important;
  --p-bg: var(--ms-bg) !important;
  --p-text: var(--ms-text) !important;
  --p-link: var(--ms-link) !important;
  --p-accent: var(--ms-text) !important;
}

[data-theme="dark"] #profile-root a {
  color: var(--ms-link) !important;
}

[data-theme="dark"] #profile-root .profile-name,
[data-theme="dark"] #profile-root .profile-blurb-label {
  color: var(--ms-text) !important;
}

.page-lead {
  margin: 0 0 16px;
  color: var(--ms-muted);
  font-size: 14px;
}

.crumb {
  margin: 0 0 8px;
  font-size: 13px;
  color: var(--ms-muted);
}

.section-bar a {
  color: inherit;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--ms-panel);
  border: 1px solid var(--ms-border);
  border-radius: 14px;
  overflow: hidden;
  margin: 0 0 16px;
}

.ms-box .data-table {
  margin: 0;
  border: none;
  border-radius: 0;
}

.data-table th,
.data-table td {
  padding: 12px 14px;
  text-align: left;
  vertical-align: top;
}

.data-table th {
  font-size: 12px;
  font-weight: 600;
  color: var(--ms-muted);
  background: var(--ms-soft);
  border-bottom: 1px solid var(--ms-border);
}

.data-table td {
  border-bottom: 1px solid var(--ms-border);
}

.data-table tbody tr:last-child td {
  border-bottom: none;
}

.data-table .num {
  text-align: right;
  white-space: nowrap;
  width: 1%;
}

.table-title {
  font-weight: 600;
}

.table-sub {
  color: var(--ms-muted);
  font-size: 12px;
  margin-top: 2px;
}

.empty-cell {
  color: var(--ms-muted);
  font-style: italic;
}

.lock-tag {
  display: inline-block;
  margin-right: 6px;
  font-size: 11px;
  color: var(--ms-muted);
  border: 1px solid var(--ms-border);
  border-radius: 999px;
  padding: 1px 8px;
}

.forum-post {
  display: grid;
  grid-template-columns: 160px minmax(0, 1fr);
  border: 1px solid var(--ms-border);
  border-radius: 14px;
  overflow: hidden;
  margin: 0 0 12px;
  background: var(--ms-panel);
}

.forum-post-author {
  padding: 16px 14px;
  background: var(--ms-soft);
  border-right: 1px solid var(--ms-border);
  text-align: center;
}

.forum-post-author .user-avatar {
  margin: 0 auto 8px;
}

.forum-post-body {
  position: relative;
  padding: 16px 18px;
  white-space: pre-wrap;
  word-break: break-word;
}

.stack-form label {
  display: block;
  margin: 0 0 14px;
  font-size: 13px;
  font-weight: 500;
}

.stack-form .bevel-in,
.stack-form textarea {
  display: block;
  width: 100%;
  margin-top: 6px;
}

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

.form-card {
  max-width: 440px;
}

.form-foot {
  margin: 16px 0 0;
  color: var(--ms-muted);
  font-size: 13px;
}

.form-legal {
  margin: 12px 0 0;
  color: var(--ms-muted);
  font-size: 12px;
  line-height: 1.4;
}

.compose-row {
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
  align-items: center;
}

.compose-row .bevel-in {
  flex: 1 1 auto;
  min-width: 0;
  width: auto;
}

.chat-shell .chat-log {
  height: 360px;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 14px 16px;
  font-family: inherit;
  font-size: 14px;
  color: var(--ms-text);
  background: var(--ms-soft);
  border: none;
  border-bottom: 1px solid var(--ms-border);
  -webkit-overflow-scrolling: touch;
}

.chat-line {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  margin-bottom: 12px;
  min-width: 0;
  max-width: 100%;
}

.chat-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 8px;
  min-width: 0;
  max-width: 100%;
}

.chat-body {
  max-width: 100%;
  overflow-wrap: anywhere;
  word-break: break-word;
  white-space: pre-wrap;
  line-height: 1.45;
}

.chat-line .chat-photo {
  max-width: min(100%, 280px);
}

.chat-compose {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.chat-compose-main {
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
  align-items: center;
  width: 100%;
}

.chat-compose-main .bevel-in {
  flex: 1 1 auto;
  min-width: 0;
}

.chat-compose-main .bevel-btn,
.chat-compose-main .composer-photo {
  flex: 0 0 auto;
}

#chat-form .composer-preview,
#dm-form .composer-preview {
  width: 100%;
}

.chat-user {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  color: var(--ms-text);
  font-weight: 600;
  text-shadow: none;
}

.chat-time {
  color: var(--ms-muted);
  font-size: 11px;
}

.split-layout {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 14px;
  margin-top: 16px;
}

.feed-item {
  border-top: 1px solid var(--ms-border);
}

.feed-body {
  margin-top: 6px;
  white-space: pre-wrap;
}

.inline-form {
  display: inline;
  margin: 0 0 12px;
}

.inbox-list {
  display: flex;
  flex-direction: column;
}

.inbox-item {
  display: flex;
  align-items: stretch;
  border-bottom: 1px solid var(--ms-border);
  background: var(--ms-panel);
}

.inbox-item:hover,
.inbox-item:has(.inbox-row.is-unread) {
  background: var(--ms-soft);
}

.inbox-item:last-child {
  border-bottom: none;
}

.inbox-item .inbox-row {
  flex: 1;
  min-width: 0;
  border-bottom: none;
  background: transparent;
}

.inbox-hide {
  display: flex;
  align-items: center;
  padding: 0 12px 0 0;
  background: transparent;
}

.inbox-hide-btn,
.inbox-hide-btn.nav-btn {
  font-size: 12px;
  padding: 6px 10px;
  background: transparent;
  border-color: var(--ms-border);
  color: var(--ms-muted);
}

.inbox-hide-btn:hover,
.inbox-hide-btn.nav-btn:hover {
  background: transparent;
  border-color: var(--ms-text);
  color: var(--ms-text);
}

.inbox-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--ms-border);
  text-decoration: none !important;
  color: inherit;
}

.inbox-row:last-child {
  border-bottom: none;
}

.inbox-row:hover,
.inbox-item:hover .inbox-row {
  background: transparent;
}

.inbox-row.is-unread {
  background: transparent;
}

.inbox-copy {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.inbox-time {
  color: var(--ms-muted);
  font-size: 12px;
  white-space: nowrap;
}

.unread-pill {
  display: inline-block;
  margin-left: 6px;
  font-size: 11px;
  background: #111;
  color: #fff;
  border-radius: 999px;
  padding: 1px 7px;
}

.request-list {
  display: flex;
  flex-direction: column;
}

.request-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--ms-border);
}

.request-row:last-child {
  border-bottom: none;
}

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

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

.top8-form {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 10px;
}

.top8-form label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 12px;
  color: var(--ms-muted);
}

.top8-form .form-actions {
  grid-column: 1 / -1;
}

.profile-grid {
  display: grid;
  grid-template-columns: minmax(0, 260px) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

#profile-root,
.profile-page,
.profile-sidebar,
.profile-main {
  min-width: 0;
  max-width: 100%;
}

#profile-root .profile-sidebar {
  width: auto;
  max-width: 100%;
}

#profile-root .ms-box {
  max-width: 100%;
  isolation: isolate;
}

#profile-root .section-bar {
  flex-wrap: wrap;
  min-width: 0;
  overflow-wrap: anywhere;
}

.profile-name {
  font-family: "Space Grotesk", system-ui, sans-serif;
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -0.04em;
  color: var(--p-accent, var(--ms-text));
  overflow-wrap: anywhere;
}

.avatar-frame {
  background: var(--ms-soft);
  border: 1px solid var(--ms-border);
  border-radius: 16px;
  box-shadow: none;
}

#profile-root .profile-avatar-frame {
  width: min(180px, 100%);
  height: auto;
  max-width: 100%;
}

.profile-edit-wrap {
  margin: 10px 0 12px;
  text-align: center;
}

.profile-edit-wrap .bevel-btn {
  text-decoration: none !important;
}

#profile-root .interest-table {
  width: 100%;
  table-layout: fixed;
}

#profile-root .interest-table th,
#profile-root .interest-table td {
  overflow-wrap: anywhere;
  word-break: break-word;
}

#profile-root .photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 12px;
}

#profile-root .photo-card,
#profile-root .photo-card img {
  width: 100%;
}

#profile-root .person-card {
  min-width: 0;
}

#profile-root .person-card b {
  display: block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-shout {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

.profile-shout textarea,
.profile-shout .composer-tools {
  max-width: 100%;
}

.photo-card img {
  border: 1px solid var(--ms-border);
  border-radius: 10px;
  background: var(--ms-soft);
}

.user-avatar {
  background: var(--ms-soft);
  border-color: var(--avatar-ring, #d8d8d4);
}

.homepage-body {
  background: var(--ms-panel);
  padding: 14px 16px;
  max-width: 100%;
  overflow-x: auto;
  overflow-wrap: anywhere;
}

#profile-root .comment-author {
  width: auto;
  max-width: 100%;
}

.comment-list {
  display: flex;
  flex-direction: column;
}

.comment-item {
  display: grid;
  grid-template-columns: minmax(0, 112px) minmax(0, 1fr);
  gap: 12px;
  padding: 14px 16px;
  border-top: 1px solid var(--ms-border);
  align-items: start;
}

.comment-author {
  width: auto;
  max-width: 100%;
  min-width: 0;
  background: transparent !important;
  text-align: left;
  font-size: 13px;
}

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

.comment-row td {
  background: transparent;
}

#profile-root .section-bar,
#profile-root .ms-box,
#profile-root .ms-box-body {
  background: var(--ms-panel);
  color: inherit;
}

#profile-root .section-bar {
  color: var(--ms-text);
}

[data-theme="dark"] #profile-root .section-bar,
[data-theme="dark"] #profile-root .ms-box,
[data-theme="dark"] #profile-root .ms-box-body,
[data-theme="dark"] .homepage-body,
[data-theme="dark"] .user-avatar {
  background: var(--ms-panel);
}

[data-theme="dark"] .comment-author {
  background: transparent !important;
}

[data-theme="dark"] .data-table,
[data-theme="dark"] .forum-post,
[data-theme="dark"] .forum-post-body {
  background: var(--ms-panel);
}

[data-theme="dark"] .data-table th,
[data-theme="dark"] .forum-post-author,
[data-theme="dark"] .chat-shell .chat-log,
[data-theme="dark"] .inbox-item:hover,
[data-theme="dark"] .inbox-item:has(.inbox-row.is-unread) {
  background: var(--ms-soft);
}

[data-theme="dark"] .inbox-hide-btn,
[data-theme="dark"] .inbox-hide-btn.nav-btn {
  background: transparent;
  border-color: var(--ms-border);
  color: var(--ms-muted);
}

[data-theme="dark"] .inbox-hide-btn:hover,
[data-theme="dark"] .inbox-hide-btn.nav-btn:hover {
  background: transparent;
  border-color: var(--ms-text);
  color: var(--ms-text);
}

[data-theme="dark"] .whats-new-row.is-unread,
[data-theme="dark"] .whats-new-item.is-unread,
[data-theme="dark"] .onboard-card,
[data-theme="dark"] .feed-comments {
  background: transparent;
}

[data-theme="dark"] .alert-scrim {
  background: rgba(0, 0, 0, 0.45);
}

[data-theme="dark"] .alert-panel {
  background: var(--ms-panel);
  border-color: var(--ms-border);
  box-shadow: 0 16px 40px rgba(20, 4, 16, 0.55);
}

[data-theme="dark"] .post-sheet-scrim {
  background: rgba(0, 0, 0, 0.45);
}

[data-theme="dark"] .post-sheet {
  background: var(--ms-panel);
  border-color: var(--ms-border);
  box-shadow: 0 16px 40px rgba(20, 4, 16, 0.55);
}

[data-theme="dark"] .alert-row.is-unread,
[data-theme="dark"] .whats-new-row.is-unread {
  background: var(--ms-bg);
}

[data-theme="dark"] .onboard-next-list a {
  background: var(--ms-panel);
  color: var(--ms-text);
  border-color: var(--ms-border);
}

[data-theme="dark"] .onboard-item.is-done .onboard-check {
  background: #f4f4f0;
  border-color: #f4f4f0;
  color: #111;
}

[data-theme="dark"] .nav-toggle:hover,
[data-theme="dark"] .nav-toggle:focus,
[data-theme="dark"] .nav-toggle:active,
[data-theme="dark"] .nav-toggle.is-open {
  background: var(--ms-bg);
  color: var(--ms-text);
}

@media (max-width: 960px) {
  .profile-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (min-width: 821px) {
  .header-shell {
    display: grid;
    grid-template-columns: 200px minmax(0, 1fr);
    gap: 8px;
    align-items: center;
  }

  .app-header {
    padding-top: 12px;
    padding-bottom: 10px;
  }

  .brand-link {
    justify-self: start;
    grid-column: 1;
    padding-left: 12px;
  }

  .brand-logo img {
    height: 62px;
    max-width: calc(100% - 12px);
  }

  .header-actions {
    grid-column: 2;
  }

  .app-nav {
    top: 86px;
  }
}

@media (max-width: 820px) {
  .support-chip-label {
    display: none;
  }

  .support-chip {
    width: 32px;
    padding: 0;
    justify-content: center;
  }

  .support-chip-full {
    width: auto;
    padding: 0 10px 0 8px;
  }

  .support-chip-full .support-chip-label {
    display: inline;
  }

  .header-shell {
    gap: 8px;
  }

  .app-header {
    padding: 8px 12px;
  }

  .brand-link {
    flex: 1 1 auto;
    min-width: 0;
  }

  .nav-toggle-label {
    display: none;
  }

  .nav-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: auto;
    padding: 8px 10px;
    margin: 0;
    border: 1px solid var(--ms-border);
    border-radius: 10px;
    background: var(--ms-panel);
    color: var(--ms-text);
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    appearance: none;
    box-shadow: none;
  }

  .nav-toggle:hover,
  .nav-toggle:focus,
  .nav-toggle:focus-visible,
  .nav-toggle:active,
  .nav-toggle.is-open {
    background: var(--ms-soft);
    color: var(--ms-text);
    box-shadow: none;
    border-color: var(--ms-border);
  }

  .nav-toggle:focus-visible {
    outline: 2px solid var(--ms-text);
    outline-offset: 2px;
  }

  .header-user-name {
    display: none;
  }

  .brand-logo img {
    height: 48px;
  }

  .app-main {
    padding: 12px 12px 32px;
  }

  .app-frame {
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr;
    align-items: stretch;
    min-height: 0;
  }

  .app-nav {
    position: static;
    padding: 0;
  }

  .nav-menu {
    display: none;
  }

  .nav-menu.is-open {
    display: block;
    padding: 8px 12px 12px;
  }

  .feed-layout {
    grid-template-columns: 1fr;
  }

  .feed-extras {
    display: none;
  }

  .compose-fab {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: fixed;
    right: max(16px, env(safe-area-inset-right));
    bottom: max(20px, env(safe-area-inset-bottom));
    z-index: 80;
    width: 56px;
    height: 56px;
    margin: 0;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: var(--ms-text);
    color: var(--ms-panel);
    font-size: 32px;
    font-weight: 400;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.22);
  }

  .compose-fab.is-open {
    font-size: 28px;
  }

  .compose-scrim {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 70;
    margin: 0;
    padding: 0;
    border: 0;
    background: rgba(0, 0, 0, 0.4);
    cursor: pointer;
  }

  .compose-scrim.is-open {
    display: block;
  }

  .feed-home .composer {
    display: none;
  }

  .feed-home .composer.is-open {
    display: flex;
    position: fixed;
    left: 12px;
    right: 12px;
    top: max(72px, calc(env(safe-area-inset-top) + 56px));
    z-index: 75;
    margin: 0;
    padding-top: 40px;
    max-height: calc(100vh - 140px);
    max-height: calc(100dvh - 140px);
    overflow: auto;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.18);
  }

  .composer-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: 8px;
    right: 8px;
    width: 32px;
    height: 32px;
    margin: 0;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: var(--ms-soft);
    color: var(--ms-text);
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
  }

  .feed-post {
    display: grid;
    grid-template-columns: 36px minmax(0, 1fr);
    column-gap: 10px;
    row-gap: 8px;
    align-items: start;
    padding: 12px;
  }

  .feed-avatar,
  .feed-post .skel-avatar {
    grid-column: 1;
    grid-row: 1;
    width: 36px;
  }

  .feed-post .user-avatar-sm,
  .feed-post .skel-avatar {
    width: 36px;
    height: 36px;
  }

  .feed-post-main {
    display: contents;
  }

  .feed-post > .post-menu,
  .feed-post-main > .post-menu {
    grid-column: 2;
    grid-row: 1;
    justify-self: end;
    align-self: start;
    position: relative;
    top: auto;
    right: auto;
    z-index: 3;
  }

  .feed-post-head,
  .feed-repost-label,
  .feed-skel-head {
    grid-column: 2;
    grid-row: 1;
    align-self: center;
    min-width: 0;
    padding-right: 32px;
  }

  .feed-skel-head {
    margin-bottom: 0;
  }

  .feed-post-body,
  .feed-post-photo,
  .feed-link-card,
  .feed-repost-card,
  .feed-repost-gone,
  .feed-actions,
  .feed-comments,
  .feed-post .skel-line,
  .feed-post .skel-media {
    grid-column: 1 / -1;
  }

  .feed-post-body {
    margin-top: 2px;
  }

  .feed-post-photo,
  .feed-link-card,
  .feed-repost-card {
    margin-top: 0;
  }

  .feed-post .skel-line,
  .feed-post .skel-media {
    margin-top: 0;
  }

  .feed-actions {
    justify-content: space-between;
    margin-top: 2px;
    gap: 4px;
  }

  .feed-actions > .feed-action-form,
  .feed-actions > .feed-action {
    flex: 1 1 0;
    min-width: 0;
  }

  .feed-actions .feed-action {
    width: 100%;
    justify-content: center;
    padding: 8px 4px;
  }

  .home-active-block {
    display: block;
    margin: 0 0 10px;
  }

  .home-active-label {
    margin: 0 4px 6px;
    font-size: 13px;
    font-weight: 600;
    color: var(--ms-text);
  }

  .home-active-strip {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 8px 4px 12px;
    margin: 0;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .home-active-strip::-webkit-scrollbar {
    display: none;
  }

  .home-active-person {
    flex: 0 0 auto;
    width: 64px;
    text-align: center;
    text-decoration: none !important;
    color: var(--ms-text);
    font-size: 11px;
    font-weight: 600;
    line-height: 1.2;
  }

  .home-active-avatar {
    position: relative;
    display: inline-flex;
    margin-bottom: 4px;
  }

  .home-active-avatar .presence-dot {
    right: 0;
    bottom: 0;
    width: 9px;
    height: 9px;
  }

  .home-active-name {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .home-active-block .rail-more {
    padding: 4px 4px 8px;
    text-align: left;
    width: auto;
  }

  .nav-list {
    flex-direction: column;
    align-items: stretch;
    padding: 8px 10px 12px;
  }

  .nav-item a,
  .nav-item .nav-btn {
    display: block;
    width: 100%;
    padding: 12px 14px;
    border-radius: 10px;
    min-height: 44px;
    box-sizing: border-box;
  }

  .nav-item-support .support-chip {
    display: inline-flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    width: auto;
  }

  .main-layout {
    grid-template-columns: 1fr;
  }

  .content {
    order: 1;
    padding: 16px;
  }

  .sidebar {
    order: 2;
    border-right: none;
    border-top: 1px solid var(--ms-border);
    padding: 16px;
  }

  .home-grid,
  .collection-grid {
    grid-template-columns: 1fr;
  }

  .home-hero,
  .page-hero {
    padding: 18px 16px;
  }

  .home-hero h1,
  .page-title {
    font-size: 24px;
  }

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

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

  .forum-post-author {
    border-right: none;
    border-bottom: 1px solid var(--ms-border);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 12px;
    text-align: left;
  }

  .forum-post-author .user-avatar {
    margin: 0;
  }

  .comment-item {
    grid-template-columns: 1fr;
  }

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

  .compose-row {
    flex-wrap: nowrap;
  }

  .chat-compose-main {
    flex-wrap: wrap !important;
  }

  .chat-compose-main .bevel-in,
  .chat-compose-main #chat-input,
  .chat-compose-main #dm-input {
    flex: 1 1 100% !important;
    width: 100% !important;
  }

  .chat-shell {
    display: flex;
    flex-direction: column;
    min-width: 0;
  }

  .chat-shell .chat-log,
  .chat-log {
    flex: 1 1 auto;
    height: min(52vh, calc(100vh - 280px)) !important;
    height: min(52dvh, calc(100dvh - 280px)) !important;
    min-height: 160px !important;
    max-height: none;
  }

  .data-table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .data-table th,
  .data-table td {
    padding: 10px 12px;
  }
}

@media (min-width: 481px) {
  .header-actions {
    gap: 8px;
  }
}

@media (max-width: 480px) {
  .header-actions {
    width: auto;
    flex-shrink: 0;
    justify-content: flex-end;
  }

  .header-tools {
    gap: 4px;
  }

  .brand-logo img {
    height: 46px;
    max-width: min(184px, 48vw);
  }

  .collection-card {
    min-height: 0;
  }

  .collection-meta {
    margin-left: 0;
  }

  .feed-post-head .table-sub:first-of-type {
    display: none;
  }
}
