.spaces-page {
  padding-top: 10px;
}

.spaces-topbar-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 20px 22px;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.76);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-soft);
  margin-bottom: 18px;
}

.spaces-topbar-search {
  flex: 1 1 auto;
  min-width: 0;
}

.spaces-topbar-input {
  width: 100%;
  min-height: 54px;
  padding: 0 18px;
  border-radius: 20px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.88);
  color: var(--text-main);
  outline: none;
}

.spaces-topbar-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.spaces-topbar-btn {
  min-height: 46px;
  padding: 0 18px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.86);
  color: var(--text-main);
  font-weight: 800;
  cursor: pointer;
}

.spaces-topbar-btn-primary {
  color: #ffffff;
  border-color: transparent;
  background: linear-gradient(135deg, var(--accent-1), #8c9aff);
}

.spaces-main-tabs {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-bottom: 24px;
}

.spaces-main-tab {
  min-height: 42px;
  padding: 0 6px;
  border: 0;
  border-bottom: 3px solid transparent;
  background: transparent;
  color: var(--text-faint);
  font-size: 18px;
  font-weight: 700;
  cursor: pointer;
}

.spaces-main-tab.is-active {
  color: var(--text-strong);
  border-bottom-color: #9ba9ff;
}

.spaces-action-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 26px;
}

.spaces-action-card,
.spaces-panel-card,
.spaces-grid-card {
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-soft);
}

.spaces-action-card {
  padding: 28px 24px 22px;
  text-align: center;
}

.spaces-action-icon {
  width: 84px;
  height: 84px;
  margin: 0 auto 18px;
  border-radius: 22px;
  display: grid;
  place-items: center;
  background: linear-gradient(180deg, rgba(241, 244, 255, 0.95), rgba(234, 239, 255, 0.84));
  border: 1px solid rgba(106, 121, 205, 0.10);
  color: #616fc4;
  font-size: 36px;
  font-weight: 700;
}

.spaces-action-card h3 {
  margin: 0;
  font-size: 20px;
  font-weight: 900;
  color: var(--text-strong);
}

.spaces-action-card p {
  margin: 12px 0 0;
  color: var(--text-soft);
  font-size: 15px;
  line-height: 1.55;
}

.spaces-action-link-row {
  margin-top: 18px;
  display: flex;
  justify-content: flex-end;
}

.spaces-action-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 84px;
  min-height: 42px;
  padding: 0 16px;
  border-radius: 16px;
  background: rgba(244, 246, 255, 0.92);
  border: 1px solid var(--line-soft);
  color: var(--text-soft);
  font-weight: 800;
}

.spaces-action-link-primary {
  color: #ffffff;
  background: linear-gradient(135deg, var(--accent-1), #8c9aff);
  border-color: transparent;
}

.spaces-section-block {
  margin-top: 28px;
}

.spaces-section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 16px;
}

.spaces-section-title {
  margin: 0;
  font-size: 24px;
  font-weight: 900;
  color: var(--text-strong);
}

.spaces-section-copy {
  margin: 8px 0 0;
  color: var(--text-soft);
  font-size: 15px;
  line-height: 1.55;
}

.spaces-view-all {
  color: #7988bf;
  font-size: 15px;
  font-weight: 700;
}

.spaces-feature-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.spaces-feature-link,
.spaces-grid-link {
  color: inherit;
  text-decoration: none;
}

.spaces-feature-card {
  overflow: hidden;
  border-radius: 26px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.82);
  box-shadow: var(--shadow-soft);
}

