/* ============================================================
   Chess Home — Instagram-style vertical feed.
   Two-column layout: left sidebar + centered feed.
   ============================================================ */

/* ---- 0. Page wrapper — two-column layout ---------------- */
.insta-page-wrapper {
  display: flex;
  justify-content: center;
  gap: 32px;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ---- 0a. Left sidebar ----------------------------------- */
.insta-sidebar {
  width: 280px;
  flex-shrink: 0;
  position: sticky;
  top: 80px;
  height: fit-content;
  max-height: calc(100vh - 100px);
  overflow-y: auto;
  padding-top: 24px;
}

.insta-sidebar::-webkit-scrollbar {
  width: 4px;
}

.insta-sidebar::-webkit-scrollbar-track {
  background: transparent;
}

.insta-sidebar::-webkit-scrollbar-thumb {
  background: #dbdbdb;
  border-radius: 2px;
}

.insta-sidebar .insta-pinned-card {
  margin-bottom: 16px;
}

.insta-sidebar .insta-pinned-card:last-child {
  margin-bottom: 0;
}

/* ---- 0b. Main content column ---------------------------- */
.insta-page {
  display: block;
  width: 100%;
  max-width: 600px;
  flex-shrink: 1;
  padding: 0;
}

/* ---- Responsive: stack on smaller screens --------------- */
@media (max-width: 900px) {
  .insta-page-wrapper {
    flex-direction: column;
    padding: 0 16px;
    gap: 16px;
  }

  .insta-sidebar {
    width: 100%;
    position: static;
    max-height: none;
    overflow-y: visible;
    padding-top: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
  }

  .insta-sidebar .insta-pinned-card {
    flex: 1 1 280px;
    margin-bottom: 0;
  }

  .insta-page {
    max-width: 100%;
  }
}

@media (max-width: 640px) {
  .insta-page-wrapper {
    padding: 0 8px;
  }

  .insta-sidebar {
    flex-direction: column;
  }

  .insta-sidebar .insta-pinned-card {
    flex: 1 1 100%;
  }
}

/* ---- 1. Feed container ---------------------------------- */
.insta-feed {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 16px;
}

/* ---- 2. Card base --------------------------------------- */
.insta-card {
  background: #fff;
  border: 1px solid #dbdbdb;
  border-radius: 8px;
  overflow: hidden;
}

/* ---- 3. Card header ------------------------------------- */
.insta-card-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
}

.insta-card-header .avatar {
  width: 32px;
  height: 32px;
  font-size: 12px;
  line-height: 32px;
  border-radius: 50%;
  flex-shrink: 0;
}

.insta-card-header .avatar-wrap {
  flex-shrink: 0;
}

.insta-card-header-info {
  flex: 1;
  min-width: 0;
}

.insta-card-username {
  font-weight: 600;
  font-size: 14px;
  color: #262626;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 6px;
}

.insta-card-username:hover {
  text-decoration: underline;
}

.insta-card-username .country-badge {
  font-size: 12px;
}

.insta-card-username .bot-pill {
  font-size: 10px;
  background: #e4e4e4;
  color: #666;
  padding: 1px 5px;
  border-radius: 3px;
  font-weight: 500;
}

.insta-card-username .playme-mini {
  font-size: 12px;
  background: none;
  border: none;
  cursor: pointer;
  opacity: 0.6;
  padding: 0;
}

.insta-card-username .playme-mini:hover {
  opacity: 1;
}

.insta-card-time {
  font-size: 12px;
  color: #8e8e8e;
}

.insta-card-menu {
  background: none;
  border: none;
  padding: 8px;
  cursor: pointer;
  color: #262626;
  font-size: 16px;
  line-height: 1;
  border-radius: 50%;
}

.insta-card-menu:hover {
  background: #f5f5f5;
}

/* ---- 4. Card content (image/video/board) ---------------- */
.insta-card-content {
  background: #fafafa;
  min-height: 100px;
}

.insta-card-content img,
.insta-card-content video {
  width: 100%;
  display: block;
  object-fit: cover;
}

.insta-card-content .post-media {
  margin: 0;
}

