﻿:root {
  --primary-color: #7C3AED;
  --primary-light: #A78BFA;
  --primary-dark: #5B21B6;
  --accent-color: #FCD34D;
  --accent-light: #FDE68A;
  --accent-dark: #F59E0B;
  --bg-primary: #F8FAFC;
  --bg-secondary: #FFFFFF;
  --text-primary: #1F2937;
  --text-secondary: #6B7280;
  --text-light: #9CA3AF;
  --border-color: #E5E7EB;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --radius-full: 9999px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scrollbar-gutter: stable;
  margin: 0;
  padding: 0;
  overflow-x: hidden;
  background-color: #1B1B43;
}

html:has(body.moment-square-body) {
  background:
    radial-gradient(circle at 33% 22%, rgba(255, 210, 126, 0.11), transparent 2.6rem),
    radial-gradient(circle at 72% 36%, rgba(167, 139, 250, 0.14), transparent 3.2rem),
    radial-gradient(circle at 24% 76%, rgba(76, 116, 220, 0.1), transparent 3.8rem),
    radial-gradient(circle at 50% 42%, rgba(75, 91, 182, 0.18), transparent 34%),
    radial-gradient(circle at 18% 12%, rgba(154, 128, 255, 0.1), transparent 24%),
    radial-gradient(circle at 82% 18%, rgba(88, 139, 234, 0.08), transparent 26%),
    radial-gradient(circle at 52% 88%, rgba(58, 45, 137, 0.12), transparent 34%),
    linear-gradient(180deg, #0B0722 0%, #171647 46%, #11143B 72%, #070A20 100%);
  background-attachment: fixed;
}

/* ── 通用页面过渡动画 ── */
[data-page-content],
.footer {
  transition: opacity 200ms ease, transform 200ms ease, filter 200ms ease;
}

/* 离开页面 */
body.is-leaving [data-page-content],
body.is-leaving .footer {
  opacity: 0;
  transform: scale(0.992) translateY(6px);
  filter: blur(1px);
}

/* 进入页面 */
html.is-entering [data-page-content],
html.is-entering .footer {
  opacity: 0;
  transform: scale(0.992) translateY(-6px);
  filter: blur(1px);
}

/* 按钮点击反馈 */
.btn.is-soft-click {
  transform: scale(0.96);
  filter: brightness(1.04);
}
body {
  margin: 0;
  padding: 0;
  min-height: 100dvh;
  overflow-x: hidden;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background-color: #1B1B43;
  color: var(--text-primary);
  line-height: 1.6;
  font-size: 16px;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;
}

body.moment-square-body {
  background:
    radial-gradient(circle, rgba(255, 255, 255, 0.5) 0 0.9px, transparent 1.4px) 0 0 / 156px 156px,
    radial-gradient(circle, rgba(252, 211, 141, 0.4) 0 0.9px, transparent 1.5px) 34px 48px / 226px 226px,
    radial-gradient(circle, rgba(167, 139, 250, 0.34) 0 1px, transparent 1.6px) 92px 24px / 288px 288px,
    radial-gradient(circle at 33% 22%, rgba(255, 210, 126, 0.11), transparent 2.6rem),
    radial-gradient(circle at 72% 36%, rgba(167, 139, 250, 0.14), transparent 3.2rem),
    radial-gradient(circle at 24% 76%, rgba(76, 116, 220, 0.1), transparent 3.8rem),
    radial-gradient(circle at 50% 42%, rgba(75, 91, 182, 0.18), transparent 34%),
    radial-gradient(circle at 18% 12%, rgba(154, 128, 255, 0.1), transparent 24%),
    radial-gradient(circle at 82% 18%, rgba(88, 139, 234, 0.08), transparent 26%),
    radial-gradient(circle at 52% 88%, rgba(58, 45, 137, 0.12), transparent 34%),
    linear-gradient(180deg, #0B0722 0%, #171647 46%, #11143B 72%, #070A20 100%);
  background-attachment: fixed;
}

body.has-human-starfield {
  isolation: isolate;
}

body.has-human-starfield-transparent {
  background: transparent !important;
}

.human-starfield-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100dvh;
  min-height: 100svh;
  z-index: -1;
  pointer-events: none;
}

/* 输入区域保留文字选择能力 */
input,
textarea,
select,
[contenteditable="true"] {
  user-select: text;
  -webkit-user-select: text;
}

a {
  text-decoration: none;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

.navbar {
  position: sticky;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background-color: var(--bg-secondary);
  box-shadow: var(--shadow-sm);
  margin: 0;
  padding: 0;
  border: 0;
  width: 100%;
}

.navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 52px;
  padding: 0.5rem 1rem;
  gap: 0.75rem;
}

/* .nav-links now visible in .top-bar — hidden nav-links removed */

.search-container {
  flex: 1 1 auto;
  display: flex;
  justify-content: center;
  max-width: 140px;
  min-width: 120px;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  flex-shrink: 0;
}

.nav-brand a {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  height: 36px;
}

.brand-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  font-size: 1.25rem;
  line-height: 1;
}

.brand-name {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--primary-color);
  white-space: nowrap;
}

.hamburger {
  display: none !important;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
}

.search-box {
  display: flex;
  align-items: center;
  background-color: var(--bg-primary);
  border-radius: var(--radius-lg);
  width: 100%;
  height: 36px;
  padding: 0.375rem 0.5rem;
  flex-shrink: 0;
}

.search-box input {
  border: none;
  background: transparent;
  padding: 0.125rem 0.25rem;
  font-size: 0.8125rem;
  width: 100%;
  min-width: 0;
  outline: none;
}

.search-box input::placeholder {
  color: var(--text-light);
}

.search-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: none;
  color: var(--primary-color);
  width: 28px;
  height: 28px;
  padding: 0.25rem;
  border: none;
  cursor: pointer;
  flex: 0 0 28px;
  line-height: 1;
}

.avatar-wrapper {
  position: relative;
}

.avatar-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  width: 36px;
  height: 36px;
}


.avatar.has-image {
  background-size: cover;
  background-position: center;
  color: transparent;
}
.avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-color) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 0.875rem;
  font-weight: 500;
}

.avatar-clickable,
.story-avatar,
.author-avatar,
.comment-avatar,
.detail-mention-avatar {
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}

.avatar-clickable:hover,
.story-avatar:hover,
.author-avatar:hover,
.comment-avatar:hover,
.detail-mention-avatar:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(124, 58, 237, 0.3);
}

.avatar-dropdown {
  position: absolute;
  top: calc(100% + 0.25rem);
  right: 0;
  background-color: var(--bg-secondary);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  padding: 0.25rem;
  min-width: 120px;
  display: none;
}

.avatar-dropdown.active {
  display: block;
}

.dropdown-item {
  display: block;
  padding: 0.5rem 0.75rem;
  color: var(--text-secondary);
  font-size: 0.875rem;
  border-radius: var(--radius-sm);
  transition: background-color 0.2s;
}

.dropdown-item:hover {
  background-color: var(--bg-primary);
}

.dropdown-divider {
  border: none;
  border-top: 1px solid var(--border-color);
  margin: 0.25rem 0;
}
@media (min-width: 768px) {
  .navbar .container {
    position: relative;
  }

  .navbar .search-container {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 220px;
  }
}


.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 1.25rem;
  border-radius: var(--radius-md);
  font-weight: 500;
  font-size: 0.875rem;
  cursor: pointer;
  border: none;
  transition: all 0.2s;
}

.btn-primary {
  background-color: var(--primary-color);
  color: white;
}

.btn-primary:hover {
  background-color: var(--primary-dark);
}

.btn-outline {
  background-color: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
}

.btn-outline:hover {
  background-color: var(--bg-primary);
}

.btn-accent {
  background-color: var(--accent-color);
  color: var(--text-primary);
}

.btn-accent:hover {
  background-color: var(--accent-dark);
}

.banner {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
  color: white;
  padding: 4rem 0;
  text-align: center;
}

.banner-content h1 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.banner-content p {
  font-size: 1.125rem;
  opacity: 0.9;
  margin-bottom: 1.5rem;
}

.banner-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.875rem;
  position: relative;
  top: 2.5rem;
}

.banner-actions .btn {
  min-width: 120px;
  min-height: 48px;
  font-size: 1rem;
  font-weight: 600;
}

.btn-hero-secondary {
  background-color: rgba(255, 255, 255, 0.14);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.42);
  backdrop-filter: blur(6px);
}

.btn-hero-secondary:hover {
  background-color: rgba(255, 255, 255, 0.22);
  border-color: rgba(255, 255, 255, 0.72);
}

.stats {
  padding: 3rem 0;
  background-color: var(--bg-secondary);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
}

.stat-item {
  text-align: center;
}

.stat-number {
  font-size: 2rem;
  font-weight: 700;
  color: var(--primary-color);
}

.stat-label {
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin-top: 0.25rem;
}

.featured {
  padding: 3rem 0;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2rem;
}

.section-header h2 {
  font-size: 1.5rem;
}

.view-more {
  color: var(--primary-color);
  font-size: 0.875rem;
}

.cards-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
}

.story-card,
.story-item {
  cursor: pointer;
  background-color: var(--bg-secondary);
  border-radius: 18px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
  overflow: hidden;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}

.card-image {
  position: relative;
  width: 100%;
  padding-bottom: calc(4/3 * 100%);
}

.card-image img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card-content {
  padding: 0.625rem;
}

.card-category {
  display: inline-block;
  background-color: var(--primary-light);
  color: white;
  padding: 0.125rem 0.5rem;
  border-radius: var(--radius-full);
  font-size: 0.625rem;
  margin-bottom: 0.5rem;
}

.card-title {
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 0.375rem;
}

.card-desc {
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-meta {
  display: flex;
  gap: 0.75rem;
  font-size: 0.625rem;
  color: var(--text-light);
}

.quick-submit {
  padding: 3rem 0;
  background: linear-gradient(135deg, var(--accent-color) 0%, var(--accent-dark) 100%);
}

.submit-box {
  text-align: center;
  color: var(--text-primary);
}

.submit-box h3 {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}

.submit-box p {
  margin-bottom: 1.5rem;
}

.footer {
  position: relative;
  z-index: 5;
  width: 100%;
  clear: both;
  background-color: #0C0925;
  color: rgba(255, 255, 255, 0.85);
  padding: 2.25rem 0 1.25rem;
  overflow: hidden;
  isolation: isolate;
}

.footer .container {
  width: 100%;
}

.footer-content {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1.75rem;
  margin-bottom: 1.75rem;
  text-align: center;
}

.footer-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.footer-brand p,
.footer-links h4 {
  overflow-wrap: anywhere;
}

.footer-links h4 {
  margin-bottom: 0.75rem;
  white-space: nowrap;
}

.footer-links ul {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem 1rem;
  list-style: none;
}

.footer-links li {
  margin-bottom: 0;
  white-space: nowrap;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.76);
  transition: color 0.2s;
}

.footer-links a:hover {
  color: white;
}


.footer-bottom {
  text-align: center;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.8125rem;
  color: rgba(255, 255, 255, 0.65);
}

@media (min-width: 640px) {
  .stats-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .cards-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .footer-content {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    text-align: left;
  }

  .footer-brand {
    grid-column: 1 / -1;
    align-items: flex-start;
  }

  .footer-links ul {
    justify-content: flex-start;
  }
}

@media (min-width: 1024px) {
  .navbar .container {
    padding: 0.5rem 2rem;
  }

  .search-box {
    padding: 0.375rem 0.625rem;
  }

  .search-box input {
    width: 100%;
    font-size: 0.875rem;
  }

  .search-btn {
    font-size: 1rem;
  }

  .avatar {
    width: 40px;
    height: 40px;
    font-size: 0.9375rem;
  }

  .banner-content h1 {
    font-size: 3rem;
  }

  .footer-content {
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr) minmax(0, 1.2fr);
  }

  .footer-brand {
    grid-column: auto;
    align-items: flex-start;
  }
}

@media (min-width: 1280px) {
  .search-container {
    max-width: 220px;
  }

  .banner-content h1 {
    font-size: 3.5rem;
  }

  .cards-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* Human app polish: softer mobile-app interactions */
:root {
  --border-color: #EEF2F7;
  --shadow-sm: 0 2px 10px rgba(31, 41, 55, 0.04);
  --shadow-md: 0 8px 24px rgba(31, 41, 55, 0.07);
  --shadow-lg: 0 18px 50px rgba(31, 41, 55, 0.12);
}

.search-box,
.story-card,
.submit-box {
  box-shadow: 0 10px 28px rgba(31, 41, 55, 0.05);
}

.btn,
.tab-btn,
.pagination-btn,
.search-btn,
.avatar-btn,
.dropdown-item {
  -webkit-tap-highlight-color: transparent;
}

.btn,
.tab-btn,
.pagination-btn {
  min-height: 42px;
  border-radius: var(--radius-full);
  border-color: transparent;
  transition: transform 180ms ease, box-shadow 180ms ease, background-color 180ms ease, color 180ms ease, opacity 180ms ease;
}

.btn:hover,
.tab-btn:hover,
.pagination-btn:hover:not(:disabled) {
  transform: translateY(-1px);
}

.btn:active,
.tab-btn:active,
.pagination-btn:active:not(:disabled),
.search-btn:active,
.avatar-btn:active {
  transform: scale(0.98);
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary-color), #8B5CF6);
  box-shadow: 0 10px 22px rgba(124, 58, 237, 0.22);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #6D28D9, var(--primary-color));
  box-shadow: 0 14px 28px rgba(124, 58, 237, 0.28);
}

.btn-outline,
.btn-cancel {
  border: 0 !important;
  background: rgba(124, 58, 237, 0.08);
  color: var(--primary-color);
}

.btn-outline:hover,
.btn-cancel:hover {
  background: rgba(124, 58, 237, 0.13);
  color: var(--primary-dark);
}

.search-box,
.avatar-dropdown {
  border: 0;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(14px);
}

.avatar-dropdown.active {
  animation: softPopup 240ms ease both;
}

.dropdown-divider {
  border-top-color: rgba(148, 163, 184, 0.16);
}

.dropdown-item:hover {
  background: rgba(124, 58, 237, 0.08);
  color: var(--primary-color);
}

input,
textarea,
select {
  transition: box-shadow 180ms ease, background-color 180ms ease, transform 180ms ease;
}

input:focus,
textarea:focus,
select:focus {
  outline: none;
}

