/*
 * Clubs lane (N1, N2, C04, C41, C43): the Club's tab row, events, people, log, manage, the notice control, and
 * the welcome and rules cards. Quiet and flat: the tokens the rest of the app uses, no new colours, no
 * animation, so reduced motion has nothing to switch off. No inline style anywhere.
 */

/* ---------- the tab row ---------- */
.pk-club-tabs { display: flex; gap: 2px; max-width: 760px; margin: 0 0 18px; border-bottom: 1px solid var(--pk-border); overflow-x: auto; scrollbar-width: none; }
.pk-club-tabs::-webkit-scrollbar { display: none; }
.pk-club-tabs a { position: relative; flex: none; padding: 11px 14px; color: var(--pk-muted); font-size: 14px; font-weight: 600; text-decoration: none; white-space: nowrap; }
.pk-club-tabs a[aria-current="page"] { color: var(--pk-ink); }
.pk-club-tabs a[aria-current="page"]::after { content: ""; position: absolute; right: 8px; bottom: -1px; left: 8px; height: 2px; border-radius: 2px; background: var(--pk-accent); }
.pk-club-tab-count { display: inline-block; min-width: 18px; padding: 0 5px; border-radius: 9px; background: var(--pk-surface-raised); color: var(--pk-ink); font-size: 11px; font-weight: 700; line-height: 18px; text-align: center; }

.pk-club-head { margin-bottom: 14px; }
.pk-club-name { color: inherit; text-decoration: none; }
.pk-club-section-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; max-width: 760px; margin: 0 0 14px; }
.pk-club-section-head h2 { margin: 0; font-size: 20px; letter-spacing: -.02em; }
.pk-club-section-head .pk-club-note { flex-basis: 100%; margin: 0; }
.pk-club-note { margin: 0; color: var(--pk-muted); font-size: 13px; line-height: 1.5; }
.pk-club-status { margin: 6px 0 0; color: var(--pk-muted); font-size: 12px; }
.pk-club-status:empty { display: none; }
.pk-club-more { margin: 14px 0 0; }
.pk-club-badge { display: inline-flex; align-items: center; gap: 4px; padding: 1px 8px; border: 1px solid var(--pk-border); border-radius: 999px; color: var(--pk-muted); font-size: 11px; font-weight: 600; }
.pk-club-title { display: inline-block; padding: 0 7px; border: 1px solid var(--pk-border); border-radius: 999px; color: var(--pk-muted); font-size: 11px; font-weight: 600; line-height: 18px; vertical-align: middle; }
.pk-server-ask { margin-left: 8px; }

/* ---------- welcome and rules gate ---------- */
.pk-club-welcome, .pk-club-gate { display: grid; gap: 10px; max-width: 760px; margin: 0 0 18px; padding: 16px 18px; border: 1px solid var(--pk-border); border-radius: var(--pk-radius-card); background: var(--pk-surface); }
.pk-club-welcome[hidden] { display: none; }
.pk-club-welcome h2, .pk-club-gate h2 { margin: 0; font-size: 16px; letter-spacing: -.01em; }
.pk-club-welcome p, .pk-club-gate p { margin: 0; font-size: 14px; line-height: 1.55; }
.pk-club-welcome-text { white-space: pre-wrap; overflow-wrap: anywhere; }
.pk-club-welcome .fs-button { justify-self: start; }
.pk-club-gate-rules { max-height: 220px; overflow: auto; padding: 12px 14px; border-radius: 12px; background: var(--pk-surface-sunken); color: var(--pk-ink); font-size: 14px; line-height: 1.55; white-space: pre-wrap; overflow-wrap: anywhere; }
.pk-club-gate-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; }
.pk-club-gate-actions p { color: var(--pk-muted); font-size: 12px; }
.pk-club-gate-actions p:empty { display: none; }

