/* Spec 203: the club meeting page. Each table is a long felt table seen from above, the games lying on it as
   boxes, the chairs along both sides; the seat list under it carries the names and the actions. No rounding:
   the board pieces stay square, as in the rest of the tabletop look. */

.club-page {
    display: grid;
    gap: 16px;
    min-width: 0;
}

/* The app's buttons fill their card by default; here they sit in rows, with room around their text (spec 210). */
.club-page .game-card-btn {
    width: auto;
    margin: 0;
    padding: 0.55rem 1rem;
}

.club-page .club-header {
    margin: 0;
}

.club-head h2 {
    margin: 2px 0 12px;
    overflow-wrap: anywhere;
}

.club-kicker {
    margin: 0;
    font-family: var(--tt-font-display);
    color: var(--tt-print);
}

.club-facts {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 10px 20px;
    margin: 0;
}

.club-facts dt {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--tt-muted);
}

.club-facts dd {
    margin: 2px 0 0;
    overflow-wrap: anywhere;
}

/* Spec 210 rule 3: the place, and "Open in maps" as a button under it. */
.club-place {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 12px;
}

.club-page .club-map-btn {
    padding: 0.35rem 0.8rem;
    font-size: 0.85rem;
    white-space: nowrap;
    text-decoration: none;
}

.club-description {
    margin: 14px 0 0;
    white-space: pre-line;
    overflow-wrap: anywhere;
}

.club-callout h3 {
    margin: 0 0 12px;
    font-size: 1.1rem;
    overflow-wrap: anywhere;
}

.club-callout-actions,
.club-table-actions,
.club-invite-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

/* Spec 315 rule 8: the crown in the corner of "Create a club" keeps clear of the intro above. */
.club-header > .club-callout-actions {
    margin-top: 14px;
}

.club-name-field {
    display: grid;
    gap: 4px;
    max-width: 360px;
    margin-bottom: 12px;
}

.club-section-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px 16px;
    margin-bottom: 12px;
}

.club-section-head h3 {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
}

.club-empty {
    margin: 0;
    color: var(--tt-muted);
}

/* The tables: one column on phones, two on tablets, three on wide screens. */
.club-table-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
}

