/* [me-page] Party list styles for the Me page (me.html): section headers,
   list grid, empty states, party cards, card overflow menu and the party
   playlist sheet. Copied from instant.html's inline styles. */

  /* ---------- YOUR PARTIES ---------- */
  .section-hdr { width:100%; display:flex; align-items:center; gap:10px; margin:34px 0 13px; }
  .section-hdr h2 { font-size:17px; line-height:1; font-weight:800; letter-spacing:-.02em; }
  .section-hdr::after { content:""; flex:1; height:1px; background:linear-gradient(90deg, rgba(var(--tr-9175ff,145,117,255),.25), transparent); }
  .section-hdr span { display:inline-flex; min-width:24px; height:23px; padding:0 8px; align-items:center; justify-content:center; border-radius:999px; color:var(--tc-dcd6ff,#dcd6ff); font:800 10px JetBrains Mono,monospace; background:rgba(var(--tr-7355ff,115,85,255),.13); border:1px solid rgba(var(--tr-8971ff,137,113,255),.2); }
  .party-list {
    width:100%; display:grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap:16px;
  }
  /* Row-divider headers (e.g. "Shared With You") that
     loadJoinedPartiesMine() injects as direct children of .party-list --
     span the full grid row instead of landing in a single cell, same
     pattern as watch.html's .vs-grid-wide .vs-section-hdr. */
  .party-list .vs-section-hdr { grid-column: 1 / -1; }
  /* .wrap uses align-items:center, so a flex-item div with no width
     of its own shrinks to its content's width instead of filling
     .wrap -- .party-tabs/.party-tab-panel never had a width rule
     (only their children were styled), so they were landing far
     narrower than .wrap and starving .party-list's grid of room
     for more than one column. Explicit width:100% here, without
     touching .wrap's own align-items (likely centering other
     children, e.g. the Create Party button, on purpose). */
  .party-tabs, .party-tab-panel { width:100%; }
  .party-card {
    width:100%; display:flex; align-items:center; gap:14px; min-width:0;
    padding:14px; border-radius:17px;
    background:linear-gradient(145deg, rgba(var(--tr-13122b,19,18,43),.78), rgba(var(--tr-0a0a19,10,10,25),.72));
    border:1px solid rgba(var(--tr-977eff,151,126,255),.14);
    box-shadow:inset 0 1px 0 rgba(var(--theme-overlay-rgb,255,255,255),.045), 0 10px 30px rgba(0,0,0,.18);
    transition:transform .2s, border-color .2s, background .2s;
  }
  .party-card:hover { transform:translateY(-2px); border-color:rgba(var(--tr-5cceff,92,206,255),.28); background:linear-gradient(145deg, rgba(var(--tr-191738,25,23,56),.84), rgba(var(--tr-0b0b1c,11,11,28),.78)); }
  .party-card .info { flex:1; min-width:0; }
  .party-card .name { font-size:14px; font-weight:800; color:#f4f2ff; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; margin-bottom:4px; }
  .party-card .meta { color:var(--tc-8f8ba4,#8f8ba4); font-size:10.5px; }
  .instant-playlist-card-badge { color:var(--tc-b9a8ff,#b9a8ff); font-weight:700; letter-spacing:.1px; white-space:nowrap; }
  .party-card .url { margin-top:5px; color:var(--tc-67637b,#67637b); font:10px JetBrains Mono,monospace; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
  .party-card .actions { display:flex; align-items:center; gap:6px; flex-shrink:0; }
  .party-card .join-btn { display:inline-flex; align-items:center; justify-content:center; padding:9px 13px; border-radius:11px; color:#fff; text-decoration:none; font-size:11px; font-weight:800; background:linear-gradient(135deg,var(--tc-6354ff,#6354ff),var(--tc-3e9cff,#3e9cff)); box-shadow:0 7px 20px rgba(var(--tr-4a4eff,74,78,255),.22); }
  .party-card .icon-btn { width:34px; height:34px; display:grid; place-items:center; padding:0; border-radius:10px; color:var(--tc-9d99b2,#9d99b2); background:rgba(var(--theme-overlay-rgb,255,255,255),.035); border:1px solid rgba(var(--theme-overlay-rgb,255,255,255),.07); cursor:pointer; transition:.18s; }
  .party-card .icon-btn:hover { color:#fff; background:rgba(var(--tr-7057ff,112,87,255),.15); border-color:rgba(var(--tr-8670ff,134,112,255),.24); }
  .party-card .icon-btn.delete-btn:hover { color:var(--tc-ff86bb,#ff86bb); background:rgba(var(--tr-ff428d,255,66,141),.08); border-color:rgba(var(--tr-ff569b,255,86,155),.2); }
  .empty-state { padding:28px 15px; text-align:center; color:var(--tc-747087,#747087); font-size:12px; border:1px dashed rgba(var(--tr-8d76ff,141,118,255),.13); border-radius:16px; background:rgba(var(--tr-0c0b1d,12,11,29),.34); }
  /* [empty-states] a next step under each empty list */
  .empty-state .es-go { display:inline-block; margin-top:12px; padding:8px 16px; border:0; border-radius:999px; cursor:pointer; font:inherit; font-size:12.5px; font-weight:800;
    background:var(--theme-accent,#8b5cf6); color:#fff; text-decoration:none; }
  .empty-state .es-go:focus-visible { outline:2px solid #fff; outline-offset:2px; }
  /* same look as the header's Sign in button */
  .empty-state .es-signin { display:inline-flex; align-items:center; gap:8px; height:32px; margin-top:12px; padding:0 14px; border-radius:999px; cursor:pointer;
    background:#fff; color:#3c4043; border:1px solid #dadce0; white-space:nowrap; font:500 13px Roboto, Manrope, -apple-system, "Segoe UI", sans-serif; color-scheme:light; }
  .empty-state .es-signin:focus-visible { outline:2px solid var(--theme-accent-light,#a78bfa); outline-offset:2px; }


@media (max-width: 760px) {
  .section-hdr { margin-top:27px; }
}

.vs-card-pill-shared {
      background: rgba(var(--tr-7c3aed,124,58,237),.16) !important; color: var(--tc-c4b5fd,#c4b5fd) !important;
      border-color: rgba(var(--tr-7c3aed,124,58,237),.35) !important;
    }

/* ============================================================
   INSTANT PARTY CARD — COMPACT ACTION MENU
   Matches the Watch/Public party-card overflow menu.
   ============================================================ */
.instant-party-more-wrap{position:relative;flex:0 0 auto}
.instant-party-overflow-menu{
  position:absolute;
  bottom:calc(100% + 6px);
  right:0;
  min-width:180px;
  z-index:9999;
  background:var(--tc-1e1b2e,#1e1b2e);
  border:1px solid rgba(var(--theme-overlay-rgb,255,255,255),.15);
  border-radius:10px;
  padding:4px;
  box-shadow:0 4px 16px rgba(0,0,0,.3);
}
.instant-party-overflow-menu .overflow-item{
  display:block;
  width:100%;
  text-align:left;
  padding:9px 12px;
  font-size:13px;
  background:none;
  border:none;
  border-radius:7px;
  cursor:pointer;
  color:var(--text,#eee);
}
.instant-party-overflow-menu .overflow-item:hover{background:rgba(var(--theme-overlay-rgb,255,255,255),.07)}
.instant-party-overflow-menu .overflow-item.danger{color:var(--tc-e24b4a,#e24b4a)}
.instant-party-more-btn{
  width:34px!important;
  height:34px!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  padding:0!important;
  border:1px solid rgba(var(--theme-overlay-rgb,255,255,255),.10)!important;
  border-radius:9px!important;
  background:rgba(var(--theme-overlay-rgb,255,255,255),.045)!important;
  color:rgba(var(--theme-overlay-rgb,255,255,255),.72)!important;
  font-size:17px!important;
  line-height:1!important;
  letter-spacing:1px;
  cursor:pointer;
}
.instant-party-more-btn:hover{
  background:rgba(var(--theme-overlay-rgb,255,255,255),.08)!important;
  color:#fff!important;
}
/* ============================================================
   Party card v2 -- same look as the Watch/Public/crooms-chat.html
   room card (renderRoomItem() in croom.js), duplicated here since
   this page doesn't load that file. Keep the two in sync by hand
   if either changes. The old .party-card rules above are unused
   now but left in place.
   ============================================================ */
.vs-room-card {
  position: relative;
  border-radius: 17px;
  background: linear-gradient(145deg, rgba(var(--tr-13122b,19,18,43),.78), rgba(var(--tr-0a0a19,10,10,25),.72));
  border: 1px solid rgba(var(--tr-977eff,151,126,255),.14);
  box-shadow: inset 0 1px 0 rgba(var(--theme-overlay-rgb,255,255,255),.045), 0 10px 30px rgba(0,0,0,.18);
  padding: 12px;
  cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.vs-room-card:hover {
  transform: translateY(-2px);
  border-color: rgba(var(--tr-5cceff,92,206,255),.28);
  background: linear-gradient(145deg, rgba(var(--tr-191738,25,23,56),.84), rgba(var(--tr-0b0b1c,11,11,28),.78));
}
.vs-card-top { display: flex; gap: 12px; }
.vs-card-thumb {
  flex: 0 0 88px; width: 88px; height: 62px; border-radius: 11px;
  position: relative; overflow: hidden; background: var(--tc-0c0b1c,#0c0b1c);
  border: 1px solid rgba(var(--theme-overlay-rgb,255,255,255),.06);
}
.vs-card-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.vs-card-thumb.is-generic {
  background: linear-gradient(160deg, rgba(var(--tr-8b5cf6,139,92,246),.30), rgba(var(--tr-29c2ff,41,194,255),.14) 55%, rgba(var(--tr-0a0a19,10,10,25),.9) 100%);
}
.vs-card-thumb-icon, .vs-card-thumb-play {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  color: #fff; pointer-events: none;
}
.vs-card-thumb-icon svg { width: 22px; height: 22px; opacity: .92; }
.vs-card-thumb-play svg { width: 22px; height: 22px; filter: drop-shadow(0 2px 6px rgba(0,0,0,.55)); }
.vs-card-thumb-tag {
  position: absolute; top: 5px; right: 5px; font-size: 8.5px; font-weight: 800;
  background: rgba(0,0,0,.6); color: #fff; padding: 2px 6px; border-radius: 999px; letter-spacing: .03em;
}
.vs-card-body { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.vs-card-row1 { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.vs-card-name {
  font-size: 15px; font-weight: 700; color: #fff;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.vs-badge {
  flex: 0 0 auto; font-size: 9.5px; font-weight: 800; letter-spacing: .04em;
  padding: 3px 8px; border-radius: 999px; text-transform: uppercase;
}
.vs-badge-pub  { background: rgba(var(--tr-38bdf8,56,189,248),.14); color: var(--tc-7dd3fc,#7dd3fc); border: 1px solid rgba(var(--tr-38bdf8,56,189,248),.28); }
.vs-badge-priv { background: rgba(var(--tr-a78bfa,167,139,250),.14); color: var(--tc-c4b5fd,#c4b5fd); border: 1px solid rgba(var(--tr-a78bfa,167,139,250),.28); }
.vs-card-primary-row { margin-top: 8px; }
.vs-card-owner-row { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; margin-top: 6px; }
.vs-card-owner { font-size: 12px; font-weight: 600; color: rgba(var(--tr-e0e7ff,224,231,255),.62); white-space: nowrap; }
.vs-card-sep { font-size: 11px; color: rgba(var(--tr-e0e7ff,224,231,255),.35); flex-shrink: 0; }
.vs-card-pills { display: flex; gap: 6px; margin-top: 7px; flex-wrap: wrap; }
.vs-card-pill {
  display: inline-flex; align-items: center; gap: 4px; font-size: 9.5px; font-weight: 700;
  letter-spacing: .03em; padding: 3px 8px 3px 6px; border-radius: 999px;
  background: rgba(var(--theme-overlay-rgb,255,255,255),.05); border: 1px solid rgba(var(--theme-overlay-rgb,255,255,255),.09); color: var(--tc-cfc9e6,#cfc9e6);
}
.vs-card-pill svg { width: 11px; height: 11px; opacity: .85; flex: 0 0 auto; }
.vs-card-pill-playlist { background: rgba(var(--tr-fbbf24,251,191,36),.10); border-color: rgba(var(--tr-fbbf24,251,191,36),.24); color: var(--tc-fcd34d,#fcd34d); }
.vs-card-actions { display: flex; gap: 8px; margin-top: 11px; padding-top: 10px;
  border-top: 1px solid rgba(var(--theme-overlay-rgb,255,255,255),.06); align-items: center; justify-content: flex-end; }
.vs-card-primary-btn {
  flex: 0 1 auto; min-width: 0; display: flex; align-items: center; justify-content: center; gap: 5px;
  height: 40px; padding: 0 14px; border-radius: 10px; color: #fff; font-size: 12px; font-weight: 700;
  background: linear-gradient(135deg,var(--tc-7c3aed,#7c3aed),var(--tc-4f46e5,#4f46e5) 55%,var(--tc-0891b2,#0891b2)); white-space: nowrap;
  border: none; cursor: pointer; font-family: inherit;
}
.vs-card-primary-btn svg { width: 12px; height: 12px; flex: 0 0 auto; }
.vs-card-primary-btn:hover { filter: brightness(1.08); }
.vs-card-primary-btn { display: none; }
.vs-card-icon-group { display: flex; gap: 8px; flex: 0 0 auto; flex-wrap: wrap; justify-content: flex-end; }
.vs-card-icon-btn {
  width: 40px; height: 40px; flex: 0 0 40px; border-radius: 10px; background: rgba(var(--theme-overlay-rgb,255,255,255),.05);
  border: 1px solid rgba(var(--theme-overlay-rgb,255,255,255),.09); display: flex; align-items: center; justify-content: center;
  color: var(--tc-cfc9e6,#cfc9e6); cursor: pointer; font-size: 16px; padding: 0;
}
.vs-card-icon-btn svg { width: 16px; height: 16px; }
.vs-card-icon-btn:hover { background: rgba(var(--theme-overlay-rgb,255,255,255),.09); color: #fff; }
@media (max-width: 420px) {
  .vs-card-thumb { flex-basis: 76px; width: 76px; height: 54px; }
  .vs-card-primary-btn { padding: 0 11px; }
}
@media (max-width: 380px) {
  .vs-card-icon-group { gap: 6px; }
  .vs-card-icon-btn { width: 38px; height: 38px; flex-basis: 38px; }
}


.instant-playlist-overlay.open{display:flex}
.instant-playlist-backdrop{position:absolute;inset:0}
.instant-playlist-sheet{position:relative;width:min(620px,100%);max-height:88vh;max-height:88dvh;overflow:hidden;display:flex;flex-direction:column;background:var(--tc-0e0b14,#0e0b14);border:1px solid rgba(var(--theme-overlay-rgb,255,255,255),.10);border-radius:20px 20px 0 0;box-shadow:0 -18px 60px rgba(0,0,0,.45);padding:18px 16px calc(14px + env(safe-area-inset-bottom, 0px));color:var(--tc-ede9f4,#ede9f4)}
.instant-playlist-head{display:flex;align-items:center;justify-content:space-between;gap:12px;padding-bottom:12px;border-bottom:1px solid rgba(var(--theme-overlay-rgb,255,255,255),.07)}
.instant-playlist-title{font-size:18px;font-weight:800}
.instant-playlist-subtitle{font-size:11px;color:var(--tc-8e8799,#8e8799);margin-top:3px}
.instant-playlist-close{width:34px;height:34px;border-radius:10px;border:1px solid rgba(var(--theme-overlay-rgb,255,255,255),.10);background:rgba(var(--theme-overlay-rgb,255,255,255),.05);color:#fff;font-size:22px;cursor:pointer}
.instant-playlist-status{font-size:12px;color:var(--tc-e7b76c,#e7b76c);min-height:18px;padding:8px 2px 0}
.instant-playlist-items{overflow-y:auto;padding:8px 0;display:flex;flex-direction:column;gap:7px;min-height:80px}
.instant-playlist-item{display:grid;grid-template-columns:32px 1fr auto;gap:10px;align-items:center;padding:10px;border:1px solid rgba(var(--theme-overlay-rgb,255,255,255),.07);border-radius:12px;background:rgba(var(--theme-overlay-rgb,255,255,255),.035)}
.instant-playlist-item.current{border-color:rgba(var(--tr-7c3aed,124,58,237),.55);background:rgba(var(--tr-7c3aed,124,58,237),.10)}
.instant-playlist-num{font-size:12px;font-weight:800;color:var(--tc-9b91ab,#9b91ab);text-align:center}
.instant-playlist-item.current .instant-playlist-num{color:var(--tc-c4b5fd,#c4b5fd)}
.instant-playlist-info{min-width:0}
.instant-playlist-item-title{font-size:12.5px;font-weight:700;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.instant-playlist-item-url{font-size:10px;color:var(--tc-777080,#777080);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin-top:3px}
.instant-playlist-badge{font-size:9px;text-transform:uppercase;letter-spacing:.08em;color:var(--tc-c4b5fd,#c4b5fd);margin-left:5px}
.instant-playlist-actions{display:flex;gap:4px}
.instant-playlist-actions button{width:28px;height:28px;border:1px solid rgba(var(--theme-overlay-rgb,255,255,255),.08);border-radius:8px;background:rgba(var(--theme-overlay-rgb,255,255,255),.045);color:var(--tc-cfc8da,#cfc8da);cursor:pointer}
.instant-playlist-actions button:hover{background:rgba(var(--theme-overlay-rgb,255,255,255),.09)}
.instant-playlist-actions .remove{color:var(--tc-ef7777,#ef7777)}
.instant-playlist-add{display:flex;gap:8px;padding:10px 0;border-top:1px solid rgba(var(--theme-overlay-rgb,255,255,255),.07)}
.instant-playlist-add input{flex:1;min-width:0;height:40px;border:1px solid rgba(var(--theme-overlay-rgb,255,255,255),.10);border-radius:10px;background:rgba(var(--theme-overlay-rgb,255,255,255),.045);color:#fff;padding:0 12px;outline:none}
.instant-playlist-add button,.instant-playlist-footer button{height:40px;border:0;border-radius:10px;padding:0 15px;background:var(--tc-7c3aed,#7c3aed);color:#fff;font-weight:700;cursor:pointer}
.instant-playlist-footer{display:flex;align-items:center;justify-content:space-between;gap:12px;font-size:10.5px;color:var(--tc-777080,#777080);padding-top:4px}
.instant-playlist-footer button{height:34px;background:rgba(var(--theme-overlay-rgb,255,255,255),.08);border:1px solid rgba(var(--theme-overlay-rgb,255,255,255),.10)}
.instant-playlist-loading{padding:25px;text-align:center;color:var(--tc-777080,#777080);font-size:12px}
/* [playlist-play] */
.instant-playlist-item.selectable{cursor:pointer}
.instant-playlist-item.selectable:hover{background:rgba(var(--theme-overlay-rgb,255,255,255),.06)}
.instant-playlist-item.selected{border-color:var(--theme-accent-light,#a78bfa);background:rgba(var(--theme-accent-rgb,139,92,246),.08)}
.instant-playlist-item.selectable:focus-visible{outline:2px solid var(--theme-accent-light,#a78bfa);outline-offset:2px}
.instant-playlist-play{grid-column:1/-1;height:40px;border:0;border-radius:10px;background:var(--theme-accent,#7c3aed);color:#fff;font:inherit;font-size:13px;font-weight:800;cursor:pointer}
.instant-playlist-play:disabled{opacity:.6;cursor:default}
.instant-playlist-play:focus-visible{outline:2px solid #fff;outline-offset:2px}
@media(max-width:600px){.instant-playlist-sheet{max-height:92vh;border-radius:18px 18px 0 0}.instant-playlist-add{flex-direction:column}.instant-playlist-add button{width:100%}}

/* [repeat-party] card pill: schedule + next session */
.vs-card-pill-repeat { background: rgba(var(--tr-22c1c3,34,193,195),.10); border-color: rgba(var(--tr-22c1c3,34,193,195),.26); color: var(--tc-5eead4,#5eead4); white-space: normal; }
.vs-card-pill-streak { background: rgba(var(--tr-f97316,249,115,22),.12); border-color: rgba(var(--tr-f97316,249,115,22),.30); color: var(--tc-fdba74,#fdba74); }
