/* ModunWorld — connect.modunos.com
   Branded constellation native · social hub · twin chrome family of Create/Games */

:root,
html[data-mw-theme="dark"] {
  --mw-paper: #060910;
  --mw-paper-2: #090d16;
  --mw-surface: #0c1220;
  --mw-raised: #12182a;
  --mw-ink: #e8ecf6;
  --mw-ink-soft: rgba(200, 210, 235, 0.84);
  --mw-muted: rgba(170, 185, 220, 0.55);
  --mw-line: rgba(112, 128, 230, 0.14);
  --mw-line-strong: rgba(112, 128, 230, 0.32);
  --mw-accent: #7080e6;
  --mw-accent-soft: rgba(112, 128, 230, 0.16);
  --mw-accent-warm: #8a99fa;
  --mw-cta: #5c66d1;
  --mw-cta-hover: #7080e6;
  --mw-on-cta: #0a0c18;
  --mw-top-h: 3.6rem;
  --mw-side-w: 15.5rem;
  --mw-font: "Sora", system-ui, sans-serif;
  --mw-display: "Figtree", "Sora", system-ui, sans-serif;
  --mw-scroll-thumb: rgba(112, 128, 230, 0.4);
  --mw-scroll-thumb-hover: rgba(112, 128, 230, 0.6);
  color-scheme: dark;
  scrollbar-color: var(--mw-scroll-thumb) transparent;
}

html[data-mw-theme="light"] {
  --mw-paper: #f4f5f9;
  --mw-paper-2: #e9ebf2;
  --mw-surface: #ffffff;
  --mw-raised: #eef0f6;
  --mw-ink: #12141c;
  --mw-ink-soft: #3a4050;
  --mw-muted: #6a7080;
  --mw-line: #d5d8e4;
  --mw-line-strong: #b8bcd0;
  --mw-accent: #4752b8;
  --mw-accent-soft: #e0e3f6;
  --mw-accent-warm: #5c66d1;
  --mw-cta: #12141c;
  --mw-cta-hover: #4752b8;
  --mw-on-cta: #ffffff;
  --mw-scroll-thumb: rgba(71, 82, 184, 0.35);
  --mw-scroll-thumb-hover: rgba(71, 82, 184, 0.55);
  color-scheme: light;
}

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

html {
  height: 100%;
  scroll-behavior: smooth;
  scrollbar-gutter: stable;
  scrollbar-width: thin;
}

html::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
html::-webkit-scrollbar-track {
  background: transparent;
}
html::-webkit-scrollbar-thumb {
  background: var(--mw-scroll-thumb);
  border-radius: 999px;
  border: 2px solid transparent;
  background-clip: padding-box;
}
html::-webkit-scrollbar-thumb:hover {
  background: var(--mw-scroll-thumb-hover);
  background-clip: padding-box;
}

body.mw-page {
  margin: 0;
  min-height: 100%;
  font-family: var(--mw-font);
  color: var(--mw-ink);
  background: var(--mw-paper);
  --void-accent: var(--mw-accent);
  --void-accent-deep: var(--mw-cta);
  --void-glow: rgba(112, 128, 230, 0.34);
  --void-line: var(--mw-line);
  --void-muted: var(--mw-muted);
  display: flex;
  flex-direction: column;
  height: 100dvh;
  max-height: 100dvh;
  overflow: hidden;
}