@keyframes softPopup {
  0% { opacity: 0; transform: translateY(8px) scale(0.98); }
  70% { opacity: 1; transform: translateY(0) scale(1.012); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}

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

@keyframes dialogBreathIn {
  0% { opacity: 0; transform: translateY(14px) scale(0.965); }
  62% { opacity: 1; transform: translateY(0) scale(1.015); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}

/* ═══════════════════════════════════════════
   灵感来源组件（投稿页）
   ═══════════════════════════════════════════ */
.inspiration-section{margin-bottom:1.5rem}
.inspiration-label{display:block;font-size:.875rem;font-weight:600;color:var(--text-primary);margin-bottom:.25rem}
.inspiration-desc{font-size:.75rem;color:var(--text-light);margin-bottom:.625rem}
.inspiration-options{display:flex;flex-wrap:wrap;gap:.5rem;margin-bottom:.75rem}
.inspiration-option{display:inline-flex;align-items:center;justify-content:center;gap:.375rem;min-height:38px;padding:.5rem .875rem;border:1px solid rgba(148,163,184,.2);border-radius:var(--radius-full);background:#252050;color:var(--text-secondary);font-size:.8125rem;font-weight:600;cursor:pointer;transition:background 180ms ease,color 180ms ease,border-color 180ms ease,transform 180ms ease}
.inspiration-option:hover{border-color:rgba(124,58,237,.24);background:rgba(124,58,237,.05);color:var(--primary-color);transform:translateY(-1px)}
.inspiration-option.is-active{background:var(--primary-color);border-color:var(--primary-color);color:#fff;box-shadow:0 8px 18px rgba(124,58,237,.18)}
.inspiration-toggle{display:inline-flex;align-items:center;gap:.5rem;padding:.625rem 1rem;border:0;border-radius:var(--radius-full);background:rgba(124,58,237,.06);color:var(--primary-color);font-size:.875rem;font-weight:500;cursor:pointer;transition:all 180ms ease;min-height:42px}
.inspiration-toggle:hover{background:rgba(124,58,237,.12);transform:translateY(-1px)}
.inspiration-toggle:active{transform:scale(.98)}
.inspiration-toggle.is-active{background:var(--primary-color);color:#fff;box-shadow:0 8px 18px rgba(124,58,237,.22)}
.inspiration-toggle-icon{font-size:1rem}
.inspiration-search-area{margin-top:.75rem;display:none;animation:softPopup 220ms ease both}
.inspiration-search-area.is-open{display:block}
.inspiration-search-container{position:relative}
.inspiration-search-input{width:100%;padding:.75rem;border:0;border-radius:var(--radius-md);background:#F8FAFC;box-shadow:inset 0 0 0 1px rgba(148,163,184,.12);font-size:.875rem;outline:none;transition:box-shadow 180ms ease,background 180ms ease}
.inspiration-search-input:focus{background:#252050;box-shadow:inset 0 0 0 1px rgba(124,58,237,.22),0 0 0 4px rgba(124,58,237,.08)}
.inspiration-search-suggestions{position:absolute;top:100%;left:0;right:0;background:#252050;border:0;border-radius:var(--radius-md);box-shadow:0 16px 42px rgba(31,41,55,.12);margin-top:4px;max-height:200px;overflow-y:auto;display:none;z-index:10;animation:softPopup 220ms ease both}
.inspiration-search-suggestions.active{display:block}
.inspiration-search-item{padding:.75rem;cursor:pointer;display:flex;align-items:center;gap:.75rem;transition:background 150ms ease}
.inspiration-search-item:hover{background:var(--bg-primary)}
.inspiration-search-item.is-self{opacity:.45;cursor:not-allowed}
.inspiration-search-avatar{width:32px;height:32px;border-radius:50%;background:linear-gradient(135deg,var(--primary-color),var(--accent-color));display:flex;align-items:center;justify-content:center;color:#fff;font-size:.875rem;flex-shrink:0}
.inspiration-search-name{font-weight:500}
.inspiration-search-username{color:var(--text-secondary);font-size:.75rem}
.inspiration-search-title{font-weight:600;font-size:.875rem;color:var(--text-primary);line-height:1.35}
.inspiration-search-meta{color:var(--text-secondary);font-size:.75rem;margin-top:2px}
.inspiration-search-empty{padding:1rem .75rem;text-align:center;color:var(--text-light);font-size:.8125rem}
.inspiration-selected{display:flex;align-items:center;gap:.625rem;padding:.625rem .875rem;background:linear-gradient(135deg,rgba(124,58,237,.06),rgba(252,211,77,.08));border-radius:var(--radius-md);margin-top:.75rem;animation:softPopup 220ms ease both}
.inspiration-selected-avatar{width:32px;height:32px;border-radius:50%;background:linear-gradient(135deg,var(--primary-color),var(--accent-color));display:flex;align-items:center;justify-content:center;color:#fff;font-size:.875rem;flex-shrink:0}
.inspiration-selected-info{flex:1;min-width:0}
.inspiration-selected-name{font-weight:500;font-size:.875rem}
.inspiration-selected-hint{font-size:.6875rem;color:var(--primary-color);margin-top:2px}
.inspiration-selected-remove{background:none;border:none;color:var(--text-light);cursor:pointer;font-size:1.25rem;padding:.25rem;line-height:1;transition:color 150ms ease}
.inspiration-selected-remove:hover{color:#EF4444}

/* ═══════════════════════════════════════════
   Homepage single-screen entrance
   ═══════════════════════════════════════════ */
#homeCanvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100dvh;
  min-height: 100svh;
  z-index: 0;
  pointer-events: none;
}

.home-page {
  --text-primary: #E2E8F0;
  --text-secondary: rgba(226, 232, 240, 0.72);
  --text-light: rgba(226, 232, 240, 0.52);
  --border-color: rgba(255, 255, 255, 0.12);
  min-height: 100dvh;
  overflow-x: hidden;
  background: transparent;
  color: var(--text-primary);
}

.home-shell {
  position: relative;
  z-index: 1;
  min-height: calc(100dvh - 50px);
  display: grid;
  place-items: center;
  padding: clamp(1.2rem, 4vh, 3rem) 0 clamp(2rem, 7vh, 4rem);
}

.home-page .banner {
  width: 100%;
  padding: 0;
  background: transparent;
  color: var(--text-primary);
  overflow: visible;
}

.home-page .banner .container {
  max-width: 760px;
}

.home-page .banner-content {
  position: relative;
  z-index: 2;
  display: grid;
  justify-items: center;
  text-align: center;
  gap: 1.15rem;
  padding: 0 0.25rem;
}

.home-intro {
  display: grid;
  justify-items: center;
  gap: 1.15rem;
  margin-top: -1.5rem;
  transition: opacity 360ms ease, transform 360ms ease, filter 360ms ease;
}


.hero-gradient-text {
  position: relative;
  margin: -2.8rem 0 0;
  max-width: 100%;
  color: #1F2937;
  font-size: clamp(2rem, 6.2vw, 4rem);
  font-weight: 760;
  line-height: 1.18;
  letter-spacing: 0;
  background: linear-gradient(180deg, #ffffff 0%, #c4b5fd 65%, #a78bfa 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-wrap: balance;
}

.hero-sub-line {
  position: relative;
  display: grid;
  gap: 0.25rem;
  margin: 0.2rem 0 0;
  max-width: 100%;
  color: rgba(226, 232, 240, 0.84);
  font-size: clamp(1.22rem, 3.7vw, 2rem);
  font-weight: 520;
  line-height: 1.42;
  letter-spacing: 0;
  background: none;
  -webkit-text-fill-color: currentColor;
}

.hero-sub-line span {
  display: block;
}

.home-page .banner-actions {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 0.85rem;
  position: relative;
  top: auto;
  margin-top: 1.15rem;
}

.home-page .banner-actions-row {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.85rem;
}

.home-page .banner-actions > .btn-hero-about {
  flex: 0 0 auto;
}

.home-page .banner-actions .btn {
  min-width: 136px;
  min-height: 48px;
  padding: 0.72rem 1.35rem;
  border-radius: var(--radius-full);
  font-size: 0.95rem;
  font-weight: 650;
  letter-spacing: 0;
}

.home-page .btn-primary {
  position: relative;
  overflow: hidden;
  color: #ffffff;
  background: linear-gradient(135deg, #7C3AED, #8B5CF6);
  border: 1px solid rgba(196, 181, 253, 0.48);
  box-shadow: 0 0 24px rgba(124, 58, 237, 0.3);
}

.home-page .btn-primary::before {
  content: '';
  position: absolute;
  inset: -35% -55%;
  background:
    linear-gradient(115deg, transparent 26%, rgba(255, 255, 255, 0.18) 44%, rgba(252, 211, 77, 0.22) 50%, rgba(255, 255, 255, 0.14) 56%, transparent 74%);
  transform: translateX(-70%) rotate(3deg);
  animation: homeButtonGlow 4.8s ease-in-out infinite;
  pointer-events: none;
}

.home-page .btn-primary::after {
  content: '';
  position: absolute;
  inset: 1px;
  border-radius: 7px;
  background: radial-gradient(circle at 18% 20%, rgba(255, 255, 255, 0.16), transparent 34%);
  opacity: 0.8;
  pointer-events: none;
}

.home-page .btn-primary {
  isolation: isolate;
}

.home-page .btn-primary > * {
  position: relative;
  z-index: 1;
}

.home-page .btn-primary:hover {
  background: linear-gradient(135deg, #6D28D9, #7C3AED);
  box-shadow: 0 0 32px rgba(124, 58, 237, 0.4);
  transform: translateY(-1px);
}

.home-page .btn-hero-secondary {
  color: rgba(255, 255, 255, 0.85);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.home-page .btn-hero-secondary:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.28);
  transform: translateY(-1px);
}

.home-page .btn-hero-about {
  min-width: auto;
  min-height: 44px;
  color: rgba(226, 232, 240, 0.66);
  background: transparent;
  border: 0;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  font-size: 0.92rem;
  font-weight: 600;
}

.home-page .btn-hero-about:hover {
  color: #FFFFFF;
  background: rgba(255, 255, 255, 0.06);
  box-shadow: none;
  transform: translateY(-1px);
}

.home-about-panel[hidden] {
  display: none;
}

.home-about-panel {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 4;
  width: min(760px, calc(100vw - 2rem));
  max-height: min(72vh, 680px);
  padding: 1.25rem 0.5rem 1rem;
  color: rgba(226, 232, 240, 0.88);
  outline: none;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: rgba(196, 181, 253, 0.28) transparent;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -55%) scale(0.985);
  text-align: center;
  text-shadow: 0 2px 18px rgba(5, 3, 16, 0.72);
}

.home-about-panel::-webkit-scrollbar {
  width: 6px;
}

.home-about-panel::-webkit-scrollbar-thumb {
  background: rgba(196, 181, 253, 0.28);
  border-radius: 999px;
}

.about-back-wrapper {
  display: none;
  position: relative;
  z-index: 101;
  padding: 32px max(1rem, calc((100% - 1200px) / 2)) 0;
}

body.home-about-open .about-back-wrapper {
  display: block;
  pointer-events: auto;
}

.home-about-close {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.5rem 1rem;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.75);
  background: rgba(255, 255, 255, 0.06);
  cursor: pointer;
  font: inherit;
  font-size: 0.95rem;
  transition: color 180ms ease, background 180ms ease, border-color 180ms ease;
}

.home-about-close:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.4);
}

.about-actions {
  display: none;
  justify-content: center;
  gap: 0.75rem;
  padding: 1rem 0 0;
}

body.home-about-open .about-actions {
  display: flex;
}

.about-action-btn {
  display: inline-block;
  padding: 0.4rem 1rem;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.8rem;
  text-decoration: none;
  transition: color 180ms ease, background 180ms ease, border-color 180ms ease;
}

.about-action-btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.35);
}

.home-about-copy {
  display: grid;
  justify-items: center;
  gap: 0.55rem;
  padding: 0 0.4rem 1rem;
  animation: aboutCopyBreath 8.5s ease-in-out infinite;
}

.home-about-copy h3 {
  margin: 2rem 0 0.35rem;
  color: #C4B5FD;
  font-size: clamp(1.15rem, 4vw, 1.5rem);
  font-weight: 700;
  line-height: 1.45;
}

.home-about-copy h3:first-child {
  margin-top: 0;
}

.home-about-copy p {
  max-width: 34em;
  margin: 0;
  color: #fff;
  font-size: clamp(1.05rem, 3vw, 1.2rem);
  line-height: 1.9;
  letter-spacing: 0;
}

body.home-about-open .home-intro {
  opacity: 0;
  pointer-events: none;
  transform: translateY(-12px) scale(0.985);
  filter: blur(2px);
}

body.home-about-open .home-about-panel {
  pointer-events: auto;
  animation: aboutPanelIn 420ms ease both;
}

body.home-about-open .footer {
  opacity: 0;
  pointer-events: none;
}

@keyframes aboutBreathGlow {
  0%, 100% {
    box-shadow: 0 0 16px rgba(252, 211, 77, 0.22), 0 0 36px rgba(252, 211, 77, 0.04), inset 0 1px 0 rgba(255, 255, 255, 0.34);
    filter: saturate(0.98) brightness(0.99);
  }
  50% {
    box-shadow: 0 0 30px rgba(252, 211, 77, 0.42), 0 0 72px rgba(252, 211, 77, 0.16), 0 0 112px rgba(167, 139, 250, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.42);
    filter: saturate(1.06) brightness(1.03);
  }
}

@keyframes aboutBreathGlowHover {
  0%, 100% {
    box-shadow: 0 0 26px rgba(252, 211, 77, 0.38), 0 0 58px rgba(252, 211, 77, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.4);
    filter: saturate(1.02) brightness(1.01);
  }
  50% {
    box-shadow: 0 0 42px rgba(252, 211, 77, 0.58), 0 0 92px rgba(252, 211, 77, 0.22), 0 0 132px rgba(167, 139, 250, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.46);
    filter: saturate(1.08) brightness(1.04);
  }
}

@keyframes aboutPanelIn {
  from {
    opacity: 0;
    transform: translate(-50%, -30%) scale(0.985);
    filter: blur(2px);
  }
  to {
    opacity: 1;
    transform: translate(-50%, -72%) scale(1);
    filter: blur(0);
  }
}

@keyframes aboutCopyBreath {
  0%, 100% {
    opacity: 0.84;
  }
  50% {
    opacity: 1;
  }
}

.home-page .banner {
  transition: opacity 220ms ease, transform 220ms ease, filter 220ms ease;
}

@keyframes homeButtonGlow {
  0%, 38% {
    opacity: 0;
    transform: translateX(-70%) rotate(3deg);
  }
  52% {
    opacity: 1;
  }
  74%, 100% {
    opacity: 0;
    transform: translateX(70%) rotate(3deg);
  }
}

@media (max-width: 640px) {
  .home-page {
    min-height: 100dvh;
  }

  .home-shell {
    min-height: calc(100dvh - 45px);
    padding: 2rem 0 2.35rem;
    align-items: center;
  }

  .home-page .banner .container {
    padding: 0 1.15rem;
  }

  .home-page .banner-content {
    gap: 0.8rem;
  }

  .home-page .banner-actions {
    width: 100%;
    gap: 0.65rem;
    margin-top: 1.1rem;
  }

  .home-page .banner-actions .btn {
    flex: 1 1 144px;
    min-width: min(100%, 144px);
  }

  .home-page .banner-actions-row .btn {
    flex: 0 1 auto;
    min-width: 0;
  }

  .home-page .banner-actions > .btn-hero-about {
    flex: 0 0 auto;
    min-width: auto;
  }
}

@media (max-width: 380px) {
  .home-page .banner-actions .btn {
    flex-basis: 100%;
  }

  .home-page .banner-actions-row .btn {
    flex-basis: auto;
    min-width: 0;
  }

  .home-page .banner-actions > .btn-hero-about {
    flex-basis: auto;
  }
}

/* ═══════════════════════════════════════════
   Global .top-bar navbar
   Replaces .navbar on all pages
   ═══════════════════════════════════════════ */
.top-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: 8px max(1rem, calc((100% - 1200px) / 2));
  background: rgba(10, 5, 32, 0.82);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-radius: 0;
  border: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  flex-shrink: 0;
  /* 智能吸顶：平滑显示/隐藏 */
  transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: transform;
}

/* 向下滚动时隐藏导航栏 */
.top-bar.is-scrolled-hidden {
  transform: translateY(-100%);
}

.top-bar .brand {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.95rem;
  font-weight: 700;
  color: #fff;
  cursor: pointer;
  text-decoration: none;
  width: fit-content;
  max-width: 100%;
}

.top-bar .brand span {
  font-size: 1.1rem;
}

.top-bar nav {
  display: flex;
  gap: 2px;
  flex-wrap: wrap;
}

/* Desktop: nav 居中 */
@media (min-width: 641px) {
  .top-bar nav {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
  }
}

.top-bar nav a {
  color: rgba(255, 255, 255, 0.65);
  text-decoration: none;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  transition: all 0.2s;
  white-space: nowrap;
}

.top-bar nav a:hover,
.top-bar nav a.active {
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
}

/* ── 搜索展开时：导航栏与搜索框使用完全一致的背景，消除一切缝隙 ── */
.top-bar.search-expanded {
  border-bottom: none;
  background: #100C2B;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

/* ── 导航栏内”搜索”项：始终为普通链接样式，不保留选中态 ── */
.top-bar nav a[data-search-nav]:hover,
.top-bar nav a[data-search-nav]:focus,
.top-bar nav a[data-search-nav]:focus-visible {
  color: rgba(255, 255, 255, 0.65);
  background: transparent;
  outline: none;
}

/* 搜索只是功能开关，不参与页面导航选中态 */
.top-bar[data-search-active="1"] nav a[data-search-nav] {
  color: rgba(255, 255, 255, 0.65);
  background: transparent;
}

/* 搜索项任何时候都保持未选中状态，避免和当前页面同时高亮 */
.top-bar nav a[data-search-nav],
.top-bar nav a[data-search-nav]:hover,
.top-bar nav a[data-search-nav]:focus,
.top-bar nav a[data-search-nav]:focus-visible,
.top-bar nav a[data-search-nav]:active,
.top-bar nav a[data-search-nav].active {
  color: rgba(255, 255, 255, 0.65) !important;
  background: transparent !important;
  outline: none;
}
/* ═══════════════════════════════════════════
   导航栏下方搜索栏 — 从导航栏自然延伸展开
   ═══════════════════════════════════════════ */
.nav-search-bar {
  position: fixed;
  left: 0;
  right: 0;
  z-index: 99;
  --nav-search-overlap: 1px;
  /* 与导航栏背景色一致，不使用 backdrop-filter 避免边界双倍模糊产生缝隙 */
  background: #100C2B;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  border-top: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  padding: 10px max(1rem, calc((100% - 1200px) / 2)) 14px;
  overflow: hidden;
  /* 从上往下展开，而不是从上方滑入 */
  clip-path: inset(0 0 100% 0);
  pointer-events: none;
  transition: clip-path 0.3s cubic-bezier(0.4, 0, 0.2, 1), transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-search-bar.is-open {
  clip-path: inset(0 0 0 0);
  pointer-events: auto;
}

/* 导航栏隐藏时搜索栏跟随滑出，与 top-bar 共享同一动画曲线
   hide offset 由 JS 动态计算（nav-bar 高度 + 搜索栏自身高度），
   确保两者像一整块布一样同步消失 */
.nav-search-bar.is-scrolled-hidden {
  transform: translateY(var(--search-bar-scroll-hide, -120px));
}

.nav-search-bar-inner {
  display: flex;
  align-items: center;
  width: 100%;
}

/* 搜索图标（search bar 内） */
.search-bar-icon {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: rgba(255, 255, 255, 0.45);
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
  margin-right: 10px;
}

/* 搜索输入框（内联胶囊） */
.search-bar-input-wrap {
  display: flex;
  align-items: center;
  flex: 1 1 auto;
  width: 100%;
  height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  transition: border-color 180ms ease, background 180ms ease;
}

.search-bar-input-wrap:focus-within {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.28);
}

.search-bar-input-wrap input {
  flex: 1 1 auto;
  min-width: 0;
  height: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: #FFFFFF;
  font-size: 0.875rem;
  font-family: inherit;
  caret-color: #A78BFA;
}

.search-bar-input-wrap input::placeholder {
  color: rgba(255, 255, 255, 0.35);
  user-select: none;
}

.search-bar-input-wrap input::-webkit-search-decoration,
.search-bar-input-wrap input::-webkit-search-cancel-button,
.search-bar-input-wrap input::-webkit-search-results-button,
.search-bar-input-wrap input::-webkit-search-results-decoration {
  -webkit-appearance: none;
}

.search-bar-input-wrap input::selection {
  background: rgba(167, 139, 250, 0.4);
  color: #FFFFFF;
}

/* 清除按钮（search bar 内） */
.search-bar-clear {
  display: none;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  color: rgba(255, 255, 255, 0.7);
  cursor: pointer;
  flex: 0 0 20px;
  font-size: 0.65rem;
  line-height: 1;
  padding: 0;
  margin-left: 8px;
  transition: background 150ms ease;
}

.search-bar-clear:hover {
  background: rgba(255, 255, 255, 0.28);
  color: #FFFFFF;
}

.search-bar-clear.is-visible {
  display: inline-flex;
}

/* 搜索 loading 指示器 */
.search-bar-spinner {
  display: none;
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-top-color: rgba(255, 255, 255, 0.7);
  border-radius: 50%;
  margin-left: 8px;
  flex: 0 0 14px;
  animation: searchBarSpin 0.6s linear infinite;
}

.search-bar-spinner.is-visible {
  display: inline-block;
}

@keyframes searchBarSpin {
  to { transform: rotate(360deg); }
}

/* ═══════════════════════════════════════════
   搜索结果面板 — 导航栏下方下拉
   ═══════════════════════════════════════════ */
.search-bar-results {
  position: fixed;
  z-index: 200;
  display: none;
  flex-direction: column;
  border-radius: 12px;
  background: #FFFFFF;
  box-shadow: 0 16px 42px rgba(15, 23, 42, 0.2);
  border: 1px solid rgba(229, 231, 235, 0.9);
  max-height: 360px;
  overflow-y: auto;
  overflow-x: hidden;
  margin-top: 6px;
}

.search-bar-results.is-open {
  display: flex;
  animation: softPopup 180ms ease both;
}

/* 搜索结果分组标题 */
.search-bar-section-title {
  padding: 0.55rem 1rem 0.25rem;
  font-size: 0.7rem;
  font-weight: 800;
  color: #9CA3AF;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.search-bar-section-title:first-child {
  padding-top: 0.7rem;
}

/* 搜索结果条目 */
.search-bar-result-item {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  padding: 0.55rem 1rem;
  border: 0;
  background: transparent;
  width: 100%;
  text-align: left;
  cursor: pointer;
  transition: background 140ms ease;
  color: inherit;
  font-family: inherit;
}

.search-bar-result-item:hover {
  background: #F5F3FF;
}

.search-bar-result-icon {
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: #FFFFFF;
  color: #6B7280;
  font-size: 0.82rem;
  flex-shrink: 0;
}

.search-bar-result-body {
  min-width: 0;
  flex: 1 1 auto;
}

.search-bar-result-title {
  color: #111827;
  font-size: 0.875rem;
  font-weight: 700;
  line-height: 1.35;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.search-bar-result-title mark {
  background: #F5F3FF;
  color: #7C3AED;
  border-radius: 2px;
  padding: 0 1px;
}

.search-bar-result-meta {
  margin-top: 0.15rem;
  color: #9CA3AF;
  font-size: 0.72rem;
  line-height: 1.4;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.search-bar-result-badge {
  flex-shrink: 0;
  font-size: 0.65rem;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 999px;
  background: #FFFFFF;
  color: #6B7280;
  white-space: nowrap;
  margin-top: 1px;
}

/* 搜索空状态 */
.search-bar-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
  gap: 0.5rem;
  color: #9CA3AF;
  font-size: 0.82rem;
}

.search-bar-empty-icon {
  font-size: 1.4rem;
  opacity: 0.6;
}

/* 搜索错误状态 */
.search-bar-error {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem 1rem;
  color: #9CA3AF;
  font-size: 0.78rem;
  gap: 0.35rem;
}

/* ── 响应式：平板 ── */
@media (min-width: 641px) and (max-width: 1024px) {
  .search-bar-results {
    width: 400px;
  }
}

/* ── 响应式：移动端 ── */
@media (max-width: 640px) {
  .nav-search-bar {
    padding: 6px 12px 10px;
  }

  .search-bar-input-wrap {
    height: 30px;
    padding: 0 10px;
  }

  .search-bar-input-wrap input {
    font-size: 0.8rem;
  }

  .search-bar-results {
    left: 8px !important;
    right: 8px !important;
    width: auto !important;
    max-width: none;
  }
}

.top-bar-actions {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-shrink: 0;
  margin-left: auto;
}

.floating-submit-btn {
  position: fixed;
  right: 1rem;
  bottom: calc(1rem + env(safe-area-inset-bottom));
  z-index: 80;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid rgba(0, 0, 0, 0.08);
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  color: #9CA3AF;
  transition: background 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease, color 0.18s ease;
}

.floating-submit-btn:hover {
  background: rgba(255, 255, 255, 0.92);
  color: #6B7280;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.09);
  transform: translateY(-1px);
}

.floating-submit-btn:active {
  transform: scale(0.94);
  background: rgba(255, 255, 255, 0.96);
  color: #4B5563;
}

.notification-btn {
  position: relative;
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: var(--radius-full);
  background: transparent;
  color: #FFFFFF;
  cursor: pointer;
  transition: transform 180ms ease, background 180ms ease;
}

.notification-btn:hover,
.notification-btn.is-open {
  background: rgba(255, 255, 255, 0.12);
  transform: translateY(-1px);
}

.notification-btn:active {
  transform: scale(0.96);
}

.notification-btn svg {
  width: 20px;
  height: 20px;
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.notification-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 17px;
  height: 17px;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  border-radius: var(--radius-full);
  background: #EF4444;
  color: #FFFFFF;
  border: 2px solid rgba(10, 5, 32, 0.96);
  font-size: 0.625rem;
  font-weight: 800;
  line-height: 1;
}

.notification-btn.has-unread .notification-badge {
  display: flex;
}

.notification-panel {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 220;
  width: min(360px, calc(100vw - 20px));
  max-height: min(520px, calc(100dvh - 78px));
  display: none;
  overflow: hidden;
  border-radius: 14px;
  background: rgba(10, 5, 32, 0.96);
  box-shadow: 0 20px 54px rgba(0, 7, 30, 0.38);
  border: 1px solid rgba(188, 218, 255, 0.16);
}

.notification-panel.is-open {
  display: flex;
  flex-direction: column;
  animation: softPopup 180ms ease both;
}

.notification-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.95rem 1rem 0.75rem;
  border-bottom: 1px solid rgba(188, 218, 255, 0.14);
}

.notification-panel-title {
  color: #FFFFFF;
  font-size: 0.95rem;
  font-weight: 800;
}

.notification-read-all {
  border: 0;
  background: transparent;
  color: rgba(231, 241, 255, 0.68);
  font-size: 0.75rem;
  font-weight: 800;
  cursor: pointer;
  padding: 0.25rem 0;
}

.notification-read-all:hover {
  color: #FFFFFF;
}

.notification-list {
  overflow-y: auto;
  padding: 0.35rem;
}

.notification-row {
  position: relative;
  overflow: hidden;
  border-radius: 10px;
  touch-action: pan-y;
}

.notification-item {
  position: relative;
  z-index: 1;
  width: 100%;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 0.7rem;
  border: 0;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.05);
  padding: 0.75rem;
  text-align: left;
  cursor: pointer;
  transition: background 160ms ease, transform 180ms ease;
}

.notification-row.is-swiped .notification-item {
  transform: translateX(-76px);
}

.notification-item:hover {
  background: rgba(255, 255, 255, 0.08);
}

.notification-item.is-unread {
  background: rgba(124, 58, 237, 0.18);
}

.notification-item.is-unread:hover {
  background: rgba(124, 58, 237, 0.22);
}

.notification-delete {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 72px;
  border: 0;
  border-radius: 0 10px 10px 0;
  background: #EF4444;
  color: #FFFFFF;
  font-size: 0.8125rem;
  font-weight: 800;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transition: opacity 120ms ease;
}

.notification-row.is-swiped .notification-delete {
  opacity: 1;
  pointer-events: auto;
}

.notification-icon,
.notification-avatar {
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, #7C3AED, #54A3FF);
  color: #FFFFFF;
  font-size: 0.9rem;
  font-weight: 800;
  background-size: cover;
  background-position: center;
  flex-shrink: 0;
}

.notification-avatar.has-image {
  color: transparent;
}

.notification-content {
  min-width: 0;
}

.notification-title {
  color: #FFFFFF;
  font-size: 0.875rem;
  font-weight: 800;
  line-height: 1.35;
}

.notification-nickname {
  margin-right: 0.35rem;
}

.notification-action-text {
  color: rgba(231, 241, 255, 0.78);
  font-weight: 750;
}

.notification-message {
  margin-top: 0.18rem;
  color: rgba(231, 241, 255, 0.58);
  font-size: 0.78rem;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.notification-meta {
  margin-top: 0.28rem;
  color: rgba(231, 241, 255, 0.42);
  font-size: 0.72rem;
  font-weight: 700;
}

.notification-empty {
  padding: 2.5rem 1rem;
  color: rgba(231, 241, 255, 0.58);
  text-align: center;
  font-size: 0.875rem;
}

.profile-stats,
.user-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.55rem;
}

.profile-stat,
.user-stat {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 0.72rem;
  border: 1px solid rgba(188, 218, 255, 0.16);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: rgba(231, 241, 255, 0.78);
  font-size: 0.78rem;
  font-weight: 850;
  line-height: 1;
}

@media (max-width: 640px) {
  .profile-stats,
  .user-stats {
    justify-content: center;
  }
}

.user-actions {
  gap: 0.55rem;
  flex-wrap: wrap;
}

.follow-user-btn {
  min-width: 88px;
  min-height: 38px;
  padding: 0 1rem;
  border-radius: 999px;
  background: linear-gradient(135deg, #8354ef, #6f72e7);
  color: #FFFFFF;
  font-size: 0.84rem;
  font-weight: 850;
  box-shadow: 0 10px 28px rgba(91, 74, 210, 0.24);
}

.follow-user-btn.is-following {
  border: 1px solid rgba(188, 218, 255, 0.18);
  background: rgba(255, 255, 255, 0.08);
  color: rgba(231, 241, 255, 0.86);
  box-shadow: none;
}

.follow-action-menu {
  position: fixed;
  z-index: 260;
  min-width: 132px;
  padding: 0.35rem;
  border: 1px solid rgba(188, 218, 255, 0.16);
  border-radius: 14px;
  background: rgba(10, 5, 32, 0.97);
  box-shadow: 0 18px 48px rgba(0, 7, 30, 0.38);
}

.follow-action-menu button {
  width: 100%;
  min-height: 34px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: rgba(231, 241, 255, 0.82);
  font: inherit;
  font-size: 0.82rem;
  font-weight: 800;
  text-align: left;
  cursor: pointer;
  padding: 0 0.7rem;
}

.follow-action-menu button:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #FFFFFF;
}

.follow-remark-overlay {
  position: fixed;
  inset: 0;
  z-index: 270;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgba(3, 7, 24, 0.64);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.follow-remark-overlay.is-open {
  display: flex;
}

.follow-remark-modal {
  width: min(360px, 100%);
  padding: 1rem;
  border: 1px solid rgba(188, 218, 255, 0.18);
  border-radius: 20px;
  background: rgba(9, 27, 70, 0.96);
  color: #FFFFFF;
  box-shadow: 0 24px 72px rgba(0, 7, 30, 0.46);
}

.follow-remark-title {
  margin: 0 0 0.8rem;
  font-size: 1rem;
  font-weight: 900;
}

.follow-remark-input {
  width: 100%;
  min-height: 42px;
  border: 1px solid rgba(188, 218, 255, 0.18);
  border-radius: 14px;
  background: rgba(4, 15, 42, 0.46);
  color: #FFFFFF;
  font: inherit;
  font-weight: 750;
  padding: 0 0.8rem;
  outline: none;
}

.follow-remark-input:focus {
  border-color: rgba(167, 139, 250, 0.72);
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.18);
}

.follow-remark-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.55rem;
  margin-top: 0.9rem;
}

.follow-user-sheet-backdrop,
.follow-confirm-backdrop {
  position: fixed;
  inset: 0;
  z-index: 280;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0 0 calc(1rem + env(safe-area-inset-bottom, 0px));
  background: rgba(3, 7, 24, 0.56);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.follow-user-sheet {
  width: min(420px, calc(100% - 24px));
  padding: 0.45rem;
  border: 1px solid rgba(188, 218, 255, 0.18);
  border-radius: 22px;
  background:
    radial-gradient(circle at 28% 16%, rgba(230, 244, 255, 0.12), transparent 42%),
    rgba(9, 27, 70, 0.96);
  box-shadow: inset 0 0 0 1px rgba(216, 234, 255, 0.07), 0 24px 72px rgba(0, 7, 30, 0.48);
}

.follow-user-sheet-option,
.follow-user-sheet-cancel {
  width: 100%;
  min-height: 48px;
  border: 0;
  border-radius: 16px;
  background: transparent;
  color: rgba(231, 241, 255, 0.88);
  font: inherit;
  font-size: 0.95rem;
  font-weight: 850;
  cursor: pointer;
}

.follow-user-sheet-option:hover,
.follow-user-sheet-cancel:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #FFFFFF;
}

.follow-user-sheet-option.is-danger {
  color: rgba(255, 135, 135, 0.94);
}

.follow-user-sheet-cancel {
  margin-top: 0.25rem;
  color: rgba(231, 241, 255, 0.68);
}

.follow-confirm-backdrop {
  align-items: center;
  padding: 1rem;
  z-index: 290;
}

.follow-confirm-dialog {
  width: min(360px, 100%);
  padding: 1rem;
  border: 1px solid rgba(188, 218, 255, 0.18);
  border-radius: 22px;
  background:
    radial-gradient(circle at 28% 16%, rgba(230, 244, 255, 0.12), transparent 42%),
    rgba(9, 27, 70, 0.97);
  color: #FFFFFF;
  box-shadow: inset 0 0 0 1px rgba(216, 234, 255, 0.07), 0 24px 72px rgba(0, 7, 30, 0.48);
}

.follow-confirm-dialog h3 {
  margin: 0;
  color: #FFFFFF;
  font-size: 1.02rem;
  font-weight: 900;
  line-height: 1.4;
}

.follow-confirm-dialog p {
  margin: 0.45rem 0 1rem;
  color: rgba(231, 241, 255, 0.66);
  font-size: 0.86rem;
  font-weight: 700;
  line-height: 1.65;
}

.follow-confirm-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.6rem;
}

.follow-confirm-actions button {
  min-height: 42px;
  border: 0;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(231, 241, 255, 0.86);
  font: inherit;
  font-weight: 850;
  cursor: pointer;
}

.follow-confirm-actions [data-follow-confirm="unfollow"] {
  background: rgba(255, 98, 98, 0.18);
  color: rgba(255, 145, 145, 0.96);
}

.following-page.moment-square-page {
  position: relative;
  min-height: 100svh;
  padding: calc(4.35rem - 1cm) 1rem 3rem;
  color: var(--moment-ink, #F2F7FF);
  background: transparent;
}

.following-shell {
  width: min(720px, 100%);
  margin: 0 auto;
  display: grid;
  gap: 1rem;
}

.following-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem;
}

.following-title {
  margin: 0;
  color: #FFFFFF;
  font-size: 1.35rem;
  font-weight: 950;
  line-height: 1.25;
}

.following-tabs {
  display: inline-flex;
  gap: 0.28rem;
  padding: 0.22rem;
  border: 1px solid rgba(188, 218, 255, 0.16);
  border-radius: 999px;
  background: rgba(7, 27, 70, 0.36);
  box-shadow: inset 0 0 0 1px rgba(216, 234, 255, 0.04), 0 14px 34px rgba(0, 8, 28, 0.16);
  backdrop-filter: blur(12px) saturate(1.04);
  -webkit-backdrop-filter: blur(12px) saturate(1.04);
}

.following-tab {
  min-height: 34px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: rgba(231, 241, 255, 0.62);
  font: inherit;
  font-size: 0.8rem;
  font-weight: 900;
  padding: 0 0.78rem;
  cursor: pointer;
}

.following-tab.is-active {
  background: rgba(231, 241, 255, 0.12);
  color: #FFFFFF;
}

.following-panel {
  display: none;
}

.following-panel.is-active {
  display: block;
}

.following-feed-list,
.following-user-list {
  display: grid;
  gap: 0.75rem;
}

.following-moment-card.moment-bubble {
  position: relative;
  left: auto;
  top: auto;
  width: 100%;
  min-height: 0;
  opacity: 1;
  transform: none;
  cursor: pointer;
  padding: 0.8rem;
  border-color: rgba(188, 218, 255, 0.16);
  border-radius: 18px;
  background:
    radial-gradient(circle at 30% 20%, rgba(218, 236, 255, 0.08), transparent 42%),
    rgba(7, 27, 70, 0.46);
  box-shadow: inset 0 0 0 1px rgba(216, 234, 255, 0.05), 0 12px 36px rgba(0, 8, 28, 0.18);
  backdrop-filter: blur(8px) saturate(1.04);
  -webkit-backdrop-filter: blur(8px) saturate(1.04);
  contain: none;
}

.following-moment-card .moment-bubble-avatar {
  width: 30px;
  height: 30px;
  flex-basis: 30px;
  font-size: 0.78rem;
}

.following-moment-card .moment-bubble-name {
  font-size: 0.8rem;
}

.following-moment-card .moment-bubble-time {
  font-size: 0.66rem;
}

.following-moment-card .moment-bubble-text {
  font-size: 0.9rem;
  line-height: 1.7;
  -webkit-line-clamp: unset;
}

.following-moment-card .moment-bubble-media {
  aspect-ratio: 1.75 / 1;
  margin-top: 0.12rem;
}

.following-moment-card .moment-bubble-actions {
  gap: 0.5rem;
  margin-top: 0.1rem;
}

.following-moment-card .moment-action-btn {
  min-height: 34px;
  padding: 0 0.78rem;
  font-size: 0.78rem;
}

.following-user-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.78rem;
  padding: 0.82rem;
  border: 1px solid rgba(188, 218, 255, 0.16);
  border-radius: 20px;
  background:
    radial-gradient(circle at 24% 20%, rgba(218, 236, 255, 0.08), transparent 42%),
    rgba(7, 27, 70, 0.42);
  box-shadow: inset 0 0 0 1px rgba(216, 234, 255, 0.045), 0 12px 36px rgba(0, 8, 28, 0.16);
  backdrop-filter: blur(10px) saturate(1.04);
  -webkit-backdrop-filter: blur(10px) saturate(1.04);
}

.following-user-avatar {
  width: 46px;
  height: 46px;
  border: 0;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #E9B870, #7CA7A0);
  background-position: center;
  background-size: cover;
  color: #171327;
  font: inherit;
  font-size: 1rem;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 10px 26px rgba(0, 6, 28, 0.26);
}

.following-user-main {
  min-width: 0;
}

.following-user-name {
  display: inline-flex;
  max-width: 100%;
  border: 0;
  padding: 0;
  background: transparent;
  color: #FFFFFF;
  font: inherit;
  font-size: 0.96rem;
  font-weight: 900;
  line-height: 1.3;
  text-align: left;
  cursor: pointer;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.following-user-bio {
  margin: 0.18rem 0 0;
  color: rgba(231, 241, 255, 0.64);
  font-size: 0.8rem;
  font-weight: 700;
  line-height: 1.5;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.following-user-meta {
  margin-top: 0.32rem;
  color: rgba(231, 241, 255, 0.48);
  font-size: 0.74rem;
  font-weight: 800;
}

.following-user-follow-btn {
  min-width: 82px;
  min-height: 36px;
  border: 1px solid rgba(188, 218, 255, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(231, 241, 255, 0.86);
  font: inherit;
  font-size: 0.8rem;
  font-weight: 900;
  cursor: pointer;
}

.following-empty {
  padding: 2.4rem 1rem;
  border: 1px solid rgba(188, 218, 255, 0.14);
  border-radius: 24px;
  background: rgba(7, 27, 70, 0.32);
  color: rgba(231, 241, 255, 0.72);
  text-align: center;
  box-shadow: inset 0 0 0 1px rgba(216, 234, 255, 0.04), 0 14px 40px rgba(0, 8, 28, 0.16);
  backdrop-filter: blur(10px) saturate(1.04);
  -webkit-backdrop-filter: blur(10px) saturate(1.04);
}

.following-empty h2 {
  margin: 0;
  color: #FFFFFF;
  font-size: 1.05rem;
  font-weight: 950;
}

.following-empty p {
  margin: 0.45rem auto 1rem;
  max-width: 20rem;
  color: rgba(231, 241, 255, 0.62);
  font-size: 0.86rem;
  font-weight: 700;
  line-height: 1.7;
}

.following-feed-sentinel {
  min-height: 28px;
  color: rgba(231, 241, 255, 0.42);
  font-size: 0.76rem;
  font-weight: 800;
  text-align: center;
}

@media (max-width: 640px) {
  .following-page.moment-square-page {
    padding: calc(4rem - 1cm) 0.7rem 2.4rem;
  }

  .following-top {
    align-items: flex-start;
    flex-direction: column;
  }

  .following-tabs {
    width: 100%;
  }

  .following-tab {
    flex: 1 1 0;
  }

  .following-moment-card .moment-bubble-actions {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .following-moment-card .moment-action-btn {
    padding: 0 0.45rem;
  }

  .following-user-card {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .following-user-follow-btn {
    grid-column: 1 / -1;
    width: 100%;
  }
}

.top-bar .avatar-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, #7C3AED, #FCD34D);
  border: none;
  cursor: pointer;
  color: #fff;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  flex-shrink: 0;
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.top-bar .avatar-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 16px rgba(124, 58, 237, 0.4);
}

.top-bar .avatar-btn:active {
  transform: scale(0.96);
}

/* Responsive top-bar */
@media (max-width: 640px) {
  .top-bar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "brand actions"
      "nav nav";
    row-gap: 0.35rem;
    column-gap: 0.6rem;
    align-items: center;
    padding: 8px 12px;
    top: 0;
    transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1), padding 180ms ease;
  }
  .top-bar .brand {
    grid-area: brand;
    min-width: 0;
    font-size: 0.9rem;
    line-height: 1.15;
  }
  .top-bar .brand span {
    flex: 0 0 auto;
  }
  .top-bar nav {
    grid-area: nav;
    width: 100%;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0;
    padding: 0.16rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
    overflow: hidden;
    opacity: 1;
    pointer-events: auto;
    transform: none;
  }
  .top-bar nav a {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
    min-height: 30px;
    padding: 0 0.35rem;
    border-radius: 999px;
    font-size: 0.74rem;
    font-weight: 700;
    line-height: 1;
  }
  .top-bar-actions {
    grid-area: actions;
    gap: 0.4rem;
  }
  .notification-btn {
    width: 34px;
    height: 34px;
  }
  .login-btn {
    min-height: 34px;
    padding: 0 0.78rem;
    border-radius: 999px;
    font-size: 0.78rem;
  }
}

/* ═══════════════════════════════════════════
   全局返回符号（全站一致）
   ═══════════════════════════════════════════ */
.back-btn {
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-full);
  border: 0;
  background: transparent;
  box-shadow: none;
  color: #6B7280;
  font-size: 1.85rem;
  line-height: 1;
  cursor: pointer;
  user-select: none;
  transition: color 0.18s ease, transform 0.18s ease;
}

.back-btn:hover {
  color: #374151;
}

.back-btn:active {
  transform: scale(0.94);
}

/* ═══════════════════════════════════════════
   微信登录弹窗
   ═══════════════════════════════════════════ */
.login-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: 1rem;
  background: rgba(15, 23, 42, 0.48);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  animation: softBackdrop 220ms ease both;
}

.login-modal {
  width: min(100%, 400px);
  max-height: calc(100dvh - 2rem);
  overflow-y: auto;
  border-radius: 1rem;
  background: #FFFFFF;
  box-shadow: 0 24px 70px rgba(31, 41, 55, 0.18);
  animation: dialogBreathIn 420ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.login-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid #EEF2F7;
}

.login-title {
  font-size: 1.125rem;
  font-weight: 700;
  color: #1F2937;
}

.login-close {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  border: 0;
  background: transparent;
  color: #6B7280;
  cursor: pointer;
  font-size: 1.5rem;
  line-height: 1;
  transition: background 180ms ease, color 180ms ease, transform 180ms ease;
}

.login-close:hover {
  background: rgba(124, 58, 237, 0.08);
  color: var(--primary-color);
}

.login-close:active {
  transform: scale(0.94);
}

.login-body {
  padding: 1.5rem 1.25rem;
}

.login-tabs {
  display: flex;
  gap: 0;
  margin-bottom: 1.5rem;
  border-radius: var(--radius-md);
  background: #FFFFFF;
  padding: 3px;
}

.login-tab {
  flex: 1;
  padding: 0.625rem 0.5rem;
  border: 0;
  border-radius: calc(var(--radius-md) - 2px);
  background: transparent;
  color: #64748B;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 180ms ease;
  white-space: nowrap;
}

.login-tab.active {
  background: #FFFFFF;
  color: var(--primary-color);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.login-tab:hover:not(.active) {
  color: #334155;
}

.login-panel {
  display: none;
  animation: softPopup 220ms ease both;
}

.login-panel.active {
  display: block;
}

/* ── 扫码登录面板 ── */
.login-qrcode-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.login-qrcode-container {
  position: relative;
  width: 220px;
  height: 220px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: #F8FAFC;
  border: 1px solid #EEF2F7;
  display: flex;
  align-items: center;
  justify-content: center;
}

.login-qrcode-container canvas {
  display: block;
  width: 200px;
  height: 200px;
}

.login-qrcode-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  background: rgba(255, 255, 255, 0.92);
  color: #6B7280;
  font-size: 0.875rem;
  font-weight: 600;
  text-align: center;
  padding: 1rem;
}

.login-qrcode-overlay .refresh-icon {
  font-size: 2rem;
}

.login-qrcode-status {
  text-align: center;
  font-size: 0.8125rem;
  color: #6B7280;
  min-height: 1.25rem;
}

.login-qrcode-status.is-success {
  color: #16A34A;
}

.login-qrcode-status.is-error {
  color: #DC2626;
}

.login-qrcode-hint {
  text-align: center;
  font-size: 0.75rem;
  color: #9CA3AF;
  line-height: 1.5;
}

/* ── 微信授权登录面板 ── */
.login-redirect-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
  padding: 0.5rem 0;
}

.login-wechat-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: linear-gradient(135deg, #07C160, #06AD56);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  color: #fff;
  box-shadow: 0 8px 24px rgba(7, 193, 96, 0.28);
}

.btn-wechat {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  max-width: 260px;
  min-height: 48px;
  padding: 0.75rem 1.5rem;
  border: 0;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, #07C160, #06AD56);
  color: #fff;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 180ms ease, box-shadow 180ms ease;
  box-shadow: 0 8px 20px rgba(7, 193, 96, 0.28);
}

.btn-wechat:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 28px rgba(7, 193, 96, 0.36);
}