/* ---------- events ---------- */
.pk-club-events, .pk-club-people, .pk-club-log, .pk-club-manage { max-width: 760px; }
.pk-club-event-list { display: grid; gap: 12px; margin: 0; padding: 0; list-style: none; }
.pk-club-event { display: grid; gap: 8px; padding: 16px 18px; border: 1px solid var(--pk-border); border-radius: var(--pk-radius-card); background: var(--pk-surface); }
.pk-club-event.is-cancelled { opacity: .7; }
.pk-club-event.is-cancelled h3 { text-decoration: line-through; text-decoration-thickness: 1px; }
.pk-club-event-when { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; color: var(--pk-muted); font-size: 13px; font-weight: 600; }
.pk-club-event h3 { margin: 0; font-size: 17px; letter-spacing: -.015em; overflow-wrap: anywhere; }
.pk-club-event p { margin: 0; }
.pk-club-event-place { color: var(--pk-muted); font-size: 14px; }
.pk-club-event-details { font-size: 14px; line-height: 1.55; white-space: pre-wrap; overflow-wrap: anywhere; }
.pk-club-event-counts { color: var(--pk-muted); font-size: 13px; }
.pk-club-event-counts:empty { display: none; }
.pk-club-rsvp, .pk-club-event-tools { display: flex; flex-wrap: wrap; gap: 8px; }
.pk-club-rsvp .fs-button[aria-pressed="true"] { border-color: var(--pk-accent); color: var(--pk-ink); }
.pk-club-answers summary { width: fit-content; padding: 4px 0; color: var(--pk-muted); font-size: 13px; cursor: pointer; }
.pk-club-answers ul { display: grid; gap: 4px; margin: 6px 0 0; padding: 0; list-style: none; font-size: 14px; }
.pk-club-answers a { color: var(--pk-ink); }
.pk-club-dialog { width: min(520px, calc(100vw - 32px)); }
.pk-club-dialog .pk-server-form { display: grid; gap: 12px; }

/* ---------- people ---------- */
.pk-club-search { margin: 0 0 12px; }
.pk-club-search input { width: 100%; max-width: 420px; }
.pk-club-people-list { display: grid; gap: 2px; margin: 0; padding: 0; list-style: none; }
.pk-club-person { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 8px 6px; border-bottom: 1px solid var(--pk-border); }
.pk-club-who { display: inline-flex; align-items: center; gap: 10px; min-width: 0; color: var(--pk-ink); text-decoration: none; }
.pk-club-who .pk-avatar { display: grid; place-items: center; flex: none; width: 32px; height: 32px; border-radius: 50%; object-fit: cover; }
.pk-club-who strong { display: block; font-size: 14px; }
.pk-club-who small { display: block; color: var(--pk-muted); font-size: 12px; }
.pk-club-person .fs-button { margin-left: auto; min-height: 30px; padding: 0 12px; font-size: 12px; }

/* ---------- log ---------- */
.pk-club-log-list { display: grid; margin: 0; padding: 0; list-style: none; }
.pk-club-log-item { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 16px; padding: 10px 4px; border-bottom: 1px solid var(--pk-border); font-size: 14px; line-height: 1.5; }
.pk-club-log-line { min-width: 0; overflow-wrap: anywhere; }
.pk-club-log-line a { color: var(--pk-ink); font-weight: 600; text-decoration: none; }
.pk-club-log-item time { flex: none; color: var(--pk-muted); font-size: 12px; }