body.mw-page > .void-atmosphere {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

body.mw-page > .mw-top {
  flex-shrink: 0;
  position: relative;
  z-index: 40;
}

body.mw-page > .mw-app {
  flex: 1 1 auto;
  min-height: 0;
  position: relative;
  z-index: 1;
}

body.mw-page .void-atmosphere {
  background:
    radial-gradient(ellipse 70% 45% at 58% -6%, rgba(112, 128, 230, 0.18), transparent 56%),
    radial-gradient(ellipse 42% 32% at 8% 88%, rgba(90, 140, 255, 0.07), transparent 52%),
    linear-gradient(180deg, #060910 0%, var(--mw-paper) 48%, #05070c 100%);
}

html[data-mw-theme="light"] body.mw-page .void-atmosphere {
  background:
    radial-gradient(ellipse 70% 45% at 58% -6%, rgba(71, 82, 184, 0.12), transparent 56%),
    radial-gradient(ellipse 42% 32% at 8% 88%, rgba(71, 82, 184, 0.05), transparent 52%),
    linear-gradient(180deg, #f4f5f9 0%, var(--mw-paper) 50%, #e9ebf2 100%);
}

body.mw-page .void-brand__ai,
body.mw-page .void-brand__sub {
  color: var(--mw-accent-warm);
  text-shadow: 0 0 18px color-mix(in srgb, var(--mw-accent) 35%, transparent);
}

.mw-skip {
  position: absolute;
  left: -999px;
  top: 0;
  z-index: 100;
  padding: 0.5rem 0.75rem;
  background: var(--mw-cta);
  color: var(--mw-on-cta);
}
.mw-skip:focus {
  left: 0.75rem;
  top: 0.75rem;
}

.mw-top {
  position: sticky;
  top: 0;
  z-index: 40;
}

.mw-top__actions {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.mw-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
}

.mw-brand .void-brand__mark {
  width: 36px;
  height: 36px;
}

.mw-brand__name {
  font-family: var(--mw-display);
  font-weight: 750;
  font-size: 1.2rem;
  letter-spacing: -0.035em;
}

.void-brand__menu {
  appearance: none;
  border: 0;
  background: transparent;
  padding: 0.15rem;
  margin: 0;
  border-radius: 9px;
  display: none;
  place-items: center;
  cursor: pointer;
  color: inherit;
  line-height: 0;
}
.void-brand__menu:hover {
  background: var(--mw-accent-soft);
}
.void-brand__menu:focus-visible {
  outline: 2px solid var(--mw-accent);
  outline-offset: 2px;
}

.void-brand__home {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  color: inherit;
  text-decoration: none;
}

.void-brand__mark--home {
  display: block;
}

.mw-rail-scrim {
  display: none;
}

body.mw-page[data-signed="1"] .mw-signin,
body.mw-page[data-signed="1"] .mw-signup,
body.mw-page[data-guest-mode="1"] .mw-signin,
body.mw-page[data-guest-mode="1"] .mw-signup {
  display: none !important;
}

@keyframes mw-rise {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* —— App shell —— */
.mw-app {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: var(--mw-side-w) 1fr;
  grid-template-rows: minmax(0, 1fr);
  min-height: 0;
  height: 100%;
  background:
    radial-gradient(ellipse 70% 45% at 62% -8%, rgba(112, 128, 230, 0.09), transparent 55%),
    var(--mw-paper);
  transition: grid-template-columns 0.38s cubic-bezier(0.22, 1, 0.36, 1);
}

.mw-app[hidden],
.mw-settings[hidden],
.mw-home[hidden],
.mw-feed[hidden],
.mw-profile[hidden],
.mw-groups[hidden],
.mw-gate[hidden],
.mw-soon-pane[hidden],
.mw-home__signed[hidden],
.mw-profile__stage[hidden],
.mw-profile__edit[hidden],
.mw-profile__vis[hidden],
.mw-profile__private[hidden],
.mw-profile__toast[hidden],
.mw-onboard[hidden] {
  display: none !important;
}

.mw-sidebar {
  display: flex;
  flex-direction: column;
  min-height: 0;
  height: 100%;
  max-height: 100%;
  overflow: hidden;
  border-right: 1px solid var(--mw-line);
  background: color-mix(in srgb, var(--mw-paper-2) 90%, transparent);
}

.mw-sidebar__head {
  padding: 1rem 1rem 0.5rem;
  flex-shrink: 0;
}

.mw-sidebar__title {
  margin: 0;
  font-family: var(--mw-display);
  font-size: 1.2rem;
  font-weight: 750;
  letter-spacing: -0.02em;
}

.mw-nav {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding: 0.35rem 0.65rem;
  flex-shrink: 0;
  overflow-y: auto;
  min-height: 0;
}

.mw-nav__btn {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--mw-ink-soft);
  text-align: left;
  padding: 0.55rem 0.75rem;
  border-radius: 10px;
  font-family: var(--mw-font);
  font-size: 0.92rem;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  transition: background 0.18s ease, color 0.18s ease;
}
.mw-nav__btn:hover {
  background: var(--mw-accent-soft);
  color: var(--mw-ink);
}
.mw-nav__btn.is-active {
  background: var(--mw-accent-soft);
  color: var(--mw-accent-warm);
  font-weight: 600;
}
.mw-nav__btn:focus-visible {
  outline: 2px solid var(--mw-accent);
  outline-offset: 1px;
}

.mw-soon-pill {
  font-size: 0.65rem;
  font-weight: 650;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.15rem 0.4rem;
  border-radius: 999px;
  background: rgba(138, 153, 250, 0.12);
  color: var(--mw-muted);
  border: 1px solid rgba(138, 153, 250, 0.2);
}

.mw-sidebar__mid {
  flex: 1 1 auto;
  min-height: 0.5rem;
  padding: 0.5rem 1rem;
}

.mw-sidebar__hint {
  margin: 0;
  font-size: 0.78rem;
  color: var(--mw-muted);
}

.mw-sidebar__foot {
  flex-shrink: 0;
  padding: 0.65rem;
  border-top: 1px solid var(--mw-line);
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.mw-out-link {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  padding: 0.55rem 0.7rem;
  border-radius: 10px;
  text-decoration: none;
  color: inherit;
  border: 1px solid transparent;
  transition: background 0.18s ease, border-color 0.18s ease;
}
.mw-out-link:hover {
  background: var(--mw-accent-soft);
  border-color: var(--mw-line);
}
.mw-out-link__label {
  font-size: 0.88rem;
  font-weight: 600;
}
.mw-out-link__sub {
  font-size: 0.72rem;
  color: var(--mw-muted);
}

.mw-settings-btn {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--mw-ink-soft);
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.55rem 0.7rem;
  border-radius: 10px;
  font-family: var(--mw-font);
  font-size: 0.88rem;
  cursor: pointer;
  width: 100%;
}
.mw-settings-btn:hover {
  background: var(--mw-accent-soft);
  color: var(--mw-ink);
}

.mw-workspace {
  min-height: 0;
  height: 100%;
  overflow: auto;
  scrollbar-gutter: stable;
  position: relative;
}

/* Settings overlay */
.mw-settings {
  position: absolute;
  inset: 0;
  z-index: 20;
  background: color-mix(in srgb, var(--mw-paper) 96%, transparent);
  padding: 1.25rem 1.5rem 2rem;
  animation: mw-rise 0.35s ease both;
}
.mw-settings__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 1.25rem;
}
.mw-settings__eyebrow {
  margin: 0 0 0.25rem;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--mw-accent);
  font-weight: 600;
}
.mw-settings__title {
  margin: 0;
  font-family: var(--mw-display);
  font-size: 1.45rem;
  font-weight: 750;
}
.mw-icon-btn {
  appearance: none;
  border: 1px solid var(--mw-line);
  background: var(--mw-raised);
  color: var(--mw-ink);
  width: 2.1rem;
  height: 2.1rem;
  border-radius: 9px;
  cursor: pointer;
}
.mw-settings__block {
  margin-bottom: 1.5rem;
  max-width: 28rem;
}
.mw-settings__block h3 {
  margin: 0 0 0.35rem;
  font-size: 0.95rem;
}
.mw-settings__lede,
.mw-settings__soon {
  margin: 0 0 0.75rem;
  font-size: 0.88rem;
  line-height: 1.5;
  color: var(--mw-ink-soft);
}
.mw-settings__radios {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}
.mw-settings__radios label {
  font-size: 0.9rem;
  cursor: pointer;
}

/* Home */
.mw-home {
  padding: 1.75rem 1.5rem 2.5rem;
  animation: mw-rise 0.5s ease both;
  max-width: 52rem;
}

.mw-home__eyebrow,
.mw-browse__eyebrow,
.mw-gate__eyebrow,
.mw-onboard__tag,
.mw-home__signed-tag {
  margin: 0 0 0.65rem;
  font-size: 0.75rem;
  font-weight: 650;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--mw-accent);
}

