/* Wizbang Clubhouse: the join box, locks, Inside the club, photo albums and Your membership (clubhouse.js, photos.js).
   Uses the site's tokens (site.css), so it follows the owner's accent and both themes. */

/* ---------- badges ---------- */
.cl-badge { display: inline-flex; align-items: center; gap: 4px; vertical-align: middle; white-space: nowrap; font-family: var(--body); font-size: 12px; font-weight: 600; line-height: 1;
  padding: 4px 8px 4px 7px; border-radius: 999px; background: var(--panel-2); color: var(--cream-2); border: 1px solid var(--line-2); letter-spacing: 0; }
.cl-badge.paid { background: color-mix(in srgb, var(--amber) 12%, var(--panel)); color: color-mix(in srgb, var(--amber) 70%, var(--cream)); border-color: var(--soft-line); }
.cl-badge.open { background: transparent; }
.cl-badge svg { flex: none; }
h1 .cl-badge, h2 .cl-badge { font-size: 13px; transform: translateY(-3px); }

/* ---------- the join box ---------- */
.cl-join { display: flex; flex-direction: column; align-items: center; gap: 18px; width: 100%; }
.cl-switch { display: inline-flex; padding: 4px; gap: 4px; border-radius: 999px; background: var(--panel-2); border: 1px solid var(--line); }
.cl-switch button { border: 0; background: none; color: var(--muted); font: 600 14px/1 var(--body); padding: 9px 16px; border-radius: 999px; cursor: pointer; }
.cl-switch button[aria-pressed="true"] { background: var(--panel); color: var(--cream); box-shadow: var(--shadow-sm); }
.cl-grid { display: grid; gap: 16px; width: 100%; grid-template-columns: repeat(auto-fit, minmax(min(250px, 100%), 1fr)); align-items: stretch; }
.cl-grid.n1 { max-width: 420px; }
.cl-grid.n2 { max-width: 760px; }
.cl-card { position: relative; display: flex; flex-direction: column; gap: 12px; padding: 26px 24px 24px; border-radius: 18px; background: var(--panel); border: 1px solid var(--line);
  box-shadow: var(--shadow-sm); min-width: 0; }
.cl-card.star { border: 1.5px solid var(--amber); box-shadow: 0 18px 44px -26px color-mix(in srgb, var(--amber) 70%, transparent), var(--shadow-sm); }
.cl-card.mine { background: var(--soft); }
.cl-flag { position: absolute; top: -12px; left: 22px; background: var(--amber); color: var(--on-accent); font: 600 12px/1 var(--body); padding: 6px 10px; border-radius: 999px; }
.cl-name { font-size: 18px; font-weight: 650; letter-spacing: -0.01em; }
.cl-price { margin: 0; display: flex; align-items: baseline; flex-wrap: wrap; gap: 2px 4px; color: var(--muted); font-size: 15px; }
.cl-amt { font-family: var(--serif); font-size: 46px; line-height: 1; color: var(--cream); letter-spacing: -0.01em; }
.cl-save { margin-left: 6px; font-size: 12px; font-weight: 600; color: var(--green); background: color-mix(in srgb, var(--green) 12%, var(--panel)); padding: 3px 8px; border-radius: 999px; }
.cl-perks { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 9px; flex: 1; font-size: 15px; color: var(--cream-2); }
.cl-perks li { display: flex; gap: 9px; align-items: flex-start; line-height: 1.4; }
.cl-perks svg { flex: none; margin-top: 1px; color: var(--amber); }
.cl-card .btn { width: 100%; justify-content: center; }
.cl-mine { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 48px; border-radius: 12px; background: var(--panel); border: 1px dashed var(--soft-line);
  font-weight: 600; color: color-mix(in srgb, var(--amber) 75%, var(--cream)); }
.cl-fine { margin: 0; font-size: 14px; color: var(--muted); text-align: center; line-height: 1.5; }
.cl-fine a, .cl-fine .linkish { color: var(--blue); }