/* ---------- manage ---------- */
.pk-club-block { display: grid; gap: 12px; margin: 0 0 28px; padding: 18px; border: 1px solid var(--pk-border); border-radius: var(--pk-radius-card); background: var(--pk-surface); }
.pk-club-block h3 { margin: 0; font-size: 16px; letter-spacing: -.01em; }
.pk-club-block h4 { margin: 0; font-size: 14px; }
.pk-club-block .pk-server-form { display: grid; gap: 12px; }
/* requests, and the notice control */
.pk-club-requests { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.pk-club-request { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 10px 12px; border: 1px solid var(--pk-border); border-radius: 14px; }
.pk-club-request-note { flex-basis: 100%; margin: 0; color: var(--pk-muted); font-size: 13px; overflow-wrap: anywhere; }
.pk-club-request-actions { display: flex; gap: 8px; margin-left: auto; }
/* The Club's ⋯ (Report this Club) opens under its own button and stays inside the header, on a phone as on a desktop. */
.pk-server-actions .pk-club-more { position: relative; }
.pk-server-actions .pk-club-more > nav { top: calc(100% + 6px); right: 0; left: auto; width: max-content; min-width: 200px; max-width: calc(100vw - 32px); }

/* The notice control is one quiet row in the Club's header: a bell and the word, the choice and its help open under it. */
.pk-club-notice { max-width: 760px; margin: 0; }
.pk-club-notice-toggle { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 12px 0 0; color: var(--pk-muted); font-size: 13px; font-weight: 600; list-style: none; cursor: pointer; }
.pk-club-notice-toggle::-webkit-details-marker { display: none; }
.pk-club-notice-toggle .pk-icon { flex: none; width: 18px; height: 18px; }
.pk-club-notice[open] > .pk-club-notice-toggle { color: var(--pk-ink); }
.pk-club-notice-toggle:focus-visible { outline: var(--pk-focus-width) solid var(--pk-focus); outline-offset: var(--pk-focus-offset); border-radius: 8px; }
.pk-club-notice-body { display: grid; gap: 6px; padding: 0 0 8px; }
.pk-club-notice-body label { color: var(--pk-ink); font-size: 12px; font-weight: 600; }
.pk-club-notice select { max-width: 280px; }


/* ---------- people tools, channels, activity (C44, C45) ---------- */
.pk-club-person-menu { margin-left: auto; }
.pk-club-person-menu summary { width: fit-content; padding: 4px 10px; border: 1px solid var(--pk-border); border-radius: 999px; color: var(--pk-muted); font-size: 12px; font-weight: 600; cursor: pointer; list-style: none; }
.pk-club-person-menu summary::-webkit-details-marker { display: none; }
.pk-club-person-menu[open] summary { color: var(--pk-ink); }
.pk-club-person-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.pk-club-person-actions .fs-button { min-height: 30px; padding: 0 12px; font-size: 12px; }
.pk-club-channels { display: grid; gap: 12px; margin: 0; padding: 0; list-style: none; }
.pk-club-channel { padding: 12px 14px; border: 1px solid var(--pk-border); border-radius: 14px; }
.pk-club-channel-form { display: grid; gap: 10px; }
.pk-club-channel-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; }
.pk-club-channel-actions .fs-button { min-height: 32px; padding: 0 12px; font-size: 13px; }
.pk-club-activity { width: 100%; border-collapse: collapse; font-size: 14px; font-variant-numeric: tabular-nums; }
.pk-club-activity th, .pk-club-activity td { padding: 8px 6px; border-bottom: 1px solid var(--pk-border); text-align: right; }
.pk-club-activity thead th { color: var(--pk-muted); font-size: 12px; font-weight: 600; }
.pk-club-activity tbody th { color: var(--pk-ink); font-weight: 600; text-align: left; }

/* ---------- an invite has a face (A57) ---------- */
.pk-invite-from { margin: 0 0 14px; }
.pk-invite-from a { display: inline-flex; align-items: center; gap: 10px; color: var(--pk-ink); font-weight: 600; text-decoration: none; }
.pk-invite-from .pk-avatar { display: grid; place-items: center; flex: none; width: 40px; height: 40px; border-radius: 50%; object-fit: cover; }

/* ---------- a quiet Report link on a wall post (safety lane's sheet) ---------- */
.pk-club-report { display: inline-block; align-self: flex-start; margin: 4px 14px 10px; color: var(--pk-muted); font-size: 12px; text-decoration: none; }
.pk-club-report:focus-visible { color: var(--pk-ink); text-decoration: underline; text-underline-offset: 3px; }