.mw-home__title,
.mw-browse__title,
.mw-gate__title {
  margin: 0 0 0.75rem;
  font-family: var(--mw-display);
  font-size: clamp(1.75rem, 4vw, 2.45rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.08;
}
.mw-gate__title em {
  font-style: normal;
  color: var(--mw-accent-warm);
}

.mw-home__lede,
.mw-browse__lede,
.mw-gate__lede {
  margin: 0 0 1.15rem;
  font-size: 1rem;
  line-height: 1.55;
  color: var(--mw-ink-soft);
  max-width: 36rem;
}

.mw-home__cta,
.mw-gate__cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-bottom: 1.75rem;
}

body.mw-page[data-signed="1"] .mw-home__cta,
body.mw-page[data-guest-mode="1"] .mw-home__cta {
  display: none;
}

.mw-home__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem;
  margin-bottom: 1.5rem;
}

.mw-rail-card {
  appearance: none;
  border: 1px solid var(--mw-line);
  background: color-mix(in srgb, var(--mw-raised) 80%, transparent);
  border-radius: 14px;
  padding: 1.1rem 1.15rem 1.2rem;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
  animation: mw-rise 0.55s ease both;
}
.mw-rail-card:nth-child(2) { animation-delay: 0.05s; }
.mw-rail-card:nth-child(3) { animation-delay: 0.1s; }
.mw-rail-card:nth-child(4) { animation-delay: 0.15s; }
.mw-rail-card:hover:not(.mw-rail-card--soon) {
  border-color: var(--mw-line-strong);
  background: var(--mw-accent-soft);
  transform: translateY(-2px);
}
.mw-rail-card--soon {
  cursor: default;
  opacity: 0.72;
}
.mw-rail-card__tag {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 650;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--mw-accent-warm);
  margin-bottom: 0.45rem;
}
.mw-rail-card__name {
  margin: 0 0 0.35rem;
  font-family: var(--mw-display);
  font-size: 1.08rem;
  font-weight: 700;
}
.mw-rail-card__lede {
  margin: 0;
  font-size: 0.86rem;
  line-height: 1.45;
  color: var(--mw-ink-soft);
}

.mw-home__signed {
  border-top: 1px solid var(--mw-line);
  padding-top: 1.35rem;
  animation: mw-rise 0.45s ease both;
}
.mw-home__signed-title {
  margin: 0 0 0.4rem;
  font-family: var(--mw-display);
  font-size: 1.25rem;
  font-weight: 700;
}
.mw-home__signed-lede {
  margin: 0 0 0.9rem;
  font-size: 0.92rem;
  color: var(--mw-ink-soft);
}
.mw-home__signed-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

/* Feed / soon / browse */
.mw-feed,
.mw-soon-pane,
.mw-profile {
  padding: 1.5rem 1.5rem 2.5rem;
  animation: mw-rise 0.45s ease both;
  max-width: 44rem;
}

.mw-browse__head {
  margin-bottom: 0.35rem;
}

.mw-feed__list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 1.25rem;
}