.insta-card-content .post-media-item {
  border-radius: 0;
}

.insta-card-content .post-media img {
  border-radius: 0;
}

.insta-card-content .post-media-video {
  margin: 0;
}

.insta-card-content .post-media-video video {
  border-radius: 0;
}

/* Multi-image grid within content */
.insta-card-content .post-media-2,
.insta-card-content .post-media-3,
.insta-card-content .post-media-many {
  display: grid;
  gap: 2px;
}

.insta-card-content .post-media-2 {
  grid-template-columns: 1fr 1fr;
}

.insta-card-content .post-media-3 {
  grid-template-columns: 1fr 1fr;
}

.insta-card-content .post-media-many {
  grid-template-columns: 1fr 1fr;
}

/* Game card in content area */
.insta-card-content .post-game {
  padding: 20px 16px;
  background: linear-gradient(135deg, #1a1512 0%, #2a2520 100%);
  color: #fff;
}

.insta-card-content .post-game-head {
  margin-bottom: 16px;
}

.insta-card-content .post-game-mark {
  font-size: 24px;
  margin-bottom: 8px;
  display: block;
}

.insta-card-content .post-game-players {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 8px;
}

.insta-card-content .pg-white {
  color: #fff;
}

.insta-card-content .pg-vs {
  color: #8e8e8e;
  margin: 0 8px;
  font-weight: 400;
}

.insta-card-content .pg-black {
  color: #ccc;
}

.insta-card-content .pg-result {
  margin-left: 12px;
  color: var(--forest, #2a5f3a);
  font-weight: 700;
}

.insta-card-content .post-game-meta {
  font-size: 13px;
  color: #8e8e8e;
}

.insta-card-content .post-game-actions {
  display: flex;
  gap: 8px;
}

.insta-card-content .post-game-actions .btn {
  flex: 1;
}

/* Event card in content area */
.insta-card-content .post-event {
  display: flex;
  padding: 20px 16px;
  gap: 16px;
  text-decoration: none;
  color: inherit;
  background: linear-gradient(135deg, #2a5f3a 0%, #3a7a4c 100%);
}

.insta-card-content .post-event:hover {
  background: linear-gradient(135deg, #3a7a4c 0%, #4a8a5c 100%);
}

.insta-card-content .event-date {
  background: #fff;
  border-radius: 8px;
  padding: 8px 12px;
  text-align: center;
  min-width: 50px;
}

.insta-card-content .event-date .m {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  color: #e74c3c;
}

.insta-card-content .event-date .d {
  font-size: 22px;
  font-weight: 700;
  color: #262626;
  line-height: 1.1;
}

.insta-card-content .post-event-body {
  flex: 1;
  color: #fff;
}

.insta-card-content .post-event-title {
  font-weight: 600;
  font-size: 16px;
  margin-bottom: 4px;
}

.insta-card-content .post-event-when {
  font-size: 13px;
  opacity: 0.9;
}

.insta-card-content .post-event-loc {
  font-size: 12px;
  opacity: 0.8;
  margin-top: 4px;
}

.insta-card-content .post-event-cta {
  align-self: center;
  background: rgba(255,255,255,0.2);
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  color: #fff;
}

/* Text-only content (no media) */
.insta-card-text-content {
  padding: 16px;
  background: #fff;
}

.insta-card-text-content .post-title {
  font-size: 18px;
  font-weight: 600;
  margin: 0 0 8px;
  color: #262626;
}

.insta-card-text-content .post-title a {
  color: inherit;
  text-decoration: none;
}

.insta-card-text-content .post-title a:hover {
  text-decoration: underline;
}

.insta-card-text-content .post-body {
  font-size: 14px;
  line-height: 1.5;
  color: #262626;
  margin: 0;
}

/* ---- 5. Action row -------------------------------------- */
.insta-card-actions {
  display: flex;
  align-items: center;
  padding: 8px 16px;
  gap: 16px;
}

.insta-card-actions .insta-action {
  background: none;
  border: none;
  padding: 8px 0;
  cursor: pointer;
  font-size: 24px;
  line-height: 1;
  color: #262626;
  display: flex;
  align-items: center;
  gap: 4px;
  text-decoration: none;
}

.insta-card-actions .insta-action:hover {
  opacity: 0.6;
}

.insta-card-actions .insta-action.on {
  color: #ed4956;
}

.insta-card-actions .insta-save {
  margin-left: auto;
}

/* Legacy like-btn styling within insta-card */
.insta-card .like-btn {
  background: none;
  border: none;
  padding: 8px 0;
  cursor: pointer;
  font-size: 24px;
  line-height: 1;
  color: #262626;
  display: flex;
  align-items: center;
  gap: 4px;
}

.insta-card .like-btn .like-icon {
  font-size: 24px;
}

.insta-card .like-btn .like-count-inline {
  display: none;
}

.insta-card .like-btn:hover {
  opacity: 0.6;
}

.insta-card .like-btn.on {
  color: #ed4956;
}

/* Comment toggle in action row */
.insta-card .comment-toggle {
  background: none;
  border: none;
  padding: 8px 0;
  cursor: pointer;
  font-size: 24px;
  line-height: 1;
  color: #262626;
}

.insta-card .comment-toggle .icon {
  font-size: 24px;
}

.insta-card .comment-toggle span:last-child {
  display: none;
}

.insta-card .comment-toggle:hover {
  opacity: 0.6;
}

/* ---- 6. Like count -------------------------------------- */
.insta-card-likes {
  padding: 0 16px 8px;
  font-size: 14px;
  font-weight: 600;
  color: #262626;
}

/* ---- 7. Caption ----------------------------------------- */
.insta-card-caption {
  padding: 0 16px 8px;
  font-size: 14px;
  line-height: 1.5;
  color: #262626;
}

.insta-card-caption .insta-caption-username {
  font-weight: 600;
  margin-right: 6px;
}

.insta-card-caption .post-body {
  display: inline;
  margin: 0;
}

/* ---- 8. Reaction row (chess pieces) --------------------- */
.insta-card .rx-row {
  padding: 8px 16px;
  border-top: 1px solid #efefef;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.insta-card .rx-row .rx-btn {
  font-size: 18px;
  background: #fafafa;
  border: 1px solid #efefef;
  border-radius: 20px;
  padding: 4px 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
}

.insta-card .rx-row .rx-btn:hover {
  background: #f0f0f0;
}

.insta-card .rx-row .rx-btn.is-mine {
  background: #fff3cd;
  border-color: #ffc107;
}

.insta-card .rx-row .rx-btn.is-zero .rx-count {
  display: none;
}

.insta-card .rx-row .rx-count {
  font-size: 12px;
  font-weight: 500;
  color: #666;
}

/* Reaction trigger wrap (contains button + picker) */
.insta-card .rx-trigger-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.insta-card .rx-trigger {
  background: transparent;
  border: none;
  padding: 4px 8px;
  font-size: 14px;
  cursor: pointer;
  opacity: 0.6;
  transition: opacity 0.15s;
}

.insta-card .rx-trigger:hover {
  opacity: 1;
}

/* Compact reaction picker (for comments) */
.insta-card .rx-row--compact {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: #fff;
  border: 1px solid #dbdbdb;
  border-radius: 24px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  padding: 8px 12px;
  z-index: 1000;
  display: none;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  gap: 2px;
  white-space: nowrap;
  width: max-content;
  min-width: 200px;
}

.insta-card .rx-row--compact.is-open {
  display: flex !important;
}

.insta-card .rx-row--compact .rx-btn {
  font-size: 20px;
  background: transparent;
  border: none;
  border-radius: 50%;
  padding: 6px;
  width: 36px;
  height: 36px;
  min-width: 36px;
  min-height: 36px;
  display: flex !important;
  flex-direction: row !important;
  align-items: center;
  justify-content: center;
  transition: transform 0.15s ease, background 0.15s ease;
}

.insta-card .rx-row--compact .rx-btn:hover {
  background: #f0f0f0;
  transform: scale(1.2);
}

.insta-card .rx-row--compact .rx-btn .rx-count {
  display: none !important;
}

.insta-card .rx-row--compact .rx-emoji {
  font-size: 20px;
  line-height: 1;
}

/* ---- 9. Comments preview -------------------------------- */
.insta-card-comments-preview {
  padding: 4px 16px 12px;
}

.insta-card-comments-link {
  display: block;
  font-size: 14px;
  color: #737373;
  text-decoration: none;
  cursor: pointer;
  margin-bottom: 8px;
  font-weight: 400;
}

.insta-card-comments-link:hover {
  color: #262626;
}

.insta-comment-preview {
  font-size: 14px;
  line-height: 1.4;
  margin-top: 6px;
  color: #262626;
  display: flex;
  align-items: flex-start;
  gap: 4px;
}

.insta-comment-preview .insta-comment-username {
  font-weight: 600;
  color: #262626;
  flex-shrink: 0;
}

.insta-comment-preview .insta-comment-username:hover {
  text-decoration: underline;
  cursor: pointer;
}

/* Full comments section */
.insta-card .comments {
  padding: 12px 16px 16px;
  border-top: 1px solid #efefef;
  margin-top: 4px;
}

.insta-card .comments.hidden {
  display: none;
}

.insta-card .comment-list {
  max-height: 320px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: #dbdbdb transparent;
}

.insta-card .comment-list::-webkit-scrollbar {
  width: 4px;
}

.insta-card .comment-list::-webkit-scrollbar-track {
  background: transparent;
}

.insta-card .comment-list::-webkit-scrollbar-thumb {
  background: #dbdbdb;
  border-radius: 2px;
}

.insta-card .comment-item {
  display: flex;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid #f5f5f5;
}

.insta-card .comment-item:last-child {
  border-bottom: none;
}

.insta-card .comment-item .avatar {
  width: 32px;
  height: 32px;
  font-size: 11px;
  flex-shrink: 0;
  border-radius: 50%;
}

.insta-card .comment-bubble {
  flex: 1;
  min-width: 0;
}

.insta-card .comment-head {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 4px;
}

.insta-card .comment-head .who {
  font-weight: 600;
  font-size: 13px;
  color: #262626;
}

.insta-card .comment-head .who:hover {
  text-decoration: underline;
  cursor: pointer;
}

.insta-card .comment-head .when {
  font-size: 12px;
  color: #8e8e8e;
}

.insta-card .comment-bubble > div:last-child {
  font-size: 14px;
  line-height: 1.4;
  color: #262626;
  word-wrap: break-word;
}

.insta-card .comment-form {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-top: 14px;
  margin-top: 8px;
  border-top: 1px solid #efefef;
}

.insta-card .comment-form input {
  flex: 1;
  border: none;
  background: none;
  font-size: 14px;
  outline: none;
  padding: 8px 0;
  color: #262626;
}

.insta-card .comment-form input::placeholder {
  color: #8e8e8e;
}

.insta-card .comment-form button {
  background: none;
  border: none;
  color: #0095f6;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  padding: 8px 4px;
  transition: opacity 0.2s;
}

.insta-card .comment-form button:hover {
  color: #00376b;
}

.insta-card .comment-form button:disabled {
  opacity: 0.3;
  cursor: default;
}

/* ---- 10. Timestamp -------------------------------------- */
.insta-card-timestamp {
  padding: 0 16px 8px;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.2px;
  color: #8e8e8e;
}

/* ---- 10b. Inline comment input -------------------------- */
.insta-card-add-comment {
  padding: 12px 16px;
  border-top: 1px solid #efefef;
}

.insta-inline-comment-form {
  display: flex;
  align-items: center;
  gap: 12px;
}

.insta-inline-comment-form input {
  flex: 1;
  border: none;
  background: none;
  font-size: 14px;
  outline: none;
  padding: 4px 0;
  color: #262626;
}

.insta-inline-comment-form input::placeholder {
  color: #8e8e8e;
}

.insta-inline-comment-form button {
  background: none;
  border: none;
  color: #0095f6;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  padding: 4px;
  opacity: 0.5;
  transition: opacity 0.2s;
}

.insta-inline-comment-form button:hover {
  opacity: 1;
}

.insta-inline-comment-form.has-text button {
  opacity: 1;
}

.insta-inline-comment-form button:disabled {
  opacity: 0.3;
  cursor: default;
}

/* Comment preview text styling */
.insta-comment-preview .insta-comment-text {
  color: #262626;
  word-wrap: break-word;
}

/* ---- 11. Pinned cards (Puzzle, Events, Discover) -------- */
.insta-pinned-card {
  background: #fff;
  border: 1px solid #dbdbdb;
  border-radius: 8px;
  overflow: hidden;
}

.insta-pinned-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid #efefef;
}

.insta-pinned-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
}

.insta-pinned-icon.puzzle {
  background: #1a1512;
  color: #fff;
}

.insta-pinned-icon.events {
  background: #2a5f3a;
  color: #fff;
}

.insta-pinned-icon.discover {
  background: #b45a2b;
  color: #fff;
}

.insta-pinned-title {
  font-weight: 600;
  font-size: 14px;
  color: #262626;
}

.insta-pinned-body {
  padding: 16px;
}

.insta-pinned-body p {
  font-size: 14px;
  color: #262626;
  margin: 0 0 12px;
}

.insta-pinned-body .pinned-meta {
  font-size: 13px;
  color: #8e8e8e;
}

.insta-pinned-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.insta-pinned-list li {
  padding: 10px 0;
  border-top: 1px solid #efefef;
}

.insta-pinned-list li:first-child {
  border-top: none;
  padding-top: 0;
}

.insta-pinned-list a {
  display: block;
  text-decoration: none;
  color: #262626;
}

.insta-pinned-list a:hover {
  color: #0095f6;
}

.insta-pinned-list strong {
  font-weight: 600;
  font-size: 14px;
  display: block;
  margin-bottom: 2px;
}

.insta-pinned-list .meta {
  font-size: 12px;
  color: #8e8e8e;
}

.insta-pinned-footer {
  padding: 12px 16px;
  border-top: 1px solid #efefef;
}

.insta-pinned-footer a {
  font-size: 13px;
  font-weight: 600;
  color: #0095f6;
  text-decoration: none;
}

.insta-pinned-footer a:hover {
  text-decoration: underline;
}

/* ---- 12. Composer --------------------------------------- */
.insta-composer {
  background: #fff;
  border: 1px solid #dbdbdb;
  border-radius: 8px;
  margin-bottom: 8px;
}

.insta-composer .li-composer {
  border: 0;
  background: transparent;
  box-shadow: none;
  padding: 12px 16px;
}

/* ---- 13. Masthead (simplified) -------------------------- */
.insta-page .zine-masthead {
  text-align: center;
  padding: 24px 0;
  border-bottom: 1px solid #dbdbdb;
  margin-bottom: 16px;
}

.insta-page .zine-masthead-title {
  font-size: 24px;
  margin: 8px 0;
}

.insta-page .zine-masthead-sub {
  font-size: 14px;
  color: #8e8e8e;
  margin: 0;
}

.insta-page .zine-eyebrow-row {
  display: none;
}

.insta-page .zine-masthead-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 16px;
}

.insta-page .zine-masthead-nav a {
  font-size: 13px;
  padding: 6px 12px;
  background: #fafafa;
  border: 1px solid #dbdbdb;
  border-radius: 20px;
  text-decoration: none;
  color: #262626;
  display: flex;
  align-items: center;
  gap: 6px;
}

.insta-page .zine-masthead-nav a:hover {
  background: #f0f0f0;
}

.insta-page .zine-masthead-nav .glyph {
  font-size: 14px;
}

.insta-page .zine-masthead-nav .n {
  font-size: 11px;
  color: #8e8e8e;
}

/* ---- 14. Onboarding nudge ------------------------------- */
.insta-page .ob-nudge {
  display: flex;
  gap: 12px;
  padding: 16px;
  background: #fff;
  border: 1px solid #dbdbdb;
  border-radius: 8px;
  margin-bottom: 16px;
  text-decoration: none;
  color: inherit;
}

.insta-page .ob-nudge:hover {
  background: #fafafa;
}

.insta-page .ob-nudge-icon {
  font-size: 24px;
}

.insta-page .ob-nudge-title {
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 4px;
}

.insta-page .ob-nudge-sub {
  font-size: 13px;
  color: #8e8e8e;
}

.insta-page .ob-nudge-cta {
  align-self: center;
  color: #0095f6;
  font-weight: 600;
  font-size: 14px;
}

/* ---- 15. Empty state ------------------------------------ */
.insta-empty {
  text-align: center;
  padding: 48px 24px;
  background: #fff;
  border: 1px solid #dbdbdb;
  border-radius: 8px;
}

.insta-empty h2 {
  font-size: 20px;
  font-weight: 600;
  margin: 16px 0 8px;
  color: #262626;
}

.insta-empty p {
  font-size: 14px;
  color: #8e8e8e;
  margin: 0 0 16px;
}

.insta-empty .btn {
  display: inline-block;
  padding: 8px 16px;
  background: #0095f6;
  color: #fff;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
}

.insta-empty .btn:hover {
  background: #0086e0;
}

.insta-empty .piece {
  font-size: 64px;
  color: #dbdbdb;
}

/* ---- 16. Override bento styles when insta is active ----- */
.insta-page .bento-feed,
.insta-page .bento-tile,
.insta-page .bento-ribbon,
.insta-page .bento-byline {
  display: none !important;
}

/* Hide post-head inside insta-card (we have our own header) */
.insta-card .post-card > .post-head {
  display: none;
}

/* Hide post-stats (we show likes separately) */
.insta-card .post-stats {
  display: none;
}

/* Hide post-actions (we have our own action row) */
.insta-card .post-card > .post-actions {
  display: none;
}

/* Double-tap heart animation */
.double-tap-heart {
  position: fixed;
  font-size: 80px;
  transform: translate(-50%, -50%) scale(0);
  pointer-events: none;
  z-index: 9999;
  animation: double-tap-heart 0.8s ease-out forwards;
}

@keyframes double-tap-heart {
  0% {
    transform: translate(-50%, -50%) scale(0);
    opacity: 1;
  }
  15% {
    transform: translate(-50%, -50%) scale(1.2);
  }
  30% {
    transform: translate(-50%, -50%) scale(1);
  }
  80% {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
  }
  100% {
    transform: translate(-50%, -50%) scale(1.4);
    opacity: 0;
  }
}

/* Like button pop animation */
.insta-card .like-btn.pop .like-icon {
  animation: like-pop 0.4s ease-out;
}

@keyframes like-pop {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.3);
  }
  100% {
    transform: scale(1);
  }
}