/* ---------- the lock ---------- */
.cl-lock { position: relative; display: flex; flex-direction: column; gap: 0; }
.cl-tease { list-style: none; margin: 0; padding: 0; border: 1px solid var(--line); border-bottom: 0; border-radius: 14px 14px 0 0; overflow: hidden;
  -webkit-mask-image: linear-gradient(#000 20%, transparent 95%); mask-image: linear-gradient(#000 20%, transparent 95%); user-select: none; }
.cl-tease li { display: flex; flex-direction: column; gap: 3px; padding: 14px 18px; background: var(--panel); border-top: 1px solid var(--line); filter: blur(0.4px); }
.cl-tease li:first-child { border-top: 0; }
.cl-tease b { font-size: 16px; }
.cl-tease small { color: var(--dim); font-size: 13px; }
.cl-tease + .cl-lock-card { margin-top: -54px; }
.cl-lock-card { position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 12px; padding: 34px 22px 28px; border-radius: 20px;
  background: linear-gradient(180deg, var(--soft), var(--panel) 70%); border: 1px solid var(--soft-line); box-shadow: var(--shadow); }
.cl-lock-card h2 { margin: 0; font-family: var(--serif); font-weight: 400; font-size: clamp(28px, 4vw, 38px); line-height: 1.1; max-width: 640px; }
.cl-lock-card > p { margin: 0; color: var(--cream-2); font-size: 16px; max-width: 560px; line-height: 1.5; }
.cl-lock-ico { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; background: var(--amber); color: var(--on-accent); box-shadow: 0 10px 24px -12px var(--amber); }
.cl-lock-card .cl-join { margin-top: 10px; }
.cl-locked-row .name { opacity: .92; }

/* ---------- homepage sections ---------- */
.cl-home-join { padding: 72px 0; background: linear-gradient(180deg, var(--ground), var(--soft) 55%, var(--ground)); }
.cl-home-join .sec-head { justify-content: center; text-align: center; margin-bottom: 28px; }
.cl-home-join .sec-head p { margin-left: auto; margin-right: auto; }
.cl-home-join .cl-fine { margin-top: 14px; }
.cl-inside, .cl-albums { padding: 56px 0; }
.cl-inside-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(min(260px, 100%), 1fr)); }
.cl-room { display: flex; flex-direction: column; gap: 6px; padding: 18px 18px 16px; border-radius: 16px; background: var(--panel); border: 1px solid var(--line); text-decoration: none; color: inherit;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease; min-width: 0; }
.cl-room:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: var(--soft-line); }
.cl-room-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.cl-room-top b { font-size: 17px; line-height: 1.3; overflow-wrap: anywhere; }
.cl-room-desc { font-size: 14px; color: var(--muted); line-height: 1.45; }
.cl-room small { margin-top: auto; padding-top: 6px; font-size: 13px; color: var(--dim); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cl-room.locked { background: linear-gradient(160deg, var(--panel), var(--soft)); }
.cl-ev-locked .gp-ev-title { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.cl-fb-ico { width: 20px; height: 20px; display: grid; place-items: center; color: #1877F2; }

/* ---------- albums ---------- */
.cl-album-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(min(240px, 100%), 1fr)); }
.cl-album { display: flex; flex-direction: column; border-radius: 16px; overflow: hidden; background: var(--panel); border: 1px solid var(--line); text-decoration: none; color: inherit;
  transition: transform .18s ease, box-shadow .18s ease; }
.cl-album:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.cl-album-pic { aspect-ratio: 4 / 3; background: var(--panel-2); overflow: hidden; display: block; }
.cl-album-pic img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .4s ease; }
.cl-album:hover .cl-album-pic img { transform: scale(1.03); }
.cl-album-ph { width: 100%; height: 100%; display: grid; place-items: center; color: color-mix(in srgb, var(--amber) 60%, var(--muted));
  background: radial-gradient(120% 90% at 20% 10%, var(--soft), var(--panel-2)); }
.cl-album-txt { display: flex; flex-direction: column; gap: 6px; padding: 14px 16px 16px; }
.cl-album-txt b { font-size: 16px; overflow-wrap: anywhere; }
.cl-album-txt small { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; color: var(--dim); font-size: 13px; }