.mw-feed-card {
  border: 1px solid var(--mw-line);
  border-radius: 14px;
  padding: 1rem 1.1rem;
  background: color-mix(in srgb, var(--mw-surface) 88%, transparent);
}
.mw-feed-card__meta {
  margin: 0 0 0.35rem;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--mw-muted);
}
.mw-feed-card__title {
  margin: 0 0 0.3rem;
  font-family: var(--mw-display);
  font-size: 1.05rem;
  font-weight: 700;
}
.mw-feed-card__body {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.45;
  color: var(--mw-ink-soft);
}
.mw-feed-card__link {
  display: inline-block;
  margin-top: 0.65rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--mw-accent-warm);
  text-decoration: none;
}
.mw-feed-card__link:hover {
  text-decoration: underline;
}

/* Gate */
.mw-gate {
  max-width: 34rem;
}
.mw-gate__note {
  margin: 0.65rem 0 0;
  font-size: 0.82rem;
  color: var(--mw-muted);
}

/* Profile — cover · media · nodes */
.mw-profile {
  max-width: 48rem;
}

.mw-onboard {
  border: 1px solid var(--mw-line-strong);
  background:
    linear-gradient(145deg, rgba(112, 128, 230, 0.14), rgba(8, 12, 22, 0.35)),
    var(--mw-accent-soft);
  border-radius: 16px;
  padding: 1.1rem 1.2rem 1.15rem;
  margin-bottom: 1.2rem;
  animation: mw-rise 0.4s ease both;
}
.mw-onboard__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}
.mw-onboard__x {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--mw-muted);
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
  padding: 0.1rem 0.35rem;
  border-radius: 6px;
}
.mw-onboard__x:hover {
  color: var(--mw-ink);
  background: rgba(255, 255, 255, 0.06);
}
.mw-onboard__title {
  margin: 0.2rem 0 0.4rem;
  font-family: var(--mw-display);
  font-size: 1.28rem;
  font-weight: 750;
  letter-spacing: -0.02em;
}
.mw-onboard__lede {
  margin: 0 0 0.85rem;
  font-size: 0.9rem;
  line-height: 1.45;
  color: var(--mw-ink-soft);
}
.mw-onboard__steps {
  list-style: none;
  margin: 0 0 0.95rem;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.mw-onboard__step {
  appearance: none;
  width: 100%;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-align: left;
  cursor: pointer;
  border: 1px solid var(--mw-line);
  background: rgba(8, 12, 22, 0.35);
  border-radius: 12px;
  padding: 0.65rem 0.75rem;
  color: inherit;
  font: inherit;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.mw-onboard__step:hover,
.mw-onboard__step:focus-visible {
  border-color: rgba(125, 180, 255, 0.45);
  background: rgba(50, 117, 255, 0.1);
}
.mw-onboard__step.is-done {
  border-color: rgba(0, 229, 204, 0.28);
}
.mw-onboard__step-n {
  flex: 0 0 auto;
  width: 1.65rem;
  height: 1.65rem;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.78rem;
  font-weight: 700;
  background: rgba(50, 117, 255, 0.22);
  border: 1px solid rgba(125, 180, 255, 0.35);
  color: #e8f0ff;
}
.mw-onboard__step.is-done .mw-onboard__step-n {
  background: rgba(0, 229, 204, 0.18);
  border-color: rgba(0, 229, 204, 0.4);
  color: #9ef5e8;
}
.mw-onboard__step-body {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  min-width: 0;
}
.mw-onboard__step-body strong {
  font-size: 0.9rem;
  font-weight: 650;
}
.mw-onboard__step-body em {
  font-style: normal;
  font-size: 0.76rem;
  color: var(--mw-muted);
}
.mw-onboard__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}
.mw-onboard__actions .void-btn {
  text-decoration: none;
}
@media (max-width: 640px) {
  .mw-onboard {
    padding: 0.95rem 0.95rem 1rem;
  }
  .mw-onboard__actions .void-btn {
    flex: 1 1 auto;
    justify-content: center;
  }
}

.mw-cover {
  margin-bottom: 1.25rem;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--mw-line);
  background: var(--mw-surface);
  animation: mw-rise 0.45s ease both;
}

.mw-cover__banner {
  appearance: none;
  display: block;
  width: 100%;
  height: 9.5rem;
  border: 0;
  padding: 0;
  margin: 0;
  cursor: default;
  position: relative;
  background:
    var(--mw-banner-img, none) center / cover no-repeat,
    linear-gradient(
      125deg,
      color-mix(in srgb, var(--mw-accent) 42%, #0a0e18) 0%,
      #0a0e18 55%,
      color-mix(in srgb, var(--mw-accent) 22%, #12182a) 100%
    );
  transition: filter 0.2s ease;
}
.mw-cover__banner.is-editable {
  cursor: pointer;
}
.mw-cover__banner.is-editable:hover {
  filter: brightness(1.06);
}
.mw-cover__banner-hint {
  position: absolute;
  right: 0.75rem;
  bottom: 0.65rem;
  font-size: 0.72rem;
  font-weight: 650;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.88);
  background: rgba(8, 10, 18, 0.45);
  padding: 0.28rem 0.55rem;
  border-radius: 999px;
  opacity: 0;
  transition: opacity 0.18s ease;
}
.mw-cover__banner.is-editable:hover .mw-cover__banner-hint,
.mw-cover__banner.is-editable:focus-visible .mw-cover__banner-hint {
  opacity: 1;
}
.mw-cover__banner:focus-visible {
  outline: 2px solid var(--mw-accent);
  outline-offset: -2px;
}

.mw-cover__row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.85rem 1.1rem;
  align-items: end;
  padding: 0 1.15rem 1.15rem;
  margin-top: -2.4rem;
  position: relative;
  z-index: 1;
}