@media (min-width: 768px) {
    .club-table-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (min-width: 1280px) {
    .club-table-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

/* Spec 210 rule 2: a table is a block of its own inside the tables' field. */
.club-table {
    display: grid;
    align-content: start;
    gap: 14px;
    min-width: 0;
    padding: 12px;
    background: var(--tt-field);
    border: 1px solid var(--tt-line);
}

.club-table.is-full .club-table-top {
    filter: saturate(0.75);
}

.club-table-stage {
    display: grid;
    gap: 6px;
    padding: 4px 0 8px;
}

.club-chairs {
    display: flex;
    justify-content: space-evenly;
    gap: 6px;
    min-height: 34px;
}

.club-chair {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    border: 2px dashed var(--tt-line);
    background: transparent;
    color: var(--tt-ink);
    font-family: var(--tt-font-display);
    font-size: 0.8rem;
    font-weight: 700;
    line-height: 1;
}

.club-chair.is-taken {
    border-style: solid;
    background: var(--tt-field);
}

.club-chair.is-self {
    border-color: var(--tt-accent);
    background: var(--tt-accent-soft);
}

.club-chair.is-reserved {
    border-color: var(--tt-accent);
    color: var(--tt-accent);
}

/* The felt top with its wooden rim and a hard edge below, as every board piece. */
.club-table-top {
    display: grid;
    place-items: center;
    min-height: 112px;
    padding: 12px;
    background: #356546;
    border: 8px solid #7b4f2c;
    box-shadow: 0 5px 0 #4e301a;
}

html.tabletop[data-theme="light"] .club-table-top {
    background: #538a5f;
    border-color: #a87a4f;
    box-shadow: 0 5px 0 #85603c;
}

.club-table-games {
    display: grid;
    grid-template-columns: repeat(var(--club-games, 1), minmax(0, 76px));
    justify-content: center;
    gap: 14px;
    width: 100%;
}

.club-table-games-2 { --club-games: 2; }
.club-table-games-3 { --club-games: 3; }
.club-table-games-4 { --club-games: 4; }

/* Spec 230 rule 3: a box as in the library, its lid edge and side going up, smaller. */
.club-box {
    position: relative;
    display: block;
    aspect-ratio: 1;
    min-width: 0;
    overflow: visible;
    background: var(--tt-box);
    transform: rotate(-4deg);
}

.club-box::before,
.club-box::after {
    content: "";
    position: absolute;
    background: var(--tt-box);
    pointer-events: none;
}

.club-box::before {
    left: 0;
    right: 0;
    top: -6px;
    height: 6px;
    filter: brightness(1.3);
    transform: skewX(-45deg);
    transform-origin: bottom left;
}

.club-box::after {
    top: 0;
    bottom: 0;
    right: -6px;
    width: 6px;
    filter: brightness(0.72);
    transform: skewY(-45deg);
    transform-origin: top left;
}

.club-box:nth-child(even) {
    transform: rotate(3deg);
}

.club-box img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* The lid fills the box; its title keeps its own clipping. */
.club-box-lid {
    height: 100%;
    display: grid;
    place-items: center;
    padding: 6px;
    background: hsl(var(--club-lid-hue, 24) 40% 34%);
    color: #fbf4ea;
}

.club-box-title {
    display: -webkit-box;
    overflow: hidden;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    font-family: var(--tt-font-display);
    font-size: 0.62rem;
    line-height: 1.15;
    text-align: center;
    /* Long titles break between syllables, not at a random letter. */
    overflow-wrap: break-word;
    hyphens: auto;
}

.club-table-body {
    display: grid;
    gap: 8px;
    min-width: 0;
}

.club-table-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
}

.club-table-head h3 {
    margin: 0;
    font-size: 1.1rem;
    overflow-wrap: anywhere;
}

.club-table-count {
    flex: 0 0 auto;
    font-family: var(--tt-font-display);
    font-weight: 700;
    white-space: nowrap;
}

.club-table-count.is-full,
.club-table-full {
    color: var(--tt-accent);
}

.club-table-full {
    margin-left: 6px;
    font-size: 0.85rem;
}

.club-table-facts {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 14px;
    margin: 0;
    color: var(--tt-muted);
    font-size: 0.9rem;
}

.club-table-note {
    margin: 0;
    overflow-wrap: anywhere;
}

.club-table-note {
    color: var(--tt-muted);
    font-style: italic;
}

/* The seat list: one line per seat, a token, the name and what the viewer can do with it. */
.club-seat-list,
.club-people-list,
.club-friend-checks {
    display: grid;
    gap: 0;
    margin: 0;
    padding: 0;
    list-style: none;
}

.club-seat,
.club-person {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 10px;
    padding: 7px 0;
    border-top: 1px solid var(--tt-line);
    min-width: 0;
}

.club-seat:last-child,
.club-person:last-child {
    border-bottom: 1px solid var(--tt-line);
}

.club-seat-token {
    display: grid;
    place-items: center;
    width: 28px;
    height: 28px;
    flex: 0 0 28px;
    border: 2px solid var(--tt-line);
    background: var(--tt-field);
    font-family: var(--tt-font-display);
    font-size: 0.75rem;
    font-weight: 700;
}

/* Spec 224: the person's photo fills the token. */
.club-seat-token.person-token-photo {
    display: block;
    object-fit: cover;
}

.club-seat.is-self .club-seat-token {
    border-color: var(--tt-accent);
    background: var(--tt-accent-soft);
}

.club-seat.is-reserved .club-seat-token,
.club-seat.is-free .club-seat-token {
    border-style: dashed;
    background: transparent;
}

.club-seat.is-reserved .club-seat-token {
    border-color: var(--tt-accent);
}

.club-seat.is-free .club-seat-name {
    color: var(--tt-muted);
}

.club-seat-name,
.club-person-name {
    flex: 1 1 120px;
    min-width: 0;
    overflow-wrap: anywhere;
}

.club-person-self {
    margin-left: 6px;
}

.club-seat-mark,
.club-person-mark {
    margin-left: 6px;
    color: var(--tt-accent);
    font-size: 0.82rem;
    font-weight: 600;
}

/* Spec 286 rule 7: who typed the name, on its own line under it. */
.club-seat-mark.club-seat-added {
    display: block;
    margin-left: 0;
    color: var(--tt-muted);
    font-weight: 400;
}

.club-seat-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.club-table-actions .game-card-btn {
    min-height: 36px;
    padding: 6px 12px;
}

.club-seat-actions .game-card-btn,
.club-person-remove {
    min-height: 32px;
    padding: 4px 10px;
    font-size: 0.85rem;
}

.club-organizer-tools {
    display: grid;
    gap: 10px;
    margin-top: 16px;
}

.club-link-box {
    display: grid;
    gap: 6px;
}

.club-link-box label {
    font-weight: 600;
}

.club-link-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.club-link-row .upload-input {
    flex: 1 1 220px;
    min-width: 0;
}

.club-leave {
    margin-top: 16px;
}

.club-missing {
    display: grid;
    gap: 12px;
    justify-items: start;
}

.club-missing p {
    margin: 0;
}

/* Dialogs and the meeting form. */
.club-dialog-group {
    margin: 14px 0 6px;
    font-size: 0.95rem;
}

.club-dialog-group:first-of-type {
    margin-top: 0;
}

.club-game-picker {
    display: grid;
    gap: 8px;
    min-width: 0;
}

.club-friend-checks li {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 0;
    border-top: 1px solid var(--tt-line);
}

.club-friend-checks label {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: baseline;
}

.club-check {
    width: 24px;
    height: 24px;
    flex: 0 0 24px;
    accent-color: var(--tt-accent);
}

.club-no-friends {
    margin: 0;
}

.club-kind-field {
    display: grid;
    gap: 6px;
}

.club-kind-btn {
    min-height: 36px;
    padding: 6px 12px;
    font: inherit;
    cursor: pointer;
}

.club-seat-select {
    max-width: 160px;
}

/* Spec 292 rule 2: the start button as wide as the seats, its remove button level beside it. */
.club-time-input {
    max-width: calc(160px + 32px + .45rem);
    align-items: center;
}

/* Spec 227 rules 3-4: the Pro limits of a club meeting, for its organizer and in the meeting form. */
.club-limits p {
    margin: 0 0 12px;
}

.club-kind-limits {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-top: 6px;
}

.club-kind-limits .game-card-btn {
    width: auto;
    margin: 0;
}

/* Spec 248: the club management page - the page address with its prefix, the public link and the meetings. */
.club-own-slug {
    display: flex;
    align-items: center;
    gap: 6px;
}

.club-own-slug .game-filter-input {
    flex: 1 1 auto;
    min-width: 0;
}

.club-own-link-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 12px;
}