.btn-wechat:active {
  transform: scale(0.97);
}

.login-redirect-hint {
  font-size: 0.75rem;
  color: #9CA3AF;
  text-align: center;
  line-height: 1.5;
}

/* ── 模拟登录按钮（开发模式） ── */
.login-demo-divider {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  margin-top: 0.25rem;
}

.login-demo-divider::before,
.login-demo-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: #E5E7EB;
}

.login-demo-divider span {
  font-size: 0.6875rem;
  color: #9CA3AF;
  white-space: nowrap;
}

.btn-demo-login {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 260px;
  min-height: 40px;
  padding: 0.5rem 1rem;
  border: 1px dashed #D1D5DB;
  border-radius: var(--radius-full);
  background: transparent;
  color: #9CA3AF;
  font-size: 0.8125rem;
  cursor: pointer;
  transition: all 180ms ease;
}

.btn-demo-login:hover {
  border-color: var(--primary-color);
  color: var(--primary-color);
  background: rgba(124, 58, 237, 0.04);
}

/* ── 登录底部 ── */
.login-footer {
  padding: 1rem 1.25rem;
  border-top: 1px solid #EEF2F7;
  text-align: center;
  font-size: 0.75rem;
  color: #9CA3AF;
}

.login-footer a {
  color: var(--primary-color);
  text-decoration: none;
}

