:root {
      --bg: #0c0c0f;
      --surface: rgba(255,255,255,0.04);
      --surface-2: rgba(255,255,255,0.07);
      --border: rgba(255,255,255,0.06);
      --text: #f2f2f5;
      --text-muted: #8a8a96;
      --accent: #a78bfa;
      --accent-hover: #c4b5fd;
      --accent-light: rgba(167,139,250,0.12);
      --header-bg: rgba(12,12,15,0.7);
      --radius: 20px;
      --radius-pill: 999px;
      --radius-sm: 12px;
      --shadow-card: 0 16px 48px rgba(0,0,0,0.35);
      --shadow-pop: 0 8px 24px rgba(0,0,0,0.4);
      --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
      --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
      --text-xs: 0.65rem;
      --text-sm: 0.75rem;
      --text-base: 0.875rem;
      --text-lg: 0.9375rem;
    }

    [data-theme="light"] {
      --bg: #f8f8fa;
      --surface: rgba(0,0,0,0.03);
      --surface-2: rgba(0,0,0,0.06);
      --border: rgba(0,0,0,0.07);
      --text: #1a1a1e;
      --text-muted: #6b6b76;
      --accent: #7c3aed;
      --accent-hover: #6d28d9;
      --accent-light: rgba(124,58,237,0.08);
      --header-bg: rgba(248,248,250,0.7);
    }

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

    body {
      font-family: var(--font-sans);
      background: var(--bg);
      color: var(--text);
      min-height: 100vh;
      overflow-x: hidden;
    }
    body::before {
      content: '';
      position: fixed;
      inset: 0;
      pointer-events: none;
      z-index: 9999;
      opacity: 0.035;
      background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
      background-repeat: repeat;
      background-size: 256px 256px;
    }

    a { color: inherit; text-decoration: none; }

    /* ─── layout ─── */
    .layout {
      display: grid;
      grid-template-columns: 240px 1fr 320px;
      max-width: 1280px;
      margin: 0 auto;
      min-height: 100vh;
      gap: 24px;
      padding: 0 24px;
    }

    .sidebar-left {
      position: sticky;
      top: 0;
      height: 100vh;
      display: flex;
      flex-direction: column;
      padding: 24px 0;
    }

    .sidebar-right {
      position: sticky;
      top: 0;
      height: 100vh;
      padding: 24px 0;
      overflow-y: auto;
    }

    .main {
      min-height: 100vh;
      padding: 24px 0;
    }

    /* ─── left sidebar ─── */
    .logo {
      padding: 0 12px 32px;
      font-size: 2.25rem;
      font-weight: 900;
      letter-spacing: -0.08em;
      cursor: pointer;
      line-height: 1;
    }
    .logo span {
      background: linear-gradient(135deg, var(--accent), #e879f9);
      -webkit-background-clip: text;
      -webkit-text-fill-color: transparent;
      background-clip: text;
    }

    .nav-wrap {
      background: var(--surface);
      border-radius: 24px;
      padding: 12px 10px;
    }
    .nav { list-style: none; }
    .nav li {
      display: flex;
      align-items: center;
      gap: 14px;
      padding: 10px 14px;
      font-size: var(--text-lg);
      font-weight: 500;
      border-radius: 16px;
      cursor: pointer;
      transition: all 0.2s;
      margin-bottom: 4px;
      color: var(--text-muted);
    }
    .nav li:hover { background: var(--surface-2); color: var(--text); }
    .nav li.active { font-weight: 600; color: var(--text); background: var(--surface-2); }
    .nav li svg { width: 20px; height: 20px; flex-shrink: 0; }
    .nav li.auth-only { display: none; }
    body.logged-in .nav li.auth-only { display: flex; }
    .compose.auth-only { display: none; }
    body.logged-in .compose.auth-only { display: flex; }

    .btn-big {
      background: var(--accent);
      color: #fff;
      border: none;
      border-radius: var(--radius-pill);
      padding: 14px;
      font: inherit;
      font-size: var(--text-lg);
      font-weight: 700;
      cursor: pointer;
      width: 100%;
      margin: 12px auto 0;
      transition: background 0.15s, transform 0.1s;
    }
    .btn-big:hover { background: var(--accent-hover); transform: scale(1.02); }

    .theme-toggle {
      background: transparent;
      color: var(--text-muted);
      border: none;
      border-radius: var(--radius-pill);
      padding: 6px;
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: center;
      margin: 4px auto 0;
      transition: color 0.15s, background 0.15s;
    }
    .theme-toggle:hover { color: var(--text); background: var(--surface-2); }

    .user-pill {
      margin-top: auto;
      padding: 6px;
      display: flex;
      align-items: center;
      gap: 10px;
      border-radius: var(--radius-pill);
      cursor: pointer;
      transition: background 0.2s;
      background: var(--surface);
      position: relative;
    }
    .user-pill:hover { background: var(--surface-2); }
    .user-pill .avatar {
      width: 36px;
      height: 36px;
      border-radius: 50%;
      display: grid;
      place-items: center;
      font-size: var(--text-base);
      font-weight: 700;
      flex-shrink: 0;
    }
    .user-pill .info {
      display: flex;
      flex-direction: column;
      min-width: 0;
    }
    .user-pill .name {
      font-weight: 700;
      font-size: var(--text-sm);
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }
    .user-pill .handle {
      color: var(--text-muted);
      font-size: var(--text-sm);
      font-family: var(--font-mono);
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }

    /* ─── center header ─── */
    .sticky-header {
      position: sticky;
      top: 0;
      margin: 0 2px 16px;
      backdrop-filter: blur(20px) saturate(1.2);
      background: var(--header-bg);
      border-bottom: 1px solid var(--border);
      z-index: 10;
      border-radius: var(--radius);
    }
    .sticky-header h2 {
      padding: 14px 20px;
      font-size: 1.125rem;
      font-weight: 700;
      letter-spacing: -0.02em;
    }
    .back-btn {
      display: inline-flex;
      align-items: center;
      gap: 8px;
      background: transparent;
      border: none;
      color: var(--text);
      font: inherit;
      font-size: 1rem;
      cursor: pointer;
      padding: 4px;
      border-radius: var(--radius-pill);
    }
    .back-btn:hover { background: rgba(255,255,255,0.1); }
    .tabs {
      display: flex;
      gap: 4px;
      padding: 0 12px 12px;
    }
    .tab {
      flex: 1;
      text-align: center;
      padding: 10px 16px;
      font-size: var(--text-base);
      font-weight: 500;
      color: var(--text-muted);
      cursor: pointer;
      transition: all 0.2s;
      border-radius: var(--radius-pill);
      position: relative;
    }
    .tab:hover { background: var(--surface); color: var(--text); }
    .tab.active {
      color: var(--text);
      font-weight: 600;
      background: var(--surface-2);
    }

    /* ─── compose ─── */
    .compose {
      padding: 16px;
      background: var(--surface);
      border-radius: var(--radius);
      display: flex;
      gap: 12px;
      margin-bottom: 16px;
    }
    .compose .avatar { flex-shrink: 0; }
    .compose-right { flex: 1; }
    .compose-right input {
      background: transparent;
      border: none;
      color: var(--text);
      font: inherit;
      font-size: 1rem;
      outline: none;
      width: 100%;
      padding: 8px 0;
    }
    .compose-right input::placeholder { color: var(--text-muted); }

    .spotify-results {
      max-height: 320px;
      overflow-y: auto;
      border: 1px solid var(--border);
      border-radius: var(--radius-sm);
      background: var(--surface);
      margin-top: 4px;
    }
    .spotify-result {
      display: flex;
      align-items: center;
      gap: 12px;
      padding: 8px 12px;
      cursor: pointer;
      border-bottom: 1px solid var(--border);
      transition: background 0.15s;
    }
    .spotify-result:last-child { border-bottom: none; }
    .spotify-result:hover { background: var(--surface-hover); }
    .spotify-result-art {
      width: 40px;
      height: 40px;
      border-radius: 6px;
      object-fit: cover;
      flex-shrink: 0;
    }
    .spotify-result-art-placeholder {
      width: 40px;
      height: 40px;
      border-radius: 6px;
      background: var(--surface);
      display: flex;
      align-items: center;
      justify-content: center;
      flex-shrink: 0;
      font-size: 1.2rem;
    }
    .spotify-result-info { min-width: 0; flex: 1; }
    .spotify-result-name {
      font-weight: 600;
      font-size: 0.875rem;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }
    .spotify-result-artist {
      color: var(--text-muted);
      font-size: 0.75rem;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }
    .spotify-result-empty {
      padding: 16px;
      text-align: center;
      color: var(--text-muted);
      font-size: 0.875rem;
    }

    .compose-actions {
      display: flex;
      justify-content: flex-end;
      align-items: center;
      gap: 12px;
      margin-top: 8px;
      padding-top: 8px;
      border-top: 1px solid var(--border);
    }
    .hint-inline { color: var(--text-muted); font-size: var(--text-sm); margin-right: auto; }

    .btn {
      background: var(--accent);
      color: #fff;
      border: none;
      border-radius: var(--radius-pill);
      padding: 8px 18px;
      font: inherit;
      font-size: var(--text-base);
      font-weight: 600;
      cursor: pointer;
      transition: background 0.15s, transform 0.1s;
    }
    .btn:hover { background: var(--accent-hover); }
    .btn:disabled { opacity: 0.5; cursor: not-allowed; }
    .btn-outline {
      background: transparent;
      color: var(--text);
      border: 1px solid var(--border);
    }
    .btn-outline:hover { background: rgba(255,255,255,0.05); }

    /* ─── feed grid ─── */
    #feed,
    #profileFeed {
      display: grid;
      grid-template-columns: 1fr;
      gap: 16px;
    }
    .repost-banner {
      display: flex;
      align-items: center;
      gap: 6px;
      padding: 6px 16px 0;
      font-size: 0.8125rem;
      color: var(--text-muted);
    }
    .repost-banner svg { opacity: 0.7; }
    .post.featured .post-artwork {
      aspect-ratio: 1;
    }
    .post.featured .post-body {
      position: absolute;
      bottom: 0;
      left: 0;
      right: 0;
      top: 50%;
      background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.6) 40%, rgba(0,0,0,0.1) 100%);
      padding: 12px 18px 18px;
      border-radius: 0 0 var(--radius) var(--radius);
      display: flex;
      flex-direction: column;
      justify-content: flex-end;
    }
    /* featured cards: vinyl spin disabled (square artwork) */
    .post.featured .artwork-wrap img.spinning {
      border-radius: 0;
      animation: none;
    }
    .post.featured .post-title {
      font-size: 1.25rem;
      color: #fff;
      text-shadow: 0 1px 4px rgba(0,0,0,0.5);
    }
    .post.featured .post-artist {
      color: rgba(255,255,255,0.75);
      text-shadow: 0 1px 4px rgba(0,0,0,0.5);
    }
    .post.featured .post-caption {
      color: rgba(255,255,255,0.9);
      text-shadow: 0 1px 4px rgba(0,0,0,0.5);
    }
    .post.featured .post-meta .name {
      color: #fff;
      text-shadow: 0 1px 4px rgba(0,0,0,0.5);
    }
    .post.featured .post-meta .handle, .post.featured .post-meta .time {
      color: rgba(255,255,255,0.7);
    }
    .post.featured .actions {
      margin-top: 10px;
    }

    /* ─── tag pills ─── */
    .tag-pills {
      display: flex;
      gap: 6px;
      flex-wrap: wrap;
      margin-bottom: 8px;
    }
    .tag-pill {
      background: var(--accent-light);
      color: var(--accent);
      border: 1px solid rgba(167,139,250,0.2);
      border-radius: var(--radius-pill);
      padding: 2px 10px;
      font-size: var(--text-xs);
      font-weight: 600;
      cursor: pointer;
      transition: background 0.15s, transform 0.1s;
      font-family: var(--font-mono);
    }
    .tag-pill:hover {
      background: rgba(167,139,250,0.2);
      transform: scale(1.05);
    }

    /* ─── post card ─── */
    .post {
      position: relative;
      background: var(--surface);
      border-radius: var(--radius);
      overflow: hidden;
      transition: transform 0.25s cubic-bezier(0.4,0,0.2,1), box-shadow 0.25s;
      cursor: pointer;
    }
    .post:hover {
      transform: translateY(-4px);
      box-shadow: var(--shadow-card);
    }
    .post.keyboard-focus {
      outline: 2px solid var(--accent);
      outline-offset: 4px;
      transform: translateY(-4px);
      box-shadow: var(--shadow-card);
    }

    .post-artwork {
      position: relative;
      aspect-ratio: 1;
      overflow: hidden;
    }
    .post-artwork img {
      width: 100%;
      height: 100%;
      object-fit: cover;
      transition: transform 0.4s cubic-bezier(0.4,0,0.2,1);
    }
    .post:hover .post-artwork img { transform: scale(1.04); }

    .post .play-btn {
      position: absolute;
      top: 50%;
      left: 50%;
      width: 56px;
      height: 56px;
      margin-top: -28px;
      margin-left: -28px;
      border-radius: 50%;
      background: rgba(0,0,0,0.45);
      backdrop-filter: blur(6px);
      border: 1px solid rgba(255,255,255,0.12);
      color: #fff;
      display: grid;
      place-items: center;
      cursor: pointer;
      transition: background 0.2s, transform 0.15s;
      z-index: 2;
    }
    .post .play-btn:hover { transform: scale(1.12); background: rgba(0,0,0,0.65); }
    .post .play-btn:active { transform: scale(0.95); }
    .post .play-btn.playing { background: rgba(0,186,124,0.55); }
    .post .play-btn svg { width: 22px; height: 22px; }

    .post-body {
      padding: 14px;
    }

    /* ─── notifications ─── */
    #notifList {
      display: flex;
      flex-direction: column;
      gap: 2px;
    }
    .notif-item {
      position: relative;
      display: flex;
      align-items: center;
      gap: 12px;
      padding: 14px 16px;
      border-radius: var(--radius);
      background: var(--surface);
      transition: background 0.15s;
      cursor: pointer;
    }
    .notif-item:hover { background: var(--surface-2); }
    .notif-item.unread { background: var(--accent-light); }
    .notif-avatar {
      width: 44px;
      height: 44px;
      border-radius: 50%;
      display: grid;
      place-items: center;
      font-size: 1rem;
      font-weight: 700;
      color: #fff;
      flex-shrink: 0;
    }
    .notif-body { flex: 1; min-width: 0; }
    .notif-text {
      display: flex;
      align-items: baseline;
      gap: 6px;
      flex-wrap: wrap;
      line-height: 1.3;
    }
    .notif-name { font-weight: 700; font-size: var(--text-sm); }
    .notif-handle { color: var(--text-muted); font-size: var(--text-xs); font-family: var(--font-mono); }
    .notif-time {
      margin-left: auto;
      color: var(--text-muted);
      font-size: var(--text-xs);
      font-family: var(--font-mono);
      flex-shrink: 0;
    }
    .notif-action { color: var(--text-muted); font-size: var(--text-sm); margin-top: 2px; }
    .notif-dot {
      position: absolute;
      top: 50%;
      right: 14px;
      transform: translateY(-50%);
      width: 8px;
      height: 8px;
      border-radius: 50%;
      background: #f4212e;
      flex-shrink: 0;
    }

    .post-meta {
      display: flex;
      align-items: center;
      gap: 8px;
      margin-bottom: 8px;
    }
    .post-meta .avatar-pill {
      width: 24px;
      height: 24px;
      border-radius: 50%;
      display: grid;
      place-items: center;
      font-size: var(--text-xs);
      font-weight: 700;
      flex-shrink: 0;
    }
    .post-meta .name {
      font-weight: 600;
      font-size: var(--text-sm);
      cursor: pointer;
      line-height: 1.2;
    }
    .post-meta .name:hover { text-decoration: underline; }
    .post-meta-user {
      display: flex;
      flex-direction: column;
      min-width: 0;
      flex: 1;
    }
    .post-meta .handle {
      color: var(--text-muted);
      font-size: var(--text-sm);
      font-family: var(--font-mono);
    }
    .post-meta .time {
      margin-left: auto;
      color: var(--text-muted);
      font-size: var(--text-xs);
      font-family: var(--font-mono);
    }

    .post-title {
      font-weight: 700;
      font-size: var(--text-lg);
      line-height: 1.25;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
      margin-bottom: 2px;
    }
    .post-artist {
      color: var(--text-muted);
      font-size: var(--text-sm);
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
      margin-bottom: 6px;
    }
    .post-caption {
      font-size: var(--text-sm);
      color: var(--text-muted);
      line-height: 1.3;
      display: -webkit-box;
      -webkit-line-clamp: 2;
      -webkit-box-orient: vertical;
      overflow: hidden;
      margin-bottom: 10px;
    }

    /* ─── compact actions ─── */
    .actions {
      display: flex;
      align-items: center;
      justify-content: space-between;
      margin-top: 8px;
    }
    .action-btn {
      display: flex;
      align-items: center;
      gap: 4px;
      background: transparent;
      border: none;
      color: var(--text-muted);
      font-size: var(--text-sm);
      cursor: pointer;
      padding: 4px;
      border-radius: var(--radius-pill);
      transition: color 0.15s, background 0.15s;
    }
    .action-btn svg { width: 14px; height: 14px; }
    .action-btn:hover { color: var(--accent); background: var(--accent-light); }
    .action-btn.active { color: #00ba7c; }
    .action-btn.active:hover { color: #00ba7c; background: rgba(0,186,124,0.1); }

    /* ─── reactions ─── */
    .reactions-bar {
      display: flex;
      gap: 4px;
      flex-wrap: wrap;
      align-items: center;
    }
    .reaction {
      display: inline-flex;
      align-items: center;
      gap: 3px;
      background: var(--surface-2);
      border: 1px solid var(--border);
      border-radius: var(--radius-pill);
      padding: 2px 8px;
      font-size: var(--text-sm);
      cursor: pointer;
      user-select: none;
      transition: background 0.15s, transform 0.1s, border-color 0.15s;
    }
    .reaction:hover { background: rgba(255,255,255,0.08); }
    .reaction:active { transform: scale(0.92); }
    .reaction.mine { border-color: var(--accent); background: var(--accent-light); }
    .reaction .count { font-size: var(--text-xs); font-weight: 600; color: var(--text-muted); }

    .picker-wrap { position: relative; }
    .add-emoji-btn {
      width: 22px; height: 22px;
      border-radius: 50%;
      border: 1px dashed var(--text-muted);
      background: transparent;
      color: var(--text-muted);
      display: grid; place-items: center;
      cursor: pointer;
      font-size: var(--text-base);
      transition: border-color 0.15s, color 0.15s;
    }
    .add-emoji-btn:hover { border-color: var(--text); color: var(--text); }

    .emoji-popover {
      position: absolute;
      bottom: calc(100% + 8px);
      left: 0;
      background: var(--bg);
      border: 1px solid var(--border);
      border-radius: 12px;
      padding: 8px;
      display: grid;
      grid-template-columns: repeat(6, 1fr);
      gap: 4px;
      box-shadow: var(--shadow-pop);
      z-index: 20;
      opacity: 0;
      pointer-events: none;
      transform: translateY(4px);
      transition: opacity 0.15s, transform 0.15s;
    }
    .emoji-popover.open { opacity: 1; pointer-events: auto; transform: translateY(0); }
    .emoji-popover button {
      background: transparent; border: none; border-radius: 6px;
      font-size: 1.25rem; padding: 4px; cursor: pointer;
      transition: background 0.1s;
    }
    .emoji-popover button:hover { background: rgba(255,255,255,0.1); }

    /* ─── profile page ─── */
    .profile-header {
      position: relative;
    }
    .profile-banner {
      height: 200px;
      background: var(--surface-2);
    }
    .profile-avatar-wrap {
      position: relative;
      margin-top: -48px;
      padding: 0 16px;
      display: flex;
      justify-content: space-between;
      align-items: flex-end;
    }
    .profile-avatar-wrap > img,
    .profile-avatar-wrap > div:first-child {
      width: 96px; height: 96px;
      border-radius: 50%;
      border: 4px solid var(--bg);
      flex-shrink: 0;
    }
    }
    .profile-actions {
      margin-bottom: 12px;
    }
    .profile-info {
      padding: 12px 16px 16px;
    }
    .profile-info .display-name {
      font-size: 1.25rem;
      font-weight: 800;
    }
    .profile-info .handle {
      color: var(--text-muted);
      font-size: var(--text-lg);
    }
    .profile-info .bio {
      margin-top: 12px;
      font-size: var(--text-lg);
      line-height: 1.4;
    }
    .profile-stats {
      display: flex;
      gap: 20px;
      margin-top: 12px;
      font-size: var(--text-lg);
      color: var(--text-muted);
    }
    .profile-stats strong {
      color: var(--text);
      font-weight: 700;
    }

    /* ─── right sidebar widgets ─── */
    .widget {
      background: var(--surface);
      border-radius: var(--radius);
      margin-top: 16px;
      overflow: hidden;
    }
    .widget h3 {
      padding: 14px 18px;
      font-size: var(--text-lg);
      font-weight: 700;
      letter-spacing: -0.01em;
      border-bottom: 1px solid var(--border);
    }
    .widget-row {
      padding: 12px 18px;
      cursor: pointer;
      transition: background 0.15s;
      display: flex;
      align-items: center;
      gap: 12px;
    }
    .widget-row:hover { background: rgba(255,255,255,0.03); cursor: pointer; }
    .widget-row:not(:last-child) { border-bottom: 1px solid var(--border); }

    .search {
      position: sticky;
      top: 0;
      background: var(--bg);
      padding: 8px 0;
      z-index: 5;
    }
    .search input {
      width: 100%;
      background: var(--surface);
      border: 1px solid var(--border);
      border-radius: var(--radius-pill);
      padding: 12px 16px;
      color: var(--text);
      font: inherit;
      font-size: var(--text-lg);
      outline: none;
    }
    .search input:focus { border-color: var(--accent); background: var(--bg); }
    .search input::placeholder { color: var(--text-muted); }

    .trend-meta { color: var(--text-muted); font-size: var(--text-sm); }
    .trend-title { font-weight: 700; font-size: var(--text-lg); margin-top: 2px; }
    .trend-count { color: var(--text-muted); font-size: var(--text-sm); margin-top: 2px; }

    .follow-btn {
      margin-left: auto;
      background: var(--text);
      color: var(--bg);
      border: none;
      border-radius: var(--radius-pill);
      padding: 6px 16px;
      font: inherit;
      font-size: var(--text-base);
      font-weight: 700;
      cursor: pointer;
    }
    .follow-btn:hover { background: #d7d9db; }
    .follow-btn.following {
      background: transparent;
      color: var(--text);
      border: 1px solid var(--border);
    }
    .follow-btn.following:hover { background: rgba(255,0,0,0.1); color: #f4212e; border-color: #f4212e; }

    /* ─── modal ─── */
    .modal-backdrop {
      position: fixed;
      inset: 0;
      background: rgba(0,0,0,0.65);
      backdrop-filter: blur(4px);
      z-index: 200;
      display: flex;
      align-items: center;
      justify-content: center;
      padding: 16px;
    }
    .modal {
      background: var(--bg);
      border: 1px solid var(--border);
      border-radius: 16px;
      width: 100%;
      max-width: 480px;
      max-height: 90vh;
      overflow-y: auto;
    }
    .modal-header {
      padding: 16px;
      border-bottom: 1px solid var(--border);
      display: flex;
      align-items: center;
      justify-content: space-between;
    }
    .modal-header h3 { font-size: 1.0625rem; font-weight: 700; }
    .modal-body { padding: 16px; }
    .field { margin-bottom: 16px; }
    .field label {
      display: block;
      font-size: var(--text-sm);
      font-weight: 500;
      color: var(--text-muted);
      margin-bottom: 4px;
    }
    .field input, .field textarea {
      width: 100%;
      background: var(--surface);
      border: 1px solid var(--border);
      border-radius: 8px;
      padding: 10px 12px;
      color: var(--text);
      font: inherit;
      font-size: var(--text-lg);
      outline: none;
    }
    .field input:focus, .field textarea:focus { border-color: var(--accent); }
    .handle-input-wrap {
      display: flex;
      align-items: center;
      background: var(--surface);
      border: 1px solid var(--border);
      border-radius: 8px;
      overflow: hidden;
    }
    .handle-input-wrap:focus-within { border-color: var(--accent); }
    .handle-prefix {
      padding: 10px 0 10px 12px;
      color: var(--text-muted);
      font-weight: 500;
      font-size: var(--text-lg);
      user-select: none;
    }
    .handle-input-wrap input {
      flex: 1;
      background: transparent;
      border: none;
      padding: 10px 12px 10px 0;
      color: var(--text);
      font: inherit;
      font-size: var(--text-lg);
      outline: none;
    }
    .handle-input-wrap input::placeholder { color: var(--text-muted); }
    .field textarea { resize: vertical; min-height: 80px; }
    .color-picker {
      display: flex;
      gap: 8px;
      flex-wrap: wrap;
    }
    .color-option {
      width: 32px; height: 32px;
      border-radius: 50%;
      cursor: pointer;
      border: 2px solid transparent;
      transition: border-color 0.15s, transform 0.1s;
    }
    .color-option:hover { transform: scale(1.1); }
    .color-option.selected { border-color: var(--text); }

    /* ─── empty / loader ─── */
    .empty-state {
      text-align: center;
      color: var(--text-muted);
      padding: 64px 16px;
      grid-column: 1 / -1;
    }
    .empty-state h3 { color: var(--text); margin-bottom: 8px; font-weight: 700; }
    .stat-card {
      background: var(--surface);
      border-radius: 12px;
      padding: 16px;
      text-align: center;
    }
    .stat-num { font-size: 1.5rem; font-weight: 800; }
    .stat-label { color: var(--text-muted); font-size: var(--text-sm); margin-top: 2px; }
    .admin-post-link { font-weight: 600; font-size: var(--text-sm); color: var(--text); text-decoration: none; }
    .admin-post-link:hover { text-decoration: underline; }
    .loader { text-align: center; color: var(--text-muted); padding: 48px; font-size: var(--text-base); }

    /* ─── skeleton ─── */
    @keyframes pulse { 0%, 100% { opacity: 0.3; } 50% { opacity: 0.6; } }
    .skeleton-card {
      background: var(--surface-2);
      border-radius: var(--radius);
      aspect-ratio: 1;
      animation: pulse 1.5s ease-in-out infinite;
    }

    /* ─── mobile ─── */
    .mobile-nav {
      display: none;
      position: fixed;
      bottom: 0;
      left: 0; right: 0;
      background: var(--bg);
      backdrop-filter: blur(12px);
      border-top: 1px solid var(--border);
      z-index: 100;
      justify-content: space-around;
      padding: 8px 0;
    }
    .mobile-nav button {
      background: transparent;
      border: none;
      color: var(--text-muted);
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 2px;
      font-size: var(--text-xs);
      cursor: pointer;
      padding: 4px 12px;
    }
    .mobile-nav button.active { color: var(--text); }
    .mobile-nav button svg { width: 24px; height: 24px; }

    .fab {
      display: none;
      position: fixed;
      bottom: 72px;
      right: 16px;
      width: 56px; height: 56px;
      border-radius: 50%;
      background: var(--accent);
      color: #fff;
      border: none;
      font-size: 1.5rem;
      cursor: pointer;
      box-shadow: 0 4px 12px rgba(139,92,246,0.4);
      z-index: 100;
    }

    /* ─── vinyl spin ─── */
    @keyframes vinyl-spin {
      from { transform: rotate(0deg); }
      to { transform: rotate(360deg); }
    }
    .artwork-wrap {
      width: 100%;
      height: 100%;
      transition: transform 0.4s cubic-bezier(0.4,0,0.2,1);
    }
    .post:hover .artwork-wrap { transform: scale(1.04); }
    .artwork-wrap img {
      width: 100%;
      height: 100%;
      object-fit: cover;
      transition: border-radius 0.6s ease;
    }
    .artwork-wrap img.spinning {
      border-radius: 50%;
      animation: vinyl-spin 10s linear infinite;
    }

    /* ─── equalizer ─── */
    .eq-bars {
      position: absolute;
      top: 12px;
      right: 12px;
      display: none;
      gap: 3px;
      align-items: flex-end;
      height: 16px;
      z-index: 2;
    }
    .eq-bars.active { display: flex; }
    .eq-bar {
      width: 3px;
      background: var(--accent);
      border-radius: var(--radius-pill);
      animation: eq-bounce 0.5s ease-in-out infinite alternate;
      height: 100%;
    }
    .eq-bar:nth-child(1) { animation-delay: 0s; }
    .eq-bar:nth-child(2) { animation-delay: 0.12s; }
    .eq-bar:nth-child(3) { animation-delay: 0.24s; }
    @keyframes eq-bounce {
      0% { height: 20%; }
      100% { height: 100%; }
    }

    /* ─── card entrance ─── */
    @keyframes fadeInUp {
      from { opacity: 0; transform: translateY(16px); }
      to { opacity: 1; transform: translateY(0); }
    }
    .post {
      animation: fadeInUp 0.45s ease both;
    }

    @media (max-width: 1100px) {
      .layout { grid-template-columns: 72px 1fr; gap: 16px; padding: 0 16px; }
      .sidebar-right { display: none; }
      .sidebar-left .nav li span,
      .sidebar-left .btn-big,
      .sidebar-left .user-pill .info { display: none; }
      .sidebar-left .nav li { justify-content: center; padding: 10px; border-radius: 12px; }
      .sidebar-left .user-pill { justify-content: center; padding: 6px; }
      .sidebar-left .user-pill .avatar { width: 32px; height: 32px; }
      .logo { text-align: center; padding: 0 0 16px; font-size: 1.5rem; }
    }

    @media (max-width: 640px) {
      .layout { grid-template-columns: 1fr; padding: 0 12px; gap: 0; }
      .sidebar-left { display: none; }
      .main { padding: 12px 0; }
      .mobile-nav { display: flex; }
      .fab { display: grid; place-items: center; }
      .sticky-header h2 { padding-left: 48px; position: relative; }
      .profile-banner { height: 120px; }
      .profile-avatar { width: 72px; height: 72px; font-size: 1.75rem; }
      #feed { grid-template-columns: 1fr; }
      .global-player {
        bottom: 72px;
        width: calc(100% - 32px);
        border-radius: 20px;
      }
      body.player-active { padding-bottom: 160px; }
      /* Larger tap targets on mobile */
      .btn, .btn-outline { padding: 10px 20px; min-height: 44px; min-width: 44px; font-size: var(--text-lg); }
      .compose-actions { gap: 8px; }
      .reaction, .add-emoji-btn, .action-btn { min-width: 44px; min-height: 44px; }
      .add-emoji-btn { width: 44px; height: 44px; font-size: 1.125rem; }
      .reaction { padding: 6px 12px; font-size: var(--text-base); }
      .emoji-popover button { min-width: 44px; min-height: 44px; padding: 8px; font-size: 1.375rem; }
      .play-btn { width: 44px; height: 44px; }
      .tag-pill { padding: 8px 14px; height: 44px; font-size: var(--text-sm); display: inline-flex; align-items: center; box-sizing: border-box; }
      .emoji-popover { grid-template-columns: repeat(5, 1fr); }
    }

    .global-player {
      position: fixed;
      bottom: 16px;
      left: 50%;
      transform: translateX(-50%);
      width: calc(100% - 48px);
      max-width: 720px;
      background: var(--header-bg);
      backdrop-filter: blur(24px) saturate(1.3);
      border: 1px solid var(--border);
      border-radius: var(--radius-pill);
      z-index: 1000;
      display: none;
      align-items: center;
      gap: 12px;
      padding: 10px 20px;
      box-shadow: var(--shadow-pop);
    }
    .global-player.active { display: flex; }
    body.player-active { padding-bottom: 120px; }

    /* ─── landing page ─── */
    #landingPage { display: none; }
    body.landing .layout { display: none; }
    body.landing .mobile-nav { display: none; }
    body.landing .fab { display: none; }
    body.landing .global-player { display: none; }
    body.landing #landingPage { display: flex !important; }
    .global-player .close-player {
      background: transparent;
      border: none;
      color: var(--text-muted);
      cursor: pointer;
      padding: 8px;
      border-radius: 50%;
      flex-shrink: 0;
      transition: color 0.15s, background 0.15s;
    }
    .global-player .close-player:hover { color: var(--text); background: rgba(255,255,255,0.08); }
    .global-player .player-frame {
      flex: 1;
      min-width: 0;
    }
    .global-player .player-frame iframe {
      width: 100%;
      height: 80px;
      border: none;
      border-radius: 8px;
      display: block;
    .play-btn:hover { background: var(--accent-hover); transform: scale(1.05); }
    .play-btn:active { transform: scale(0.95); }
    .play-btn svg { width: 18px; height: 18px; margin-left: 2px; }
    .play-btn.playing { background: #00ba7c; }