.spaces-feature-banner {
  position: relative;
  min-height: 180px;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.spaces-feature-banner-fallback {
  background:
    radial-gradient(circle at top right, rgba(154, 173, 255, 0.18), transparent 30%),
    linear-gradient(135deg, rgba(112, 122, 173, 0.82), rgba(67, 74, 110, 0.96));
}

.spaces-feature-overlay {
  background:
    linear-gradient(180deg, rgba(10, 14, 32, 0.06) 0%, rgba(10, 14, 32, 0.14) 38%, rgba(10, 14, 32, 0.74) 100%);
}

.spaces-feature-content {
  position: relative;
  z-index: 1;
  min-height: 180px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.spaces-feature-badges {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.spaces-feature-badge {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(19, 23, 43, 0.48);
  border: 1px solid rgba(255,255,255,0.20);
  backdrop-filter: blur(8px);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
}

.spaces-feature-main {
  margin-top: auto;
}


.spaces-feature-name {
  margin: 0;
  font-size: 18px;
  font-weight: 900;
  color: #fff;
  line-height: 1.08;
}

.spaces-feature-meta {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 8px;
  color: rgba(255,255,255,0.88);
  font-size: 13px;
  font-weight: 600;
}

.spaces-feature-description,
.spaces-feature-cta-row {
  display: none;
}

.spaces-feature-description {
  margin: 14px 0 0;
  max-width: 420px;
  color: rgba(255, 255, 255, 0.92);
  font-size: 15px;
  line-height: 1.6;
}

.spaces-feature-cta-row {
  margin-top: 16px;
  display: flex;
  justify-content: flex-end;
}

.spaces-feature-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 106px;
  min-height: 48px;
  padding: 0 20px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--text-strong);
  font-size: 18px;
  font-weight: 800;
}

.spaces-card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.spaces-grid-card {
  overflow: hidden;
  transition: transform 0.16s ease, border-color 0.16s ease;
}

.spaces-grid-link:hover .spaces-grid-card {
  transform: translateY(-2px);
  border-color: rgba(94, 110, 192, 0.16);
}

.spaces-grid-banner {
  height: 140px;
  background:
    linear-gradient(135deg, rgba(129, 148, 231, 0.18), rgba(215, 225, 255, 0.30)),
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.01));
}

.spaces-grid-banner-fallback {
  background:
    linear-gradient(135deg, rgba(127, 146, 240, 0.18), rgba(202, 215, 255, 0.22)),
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.01));
}

.spaces-grid-body {
  padding: 18px;
}

.spaces-grid-name {
  margin: 0;
  font-size: 20px;
  font-weight: 900;
  color: var(--text-strong);
  line-height: 1.15;
}

.spaces-grid-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.spaces-grid-tags span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(241, 244, 255, 0.94);
  border: 1px solid var(--line-soft);
  color: var(--text-soft);
  font-size: 12px;
  font-weight: 700;
}

.spaces-grid-meta {
  margin-top: 14px;
  color: var(--text-soft);
  font-size: 14px;
  line-height: 1.45;
}

.spaces-message-card {
  padding: 22px;
}

.spaces-message-card h2,
.spaces-message-card h3 {
  margin: 0 0 10px;
  color: var(--text-strong);
}

.spaces-message-card p {
  margin: 0;
  color: var(--text-soft);
  line-height: 1.6;
}

@media (max-width: 1240px) {
  .spaces-action-grid,
  .spaces-feature-row,
  .spaces-card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

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

  .spaces-main-tabs {
    justify-content: flex-start;
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .spaces-action-grid,
  .spaces-feature-row,
  .spaces-card-grid {
    grid-template-columns: 1fr;
  }

  .spaces-section-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .spaces-feature-banner,
  .spaces-feature-content {
    min-height: 180px;
  }
}

/* ==========================================================================
   SPACE DETAIL VIEW
   ========================================================================== */

.space-view-page {
  padding-top: 10px;
}

.space-view-topline {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  color: var(--text-soft);
  font-size: 14px;
  font-weight: 700;
}

.space-view-back {
  color: var(--text-soft);
  text-decoration: none;
}

.space-view-back:hover {
  color: var(--text-strong);
}

.space-view-slash {
  color: var(--text-faint);
}

.space-view-current {
  color: var(--text-strong);
}

.space-view-hero {
  overflow: hidden;
  border-radius: 30px;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-soft);
  margin-bottom: 22px;
}

.space-view-hero-banner {
  position: relative;
  height: 170px;
  background:
    linear-gradient(135deg, rgba(129, 148, 231, 0.18), rgba(215, 225, 255, 0.30)),
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.01));
}

.space-view-hero-banner-fallback {
  background:
    linear-gradient(135deg, rgba(127, 146, 240, 0.18), rgba(202, 215, 255, 0.22)),
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.01));
}

.space-view-hero-banner-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.space-view-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(244,247,255,0.10), rgba(243,246,255,0.70));
}

.space-view-hero-body {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  padding: 0 22px 22px;
  margin-top: -44px;
  position: relative;
  z-index: 2;
}

.space-view-hero-main {
  display: flex;
  align-items: flex-end;
  gap: 16px;
  min-width: 0;
}