/* ============================================================
   CLUB PAGE STYLES — Instagram-style
   ============================================================ */

/* ---- Club sidebar specific styles ----------------------- */
.insta-sidebar-club .insta-pinned-icon.members {
  background: #8b5cf6;
  color: #fff;
}

.insta-sidebar-club .insta-pinned-icon.voice {
  background: #ef4444;
  color: #fff;
}

.insta-sidebar-club .insta-pinned-icon.rooms {
  background: #1a1512;
  color: #fff;
}

/* Member grid in sidebar */
.insta-member-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.insta-member-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  color: #262626;
}

.insta-member-tile:hover {
  opacity: 0.8;
}

.insta-member-tile .avatar {
  width: 40px;
  height: 40px;
  font-size: 14px;
  margin-bottom: 4px;
}

.insta-member-name {
  font-size: 11px;
  text-align: center;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 60px;
}

/* Room form in sidebar */
.insta-room-form {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid #efefef;
}

.insta-room-form input {
  flex: 1;
  border: 1px solid #dbdbdb;
  border-radius: 6px;
  padding: 6px 10px;
  font-size: 13px;
  outline: none;
}

.insta-room-form input:focus {
  border-color: #0095f6;
}

.insta-room-form .btn {
  font-size: 12px;
  padding: 6px 12px;
}

