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

    :root { --yellow: #FFE600; }

    body {
      font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
      background: #000;
      color: #111;
      min-height: 100vh;
    }

    /* ── TOPBAR ── */
    .topbar {
      position: sticky; top: 0; z-index: 100;
      background: #fff;
      border-bottom: 1px solid #e5e5e5;
      display: flex; justify-content: center;
    }
    .topbar-inner {
      width: 100%; max-width: 1130px; padding: 0 24px;
      height: 60px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px;
    }
    .logo-img {
      height: 32px; width: auto; display: block; flex-shrink: 0;
    }
    .search-wrap {
      position: relative; width: 500px; max-width: 100%;
    }
    .search-wrap input {
      width: 100%; padding: 9px 40px 9px 16px;
      border: 1.5px solid #e5e5e5; border-radius: 40px;
      font-size: 14px; font-family: inherit; outline: none;
      background: #fafafa; transition: border-color 0.15s;
    }
    .search-wrap input:focus { border-color: #111; background: #fff; }
    .search-icon {
      position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
      color: #888; pointer-events: none; display: flex;
    }
    .topbar-right {
      display: flex; align-items: center; gap: 12px; justify-content: flex-end;
    }
    .hamburger-btn {
      background: none; border: none; cursor: pointer;
      color: #111; display: flex; padding: 4px;
    }
    .user-av {
      width: 34px; height: 34px; border-radius: 50%;
      background: var(--yellow); flex-shrink: 0;
    }
    .user-av-wrap {
      position: relative; flex-shrink: 0; width: 34px; height: 34px;
    }
    .bell-badge {
      position: absolute; top: -5px; right: -5px;
      width: 18px; height: 18px;
      display: flex; align-items: center; justify-content: center;
      pointer-events: none;
      transform-origin: 50% 0%;
      animation: bell-idle 6s ease-in-out infinite;
    }
    .bell-badge img { width: 100%; height: 100%; display: block; }

    .bell-badge { cursor: pointer; pointer-events: auto; background: none; border: none; padding: 0; }

    /* ── WELCOME MODAL ── */
    /* ── LIGHTBOX ── */
    .lightbox {
      display: none;
      position: fixed; inset: 0; z-index: 300;
      background: rgba(0,0,0,0.92);
      align-items: center; justify-content: center;
    }
    .lightbox.open { display: flex; }
    .lightbox img {
      max-width: 92vw; max-height: 92vh;
      object-fit: contain;
      border-radius: 8px;
      box-shadow: 0 8px 40px rgba(0,0,0,0.6);
    }
    .lightbox-close {
      position: fixed; top: 18px; right: 22px;
      background: none; border: none; color: #fff;
      font-size: 32px; line-height: 1; cursor: pointer;
      opacity: 0.8;
    }
    .lightbox-close:hover { opacity: 1; }
    .lightbox-prev, .lightbox-next {
      position: fixed; top: 50%; transform: translateY(-50%);
      background: rgba(255,255,255,0.12); border: none; color: #fff;
      font-size: 28px; padding: 14px 18px; cursor: pointer;
      border-radius: 6px; line-height: 1;
    }
    .lightbox-prev { left: 12px; }
    .lightbox-next { right: 12px; }
    .lightbox-prev:hover, .lightbox-next:hover { background: rgba(255,255,255,0.25); }
    .lightbox-prev.hidden, .lightbox-next.hidden { display: none; }
    .post-media img, .post-gallery img { cursor: zoom-in; }

    .welcome-overlay {
      display: none;
      position: fixed; inset: 0; z-index: 200;
      background: rgba(0,0,0,0.55);
      align-items: center; justify-content: center;
      padding: 20px;
    }
    .welcome-overlay.open { display: flex; }
    .welcome-box {
      background: var(--yellow);
      border: 2.5px solid #111;
      border-radius: 20px;
      box-shadow: 5px 5px 0 0 #111;
      padding: 32px 28px 28px;
      max-width: 480px; width: 100%;
      position: relative;
      font-size: 15px; line-height: 1.7; color: #111;
    }
    .welcome-close {
      position: absolute; top: 14px; right: 16px;
      background: none; border: none; cursor: pointer;
      font-size: 22px; line-height: 1; color: #111; padding: 2px 6px;
    }
    .welcome-close:hover { opacity: 0.6; }
    .welcome-box p { margin: 0; }
    .welcome-box a { color: #111; font-weight: 700; }

    @keyframes bell-idle {
      0%   { transform: rotate(0deg); }
      /* pause */
      70%  { transform: rotate(0deg); }
      /* ring sequence */
      72%  { transform: rotate(18deg); }
      74%  { transform: rotate(-18deg); }
      76%  { transform: rotate(14deg); }
      78%  { transform: rotate(-14deg); }
      80%  { transform: rotate(9deg); }
      82%  { transform: rotate(-9deg); }
      84%  { transform: rotate(4deg); }
      86%  { transform: rotate(0deg); }
      100% { transform: rotate(0deg); }
    }

    /* ── TOPBAR MOBILE ── */
    @media (max-width: 600px) {
      .topbar { flex-direction: column; }
      .topbar-inner {
        display: flex; flex-wrap: wrap;
        height: auto; padding: 12px 16px 0;
        align-items: center; gap: 0;
      }
      .topbar-logo { flex: 1; }
      .logo-img { height: 28px; }
      .topbar-right { gap: 8px; }
      .search-wrap {
        width: 100%; order: 3;
        padding: 10px 0 12px;
      }
    }

    /* ── FEED ── */
    #feed { max-width: 530px; margin: 0 auto; padding-bottom: 80px; }

    /* ── POST ── */
    .post {
      background: #fff;
      border-bottom: 1px solid #e5e5e5;
      padding: 18px 20px 12px;
    }
    /* ── POST HEADER ── */
    .post-header {
      display: flex; align-items: center; gap: 10px; margin-bottom: 12px;
    }
    .av {
      width: 44px; height: 44px; border-radius: 50%;
      background: var(--yellow);
      display: flex; align-items: center; justify-content: center;
      font-weight: 800; font-size: 14px; color: #111;
      user-select: none; flex-shrink: 0;
    }
    .post-meta {
      display: flex; flex-direction: column; gap: 1px; flex: 1; min-width: 0;
    }
    .post-meta-top {
      display: flex; align-items: center; gap: 4px;
    }
    .post-meta-sub {
      display: flex; align-items: center; gap: 4px;
    }
    .post-name { font-weight: 700; font-size: 15px; color: #111; }
    .post-badge {
      display: inline-flex; align-items: center; justify-content: center;
      width: 17px; height: 17px; background: #111; border-radius: 50%;
      color: white; font-size: 10px; font-weight: 900; flex-shrink: 0;
    }
    .post-handle, .post-sep, .post-time { color: #888; font-size: 13px; }
    .post-badges {
      margin-left: auto; flex-shrink: 0;
      display: flex; align-items: center; gap: 6px;
    }
    .post-points {
      background: #111; color: #fff;
      font-size: 13px; font-weight: 700;
      padding: 5px 13px; border-radius: 20px;
      white-space: nowrap;
    }
    .post-quest {
      background: var(--yellow); color: #111;
      border: 1px solid #111;
      font-size: 13px; font-weight: 700;
      padding: 5px 13px; border-radius: 20px;
      white-space: nowrap;
    }
    .post-question-wrap {
      position: relative; flex-shrink: 0;
    }
    .post-question-btn {
      display: flex; align-items: center; justify-content: center;
      background: none; border: none; cursor: pointer; padding: 0;
      width: 34px; height: 34px;
      touch-action: manipulation; -webkit-tap-highlight-color: transparent;
    }
    .post-question-btn img { width: 34px; height: 34px; display: block; pointer-events: none; }
    .post-question-tooltip {
      display: none;
      position: absolute; top: calc(100% + 10px); right: 0;
      background: var(--yellow); border: 2px solid #111;
      border-radius: 14px; padding: 20px 22px;
      width: 280px; z-index: 10;
      font-size: 15px; line-height: 1.6; color: #111;
      box-shadow: 3px 3px 0 0 #111;
    }
    @media (hover: hover) {
      .post-question-wrap:hover .post-question-tooltip { display: block; }
    }
    .post-question-wrap.open .post-question-tooltip { display: block; }

    .post-text {
      font-size: 15px; line-height: 1.6; margin-bottom: 14px;
      color: #111; white-space: pre-wrap; word-break: break-word;
    }

    /* ── MEDIA ── */
    .post-media {
      border-radius: 12px; overflow: hidden;
      border: 1px solid #e5e5e5; margin-bottom: 14px;
    }
    .post-media img {
      width: 100%; display: block; max-height: 420px;
      object-fit: cover;
    }
    .post-media.full img {
      max-height: none;
      object-fit: contain;
    }
    .post-gallery {
      display: grid; grid-template-columns: 1fr 1fr; gap: 2px;
    }
    .post-gallery img {
      max-height: 300px;
    }
    .post-video-wrap {
      border-radius: 12px; overflow: hidden;
      border: 1px solid #e5e5e5; margin-bottom: 14px;
      position: relative; aspect-ratio: 16 / 9;
      background: #111; cursor: pointer;
    }
    .post-video-wrap img {
      width: 100%; height: 100%; object-fit: cover; display: block;
      opacity: 0.75; transition: opacity 0.2s;
    }
    .post-video-wrap:hover img { opacity: 0.6; }
    .post-video-wrap iframe {
      width: 100%; height: 100%; border: none; display: block;
    }
    /* ── Native video player ── */
    .post-native-video {
      position: relative; margin-bottom: 14px;
      background: #000; border-radius: 12px; overflow: hidden;
      cursor: pointer;
      max-width: 320px; margin-left: auto; margin-right: auto;
      aspect-ratio: 9 / 16;
    }
    .post-native-video.wide {
      max-width: 100%; margin-left: 0; margin-right: 0;
      aspect-ratio: 16 / 9;
    }
    .post-native-video video {
      width: 100%; height: 100%; display: block; object-fit: cover;
      position: absolute; inset: 0;
    }
    .video-overlay {
      position: absolute; inset: 0;
      display: flex; align-items: center; justify-content: center;
      background: rgba(0,0,0,0.25); transition: background 0.2s;
    }
    .video-overlay.hidden { display: none; }
    .video-play-icon {
      width: 64px; height: 64px; border-radius: 50%;
      background: rgba(0,0,0,0.6);
      display: flex; align-items: center; justify-content: center;
    }
    .video-play-icon svg { margin-left: 5px; }
    .video-mute-btn {
      position: absolute; bottom: 12px; right: 12px;
      background: rgba(0,0,0,0.55); border: none; border-radius: 50%;
      width: 36px; height: 36px; cursor: pointer; color: #fff;
      display: none; align-items: center; justify-content: center;
      font-size: 16px; transition: background 0.15s;
    }
    .video-mute-btn.visible { display: flex; }
    .video-mute-btn:hover { background: rgba(0,0,0,0.8); }
    .video-expand-btn {
      position: absolute; top: 10px; right: 10px;
      background: rgba(0,0,0,0.55); border: none; border-radius: 50%;
      width: 34px; height: 34px; cursor: pointer; color: #fff;
      display: flex; align-items: center; justify-content: center;
      font-size: 15px; transition: background 0.15s; z-index: 5;
    }
    .video-expand-btn:hover { background: rgba(0,0,0,0.85); }
    /* Lightbox video */
    .lightbox video {
      max-width: 92vw; max-height: 92vh;
      border-radius: 8px;
      box-shadow: 0 8px 40px rgba(0,0,0,0.6);
      outline: none;
    }
    .play-btn {
      position: absolute; top: 50%; left: 50%;
      transform: translate(-50%, -50%);
      width: 56px; height: 56px; border-radius: 50%;
      background: rgba(0,0,0,0.6);
      display: flex; align-items: center; justify-content: center;
      pointer-events: none; transition: background 0.2s;
    }
    .post-video-wrap:hover .play-btn { background: rgba(0,0,0,0.8); }
    .play-arrow {
      width: 0; height: 0;
      border-top: 11px solid transparent;
      border-bottom: 11px solid transparent;
      border-left: 19px solid white;
      margin-left: 5px;
    }

    /* ── ACTION BAR ── */
    .post-actions {
      display: flex; gap: 0; margin-top: 4px;
      border-top: 1px solid #f0f0f0; padding-top: 10px;
    }
    .act {
      display: inline-flex; align-items: center; gap: 6px;
      padding: 6px 12px; border: none; background: none; border-radius: 20px;
      cursor: pointer; font-size: 14px; color: #555;
      transition: background 0.15s, color 0.15s;
      font-family: inherit;
    }
    .act:hover { background: #f0f0f0; }
    .act.on { color: #111; }
    .act-icon { width: 20px; height: 20px; display: flex; align-items: center; }
    .act-icon img { width: 20px; height: 20px; }
    .act-count { font-size: 14px; }

    /* ── COMMENTS ── */
    .comments-wrap {
      display: none; margin-top: 14px;
      border-top: 1px solid #f0f0f0; padding-top: 14px;
    }
    .comments-wrap.open { display: block; }

    .new-comment-row {
      display: flex; gap: 10px; margin-bottom: 16px; align-items: center;
    }
    .my-av {
      width: 34px; height: 34px; border-radius: 50%;
      background: var(--yellow);
      display: flex; align-items: center;
      justify-content: center; font-size: 11px; font-weight: 800;
      color: #111; flex-shrink: 0;
    }
    .comment-input-row {
      flex: 1; display: flex; align-items: center;
      border: 1.5px solid #e5e5e5; border-radius: 40px;
      background: #fafafa; transition: border-color 0.15s;
      padding: 0 4px 0 14px;
    }
    .comment-input-row:focus-within { border-color: #111; background: #fff; }
    .comment-input {
      flex: 1; border: none; background: none; outline: none;
      font-size: 14px; font-family: inherit;
      padding: 9px 0; resize: none; line-height: 1.4;
    }
    .comment-send {
      background: none; border: none; cursor: pointer;
      color: #888; padding: 6px; display: flex; align-items: center;
      transition: color 0.15s; border-radius: 50%;
    }
    .comment-send:hover { color: #111; }

    .comment-list { display: flex; flex-direction: column; gap: 14px; }
    .comment-item { display: flex; gap: 10px; }
    .c-av {
      width: 32px; height: 32px; border-radius: 50%;
      background: var(--yellow);
      display: flex; align-items: center; justify-content: center;
      font-size: 11px; font-weight: 800; color: #111; flex-shrink: 0;
    }
    .c-bubble {
      background: #f5f5f5; border-radius: 14px; padding: 8px 13px; flex: 1;
    }
    .c-name { font-weight: 700; font-size: 13px; margin-bottom: 2px; }
    .c-text { font-size: 14px; line-height: 1.45; color: #333; }
    .c-photo { margin-top: 8px; border-radius: 10px; overflow: hidden; }
    .c-photo img { display: block; max-width: 100%; max-height: 300px; }

    .load-more {
      text-align: center; padding: 12px 0 0;
      font-size: 14px; color: #888; cursor: pointer;
    }
    .load-more:hover { color: #111; }


    /* ── RESPONSIVE ── */
    @media (max-width: 520px) {
      .post { padding: 14px 14px 10px; }
      .act { padding: 5px 8px; font-size: 13px; }
      .post-handle, .post-sep { display: none; }
    }