.club-own-link-row .game-filter-input {
    flex: 1 1 16rem;
    min-width: 0;
}

.club-own-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 10px;
}

.club-own-list li {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 12px;
}

.club-own-title {
    flex: 1 1 12rem;
    overflow-wrap: anywhere;
}

.club-own-check {
    list-style: none;
    padding: 0;
    margin: 0;
}

/* Spec 249: the club shelf - boxes in a grid with the title and player counts under each, and the draw. */
.club-shelf-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
    gap: 18px 14px;
}

.club-shelf-game {
    display: grid;
    justify-items: center;
    align-content: start;
    gap: 6px;
    min-width: 0;
    text-align: center;
}

/* The box is the first child; the sheet keeps one rule ending in .club-box. */
.club-shelf-game > :first-child {
    width: 72px;
}

.club-shelf-name {
    font-weight: 700;
    font-size: 0.85rem;
    line-height: 1.2;
    overflow-wrap: anywhere;
}

.club-shelf-players {
    font-size: 0.78rem;
    opacity: 0.85;
}

.club-shelf-remove.game-card-btn {
    width: auto;
    margin: 0;
    padding: 4px 10px;
    font-size: 0.78rem;
}

/* Spec 254 rule 9: the shelf dialog - search and bulk buttons over the library as ticked cover tiles. */
.club-shelf-dialog-tools {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 10px;
    margin-bottom: 12px;
}