.mw-cover__avatar {
  appearance: none;
  width: 5.25rem;
  height: 5.25rem;
  border-radius: 50%;
  border: 3px solid var(--mw-paper);
  padding: 0;
  margin: 0;
  cursor: default;
  position: relative;
  background: var(--mw-accent);
  background-image: var(--mw-avatar-img, none);
  background-size: cover;
  background-position: center;
  color: var(--mw-on-cta);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  transition: transform 0.2s ease;
}
.mw-cover__avatar.is-editable {
  cursor: pointer;
}
.mw-cover__avatar.is-editable:hover {
  transform: translateY(-2px);
}
.mw-cover__avatar:focus-visible {
  outline: 2px solid var(--mw-accent);
  outline-offset: 2px;
}
.mw-cover__avatar-letter {
  font-family: var(--mw-display);
  font-size: 1.85rem;
  font-weight: 800;
  line-height: 5.25rem;
  display: block;
  text-align: center;
}
.mw-cover__avatar.has-image .mw-cover__avatar-letter {
  display: none;
}
.mw-cover__avatar-hint {
  position: absolute;
  left: 50%;
  bottom: 0.35rem;
  transform: translateX(-50%);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #fff;
  background: rgba(8, 10, 18, 0.55);
  padding: 0.15rem 0.4rem;
  border-radius: 999px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease;
}
.mw-cover__avatar.is-photo-focus {
  box-shadow: 0 0 0 3px rgba(125, 180, 255, 0.55), 0 0 28px rgba(80, 140, 255, 0.35);
  transform: scale(1.03);
  transition: box-shadow 0.25s ease, transform 0.25s ease;
}

.mw-cover__avatar.is-editable:hover .mw-cover__avatar-hint {
  opacity: 1;
}

.mw-cover__identity {
  min-width: 0;
  padding-bottom: 0.15rem;
}
.mw-profile__display {
  margin: 0 0 0.2rem;
  font-family: var(--mw-display);
  font-size: clamp(1.35rem, 3vw, 1.7rem);
  font-weight: 800;
  letter-spacing: -0.025em;
}
.mw-profile__meta {
  margin: 0 0 0.45rem;
  font-size: 0.86rem;
  color: var(--mw-muted);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.15rem 0;
}
.mw-profile__dot {
  margin: 0 0.35rem;
}
.mw-profile__pub {
  color: var(--mw-accent-warm);
  font-weight: 600;
}
.mw-profile__bio {
  margin: 0;
  font-size: 0.94rem;
  line-height: 1.5;
  color: var(--mw-ink-soft);
  max-width: 32rem;
}

.mw-cover__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  justify-content: flex-end;
  align-items: center;
  padding-bottom: 0.1rem;
}
.mw-cover__actions .void-btn {
  text-decoration: none;
}

.mw-profile__toast {
  margin: 0 0 0.85rem;
  font-size: 0.86rem;
  color: var(--mw-accent-warm);
  animation: mw-rise 0.25s ease both;
}

.mw-profile__edit,
.mw-profile__vis {
  border: 1px solid var(--mw-line);
  border-radius: 14px;
  padding: 1.1rem 1.15rem;
  margin-bottom: 1.15rem;
  background: var(--mw-surface);
  max-width: 30rem;
  animation: mw-rise 0.3s ease both;
}
.mw-profile__edit-title {
  margin: 0 0 0.85rem;
  font-family: var(--mw-display);
  font-size: 1.05rem;
  font-weight: 700;
}
.mw-field {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  margin-bottom: 0.85rem;
  font-size: 0.82rem;
  font-weight: 550;
  color: var(--mw-muted);
}
.mw-field input[type="text"],
.mw-field textarea,
.mw-field select {
  appearance: none;
  border: 1px solid var(--mw-line);
  background: var(--mw-paper);
  color: var(--mw-ink);
  border-radius: 10px;
  padding: 0.55rem 0.7rem;
  font-family: var(--mw-font);
  font-size: 0.92rem;
  font-weight: 400;
}
.mw-field textarea {
  resize: vertical;
  min-height: 4.5rem;
}
.mw-field--inline {
  max-width: 8rem;
}
.mw-field--inline input[type="color"] {
  height: 2.4rem;
  padding: 0.15rem;
  cursor: pointer;
}
.mw-field__hint {
  margin: -0.15rem 0 0.85rem;
  font-size: 0.78rem;
  color: var(--mw-muted);
  line-height: 1.4;
}
.mw-profile__edit-actions {
  display: flex;
  gap: 0.55rem;
  flex-wrap: wrap;
}
.mw-profile__edit-status {
  margin: 0.75rem 0 0;
  font-size: 0.85rem;
  color: var(--mw-accent-warm);
}