.space-view-avatar-wrap {
  flex: 0 0 auto;
}

.space-view-avatar,
.space-view-avatar-fallback {
  width: 92px;
  height: 92px;
  border-radius: 24px;
  object-fit: cover;
  display: block;
  background: linear-gradient(135deg, #dfe6ff, #eef3ff);
  border: 4px solid rgba(255,255,255,0.94);
  box-shadow: 0 14px 30px rgba(43,55,108,0.10);
}

.space-view-titleblock {
  min-width: 0;
  padding-bottom: 4px;
}

.space-view-title-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.space-view-name {
  margin: 0;
  font-size: 34px;
  line-height: 1.05;
  font-weight: 900;
  color: var(--text-strong);
}

.space-view-chip {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(241, 244, 255, 0.94);
  border: 1px solid var(--line-soft);
  color: var(--text-soft);
  font-size: 12px;
  font-weight: 800;
}

.space-view-chip-accent {
  color: #ffffff;
  background: linear-gradient(135deg, var(--accent-1), #8c9aff);
  border-color: transparent;
}

.space-view-description {
  margin: 10px 0 0;
  color: var(--text-main);
  line-height: 1.6;
  max-width: 760px;
}

.space-view-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.space-view-meta span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(241, 244, 255, 0.94);
  border: 1px solid var(--line-soft);
  color: var(--text-soft);
  font-size: 12px;
  font-weight: 700;
}

.space-view-hero-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.space-view-btn {
  min-height: 42px;
  padding: 0 16px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.90);
  color: var(--text-main);
  font-weight: 800;
  cursor: pointer;
}

.space-view-btn-primary {
  color: #ffffff;
  background: linear-gradient(135deg, var(--accent-1), #8c9aff);
  border-color: transparent;
}

.space-view-btn-static {
  cursor: default;
}

.space-view-layout {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 22px;
  align-items: start;
}

.space-view-side {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.space-view-side-card {
  padding: 20px;
}

.space-view-side-card h3 {
  margin: 0 0 12px;
  font-size: 18px;
  font-weight: 900;
  color: var(--text-strong);
}

.space-view-side-card p {
  margin: 0 0 8px;
  color: var(--text-soft);
  line-height: 1.6;
}

.space-view-stat-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.space-view-stat-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--text-soft);
}

.space-view-stat-row strong {
  color: var(--text-strong);
}

.space-view-main {
  min-width: 0;
}

.space-view-tabs-card {
  padding: 14px 16px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.76);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-soft);
  margin-bottom: 16px;
}

.space-view-tabs-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.space-view-tab-pill {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 14px;
  border-radius: 999px;
  background: rgba(241, 244, 255, 0.94);
  border: 1px solid var(--line-soft);
  color: var(--text-soft);
  font-size: 13px;
  font-weight: 800;
}

.space-view-compose {
  padding: 20px;
  margin-bottom: 18px;
}

.space-view-compose h3 {
  margin: 0 0 12px;
  font-size: 18px;
  font-weight: 900;
  color: var(--text-strong);
}

.space-view-textarea {
  width: 100%;
  min-height: 110px;
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.90);
  color: var(--text-main);
  resize: vertical;
  outline: none;
}

.space-view-compose-actions {
  margin-top: 12px;
  display: flex;
  justify-content: flex-end;
}

.space-view-section-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: baseline;
  margin-bottom: 14px;
}

.space-view-section-head h2 {
  margin: 0;
  font-size: 26px;
  font-weight: 900;
  color: var(--text-strong);
}

.space-view-section-head span {
  color: var(--text-soft);
  font-size: 14px;
}

.space-view-post-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.space-view-post-link {
  color: inherit;
  text-decoration: none;
}

.space-view-post-card {
  padding: 20px;
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-soft);
}

.space-view-post-head {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 12px;
}

.space-view-post-avatar,
.space-view-post-avatar-fallback {
  width: 46px;
  height: 46px;
  border-radius: 15px;
  object-fit: cover;
  display: block;
  background: linear-gradient(135deg, #dfe6ff, #eef3ff);
}

.space-view-post-head-main {
  min-width: 0;
  flex: 1 1 auto;
}

.space-view-post-name-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 5px;
}

.space-view-post-name {
  margin: 0;
  font-size: 18px;
  font-weight: 900;
  color: var(--text-strong);
  line-height: 1.1;
}