.club-shelf-dialog-search {
    flex: 1 1 14rem;
    min-width: 0;
}

.club-shelf-choice.is-on-shelf {
    cursor: default;
}

.club-shelf-choice-mark {
    display: block;
}

/* Spec 254 rule 4: the club crown beside the meeting form's label. */
.club-page-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.club-table-shelf {
    margin-top: 8px;
}

.club-shelf-draw-row {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 10px 16px;
}

.club-shelf-draw-row .game-card-btn {
    width: auto;
    margin: 0;
}

.club-shelf-draw-result {
    margin-top: 12px;
}

.club-shelf-draw-pick > :first-child {
    width: 56px;
    flex: 0 0 auto;
}

/* Spec 256: the page look editor - each part on an inset block, picture previews, the colour row, the map and the
   description blocks with their buttons. */
.club-look-part {
    margin-top: 14px;
    padding: 12px 14px;
    border: 1px solid var(--tt-line);
    background: var(--tt-field);
    min-width: 0;
}

.club-look-part h4 {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin: 0 0 10px;
    font-size: 1rem;
}

.club-look-pictures {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
    gap: 14px;
}

.club-look-picture {
    display: grid;
    align-content: start;
    gap: 8px;
    min-width: 0;
}

.club-look-picture p {
    margin: 0;
}

.club-look-picture-label {
    font-weight: 700;
}

.club-look-logo-preview,
.club-look-header-preview {
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border: 1px dashed var(--tt-line);
    background: var(--tt-area);
}

.club-look-logo-preview {
    width: 112px;
    height: 112px;
}

.club-look-logo-preview img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.club-look-header-preview {
    width: 100%;
    aspect-ratio: 16 / 6;
}

.club-look-header-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.club-look-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.club-look-actions .game-card-btn,
.club-look-color-row .game-card-btn,
.club-look-pin-status .game-card-btn {
    width: auto;
    margin: 0;
}

.club-look .friends-photo-input:focus-visible + label {
    outline: 2px solid var(--focus-ring);
    outline-offset: 3px;
}

/* Spec 267 rule 6: the logo and header fields are the buttons - the hint over the picture, a frame on hover and focus. */
.club-look-pick {
    position: relative;
    cursor: pointer;
    transition: border-color 0.15s;
}

.club-look-pick:hover,
.club-look-pick:focus-within {
    border-style: solid;
    border-color: var(--tt-accent);
}

.club-look-pick:focus-within {
    outline: 2px solid var(--focus-ring);
    outline-offset: 3px;
}

.club-look-pick.is-busy {
    cursor: progress;
    opacity: 0.7;
}

.club-look-pick-hint {
    padding: 4px 8px;
    font-size: 0.85rem;
    font-weight: 700;
    text-align: center;
    color: var(--tt-ink);
}

.club-look-pick img + .club-look-pick-hint {
    position: absolute;
    inset: auto 0 0;
    background: color-mix(in srgb, var(--tt-area) 82%, transparent);
    opacity: 0;
    transition: opacity 0.15s;
}

.club-look-pick:hover img + .club-look-pick-hint,
.club-look-pick:focus-within img + .club-look-pick-hint {
    opacity: 1;
}