.mw-vis-sections {
  border: 0;
  margin: 0 0 1rem;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}
.mw-vis-sections legend {
  font-size: 0.82rem;
  font-weight: 550;
  color: var(--mw-muted);
  margin-bottom: 0.45rem;
  padding: 0;
}
.mw-vis-sections label {
  font-size: 0.9rem;
  font-weight: 400;
  color: var(--mw-ink-soft);
  display: flex;
  align-items: center;
  gap: 0.45rem;
  cursor: pointer;
}

.mw-profile__private {
  margin-bottom: 1rem;
  padding: 1rem 0;
  border-top: 1px solid var(--mw-line);
}

.mw-profile__nodes {
  display: flex;
  flex-direction: column;
  gap: 1.35rem;
}
.mw-node-block {
  border-top: 1px solid var(--mw-line);
  padding-top: 1rem;
  transition: opacity 0.2s ease;
}
.mw-node-block.is-dim {
  opacity: 0.55;
}
.mw-node-block__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.7rem;
}
.mw-node-block__head h3 {
  margin: 0;
  font-family: var(--mw-display);
  font-size: 1.05rem;
  font-weight: 700;
}
.mw-node-block__link {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--mw-accent-warm);
  text-decoration: none;
}
.mw-node-block__link:hover {
  text-decoration: underline;
}
.mw-node-block__scroll {
  display: flex;
  gap: 0.65rem;
  overflow-x: auto;
  padding-bottom: 0.35rem;
  scrollbar-width: thin;
  scroll-snap-type: x proximity;
}

.mw-node-card {
  flex: 0 0 auto;
  width: 11.5rem;
  scroll-snap-align: start;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 0.85rem 0.9rem;
  border-radius: 12px;
  border: 1px solid var(--mw-line);
  background: color-mix(in srgb, var(--mw-raised) 88%, transparent);
  text-decoration: none;
  color: inherit;
  transition: border-color 0.18s ease, background 0.18s ease;
}
a.mw-node-card:hover {
  border-color: var(--mw-line-strong);
  background: var(--mw-accent-soft);
}
.mw-node-card__icon {
  font-size: 1.05rem;
  line-height: 1;
  opacity: 0.9;
}
.mw-node-card__name {
  font-family: var(--mw-display);
  font-size: 0.92rem;
  font-weight: 700;
  line-height: 1.25;
}
.mw-node-card__meta {
  font-size: 0.72rem;
  color: var(--mw-muted);
}
.mw-node-card__pub {
  margin-top: 0.35rem;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.72rem;
  color: var(--mw-muted);
  cursor: pointer;
}
.mw-node-card__pub input {
  accent-color: var(--mw-accent);
}

.mw-empty-note {
  margin: 0;
  font-size: 0.88rem;
  color: var(--mw-muted);
  line-height: 1.45;
}

/* Embed */
body.mw-page--embed {
  min-height: 100%;
  height: 100%;
  overflow: hidden;
}
html:has(body.mw-page--embed) {
  height: 100%;
}
body.mw-page--embed .mw-top,
body.mw-page--embed .void-atmosphere,
body.mw-page--embed .void-top {
  display: none !important;
}
body.mw-page--embed .mw-app {
  min-height: 100%;
  height: 100%;
  --mw-top-h: 0px;
  padding-top: 0.55rem;
}

/* Narrow — Phase H mark=menu (match Create stacking so fixed rail paints above scrim) */
@media (max-width: 900px) {
  .void-brand__menu {
    display: grid;
  }
  .void-brand__mark--home {
    display: none;
  }

  .mw-app {
    grid-template-columns: 1fr;
  }

  body.mw-page:not(.mw-page--embed) > .mw-app {
    z-index: auto;
  }

  .mw-sidebar {
    position: fixed;
    top: var(--mw-top-h, 3.6rem);
    left: 0;
    bottom: 0;
    width: min(17.5rem, 88vw);
    height: auto;
    max-height: none;
    z-index: 55;
    transform: translateX(-105%);
    transition: transform 0.34s cubic-bezier(0.22, 1, 0.36, 1);
    box-shadow: 12px 0 40px rgba(0, 0, 0, 0.35);
    pointer-events: none;
    overflow: auto;
  }
  body.mw-page.rail-open:not(.mw-page--embed) .mw-sidebar {
    transform: none;
    pointer-events: auto;
  }

  .mw-rail-scrim {
    display: block;
    position: fixed;
    inset: var(--mw-top-h, 3.6rem) 0 0;
    z-index: 45;
    background: rgba(4, 6, 12, 0.55);
    border: 0;
    padding: 0;
    cursor: pointer;
  }
  .mw-rail-scrim[hidden] {
    display: none !important;
  }

  .mw-home__grid {
    grid-template-columns: 1fr;
  }

  .mw-cover__banner {
    height: 7.5rem;
  }
  .mw-cover__row {
    grid-template-columns: auto 1fr;
    margin-top: -1.85rem;
  }
  .mw-cover__actions {
    grid-column: 1 / -1;
    justify-content: flex-start;
  }
  .mw-cover__avatar {
    width: 4.5rem;
    height: 4.5rem;
  }
  .mw-cover__avatar-letter {
    font-size: 1.55rem;
    line-height: 4.5rem;
  }
}