/* ---------- photos.html ---------- */
.cl-page { padding-top: 28px; padding-bottom: 72px; }
.cl-page .crumbs { font-size: 14px; color: var(--muted); display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.cl-page .crumbs a { color: var(--blue); }
.cl-ph-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 14px; margin-bottom: 22px; }
.cl-ph-head h1 { margin: 0; overflow-wrap: anywhere; }
.cl-ph-head p { margin: 6px 0 0; }
.cl-page .empty { text-align: center; padding: 48px 16px; color: var(--muted); display: flex; flex-direction: column; align-items: center; gap: 14px; }
.cl-page .btn-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.cl-photo-grid { display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(min(180px, 46%), 1fr)); }
.cl-photo { padding: 0; border: 0; border-radius: 10px; overflow: hidden; aspect-ratio: 1; background: var(--panel-2); cursor: zoom-in; }
.cl-photo img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .3s ease; }
.cl-photo:hover img { transform: scale(1.04); }
.toast-like { padding: 10px 14px; border-radius: 10px; background: var(--soft); border: 1px solid var(--soft-line); margin-bottom: 14px; font-weight: 600; }
.cl-view { width: min(1100px, 100vw); max-width: 100vw; max-height: 100vh; padding: 0; border: 0; background: transparent; color: #fff; overflow: visible; }
.cl-view::backdrop { background: rgba(8, 10, 18, .9); }
.cl-view figure { margin: 0; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.cl-view img { max-width: 100%; max-height: calc(100vh - 140px); border-radius: 10px; object-fit: contain; display: block; }
.cl-view figcaption { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 10px; padding: 0 16px; }
.cl-view-cap { margin: 0; font-size: 14px; color: #D8DBE6; text-align: center; }
.cl-view .btn-ghost { color: #fff; border-color: rgba(255, 255, 255, .35); background: transparent; }
.cl-view-x, .cl-view-nav { position: fixed; border: 0; background: rgba(255, 255, 255, .12); color: #fff; width: 48px; height: 48px; border-radius: 50%; font-size: 28px; line-height: 1; cursor: pointer; z-index: 2; }
.cl-view-x { top: 16px; right: 16px; }
.cl-view-nav { top: 50%; transform: translateY(-50%); }
.cl-view-nav.prev { left: 12px; }
.cl-view-nav.next { right: 12px; }
.cl-view-x:hover, .cl-view-nav:hover { background: rgba(255, 255, 255, .24); }

/* ---------- membership.html ---------- */
.cl-mwrap { display: flex; flex-direction: column; gap: 26px; max-width: 960px; }
.cl-mhead { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; padding: 36px 32px; border-radius: 22px; background: linear-gradient(140deg, var(--soft), var(--panel) 65%);
  border: 1px solid var(--soft-line); box-shadow: var(--shadow); }
.cl-kick { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: 14px; color: color-mix(in srgb, var(--amber) 75%, var(--cream)); }
.cl-mhead h1 { margin: 0; font-family: var(--serif); font-weight: 400; font-size: clamp(36px, 5.5vw, 54px); line-height: 1.05; }
.cl-sub { margin: 0; color: var(--cream-2); font-size: 17px; line-height: 1.5; max-width: 620px; }
.cl-acts { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 6px; }
.cl-msg { margin: -12px 0 0; color: var(--red); font-size: 14px; min-height: 0; }
.cl-msg:empty { display: none; }
.cl-panel { display: flex; flex-direction: column; gap: 12px; padding: 22px 24px; border-radius: 18px; background: var(--panel); border: 1px solid var(--line); }
.cl-panel h2 { margin: 0; font-size: 19px; font-weight: 650; letter-spacing: -0.01em; }
.cl-panel .cl-fine { text-align: left; }
.cl-change { display: flex; flex-direction: column; gap: 8px; }
.cl-change-row, .cl-files li { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 12px; background: var(--panel-2); border: 1px solid var(--line); }
.cl-files { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.cl-file-t { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1 1 200px; }
.cl-file-t small { color: var(--dim); font-size: 13px; }
.cl-next { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(min(200px, 100%), 1fr)); }
.cl-next a { display: flex; align-items: center; gap: 10px; padding: 16px 18px; border-radius: 14px; background: var(--panel); border: 1px solid var(--line); text-decoration: none; color: inherit; font-weight: 600; }
.cl-next a:hover { border-color: var(--soft-line); box-shadow: var(--shadow-sm); }
.cl-next svg { color: var(--amber); }

@media (max-width: 600px) {
  .cl-mhead { padding: 26px 20px; }
  .cl-card { padding: 24px 18px 20px; }
  .cl-lock-card { padding: 28px 16px 22px; }
  .cl-home-join { padding: 52px 0; }
}
@media (prefers-reduced-motion: reduce) { .cl-room, .cl-album, .cl-album-pic img, .cl-photo img { transition: none; } }

/* ---------- Admin: Paid members on a Clubhouse ---------- */
.mem-stat.warn b { color: var(--red); }
.club-limit { display: flex; flex-direction: column; gap: 8px; }
.club-limit-bar { height: 10px; border-radius: 999px; background: var(--panel-2); border: 1px solid var(--line); overflow: hidden; }
.club-limit-bar span { display: block; height: 100%; background: var(--amber); border-radius: 999px; }
.club-kit-wrap { border-top: 1px solid var(--line); padding-top: 14px; }
.club-kit-wrap summary { cursor: pointer; list-style: revert; padding: 4px 0; }
.club-kit-wrap[open] summary { margin-bottom: 10px; }
.club-kit { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(min(320px, 100%), 1fr)); margin: 12px 0; }
.club-kit-item { display: flex; flex-direction: column; gap: 8px; padding: 14px; border-radius: 12px; background: var(--panel-2); border: 1px solid var(--line); min-width: 0; }
.club-kit-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.club-kit-text { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; font: 14px/1.5 var(--body); color: var(--cream-2); max-height: 200px; overflow: auto; }