/* Rule 7: the save button stands apart from the last part. */
.club-look > .club-callout-actions {
    margin-top: 1.25rem;
}

.club-look-color-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 10px;
}

.club-look-color {
    width: 56px;
    height: 42px;
    padding: 3px;
    cursor: pointer;
}

.club-look-color-text {
    width: 9rem;
    max-width: 100%;
}

.club-look-swatch {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border: 1px solid var(--tt-line);
    font-weight: 700;
}

.club-look-pin-row {
    display: flex;
    gap: 8px;
}

.club-look-pin-row .game-filter-input {
    flex: 1 1 auto;
    min-width: 0;
}

.club-look-pin-row .game-card-btn {
    flex: 0 0 auto;
    width: auto;
    margin: 0;
}

.club-look-pin-status {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 12px;
    margin: 10px 0;
}

.club-look-map,
.club-look-map-preview {
    display: block;
    width: 100%;
    border: 1px solid var(--tt-line);
    background: var(--tt-area);
}

.club-look-map {
    height: clamp(240px, 45vw, 360px);
    margin-top: 10px;
}

.club-look-map-preview {
    aspect-ratio: 16 / 10;
    min-height: 220px;
}

.club-look-links label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.club-look-blocks {
    list-style: none;
    padding: 0;
    margin: 0 0 10px;
    display: grid;
    gap: 10px;
}

.club-look-block {
    display: grid;
    gap: 8px;
    min-width: 0;
    padding: 10px;
    border: 1px solid var(--tt-line);
    background: var(--tt-area);
}

.club-look-block-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 6px 10px;
}

.club-look-text {
    width: 100%;
    min-height: 7rem;
    resize: vertical;
}

.club-look-block-img {
    display: block;
    max-width: 100%;
    max-height: 260px;
    object-fit: contain;
}

.club-look-add {
    margin-bottom: 6px;
}

/* Spec 259: the club board and members, and the meeting form's audience choice; spec 263: the list of My clubs, the
   club page's header and tabs, and the owner's posts in turquoise. Each row and post is its own framed box with cut
   corners. */
html.tabletop {
    --tt-club-ink: #43d1c0;
}

html.tabletop[data-theme="light"],
html.tabletop .page.theme-light {
    --tt-club-ink: #0b6f65;
}

.club-hub-rows,
.club-board-posts {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 12px;
}

.club-hub-row,
.club-board-post {
    display: grid;
    gap: 8px;
    min-width: 0;
    padding: 12px 14px;
    border: 1px solid var(--tt-line);
    background: var(--tt-field);
}

.club-board-post.is-unread {
    border-color: var(--tt-accent);
}

/* Spec 263 rule 14: the owner's posts wear the club turquoise - a heavier frame on the left and the badge. */
.club-board-post.is-owner-post {
    border-color: var(--tt-club-ink);
    box-shadow: inset 4px 0 0 var(--tt-club-ink);
    padding-left: 18px;
}

.club-board-post-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 10px;
    min-width: 0;
}

.club-board-post-author {
    font-weight: 700;
    overflow-wrap: anywhere;
}

/* The "You run it", "Runs the club" and "Club owner" badge: turquoise, framed, never a fill behind text. */
.club-owner-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 1px 8px;
    border: 1px solid var(--tt-club-ink);
    color: var(--tt-club-ink);
    font-size: 0.78rem;
    font-weight: 700;
    line-height: 1.5;
    white-space: nowrap;
}

/* Rule 1: one row per club - the logo, the text and "Enter"; spec 271 rule 3: a click anywhere on the row enters. */
.club-hub-row {
    position: relative;
    grid-template-columns: 48px minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px 14px;
    cursor: pointer;
    transition: border-color 0.15s;
}

.club-hub-row:hover {
    border-color: var(--tt-accent);
}

.club-hub-row.is-owner {
    border-color: var(--tt-club-ink);
}

