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

    :root {
      --purple: #6C5CE7;
      --purple-light: #a78bfa;
      --purple-dim: rgba(108, 92, 231, 0.15);
      --bg: #0a0a0a;
      --surface: #141414;
      --surface-2: #1c1c1c;
      --border: rgba(255,255,255,0.07);
      --text: #f0f0f0;
      --text-2: rgba(255,255,255,0.55);
      --text-3: rgba(255,255,255,0.3);
      --nav-h: 60px;
    }

    html { scroll-behavior: smooth; overflow-x: hidden; }

    body {
      font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
      background: var(--bg);
      color: var(--text);
      min-height: 100vh;
      line-height: 1.5;
      max-width: 100vw;
      overflow-x: hidden;
    }

    /* ── NAV ── */
    nav {
      position: fixed;
      top: 0; left: 0; right: 0;
      height: var(--nav-h);
      background: rgba(10,10,10,0.85);
      backdrop-filter: blur(14px);
      -webkit-backdrop-filter: blur(14px);
      border-bottom: 1px solid var(--border);
      z-index: 100;
      display: flex;
      align-items: center;
      gap: 1rem;
      padding: 0 1.5rem;
    }

    .nav-logo {
      font-family: 'Fraunces', Georgia, serif;
      font-style: italic;
      font-weight: 700;
      font-size: 1.75rem;
      line-height: 1;
      background: linear-gradient(135deg, var(--purple), var(--purple-light));
      -webkit-background-clip: text;
      -webkit-text-fill-color: transparent;
      background-clip: text;
      flex-shrink: 0;
      text-decoration: none;
    }

    .nav-search {
      flex: 1;
      max-width: 480px;
      margin: 0 auto;
      position: relative;
    }

    .nav-search input {
      width: 100%;
      height: 36px;
      background: var(--surface-2);
      border: 1px solid var(--border);
      border-radius: 8px;
      padding: 0 2.5rem 0 0.9rem;
      color: var(--text);
      font-size: 0.875rem;
      font-family: inherit;
      outline: none;
      transition: border-color 0.15s;
    }

    .nav-search input::placeholder { color: var(--text-3); }
    .nav-search input:focus { border-color: rgba(108,92,231,0.5); }

    .nav-search .search-icon {
      position: absolute;
      right: 0.6rem;
      top: 50%;
      transform: translateY(-50%);
      color: var(--text-3);
      pointer-events: none;
      display: flex;
      align-items: center;
    }

    .nav-actions {
      display: flex;
      align-items: center;
      gap: 0.5rem;
      margin-left: auto;
      flex-shrink: 0;
    }

    .nav-btn {
      display: flex;
      align-items: center;
      justify-content: center;
      width: 36px;
      height: 36px;
      border-radius: 8px;
      border: 1px solid var(--border);
      background: var(--surface-2);
      color: var(--text-2);
      cursor: pointer;
      transition: border-color 0.15s, color 0.15s;
      font-size: 1rem;
    }

    .nav-btn:hover { border-color: rgba(108,92,231,0.4); color: var(--text); }

    .nav-avatar {
      width: 36px;
      height: 36px;
      border-radius: 50%;
      background: var(--surface-2);
      border: 1px solid var(--border);
      display: flex;
      align-items: center;
      justify-content: center;
      color: var(--text-2);
      cursor: pointer;
      overflow: hidden;
      transition: border-color 0.15s;
    }

    .nav-avatar:hover { border-color: var(--purple-light); }

    .nav-connect {
      height: 36px;
      padding: 0 1rem;
      border-radius: 8px;
      border: 1px solid rgba(108,92,231,0.5);
      background: rgba(108,92,231,0.1);
      color: var(--purple-light);
      font-size: 0.8rem;
      font-weight: 600;
      font-family: inherit;
      cursor: pointer;
      letter-spacing: 0.02em;
      transition: background 0.15s, border-color 0.15s;
      white-space: nowrap;
    }

    .nav-connect:hover {
      background: rgba(108,92,231,0.2);
      border-color: var(--purple-light);
    }

    .nav-user-handle {
      font-size: 0.8rem;
      font-weight: 600;
      color: var(--purple-light);
      max-width: 100px;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
      display: none;
    }

    /* ── LAYOUT ── */
    .page {
      display: grid;
      grid-template-columns: 210px 1fr 230px;
      gap: 2rem;
      max-width: 1200px;
      margin: 0 auto;
      padding: calc(var(--nav-h) + 1.5rem) 2rem 3rem;
    }

    /* ── SIDEBAR LEFT ── */
    .sidebar-left {
      position: sticky;
      top: calc(var(--nav-h) + 1.5rem);
      align-self: start;
      min-width: 0;
    }

    .profile-card {
      background: var(--surface);
      border: 1px solid var(--border);
      border-radius: 14px;
      overflow: hidden;
    }

    .profile-cover {
      height: 64px;
      background: linear-gradient(135deg, #3d2b8e, #6C5CE7, #a78bfa);
    }

    .profile-body {
      padding: 0 1rem 1.25rem;
    }

    .profile-avatar-wrap {
      margin-top: -28px;
      margin-bottom: 0.6rem;
    }

    .profile-avatar {
      width: 56px;
      height: 56px;
      border-radius: 12px;
      background: var(--surface-2);
      border: 3px solid var(--surface);
      display: flex;
      align-items: center;
      justify-content: center;
      color: var(--text-3);
    }

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

    .profile-handle {
      font-size: 0.75rem;
      color: var(--text-3);
      margin-bottom: 0.9rem;
    }

    .profile-stat {
      display: flex;
      justify-content: space-between;
      align-items: center;
      padding: 0.45rem 0;
      border-top: 1px solid var(--border);
      font-size: 0.8rem;
    }

    .profile-stat-label { color: var(--text-3); }
    .profile-stat-value { font-weight: 600; color: var(--text); }

    .sidebar-nav {
      margin-top: 1rem;
      display: flex;
      flex-direction: column;
      gap: 0.25rem;
      background: var(--surface);
      border: 1px solid var(--border);
      border-radius: 14px;
      padding: 0.5rem;
    }

    .sidebar-link {
      display: flex;
      align-items: center;
      gap: 0.6rem;
      padding: 0.5rem 0.75rem;
      border-radius: 8px;
      font-size: 0.85rem;
      font-weight: 500;
      color: var(--text-2);
      cursor: pointer;
      transition: background 0.12s, color 0.12s;
      text-decoration: none;
    }

    .sidebar-link:hover { background: var(--surface-2); color: var(--text); }
    .sidebar-link.active { background: var(--purple-dim); color: var(--purple-light); }

    /* ── FEED ── */
    .feed {
      display: flex;
      flex-direction: column;
      gap: 1.25rem;
      min-width: 0;
    }

    .feed-tabs {
      display: flex;
      gap: 0.25rem;
      background: var(--surface);
      border: 1px solid var(--border);
      border-radius: 10px;
      padding: 0.25rem;
    }

    .feed-tab {
      flex: 1;
      padding: 0.4rem 0.5rem;
      border-radius: 7px;
      font-size: 0.8rem;
      font-weight: 600;
      text-align: center;
      cursor: pointer;
      color: var(--text-2);
      transition: background 0.12s, color 0.12s;
      border: none;
      background: none;
      font-family: inherit;
    }

    .feed-tab.active {
      background: var(--purple-dim);
      color: var(--purple-light);
    }

    .feed-tab:hover:not(.active) { color: var(--text); }

    /* ── POST CARD ── */
    .post-card {
      background: var(--surface);
      border: 1px solid var(--border);
      border-radius: 16px;
      overflow: hidden;
      transition: border-color 0.15s;
    }

    .post-card:hover { border-color: rgba(108,92,231,0.25); }

    .post-header {
      display: flex;
      align-items: center;
      gap: 0.65rem;
      padding: 0.85rem 1rem;
    }

    .post-avatar {
      width: 36px;
      height: 36px;
      border-radius: 9px;
      background: var(--surface-2);
      border: 1px solid var(--border);
      flex-shrink: 0;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 0.75rem;
      font-weight: 700;
      color: var(--purple-light);
    }

    .post-author {
      flex: 1;
      min-width: 0;
    }

    .post-author-name {
      font-size: 0.85rem;
      font-weight: 600;
    }

    .post-author-handle {
      font-size: 0.72rem;
      color: var(--text-3);
    }

    .post-time {
      font-size: 0.72rem;
      color: var(--text-3);
    }

    .post-title {
      padding: 0 1rem 0.6rem;
      font-size: 0.95rem;
      font-weight: 600;
      color: var(--text);
    }

    .post-tag {
      display: inline-block;
      padding: 0.15rem 0.5rem;
      border-radius: 4px;
      font-size: 0.68rem;
      font-weight: 600;
      background: var(--purple-dim);
      color: var(--purple-light);
      margin-left: 0.5rem;
      vertical-align: middle;
    }

    .post-image {
      width: 100%;
      aspect-ratio: 4/3;
      background: var(--surface-2);
      position: relative;
      overflow: hidden;
    }

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

    .art-placeholder {
      width: 100%;
      height: 100%;
      display: flex;
      align-items: center;
      justify-content: center;
    }

    .post-actions {
      display: flex;
      align-items: center;
      gap: 0.25rem;
      padding: 0.65rem 0.75rem;
    }

    .action-btn {
      display: flex;
      align-items: center;
      gap: 0.3rem;
      padding: 0.35rem 0.6rem;
      border-radius: 7px;
      border: none;
      background: none;
      color: var(--text-2);
      font-size: 0.82rem;
      font-weight: 500;
      font-family: inherit;
      cursor: pointer;
      transition: background 0.12s, color 0.12s;
    }

    .action-btn:hover { background: var(--surface-2); color: var(--text); }
    .action-btn.upvote:hover { color: #26de81; }
    .action-btn.downvote:hover { color: #E74C5C; }
    .action-btn.comment:hover { color: var(--purple-light); }
    .action-btn.active-up { color: #26de81; }
    .action-btn.active-down { color: #E74C5C; }

    .follow-btn {
      padding: 0.2rem 0.65rem;
      border-radius: 6px;
      border: 1px solid rgba(108,92,231,0.4);
      background: rgba(108,92,231,0.1);
      color: var(--purple-light);
      font-size: 0.72rem;
      font-weight: 600;
      font-family: inherit;
      cursor: pointer;
      transition: background 0.12s, border-color 0.12s;
      flex-shrink: 0;
    }

    .follow-btn:hover {
      background: rgba(108,92,231,0.2);
      border-color: var(--purple-light);
    }

    .follow-btn.following {
      background: var(--purple-dim);
      border-color: var(--purple-light);
      color: var(--purple-light);
    }

    .action-spacer { flex: 1; }

    .tip-btn {
      display: flex;
      align-items: center;
      gap: 0.35rem;
      padding: 0.35rem 0.85rem;
      border-radius: 7px;
      border: 1px solid rgba(38,222,129,0.3);
      background: rgba(38,222,129,0.07);
      color: #26de81;
      font-size: 0.8rem;
      font-weight: 600;
      font-family: inherit;
      cursor: pointer;
      transition: background 0.12s, border-color 0.12s;
    }

    .tip-btn:hover {
      background: rgba(38,222,129,0.15);
      border-color: rgba(38,222,129,0.5);
    }

    /* ── SIDEBAR RIGHT ── */
    .sidebar-right {
      position: sticky;
      top: calc(var(--nav-h) + 1.5rem);
      align-self: start;
      display: flex;
      flex-direction: column;
      gap: 1rem;
    }

    .stats-card {
      background: var(--surface);
      border: 1px solid var(--border);
      border-radius: 14px;
      padding: 1rem;
    }

    .stats-card-title {
      font-size: 0.72rem;
      font-weight: 700;
      color: var(--text-3);
      text-transform: uppercase;
      letter-spacing: 0.08em;
      margin-bottom: 0.85rem;
    }

    .stat-row {
      display: flex;
      align-items: center;
      gap: 0.65rem;
      padding: 0.5rem 0;
      border-top: 1px solid var(--border);
    }

    .stat-row:first-of-type { border-top: none; padding-top: 0; }

    .stat-icon {
      width: 32px;
      height: 32px;
      border-radius: 8px;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 1rem;
      flex-shrink: 0;
    }

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

    .stat-value {
      font-size: 1rem;
      font-weight: 700;
      line-height: 1.1;
    }

    .stat-label {
      font-size: 0.72rem;
      color: var(--text-3);
    }

    .trending-item {
      display: flex;
      align-items: center;
      gap: 0.6rem;
      padding: 0.45rem 0;
      border-top: 1px solid var(--border);
      cursor: pointer;
    }

    .trending-item:first-of-type { border-top: none; padding-top: 0; }

    .trending-rank {
      font-size: 0.72rem;
      font-weight: 700;
      color: var(--text-3);
      width: 14px;
      flex-shrink: 0;
    }

    .trending-avatar {
      width: 30px;
      height: 30px;
      border-radius: 7px;
      flex-shrink: 0;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 0.68rem;
      font-weight: 700;
      color: var(--purple-light);
      background: var(--purple-dim);
    }

    .trending-name {
      font-size: 0.8rem;
      font-weight: 600;
      flex: 1;
      min-width: 0;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }

    .trending-tips {
      font-size: 0.72rem;
      color: #26de81;
      font-weight: 600;
      flex-shrink: 0;
    }

    /* ── ANIMATION ── */
    @keyframes shimmer {
      0% { background-position: 0% 50%; }
      50% { background-position: 100% 50%; }
      100% { background-position: 0% 50%; }
    }

    /* ── SCORE BADGE ── */
    .post-score {
      display: flex;
      align-items: center;
      gap: 0.3rem;
      padding: 0.25rem 0.6rem;
      border-radius: 6px;
      background: rgba(108,92,231,0.12);
      border: 1px solid rgba(108,92,231,0.2);
      font-size: 0.72rem;
      font-weight: 700;
      color: var(--purple-light);
      margin-left: auto;
    }

    .post-score svg { opacity: 0.7; }

    /* ── ARWEAVE BADGE ── */
    .arweave-badge {
      position: absolute;
      bottom: 0.5rem;
      right: 0.5rem;
      display: flex;
      align-items: center;
      gap: 0.3rem;
      padding: 0.2rem 0.5rem;
      border-radius: 5px;
      background: rgba(0,0,0,0.6);
      backdrop-filter: blur(8px);
      font-size: 0.65rem;
      font-weight: 600;
      color: rgba(255,255,255,0.7);
    }

    .arweave-badge .dot {
      width: 5px;
      height: 5px;
      border-radius: 50%;
      background: #26de81;
    }

    /* ── FEED STATES ── */
    .feed-loading, .feed-empty, .feed-error {
      text-align: center;
      padding: 3rem 1rem;
      color: var(--text-3);
      font-size: 0.9rem;
    }

    .feed-error { color: #f87171; }

    .cta-banner {
      display: flex;
      align-items: center;
      gap: 1rem;
      padding: 0.85rem 1.25rem;
      background: linear-gradient(135deg, rgba(108,92,231,0.15), rgba(108,92,231,0.05));
      border: 1px solid rgba(108,92,231,0.25);
      border-radius: 12px;
    }

    .cta-text {
      flex: 1;
      font-size: 0.85rem;
      color: var(--text-2);
    }

    .cta-text strong {
      color: var(--text);
    }

    .cta-btn {
      padding: 0.45rem 1.1rem;
      border-radius: 8px;
      border: none;
      background: var(--purple);
      color: #fff;
      font-size: 0.8rem;
      font-weight: 600;
      font-family: inherit;
      cursor: pointer;
      white-space: nowrap;
      transition: background 0.15s;
    }

    .cta-btn:hover { background: #5a4bd6; }

    .load-more-btn {
      width: 100%;
      padding: 0.6rem;
      border-radius: 10px;
      border: 1px solid var(--border);
      background: var(--surface);
      color: var(--text-2);
      font-size: 0.82rem;
      font-weight: 600;
      font-family: inherit;
      cursor: pointer;
      transition: border-color 0.15s, color 0.15s;
    }

    .load-more-btn:hover {
      border-color: rgba(108,92,231,0.4);
      color: var(--text);
    }

    /* ── PROFILE VIEW ── */
    .profile-view { display: none; }
    .profile-view.active { display: flex; flex-direction: column; gap: 1.25rem; }

    .profile-header-card {
      background: var(--surface);
      border: 1px solid var(--border);
      border-radius: 16px;
      overflow: hidden;
    }

    .profile-header-cover {
      height: 120px;
      background: linear-gradient(135deg, #1a0533, #3d1a78, #6C5CE7, #a78bfa);
    }

    .profile-header-body {
      padding: 0 1.5rem 1.5rem;
    }

    .profile-header-avatar {
      width: 80px;
      height: 80px;
      border-radius: 16px;
      background: var(--surface-2);
      border: 4px solid var(--surface);
      margin-top: -40px;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 1.5rem;
      font-weight: 700;
      color: var(--purple-light);
    }

    .profile-header-info {
      margin-top: 0.75rem;
    }

    .profile-header-name {
      font-size: 1.25rem;
      font-weight: 700;
    }

    .profile-header-handle {
      font-size: 0.85rem;
      color: var(--text-3);
      margin-bottom: 0.5rem;
    }

    .profile-header-bio {
      font-size: 0.85rem;
      color: var(--text-2);
      margin-bottom: 1rem;
      line-height: 1.5;
    }

    .profile-header-stats {
      display: flex;
      gap: 1.5rem;
      padding-top: 1rem;
      border-top: 1px solid var(--border);
    }

    .profile-header-stat {
      text-align: center;
    }

    .profile-header-stat-value {
      font-size: 1.1rem;
      font-weight: 700;
    }

    .profile-header-stat-label {
      font-size: 0.72rem;
      color: var(--text-3);
    }

    .profile-actions {
      display: flex;
      gap: 0.5rem;
      margin-top: 1rem;
    }

    .profile-edit-btn {
      padding: 0.45rem 1.1rem;
      border-radius: 8px;
      border: 1px solid var(--border);
      background: var(--surface-2);
      color: var(--text-2);
      font-size: 0.8rem;
      font-weight: 600;
      font-family: inherit;
      cursor: pointer;
      transition: border-color 0.15s, color 0.15s;
    }

    .profile-edit-btn:hover { border-color: rgba(108,92,231,0.4); color: var(--text); }

    .wallet-connect-btn {
      padding: 0.45rem 1.1rem;
      border-radius: 8px;
      border: 1px solid rgba(38,222,129,0.3);
      background: rgba(38,222,129,0.07);
      color: #26de81;
      font-size: 0.8rem;
      font-weight: 600;
      font-family: inherit;
      cursor: pointer;
      display: flex;
      align-items: center;
      gap: 0.4rem;
      transition: background 0.15s, border-color 0.15s;
    }

    .wallet-connect-btn:hover {
      background: rgba(38,222,129,0.15);
      border-color: rgba(38,222,129,0.5);
    }

    .profile-section-title {
      font-size: 0.82rem;
      font-weight: 700;
      color: var(--text-3);
      text-transform: uppercase;
      letter-spacing: 0.06em;
    }

    .profile-posts-grid {
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
      gap: 0.75rem;
    }

    .profile-post-thumb {
      aspect-ratio: 1;
      border-radius: 12px;
      overflow: hidden;
      background: var(--surface-2);
      border: 1px solid var(--border);
      cursor: pointer;
      transition: border-color 0.15s;
      position: relative;
    }

    .profile-post-thumb:hover { border-color: rgba(108,92,231,0.3); }

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

    .profile-post-thumb-overlay {
      position: absolute;
      bottom: 0;
      left: 0;
      right: 0;
      padding: 0.5rem;
      background: linear-gradient(transparent, rgba(0,0,0,0.7));
      font-size: 0.75rem;
      font-weight: 600;
      color: #fff;
    }

    .profile-posts-empty {
      text-align: center;
      padding: 2rem;
      color: var(--text-3);
      font-size: 0.85rem;
    }

    /* ── MODAL ── */
    .modal-overlay {
      display: none;
      position: fixed;
      inset: 0;
      background: rgba(0,0,0,0.7);
      backdrop-filter: blur(6px);
      z-index: 200;
      align-items: center;
      justify-content: center;
    }

    .modal-overlay.open { display: flex; }

    .modal {
      background: var(--surface);
      border: 1px solid var(--border);
      border-radius: 16px;
      width: 90%;
      max-width: 420px;
      padding: 2rem;
      position: relative;
    }

    .modal-close {
      position: absolute;
      top: 0.75rem;
      right: 0.75rem;
      width: 28px;
      height: 28px;
      border-radius: 6px;
      border: none;
      background: var(--surface-2);
      color: var(--text-3);
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 1.1rem;
      transition: color 0.12s;
    }

    .modal-close:hover { color: var(--text); }

    .modal-title {
      font-size: 1.1rem;
      font-weight: 700;
      margin-bottom: 1.25rem;
    }

    .modal-tabs {
      display: flex;
      gap: 0.25rem;
      background: var(--surface-2);
      border-radius: 8px;
      padding: 0.2rem;
      margin-bottom: 1.25rem;
    }

    .modal-tab {
      flex: 1;
      padding: 0.4rem;
      border-radius: 6px;
      border: none;
      background: none;
      color: var(--text-3);
      font-size: 0.82rem;
      font-weight: 600;
      font-family: inherit;
      cursor: pointer;
      transition: background 0.12s, color 0.12s;
    }

    .modal-tab.active {
      background: var(--purple-dim);
      color: var(--purple-light);
    }

    .form-field {
      margin-bottom: 0.85rem;
    }

    .form-field label {
      display: block;
      font-size: 0.75rem;
      font-weight: 600;
      color: var(--text-3);
      margin-bottom: 0.35rem;
      text-transform: uppercase;
      letter-spacing: 0.05em;
    }

    .form-field input, .form-field textarea, .form-field select {
      width: 100%;
      padding: 0.55rem 0.75rem;
      background: var(--surface-2);
      border: 1px solid var(--border);
      border-radius: 8px;
      color: var(--text);
      font-size: 0.85rem;
      font-family: inherit;
      outline: none;
      transition: border-color 0.15s;
    }

    .form-field input:focus, .form-field textarea:focus {
      border-color: rgba(108,92,231,0.5);
    }

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

    .form-btn {
      width: 100%;
      padding: 0.6rem;
      border-radius: 8px;
      border: none;
      background: var(--purple);
      color: #fff;
      font-size: 0.85rem;
      font-weight: 600;
      font-family: inherit;
      cursor: pointer;
      transition: background 0.15s;
      margin-top: 0.5rem;
    }

    .form-btn:hover { background: #5a4bd6; }
    .form-btn:disabled { opacity: 0.5; cursor: not-allowed; }

    /* Avatar images render as covered fills inside their round containers */
    .profile-header-avatar, .profile-avatar, .nav-avatar { overflow: hidden; }
    .profile-header-avatar img, .profile-avatar img, .nav-avatar img,
    .avatar-preview img { width: 100%; height: 100%; object-fit: cover; }

    /* Edit-profile avatar picker */
    .edit-avatar-row {
      display: flex;
      align-items: center;
      gap: 1rem;
      margin-bottom: 1rem;
    }
    .avatar-preview {
      width: 72px;
      height: 72px;
      border-radius: 16px;
      background: var(--surface-2);
      border: 1px solid var(--border);
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 1.4rem;
      font-weight: 700;
      color: var(--purple-light);
      overflow: hidden;
      flex-shrink: 0;
    }
    .avatar-pick-btn {
      padding: 0.5rem 0.9rem;
      border-radius: 8px;
      border: 1px solid var(--border);
      background: var(--surface-2);
      color: var(--text-2);
      font-size: 0.8rem;
      font-weight: 600;
      font-family: inherit;
      cursor: pointer;
      transition: border-color 0.12s, color 0.12s;
    }
    .avatar-pick-btn:hover { border-color: rgba(108,92,231,0.4); color: var(--text); }

    .form-error {
      color: #f87171;
      font-size: 0.78rem;
      margin-top: 0.5rem;
      min-height: 1.2em;
    }

    .form-file-drop {
      border: 2px dashed var(--border);
      border-radius: 10px;
      padding: 1.5rem;
      text-align: center;
      cursor: pointer;
      transition: border-color 0.15s;
      color: var(--text-3);
      font-size: 0.82rem;
    }

    .form-file-drop:hover { border-color: rgba(108,92,231,0.4); }
    .form-file-drop.has-file { border-color: #26de81; color: #26de81; }

    .form-file-drop input { display: none; }

    /* ── TOAST ── */
    .toast {
      position: fixed;
      bottom: 1.5rem;
      left: 50%;
      transform: translateX(-50%) translateY(100px);
      background: var(--surface);
      border: 1px solid var(--border);
      border-radius: 10px;
      padding: 0.6rem 1.25rem;
      font-size: 0.82rem;
      font-weight: 500;
      color: var(--text);
      z-index: 300;
      transition: transform 0.3s ease;
      white-space: nowrap;
    }

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

    /* ── ICONS ── */
    .icon { display: inline-flex; align-items: center; line-height: 1; }

    /* ── FOLLOW LIST ── */
    .clickable-stat { cursor: pointer; border-radius: 8px; transition: background 0.12s; }
    .clickable-stat:hover { background: var(--surface-2); }

    .follow-list {
      max-height: 60vh;
      overflow-y: auto;
      margin: 0 -0.5rem;
    }
    .follow-row {
      display: flex;
      align-items: center;
      gap: 0.75rem;
      padding: 0.6rem 0.5rem;
      border-radius: 10px;
    }
    .follow-row:hover { background: var(--surface-2); }
    .follow-row-avatar {
      width: 40px;
      height: 40px;
      border-radius: 10px;
      background: var(--surface-2);
      border: 1px solid var(--border);
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 0.8rem;
      font-weight: 700;
      color: var(--purple-light);
      overflow: hidden;
      flex-shrink: 0;
    }
    .follow-row-avatar img { width: 100%; height: 100%; object-fit: cover; }
    .follow-row-info { flex: 1; min-width: 0; }
    .follow-row-name {
      font-size: 0.9rem;
      font-weight: 600;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }
    .follow-row-handle {
      font-size: 0.75rem;
      color: var(--text-3);
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }
    .follow-list-empty { padding: 1.5rem 0.5rem; text-align: center; color: var(--text-3); font-size: 0.85rem; }

    /* ── POST DETAIL VIEW ── */
    .post-view { display: none; }
    .post-view.active { display: block; }
    .post-detail-desc {
      padding: 0.75rem 1rem 0;
      color: var(--text-2);
      font-size: 0.9rem;
      line-height: 1.55;
      white-space: pre-wrap;
    }
    .back-btn {
      display: inline-flex;
      align-items: center;
      gap: 0.35rem;
      margin-bottom: 0.9rem;
      padding: 0.4rem 0.85rem;
      border-radius: 8px;
      border: 1px solid var(--border);
      background: var(--surface);
      color: var(--text-2);
      font-size: 0.82rem;
      font-weight: 600;
      font-family: inherit;
      cursor: pointer;
      transition: border-color 0.15s, color 0.15s;
    }
    .back-btn:hover { border-color: rgba(108,92,231,0.4); color: var(--text); }

    /* Clickable affordance for navigating to a user or post. */
    .post-clickable { cursor: pointer; }
    .post-author.post-clickable:hover .post-author-name,
    .post-title.post-clickable:hover { color: var(--purple-light); }
    .post-image.post-clickable:hover { opacity: 0.94; }
    .follow-row-clickable { cursor: pointer; border-radius: 8px; transition: background 0.12s; }
    .follow-row-clickable:hover { background: var(--surface-2); }

    /* ── SEARCH VIEW ── */
    .search-view { display: none; }
    .search-view.active { display: block; }
    .search-box {
      display: flex;
      align-items: center;
      gap: 0.6rem;
      background: var(--surface);
      border: 1px solid var(--border);
      border-radius: 10px;
      padding: 0 0.9rem;
      margin-bottom: 0.5rem;
      color: var(--text-3);
    }
    .search-box input {
      flex: 1;
      height: 46px;
      background: none;
      border: none;
      outline: none;
      color: var(--text);
      font-size: 0.95rem;
      font-family: inherit;
    }
    .search-box input::placeholder { color: var(--text-3); }
    .search-section-title {
      font-size: 0.8rem;
      font-weight: 700;
      color: var(--text-3);
      text-transform: uppercase;
      letter-spacing: 0.05em;
      margin: 1.25rem 0 0.75rem;
    }
    #search-artists { display: flex; flex-direction: column; gap: 0.25rem; }
    #search-artworks { display: flex; flex-direction: column; gap: 1.25rem; }

    /* ── BOTTOM NAV (mobile only; shown via the 640px query) ── */
    .bottom-nav { display: none; }

    /* ── RESPONSIVE ── */
    @media (max-width: 960px) {
      .page { grid-template-columns: 1fr 230px; }
      .sidebar-left { display: none; }
    }

    @media (max-width: 720px) {
      .page { grid-template-columns: 1fr; gap: 1rem; }
      .sidebar-left, .sidebar-right { display: none; }
    }

    @media (max-width: 640px) {
      /* Nav: drop the search + handle and tighten spacing so the actions
         (avatar, notifications, Sign out) never get clipped off the edge. */
      nav { padding: 0 0.9rem; gap: 0.5rem; }
      .nav-search { display: none; }
      .nav-user-handle { display: none !important; }
      .nav-actions { gap: 0.4rem; }
      .nav-connect { padding: 0 0.7rem; font-size: 0.72rem; }

      .page { padding-left: 0.9rem; padding-right: 0.9rem; }

      /* Feed tabs scroll horizontally instead of clipping "Boosted". */
      .feed-tabs { overflow-x: auto; scrollbar-width: none; }
      .feed-tabs::-webkit-scrollbar { display: none; }
      .feed-tab { flex: 1 0 auto; white-space: nowrap; }

      /* Bottom tab bar replaces the hidden left sidebar. */
      .bottom-nav {
        display: flex;
        position: fixed;
        top: auto;
        bottom: 0; left: 0; right: 0;
        height: 56px;
        background: rgba(10,10,10,0.95);
        backdrop-filter: blur(14px);
        -webkit-backdrop-filter: blur(14px);
        border-top: 1px solid var(--border);
        z-index: 100;
        padding-bottom: env(safe-area-inset-bottom);
      }
      .bottom-nav-item {
        flex: 1;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 3px;
        color: var(--text-3);
        text-decoration: none;
        font-size: 0.62rem;
        font-weight: 600;
        -webkit-tap-highlight-color: transparent;
        transition: color 0.12s;
      }
      .bottom-nav-item.active { color: var(--purple-light); }

      /* Leave room so content isn't hidden behind the bar. */
      .page { padding-bottom: calc(56px + env(safe-area-inset-bottom) + 1rem); }

      /* Keep a long name from pushing Follow/score out of the card. */
      .post-author-name, .post-author-handle {
        overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
      }
      .follow-btn, .post-score { flex-shrink: 0; }
    }