.space-view-post-kind {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(241, 244, 255, 0.94);
  border: 1px solid var(--line-soft);
  color: var(--text-soft);
  font-size: 11px;
  font-weight: 800;
}

.space-view-post-meta-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  color: var(--text-faint);
  font-size: 13px;
}

.space-view-post-text {
  color: var(--text-main);
  line-height: 1.7;
  white-space: pre-wrap;
}


/* ==========================================================================
   SPACE / POST MEDIA
   ========================================================================== */
/* feed / space list media */
.space-view-post-media-wrap {
  margin-top: 14px;
  border-radius: 22px;
  overflow: hidden;
  border: 1px solid var(--line-soft);
  width: 100%;
  max-width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
}

.space-view-post-media {
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: 500px;
  object-fit: contain;
}
/* full post media */
.post-view-media-wrap {
  margin-top: 14px;
  border-radius: 22px;
  overflow: hidden;
  border: 1px solid var(--line-soft);
  width: 100%;
  max-width: 920px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
}

.post-view-media {
  display: block;
  width: 100%;
  height: auto;
  max-height: 900px;
  object-fit: contain;
}

@media (max-width: 760px) {
  .space-view-post-media-wrap,
  .post-view-media-wrap {
    max-width: 100%;
  }

  .space-view-post-media {
    max-height: 52vh;
  }

  .post-view-media {
    max-height: 70vh;
  }
}


@media (max-width: 1180px) {
  .space-view-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 820px) {
  .space-view-hero-body {
    flex-direction: column;
    align-items: flex-start;
    margin-top: -34px;
  }

  .space-view-hero-main {
    align-items: flex-start;
  }

  .space-view-name {
    font-size: 28px;
  }
}

@media (max-width: 620px) {
  .space-view-topline {
    font-size: 13px;
  }

  .space-view-hero-banner {
    height: 130px;
  }

  .space-view-hero-body {
    padding: 0 16px 16px;
  }

  .space-view-avatar,
  .space-view-avatar-fallback {
    width: 78px;
    height: 78px;
    border-radius: 20px;
  }

  .space-view-post-card,
  .space-view-tabs-card,
  .space-view-compose {
    border-radius: 20px;
  }
}


.spaces-content-loading {
  opacity: 0.64;
  transition: opacity 0.16s ease;
}

#spaces-content-root {
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.space-view-hero-compact {
  border-radius: 26px;
}

.space-view-hero-compact .space-view-hero-banner {
  height: 112px;
}

.space-view-hero-body-compact {
  align-items: center;
  padding: 0 18px 18px;
  margin-top: -26px;
}

.space-view-hero-main-compact {
  align-items: center;
  gap: 14px;
}

.space-view-avatar-wrap-compact {
  flex: 0 0 auto;
}

.space-view-avatar-wrap-compact .space-view-avatar,
.space-view-avatar-wrap-compact .space-view-avatar-fallback {
  width: 72px;
  height: 72px;
  border-radius: 20px;
  border: 3px solid rgba(255,255,255,0.95);
  box-shadow: 0 10px 24px rgba(43,55,108,0.10);
}

.space-view-titleblock-compact {
  padding-bottom: 0;
}

.space-view-hero-compact .space-view-name {
  font-size: 24px;
  line-height: 1.04;
}

.space-view-hero-compact .space-view-description {
  margin-top: 6px;
  font-size: 14px;
  line-height: 1.45;
}

.space-view-hero-compact .space-view-meta {
  margin-top: 8px;
}

.space-view-hero-compact .space-view-meta span {
  min-height: 24px;
  padding: 0 9px;
  font-size: 11px;
}

.space-view-side-card {
  padding: 16px;
}

.space-view-side-card h3 {
  margin-bottom: 8px;
  font-size: 16px;
}

.space-view-side-card p {
  font-size: 14px;
  line-height: 1.5;
}

.space-view-compose {
  padding: 16px;
  margin-bottom: 14px;
}

.space-view-compose h3 {
  margin-bottom: 10px;
  font-size: 16px;
}

.space-view-textarea {
  min-height: 88px;
  border-radius: 16px;
}

.space-view-section-head {
  margin-bottom: 10px;
}

.space-view-section-head h2 {
  font-size: 22px;
}

.space-view-post-list {
  gap: 12px;
}