/* ── 顶部栏登录按钮 ── */
.login-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.375rem 0.875rem;
  border: 1px solid rgba(7, 193, 96, 0.5);
  border-radius: var(--radius-full);
  background: rgba(7, 193, 96, 0.12);
  color: #07C160;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 180ms ease;
  white-space: nowrap;
  flex-shrink: 0;
  min-height: 32px;
}

.login-btn:hover {
  background: rgba(7, 193, 96, 0.2);
  border-color: rgba(7, 193, 96, 0.7);
  transform: translateY(-1px);
}

.login-btn:active {
  transform: scale(0.96);
}

/* ── 登录弹窗移动端适配 ── */
@media (max-width: 480px) {
  .login-modal {
    margin: 0 0.5rem;
    border-radius: 1rem 1rem 0 0;
    align-self: flex-end;
    max-height: 85vh;
    animation: loginSlideUp 320ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
  }

  .login-qrcode-container {
    width: 180px;
    height: 180px;
  }

  .login-qrcode-container canvas {
    width: 164px;
    height: 164px;
  }

  .login-overlay {
    align-items: flex-end;
  }
}

@keyframes loginSlideUp {
  from {
    opacity: 0;
    transform: translateY(100%);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ═══════════════════════════════════════════
   Moment sphere square
   ═══════════════════════════════════════════ */
.moment-square-page {
  --moment-ink: #F2F7FF;
  --moment-muted: rgba(220, 232, 255, 0.68);
  --moment-soft: rgba(255, 255, 255, 0.1);
  position: relative;
  min-height: 100svh;
  padding: 5.4rem 0 3rem;
  color: var(--moment-ink);
  background: transparent;
  overflow: visible;
  isolation: isolate;
}

.moment-square-page::before {
  content: none;
}

.moment-square-page::after {
  content: none;
}

.moment-square-shell {
  position: relative;
  width: min(1320px, calc(100% - 1rem));
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
  gap: 0.65rem;
}

.moment-square-copy {
  position: relative;
  z-index: 4;
  display: flex;
  justify-content: center;
  pointer-events: none;
}

.moment-square-hint {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  max-width: calc(100vw - 2rem);
  min-height: 34px;
  margin: 0;
  padding: 0.45rem 0.86rem;
  border: 1px solid rgba(180, 210, 255, 0.16);
  border-radius: 999px;
  background: rgba(12, 21, 48, 0.48);
  color: rgba(237, 245, 255, 0.76);
  font-size: 0.86rem;
  font-weight: 750;
  line-height: 1.35;
  text-align: center;
  backdrop-filter: blur(14px);
}

.moment-square-controls {
  position: fixed;
  right: 1rem;
  bottom: calc(1rem + env(safe-area-inset-bottom, 0px) + 52px);
  z-index: 82;
  display: flex;
  justify-content: flex-end;
  pointer-events: none;
}

.moment-refresh-btn {
  width: 42px;
  height: 42px;
  min-width: 42px;
  min-height: 42px;
  padding: 0;
  border: 1px solid rgba(252, 211, 141, 0.24);
  border-radius: 50%;
  background: rgba(23, 20, 48, 0.74);
  color: rgba(255, 244, 207, 0.9);
  font-family: inherit;
  cursor: pointer;
  pointer-events: auto;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 8px 24px rgba(0, 6, 28, 0.24);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 180ms ease, border-color 180ms ease, color 180ms ease, transform 180ms ease;
}

.moment-refresh-btn svg {
  width: 20px;
  height: 20px;
  display: block;
}

.moment-refresh-btn:hover {
  border-color: rgba(252, 211, 141, 0.38);
  background: rgba(34, 29, 66, 0.82);
  color: #FFFFFF;
}

.moment-refresh-btn:active {
  transform: scale(0.97);
}

.moment-zoom-controls {
  position: fixed;
  left: 1rem;
  bottom: calc(1rem + env(safe-area-inset-bottom, 0px) + 52px);
  z-index: 82;
  display: inline-flex;
  align-items: center;
  gap: 0.18rem;
  padding: 0.24rem;
  border: 1px solid rgba(252, 211, 141, 0.22);
  border-radius: 999px;
  background: rgba(23, 20, 48, 0.74);
  color: rgba(255, 244, 207, 0.92);
  pointer-events: auto;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 8px 24px rgba(0, 6, 28, 0.24);
}

.moment-zoom-btn,
.moment-zoom-value {
  height: 32px;
  border: 0;
  color: inherit;
  font-family: inherit;
  font-weight: 900;
  line-height: 1;
  cursor: pointer;
  transition: background 180ms ease, color 180ms ease, opacity 180ms ease, transform 180ms ease;
}

.moment-zoom-btn {
  width: 32px;
  border-radius: 50%;
  background: transparent;
  font-size: 1.18rem;
}

.moment-zoom-value {
  min-width: 54px;
  padding: 0 0.46rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  font-size: 0.78rem;
  letter-spacing: 0;
}

.moment-zoom-btn:hover,
.moment-zoom-value:hover {
  background: rgba(252, 211, 141, 0.13);
  color: #FFFFFF;
}

.moment-zoom-btn:active,
.moment-zoom-value:active {
  transform: scale(0.96);
}

.moment-zoom-btn:disabled {
  cursor: default;
  opacity: 0.36;
}

.moment-zoom-btn:disabled:hover {
  background: transparent;
  color: inherit;
}

.moment-sphere-stage {
  position: relative;
  width: 100%;
  height: min(78svh, 820px);
  min-height: 590px;
  overflow: visible;
  border-radius: 0;
  cursor: grab;
  touch-action: none;
  overscroll-behavior: contain;
  user-select: none;
  -webkit-user-select: none;
  -webkit-user-drag: none;
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;
  --sphere-scale: 1;
  --sphere-tilt-x: 0deg;
  --sphere-tilt-y: 0deg;
  --surface-shift-x: 0px;
  --surface-shift-y: 0px;
  --surface-shift-x-soft: 0px;
  --surface-shift-y-soft: 0px;
  --surface-shift-x-rev: 0px;
  --surface-shift-y-rev: 0px;
  --surface-drift-x: 0px;
  --surface-drift-y: 0px;
  --surface-drift-x-rev: 0px;
  --surface-drift-y-rev: 0px;
  --surface-spin: 0deg;
  --surface-spin-rev: 0deg;
  background:
    radial-gradient(circle at 11% 24%, rgba(242, 247, 255, 0.82) 0 1px, rgba(242, 247, 255, 0.22) 2px, transparent 5px),
    radial-gradient(circle at 58% 3%, rgba(242, 247, 255, 0.86) 0 1px, rgba(242, 247, 255, 0.22) 2px, transparent 6px),
    radial-gradient(circle at 5% 86%, rgba(242, 247, 255, 0.7) 0 1px, rgba(242, 247, 255, 0.18) 2px, transparent 5px),
    radial-gradient(circle at 86% 14%, rgba(255, 226, 158, 0.5) 0 1px, transparent 3px),
    radial-gradient(circle at 23% 17%, rgba(255, 226, 158, 0.38) 0 1px, transparent 2px),
    radial-gradient(circle at 79% 88%, rgba(255, 226, 158, 0.42) 0 1px, transparent 2px),
    radial-gradient(circle at 34% 74%, rgba(242, 247, 255, 0.36) 0 1px, transparent 2px),
    radial-gradient(circle at 72% 47%, rgba(255, 226, 158, 0.3) 0 1px, transparent 2px);
}

.moment-sphere-stage::before,
.moment-sphere-stage::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: min(70svh, 720px);
  max-width: 82vw;
  aspect-ratio: 1;
  border-radius: 50%;
  transform: translate(-50%, -50%) scale(var(--sphere-scale));
  pointer-events: none;
}

.moment-sphere-stage::before {
  z-index: 0;
  background:
    radial-gradient(circle at 50% 50%, transparent 57%, rgba(255, 249, 230, 0.32) 63%, rgba(255, 226, 160, 0.16) 72%, transparent 80%);
  filter: blur(14px);
  box-shadow:
    0 0 22px rgba(255, 252, 236, 0.22),
    0 0 58px rgba(255, 226, 160, 0.16),
    0 0 92px rgba(255, 217, 132, 0.08);
}

.moment-sphere-stage::after {
  z-index: 0;
  background:
    radial-gradient(circle at 50% 50%, transparent 62%, rgba(255, 251, 236, 0.26) 66%, rgba(255, 226, 160, 0.1) 73%, transparent 80%);
  box-shadow:
    0 0 18px rgba(255, 250, 232, 0.16);
}

.moment-sphere-stage:active {
  cursor: grabbing;
}

.moment-sphere-stage:focus-visible {
  outline: 2px solid rgba(235, 246, 255, 0.58);
  outline-offset: 4px;
}

.moment-sphere-orb {
  position: absolute;
  left: 50%;
  top: 50%;
  width: min(70svh, 720px);
  max-width: 82vw;
  aspect-ratio: 1;
  transform: translate3d(-50%, -50%, 0) scale3d(var(--sphere-scale), var(--sphere-scale), 1) rotateX(var(--sphere-tilt-x)) rotateY(var(--sphere-tilt-y));
  z-index: 1;
  border-radius: 50%;
  overflow: hidden;
  background:
    radial-gradient(circle at 24% 18%, rgba(255, 255, 238, 0.68), transparent 17%),
    radial-gradient(ellipse at 42% 30%, rgba(255, 243, 156, 0.28), transparent 42%),
    radial-gradient(circle at 76% 78%, rgba(73, 42, 12, 0.24), rgba(103, 61, 17, 0.16) 25%, transparent 50%),
    radial-gradient(circle at 34% 34%, rgba(136, 76, 18, 0.25) 0 4.8%, rgba(255, 226, 118, 0.12) 6%, transparent 9.5%),
    radial-gradient(circle at 62% 44%, rgba(121, 65, 13, 0.23) 0 4.3%, rgba(255, 228, 132, 0.11) 5.7%, transparent 9.4%),
    radial-gradient(circle at 54% 68%, rgba(119, 69, 21, 0.2) 0 5.8%, rgba(250, 209, 98, 0.08) 7%, transparent 10.2%),
    radial-gradient(circle at 73% 31%, rgba(128, 72, 18, 0.18) 0 3.9%, transparent 7.2%),
    radial-gradient(circle at 28% 62%, rgba(113, 65, 18, 0.16) 0 4.4%, transparent 7.8%),
    radial-gradient(ellipse at 48% 118%, transparent 0 34%, rgba(255, 249, 180, 0.13) 39%, rgba(250, 211, 87, 0.08) 45%, transparent 52%, transparent 59%, rgba(198, 123, 27, 0.08) 65%, transparent 72%),
    radial-gradient(circle at 45% 43%, #FFECA0 0%, #F8CD62 42%, #E1AA3D 68%, #B98225 100%);
  background-repeat: no-repeat;
  background-size: 100% 100%, 118% 112%, 100% 100%, 82% 78%, 76% 72%, 84% 82%, 70% 68%, 78% 72%, 176% 176%, 100% 100%;
  background-position:
    center,
    center,
    center,
    calc(44% + var(--surface-shift-x-soft)) calc(36% + var(--surface-shift-y-soft)),
    calc(60% + var(--surface-shift-x-rev)) calc(46% + var(--surface-shift-y-soft)),
    calc(50% + var(--surface-shift-x)) calc(70% + var(--surface-shift-y-rev)),
    calc(72% + var(--surface-shift-x-rev)) calc(34% + var(--surface-shift-y)),
    calc(28% + var(--surface-shift-x-soft)) calc(62% + var(--surface-shift-y-rev)),
    calc(50% + var(--surface-shift-x)) calc(50% + var(--surface-shift-y)),
    center;
  box-shadow:
    inset 56px 42px 94px rgba(255, 255, 238, 0.4),
    inset -92px -100px 146px rgba(82, 47, 12, 0.44),
    inset 0 -58px 88px rgba(92, 54, 15, 0.18),
    inset 0 0 0 1px rgba(255, 246, 190, 0.36),
    0 0 18px rgba(255, 248, 206, 0.38),
    0 0 58px rgba(255, 201, 83, 0.32),
    0 0 112px rgba(245, 169, 42, 0.16),
    0 34px 118px rgba(0, 5, 24, 0.46);
  filter: saturate(1.1) brightness(1.07) contrast(1.08);
  opacity: 1;
  isolation: isolate;
  pointer-events: none;
  transform-style: preserve-3d;
  backface-visibility: hidden;
  will-change: transform;
  transition: transform 120ms linear;
  contain: layout paint style;
}

.moment-sphere-orb::before {
  content: "";
  position: absolute;
  inset: 7%;
  z-index: 1;
  border-radius: 50%;
  background-image:
    radial-gradient(ellipse at 28% 24%, rgba(255, 255, 224, 0.24), transparent 31%),
    radial-gradient(ellipse at 61% 45%, rgba(192, 116, 27, 0.15), transparent 35%),
    radial-gradient(ellipse at 42% 70%, rgba(129, 78, 20, 0.13), transparent 38%),
    radial-gradient(circle at 38% 38%, rgba(112, 70, 22, 0.17) 0 0.7%, rgba(255, 243, 178, 0.12) 1.3%, transparent 2.6%),
    radial-gradient(circle at 61% 54%, rgba(112, 69, 17, 0.14) 0 0.6%, rgba(255, 237, 149, 0.1) 1.2%, transparent 2.5%),
    radial-gradient(circle at 50% 69%, rgba(116, 75, 23, 0.12) 0 0.5%, transparent 2.4%),
    radial-gradient(circle at 24% 58%, rgba(94, 55, 15, 0.16) 0 0.9%, rgba(255, 230, 133, 0.08) 1.8%, transparent 3.4%),
    radial-gradient(circle at 72% 35%, rgba(96, 54, 13, 0.15) 0 0.8%, rgba(255, 232, 139, 0.07) 1.6%, transparent 3.2%);
  background-size: 88% 82%, 96% 90%, 94% 94%, 100% 100%, 100% 100%, 100% 100%, 100% 100%, 100% 100%;
  background-position:
    calc(46% + var(--surface-shift-x-soft)) calc(40% + var(--surface-shift-y-soft)),
    calc(56% + var(--surface-shift-x-rev)) calc(48% + var(--surface-shift-y-soft)),
    calc(38% + var(--surface-shift-x-soft)) calc(70% + var(--surface-shift-y-rev)),
    center,
    center,
    center,
    center,
    center;
  opacity: 0.78;
  mask-image: radial-gradient(circle, #000 0 69%, transparent 73%);
  transform: translate3d(var(--surface-drift-x), var(--surface-drift-y), 0) rotate(var(--surface-spin)) scale(1.06);
  transform-origin: center;
  will-change: transform, background-position;
}

.moment-sphere-orb::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 4;
  border-radius: 50%;
  background:
    radial-gradient(circle at 25% 20%, rgba(255, 255, 236, 0.3), transparent 18%),
    radial-gradient(circle at 43% 35%, rgba(255, 230, 126, 0.15), transparent 44%),
    radial-gradient(circle at 78% 82%, rgba(111, 65, 18, 0.08), transparent 58%),
    radial-gradient(circle at 50% 50%, transparent 58%, rgba(255, 224, 118, 0.18) 72%, rgba(255, 180, 48, 0.34) 100%);
  opacity: 0.9;
}

.moment-sphere-surface,
.moment-sphere-haze {
  position: absolute;
  inset: -9%;
  border-radius: 50%;
  pointer-events: none;
  mask-image: radial-gradient(circle, #000 0 70%, transparent 73%);
  will-change: transform, background-position;
  backface-visibility: hidden;
}

.moment-sphere-surface {
  z-index: 2;
  background-image:
    radial-gradient(ellipse at 34% 31%, rgba(255, 248, 180, 0.24), transparent 30%),
    radial-gradient(ellipse at 62% 57%, rgba(180, 105, 22, 0.16), transparent 34%),
    radial-gradient(ellipse at 30% 72%, rgba(131, 80, 23, 0.13), transparent 37%),
    radial-gradient(circle at 45% 42%, rgba(119, 73, 21, 0.14) 0 1px, transparent 2px),
    radial-gradient(circle at 54% 62%, rgba(255, 242, 164, 0.13) 0 1px, transparent 2px),
    radial-gradient(circle at 39% 53%, rgba(139, 84, 18, 0.14) 0 1px, transparent 3px),
    radial-gradient(circle at 58% 31%, rgba(120, 76, 24, 0.12) 0 1px, transparent 3px),
    radial-gradient(ellipse at 50% 50%, transparent 0 42%, rgba(155, 92, 22, 0.08) 53%, transparent 67%),
    radial-gradient(ellipse at 54% 112%, transparent 0 38%, rgba(255, 249, 185, 0.12) 43%, transparent 50%, transparent 61%, rgba(177, 105, 25, 0.07) 67%, transparent 76%);
  background-size: 78% 76%, 92% 90%, 96% 96%, 29px 29px, 43px 43px, 57px 57px, 71px 71px, 128% 128%, 180% 180%;
  background-position:
    calc(42% + var(--surface-shift-x)) calc(34% + var(--surface-shift-y)),
    calc(58% + var(--surface-shift-x-rev)) calc(58% + var(--surface-shift-y-soft)),
    calc(30% + var(--surface-shift-x-soft)) calc(76% + var(--surface-shift-y-rev)),
    calc(50% + var(--surface-drift-x)) calc(50% + var(--surface-drift-y)),
    calc(54% + var(--surface-drift-x-rev)) calc(52% + var(--surface-drift-y-rev)),
    calc(47% + var(--surface-drift-x)) calc(48% + var(--surface-drift-y-rev)),
    calc(50% + var(--surface-drift-x-rev)) calc(50% + var(--surface-drift-y)),
    calc(50% + var(--surface-drift-x-soft)) calc(50% + var(--surface-drift-y-soft)),
    calc(50% + var(--surface-drift-x)) calc(50% + var(--surface-drift-y));
  opacity: 0.58;
  transform: translate3d(var(--surface-drift-x), var(--surface-drift-y), 0) rotate(var(--surface-spin)) scale(1.11);
  mix-blend-mode: soft-light;
}

.moment-sphere-haze {
  z-index: 3;
  background-image:
    radial-gradient(ellipse at 28% 27%, rgba(255, 255, 225, 0.18), transparent 27%),
    radial-gradient(ellipse at 72% 68%, rgba(193, 119, 29, 0.1), transparent 38%),
    radial-gradient(ellipse at 52% 50%, rgba(255, 217, 102, 0.1), transparent 46%),
    radial-gradient(circle at 50% 50%, transparent 0 58%, rgba(255, 218, 95, 0.16) 63%, transparent 70%);
  background-size: 90% 86%, 96% 94%, 112% 108%, 100% 100%;
  background-position:
    calc(30% + var(--surface-shift-x-rev)) calc(26% + var(--surface-shift-y-soft)),
    calc(70% + var(--surface-shift-x-soft)) calc(70% + var(--surface-shift-y-rev)),
    calc(50% + var(--surface-shift-x-soft)) calc(50% + var(--surface-shift-y-soft)),
    center;
  opacity: 0.42;
  transform: translate3d(var(--surface-drift-x-rev), var(--surface-drift-y-rev), 0) rotate(var(--surface-spin-rev)) scale(1.06);
  mix-blend-mode: soft-light;
}

.moment-bubble-layer {
  position: absolute;
  left: 50%;
  top: 50%;
  width: min(70svh, 720px);
  max-width: 82vw;
  aspect-ratio: 1;
  border-radius: 50%;
  overflow: visible;
  clip-path: none;
  transform: translate3d(-50%, -50%, 0) scale3d(var(--sphere-scale), var(--sphere-scale), 1);
  transform-origin: center;
  z-index: 2;
  perspective: 1200px;
  box-shadow:
    inset -44px -56px 94px rgba(43, 36, 28, 0.16),
    inset 22px 18px 50px rgba(255, 252, 241, 0.06);
  transition: transform 120ms linear;
  backface-visibility: hidden;
  will-change: transform;
  contain: layout style;
}

.moment-bubble-layer::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  border-radius: 50%;
  background:
    radial-gradient(circle at 28% 22%, rgba(255, 255, 255, 0.03), transparent 18%),
    radial-gradient(circle at 50% 50%, transparent 61%, rgba(38, 32, 25, 0.13) 83%, rgba(20, 16, 12, 0.26) 100%);
  pointer-events: none;
}

.moment-bubble-layer::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 56;
  border-radius: 50%;
  pointer-events: none;
  background:
    radial-gradient(circle at 24% 18%, rgba(255, 255, 238, 0.5), transparent 17%),
    radial-gradient(ellipse at 42% 30%, rgba(255, 243, 156, 0.18), transparent 42%),
    radial-gradient(circle at 76% 78%, rgba(73, 42, 12, 0.19), rgba(103, 61, 17, 0.12) 25%, transparent 50%),
    radial-gradient(circle at 34% 34%, rgba(136, 76, 18, 0.18) 0 4.8%, rgba(255, 226, 118, 0.08) 6%, transparent 9.5%),
    radial-gradient(circle at 62% 44%, rgba(121, 65, 13, 0.16) 0 4.3%, rgba(255, 228, 132, 0.07) 5.7%, transparent 9.4%),
    radial-gradient(circle at 54% 68%, rgba(119, 69, 21, 0.14) 0 5.8%, rgba(250, 209, 98, 0.06) 7%, transparent 10.2%),
    radial-gradient(ellipse at 48% 118%, transparent 0 34%, rgba(255, 249, 180, 0.1) 39%, rgba(250, 211, 87, 0.06) 45%, transparent 52%, transparent 59%, rgba(198, 123, 27, 0.06) 65%, transparent 72%),
    radial-gradient(circle at 45% 43%, rgba(255, 236, 160, 0.82) 0%, rgba(248, 205, 98, 0.82) 42%, rgba(225, 170, 61, 0.82) 68%, rgba(185, 130, 37, 0.82) 100%);
  background-repeat: no-repeat;
  background-size: 100% 100%, 118% 112%, 100% 100%, 82% 78%, 76% 72%, 84% 82%, 176% 176%, 100% 100%;
  background-position:
    center,
    center,
    center,
    calc(44% + var(--surface-shift-x-soft)) calc(36% + var(--surface-shift-y-soft)),
    calc(60% + var(--surface-shift-x-rev)) calc(46% + var(--surface-shift-y-soft)),
    calc(50% + var(--surface-shift-x)) calc(70% + var(--surface-shift-y-rev)),
    calc(50% + var(--surface-shift-x)) calc(50% + var(--surface-shift-y)),
    center;
  box-shadow:
    inset 44px 34px 76px rgba(255, 255, 238, 0.2),
    inset -72px -80px 124px rgba(70, 42, 12, 0.32),
    inset 0 -42px 72px rgba(86, 51, 14, 0.14);
  opacity: 0.86;
  transform: translateZ(1px);
}

.moment-bubble {
  position: absolute;
  left: 50%;
  top: 50%;
  width: clamp(86px, 9.2vw, 126px);
  min-height: 52px;
  display: flex;
  flex-direction: column;
  gap: 0.34rem;
  padding: 0.42rem;
  border: 1px solid rgba(188, 218, 255, calc(0.06 + var(--bubble-clarity, 0) * 0.13));
  border-radius: 12px;
  background:
    radial-gradient(circle at 30% 20%, rgba(218, 236, 255, calc(0.03 + var(--bubble-clarity, 0) * 0.06)), transparent 42%),
    rgba(7, 27, 70, calc(0.2 + var(--bubble-clarity, 0) * 0.3));
  color: #FFFFFF;
  box-shadow:
    inset 0 0 0 1px rgba(216, 234, 255, calc(0.02 + var(--bubble-clarity, 0) * 0.05)),
    0 4px 14px rgba(0, 8, 28, 0.1);
  backdrop-filter: blur(4px) saturate(1.04);
  -webkit-backdrop-filter: blur(4px) saturate(1.04);
  transform:
    translate3d(calc(var(--bubble-x, 0px) - 50%), calc(var(--bubble-y, 0px) - 50%), var(--bubble-depth, 0px))
    rotateY(var(--bubble-rotate-y, 0deg))
    rotateX(var(--bubble-rotate-x, 0deg))
    rotateZ(var(--bubble-rotate-z, 0deg))
    scale3d(var(--bubble-scale, 1), var(--bubble-scale, 1), 1);
  transform-origin: center;
  transform-style: preserve-3d;
  backface-visibility: hidden;
  opacity: var(--bubble-opacity, 0);
  z-index: var(--bubble-z, 1);
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  transition: opacity 120ms linear, filter 120ms linear, border-color 180ms ease, background 180ms ease, box-shadow 120ms linear;
  will-change: transform, opacity;
  contain: layout paint style;
  -webkit-user-drag: none;
  -webkit-tap-highlight-color: transparent;
}

.moment-sphere-stage .moment-bubble {
  border-color: rgba(188, 218, 255, 0.16);
  background:
    radial-gradient(circle at 30% 20%, rgba(218, 236, 255, 0.08), transparent 42%),
    rgba(7, 27, 70, 0.42);
  filter: none !important;
  box-shadow: inset 0 0 0 1px rgba(216, 234, 255, 0.035), 0 3px 10px rgba(0, 8, 28, 0.08) !important;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  transition: none !important;
}

.moment-sphere-stage .moment-bubble * {
  pointer-events: none;
}

.moment-sphere-stage.is-interacting .moment-sphere-orb,
.moment-sphere-stage.is-interacting .moment-bubble-layer {
  transition: none;
}

.moment-sphere-stage.is-interacting .moment-sphere-orb {
  box-shadow:
    inset 56px 42px 94px rgba(255, 255, 238, 0.4),
    inset -92px -100px 146px rgba(82, 47, 12, 0.44),
    inset 0 -58px 88px rgba(92, 54, 15, 0.18),
    inset 0 0 0 1px rgba(255, 246, 190, 0.36),
    0 0 18px rgba(255, 248, 206, 0.38),
    0 0 58px rgba(255, 201, 83, 0.32),
    0 0 112px rgba(245, 169, 42, 0.16),
    0 34px 118px rgba(0, 5, 24, 0.46);
}

.moment-sphere-stage.is-interacting .moment-bubble-layer {
  box-shadow:
    inset -44px -56px 94px rgba(43, 36, 28, 0.16),
    inset 22px 18px 50px rgba(255, 252, 241, 0.06);
}

body.moment-sphere-is-dragging,
body.moment-sphere-is-dragging * {
  user-select: none;
  -webkit-user-select: none;
}

.moment-bubble::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, calc(0.03 + var(--bubble-clarity, 0) * 0.06)), transparent 46%),
    radial-gradient(circle at 70% 88%, rgba(24, 80, 160, 0.18), transparent 52%);
  pointer-events: none;
}

