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

:root {
  --bg: #e8ecf4;
  --bg-grad-1: #eef1f8;
  --bg-grad-2: #e2e8f4;
  --card: #ffffff;
  --card-elevated: #ffffff;
  --card-inner: #f6f8fc;
  --border: rgba(15, 23, 42, 0.08);
  --border-strong: rgba(15, 23, 42, 0.12);
  --text: #1e293b;
  --text-secondary: #64748b;
  --text-muted: #94a3b8;
  --accent: #6366f1;
  --accent-light: #eef2ff;
  --accent-dark: #4f46e5;
  --copy-tag: #0ea5e9;
  --copy-bg: #e0f2fe;
  --audio-tag: #8b5cf6;
  --audio-bg: #ede9fe;
  --danger: #ef4444;
  --danger-bg: #fef2f2;
  --success: #10b981;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.06);
  --shadow: 0 4px 16px rgba(15, 23, 42, 0.08), 0 1px 3px rgba(15, 23, 42, 0.06);
  --shadow-lg: 0 12px 40px rgba(15, 23, 42, 0.12), 0 4px 12px rgba(15, 23, 42, 0.06);
  --radius: 16px;
  --radius-sm: 12px;
  --radius-xs: 8px;
  --nav-h: 64px;
  --icp-h: 22px;
  --bottom-offset: calc(var(--nav-h) + var(--icp-h) + var(--safe-bottom) + 4px);
  --header-h: 64px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-top: env(safe-area-inset-top, 0px);
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  overscroll-behavior: none;
  -webkit-overflow-scrolling: touch;
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background: linear-gradient(165deg, var(--bg-grad-1) 0%, var(--bg-grad-2) 50%, #dce4f0 100%);
  background-attachment: fixed;
  color: var(--text);
  min-height: 100dvh;
  overflow-x: hidden;
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior-y: none;
  touch-action: manipulation;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

.app {
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
  max-width: 480px;
  margin: 0 auto;
}

/* Header */
.header {
  position: sticky;
  top: 0;
  z-index: 10;
  padding: calc(12px + var(--safe-top)) 20px 12px;
  background: rgba(238, 241, 248, 0.95);
  -webkit-transform: translateZ(0);
  transform: translateZ(0);
  will-change: transform;
}

.header-inner {
  /* Removed animation for performance */
}

.header-title {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
  text-align: center;
  line-height: 1.2;
}

.header-sub {
  font-size: 0.8125rem;
  color: var(--text-secondary);
  margin-top: 2px;
  text-align: center;
  line-height: 1.2;
}

/* Main & Pages */
.main {
  flex: 1;
  min-height: 0;
  position: relative;
}

.page {
  display: none;
  padding: 0 16px;
  padding-bottom: calc(var(--bottom-offset) + 8px);
}

.page-active {
  display: block;
}

/* Removed pageIn animation for performance */

@keyframes fadeDown {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.is-hidden {
  display: none !important;
}

.site-icp {
  margin: 0;
  padding: 2px 16px calc(4px + var(--safe-bottom));
  text-align: center;
  background: rgba(238, 241, 248, 0.98);
}

.site-icp a {
  font-size: 0.6875rem;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s;
}

.site-icp a:hover {
  color: var(--text-secondary);
}

.scroll-top {
  position: fixed;
  z-index: 9998;
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: none;
  background: var(--card);
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.15);
  color: var(--accent);
  font-size: 1.25rem;
  font-weight: 700;
  font-family: inherit;
  line-height: 1;
  cursor: pointer;
  bottom: calc(var(--bottom-offset) + 80px);
  right: max(16px, calc(50vw - 224px));
  transition: opacity 0.25s var(--ease), transform 0.25s var(--spring), box-shadow 0.2s;
  -webkit-tap-highlight-color: transparent;
}

.scroll-top:active {
  transform: scale(0.92);
}

.scroll-top:not(.is-hidden) {
  animation: scrollTopIn 0.3s var(--ease);
}

@keyframes scrollTopIn {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.9);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Base Card */
.card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  margin-bottom: 14px;
  overflow: hidden;
  transition: box-shadow 0.25s var(--ease), transform 0.25s var(--ease);
}

.card-head {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 18px 0;
}

.card-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.card-icon--write {
  background: linear-gradient(135deg, #818cf8 0%, #6366f1 100%);
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.35);
}

.card-icon--write::after {
  content: "✎";
  font-size: 1.25rem;
  color: #fff;
}

.card-icon--asset {
  background: linear-gradient(135deg, #f472b6 0%, #ec4899 100%);
  box-shadow: 0 4px 12px rgba(236, 72, 153, 0.35);
}

.card-icon--asset::after {
  content: "▣";
  font-size: 1.125rem;
  color: #fff;
}

.card-asset-add {
  margin-bottom: 14px;
}

.card-hint {
  margin-bottom: 14px;
  padding: 14px 16px;
}

.card-hint-text {
  margin: 0;
  font-size: 0.8125rem;
  line-height: 1.55;
  color: var(--text-muted);
}

.card-hint-text strong {
  color: var(--text);
  font-weight: 600;
}

.form-section-divider {
  margin: 4px 0 2px;
  padding-top: 4px;
  border-top: 1px dashed var(--border);
}

.form-section-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
}

.tag--bind {
  color: #6d28d9;
  background: #ede9fe;
}

.field-card--bind .asset-bind-empty {
  margin: 0 0 10px;
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.field-card--bind .asset-bind-empty.is-hidden {
  display: none;
}

.asset-bind-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.btn-chip {
  padding: 8px 14px;
  font-size: 0.75rem;
  font-weight: 600;
  font-family: inherit;
  color: var(--accent-dark);
  background: var(--accent-light);
  border: 1px solid transparent;
  border-radius: 999px;
  cursor: pointer;
}

.btn-chip--muted {
  color: var(--text-muted);
  background: var(--card-inner);
  border-color: var(--border);
}

.asset-bind-preview {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin-bottom: 10px;
  padding: 10px;
  background: var(--card-inner);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}

.asset-bind-preview.is-hidden {
  display: none;
}

.asset-bind-thumb {
  flex-shrink: 0;
  width: 72px;
  height: 72px;
  border-radius: 8px;
  overflow: hidden;
  background: #f1f5f9;
}

.asset-bind-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.asset-bind-meta {
  flex: 1;
  min-width: 0;
}

.asset-bind-url {
  margin: 6px 0 0;
  font-size: 0.75rem;
  line-height: 1.45;
  word-break: break-all;
  color: var(--text-muted);
}

.asset-bind-url--empty {
  font-style: italic;
}

.inner-card--asset .inner-card-label {
  color: #be185d;
}

.note-asset-row {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

.note-asset-thumb {
  flex-shrink: 0;
  width: 64px;
  height: 64px;
  border-radius: 8px;
  overflow: hidden;
  background: #f1f5f9;
  cursor: zoom-in;
}

.note-asset-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.note-asset-meta {
  flex: 1;
  min-width: 0;
}

.note-asset-url {
  margin: 6px 0 0;
  font-size: 0.8125rem;
  line-height: 1.45;
  word-break: break-all;
  color: var(--text-muted);
}

.note-asset-url--empty {
  font-style: italic;
}

.picker-overlay {
  position: fixed;
  inset: 0;
  z-index: 10100;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0;
  background: rgba(15, 23, 42, 0.5);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.picker-overlay.is-hidden {
  display: none;
}

.picker-sheet {
  width: 100%;
  max-width: 480px;
  max-height: min(78vh, 560px);
  display: flex;
  flex-direction: column;
  background: var(--card);
  border-radius: 20px 20px 0 0;
  box-shadow: 0 -8px 32px rgba(15, 23, 42, 0.12);
}

.picker-sheet-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 16px 8px;
}

.picker-sheet-title {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
}

.picker-sheet-close {
  width: 36px;
  height: 36px;
  font-size: 1.5rem;
  line-height: 1;
  color: var(--text-muted);
  background: var(--card-inner);
  border: none;
  border-radius: 50%;
  cursor: pointer;
}

.picker-sheet-hint {
  margin: 0 16px 10px;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.picker-empty {
  padding: 24px 16px 32px;
  text-align: center;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.picker-empty.is-hidden {
  display: none;
}

.picker-list {
  list-style: none;
  margin: 0;
  padding: 0 12px 16px;
  overflow-y: auto;
  flex: 1;
}

.picker-item {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 12px;
  margin-bottom: 8px;
  background: var(--card-inner);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
}

.picker-item:active {
  transform: scale(0.99);
}

.picker-thumb {
  flex-shrink: 0;
  width: 56px;
  height: 56px;
  border-radius: 8px;
  overflow: hidden;
  background: #f1f5f9;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.6875rem;
  color: var(--text-muted);
}

.picker-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.picker-thumb--empty {
  border: 1px dashed var(--border);
}

.picker-item-body {
  flex: 1;
  min-width: 0;
}

.picker-item-time {
  display: block;
  margin-top: 4px;
  font-size: 0.6875rem;
  color: var(--text-muted);
}

.picker-item-url {
  margin: 6px 0 0;
  font-size: 0.75rem;
  line-height: 1.4;
  word-break: break-all;
  color: var(--text-muted);
}

.tag--shot {
  color: #be185d;
  background: #fce7f3;
}

.tag--video {
  color: #c2410c;
  background: #ffedd5;
}

.field-card--shot .btn-paste-float {
  color: #be185d;
  border-color: rgba(236, 72, 153, 0.28);
  box-shadow: 0 2px 10px rgba(236, 72, 153, 0.14), 0 1px 2px rgba(15, 23, 42, 0.05);
}

.field-card--shot .btn-paste-float:active {
  background: #fce7f3;
}

.shot-upload {
  position: relative;
  min-height: 140px;
  border-radius: var(--radius-sm);
  background: var(--card-inner);
  border: 1.5px dashed rgba(236, 72, 153, 0.35);
  overflow: hidden;
  cursor: pointer;
}

.shot-upload .btn-paste-float {
  z-index: 3;
}

.shot-input-hidden {
  position: absolute;
  width: 0;
  height: 0;
  opacity: 0;
  pointer-events: none;
}

.shot-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 140px;
  padding: 16px 16px 48px;
  color: var(--text-muted);
}

.shot-placeholder-icon {
  font-size: 1.75rem;
  opacity: 0.7;
}

.shot-placeholder-text {
  font-size: 0.8125rem;
}

.shot-preview {
  position: relative;
  min-height: 140px;
  max-height: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #0f172a;
}

.shot-preview img {
  width: 100%;
  max-height: 220px;
  object-fit: contain;
  display: block;
}

.shot-clear {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 28px;
  height: 28px;
  border: none;
  border-radius: 50%;
  background: rgba(15, 23, 42, 0.65);
  color: #fff;
  font-size: 1.125rem;
  line-height: 1;
  cursor: pointer;
  z-index: 2;
}

.platform-preview {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
  padding: 8px 10px;
  background: var(--card-inner);
  border-radius: var(--radius-xs);
  border: 1px solid var(--border);
}

.platform-preview-url {
  flex: 1;
  min-width: 0;
  font-size: 0.6875rem;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.platform-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  font-size: 0.6875rem;
  font-weight: 700;
  border-radius: 999px;
  flex-shrink: 0;
}

.platform-douyin { color: #fff; background: #111; }
.platform-kuaishou { color: #fff; background: #ff4906; }
.platform-channels { color: #fff; background: #07c160; }
.platform-bilibili { color: #fff; background: #00a1d6; }
.platform-xiaohongshu { color: #fff; background: #ff2442; }
.platform-weibo { color: #fff; background: #e6162d; }
.platform-youtube { color: #fff; background: #ff0000; }
.platform-tiktok { color: #fff; background: #010101; }
.platform-twitter { color: #fff; background: #0f1419; }
.platform-haokan { color: #fff; background: #2932e1; }
.platform-xigua { color: #fff; background: #fe2c55; }
.platform-other { color: var(--accent-dark); background: var(--accent-light); }
.platform-unknown { color: var(--text-secondary); background: #e2e8f0; }

.platform-badge--error {
  color: #fff;
  background: var(--danger);
}

/* E-commerce platforms */
.platform-taobao { color: #fff; background: #ff5000; }
.platform-jd { color: #fff; background: #e2231a; }
.platform-pinduoduo { color: #fff; background: #e02e24; }
.platform-1688 { color: #fff; background: #ff6a00; }
.platform-xianyu { color: #fff; background: #ffb400; }
.platform-amazon { color: #fff; background: #ff9900; }
.platform-shopee { color: #fff; background: #ee4d2d; }

.btn-primary--asset {
  background: linear-gradient(135deg, #f9a8d4 0%, #ec4899 50%, #db2777 100%);
  box-shadow: 0 4px 16px rgba(236, 72, 153, 0.35);
}

.field-card--video .btn-paste-float {
  color: #c2410c;
  border-color: rgba(249, 115, 22, 0.28);
  box-shadow: 0 2px 10px rgba(249, 115, 22, 0.14);
}

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

/* 素材库 - 苹果相册风格网格 */
.asset-grid {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 2px;
  padding: 0;
  margin: 0;
}

.asset-grid.is-hidden {
  display: none;
}

.asset-grid-item {
  aspect-ratio: 1;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.asset-grid-item:active .asset-grid-thumb {
  opacity: 0.85;
}

.asset-grid-thumb {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: var(--card-inner);
  display: flex;
  align-items: center;
  justify-content: center;
}

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

.asset-grid-fallback {
  font-size: 0.625rem;
  font-weight: 600;
  color: var(--text-muted);
  text-align: center;
  padding: 4px;
  line-height: 1.2;
  word-break: break-all;
}

.asset-detail-sheet {
  padding-bottom: calc(24px + var(--safe-bottom));
}

.asset-detail-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-bottom: 8px;
}

.asset-detail-time {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.asset-detail-shot {
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: #0f172a;
}

.asset-detail-shot img {
  width: 100%;
  display: block;
  max-height: 50vh;
  object-fit: contain;
}

.asset-detail-shot--empty {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 120px;
  font-size: 0.8125rem;
  color: var(--text-muted);
  background: var(--card-inner);
  border: 1px dashed var(--border);
}

.asset-detail-shot--zoom {
  cursor: zoom-in;
}

.asset-detail-meta {
  margin-top: 2px;
}

.asset-detail-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 4px;
}

.asset-detail-linked {
  background: var(--accent-light);
  border: 1px solid rgba(99, 102, 241, 0.2);
  border-radius: var(--radius-sm);
  padding: 12px;
}

.asset-detail-linked-label {
  font-size: 0.6875rem;
  font-weight: 700;
  color: var(--accent-dark);
  margin-bottom: 6px;
}

.asset-detail-linked-preview {
  font-size: 0.8125rem;
  color: var(--text);
  line-height: 1.5;
  margin-bottom: 10px;
  word-break: break-word;
}

.asset-detail-linked-preview--full {
  font-size: 0.875rem;
  line-height: 1.6;
  white-space: pre-wrap;
  max-height: 200px;
  overflow-y: auto;
}

.asset-detail-linked-audio {
  margin-bottom: 10px;
}

.asset-edit-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.asset-edit-form .field-card--shot .btn-chip {
  margin-top: 8px;
}

.btn-chip--danger {
  color: var(--danger);
  border-color: rgba(239, 68, 68, 0.25);
  background: var(--danger-bg);
}

.field-hint--ok {
  color: var(--success);
}

.field-hint--muted {
  color: var(--text-muted);
}

.field-hint--warn {
  color: #d97706;
}

.field-hint--error {
  color: var(--danger);
}

.asset-card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  overflow: hidden;
}

.asset-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px 8px;
  flex-wrap: wrap;
}

.asset-card-body {
  padding: 0 14px 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.asset-shot {
  border-radius: var(--radius-xs);
  overflow: hidden;
  background: #0f172a;
  min-height: 80px;
}

.asset-shot img {
  width: 100%;
  max-height: 200px;
  object-fit: cover;
  display: block;
}

.asset-shot--empty {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 72px;
  font-size: 0.75rem;
  color: var(--text-muted);
  background: var(--card-inner);
  border: 1px dashed var(--border);
}

.asset-shot--zoom {
  cursor: zoom-in;
}

.asset-shot--zoom img {
  cursor: zoom-in;
}

.shot-preview--zoom {
  cursor: zoom-in;
}

.shot-preview--zoom img {
  cursor: zoom-in;
}

.img-lightbox {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 16px 16px;
  background: rgba(15, 23, 42, 0.92);
  backdrop-filter: blur(4px);
}

.img-lightbox.is-hidden {
  display: none;
}

.img-lightbox-img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: var(--radius-xs);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
}

.img-lightbox-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
}

.img-lightbox-close:active {
  background: rgba(255, 255, 255, 0.25);
}

.asset-meta {
  display: flex;
  align-items: center;
  gap: 8px;
}

.asset-url-text {
  font-size: 0.75rem;
  color: var(--text-secondary);
  line-height: 1.5;
  word-break: break-all;
}

.asset-url-text--empty {
  color: var(--text-muted);
}

.asset-card-footer {
  padding: 0 14px 14px;
}

.btn-open {
  width: 100%;
  padding: 12px 16px;
  font-size: 0.875rem;
  font-weight: 600;
  font-family: inherit;
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  background: linear-gradient(135deg, #38bdf8 0%, #0ea5e9 50%, #0284c7 100%);
  box-shadow: 0 2px 10px rgba(14, 165, 233, 0.35);
}

.btn-open:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  box-shadow: none;
}

.btn-open:active:not(:disabled) {
  transform: scale(0.98);
}

.card-title {
  font-size: 1.0625rem;
  font-weight: 700;
  color: var(--text);
}

.card-desc {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 2px;
}

/* Form Card */
.card-form .form {
  padding: 16px 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

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

.field-label {
  display: flex;
  align-items: center;
}

.field-editor {
  position: relative;
}

.field-editor .field-input {
  display: block;
  padding-bottom: 46px;
}

.field-editor .field-textarea-sm {
  padding-bottom: 42px;
  min-height: 88px;
}

.btn-paste-float {
  position: absolute;
  right: 10px;
  bottom: 10px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 11px 6px 9px;
  font-size: 0.6875rem;
  font-weight: 600;
  font-family: inherit;
  line-height: 1;
  color: var(--accent-dark);
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(99, 102, 241, 0.22);
  border-radius: 999px;
  box-shadow: 0 2px 10px rgba(99, 102, 241, 0.12), 0 1px 2px rgba(15, 23, 42, 0.06);
  cursor: pointer;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: transform 0.15s var(--ease), box-shadow 0.2s, background 0.2s, border-color 0.2s;
}

.btn-paste-float__icon {
  flex-shrink: 0;
  opacity: 0.85;
}

.field-card--copy .btn-paste-float {
  color: #0369a1;
  border-color: rgba(14, 165, 233, 0.28);
  box-shadow: 0 2px 10px rgba(14, 165, 233, 0.14), 0 1px 2px rgba(15, 23, 42, 0.05);
}

.field-card--audio .btn-paste-float {
  color: #6d28d9;
  border-color: rgba(139, 92, 246, 0.28);
  box-shadow: 0 2px 10px rgba(139, 92, 246, 0.14), 0 1px 2px rgba(15, 23, 42, 0.05);
}

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

.field-card--copy .btn-paste-float:active {
  background: var(--copy-bg);
}

/* Duplicate Warning */
.dup-warn {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 8px;
  padding: 12px 14px;
  background: #fef3c7;
  border: 1px solid #f59e0b;
  border-radius: var(--radius-sm);
  animation: fadeIn 0.3s var(--ease);
}

.dup-warn.is-hidden {
  display: none;
}

.dup-warn-icon {
  font-size: 1.25rem;
  flex-shrink: 0;
  line-height: 1;
  margin-top: 1px;
}

.dup-warn-body {
  flex: 1;
  min-width: 0;
}

.dup-warn-text {
  margin: 0;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #92400e;
  line-height: 1.4;
}

.dup-warn-btn {
  margin-top: 6px;
  padding: 5px 12px;
  font-size: 0.75rem;
  font-weight: 600;
  font-family: inherit;
  color: #fff;
  background: #d97706;
  border: none;
  border-radius: 999px;
  cursor: pointer;
  transition: transform 0.15s;
}

.dup-warn-btn:active {
  transform: scale(0.95);
}

.dup-warn-close {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  color: #92400e;
  background: transparent;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  line-height: 1;
}

.dup-warn-close:active {
  background: rgba(146, 64, 14, 0.1);
}

.field-card--audio .btn-paste-float:active {
  background: var(--audio-bg);
}

.tag {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: 20px;
}

.tag--copy {
  color: #0369a1;
  background: var(--copy-bg);
}

.tag--title {
  color: #7c3aed;
  background: #ede9fe;
}

.field-card--title .field-editor {
  position: relative;
}

.field-card--title .field-editor .field-input {
  padding-right: 48px;
}

.title-hash-row {
  display: flex;
  gap: 8px;
  margin-top: 6px;
}

.btn-hash-chip {
  padding: 6px 14px;
  font-size: 0.75rem;
  font-weight: 600;
  font-family: inherit;
  color: #7c3aed;
  background: #f5f3ff;
  border: 1px solid rgba(124, 58, 237, 0.2);
  border-radius: 999px;
  cursor: pointer;
  transition: transform 0.15s var(--ease), background 0.2s;
}

.btn-hash-chip:active {
  transform: scale(0.95);
  background: #ede9fe;
}

.field-card--title .field-editor .field-input {
  padding-right: 48px;
}

.tag--audio {
  color: #6d28d9;
  background: var(--audio-bg);
}

.tag--douyin-only {
  color: #fff;
  background: #111;
  margin-left: 6px;
  font-size: 0.625rem;
  padding: 2px 8px;
}

.field-input {
  width: 100%;
  padding: 14px 16px;
  font-size: 0.9375rem;
  font-family: inherit;
  color: var(--text);
  background: var(--card-inner);
  border: 1.5px solid transparent;
  border-radius: var(--radius-sm);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
  line-height: 1.6;
}

.field-input::placeholder {
  color: var(--text-muted);
}

.field-input:focus {
  background: var(--card);
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.15);
}

.field-textarea {
  resize: vertical;
  min-height: 120px;
}

.field-textarea-sm {
  min-height: 72px;
}

.field-hint {
  font-size: 0.6875rem;
  color: var(--text-muted);
}

.field-counter {
  font-size: 0.6875rem;
  color: var(--text-muted);
  text-align: right;
  min-height: 1em;
}

.field-counter.has-text {
  color: var(--accent);
}

.btn-primary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 16px 20px;
  margin-top: 4px;
  font-size: 1rem;
  font-weight: 600;
  font-family: inherit;
  color: #fff;
  background: linear-gradient(135deg, #818cf8 0%, var(--accent) 50%, var(--accent-dark) 100%);
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.4);
  transition: transform 0.2s var(--spring), box-shadow 0.2s, opacity 0.2s;
}

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

.btn-primary.is-loading {
  pointer-events: none;
  opacity: 0.85;
}

.btn-primary.is-loading .btn-primary-text::after {
  content: "";
  display: inline-block;
  width: 14px;
  height: 14px;
  margin-left: 8px;
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
  vertical-align: middle;
}

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

.btn-primary-icon {
  transition: transform 0.25s var(--spring);
}

.btn-primary:active .btn-primary-icon {
  transform: translateX(4px);
}

/* Filter Card */
.card-filter {
  padding: 14px 16px 12px;
}

.filter-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.filter-row--search {
  margin-bottom: 8px;
}

.date-toolbar {
  margin-bottom: 10px;
}

.date-toolbar-main {
  display: flex;
  align-items: center;
  gap: 8px;
}

.date-input-full {
  flex: 1;
  min-width: 0;
  height: 40px;
  padding: 0 10px;
  font-size: 0.875rem;
  font-family: inherit;
  font-weight: 600;
  color: var(--text);
  background: var(--card-inner);
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  color-scheme: light;
}

.date-input-full:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.12);
}

.date-toolbar-sub {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 8px;
}

.date-badge-text {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--accent-dark);
}

.icon-btn {
  flex-shrink: 0;
  width: 54px;
  height: 54px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  font-weight: 800;
  line-height: 1;
  color: var(--text-secondary);
  background: var(--card-inner);
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background 0.2s, color 0.2s, transform 0.15s var(--spring);
  -webkit-tap-highlight-color: transparent;
}

.icon-btn:active {
  transform: scale(0.92);
  background: var(--accent-light);
  color: var(--accent);
}

.chip-btn {
  flex-shrink: 0;
  padding: 0 14px;
  height: 36px;
  font-size: 0.8125rem;
  font-weight: 600;
  font-family: inherit;
  color: var(--accent);
  background: var(--accent-light);
  border: 1px solid rgba(99, 102, 241, 0.2);
  border-radius: var(--radius-xs);
  cursor: pointer;
  transition: transform 0.15s var(--spring), opacity 0.2s;
}

.chip-btn:active:not(.is-active) {
  transform: scale(0.95);
}

.chip-btn.is-active {
  opacity: 0.45;
  pointer-events: none;
}

.search-card {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 14px;
  height: 44px;
  background: var(--card-inner);
  border: 1.5px solid transparent;
  border-radius: var(--radius-sm);
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}

.search-card:focus-within {
  background: var(--card);
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.12);
}

.search-svg {
  flex-shrink: 0;
  color: var(--text-muted);
}

.search-input {
  flex: 1;
  min-width: 0;
  border: none;
  outline: none;
  font-size: 0.9375rem;
  font-family: inherit;
  color: var(--text);
  background: transparent;
}

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

.search-clear {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  background: rgba(15, 23, 42, 0.06);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s;
}

.search-clear:active {
  transform: scale(0.9);
  background: rgba(15, 23, 42, 0.12);
}

.list-stats {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-secondary);
  padding-left: 2px;
  min-height: 1.25em;
}

/* State Cards */
.state-card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  border: 1px dashed var(--border-strong);
  padding: 48px 24px;
  text-align: center;
  animation: fadeIn 0.4s var(--ease);
}

.state-icon {
  font-size: 2.5rem;
  margin-bottom: 12px;
  opacity: 0.9;
}

.state-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
}

.state-desc {
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-top: 6px;
}

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

/* Note List Cards */
.note-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.note-card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  overflow: hidden;
  animation: cardSlideIn 0.4s var(--ease) backwards;
  transition: transform 0.2s var(--ease), box-shadow 0.2s;
}

.note-card:active {
  transform: scale(0.995);
}

@keyframes cardSlideIn {
  from {
    opacity: 0;
    transform: translateY(16px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.note-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
  background: linear-gradient(90deg, var(--accent-light) 0%, transparent 100%);
  border-bottom: 1px solid var(--border);
}

.note-time {
  flex: 1;
  min-width: 0;
  display: block;
  font-size: 0.75rem;
  font-weight: 500;
  line-height: 1.45;
  color: var(--text-secondary);
  word-break: break-all;
}

.note-time::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-right: 6px;
  vertical-align: middle;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.2);
}

.note-delete {
  flex-shrink: 0;
  padding: 8px 14px;
  font-size: 0.8125rem;
  font-weight: 500;
  font-family: inherit;
  line-height: 1.3;
  color: var(--danger);
  background: var(--danger-bg);
  border: 1px solid transparent;
  border-radius: 22px;
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.15s, background 0.2s, box-shadow 0.2s;
  min-height: 38px;
}

.note-delete:active {
  transform: scale(0.94);
  box-shadow: 0 1px 4px rgba(239, 68, 68, 0.25);
}

.note-edit {
  flex-shrink: 0;
  padding: 8px 14px;
  font-size: 0.8125rem;
  font-weight: 500;
  font-family: inherit;
  line-height: 1.3;
  color: var(--accent-dark);
  background: var(--accent-light);
  border: 1px solid transparent;
  border-radius: 22px;
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.15s, background 0.2s, box-shadow 0.2s;
  margin-right: 8px;
  min-height: 38px;
}

.note-edit:active {
  transform: scale(0.94);
  box-shadow: 0 1px 4px rgba(79, 70, 229, 0.25);
}

.note-card-body {
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.inner-card {
  background: var(--card-inner);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  border: 1px solid var(--border);
}

.inner-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 6px 8px;
  margin-bottom: 8px;
}

.inner-card-head .btn-ghost {
  margin-left: auto;
}

.inner-card-label {
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.inner-card--copy .inner-card-label {
  color: var(--copy-tag);
}

.inner-card--audio .inner-card-label {
  color: var(--audio-tag);
}

.note-copy-text,
.note-audio-text {
  font-size: 0.9375rem;
  line-height: 1.65;
  word-break: break-word;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
  color: var(--text);
}

.note-no-audio {
  font-size: 0.8125rem;
  color: var(--text-muted);
  font-style: italic;
}


.note-card-footer {
  display: flex;
  gap: 8px;
  padding: 12px 16px 16px;
  border-top: 1px solid var(--border);
  background: rgba(246, 248, 252, 0.6);
}

.btn-ghost,
.btn-solid {
  font-family: inherit;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: var(--radius-xs);
  cursor: pointer;
  transition: transform 0.15s var(--spring), background 0.2s, color 0.2s;
  border: none;
}

.btn-ghost {
  flex-shrink: 0;
  padding: 6px 10px;
  font-size: 0.6875rem;
  color: var(--accent-dark);
  background: var(--accent-light);
  white-space: nowrap;
}

.btn-ghost:active:not(:disabled) {
  transform: scale(0.94);
}

.btn-ghost:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.btn-ghost.is-copied {
  color: var(--success);
  background: #d1fae5;
}

.btn-solid {
  flex: 1;
  padding: 10px 16px;
  color: #fff;
  background: linear-gradient(135deg, #818cf8, var(--accent-dark));
  box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3);
}

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

.btn-solid.is-copied {
  background: linear-gradient(135deg, #34d399, var(--success));
}

/* Bottom Nav */
.app-footer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  z-index: 9999;
  padding: 10px 16px calc(10px + var(--safe-bottom));
  background: rgba(238, 241, 248, 0.95);
}

.bottom-nav {
  width: 100%;
  max-width: none;
}

.nav-track {
  position: relative;
  display: flex;
  background: var(--card);
  border-radius: 20px;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border);
  padding: 6px;
  pointer-events: auto;
  touch-action: manipulation;
}

.nav-pill {
  position: absolute;
  top: 6px;
  left: 6px;
  width: calc(50% - 6px);
  height: calc(100% - 12px);
  background: var(--accent-light);
  border-radius: 14px;
  transition: transform 0.35s var(--spring);
  z-index: 0;
  pointer-events: none;
}

.nav-track--3 .nav-pill {
  width: calc((100% - 12px) / 3);
}

.nav-pill.to-list {
  transform: translateX(100%);
}

.nav-track--3 .nav-pill.to-list {
  transform: translateX(100%);
}

.nav-pill.to-assets,
.nav-track--3 .nav-pill.to-assets {
  transform: translateX(200%);
}

.nav-pill.to-mine,
.nav-track--3 .nav-pill.to-mine {
  transform: translateX(200%);
}

.nav-item {
  flex: 1;
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 10px 8px;
  font-family: inherit;
  font-size: 0.6875rem;
  font-weight: 500;
  color: var(--text-muted);
  background: transparent;
  border: none;
  cursor: pointer;
  transition: color 0.25s;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.nav-item.nav-active {
  color: var(--accent-dark);
  font-weight: 600;
}

.nav-svg {
  transition: transform 0.25s var(--spring);
}

.nav-item.nav-active .nav-svg {
  transform: scale(1.08);
}

/* Edit Overlay */
.edit-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background: rgba(15, 23, 42, 0.5);
}

.edit-overlay.is-hidden {
  display: none;
}

.edit-sheet {
  width: 100%;
  max-width: 480px;
  max-height: 90dvh;
  overflow-y: auto;
  background: var(--bg-grad-1);
  border-radius: 20px 20px 0 0;
  box-shadow: var(--shadow-lg);
  padding: 0 16px calc(16px + var(--nav-h) + var(--safe-bottom));
}

@keyframes sheetUp {
  from {
    transform: translateY(100%);
  }
  to {
    transform: translateY(0);
  }
}

.edit-sheet-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 4px 12px;
  position: sticky;
  top: 0;
  background: var(--bg-grad-1);
  z-index: 1;
}

.edit-sheet-title {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--text);
}

.edit-sheet-close {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  color: var(--text-secondary);
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 50%;
  cursor: pointer;
  transition: transform 0.15s, background 0.2s;
}

.edit-sheet-close:active {
  transform: scale(0.92);
  background: var(--danger-bg);
  color: var(--danger);
}

.edit-sheet .form {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding-bottom: 8px;
}

/* Toast */
.toast {
  position: fixed;
  bottom: calc(var(--bottom-offset) + 12px);
  left: 50%;
  transform: translateX(-50%) translateY(24px) scale(0.95);
  padding: 14px 22px;
  font-size: 0.875rem;
  font-weight: 500;
  color: #fff;
  background: var(--text);
  border-radius: 14px;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s var(--ease), transform 0.35s var(--spring);
  z-index: 20000;
  max-width: calc(100% - 40px);
  text-align: center;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0) scale(1);
}

.toast.toast-success {
  background: linear-gradient(135deg, #059669, var(--success));
}

.toast.toast-error {
  background: linear-gradient(135deg, #dc2626, var(--danger));
}

/* ═══════════════════════════════════════
   SIDEBAR
   ═══════════════════════════════════════ */

.sidebar-overlay {
  position: fixed;
  inset: 0;
  z-index: 10050;
  background: rgba(15, 23, 42, 0.45);
  will-change: opacity;
  opacity: 1;
  transition: opacity 0.3s var(--ease);
  -webkit-transform: translateZ(0);
  transform: translateZ(0);
}

.sidebar-overlay.is-hidden {
  display: flex !important;
  opacity: 0;
  pointer-events: none;
}

.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 10060;
  width: 280px;
  max-width: 80vw;
  height: 100dvh;
  background: var(--card);
  box-shadow: 4px 0 24px rgba(15, 23, 42, 0.15);
  display: flex;
  flex-direction: column;
  will-change: transform;
  -webkit-transform: translateX(0);
  transform: translateX(0);
  transition: transform 0.3s cubic-bezier(0.32, 0.72, 0, 1);
}

.sidebar.is-hidden {
  display: flex !important;
  -webkit-transform: translateX(-100%);
  transform: translateX(-100%);
  pointer-events: none;
}

.sidebar:not(.is-hidden) .sidebar-link {
  opacity: 1;
  transform: translateX(0);
}

.sidebar:not(.is-hidden) .sidebar-link:nth-child(1) { transition-delay: 0.04s; }
.sidebar:not(.is-hidden) .sidebar-link:nth-child(2) { transition-delay: 0.07s; }
.sidebar:not(.is-hidden) .sidebar-link:nth-child(3) { transition-delay: 0.10s; }
.sidebar:not(.is-hidden) .sidebar-link:nth-child(4) { transition-delay: 0.13s; }
.sidebar:not(.is-hidden) .sidebar-link:nth-child(5) { transition-delay: 0.16s; }
.sidebar:not(.is-hidden) .sidebar-link:nth-child(6) { transition-delay: 0.19s; }
.sidebar:not(.is-hidden) .sidebar-link:nth-child(7) { transition-delay: 0.22s; }
.sidebar:not(.is-hidden) .sidebar-link:nth-child(8) { transition-delay: 0.25s; }

.sidebar-divider {
  opacity: 0;
  transition: opacity 0.3s ease 0.25s;
}

.sidebar:not(.is-hidden) .sidebar-divider {
  opacity: 1;
}

.sidebar-footer {
  opacity: 0;
  transition: opacity 0.3s ease 0.28s;
}

.sidebar:not(.is-hidden) .sidebar-footer {
  opacity: 1;
}

.sidebar-head {
  padding: 40px 24px 28px;
  background: linear-gradient(135deg, #6366f1 0%, #818cf8 50%, #a78bfa 100%);
  border-bottom: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  position: relative;
}

.sidebar-head::after {
  content: "";
  position: absolute;
  bottom: -20px;
  left: 0;
  right: 0;
  height: 20px;
  background: linear-gradient(to bottom, rgba(99,102,241,0.08), transparent);
  pointer-events: none;
}

.sidebar-avatar {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  overflow: hidden;
  background: rgba(255,255,255,0.2);
  border: 3px solid rgba(255,255,255,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(0,0,0,0.15);
}

.sidebar-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.sidebar-avatar-placeholder {
  font-size: 1.75rem;
  font-weight: 700;
  color: rgba(255,255,255,0.8);
}

.sidebar-nickname {
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
  margin: 0;
}

.sidebar-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 50%;
  background: rgba(255,255,255,0.15);
  color: rgba(255,255,255,0.8);
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
  transition: background 0.2s;
}

.sidebar-close:active {
  background: rgba(255,255,255,0.25);
}

.sidebar-nav {
  flex: 1;
  padding: 8px 0;
  overflow-y: auto;
}

.sidebar-link {
  display: flex;
  align-items: center;
  width: 100%;
  padding: 14px 28px;
  font-size: 0.9375rem;
  font-weight: 500;
  font-family: inherit;
  color: var(--text);
  background: transparent;
  border: none;
  cursor: pointer;
  text-align: left;
  position: relative;
  opacity: 0;
  transform: translateX(-12px);
  transition: background 0.2s, color 0.2s, opacity 0.3s ease, transform 0.3s ease;
}

.sidebar-link:active {
  background: var(--accent-light);
}

.sidebar-link--active {
  color: var(--accent-dark);
  background: var(--accent-light);
  font-weight: 600;
}

.sidebar-link--active::before {
  content: "";
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 18px;
  background: var(--accent);
  border-radius: 2px;
}

.sidebar-link--logout {
  color: var(--danger);
}

.sidebar-divider {
  height: 1px;
  background: var(--border);
  margin: 8px 20px;
}

.sidebar-footer {
  padding: 14px 20px;
  border-top: 1px solid var(--border);
  text-align: center;
}

.sidebar-footer a {
  font-size: 0.6875rem;
  color: var(--text-muted);
  text-decoration: none;
}

/* ═══════════════════════════════════════
   HEADER AVATAR & MENU
   ═══════════════════════════════════════ */

.header-row {
  display: flex;
  align-items: center;
  gap: 14px;
  position: relative;
}

.header-menu-btn {
  flex-shrink: 0;
  padding: 0;
  background: transparent;
  border: none;
  cursor: pointer;
}

.header-back-btn {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--card-inner);
  border: none;
  border-radius: 10px;
  cursor: pointer;
  color: var(--text);
  transition: background 0.15s, transform 0.15s;
}
.header-back-btn:active {
  transform: scale(0.92);
  background: var(--card-hover, #e2e5ee);
}

.header-avatar-mini {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--card-inner);
  border: 2px solid var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.875rem;
  color: var(--text-muted);
  box-shadow: 0 2px 8px rgba(99, 102, 241, 0.2);
  transition: transform 0.2s;
}

.header-avatar-mini:active {
  transform: scale(0.92);
}

.header-avatar-mini img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.header-center {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

/* ═══════════════════════════════════════
   AUTH OVERLAY
   ═══════════════════════════════════════ */

.auth-overlay {
  position: fixed;
  inset: 0;
  z-index: 20000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: linear-gradient(165deg, var(--bg-grad-1) 0%, var(--bg-grad-2) 50%, #dce4f0 100%);
}

.auth-overlay.is-hidden {
  display: none;
}

.auth-card {
  width: 100%;
  max-width: 380px;
  background: var(--card);
  border-radius: 20px;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  animation: authIn 0.4s var(--spring);
}

@keyframes authIn {
  from { opacity: 0; transform: translateY(20px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.auth-head {
  padding: 28px 24px 16px;
  text-align: center;
  background: linear-gradient(135deg, var(--accent-light) 0%, #e0e7ff 100%);
  border-bottom: 1px solid var(--border);
}

.auth-title {
  font-size: 1.375rem;
  font-weight: 700;
  color: var(--text);
  margin: 0;
}

.auth-desc {
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin: 6px 0 0;
}

.auth-form {
  padding: 20px 24px 28px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.auth-avatar-upload {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.auth-avatar-label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.auth-required {
  color: var(--danger);
}

.auth-avatar-zone {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--card-inner);
  border: 2px dashed var(--border-strong);
  cursor: pointer;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.2s;
}

.auth-avatar-zone:active {
  border-color: var(--accent);
}

.auth-avatar-preview {
  width: 100%;
  height: 100%;
}

.auth-avatar-preview.is-hidden {
  display: none;
}

.auth-avatar-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.auth-avatar-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  font-size: 0.625rem;
  color: var(--text-muted);
}

.auth-avatar-placeholder span {
  font-size: 1.5rem;
}

.auth-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.auth-label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.auth-switch {
  text-align: center;
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.auth-switch-btn {
  background: transparent;
  border: none;
  color: var(--accent);
  font-weight: 600;
  font-family: inherit;
  font-size: 0.8125rem;
  cursor: pointer;
  padding: 0 4px;
}

.auth-switch-btn:active {
  opacity: 0.7;
}

.auth-forgot {
  text-align: center;
  margin-top: -4px;
}

.auth-forgot.is-hidden {
  display: none;
}

.auth-options {
  display: flex;
  align-items: center;
  gap: 20px;
}

.auth-checkbox-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.auth-checkbox {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
  cursor: pointer;
  flex-shrink: 0;
}

.auth-checkbox-text {
  font-size: 0.8125rem;
  color: var(--text-secondary);
  user-select: none;
}

.auth-options.is-hidden {
  display: none;
}

.auth-icp {
  padding: 12px 24px 16px;
  text-align: center;
}

.auth-icp a {
  font-size: 0.6875rem;
  color: var(--text-muted);
  text-decoration: none;
}

.auth-icp a:hover {
  color: var(--text-secondary);
}

/* ═══════════════════════════════════════
   FORUM LAYOUT (QQ Zone style)
   ═══════════════════════════════════════ */

.forum-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding-bottom: calc(var(--bottom-offset) + 8px);
  contain: layout style;
}

.forum-stats-wrap {
  contain: layout style;
}

/* FAB - Floating Action Button */
.fab-btn {
  position: fixed;
  z-index: 9997;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: none;
  background: linear-gradient(135deg, #818cf8, var(--accent-dark));
  color: #fff;
  box-shadow: 0 4px 16px rgba(99, 102, 241, 0.45);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  bottom: calc(var(--bottom-offset) + 16px);
  right: max(16px, calc(50vw - 224px));
  transition: transform 0.2s var(--spring), box-shadow 0.2s;
}

.fab-btn.is-hidden {
  display: none;
}

.fab-btn:active {
  transform: scale(0.9);
  box-shadow: 0 2px 8px rgba(99, 102, 241, 0.35);
}

.fab-btn svg {
  display: block;
}

/* Floating Checkin FAB */
.fab-checkin {
  position: fixed;
  z-index: 9997;
  padding: 0 24px;
  height: 50px;
  border-radius: 25px;
  border: none;
  background: linear-gradient(135deg, #34d399, #10b981);
  color: #fff;
  font-size: 0.9375rem;
  font-weight: 700;
  font-family: inherit;
  letter-spacing: 0.02em;
  box-shadow: 0 4px 16px rgba(16, 185, 129, 0.45);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  bottom: calc(var(--bottom-offset) + 16px);
  right: max(16px, calc(50vw - 224px));
  transition: transform 0.2s var(--spring), box-shadow 0.2s;
}

.fab-checkin:active {
  transform: scale(0.95);
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.35);
}

.fab-checkin--done {
  background: var(--card);
  color: var(--success);
  border: 2px solid var(--success);
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.2);
}

.forum-card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  overflow: hidden;
  contain: layout style;
  will-change: auto;
}

.forum-card:active {
  background: var(--card-inner);
}

.forum-card-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
}

.forum-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  overflow: hidden;
  background: linear-gradient(135deg, #e0e7ff, #c7d2fe);
  border: 2px solid var(--accent-light);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

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

.forum-avatar-placeholder {
  font-size: 1rem;
  font-weight: 700;
  color: var(--accent-dark);
}

.forum-avatar--clickable {
  cursor: pointer;
  transition: transform 0.15s;
}

.forum-avatar--clickable:active {
  transform: scale(0.92);
}

.forum-user-info {
  flex: 1;
  min-width: 0;
}

.forum-username {
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.3;
}

.forum-time {
  font-size: 0.6875rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.forum-card-body {
  padding: 14px 16px;
  cursor: pointer;
}

.forum-copy-text {
  font-size: 0.9375rem;
  line-height: 1.65;
  color: var(--text);
  word-break: break-word;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
  display: -webkit-box;
  -webkit-line-clamp: 6;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.forum-audio-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 8px;
  padding: 4px 10px;
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--audio-tag);
  background: var(--audio-bg);
  border-radius: 20px;
}

.forum-asset-preview {
  margin-top: 12px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: #0f172a;
  aspect-ratio: 3 / 4;
  max-height: 360px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.forum-asset-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.forum-card-footer {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-top: 1px solid var(--border);
  background: rgba(246, 248, 252, 0.6);
}

.forum-action-btn {
  padding: 6px 12px;
  font-size: 0.75rem;
  font-weight: 600;
  font-family: inherit;
  color: var(--accent-dark);
  background: var(--accent-light);
  border: none;
  border-radius: var(--radius-xs);
  cursor: pointer;
  transition: transform 0.15s var(--spring), background 0.2s;
}

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

.forum-action-btn--copy {
  margin-left: auto;
  background: linear-gradient(135deg, #818cf8, var(--accent-dark));
  color: #fff;
  box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3);
}

.forum-action-btn--copy.is-copied {
  background: linear-gradient(135deg, #34d399, var(--success));
}

/* Forum Detail */
.forum-detail-body {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.forum-detail-page {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding-bottom: calc(var(--bottom-offset) + 8px);
}

.forum-detail-user {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.forum-detail-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--card-inner);
  border: 2px solid var(--accent);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.forum-detail-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.forum-detail-username {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
}

.forum-detail-time {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.forum-detail-section {
  background: var(--card-inner);
  border-radius: var(--radius-sm);
  padding: 14px;
  border: 1px solid var(--border);
}

.forum-detail-label {
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 8px;
}

.forum-detail-label--copy {
  color: var(--copy-tag);
}

.forum-detail-label--audio {
  color: var(--audio-tag);
}

.forum-detail-copy-text {
  font-size: 0.9375rem;
  line-height: 1.65;
  color: var(--text);
  word-break: break-word;
  white-space: pre-wrap;
}

.forum-detail-audio-text {
  font-size: 0.875rem;
  line-height: 1.55;
  color: var(--text);
  word-break: break-word;
  white-space: pre-wrap;
}

.forum-detail-asset-img {
  margin-top: 8px;
  border-radius: var(--radius-xs);
  overflow: hidden;
  cursor: zoom-in;
}

.forum-detail-asset-img img {
  width: 100%;
  display: block;
  max-height: 500px;
  object-fit: contain;
}

.forum-detail-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 4px;
}

/* ═══════════════════════════════════════
   BOTTOM NAV (3 items)
   ═══════════════════════════════════════ */

.nav-track--3 .nav-pill {
  width: calc((100% - 12px) / 3);
}

.nav-pill.to-list {
  transform: translateX(100%);
}

.nav-track--3 .nav-pill.to-list {
  transform: translateX(100%);
}

.nav-pill.to-assets,
.nav-track--3 .nav-pill.to-assets {
  transform: translateX(200%);
}

.nav-pill.to-mine,
.nav-track--3 .nav-pill.to-mine {
  transform: translateX(200%);
}

/* ═══════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════ */

@media (min-width: 481px) {
  body {
    padding: 20px 0;
  }

  .app {
    min-height: calc(100dvh - 40px);
    border-radius: 24px;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    background: transparent;
  }

  .header {
    border-radius: 24px 24px 0 0;
  }

  .sidebar {
    border-radius: 0 24px 24px 0;
  }
}

/* ═══════════════════════════════════════
   FORUM STATS
   ═══════════════════════════════════════ */

.forum-stats {
  display: flex;
  gap: 10px;
  margin-bottom: 14px;
}

.forum-stat-item {
  flex: 1;
  background: var(--card);
  border-radius: var(--radius-sm);
  padding: 14px 10px;
  text-align: center;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  user-select: none;
  -webkit-user-select: none;
}

.forum-stat-clickable {
  cursor: pointer;
  active: {
    background: var(--card-inner);
  }
}

.forum-stat-clickable:active {
  background: var(--card-inner);
  transform: scale(0.98);
}

.forum-stat-num {
  font-size: 1.375rem;
  font-weight: 700;
  color: var(--accent);
  line-height: 1.2;
}

.forum-stat-label {
  font-size: 0.6875rem;
  color: var(--text-muted);
  margin-top: 4px;
}

.forum-stat-num--team {
  font-size: 1rem;
  color: #7c3aed;
  letter-spacing: 0.02em;
}

/* ═══════════════════════════════════════
   FORUM LIKE / COMMENT BUTTONS
   ═══════════════════════════════════════ */

.forum-card-interact {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}

.forum-card-interact .forum-like-btn,
.forum-card-interact .forum-comment-btn {
  padding: 6px 14px;
  font-size: 0.8125rem;
  border-radius: 18px;
  background: var(--card-inner, #f0f1f5);
  gap: 5px;
  flex-shrink: 0;
}

.forum-card-interact .forum-like-btn:active,
.forum-card-interact .forum-comment-btn:active {
  opacity: 0.8;
}

.forum-card-interact .forum-like-btn--active {
  background: #fef2f2;
}

/* Checkin info in forum card interact */
.forum-checkin-info {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-left: auto;
  padding: 5px 10px;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-muted);
  background: transparent;
  border-radius: 12px;
  flex-shrink: 0;
}

.forum-checkin-info--has {
  color: #059669;
  background: #ecfdf5;
}

.forum-checkin-icon {
  font-size: 1rem;
  line-height: 1;
}

.forum-checkin-text {
  font-size: 0.8125rem;
  line-height: 1;
}

.forum-checkin-text .checkin-num {
  font-size: 0.875rem;
  font-weight: 700;
  color: #059669;
}

.forum-checkin-text .checkin-label {
  font-size: 0.6875rem;
  font-weight: 500;
}

.forum-checkin-text .checkin-sep {
  font-size: 0.625rem;
  color: var(--text-muted);
  margin: 0 1px;
}

.forum-like-btn,
.forum-comment-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 0;
  font-size: 0.8125rem;
  font-weight: 500;
  font-family: inherit;
  color: var(--text-muted);
  background: transparent;
  border: none;
  cursor: pointer;
  transition: color 0.2s;
}

.forum-like-btn:active,
.forum-comment-btn:active {
  opacity: 0.7;
}

.forum-like-btn--active {
  color: #ef4444;
}

/* ═══════════════════════════════════════
   FORUM DETAIL INTERACT BAR
   ═══════════════════════════════════════ */

.forum-detail-interact {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}

.forum-detail-interact .forum-like-btn,
.forum-detail-interact .forum-comment-btn {
  padding: 12px 28px;
  font-size: 1.0625rem;
  border-radius: 24px;
  background: var(--card-inner, #f0f1f5);
  gap: 8px;
}

.forum-detail-interact .forum-like-btn:active,
.forum-detail-interact .forum-comment-btn:active {
  transform: scale(0.95);
}

.forum-detail-interact .forum-like-btn--active {
  background: #fef2f2;
}

.forum-detail-comment-count {
  font-size: 0.8125rem;
  color: var(--text-muted);
}

/* ═══════════════════════════════════════
   COMMENTS SECTION
   ═══════════════════════════════════════ */

.forum-comments-section {
  margin-top: 16px;
}

.forum-comments-title {
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 12px;
}

.forum-comments-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.forum-comments-loading,
.forum-comments-empty {
  font-size: 0.8125rem;
  color: var(--text-muted);
  text-align: center;
  padding: 16px 0;
}

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

.forum-comment-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  overflow: hidden;
  background: linear-gradient(135deg, #e0e7ff, #c7d2fe);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.forum-comment-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.forum-comment-avatar span {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--accent-dark);
}

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

.forum-comment-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

.forum-comment-name {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text);
}

.forum-comment-time {
  font-size: 0.6875rem;
  color: var(--text-muted);
}

.forum-comment-text {
  font-size: 0.875rem;
  line-height: 1.5;
  color: var(--text);
  word-break: break-word;
}

.forum-comments-more {
  width: 100%;
  padding: 10px;
  font-size: 0.8125rem;
  font-weight: 600;
  font-family: inherit;
  color: var(--accent);
  background: var(--accent-light);
  border: 1px solid rgba(99, 102, 241, 0.15);
  border-radius: var(--radius-xs);
  cursor: pointer;
  transition: background 0.2s;
}

.forum-comments-more:active {
  background: var(--card-inner);
}

.forum-comment-input-wrap {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.forum-comment-input {
  flex: 1;
  padding: 10px 14px;
  font-size: 0.875rem;
  font-family: inherit;
  color: var(--text);
  background: var(--card-inner);
  border: 1.5px solid transparent;
  border-radius: 999px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.forum-comment-input:focus {
  background: var(--card);
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.12);
}

.forum-comment-input::placeholder {
  color: var(--text-muted);
}

.forum-comment-send {
  padding: 10px 18px;
  font-size: 0.8125rem;
  font-weight: 600;
  font-family: inherit;
  color: #fff;
  background: linear-gradient(135deg, #818cf8, var(--accent-dark));
  border: none;
  border-radius: 999px;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3);
  transition: transform 0.15s;
  flex-shrink: 0;
}

.forum-comment-send:active {
  transform: scale(0.95);
}

.forum-comment-send:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.forum-comment-login-tip {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  font-size: 0.8125rem;
  color: var(--text-muted);
  text-align: center;
}

/* ═══════════════════════════════════════
   LEADERBOARD
   ═══════════════════════════════════════ */

#leaderboardHeader {
  padding: 14px 16px;
}

.leaderboard-date {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  margin: 0;
}

.leaderboard-sub {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin: 4px 0 0;
}

.leaderboard-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px 0;
}

.leaderboard-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: var(--card);
  border-radius: 14px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.05);
  animation: fadeUp 0.3s ease both;
}

.leaderboard-item--top1 {
  background: linear-gradient(135deg, #fef9c3 0%, #fde68a 100%);
  box-shadow: 0 2px 12px rgba(234,179,8,0.25);
}

.leaderboard-item--top2 {
  background: linear-gradient(135deg, #f0f1f5 0%, #e5e7eb 100%);
  box-shadow: 0 2px 10px rgba(156,163,175,0.2);
}

.leaderboard-item--top3 {
  background: linear-gradient(135deg, #fef2f2 0%, #fecaca 100%);
  box-shadow: 0 2px 10px rgba(239,68,68,0.15);
}

.leaderboard-rank {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  font-weight: 800;
  border-radius: 50%;
  flex-shrink: 0;
  background: var(--card-inner, #f0f1f5);
  color: var(--text-muted);
}

.leaderboard-item--top1 .leaderboard-rank {
  background: #f59e0b;
  color: #fff;
  font-size: 1.125rem;
}

.leaderboard-item--top2 .leaderboard-rank {
  background: #9ca3af;
  color: #fff;
}

.leaderboard-item--top3 .leaderboard-rank {
  background: #ef4444;
  color: #fff;
}

.leaderboard-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  background: var(--card-inner, #f0f1f5);
  display: flex;
  align-items: center;
  justify-content: center;
}

.leaderboard-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.leaderboard-avatar-placeholder {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-muted);
}

.leaderboard-avatar--clickable {
  cursor: pointer;
  transition: transform 0.15s;
}

.leaderboard-avatar--clickable:active {
  transform: scale(0.92);
}

.leaderboard-nick--clickable {
  cursor: pointer;
}

.leaderboard-nick--clickable:active {
  opacity: 0.7;
}

.leaderboard-nick {
  flex: 1;
  min-width: 0;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.leaderboard-count {
  font-size: 1.125rem;
  font-weight: 800;
  color: var(--accent);
  flex-shrink: 0;
}

.leaderboard-count-label {
  font-size: 0.6875rem;
  font-weight: 400;
  color: var(--text-muted);
  margin-left: 2px;
}

.leaderboard-badge {
  font-size: 1.25rem;
  flex-shrink: 0;
  line-height: 1;
}

/* ═══════════════════════════════════════
   CATEGORY CHIPS & BADGE
   ═══════════════════════════════════════ */

.category-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.category-chip {
  padding: 8px 16px;
  font-size: 0.8125rem;
  font-weight: 600;
  font-family: inherit;
  color: var(--text-secondary);
  background: var(--card-inner);
  border: 1.5px solid var(--border);
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.2s var(--ease);
}

.category-chip:active {
  transform: scale(0.95);
}

.category-chip--active {
  color: #fff;
  background: linear-gradient(135deg, #818cf8, var(--accent-dark));
  border-color: var(--accent);
  box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3);
}

.category-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  font-size: 0.6875rem;
  font-weight: 700;
  border-radius: 999px;
  color: #7c3aed;
  background: #ede9fe;
}

.tag--category {
  color: #7c3aed;
  background: #ede9fe;
}

/* ═══════════════════════════════════════
   CHECKIN SECTION
   ═══════════════════════════════════════ */

.checkin-section {
  background: var(--card-inner);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px;
}

.checkin-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.checkin-title {
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--text);
}

.checkin-count {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--accent);
}

.checkin-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 12px;
}

.checkin-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  background: var(--card);
  border-radius: var(--radius-xs);
  border: 1px solid var(--border);
}

.checkin-item-info {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 1;
  min-width: 0;
}

.checkin-time {
  font-size: 0.625rem;
  color: var(--text-muted);
  white-space: nowrap;
  flex-shrink: 0;
}

.checkin-more {
  width: 100%;
  padding: 10px;
  font-size: 0.75rem;
  font-weight: 600;
  font-family: inherit;
  color: var(--accent);
  background: var(--accent-light);
  border: 1px solid rgba(99, 102, 241, 0.15);
  border-radius: var(--radius-xs);
  cursor: pointer;
  transition: background 0.2s;
}

.checkin-more:active {
  background: var(--card-inner);
}

.checkin-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.checkin-avatar-placeholder {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--accent-light);
  color: var(--accent-dark);
  font-size: 0.75rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.checkin-name {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text);
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.checkin-team {
  font-size: 0.6875rem;
  font-weight: 600;
  color: #7c3aed;
  background: #ede9fe;
  padding: 2px 8px;
  border-radius: 999px;
  flex-shrink: 0;
}

.checkin-empty {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-align: center;
  padding: 8px 0;
  margin: 0;
}

.btn-checkin {
  width: 100%;
  padding: 12px 16px;
  font-size: 0.875rem;
  font-weight: 600;
  font-family: inherit;
  color: #fff;
  background: linear-gradient(135deg, #34d399, #10b981);
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(16, 185, 129, 0.35);
  transition: transform 0.15s var(--spring), box-shadow 0.2s;
}

.btn-checkin:active:not(:disabled) {
  transform: scale(0.97);
}

.btn-checkin--done {
  background: var(--card-inner);
  color: var(--success);
  border: 1.5px solid var(--success);
  box-shadow: none;
  cursor: default;
}

.btn-checkin:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

/* ═══════════════════════════════════════
   PROGRESSIVE IMAGE LOADING
   ═══════════════════════════════════════ */

@keyframes imgShimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

/* Base progressive image styles */
.forum-asset-preview--loading,
.asset-grid-thumb--loading,
.forum-detail-asset-img--loading,
.asset-detail-shot--loading,
.profile-grid-thumb {
  background: linear-gradient(90deg, #e8ecf4 25%, #f0f2f8 50%, #e8ecf4 75%);
  background-size: 200% 100%;
  animation: imgShimmer 1.5s ease infinite;
}

.forum-asset-preview--loading img,
.asset-grid-thumb--loading img,
.forum-detail-asset-img--loading img,
.asset-detail-shot--loading img,
.profile-grid-thumb img {
  opacity: 0;
  transform: scale(1.02);
  transition: opacity 0.5s ease, transform 0.5s ease;
  filter: blur(8px);
}

/* Loaded state */
.forum-asset-preview--loading.img-ready,
.asset-grid-thumb--loading.img-ready,
.forum-detail-asset-img--loading.img-ready,
.asset-detail-shot--loading.img-ready {
  animation: none;
  background: #0f172a;
}

.forum-asset-preview--loading.img-ready.img-loaded,
.asset-grid-thumb--loading.img-ready.img-loaded,
.forum-detail-asset-img--loading.img-ready.img-loaded,
.asset-detail-shot--loading.img-ready.img-loaded {
  background: var(--card-inner);
}

.forum-asset-preview--loading img.img-loaded,
.asset-grid-thumb--loading img.img-loaded,
.forum-detail-asset-img--loading img.img-loaded,
.asset-detail-shot--loading img.img-loaded,
.profile-grid-thumb img.img-loaded {
  opacity: 1;
  transform: scale(1);
  filter: blur(0);
}

.forum-detail-asset-img--loading {
  border-radius: var(--radius-xs);
  overflow: hidden;
}

/* ═══════════════════════════════════════
   CLICKABLE STATS
   ═══════════════════════════════════════ */

.forum-stat-clickable {
  cursor: pointer;
  transition: transform 0.15s var(--spring), box-shadow 0.2s;
  -webkit-tap-highlight-color: transparent;
}

.forum-stat-clickable:active {
  transform: scale(0.95);
  box-shadow: 0 2px 12px rgba(99, 102, 241, 0.2);
}

.forum-stat-active {
  background: var(--accent-bg, rgba(99, 102, 241, 0.12));
  border-radius: 12px;
}

.forum-stat-active .forum-stat-num {
  color: var(--accent, #6366f1);
}

.forum-stat-active .forum-stat-label {
  color: var(--accent, #6366f1);
}

/* Filter Banner */
.filter-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  margin-bottom: 10px;
  background: var(--accent-bg, rgba(99, 102, 241, 0.08));
  border: 1px solid var(--accent-border, rgba(99, 102, 241, 0.2));
  border-radius: 12px;
  animation: fadeIn 0.25s ease;
}

.filter-banner-text {
  font-size: 13px;
  color: var(--accent, #6366f1);
  font-weight: 500;
}

.filter-banner-close {
  font-size: 12px;
  color: var(--accent, #6366f1);
  background: none;
  border: 1px solid var(--accent-border, rgba(99, 102, 241, 0.3));
  border-radius: 6px;
  padding: 4px 10px;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s;
  -webkit-tap-highlight-color: transparent;
}

.filter-banner-close:active {
  background: var(--accent-bg, rgba(99, 102, 241, 0.15));
  transform: scale(0.95);
}

/* Toast info variant */
.toast-info {
  background: var(--accent, #6366f1) !important;
  color: #fff !important;
}

/* ═══════════════════════════════════════
   WELCOME POPUP (Login Success)
   ═══════════════════════════════════════ */

.welcome-overlay {
  position: fixed;
  inset: 0;
  z-index: 25000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  animation: fadeIn 0.25s ease;
}

.welcome-overlay.is-hidden {
  display: none;
}

.welcome-card {
  background: var(--card);
  border-radius: 24px;
  box-shadow: var(--shadow-lg);
  padding: 40px 32px 36px;
  text-align: center;
  min-width: 240px;
  animation: welcomePop 0.35s var(--spring);
}

@keyframes welcomePop {
  from { opacity: 0; transform: scale(0.8) translateY(20px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.welcome-avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  overflow: hidden;
  background: linear-gradient(135deg, #818cf8, var(--accent-dark));
  margin: 0 auto 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(99, 102, 241, 0.35);
}

.welcome-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.welcome-avatar span {
  font-size: 1.75rem;
  font-weight: 700;
  color: #fff;
}

.welcome-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 6px;
}

.welcome-name {
  font-size: 0.875rem;
  color: var(--accent);
  font-weight: 600;
  margin: 0;
}

/* ═══════════════════════════════════════
   MATERIAL ACTION DIALOG
   ═══════════════════════════════════════ */

.material-dialog-overlay {
  position: fixed;
  inset: 0;
  z-index: 10200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(15, 23, 42, 0.5);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.material-dialog-overlay.is-hidden {
  display: none;
}

.material-dialog {
  width: 100%;
  max-width: 320px;
  background: var(--card);
  border-radius: 20px;
  box-shadow: var(--shadow-lg);
  padding: 32px 24px 24px;
  text-align: center;
}

@keyframes dialogPop {
  from { opacity: 0; transform: scale(0.9); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-8px); }
  40% { transform: translateX(8px); }
  60% { transform: translateX(-4px); }
  80% { transform: translateX(4px); }
}

.material-dialog-icon {
  font-size: 2.5rem;
  margin-bottom: 12px;
}

.material-dialog-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  margin: 0 0 24px;
  line-height: 1.5;
}

.material-dialog-actions {
  display: flex;
  gap: 12px;
}

.material-dialog-btn {
  flex: 1;
  padding: 14px 16px;
  font-size: 0.9375rem;
  font-weight: 600;
  font-family: inherit;
  border: none;
  border-radius: 14px;
  cursor: pointer;
  transition: transform 0.15s var(--spring), box-shadow 0.2s;
}

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

.material-dialog-btn--shoot {
  color: #fff;
  background: linear-gradient(135deg, #34d399, #10b981);
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.35);
}

.material-dialog-btn--shoot:hover {
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.45);
  transform: translateY(-1px);
}

.material-dialog-btn--browse {
  color: var(--text);
  background: var(--card-inner);
  border: 1.5px solid var(--border);
  border-radius: 14px;
}

.material-dialog-btn--browse:hover {
  background: var(--border);
  border-color: var(--text-muted);
}

/* Team Input */
.team-input-wrap {
  margin: 0 0 20px;
}

.team-input {
  width: 100%;
  padding: 14px 16px;
  font-size: 1rem;
  font-family: inherit;
  border: 2px solid var(--border);
  border-radius: 12px;
  background: var(--card-inner);
  color: var(--text);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.team-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

.team-input::placeholder {
  color: var(--text-muted);
}

/* View count badge */
.view-count-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-muted);
}

.view-count-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  opacity: 0.7;
}

/* ═══════════════════════════════════════
   2-ITEM NAV TRACK
   ═══════════════════════════════════════ */

.nav-track--2 {
  display: flex;
  position: relative;
}

.nav-track--2 .nav-pill {
  width: calc((100% - 12px) / 2);
}

.nav-track--2 .nav-pill.to-list {
  transform: translateX(100%);
}

/* ═══════════════════════════════════════
   PROPS (道具)
   ═══════════════════════════════════════ */

/* 提交表单卡片 */
.props-submit-card {
  margin-bottom: 16px;
}

.props-submit-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
}

.props-submit-icon {
  font-size: 1.25rem;
}

.props-submit-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  margin: 0;
}

.props-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* 截图上传 */
.props-shot-upload {
  position: relative;
  width: 100%;
  height: 120px;
  border: 2px dashed var(--border);
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}

.props-shot-upload:hover {
  border-color: var(--accent);
  background: rgba(99, 102, 241, 0.04);
}

.props-shot-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: var(--text-muted);
  font-size: 0.8125rem;
  gap: 6px;
}

.props-shot-icon {
  font-size: 1.75rem;
  opacity: 0.6;
}

.props-shot-text {
  margin: 0;
}

.props-shot-preview {
  position: relative;
  height: 100%;
}

.props-shot-preview img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  background: var(--card-inner);
}

/* 输入组 */
.props-input-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.props-input-label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.props-url-row {
  display: flex;
  gap: 8px;
  align-items: center;
}

.props-url-input {
  flex: 1;
  min-width: 0;
}

.props-platform-badge {
  flex-shrink: 0;
  padding: 8px 12px;
  font-size: 0.75rem;
  font-weight: 700;
  border-radius: 8px;
  background: var(--card-inner);
  color: var(--text-secondary);
  white-space: nowrap;
}

.props-submit-btn {
  margin-top: 4px;
}

/* 道具列表区域 */
.props-list-section {
  margin-top: 8px;
}

.props-list-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  padding: 0 4px;
}

.props-list-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  margin: 0;
}

.props-list-count {
  font-size: 0.8125rem;
  color: var(--text-muted);
  font-weight: 500;
}

.props-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* 道具卡片 */
.prop-card {
  background: var(--card);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.prop-card-body {
  display: flex;
  gap: 14px;
  padding: 14px 16px;
  align-items: flex-start;
}

.prop-thumb {
  width: 72px;
  height: 72px;
  border-radius: 10px;
  overflow: hidden;
  flex-shrink: 0;
  background: var(--card-inner);
}

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

.prop-thumb--empty {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.625rem;
  color: var(--text-muted);
  border: 1px dashed var(--border);
}

.prop-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.prop-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.prop-url {
  font-size: 0.75rem;
  color: var(--text-muted);
  word-break: break-all;
  line-height: 1.4;
  margin: 0;
}

.prop-user {
  font-size: 0.6875rem;
  color: var(--text-secondary);
}

/* 道具卡片底部按钮 */
.prop-card-footer {
  display: flex;
  gap: 8px;
  padding: 10px 16px 14px;
  align-items: center;
}

.prop-btn-buy {
  padding: 7px 14px;
  font-size: 0.8125rem;
  font-weight: 600;
  font-family: inherit;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: transform 0.15s, background 0.2s;
  white-space: nowrap;
}

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

.prop-btn-buy--not {
  background: var(--card-inner);
  color: var(--text-secondary);
  border: 1.5px solid var(--border);
}

.prop-btn-buy--done {
  background: #ecfdf5;
  color: #059669;
  border: 1.5px solid #a7f3d0;
}

.prop-btn-open {
  padding: 7px 14px;
  font-size: 0.8125rem;
  font-weight: 600;
  font-family: inherit;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  background: linear-gradient(135deg, #818cf8, var(--accent-dark));
  color: #fff;
  transition: transform 0.15s;
  white-space: nowrap;
}

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

.prop-btn-delete {
  padding: 7px 12px;
  font-size: 0.8125rem;
  font-weight: 600;
  font-family: inherit;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  background: #fef2f2;
  color: #ef4444;
  margin-left: auto;
  transition: transform 0.15s;
  white-space: nowrap;
}

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

.prop-bought-tag {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 8px;
  font-size: 0.6875rem;
  font-weight: 600;
  border-radius: 6px;
  background: #ecfdf5;
  color: #059669;
}

/* ═══════════════════════════════════════
   MINE PAGE (我的)
   ═══════════════════════════════════════ */

.mine-header {
  position: relative;
  margin-bottom: 16px;
}

.mine-cover {
  height: 160px;
  background: url('../uploads/bj.jpg') center/cover no-repeat;
  border-radius: var(--radius);
  overflow: hidden;
}

.mine-info {
  display: flex;
  align-items: flex-end;
  gap: 14px;
  margin-top: -36px;
  padding: 0 16px 16px;
  position: relative;
  z-index: 1;
}

.mine-avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--card);
  border: 3px solid var(--card);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.mine-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.mine-avatar span {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--accent);
}

.mine-meta {
  flex: 1;
  min-width: 0;
  padding-bottom: 4px;
}

.mine-name {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text);
  margin: 0;
}

.mine-sub {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin: 4px 0 0;
}

/* Menu list */
.mine-menu {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  overflow: hidden;
  margin-bottom: 16px;
}

.mine-menu-item {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 16px 18px;
  font-size: 0.9375rem;
  font-weight: 500;
  font-family: inherit;
  color: var(--text);
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  text-align: left;
  transition: background 0.15s;
  -webkit-tap-highlight-color: transparent;
}

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

.mine-menu-item:active {
  background: var(--card-inner);
}

.mine-menu-icon {
  font-size: 1.25rem;
  flex-shrink: 0;
  width: 28px;
  text-align: center;
}

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

.mine-menu-arrow {
  font-size: 1.25rem;
  color: var(--text-muted);
  flex-shrink: 0;
  font-weight: 300;
}

.mine-menu-item--danger {
  color: var(--danger);
}

.mine-menu-item--danger .mine-menu-arrow {
  color: var(--danger);
  opacity: 0.5;
}

.mine-menu-divider {
  height: 8px;
  background: var(--bg-grad-1);
}

.mine-footer {
  text-align: center;
  padding: 16px;
}

.mine-footer a {
  font-size: 0.6875rem;
  color: var(--text-muted);
  text-decoration: none;
}

/* ═══════════════════════════════════════
   PROFILE PAGE
   ═══════════════════════════════════════ */

.profile-header {
  position: relative;
  margin-bottom: 14px;
}

.profile-cover {
  height: 160px;
  background: url('../uploads/bj.jpg') center/cover no-repeat;
  border-radius: var(--radius);
  overflow: hidden;
}

.profile-info {
  display: flex;
  align-items: flex-end;
  gap: 14px;
  margin-top: -32px;
  padding: 0 16px 12px;
  position: relative;
  z-index: 1;
}

.profile-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--card);
  border: 3px solid var(--card);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.profile-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-avatar span {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--accent);
}

.profile-meta {
  flex: 1;
  min-width: 0;
  padding-bottom: 2px;
}

.profile-name {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--text);
  margin: 0;
}

/* Stats row */
.profile-stats-row {
  display: flex;
  gap: 10px;
  margin-bottom: 14px;
}

.profile-stat-item {
  flex: 1;
  background: var(--card);
  border-radius: var(--radius-sm);
  padding: 16px 12px;
  text-align: center;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
}

.profile-stat-num {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--accent);
  line-height: 1.2;
}

.profile-stat-label {
  font-size: 0.625rem;
  color: var(--text-muted);
  margin-top: 3px;
}

/* Profile grid — thumbnail grid like asset library */
.profile-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2px;
  padding: 0;
  margin: 0;
  padding-bottom: calc(var(--bottom-offset) + 8px);
}

.profile-grid-item {
  aspect-ratio: 3 / 4;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  border-radius: 4px;
  background: var(--card-inner);
  -webkit-tap-highlight-color: transparent;
}

.profile-grid-item:active {
  opacity: 0.85;
}

.profile-grid-thumb {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

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

.profile-grid-fallback {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--accent-light) 0%, #e0e7ff 100%);
  padding: 8px;
}

.profile-grid-fallback-text {
  font-size: 0.625rem;
  font-weight: 600;
  color: var(--accent-dark);
  text-align: center;
  line-height: 1.3;
  word-break: break-all;
  display: -webkit-box;
  -webkit-line-clamp: 5;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.profile-grid-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 6px 8px;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.6));
  display: flex;
  align-items: center;
  gap: 4px;
}

.profile-grid-time {
  font-size: 0.5625rem;
  color: rgba(255, 255, 255, 0.85);
  font-weight: 500;
}

.profile-grid-platform {
  font-size: 0.5rem;
  padding: 1px 6px;
  border-radius: 999px;
  font-weight: 700;
  color: #fff;
  background: rgba(255, 255, 255, 0.2);
}

.profile-grid-audio {
  position: absolute;
  top: 6px;
  right: 6px;
  font-size: 0.75rem;
  background: rgba(0, 0, 0, 0.5);
  border-radius: 50%;
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
}

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