.space-view-post-card {
  padding: 16px;
  border-radius: 22px;
}

.space-view-post-head {
  gap: 10px;
  margin-bottom: 10px;
}

.space-view-post-avatar,
.space-view-post-avatar-fallback {
  width: 40px;
  height: 40px;
  border-radius: 13px;
}

.space-view-post-name {
  font-size: 16px;
}

.space-view-post-meta-row {
  font-size: 12px;
}

.space-view-post-text {
  line-height: 1.55;
}

.space-view-layout {
  gap: 18px;
}

@media (max-width: 820px) {
  .space-view-hero-body-compact {
    align-items: flex-start;
    margin-top: -20px;
  }

  .space-view-hero-main-compact {
    align-items: flex-start;
  }

  .space-view-hero-compact .space-view-name {
    font-size: 22px;
  }
}


.space-view-side {
  gap: 12px;
}

.space-view-side-card {
  padding: 14px;
  border-radius: 20px;
}

.space-view-side-card h3 {
  margin-bottom: 6px;
  font-size: 15px;
}

.space-view-side-card p {
  margin: 0 0 6px;
  font-size: 13px;
  line-height: 1.4;
}

.space-view-stat-list {
  gap: 8px;
}

.space-view-compose {
  padding: 14px;
  border-radius: 20px;
  margin-bottom: 12px;
}

.space-view-compose h3 {
  margin-bottom: 8px;
  font-size: 15px;
}

.space-view-textarea {
  min-height: 72px;
  padding: 12px 14px;
}

.space-view-compose-actions {
  margin-top: 10px;
}

.space-view-post-card {
  padding: 14px;
  border-radius: 20px;
}

.space-view-post-text {
  font-size: 14px;
  line-height: 1.5;
}

.space-view-hero-main-compact {
  gap: 10px;
}

.space-view-avatar-wrap-compact .space-view-avatar,
.space-view-avatar-wrap-compact .space-view-avatar-fallback {
  width: 64px;
  height: 64px;
  border-radius: 18px;
}

.space-view-hero-compact .space-view-name {
  font-size: 22px;
}

.space-view-hero-compact .space-view-description {
  margin-top: 4px;
  font-size: 13px;
}


.space-view-video-rail {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px 0;
  color: var(--text-soft);
  font-size: 12px;
}

.space-view-video-rail-left {
  font-size: 11px;
  line-height: 1;
  opacity: 0.9;
}

.space-view-video-rail-track {
  position: relative;
  flex: 1 1 auto;
  height: 4px;
  border-radius: 999px;
  background: rgba(124, 138, 210, 0.16);
  overflow: hidden;
}

.space-view-video-rail-fill {
  display: block;
  width: 18%;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent-1), #98a7ff);
}

.space-view-video-rail-time {
  font-weight: 700;
  letter-spacing: 0.01em;
}

.space-view-video-rail {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px 0;
  color: var(--text-soft);
  font-size: 12px;
}

.space-view-video-rail-left {
  font-size: 11px;
  line-height: 1;
  opacity: 0.9;
}

.space-view-video-rail-track {
  position: relative;
  flex: 1 1 auto;
  height: 4px;
  border-radius: 999px;
  background: rgba(124, 138, 210, 0.16);
  overflow: hidden;
}

.space-view-video-rail-fill {
  display: block;
  width: 18%;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent-1), #98a7ff);
}

.spaces-grid-card {
  overflow: hidden;
  border-radius: 24px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.82);
  box-shadow: var(--shadow-soft);
}

.spaces-grid-banner {
  position: relative;
  min-height: 180px;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.spaces-grid-banner-fallback {
  background:
    linear-gradient(135deg, rgba(127, 146, 240, 0.22), rgba(202, 215, 255, 0.28)),
    linear-gradient(180deg, rgba(255, 255, 255, 0.10), rgba(255, 255, 255, 0.02));
}

.spaces-grid-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(10, 14, 32, 0.06) 0%, rgba(10, 14, 32, 0.12) 35%, rgba(10, 14, 32, 0.74) 100%);
}

.spaces-grid-body {
  position: relative;
  z-index: 1;
  min-height: 180px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.spaces-grid-name {
  margin: 0;
  font-size: 17px;
  font-weight: 900;
  color: #ffffff;
  line-height: 1.08;
}

.spaces-grid-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.spaces-grid-tags span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(19, 23, 43, 0.48);
  border: 1px solid rgba(255, 255, 255, 0.20);
  backdrop-filter: blur(8px);
  color: #ffffff;
  font-size: 11px;
  font-weight: 800;
}