/* ---- Club header card ----------------------------------- */
.insta-club-header {
  background: #fff;
  border: 1px solid #dbdbdb;
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 16px;
}

.insta-club-header-top {
  display: flex;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid #efefef;
  background: #fafafa;
}

.insta-club-eyebrow {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #8e8e8e;
  font-weight: 500;
}

.insta-club-hero {
  display: flex;
  gap: 20px;
  padding: 20px;
}

.insta-club-logo {
  flex-shrink: 0;
}

.insta-club-logo img {
  width: 80px;
  height: 80px;
  border-radius: 12px;
  object-fit: cover;
}

.insta-club-logo-fallback {
  width: 80px;
  height: 80px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  font-weight: 700;
  color: #fff;
}

.insta-club-info {
  flex: 1;
  min-width: 0;
}

.insta-club-name {
  font-size: 24px;
  font-weight: 700;
  color: #262626;
  margin: 0 0 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.insta-club-flag {
  font-size: 20px;
}

.insta-club-desc {
  font-size: 14px;
  color: #262626;
  margin: 0 0 12px;
  line-height: 1.4;
}

.insta-club-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: #8e8e8e;
  margin-bottom: 16px;
}

.insta-club-meta a {
  color: #0095f6;
  text-decoration: none;
}

.insta-club-meta a:hover {
  text-decoration: underline;
}