.moment-sphere-stage .moment-bubble::after {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.07), transparent 46%),
    radial-gradient(circle at 70% 88%, rgba(24, 80, 160, 0.18), transparent 52%);
}

.moment-bubble:hover {
  border-color: rgba(252, 211, 141, 0.34);
  background: rgba(229, 240, 255, 0.15);
}

.moment-author-link {
  border: 0;
  padding: 0;
  background: transparent;
  font: inherit;
  color: inherit;
  cursor: pointer;
}

.moment-author-link:hover {
  color: #FCD38D;
}

.moment-author-link:focus-visible {
  outline: 2px solid rgba(252, 211, 141, 0.75);
  outline-offset: 2px;
}

.moment-bubble[aria-hidden="true"] {
  pointer-events: none;
}

.moment-bubble-head {
  display: flex;
  align-items: center;
  gap: 0.36rem;
  min-width: 0;
}

.moment-bubble-avatar,
.moment-modal-avatar {
  width: 24px;
  height: 24px;
  flex: 0 0 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: linear-gradient(135deg, #E9B870, #7CA7A0);
  color: #171327;
  font-size: 0.66rem;
  font-weight: 900;
}

.moment-bubble-meta {
  flex: 1;
  min-width: 0;
}

.moment-post-more-btn {
  position: relative;
  z-index: 2;
  width: 30px;
  height: 30px;
  flex: 0 0 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.82);
  font: inherit;
  font-size: 0.9rem;
  font-weight: 850;
  line-height: 1;
  cursor: pointer;
  transition: background 180ms ease, color 180ms ease, border-color 180ms ease, transform 180ms ease;
}