.club-hub-row-text {
    display: grid;
    gap: 2px;
    min-width: 0;
    overflow-wrap: anywhere;
}

.club-hub-row-name {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 8px;
    min-width: 0;
}

.club-hub-empty {
    margin: 0;
}

/* Rule 7: the club page's header line. */
.club-hub-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 12px;
    margin-top: 8px;
}

.club-hub-head-text {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 10px;
    flex: 1 1 10rem;
    min-width: 0;
}

/* Rules 8-9: the tabs scroll sideways inside their bar; the open one has the accent line on top. */
.club-hub-tabs {
    display: flex;
    gap: 4px;
    overflow-x: auto;
    min-width: 0;
    max-width: 100%;
    border-bottom: 1px solid var(--tt-line);
    /* It scrolls sideways on narrow screens (swipe or wheel), without a bar under the tabs. */
    scrollbar-width: none;
}

.club-hub-tabs::-webkit-scrollbar {
    display: none;
}

/* With a mouse a hidden bar is no way to the last tab: from tablet width the tabs wrap instead. */
@media (min-width: 600px) {
    .club-hub-tabs {
        flex-wrap: wrap;
        overflow-x: visible;
    }
}

.club-hub-tab {
    flex: 0 0 auto;
    padding: 10px 14px;
    color: var(--tt-muted);
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
    border: 1px solid transparent;
    border-bottom: 0;
}

.club-hub-tab:hover {
    color: var(--tt-ink);
    border-color: var(--tt-accent);
    text-decoration: none;
}

/* Spec 271 rule 4: the open tab wears the cards' top - the accent line; tabletop-screens.css cuts its corners. */
.club-hub-tab.is-open {
    color: var(--tt-ink);
    background: var(--tt-area);
    border-color: var(--tt-line);
    border-top: 2px solid var(--tt-accent);
}

.club-hub-panel {
    display: grid;
    gap: 16px;
    min-width: 0;
}

.club-hub-unavailable {
    margin: 0;
    font-weight: 600;
}

.club-person-joined {
    display: block;
}

.club-remove-block {
    margin-top: 10px;
}

.club-membership-logo {
    flex: 0 0 48px;
    width: 48px;
    height: 48px;
    object-fit: cover;
    border: 1px solid var(--tt-line);
    background: var(--tt-area);
}

.club-membership-initials {
    display: grid;
    place-items: center;
    font-family: var(--tt-font-display);
    font-weight: 700;
}

.club-membership-unread {
    flex: 0 0 auto;
    margin-left: 0;
}

.club-option {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    flex: 1 1 14rem;
    cursor: pointer;
}

.club-option input {
    flex: 0 0 auto;
}

.club-board-compose {
    display: grid;
    gap: 6px;
    margin-bottom: 14px;
    padding: 12px 14px;
    border: 1px solid var(--tt-line);
    background: var(--tt-area);
}

.club-board-compose .game-filter-input,
.club-board-post .game-filter-input {
    width: 100%;
    min-width: 0;
}

.club-board-body-input,
.club-board-post textarea {
    min-height: 7rem;
    resize: vertical;
}

.club-board-compose .club-callout-actions {
    justify-content: space-between;
    align-items: center;
}

.club-board-post-title {
    margin: 0;
    font-size: 1.05rem;
    overflow-wrap: anywhere;
}

.club-board-post-date {
    margin: 0;
}

.club-board-new {
    margin: 0 6px 0 0;
}

.club-board-post-body {
    margin: 0;
    white-space: pre-line;
    overflow-wrap: anywhere;
}

.club-board-empty,
.club-members-empty {
    margin: 0 0 8px;
}

/* Spec 291 rule 2: the audience switch on its own line under the club page choice. */
.club-audience-switch {
    display: flex;
    width: fit-content;
    max-width: 100%;
    margin: 8px 0 4px;
    cursor: pointer;
}