.insta-club-meta .dot {
  color: #dbdbdb;
}

.insta-club-chip {
  background: #efefef;
  color: #262626;
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 500;
}

.insta-club-meta .online-dot {
  width: 8px;
  height: 8px;
  background: #22c55e;
  border-radius: 50%;
  display: inline-block;
  margin-right: 4px;
}

/* Club action buttons */
.insta-club-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.insta-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  border: none;
  transition: background 0.15s, opacity 0.15s;
}

.insta-btn-primary {
  background: #0095f6;
  color: #fff;
}

.insta-btn-primary:hover {
  background: #0086e0;
}

.insta-btn-joined {
  background: #efefef;
  color: #262626;
  cursor: default;
}

.insta-btn-ghost {
  background: transparent;
  color: #262626;
  border: 1px solid #dbdbdb;
}

.insta-btn-ghost:hover {
  background: #fafafa;
}

/* Club navigation tabs */
.insta-club-nav {
  display: flex;
  justify-content: center;
  gap: 8px;
  padding: 12px 16px;
  border-top: 1px solid #efefef;
  background: #fafafa;
}

.insta-club-nav a {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 500;
  color: #262626;
  text-decoration: none;
  background: #fff;
  border: 1px solid #dbdbdb;
  transition: background 0.15s, border-color 0.15s;
}