/* —— Groups (Discord-class inner rail inside ModunWorld) —— */
.mw-groups {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  position: relative;
}
.mw-groups__shell {
  display: flex;
  flex: 1 1 auto;
  min-height: 0;
  height: 100%;
}
.mw-groups__shell[hidden],
.mw-groups__gate[hidden],
.mw-groups__room[hidden],
.mw-groups__lobby[hidden],
.mw-groups__create[hidden],
.mw-gmembers[hidden] {
  display: none !important;
}

.mw-gstack {
  flex: 0 0 4.25rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.45rem;
  padding: 0.75rem 0.45rem;
  border-right: 1px solid var(--mw-line);
  background: rgba(6, 9, 16, 0.55);
  overflow-y: auto;
}
.mw-gstack__list {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  width: 100%;
  align-items: center;
}
.mw-gstack__home,
.mw-gstack__add,
.mw-gstack__pill {
  appearance: none;
  width: 2.85rem;
  height: 2.85rem;
  border-radius: 14px;
  border: 1px solid var(--mw-line);
  background: var(--mw-raised);
  color: var(--mw-ink);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: border-radius 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}
.mw-gstack__home.is-active,
.mw-gstack__pill.is-active {
  border-radius: 10px;
  border-color: var(--mw-line-strong);
  background: var(--mw-accent-soft);
  color: var(--mw-accent-warm);
}
.mw-gstack__pill {
  font-size: 0.78rem;
  letter-spacing: -0.02em;
}
.mw-gstack__add {
  margin-top: auto;
  border-radius: 50%;
  color: var(--mw-accent-warm);
  font-size: 1.35rem;
  line-height: 1;
}
.mw-gstack__home:hover,
.mw-gstack__add:hover,
.mw-gstack__pill:hover {
  border-color: var(--mw-line-strong);
}

.mw-groups__main {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
}
.mw-groups__lobby {
  padding: 1.35rem 1.5rem 2rem;
  overflow: auto;
}
.mw-browse__head--sub {
  margin-top: 1.75rem;
}
.mw-browse__title--sm {
  font-size: 1.15rem;
}
.mw-groups__mine,
.mw-groups__discover {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr));
  gap: 0.75rem;
  margin-top: 0.85rem;
}
.mw-gcard {
  appearance: none;
  text-align: left;
  border: 1px solid var(--mw-line);
  background: var(--mw-surface);
  border-radius: 14px;
  padding: 0.95rem 1rem;
  color: inherit;
  font: inherit;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.mw-gcard:hover {
  border-color: var(--mw-line-strong);
  background: var(--mw-raised);
}
.mw-gcard__name {
  margin: 0;
  font-weight: 650;
  font-size: 0.98rem;
}
.mw-gcard__meta {
  margin: 0;
  font-size: 0.76rem;
  color: var(--mw-muted);
}
.mw-gcard__lede {
  margin: 0;
  font-size: 0.84rem;
  color: var(--mw-ink-soft);
  line-height: 1.4;
}
.mw-gcard--join .mw-gcard__name::after {
  content: none;
}
.mw-groups__empty {
  margin: 0.5rem 0 0;
  font-size: 0.88rem;
  color: var(--mw-muted);
}

.mw-groups__room {
  display: flex;
  flex: 1 1 auto;
  min-height: 0;
  height: 100%;
}
.mw-gchan {
  flex: 0 0 14.5rem;
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--mw-line);
  background: rgba(10, 14, 24, 0.55);
  min-height: 0;
}
.mw-gchan__head {
  padding: 0.95rem 0.95rem 0.65rem;
  border-bottom: 1px solid var(--mw-line);
}
.mw-gchan__title {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  font-family: var(--mw-display);
}
.mw-gchan__desc {
  margin: 0.25rem 0 0;
  font-size: 0.74rem;
  color: var(--mw-muted);
  line-height: 1.35;
}
.mw-gchan__label {
  margin: 0.75rem 0.95rem 0.3rem;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--mw-muted);
}
.mw-gchan__list {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding: 0 0.45rem;
  overflow: auto;
  flex: 1 1 auto;
}
.mw-gchan__btn {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--mw-ink-soft);
  font: inherit;
  font-size: 0.88rem;
  text-align: left;
  padding: 0.4rem 0.55rem;
  border-radius: 8px;
  cursor: pointer;
}
.mw-gchan__btn:hover {
  background: rgba(112, 128, 230, 0.1);
  color: var(--mw-ink);
}
.mw-gchan__btn.is-active {
  background: var(--mw-accent-soft);
  color: var(--mw-ink);
  font-weight: 600;
}
.mw-gchan__btn::before {
  content: "#";
  margin-right: 0.25rem;
  color: var(--mw-muted);
  font-weight: 500;
}
.mw-gchan__foot {
  padding: 0.65rem 0.75rem 0.85rem;
  border-top: 1px solid var(--mw-line);
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.mw-gchan__action {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--mw-accent-warm);
  font: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  text-align: left;
  padding: 0.35rem 0.4rem;
  border-radius: 6px;
  cursor: pointer;
}
.mw-gchan__action:hover {
  background: rgba(112, 128, 230, 0.1);
}
.mw-gchan__action[hidden] {
  display: none !important;
}