.moment-post-more-btn:hover,
.moment-post-more-btn:focus-visible {
  color: #FFF4CF;
  border-color: rgba(252, 211, 141, 0.32);
  background: rgba(252, 211, 141, 0.12);
}

.moment-post-more-btn:focus-visible {
  outline: 2px solid rgba(252, 211, 141, 0.75);
  outline-offset: 2px;
}

.moment-post-more-btn:active {
  transform: scale(0.97);
}

.moment-bubble-name-row {
  display: flex;
  align-items: baseline;
  gap: 0.28rem;
  min-width: 0;
}

.moment-bubble-name {
  overflow: hidden;
  color: rgba(255, 255, 255, 0.92);
  font-size: 0.68rem;
  font-weight: 850;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.moment-bubble-follow-count {
  flex: 0 0 auto;
  color: rgba(247, 241, 232, 0.46);
  font-size: 0.58rem;
  font-weight: 700;
  line-height: 1.35;
}

.moment-bubble-time {
  color: rgba(247, 241, 232, 0.52);
  font-size: 0.58rem;
  font-weight: 700;
  line-height: 1.35;
}

.moment-bubble-text {
  color: rgba(255, 255, 255, 0.86);
  font-size: 0.68rem;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.moment-bubble-media {
  position: relative;
  width: 100%;
  aspect-ratio: 1.45 / 1;
  overflow: hidden;
  border-radius: 8px;
  background: rgba(7, 20, 54, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.moment-bubble-image {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.moment-bubble-image-count {
  position: absolute;
  right: 0.28rem;
  bottom: 0.28rem;
  min-width: 30px;
  padding: 0.12rem 0.28rem;
  border-radius: 999px;
  background: rgba(3, 8, 24, 0.68);
  color: rgba(255, 255, 255, 0.92);
  font-size: 0.52rem;
  font-weight: 850;
  line-height: 1.2;
  text-align: center;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.moment-bubble-actions {
  display: flex;
  align-items: center;
  gap: 0.28rem;
  min-width: 0;
  color: rgba(231, 241, 255, calc(0.46 + var(--bubble-clarity, 0) * 0.32));
  font-size: 0.56rem;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
}

.moment-bubble-actions [data-moment-action] {
  min-width: 0;
  min-height: 18px;
  display: inline-flex;
  align-items: center;
  border: 0;
  border-radius: 999px;
  padding: 0.1rem 0.24rem;
  background: transparent;
  color: inherit;
  font: inherit;
  cursor: pointer;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  transition: background 160ms ease, color 160ms ease, transform 160ms ease;
}

.moment-bubble-actions [data-moment-action]:hover,
.moment-bubble-actions [data-moment-action].is-active {
  background: rgba(252, 211, 141, 0.12);
  color: #FFF4CF;
}

.moment-bubble-actions [data-moment-action]:active {
  transform: scale(0.96);
}

.moment-bubble-actions [data-moment-action]:focus-visible {
  outline: 2px solid rgba(252, 211, 141, 0.75);
  outline-offset: 2px;
}

.moment-bubble-actions [data-moment-action="like"],
.moment-action-btn.is-like-btn,
.moment-action-btn[data-post-action="like"] {
  color: rgba(255, 255, 255, 0.72);
}

.moment-bubble-actions [data-moment-action="like"]:hover,
.moment-bubble-actions [data-moment-action="like"].is-active,
.moment-action-btn.is-like-btn:hover,
.moment-action-btn.is-like-btn.is-active,
.moment-action-btn[data-post-action="like"]:hover,
.moment-action-btn[data-post-action="like"].is-active {
  color: #FDF4D3;
}

.moment-action-btn.is-like-btn .moment-action-icon,
.moment-action-btn[data-post-action="like"] .moment-action-icon,
.moment-bubble-actions [data-moment-action="like"] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.like-heart-icon {
  width: 1.2em;
  height: 1.2em;
  display: block;
  overflow: visible;
  transform-origin: 50% 58%;
  filter: drop-shadow(0 2px 0 rgba(0, 0, 0, 0.12));
}

.moment-bubble-actions .like-heart-icon {
  width: 1.05rem;
  height: 1.05rem;
}

.moment-action-btn .like-heart-icon {
  width: 1.18rem;
  height: 1.18rem;
}

.like-heart-fill {
  fill: transparent;
  transition: fill 160ms ease;
}

.like-heart-outline {
  fill: none;
  stroke: currentColor;
  stroke-width: 2.7;
  stroke-linejoin: round;
  stroke-linecap: round;
}

.like-heart-shine {
  fill: none;
  stroke: rgba(255, 255, 255, 0.72);
  stroke-width: 1.7;
  stroke-linecap: round;
  opacity: 0;
  transition: opacity 160ms ease;
}

.is-active .like-heart-fill,
.like-heart-icon--filled .like-heart-fill {
  fill: #FDF4D3;
}

.is-active .like-heart-shine,
.like-heart-icon--filled .like-heart-shine {
  opacity: 0.72;
}

.is-like-breathing .like-heart-icon {
  animation: likeHeartBreath 520ms cubic-bezier(0.22, 1.2, 0.36, 1) both;
}

@keyframes likeHeartBreath {
  0% { transform: scale(1); }
  36% { transform: scale(1.22); }
  62% { transform: scale(0.94); }
  100% { transform: scale(1); }
}

.moment-overlay {
  position: fixed;
  inset: 0;
  z-index: 420;
  display: grid;
  place-items: center;
  padding: 1rem;
  background: rgba(6, 5, 20, 0.52);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  opacity: 0;
  overflow: hidden;
  pointer-events: none;
  transition: opacity 240ms ease;
}

.moment-overlay.is-open {
  opacity: 1;
  pointer-events: auto;
}

.moment-modal {
  position: relative;
  width: min(520px, calc(100vw - 2rem));
  max-height: min(760px, calc(100svh - 2rem));
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 1.25rem;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 22px;
  background: rgba(22, 19, 48, 0.92);
  color: #FFFFFF;
  box-shadow: 0 26px 80px rgba(0, 0, 0, 0.34);
  opacity: 0;
  transform: scale(0.96);
  transform-origin: center;
  transition:
    opacity 240ms ease,
    transform 240ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.moment-overlay.is-open .moment-modal {
  opacity: 1;
  transform: scale(1);
}

.moment-modal-close {
  position: sticky;
  top: 0.85rem;
  z-index: 3;
  width: 34px;
  height: 34px;
  margin-left: auto;
  margin-bottom: -34px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
  color: rgba(255, 255, 255, 0.78);
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.moment-modal-author {
  display: flex;
  align-items: center;
  gap: 0.72rem;
  padding-right: 2.3rem;
}

.moment-modal-avatar {
  width: 42px;
  height: 42px;
  flex-basis: 42px;
  font-size: 0.95rem;
}

.moment-modal-name {
  display: flex;
  align-items: baseline;
  gap: 0.45rem;
  min-width: 0;
  color: #FFFFFF;
  font-size: 0.96rem;
  font-weight: 900;
}

.moment-modal-username {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.moment-modal-follow-count {
  flex: 0 0 auto;
  color: rgba(247, 241, 232, 0.5);
  font-size: 0.75rem;
  font-weight: 700;
}

.moment-modal-time {
  color: rgba(247, 241, 232, 0.56);
  font-size: 0.75rem;
  font-weight: 700;
}

.moment-modal-text {
  margin: 1.1rem 0 0;
  color: rgba(255, 255, 255, 0.9);
  font-size: 1rem;
  line-height: 1.8;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.moment-modal-text:empty {
  display: none;
}

.moment-modal-media {
  margin-top: 1rem;
}

.moment-modal-media:empty {
  display: none;
}

.moment-modal-gallery {
  position: relative;
  overflow: hidden;
  border-radius: 16px;
  background: rgba(3, 8, 24, 0.62);
  border: 1px solid rgba(255, 255, 255, 0.12);
  touch-action: pan-y;
}

.moment-modal-gallery-img {
  width: 100%;
  max-height: min(58svh, 520px);
  display: block;
  object-fit: contain;
  background: rgba(3, 8, 24, 0.7);
  cursor: zoom-in;
}

.moment-modal-gallery-count {
  position: absolute;
  right: 0.62rem;
  bottom: 0.62rem;
  padding: 0.2rem 0.48rem;
  border-radius: 999px;
  background: rgba(3, 8, 24, 0.68);
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.72rem;
  font-weight: 850;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.moment-modal-gallery-nav {
  position: absolute;
  top: 50%;
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 50%;
  background: rgba(3, 8, 24, 0.46);
  color: rgba(255, 255, 255, 0.82);
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  transform: translateY(-50%);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.moment-modal-gallery-nav--prev {
  left: 0.56rem;
}

.moment-modal-gallery-nav--next {
  right: 0.56rem;
}

.moment-modal-gallery-nav[hidden],
.moment-modal-gallery-count[hidden] {
  display: none;
}

.moment-modal-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(86px, 1fr));
  gap: 0.6rem;
  margin-top: 1.15rem;
}

.moment-action-btn {
  min-width: 0;
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.32rem;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.82);
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 850;
  cursor: pointer;
  transition: background 180ms ease, color 180ms ease, border-color 180ms ease, transform 180ms ease;
}

.moment-action-btn:hover,
.moment-action-btn.is-active {
  color: #FFF4CF;
  border-color: rgba(252, 211, 141, 0.32);
  background: rgba(252, 211, 141, 0.12);
}

.moment-action-btn.is-like-btn.is-active,
.moment-action-btn[data-post-action="like"].is-active {
  color: #FDF4D3;
}

.moment-action-btn:active {
  transform: scale(0.97);
}

.moment-action-icon {
  font-size: 1rem;
  line-height: 1;
}

.moment-action-count:empty {
  display: none;
}

.post-action-bar {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: center;
  gap: 0.42rem;
}

.post-action-bar[data-post-action-count="3"] {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.post-action-bar .moment-action-btn,
.post-action-bar .moment-post-more-btn {
  position: relative;
  width: 100%;
  min-width: 0;
  min-height: 34px;
  padding: 0 0.44rem;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.82);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.22rem;
  font: inherit;
  font-size: 0.76rem;
  font-weight: 850;
  line-height: 1;
  cursor: pointer;
  overflow: hidden;
}

.post-action-bar .moment-action-btn:hover,
.post-action-bar .moment-action-btn.is-active,
.post-action-bar .moment-post-more-btn:hover,
.post-action-bar .moment-post-more-btn:focus-visible {
  color: #FFF4CF;
  border-color: rgba(252, 211, 141, 0.32);
  background: rgba(252, 211, 141, 0.12);
}

.post-action-bar .moment-action-icon {
  min-width: 1em;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.post-action-bar .moment-action-icon svg {
  width: 1.08em;
  height: 1.08em;
  display: block;
}

.post-action-bar .moment-action-icon svg:not(.like-heart-icon),
.post-action-bar .moment-action-icon svg:not(.like-heart-icon) path {
  fill: currentColor;
}

.post-action-bar .moment-action-count {
  font-size: 0.72em;
  opacity: 0.76;
  flex: 0 0 auto;
}

.post-action-bar .post-action-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.post-card-more-btn {
  margin-left: auto;
}

.profile-moment-card .moment-bubble-actions.post-action-bar,
.user-moment-card .moment-bubble-actions.post-action-bar,
.following-moment-card .moment-bubble-actions.post-action-bar {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.profile-moment-card .moment-bubble-actions.post-action-bar[data-post-action-count="3"],
.user-moment-card .moment-bubble-actions.post-action-bar[data-post-action-count="3"],
.following-moment-card .moment-bubble-actions.post-action-bar[data-post-action-count="3"] {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.moment-modal-actions.post-action-bar {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.moment-modal-actions.post-action-bar[data-post-action-count="3"] {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.moment-modal-actions.post-action-bar .moment-action-btn,
.moment-modal-actions.post-action-bar .moment-post-more-btn {
  min-height: 42px;
  font-size: 0.8rem;
}

.moment-sphere-stage .post-action-bar {
  grid-template-columns: repeat(3, minmax(16px, 1fr));
  gap: 0.08rem;
}

.moment-sphere-stage .post-action-bar,
.moment-sphere-stage .post-action-bar * {
  pointer-events: none;
}

.moment-sphere-stage .post-action-bar .moment-action-btn,
.moment-sphere-stage .post-action-bar .moment-post-more-btn {
  min-height: 18px;
  height: 18px;
  padding: 0;
  border: 0;
  background: transparent;
  gap: 0.08rem;
  font-size: 0.68rem;
}

.moment-sphere-stage .post-action-bar .moment-action-icon {
  font-size: 0.82rem;
}

.moment-sphere-stage .post-action-bar .post-action-label,
.moment-sphere-stage .post-action-bar .moment-action-count {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.moment-sphere-stage .post-action-bar .post-action-label {
  position: static;
  width: auto;
  height: auto;
  max-width: 100%;
  clip: auto;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 0.5rem;
}

.moment-sphere-stage .post-action-bar .moment-action-count {
  position: static;
  width: auto;
  height: auto;
  min-height: 0;
  clip: auto;
  overflow: visible;
  font-size: 0.52rem;
  opacity: 0.9;
}

.moment-sphere-stage .post-action-bar .moment-action-count[hidden] {
  display: none;
}

.moment-sphere-stage .post-action-bar .moment-action-btn[data-post-action="follow"] {
  justify-content: center;
  padding: 0 0.02rem;
}

.post-content-overlay {
  position: fixed;
  inset: 0;
  z-index: 520;
  display: grid;
  place-items: center;
  padding: 1rem;
  background: rgba(6, 5, 20, 0.56);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 220ms ease;
}

.post-content-overlay.is-open {
  opacity: 1;
  pointer-events: auto;
}

.post-content-dialog {
  position: relative;
  width: min(520px, calc(100vw - 2rem));
  max-height: min(760px, calc(100svh - 2rem));
  overflow: auto;
  padding: 1.15rem;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 20px;
  background: rgba(22, 19, 48, 0.94);
  color: #fff;
  box-shadow: 0 26px 80px rgba(0, 0, 0, 0.34);
}

.post-content-close {
  position: absolute;
  top: 0.85rem;
  right: 0.85rem;
}

.post-content-title {
  margin: 0 2.2rem 0.8rem 0;
  color: rgba(255, 255, 255, 0.94);
  font-size: 1.05rem;
  font-weight: 900;
  line-height: 1.35;
}

.post-content-body {
  color: rgba(255, 255, 255, 0.86);
  font-size: 0.96rem;
  line-height: 1.85;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.post-content-field {
  display: grid;
  gap: 0.45rem;
  color: rgba(231, 241, 255, 0.82);
  font-size: 0.86rem;
  font-weight: 850;
}

.post-content-textarea {
  width: 100%;
  min-height: 220px;
  resize: vertical;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  padding: 0.85rem;
  font: inherit;
  font-size: 0.94rem;
  line-height: 1.75;
  outline: none;
}

.post-content-textarea:focus {
  border-color: rgba(252, 211, 141, 0.38);
  box-shadow: 0 0 0 3px rgba(252, 211, 141, 0.12);
}

.post-content-editor-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.6rem;
  margin-top: 0.9rem;
}

.moment-comments-section {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.moment-comments-head {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.8rem;
  color: rgba(255, 255, 255, 0.88);
  font-size: 0.88rem;
  font-weight: 900;
}

.moment-comments-expand-content {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  flex: 0 0 auto;
  border: 0;
  background: transparent;
  color: #fff;
  padding: 0;
  font: inherit;
  font-weight: 900;
  line-height: 1.2;
  cursor: pointer;
}

.moment-comments-expand-content[hidden] {
  display: none;
}

.moment-comments-expand-content:hover,
.moment-comments-expand-content:focus-visible {
  color: #FFF4CF;
}

.moment-comments-expand-content:focus-visible {
  outline: 2px solid rgba(252, 211, 141, 0.75);
  outline-offset: 3px;
}

.moment-comments-list {
  display: grid;
  gap: 0.72rem;
  margin-top: 0.8rem;
}

.moment-comments-empty {
  padding: 0.65rem 0;
  color: rgba(255, 255, 255, 0.52);
  font-size: 0.84rem;
  font-weight: 700;
}

.moment-comment-item {
  display: flex;
  align-items: flex-start;
  gap: 0.58rem;
}

.moment-comment-avatar {
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #E9B870, #7CA7A0);
  color: #171327;
  font-size: 0.72rem;
  font-weight: 900;
}

.moment-comment-body {
  min-width: 0;
  flex: 1;
}

.moment-comment-meta {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  color: rgba(255, 255, 255, 0.86);
  font-size: 0.78rem;
  font-weight: 850;
}

.moment-comment-meta time {
  color: rgba(255, 255, 255, 0.48);
  font-size: 0.7rem;
  font-weight: 700;
}

.moment-comment-body p {
  margin: 0.18rem 0 0;
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.86rem;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.moment-comment-like {
  flex: 0 0 auto;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.1rem;
  min-width: 30px;
  min-height: 32px;
  margin-left: auto;
  border: 0;
  background: transparent;
  color: rgba(255, 255, 255, 0.52);
  padding: 0;
  font: inherit;
  font-size: 0.74rem;
  font-weight: 850;
  line-height: 1.2;
  cursor: pointer;
}

.moment-comment-like .like-heart-icon {
  width: 1.05rem;
  height: 1.05rem;
}

.moment-comment-like:hover,
.moment-comment-like.is-liked {
  color: #FFF4CF;
}

.moment-comment-like-count {
  min-height: 0.9em;
  font-size: 0.72rem;
  font-weight: 850;
}

.moment-comment-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.5rem;
  margin-top: 0.9rem;
}

.moment-comment-input {
  min-width: 0;
  height: 38px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  padding: 0 0.85rem;
  font: inherit;
  font-size: 0.84rem;
  outline: none;
}

.moment-comment-input:focus {
  border-color: rgba(252, 211, 141, 0.38);
  box-shadow: 0 0 0 3px rgba(252, 211, 141, 0.12);
}

.moment-comment-submit {
  height: 38px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, #E9B870, #7CA7A0);
  color: #171327;
  padding: 0 0.9rem;
  font: inherit;
  font-size: 0.84rem;
  font-weight: 900;
  cursor: pointer;
}

.moment-compose-overlay {
  position: fixed;
  inset: 0;
  z-index: 430;
  display: grid;
  place-items: center;
  padding: 1rem;
  background: rgba(5, 6, 18, 0.42);
  backdrop-filter: blur(7px);
  -webkit-backdrop-filter: blur(7px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 220ms ease;
}

.moment-compose-overlay.is-open {
  opacity: 1;
  pointer-events: auto;
}

.moment-compose-bubble {
  position: relative;
  width: min(430px, calc(100vw - 2rem));
  min-height: 210px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: stretch;
  gap: 0.85rem;
  padding: 1rem;
  border: 1px solid rgba(188, 218, 255, 0.18);
  border-radius: 28px;
  background:
    radial-gradient(circle at 28% 16%, rgba(230, 244, 255, 0.14), transparent 42%),
    radial-gradient(circle at 82% 88%, rgba(33, 92, 178, 0.22), transparent 50%),
    rgba(9, 27, 70, 0.84);
  color: #FFFFFF;
  box-shadow:
    inset 0 0 0 1px rgba(216, 234, 255, 0.08),
    0 24px 84px rgba(0, 7, 30, 0.42),
    0 0 60px rgba(84, 163, 255, 0.16);
  transform: translateY(18px) scale(0.9);
  opacity: 0;
  transform-origin: center;
  transition:
    opacity 240ms ease,
    transform 260ms cubic-bezier(0.18, 0.86, 0.24, 1);
}

.moment-compose-overlay.is-open .moment-compose-bubble {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.moment-compose-close {
  position: relative;
  grid-column: 2;
  grid-row: 1;
  align-self: center;
  justify-self: end;
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(188, 218, 255, 0.16);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.84);
  font-family: inherit;
  font-size: 0;
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: background 180ms ease, color 180ms ease, border-color 180ms ease, transform 180ms ease;
}

.moment-compose-close::before,
.moment-compose-close::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 18px;
  height: 4px;
  border-radius: 999px;
  background: currentColor;
  transform-origin: 50% 50%;
}

.moment-compose-close::before {
  transform: translate(-50%, -50%) rotate(45deg);
}

.moment-compose-close::after {
  transform: translate(-50%, -50%) rotate(-45deg);
}

.moment-compose-close:hover,
.moment-compose-close:focus-visible {
  border-color: rgba(252, 211, 141, 0.34);
  background: rgba(252, 211, 141, 0.14);
  color: #FFF4CF;
  outline: none;
}

.moment-compose-close:active {
  transform: scale(0.94);
}

.moment-compose-context {
  grid-column: 1;
  grid-row: 1;
  justify-self: start;
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  align-self: center;
  max-width: 100%;
  padding: 0.28rem 0.68rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(231, 241, 255, 0.72);
  font-size: 0.78rem;
  font-weight: 800;
  line-height: 1.2;
}

.moment-compose-context[hidden] {
  display: none;
}

.moment-compose-input {
  grid-column: 1 / -1;
  width: 100%;
  flex: 1;
  min-height: 132px;
  resize: none;
  border: 0;
  outline: 0;
  border-radius: 22px;
  padding: 0.95rem 1rem;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.92);
  font-family: inherit;
  font-size: 1rem;
  line-height: 1.7;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.moment-compose-input::placeholder {
  color: rgba(231, 241, 255, 0.58);
}

.moment-compose-images {
  grid-column: 1 / -1;
  display: grid;
  gap: 0.58rem;
}

.moment-compose-file {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}

.moment-compose-upload {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  padding: 0 0.9rem;
  border: 1px solid rgba(188, 218, 255, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(231, 241, 255, 0.84);
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 850;
  cursor: pointer;
  transition: background 180ms ease, border-color 180ms ease, transform 180ms ease;
}

.moment-compose-upload:hover {
  border-color: rgba(252, 211, 141, 0.32);
  background: rgba(252, 211, 141, 0.12);
}

.moment-compose-upload:active {
  transform: scale(0.98);
}

.moment-compose-preview {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.42rem;
}

.moment-compose-thumb {
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: 14px;
  background: rgba(3, 8, 24, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.moment-compose-thumb img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.moment-compose-remove {
  position: absolute;
  right: 0.22rem;
  top: 0.22rem;
  width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 50%;
  background: rgba(3, 8, 24, 0.64);
  color: rgba(255, 255, 255, 0.86);
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
}

.moment-compose-actions {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.moment-compose-content-btn {
  min-width: 102px;
  min-height: 40px;
  padding: 0 1rem;
  border: 1px solid rgba(188, 218, 255, 0.2);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(231, 241, 255, 0.84);
  font-family: inherit;
  font-size: 0.84rem;
  font-weight: 850;
  cursor: pointer;
  transition: background 180ms ease, border-color 180ms ease, color 180ms ease, transform 180ms ease;
}

.moment-compose-content-btn:hover,
.moment-compose-content-btn:focus-visible,
.moment-compose-content-btn.has-content {
  border-color: rgba(139, 92, 246, 0.42);
  background: rgba(139, 92, 246, 0.18);
  color: #FFFFFF;
  outline: none;
}

.moment-compose-content-btn:active {
  transform: scale(0.97);
}

.moment-compose-submit {
  grid-column: 1 / -1;
  justify-self: end;
  min-width: 82px;
  min-height: 40px;
  padding: 0 1.1rem;
  border: 1px solid rgba(252, 211, 141, 0.34);
  border-radius: 999px;
  background: rgba(252, 211, 141, 0.16);
  color: #FFF4CF;
  font-family: inherit;
  font-size: 0.86rem;
  font-weight: 850;
  cursor: pointer;
  transition: background 180ms ease, border-color 180ms ease, transform 180ms ease;
}

.moment-compose-submit:hover {
  border-color: rgba(252, 211, 141, 0.48);
  background: rgba(252, 211, 141, 0.22);
}

.moment-compose-submit:active {
  transform: scale(0.97);
}

.moment-image-viewer {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, 0.94);
  opacity: 0;
  pointer-events: none;
  touch-action: none;
  transition: opacity 180ms ease;
}

.moment-image-viewer.is-open {
  opacity: 1;
  pointer-events: auto;
}

.moment-image-viewer-img {
  width: 100vw;
  height: 100svh;
  object-fit: contain;
  transform: scale(var(--viewer-scale, 1));
  transform-origin: center;
  transition: transform 120ms ease;
  will-change: transform;
  user-select: none;
  -webkit-user-drag: none;
}

.moment-image-viewer-close {
  position: fixed;
  top: calc(0.75rem + env(safe-area-inset-top, 0px));
  left: calc(0.75rem + env(safe-area-inset-left, 0px));
  z-index: 3;
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.34);
  color: rgba(255, 255, 255, 0.94);
  font-family: inherit;
  font-size: 1.55rem;
  font-weight: 500;
  line-height: 1;
  cursor: pointer;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: background 160ms ease, transform 160ms ease;
}

.moment-image-viewer-close:hover {
  background: rgba(255, 255, 255, 0.14);
}

.moment-image-viewer-close:active {
  transform: scale(0.94);
}

.moment-image-viewer-count {
  position: fixed;
  top: calc(0.88rem + env(safe-area-inset-top, 0px));
  right: calc(1rem + env(safe-area-inset-right, 0px));
  z-index: 2;
  min-width: 46px;
  padding: 0.26rem 0.58rem;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.32);
  color: rgba(255, 255, 255, 0.92);
  font-size: 0.78rem;
  font-weight: 850;
  line-height: 1.2;
  text-align: center;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.floating-submit-btn.moment-floating-submit-btn {
  width: 42px !important;
  height: 42px !important;
  min-width: 42px !important;
  padding: 0 !important;
  color: #FFF4CF !important;
  border-color: rgba(252, 211, 141, 0.28) !important;
  background: rgba(23, 20, 48, 0.72) !important;
  font-family: inherit;
}

.moment-floating-submit-btn span {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

@media (max-width: 900px) {
  .moment-square-page {
    padding-top: 6.7rem;
  }

  .moment-square-shell {
    grid-template-columns: 1fr;
    gap: 0.45rem;
  }

  .moment-square-copy {
    text-align: center;
  }

  .moment-sphere-stage {
    height: min(74svh, 700px);
    min-height: 540px;
  }
}

@media (max-width: 640px) {
  .moment-square-page {
    padding: 6.5rem 0 2.2rem;
  }

  .moment-square-shell {
    width: min(100% - 1rem, 560px);
  }

  .moment-square-hint {
    min-height: 32px;
    padding: 0.4rem 0.72rem;
    font-size: 0.78rem;
  }

  .moment-square-controls {
    position: fixed;
    right: 1rem;
    bottom: calc(1rem + env(safe-area-inset-bottom, 0px) + 54px);
    justify-content: flex-end;
    margin-top: 0;
  }

  .moment-zoom-controls {
    left: 1rem;
    bottom: calc(1rem + env(safe-area-inset-bottom, 0px) + 54px);
  }

  .moment-refresh-btn {
    width: 42px;
    height: 42px;
    min-width: 42px;
    min-height: 42px;
    padding: 0;
  }

  .moment-sphere-stage {
    height: 68svh;
    min-height: 500px;
  }

  .moment-sphere-orb {
    width: min(88vw, 450px);
    max-width: 88vw;
  }

  .moment-sphere-stage::before,
  .moment-sphere-stage::after {
    width: min(88vw, 450px);
    max-width: 88vw;
  }

  .moment-bubble-layer {
    width: min(88vw, 450px);
    max-width: 88vw;
  }

  .moment-bubble {
    width: clamp(80px, 28vw, 112px);
    min-height: 50px;
    padding: 0.38rem;
    border-radius: 12px;
  }

  .moment-bubble-avatar {
    width: 22px;
    height: 22px;
    flex-basis: 22px;
    font-size: 0.62rem;
  }

  .moment-bubble-text {
    font-size: 0.64rem;
    line-height: 1.42;
    -webkit-line-clamp: 2;
  }

  .moment-bubble-media {
    border-radius: 10px;
  }

  .moment-bubble-actions {
    gap: 0.22rem;
    font-size: 0.52rem;
  }

  .moment-modal {
    width: min(90vw, 520px);
    max-height: 80svh;
    border-radius: 22px;
    padding: 1.1rem;
  }

  .moment-modal-actions {
    gap: 0.45rem;
  }

  .moment-compose-bubble {
    width: min(92vw, 430px);
    min-height: 196px;
    border-radius: 24px;
    padding: 0.85rem;
  }

  .moment-compose-input {
    min-height: 122px;
    border-radius: 20px;
    font-size: 0.94rem;
  }

  .moment-action-btn {
    min-height: 40px;
    gap: 0.2rem;
    font-size: 0.76rem;
  }

  .moment-floating-submit-btn {
    padding: 0 !important;
    width: 42px !important;
  }

  .moment-floating-submit-btn span {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
  }
}