.insta-club-nav a:hover {
  background: #f0f0f0;
  border-color: #c0c0c0;
}

.insta-club-nav .glyph {
  font-size: 14px;
}

.insta-club-nav .n {
  font-size: 12px;
  color: #8e8e8e;
  font-weight: 400;
}

/* Responsive club header */
@media (max-width: 640px) {
  .insta-club-hero {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .insta-club-name {
    justify-content: center;
  }

  .insta-club-meta {
    justify-content: center;
  }

  .insta-club-actions {
    justify-content: center;
  }

  .insta-club-nav {
    flex-wrap: wrap;
  }

  .insta-member-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* Hide legacy sections when using insta layout */
.insta-page-wrapper .zine-hide,
.insta-page-wrapper .group-head-card {
  display: none !important;
}

/* Voice channel list in sidebar */
.insta-vc-list {
  padding: 0;
  margin: 0;
  list-style: none;
}

.insta-vc-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
  border-top: 1px solid #efefef;
}

.insta-vc-item:first-child {
  border-top: none;
  padding-top: 0;
}

.insta-vc-info {
  flex: 1;
  min-width: 0;
}

.insta-vc-info strong {
  display: block;
  font-size: 14px;
  font-weight: 600;
}

.insta-vc-info .meta {
  font-size: 12px;
  color: #8e8e8e;
}

.insta-vc-join {
  flex-shrink: 0;
  background: #0095f6;
  color: #fff;
  border: none;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.insta-vc-join:hover {
  background: #0086e0;
}