@media (max-width: 420px) {
    .club-hub-row,
    .club-board-post,
    .club-board-compose {
        padding: 10px;
    }

    .club-board-post.is-owner-post {
        padding-left: 14px;
    }

    /* Rule 1: on a phone "Open" goes under the text, the whole width. */
    .club-hub-row {
        grid-template-columns: 40px minmax(0, 1fr);
    }

    .club-hub-row .club-membership-logo {
        width: 40px;
        height: 40px;
        flex-basis: 40px;
    }

    .club-hub-open {
        grid-column: 1 / -1;
        justify-self: stretch;
        text-align: center;
    }
}

/* Spec 268 rule 5: a club page's background pattern - the play card patterns as masks over the page colour's ink, so
   one rule colours them all; the layer never takes clicks. */
.club-pattern-host {
    position: relative;
    isolation: isolate;
}

.club-pattern {
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background-color: var(--club-pattern-ink, #fbf4ea);
    opacity: 0.16;
    -webkit-mask-image: var(--club-pattern-mask);
    mask-image: var(--club-pattern-mask);
    -webkit-mask-repeat: repeat;
    mask-repeat: repeat;
}

.club-pattern[data-pattern="grid"] {
    --club-pattern-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='28'%3E%3Cpath d='M28 0H0V28' fill='none' stroke='black' stroke-width='1.5'/%3E%3C/svg%3E");
}

.club-pattern[data-pattern="hexes"] {
    --club-pattern-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='30' height='51.96'%3E%3Cpath d='M15 0L30 8.66V25.98L15 34.64L0 25.98V8.66ZM15 34.64V51.96' fill='none' stroke='black' stroke-width='1.5'/%3E%3C/svg%3E");
}

.club-pattern[data-pattern="dots"] {
    --club-pattern-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='22'%3E%3Ccircle cx='11' cy='11' r='2.4'/%3E%3C/svg%3E");
}

.club-pattern[data-pattern="stripes"] {
    --club-pattern-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20'%3E%3Cpath d='M-5 5L5 -5M0 20L20 0M15 25L25 15' stroke='black' stroke-width='3.5'/%3E%3C/svg%3E");
}

.club-pattern[data-pattern="speckles"] {
    --club-pattern-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='48'%3E%3Ccircle cx='6' cy='9' r='1.6'/%3E%3Ccircle cx='31' cy='4' r='1.1'/%3E%3Ccircle cx='19' cy='22' r='1.4'/%3E%3Ccircle cx='41' cy='27' r='1.7'/%3E%3Ccircle cx='9' cy='38' r='1.2'/%3E%3Ccircle cx='28' cy='41' r='1.5'/%3E%3Ccircle cx='44' cy='12' r='0.9'/%3E%3C/svg%3E");
}

.club-pattern[data-pattern="grain"] {
    --club-pattern-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='80' height='24'%3E%3Cpath d='M0 6C20 2 45 11 80 6M0 17C25 21 50 12 80 17' fill='none' stroke='black' stroke-width='1.3'/%3E%3C/svg%3E");
}

.club-pattern[data-pattern="diamonds"] {
    --club-pattern-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24'%3E%3Cpath d='M12 0L24 12L12 24L0 12Z' fill='none' stroke='black' stroke-width='1.4'/%3E%3C/svg%3E");
}

/* Rule 6: the editor's colours - the fields, the pattern choices and the preview of a block on the page. */
.club-look-colors {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 280px);
    gap: 16px;
    align-items: start;
}

.club-look-color-fields {
    display: grid;
    gap: 12px;
    min-width: 0;
}

.club-look-color-field {
    display: grid;
    gap: 6px;
    min-width: 0;
}

.club-look-color-label {
    font-weight: 700;
}