.spaces-grid-meta {
  margin-top: 10px;
  color: rgba(255, 255, 255, 0.88);
  font-size: 13px;
  font-weight: 600;
}

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

.spaces-topbar-help {
  min-height: 16px;
  padding-left: 2px;
  font-size: 12px;
  line-height: 1.35;
  color: var(--text-soft);
}

.spaces-topbar-help.is-error {
  color: #8f2f4a;
}

.spaces-topbar-help.is-info {
  color: var(--text-soft);
}

.spaces-topbar-input.is-pin-mode {
  border-color: rgba(111, 97, 246, 0.18);
  box-shadow: none;
}

.spaces-create-form {
  margin-top: 14px;
  padding: 16px;
  border-radius: 22px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.88);
  box-shadow: var(--shadow-soft);
}

.spaces-create-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.spaces-create-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.spaces-create-field-wide {
  grid-column: 1 / -1;
}

.spaces-create-field label {
  font-size: 13px;
  font-weight: 800;
  color: var(--text-strong);
}

.spaces-create-field input,
.spaces-create-field select,
.spaces-create-field textarea {
  width: 100%;
  min-height: 44px;
  padding: 10px 14px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.9);
  color: var(--text-main);
  outline: none;
}

.spaces-create-field textarea {
  resize: vertical;
  min-height: 110px;
}

.spaces-create-actions {
  margin-top: 14px;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

@media (max-width: 760px) {
  .spaces-create-grid {
    grid-template-columns: 1fr;
  }

  .spaces-create-actions {
    flex-direction: column;
  }
}

.create-space-chip.is-disabled {
  opacity: 0.38;
  cursor: not-allowed;
}

.create-space-link-btn.is-disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.create-space-age-range {
  margin-top: 18px;
  padding: 16px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.82);
}

.create-space-age-values {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  color: var(--text-main);
  font-weight: 800;
}

.create-space-confirm-card {
  margin-top: 18px;
  padding: 18px;
  border-radius: 22px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.84);
}

.create-space-confirm-copy {
  color: var(--text-main);
  font-size: 14px;
  line-height: 1.65;
}

.create-space-confirm-check {
  margin-top: 16px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  color: var(--text-strong);
  font-weight: 700;
  cursor: pointer;
}

.create-space-confirm-check input {
  margin-top: 3px;
}


.space-view-request-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.space-view-request-row {
  padding: 10px 0;
  border-bottom: 1px solid var(--line-soft);
}

.space-view-request-row:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.space-view-request-left {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  min-width: 0;
}

.space-view-request-avatar-wrap {
  position: relative;
  width: 42px;
  min-width: 42px;
  height: 42px;
}

.space-view-request-avatar,
.space-view-request-avatar-fallback {
  width: 42px;
  height: 42px;
  border-radius: 13px;
  object-fit: cover;
  display: block;
  background: linear-gradient(135deg, #dfe6ff, #eef3ff);
}

.space-view-request-verified {
  position: absolute;
  right: -3px;
  bottom: -3px;
  width: 16px;
  height: 16px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--accent-1), #8c9aff);
  color: #fff;
  font-size: 9px;
  font-weight: 900;
  border: 2px solid rgba(255,255,255,0.95);
}

.space-view-request-main {
  min-width: 0;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
}

.space-view-request-name-row {
  line-height: 1.15;
}

.space-view-request-name {
  color: var(--text-strong);
  font-weight: 900;
  text-decoration: none;
  font-size: 16px;
}

.space-view-request-meta {
  margin-top: 4px;
  font-size: 12px;
  color: var(--text-soft);
  line-height: 1.2;
}

.space-view-request-actions {
  margin-top: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.space-view-request-actions form {
  margin: 0;
}

.space-view-request-icon-btn {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.84);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  font-weight: 900;
  cursor: pointer;
  padding: 0;
}

.space-view-request-icon-btn.is-approve {
  color: #236246;
}

.space-view-request-icon-btn.is-reject {
  color: #8f2f4a;
}

.space-view-request-icon-btn.is-delete {
  color: var(--text-soft);
}

.space-view-request-row {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255,255,255,0.74);
}