.mw-gchat {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  min-height: 0;
  background: var(--mw-paper-2);
}
.mw-gchat__head {
  padding: 0.85rem 1.15rem;
  border-bottom: 1px solid var(--mw-line);
}
.mw-gchat__title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
}
.mw-gchat__topic {
  margin: 0.2rem 0 0;
  font-size: 0.78rem;
  color: var(--mw-muted);
}
.mw-gchat__messages {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding: 1rem 1.15rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.mw-gmsg {
  display: grid;
  grid-template-columns: 2.25rem 1fr;
  gap: 0.55rem 0.7rem;
}
.mw-gmsg__mark {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  background: var(--mw-accent-soft);
  border: 1px solid var(--mw-line);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.82rem;
  color: var(--mw-accent-warm);
}
.mw-gmsg__who {
  margin: 0;
  font-size: 0.86rem;
  font-weight: 650;
}
.mw-gmsg__who time {
  margin-left: 0.45rem;
  font-weight: 500;
  font-size: 0.72rem;
  color: var(--mw-muted);
}
.mw-gmsg__body {
  margin: 0.15rem 0 0;
  font-size: 0.9rem;
  line-height: 1.45;
  color: var(--mw-ink-soft);
  white-space: pre-wrap;
  word-break: break-word;
}
.mw-gchat__empty {
  margin: auto;
  text-align: center;
  color: var(--mw-muted);
  font-size: 0.9rem;
  max-width: 18rem;
  line-height: 1.45;
}
.mw-gchat__composer {
  display: flex;
  gap: 0.55rem;
  padding: 0.75rem 1rem 1rem;
  border-top: 1px solid var(--mw-line);
}
.mw-gchat__input {
  flex: 1 1 auto;
  border: 1px solid var(--mw-line);
  border-radius: 10px;
  background: var(--mw-surface);
  color: var(--mw-ink);
  font: inherit;
  font-size: 0.92rem;
  padding: 0.7rem 0.85rem;
}
.mw-gchat__input:focus {
  outline: none;
  border-color: var(--mw-line-strong);
}
.mw-gchat__send {
  flex: 0 0 auto;
}

.mw-gmembers {
  flex: 0 0 13.5rem;
  border-left: 1px solid var(--mw-line);
  background: rgba(10, 14, 24, 0.55);
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.mw-gmembers__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 0.85rem;
  border-bottom: 1px solid var(--mw-line);
}
.mw-gmembers__head h3 {
  margin: 0;
  font-size: 0.9rem;
}
.mw-gmembers__list {
  list-style: none;
  margin: 0;
  padding: 0.55rem 0.65rem;
  overflow: auto;
  flex: 1 1 auto;
}
.mw-gmembers__list li {
  display: flex;
  justify-content: space-between;
  gap: 0.4rem;
  padding: 0.4rem 0.35rem;
  font-size: 0.84rem;
}
.mw-gmembers__list em {
  font-style: normal;
  font-size: 0.7rem;
  color: var(--mw-muted);
}

.mw-groups__create {
  position: absolute;
  inset: 0;
  z-index: 8;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 2rem 1rem;
  background: rgba(4, 7, 14, 0.72);
  backdrop-filter: blur(8px);
  overflow: auto;
}
.mw-groups__create-card {
  width: min(26rem, 100%);
  border: 1px solid var(--mw-line-strong);
  border-radius: 16px;
  background: var(--mw-surface);
  padding: 1.1rem 1.2rem 1.25rem;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
}
.mw-field--check {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin: 0.75rem 0;
  font-size: 0.88rem;
}
.mw-field--check input {
  width: auto;
}

@media (max-width: 900px) {
  .mw-gchan {
    flex-basis: 11.5rem;
  }
  .mw-gmembers {
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    z-index: 5;
    box-shadow: -12px 0 32px rgba(0, 0, 0, 0.35);
  }
}

@media (max-width: 720px) {
  .mw-groups__room {
    flex-direction: column;
  }
  .mw-gchan {
    flex: 0 0 auto;
    border-right: 0;
    border-bottom: 1px solid var(--mw-line);
    max-height: 38%;
  }
  .mw-gchan__list {
    flex-direction: row;
    flex-wrap: wrap;
    padding-bottom: 0.55rem;
  }
  .mw-gstack {
    flex-basis: 3.6rem;
    padding: 0.55rem 0.3rem;
  }
  .mw-gstack__home,
  .mw-gstack__add,
  .mw-gstack__pill {
    width: 2.45rem;
    height: 2.45rem;
    border-radius: 12px;
  }
}

@media (max-width: 560px) {
  .mw-home,
  .mw-feed,
  .mw-profile,
  .mw-soon-pane,
  .mw-groups__lobby {
    padding-left: 1.1rem;
    padding-right: 1.1rem;
  }
}