.club-look-patterns {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.club-look-pattern {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 40px;
    padding: 4px 10px 4px 4px;
    border: 1px solid var(--tt-line);
    background: var(--tt-field);
    color: var(--tt-ink);
    font: inherit;
    font-size: 0.85rem;
    cursor: pointer;
}

.club-look-pattern:hover {
    border-color: var(--tt-accent);
}

.club-look-pattern.is-on {
    box-shadow: 0 0 0 2px var(--tt-accent);
    border-color: var(--tt-accent);
}

.club-look-pattern-swatch {
    display: block;
    width: 30px;
    height: 30px;
    flex: 0 0 30px;
    overflow: hidden;
    border: 1px solid var(--tt-line);
}

.club-look-pattern-swatch .club-pattern {
    opacity: 0.35;
}

.club-look-preview {
    display: grid;
    place-items: center;
    min-height: 180px;
    padding: 22px;
    overflow: hidden;
    border: 1px solid var(--tt-line);
}

.club-look-preview-block {
    position: relative;
    z-index: 1;
    display: grid;
    justify-items: start;
    gap: 6px;
    width: 100%;
    padding: 12px 14px;
    background: var(--club-card);
    color: var(--club-text);
    border: 1px solid color-mix(in srgb, var(--club-text) 28%, var(--club-card));
}

.club-look-preview-block strong {
    font-family: var(--tt-font-display);
    font-size: 1.3rem;
}

.club-look-preview-btn {
    width: auto;
    margin: 4px 0 0;
    padding: 0.35rem 0.8rem;
    font-size: 0.85rem;
    pointer-events: none;
}

.club-look-contrast {
    margin-top: 10px;
}

@media (max-width: 640px) {
    .club-look-colors {
        grid-template-columns: minmax(0, 1fr);
    }
}

/* Spec 279 rule 5: the table's games, one per line, a shelf game marked, the quiet remove button on the right. */
.club-table-game-list {
    display: grid;
    gap: 2px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.club-table-game {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.club-table-game-name {
    flex: 1 1 auto;
    min-width: 0;
    overflow-wrap: anywhere;
}

.club-table-game-mark,
.club-game-taken {
    color: var(--tt-muted);
    font-size: 0.85rem;
}

.club-table-game-remove {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    min-height: 32px;
    padding: 0;
    color: var(--tt-muted);
    background: none;
    border: 1px solid transparent;
    cursor: pointer;
}

.club-table-game-remove:hover {
    color: var(--tt-accent);
    border-color: var(--tt-accent);
}

/* Spec 279 rule 2: the two sources of a table game. */
.club-game-sources {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.club-game-taken {
    margin-left: 6px;
}

/* Spec 285 rules 8-9: the heart of a club page, filled in the danger red once the club is a favourite. */
.club-fav-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.club-fav-btn .club-fav-heart {
    flex: 0 0 auto;
}

.club-fav-btn.is-on .club-fav-heart {
    color: var(--tt-danger);
}

.club-fav-note {
    margin: 8px 0 0;
}

/* Spec 323 rule 13: on a phone the heart still fits beside "Open the club" or "Join us". */
@media (max-width: 480px) {
    .auth-container .club-public-join .club-public-actions .game-card-btn {
        padding-inline: 12px;
    }
}

/* Spec 307: the report form - in the app's dialog and on the static club page - and the admin queue. */
.report-form {
    display: grid;
    gap: 8px;
}

.report-form .form-label,
.club-report-form .form-label {
    margin: 4px 0 0;
}

.report-choice {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    cursor: pointer;
    overflow-wrap: anywhere;
}

.report-done {
    margin: 0;
    font-weight: 700;
}

.msg-meta .msg-report {
    margin-left: auto;
}

.club-person .club-person-report {
    margin-left: auto;
}

.club-report-form {
    display: grid;
    gap: 10px;
}

.club-report-form .form-field {
    display: grid;
    gap: 4px;
}

.club-report-form .club-public-actions,
.club-public-report-open .club-public-actions {
    margin-top: 4px;
}

.club-public-report-open p {
    margin: 0 0 8px;
}

.admin-report-excerpt,
.admin-report-why,
.admin-report-url {
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}
