@import url("themes/catppuccin-2CVhlxZ.css");

/* --- Base & Reset --- */
* {
    box-sizing: border-box;
}

/* Components such as .btn set their own display, which would otherwise beat
   the browser's default for the hidden attribute. */
[hidden] {
    display: none !important;
}

body {
    margin: 0;
    padding: 0;
    font-family: system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--cb-bg);
    color: var(--cb-text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* --- Accessibility --- */
:focus-visible {
    outline: 2px solid var(--cb-accent);
    outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* --- Layout / Chrome --- */
.app-header {
    background-color: var(--cb-surface);
    border-bottom: 1px solid var(--cb-border);
    padding: 1rem 0;
    margin-bottom: 2rem;
}

.app-header__brand {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--cb-accent);
    text-decoration: none;
    letter-spacing: -0.025em;
}

.app-header__inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem 1.5rem;
}

.app-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem 1.25rem;
    align-items: center;
}

.app-nav__links {
    display: flex;
    gap: 0.25rem;
    padding: 0.25rem;
    border-radius: 999px;
    background-color: var(--cb-surface-alt);
}

.app-nav__link {
    padding: 0.35rem 0.9rem;
    border-radius: 999px;
    color: var(--cb-text-muted);
    font-size: 0.9375rem;
    font-weight: 600;
    text-decoration: none;
    transition: background-color 0.2s, color 0.2s;
}

.app-nav__link:hover {
    color: var(--cb-text);
    background-color: var(--cb-surface);
}

.app-nav__link[aria-current="page"] {
    color: var(--cb-accent-text);
    background-color: var(--cb-accent);
}

.app-nav__link--quiet {
    padding: 0.25rem 0.6rem;
    font-size: 0.875rem;
    font-weight: 500;
}

.app-nav .app-nav__cta {
    padding: 0.45rem 1rem;
    font-size: 0.9375rem;
    text-decoration: none;
}

/* "Log out" is a form (see _logout_form.html.twig) whose button looks like the links around it. */
.logout-form {
    display: contents;
}

.logout-form button {
    border: 0;
    background: none;
    font-family: inherit;
    line-height: inherit;
    text-align: left;
    cursor: pointer;
}

/* The account menu: a <details> dropdown (see user_menu_controller.js). */
.user-menu {
    position: relative;
    padding-left: 1.25rem;
    border-left: 1px solid var(--cb-border);
}

.user-menu__toggle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.25rem 0.6rem 0.25rem 0.25rem;
    border-radius: 999px;
    cursor: pointer;
    list-style: none;
    user-select: none;
    transition: background-color 0.2s;
}

.user-menu__toggle::-webkit-details-marker {
    display: none;
}

.user-menu__toggle:hover,
.user-menu[open] .user-menu__toggle {
    background-color: var(--cb-surface-alt);
}

.user-menu__caret {
    width: 0.45rem;
    height: 0.45rem;
    margin: 0 0.15rem 0.2rem;
    border-right: 2px solid var(--cb-text-muted);
    border-bottom: 2px solid var(--cb-text-muted);
    transform: rotate(45deg);
    transition: transform 0.2s;
}

.user-menu[open] .user-menu__caret {
    margin-bottom: -0.1rem;
    transform: rotate(-135deg);
}

.user-menu__panel {
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    z-index: 50;
    display: grid;
    min-width: 15rem;
    padding: 0.4rem;
    border: 1px solid var(--cb-border);
    border-radius: 0.75rem;
    background-color: var(--cb-surface);
    box-shadow: 0 10px 25px -5px var(--cb-shadow), 0 4px 6px -2px var(--cb-shadow);
}

.user-menu__who {
    display: grid;
    padding: 0.5rem 0.75rem 0.6rem;
    margin-bottom: 0.3rem;
    border-bottom: 1px solid var(--cb-border);
    font-size: 0.875rem;
    line-height: 1.4;
    overflow-wrap: anywhere;
}

.user-menu__item {
    padding: 0.5rem 0.75rem;
    border-radius: 0.5rem;
    color: var(--cb-text);
    font-size: 0.9375rem;
    text-decoration: none;
}

.user-menu__item:hover,
.user-menu__item[aria-current="page"] {
    background-color: var(--cb-surface-alt);
}

.user-menu__item--danger {
    color: var(--cb-danger);
}

.app-nav__avatar {
    display: grid;
    place-items: center;
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    background-color: var(--cb-accent);
    color: var(--cb-accent-text);
    font-weight: 700;
    font-size: 0.9375rem;
}

.app-nav__name {
    font-weight: 600;
    max-width: 12rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Only for the small-screen menu. */
.app-header__toggle,
.app-nav__account {
    display: none;
}

.app-header__toggle {
    align-items: center;
    justify-content: center;
    width: 2.75rem;
    height: 2.75rem;
    padding: 0;
    border: 1px solid var(--cb-border);
    border-radius: 0.625rem;
    background-color: var(--cb-surface-alt);
    color: var(--cb-text);
    cursor: pointer;
}

/* Three bars that fold into a cross while the menu is open. */
.app-header__toggle-bars,
.app-header__toggle-bars::before,
.app-header__toggle-bars::after {
    display: block;
    width: 1.25rem;
    height: 2px;
    border-radius: 2px;
    background-color: currentColor;
    transition: transform 0.2s, background-color 0.2s;
}

.app-header__toggle-bars {
    position: relative;
}

.app-header__toggle-bars::before,
.app-header__toggle-bars::after {
    content: "";
    position: absolute;
    left: 0;
}

.app-header__toggle-bars::before {
    top: -6px;
}

.app-header__toggle-bars::after {
    top: 6px;
}

.app-header__toggle[aria-expanded="true"] .app-header__toggle-bars {
    background-color: transparent;
}

.app-header__toggle[aria-expanded="true"] .app-header__toggle-bars::before {
    transform: translateY(6px) rotate(45deg);
}

.app-header__toggle[aria-expanded="true"] .app-header__toggle-bars::after {
    transform: translateY(-6px) rotate(-45deg);
}

@media (max-width: 960px) {
    .app-header {
        padding: 0.75rem 0;
    }

    .app-header__inner {
        flex-wrap: wrap;
    }

    /* With JavaScript: fold the nav away behind the button. */
    .app-header[data-nav-ready] .app-header__toggle {
        display: inline-flex;
    }

    .app-header[data-nav-ready]:not(.app-header--open) .app-nav {
        display: none;
    }

    .app-nav {
        flex-basis: 100%;
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
        padding-top: 0.75rem;
        border-top: 1px solid var(--cb-border);
    }

    .app-nav__links {
        flex-direction: column;
        padding: 0;
        border-radius: 0;
        background: none;
    }

    .app-nav__link {
        padding: 0.7rem 0.9rem;
        border-radius: 0.625rem;
        font-size: 1rem;
    }

    .app-nav .app-nav__cta {
        padding: 0.7rem 1rem;
        font-size: 1rem;
    }

    .user-menu {
        display: none;
    }

    .app-nav__account {
        display: flex;
        flex-direction: column;
        gap: 0.25rem;
        padding-top: 0.75rem;
        border-top: 1px solid var(--cb-border);
    }

    .app-nav__who {
        display: flex;
        align-items: center;
        gap: 0.75rem;
        padding: 0 0.9rem 0.5rem;
        line-height: 1.35;
        overflow-wrap: anywhere;
    }

    .app-nav__who > span:last-child {
        display: grid;
        font-size: 0.9375rem;
    }

    .app-nav__link--danger,
    .app-nav__link--danger:hover {
        color: var(--cb-danger);
    }

    .theme-picker {
        justify-content: space-between;
        padding: 0.75rem 0.9rem 0.25rem;
        border-top: 1px solid var(--cb-border);
    }
}

.app-main {
    padding-bottom: 4rem;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.page-title {
    margin: 0 0 1.5rem 0;
    font-size: 2rem;
    font-weight: 700;
    color: var(--cb-text);
}

/* Chartbuster or Gallows Bound, above the new-game form. */
.edition-picker {
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.card {
    background-color: var(--cb-surface);
    border: 1px solid var(--cb-border);
    border-radius: 0.75rem;
    padding: 1.5rem;
    box-shadow: 0 4px 6px -1px var(--cb-shadow), 0 2px 4px -2px var(--cb-shadow);
}

.card__title {
    margin: 0 0 1.25rem 0;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--cb-accent);
}

.muted {
    color: var(--cb-text-muted);
}

.stack {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.row {
    display: flex;
    flex-direction: row;
    gap: 1rem;
    align-items: center;
}

/* --- Buttons --- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.625rem 1.25rem;
    border-radius: 0.5rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid transparent;
    font-family: inherit;
    font-size: 0.9375rem;
    text-decoration: none;
    user-select: none;
}

.btn--primary {
    background-color: var(--cb-accent);
    color: var(--cb-accent-text);
}

.btn--primary:hover:not([disabled]) {
    opacity: 0.9;
    transform: translateY(-1px);
}

.btn--ghost {
    background-color: transparent;
    color: var(--cb-text);
    border-color: var(--cb-border);
}

.btn--ghost:hover:not([disabled]) {
    background-color: var(--cb-surface-alt);
}

.btn--danger {
    background-color: var(--cb-danger);
    color: var(--cb-accent-text);
}

.btn--danger:hover:not([disabled]) {
    opacity: 0.9;
    transform: translateY(-1px);
}

.btn[disabled] {
    opacity: 0.5;
    cursor: not-allowed;
    filter: grayscale(0.5);
}

/* --- Forms --- */
.form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.form-row {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
}

.form-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--cb-text);
}

.form-input,
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
select {
    padding: 0.625rem;
    border: 1px solid var(--cb-border);
    border-radius: 0.5rem;
    background-color: var(--cb-surface-alt);
    color: var(--cb-text);
    font-family: inherit;
    font-size: 1rem;
    transition: border-color 0.2s, box-shadow 0.2s;
    width: 100%;
}

.form-input:focus,
input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
input[type="number"]:focus,
select:focus {
    outline: none;
    border-color: var(--cb-accent);
    box-shadow: 0 0 0 2px var(--cb-shadow);
}

.form-error {
    color: var(--cb-danger);
    font-size: 0.8125rem;
    font-weight: 500;
}

.form-help {
    color: var(--cb-text-muted);
    font-size: 0.8125rem;
}

/* --- Flash / Alerts --- */
.alert {
    padding: 1rem 1.25rem;
    border-radius: 0.5rem;
    margin-bottom: 1.5rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.alert--success {
    background-color: var(--cb-success);
    color: var(--cb-bg);
}

.alert--error {
    background-color: var(--cb-danger);
    color: var(--cb-bg);
}

.alert--info {
    background-color: var(--cb-accent);
    color: var(--cb-accent-text);
}

/* --- Games List --- */
.game-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.game-list + .row {
    margin-top: 1.25rem;
}

.game-list__item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.25rem;
    background-color: var(--cb-surface);
    border: 1px solid var(--cb-border);
    border-radius: 0.75rem;
    transition: transform 0.2s, border-color 0.2s;
}

.game-list__item {
    position: relative;
    gap: 0.75rem 1rem;
}

.game-list__item:hover,
.game-list__item:has(.game-list__link:focus-visible) {
    border-color: var(--cb-accent);
    transform: translateX(4px);
}

.game-list__main {
    gap: 0.15rem;
    min-width: 0;
}

.game-list__link {
    color: var(--cb-text);
    font-size: 1.0625rem;
    font-weight: 700;
    text-decoration: none;
    overflow-wrap: anywhere;
    transition: color 0.2s;
}

/* Stretch the link over the whole card, so clicking anywhere on it opens the game. */
.game-list__link::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
}

/* The whole card shows the focus ring instead of just the name. */
.game-list__link:focus-visible {
    outline: none;
}

.game-list__item:has(.game-list__link:focus-visible) {
    outline: 2px solid var(--cb-accent);
    outline-offset: 2px;
}

.game-list__item:hover .game-list__link,
.game-list__link:focus-visible {
    color: var(--cb-accent);
}

.game-list__meta {
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.6rem;
}

/* Compact buttons, so they don't outweigh the game itself. */
.game-list__meta .btn {
    padding: 0.35rem 0.8rem;
    font-size: 0.8125rem;
}

/* Buttons and swatch tooltips stay usable above the stretched link. */
.game-list__meta form,
.game-list__meta .btn,
.game-list__meta .player__swatch {
    position: relative;
    z-index: 1;
}

.game-list__chevron {
    width: 0.55rem;
    height: 0.55rem;
    margin: 0 0.25rem 0 0.15rem;
    border-top: 2px solid var(--cb-text-muted);
    border-right: 2px solid var(--cb-text-muted);
    transform: rotate(45deg);
    transition: border-color 0.2s, transform 0.2s;
}

.game-list__item:hover .game-list__chevron {
    border-color: var(--cb-accent);
    transform: translateX(2px) rotate(45deg);
}

@media (max-width: 640px) {
    .game-list__item {
        flex-direction: column;
        align-items: stretch;
    }

    .game-list__meta {
        justify-content: flex-start;
    }

    .game-list__chevron {
        position: absolute;
        top: 1.5rem;
        right: 1.25rem;
    }

    .game-list__main {
        padding-right: 1.5rem;
    }
}

.badge {
    padding: 0.25rem 0.625rem;
    border-radius: 9999px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.badge--lobby { background-color: var(--cb-accent); color: var(--cb-accent-text); }
.badge--in-progress { background-color: var(--cb-warning); color: var(--cb-bg); }
.badge--finished { background-color: var(--cb-text-muted); color: var(--cb-bg); }

/* --- Lobby --- */
.lobby-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    align-items: start;
}

@media (min-width: 900px) {
    .lobby-grid {
        grid-template-columns: 1fr 1.2fr;
    }
}

.player-list {
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
}

.player {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    padding: 0.75rem 1rem;
    border-radius: 0.625rem;
    background-color: var(--cb-surface-alt);
    border: 1px solid transparent;
}

.player__swatch {
    /* A <span>: without this it collapses when used inline in running text. */
    display: inline-block;
    vertical-align: middle;
    width: 1.25rem;
    height: 1.25rem;
    border-radius: 50%;
    border: 2px solid rgba(0,0,0,0.1);
    flex-shrink: 0;
}

.player__name {
    flex-grow: 1;
    font-weight: 500;
}

.player__you {
    font-weight: 700;
    color: var(--cb-accent);
}

.player__host::after {
    content: "HOST";
    font-size: 0.625rem;
    padding: 0.125rem 0.375rem;
    background-color: var(--cb-border);
    color: var(--cb-text-muted);
    border-radius: 0.25rem;
    margin-left: 0.5rem;
    font-weight: 800;
    vertical-align: middle;
}

.colour-picker {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1.25rem;
    padding: 1rem;
    background-color: var(--cb-surface-alt);
    border-radius: 0.75rem;
}

.colour-swatch {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    cursor: pointer;
    border: 3px solid transparent;
    transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 4px var(--cb-shadow);
}

.colour-swatch:hover:not(.colour-swatch--taken) {
    transform: scale(1.15);
}

.colour-swatch--taken {
    opacity: 0.2;
    cursor: not-allowed;
    transform: scale(0.9);
}

.colour-swatch--mine {
    border-color: var(--cb-text);
    box-shadow: 0 0 0 2px var(--cb-bg), 0 0 0 5px var(--cb-accent);
}

/* Token Color Mapping */
[data-colour="red"] { background-color: var(--cb-colour-red); color: var(--cb-colour-red-fg); }
[data-colour="blue"] { background-color: var(--cb-colour-blue); color: var(--cb-colour-blue-fg); }
[data-colour="pink"] { background-color: var(--cb-colour-pink); color: var(--cb-colour-pink-fg); }
[data-colour="green"] { background-color: var(--cb-colour-green); color: var(--cb-colour-green-fg); }
[data-colour="purple"] { background-color: var(--cb-colour-purple); color: var(--cb-colour-purple-fg); }
[data-colour="black"] { background-color: var(--cb-colour-black); color: var(--cb-colour-black-fg); }
[data-colour="white"] { background-color: var(--cb-colour-white); color: var(--cb-colour-white-fg); border: 1px solid var(--cb-border); }
[data-colour="yellow"] { background-color: var(--cb-colour-yellow); color: var(--cb-colour-yellow-fg); }
[data-colour="orange"] { background-color: var(--cb-colour-orange); color: var(--cb-colour-orange-fg); }

.lobby-status {
    font-weight: 700;
    margin-top: 1.5rem;
    text-align: center;
    padding: 0.75rem;
    background-color: var(--cb-surface-alt);
    border-radius: 0.5rem;
    color: var(--cb-accent);
}

.rules-panel {
    background-color: var(--cb-surface);
    border: 1px solid var(--cb-border);
    border-radius: 0.75rem;
    padding: 1.5rem;
    height: 100%;
}

.rules-content {
    max-height: 60vh;
    overflow-y: auto;
    padding-right: 1.25rem;
}

/* Rules Scrollbar styling */
.rules-content::-webkit-scrollbar {
    width: 6px;
}
.rules-content::-webkit-scrollbar-track {
    background: transparent;
}
.rules-content::-webkit-scrollbar-thumb {
    background: var(--cb-border);
    border-radius: 10px;
}

/* Rules Markdown Styling */
.rules-content h1, .rules-content h2, .rules-content h3 { 
    color: var(--cb-accent); 
    margin: 1.5rem 0 1rem 0; 
    line-height: 1.2;
}
.rules-content h1 { font-size: 1.75rem; }
.rules-content h2 { font-size: 1.5rem; border-bottom: 1px solid var(--cb-border); padding-bottom: 0.5rem; }
.rules-content h3 { font-size: 1.25rem; }

.rules-content p { margin-bottom: 1.25rem; }
.rules-content ul, .rules-content ol { margin-bottom: 1.25rem; padding-left: 1.5rem; }
.rules-content li { margin-bottom: 0.5rem; }

.rules-content blockquote {
    border-left: 4px solid var(--cb-accent);
    padding: 0.75rem 1rem;
    margin: 1.5rem 0;
    background-color: var(--cb-surface-alt);
    color: var(--cb-text-muted);
    font-style: italic;
    border-radius: 0 0.5rem 0.5rem 0;
}

.rules-content em { color: var(--cb-text); font-weight: 500; }
.rules-content strong { color: var(--cb-accent); font-weight: 700; }
.rules-content hr { border: none; border-top: 2px solid var(--cb-border); margin: 2rem 0; }

/* --- Theme Picker --- */
.theme-picker {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0;
}

.theme-picker label {
    font-size: 0.875rem;
}

.theme-picker__select {
    width: auto;
    padding: 0.3rem 0.6rem;
    font-size: 0.875rem;
    font-weight: 600;
    background-color: var(--cb-surface-alt);
    border: 1px solid var(--cb-border);
    cursor: pointer;
}

.theme-picker .btn {
    padding: 0.3rem 0.75rem;
    font-size: 0.875rem;
}

/* --- Play page --- */
.container--wide {
    max-width: 1680px;
}

.play-header {
    margin-bottom: 1.5rem;
}

.board-footer {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem 1rem;
    margin-top: 0.75rem;
}

/* --- Players across the top of the board --- */
.player-strip {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr));
    gap: 0.75rem;
    margin: 0;
    /* Room for the badge that sits on the current player's top edge. */
    padding: 0.75rem 0 0;
    list-style: none;
}

.player-chip {
    position: relative;
    min-width: 0;
    border-radius: 0.75rem;
    background-color: var(--cb-surface-alt);
    border: 3px solid transparent;
    font-size: 0.875rem;
}

/* The whole card opens that player's details. */
.player-chip__button {
    display: block;
    width: 100%;
    padding: 0.625rem 0.875rem;
    border: 0;
    border-radius: inherit;
    background: none;
    color: inherit;
    font: inherit;
    text-align: left;
    cursor: pointer;
}

.player-chip:not(.player-chip--current):hover {
    border-color: var(--cb-border);
}

.player-chip__top {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1rem;
}

.player-chip__name {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 600;
}

.player-chip__money {
    margin-left: auto;
    font-variant-numeric: tabular-nums;
    font-weight: 700;
}

/* Long square names and lists of records are cut to one line; the title
   attribute holds the full text. */
.player-chip__detail {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--cb-text-muted);
}

.player-chip--current {
    border-color: var(--cb-accent);
    background-color: color-mix(in srgb, var(--cb-accent) 18%, var(--cb-surface-alt));
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--cb-accent) 30%, transparent), 0 8px 24px var(--cb-shadow);
}

.player-chip--current .player-chip__detail {
    color: var(--cb-text);
}

.player-chip__badge {
    position: absolute;
    top: 0;
    right: 0.75rem;
    transform: translateY(-50%);
    padding: 0.1rem 0.5rem;
    border-radius: 999px;
    background-color: var(--cb-accent);
    color: var(--cb-accent-text);
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.play-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 22rem;
    gap: 1.5rem;
    align-items: start;
}

@media (max-width: 1100px) {
    .play-grid {
        grid-template-columns: minmax(0, 1fr);
    }
}

.play-side .card {
    padding: 1.25rem;
}

.card__subtitle {
    margin: 1rem 0 0.5rem;
    font-size: 0.95rem;
    color: var(--cb-text-muted);
}

/* A decision blocks the game until this player answers, so the card flashes.
   The static accent border is what remains when reduced motion is on. */
.turn-card--decision {
    border-color: var(--cb-accent);
    animation: decision-flash 2s ease-in-out infinite;
}

@keyframes decision-flash {
    0%, 100% {
        border-color: var(--cb-accent);
        box-shadow: 0 0 0 2px var(--cb-accent), 0 0 1rem var(--cb-accent);
    }
    50% {
        border-color: var(--cb-border);
        box-shadow: 0 0 0 0 transparent, 0 0 0 transparent;
    }
}

.choice-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

/* --- Sharing sales cards between records --- */
.sales-allocation {
    margin-bottom: 1rem;
}

.facts {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0.25rem 1rem;
    margin: 0;
}

.facts dt {
    color: var(--cb-text-muted);
}

.facts dd {
    margin: 0;
}

.plain-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 0.5rem;
}

.game-log {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 0.4rem;
    max-height: 22rem;
    overflow-y: auto;
    font-size: 0.875rem;
}

/* A line about one player is written in their colour, with their swatch too:
   white (and yellow on the light theme) would be too faint on its own. */
.game-log__swatch {
    width: 0.75rem;
    height: 0.75rem;
    margin-right: 0.15rem;
}

.game-log__entry[data-log-colour="red"] { color: var(--cb-colour-red); }
.game-log__entry[data-log-colour="blue"] { color: var(--cb-colour-blue); }
.game-log__entry[data-log-colour="pink"] { color: var(--cb-colour-pink); }
.game-log__entry[data-log-colour="green"] { color: var(--cb-colour-green); }
.game-log__entry[data-log-colour="purple"] { color: var(--cb-colour-purple); }
.game-log__entry[data-log-colour="black"] { color: var(--cb-colour-black); }
.game-log__entry[data-log-colour="yellow"] { color: var(--cb-colour-yellow); }
.game-log__entry[data-log-colour="orange"] { color: var(--cb-colour-orange); }

/* --- Board ---
 * Everything on the board is positioned in percentages of the 1970 photo
 * (App\Game\Data\Board), passed in as --x/--y/--w/--h. Sizes use container
 * units so the board scales as one piece. */
.board {
    position: relative;
    width: 100%;
    aspect-ratio: 1992 / 1578;
    container-type: inline-size;
    border-radius: 0.75rem;
    /* No overflow: hidden here, or square tooltips at the edges would be cut off. */
    background-color: var(--ctp-crust);
    box-shadow: 0 8px 24px var(--cb-shadow);
}

.board__photo {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: block;
    border-radius: inherit;
}

.square,
.board__zone,
.board__feature,
.chart-slot {
    position: absolute;
    left: calc(var(--x) * 1%);
    top: calc(var(--y) * 1%);
    width: calc(var(--w) * 1%);
    height: calc(var(--h) * 1%);
}

.square {
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.3cqi;
}

.square__form {
    position: absolute;
    inset: 0;
    margin: 0;
}

.square__go {
    width: 100%;
    height: 100%;
    padding: 0;
    border: 0;
    border-radius: inherit;
    background: transparent;
    cursor: pointer;
}

.square--reachable {
    outline: 0.3cqi solid var(--cb-accent);
    outline-offset: -0.3cqi;
    box-shadow: 0 0 1.2cqi var(--cb-accent);
    z-index: 2;
}

.square--reachable:hover,
.square--reachable:focus-within {
    background-color: color-mix(in srgb, var(--cb-accent) 35%, transparent);
}

/* The photo is busy: tint reachable squares as well as outlining them. */
.board--photo .square--reachable {
    outline-width: 0.45cqi;
    background-color: color-mix(in srgb, var(--cb-accent) 25%, transparent);
}

.board__tokens {
    position: absolute;
    inset: auto 0 6% 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.3cqi;
    pointer-events: none;
    z-index: 3;
}

.token {
    width: 2.2cqi;
    height: 2.2cqi;
    border-radius: 50%;
    border: 0.25cqi solid var(--ctp-crust);
    box-shadow: 0 0.2cqi 0.6cqi rgba(0, 0, 0, 0.5);
}

.token--current {
    outline: 0.25cqi solid var(--cb-text);
    outline-offset: 0.15cqi;
}

.chart-slot {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    align-content: center;
    gap: 0.3cqi;
    padding: 0 0.6cqi;
}

.chart-slot__record {
    font-size: 0.75cqi;
    font-weight: 700;
    line-height: 1.2;
    padding: 0.15cqi 0.5cqi;
    border-radius: 0.6cqi;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    box-shadow: 0 0.2cqi 0.6cqi rgba(0, 0, 0, 0.5);
    z-index: 1;
}

/* Illustrated board: every square drawn in the current theme. */
.board--themed .square {
    padding: 0.25cqi;
    border: 0.15cqi solid color-mix(in srgb, var(--ctp-crust) 60%, transparent);
    background-color: var(--ctp-surface1);
    color: var(--ctp-text);
    text-align: center;
}

.square__label {
    font-size: 0.72cqi;
    font-weight: 600;
    line-height: 1.15;
    /* Hyphenate long words in narrow squares rather than splitting them anywhere. */
    hyphens: auto;
    overflow-wrap: break-word;
    min-width: 0;
    max-width: 100%;
    pointer-events: none;
}

.board--themed .square--pay { background-color: var(--ctp-surface1); color: var(--ctp-text); }
.board--themed .square--start { background-color: var(--ctp-text); color: var(--ctp-base); }
.board--themed .square--start .square__label { font-size: 1.3cqi; letter-spacing: 0.1em; }
.board--themed .square--diversion { background-color: var(--ctp-pink); color: var(--ctp-base); }
.board--themed .square--agency { background-color: var(--ctp-flamingo); color: var(--ctp-base); }
.board--themed .square--car-showroom { background-color: var(--ctp-green); color: var(--ctp-base); }
.board--themed .square--venue { background-color: var(--ctp-yellow); color: var(--ctp-base); }
.board--themed .square--venue .square__label { font-size: 0.95cqi; font-weight: 800; }
.board--themed .square--recording-studio { background-color: var(--ctp-mauve); color: var(--ctp-base); }
.board--themed .square--bankruptcy-arrow { background-color: var(--ctp-red); color: var(--ctp-base); }
.board--themed .square--hospital-arrow { background-color: var(--ctp-lavender); color: var(--ctp-base); }
.board--themed .square--go-to-hospital { background-color: var(--ctp-maroon); color: var(--ctp-base); }
.board--themed .square--miss-turn { background-color: var(--ctp-overlay0); color: var(--ctp-base); }
.board--themed .square--go-back { background-color: var(--ctp-sapphire); color: var(--ctp-base); }
.board--themed .square--sell-car { background-color: var(--ctp-teal); color: var(--ctp-base); }

.board__feature,
.board--themed .board__zone {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.4cqi;
    padding: 1cqi;
    border-radius: 1cqi;
    text-align: center;
    font-size: 0.85cqi;
    line-height: 1.3;
}

.board__feature strong,
.board--themed .board__zone strong {
    font-size: 1.3cqi;
}

.board__feature--recording-studio { background-color: var(--ctp-mantle); color: var(--ctp-mauve); }
.board__feature--sales-pile { background-color: var(--ctp-sapphire); color: var(--ctp-base); }
.board__feature--agency-pile { background-color: var(--ctp-flamingo); color: var(--ctp-base); }
.board__feature--diversion-pile { background-color: var(--ctp-pink); color: var(--ctp-base); }
.board__feature--chart { background-color: var(--ctp-peach); }
.board--themed .board__zone--hospital { background-color: var(--ctp-mantle); color: var(--ctp-lavender); }
.board--themed .board__zone--bankruptcy-court { background-color: var(--ctp-mantle); color: var(--ctp-red); }

.board--themed .chart-slot {
    border-bottom: 0.1cqi solid color-mix(in srgb, var(--ctp-base) 40%, transparent);
    color: var(--ctp-base);
}

.chart-slot__position {
    font-size: 0.8cqi;
    font-weight: 700;
    opacity: 0.8;
}

.chart-slot__sales {
    font-size: 1.1cqi;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    margin-right: auto;
}

/* --- Drawn cards pop-up --- */
.card-reveal {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    background-color: color-mix(in srgb, var(--ctp-crust) 70%, transparent);
    backdrop-filter: blur(2px);
}

.card-reveal__panel {
    width: min(100%, 64rem);
    max-height: 100%;
    overflow-y: auto;
    padding: 1.5rem;
    border-radius: 1rem;
    background-color: var(--cb-surface);
    border: 1px solid var(--cb-border);
    box-shadow: 0 16px 48px var(--cb-shadow);
}

.card-reveal__message {
    margin: 1rem 0;
    font-size: 1.125rem;
}

/* Several pieces of news about other players, one under another. */
.notice + .notice {
    border-top: 1px solid var(--cb-border);
}

.card-reveal__cards {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
    margin: 1rem 0 1.5rem;
}

.card-reveal__actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.75rem;
}

.card-reveal__actions form {
    margin: 0;
}

/* --- Game cards (scanned or illustrated) ---
 * The printed cards are about 7:4; both versions keep that shape. */
.game-card {
    width: min(100%, 20rem);
    aspect-ratio: 7 / 4;
    border-radius: 0.5rem;
    box-shadow: 0 6px 18px var(--cb-shadow);
}

.game-card--photo {
    height: auto;
    aspect-ratio: auto;
    object-fit: cover;
}

.game-card--diversion,
.game-card--sales {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.2rem;
    padding: 1rem 1.25rem;
    text-align: center;
    color: var(--ctp-base);
    position: relative;
}

.game-card--diversion {
    background-color: var(--ctp-pink);
}

.game-card--sales {
    background-color: var(--ctp-sapphire);
    font-style: italic;
}

.game-card__kicker {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    font-style: normal;
}

.game-card__venue {
    font-size: 1.35rem;
    font-weight: 900;
    line-height: 1.1;
}

.game-card__text {
    margin: 0;
    font-weight: 600;
    line-height: 1.35;
}

.game-card__small {
    font-size: 0.8rem;
}

.game-card__copies {
    font-size: 1.4rem;
    font-weight: 900;
    font-style: normal;
    text-transform: uppercase;
}

/* In the flow, as the last line: pinned to the foot, it ran into the
   royalties line once the card was small enough for the text to reach it. */
.game-card__drop {
    font-size: 0.75rem;
    font-weight: 700;
    font-style: normal;
}

.game-card--agency {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0.75rem;
    padding: 0.75rem;
    background-color: var(--ctp-peach);
    color: var(--ctp-base);
    font-size: 0.72rem;
    line-height: 1.25;
}

.game-card__venue--side {
    writing-mode: vertical-rl;
    transform: rotate(180deg);
    text-align: center;
    font-size: 1.05rem;
    padding: 0 0.35rem 0 0;
    border-left: 1px solid currentColor;
}

.game-card__terms {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0.35rem;
}

.game-card__term {
    margin: 0;
}

.game-card__term dt {
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.65rem;
    letter-spacing: 0.08em;
    border-bottom: 1px solid currentColor;
}

.game-card__term dd {
    margin: 0;
}

.game-card__sales {
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 1rem;
    padding: 0.15rem 0;
    border-top: 1px solid currentColor;
    border-bottom: 1px solid currentColor;
}

.record-release {
    margin: 0.4rem 0 0;
}

/* --- Optional rules --- */
.optional-rules {
    border: 0;
    margin: 0 0 1rem;
    padding: 0;
    display: grid;
    gap: 0.75rem;
}

.optional-rule {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    border: 1px solid var(--cb-border);
    border-radius: 0.625rem;
    background-color: var(--cb-surface-alt);
    cursor: pointer;
}

.optional-rule input {
    width: auto;
    margin-top: 0.3rem;
    /* iOS Safari shrinks a flex-item checkbox to make room for long text beside it. */
    flex-shrink: 0;
}

.optional-rule > span {
    display: grid;
    gap: 0.2rem;
}

/* --- Viewing a held booking's card --- */
.booking-link {
    padding: 0;
    border: 0;
    background: none;
    color: var(--cb-accent);
    font: inherit;
    font-weight: 700;
    text-decoration: underline dotted;
    text-underline-offset: 0.2em;
    cursor: zoom-in;
}

.card-viewer,
.rules-dialog,
.cars-dialog,
.player-details {
    padding: 0;
    border: 1px solid var(--cb-border);
    border-radius: 1rem;
    background-color: var(--cb-surface);
    color: var(--cb-text);
    box-shadow: 0 16px 48px var(--cb-shadow);
}

.card-viewer::backdrop,
.rules-dialog::backdrop,
.cars-dialog::backdrop,
.player-details::backdrop {
    background-color: color-mix(in srgb, var(--ctp-crust) 70%, transparent);
    backdrop-filter: blur(2px);
}

.card-viewer__panel {
    display: grid;
    gap: 1.25rem;
    padding: 1.5rem;
    justify-items: center;
}

/* A larger card than in the list of draws: this is for reading the small print. */
.card-viewer .game-card {
    width: min(80vw, 30rem);
}

.card-viewer .game-card--agency {
    font-size: 0.9rem;
}

.card-viewer--photo .card-viewer__card--themed,
.card-viewer--themed .card-viewer__card--photo,
.card-viewer--photo .card-viewer__when-themed,
.card-viewer--themed .card-viewer__when-photo {
    display: none;
}

.rules-dialog,
.cars-dialog {
    width: min(100% - 2rem, 36rem);
}

.rules-dialog__panel,
.cars-dialog__panel {
    padding: 1.5rem;
}

.player-details {
    width: min(100% - 2rem, 48rem);
}

.player-details__panel {
    padding: 1.5rem;
}

.player-details__cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(12rem, 1fr));
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.player-details__cards figure {
    margin: 0;
}

.player-details__cards .game-card {
    width: 100%;
}

/* --- Game over --- */
.game-over {
    width: min(100% - 2rem, 28rem);
    padding: 0;
    border: 1px solid var(--cb-border);
    border-radius: 1rem;
    background-color: var(--cb-surface);
    color: var(--cb-text);
    box-shadow: 0 16px 48px var(--cb-shadow);
    text-align: center;
}

.game-over::backdrop {
    background-color: color-mix(in srgb, var(--ctp-crust) 70%, transparent);
    backdrop-filter: blur(2px);
}

.game-over__panel {
    padding: 1.5rem;
}

.game-over__disc {
    margin: 0;
    font-size: 3.5rem;
    line-height: 1;
}

.game-over__title {
    margin: 0.5rem 0;
    font-size: 1.75rem;
    color: var(--cb-accent);
}

.game-over .card-reveal__actions {
    justify-content: center;
    margin-top: 1.5rem;
}

/* The confetti lives inside the dialog so it shows above the backdrop; fixed
   positioning still spreads it across the whole viewport. */
.confetti {
    position: fixed;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
}

.confetti span {
    position: absolute;
    top: -2rem;
    left: var(--x);
    width: 0.6rem;
    height: 1rem;
    border-radius: 2px;
    background-color: var(--ctp-yellow);
    opacity: 0;
    animation: confetti-fall var(--fall) ease-in var(--delay) 2 both;
}

.confetti span:nth-child(6n + 1) { background-color: var(--ctp-red); }
.confetti span:nth-child(6n + 2) { background-color: var(--ctp-blue); }
.confetti span:nth-child(6n + 3) { background-color: var(--ctp-green); }
.confetti span:nth-child(6n + 4) { background-color: var(--ctp-mauve); }
.confetti span:nth-child(6n + 5) { background-color: var(--ctp-peach); }
.confetti span:nth-child(3n) { width: 0.5rem; height: 0.5rem; border-radius: 50%; }

@keyframes confetti-fall {
    0% {
        opacity: 1;
        transform: translate(0, 0) rotate(0);
    }
    85% {
        opacity: 1;
    }
    100% {
        opacity: 0;
        transform: translate(var(--drift), 105vh) rotate(var(--spin));
    }
}

/* The global reduced-motion rule would make every piece flash at once. */
@media (prefers-reduced-motion: reduce) {
    .confetti {
        display: none;
    }
}

/* --- Full printed text of a square (illustrated board) --- */
.square__tip {
    position: absolute;
    bottom: calc(100% + 0.6cqi);
    left: 50%;
    transform: translateX(-50%);
    width: max-content;
    max-width: 18cqi;
    padding: 0.6cqi 0.9cqi;
    border: 1px solid var(--ctp-surface2);
    border-radius: 0.6cqi;
    background-color: var(--ctp-crust);
    color: var(--ctp-text);
    font-size: max(0.75rem, 1.05cqi);
    font-weight: 500;
    line-height: 1.35;
    text-align: left;
    box-shadow: 0 0.4cqi 1.2cqi rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.12s ease-out;
    z-index: 10;
}

.square--has-tip:hover,
.square--has-tip:focus,
.square--has-tip:focus-within {
    z-index: 5;
}

.square--has-tip:hover .square__tip,
.square--has-tip:focus .square__tip,
.square--has-tip:focus-within .square__tip {
    opacity: 1;
    visibility: visible;
}

.square--tip-below .square__tip {
    bottom: auto;
    top: calc(100% + 0.6cqi);
}

.square--tip-start .square__tip {
    left: 0;
    transform: none;
}

.square--tip-end .square__tip {
    left: auto;
    right: 0;
    transform: none;
}

/* --- Moves as a list, for phones and small screens only ---
 * Below this width the board's squares are too small to tap reliably. */
.move-list {
    display: none;
    list-style: none;
    margin: 1rem 0 0;
    padding: 0;
    gap: 0.5rem;
}

/* Wording that matches whichever way of moving the screen offers. */
.only-small-screens {
    display: none;
}

@media (max-width: 800px) {
    .move-list {
        display: grid;
    }

    .only-small-screens {
        display: inline;
    }

    .only-large-screens {
        display: none;
    }
}

.move-list form {
    margin: 0;
}

.move-list__button {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    width: 100%;
    min-height: 2.75rem;
    padding: 0.6rem 0.9rem;
    border: 1px solid var(--cb-border);
    border-left-width: 0.4rem;
    border-radius: 0.5rem;
    background-color: var(--cb-surface-alt);
    color: var(--cb-text);
    font: inherit;
    text-align: left;
    cursor: pointer;
}

.move-list__button:hover,
.move-list__button:focus-visible {
    border-color: var(--cb-accent);
}

.move-list__distance {
    flex-shrink: 0;
    font-size: 0.8rem;
    color: var(--cb-text-muted);
}

/* The same colour key as the illustrated board. */
.move-list__button--pay { border-left-color: var(--ctp-overlay1); }
.move-list__button--start { border-left-color: var(--ctp-text); }
.move-list__button--diversion { border-left-color: var(--ctp-pink); }
.move-list__button--agency { border-left-color: var(--ctp-flamingo); }
.move-list__button--car-showroom { border-left-color: var(--ctp-green); }
.move-list__button--venue { border-left-color: var(--ctp-yellow); }
.move-list__button--recording-studio { border-left-color: var(--ctp-mauve); }
.move-list__button--bankruptcy-arrow { border-left-color: var(--ctp-red); }
.move-list__button--hospital-arrow { border-left-color: var(--ctp-lavender); }
.move-list__button--go-to-hospital { border-left-color: var(--ctp-maroon); }
.move-list__button--miss-turn { border-left-color: var(--ctp-overlay0); }
.move-list__button--go-back { border-left-color: var(--ctp-sapphire); }
.move-list__button--sell-car { border-left-color: var(--ctp-teal); }

/* --- Admin area --- */
.admin-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: -0.5rem 0 1.5rem;
}

.admin-nav a {
    padding: 0.4rem 0.9rem;
    border: 1px solid var(--cb-border);
    border-radius: 999px;
    color: var(--cb-text);
    text-decoration: none;
}

.admin-nav a:hover {
    background-color: var(--cb-surface-alt);
}

.admin-nav a[aria-current="page"] {
    background-color: var(--cb-accent);
    border-color: var(--cb-accent);
    color: var(--cb-accent-text);
}

.admin-sections {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
    gap: 1.5rem;
}

.admin-section {
    color: inherit;
    text-decoration: none;
    transition: transform 0.2s, border-color 0.2s;
}

.admin-section:hover {
    border-color: var(--cb-accent);
    transform: translateY(-2px);
}

.admin-section p {
    margin: 0;
}

.admin-user .row {
    flex-wrap: wrap;
    justify-content: flex-end;
}

/* --- Admin: inspecting a game --- */
.badge--danger {
    background-color: var(--cb-danger);
    color: var(--cb-bg);
}

.admin-deck__columns {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr));
    gap: 1.5rem;
    align-items: start;
}

.admin-cards {
    margin: 0;
    padding-left: 1.75rem;
    display: grid;
    gap: 0.35rem;
    max-height: 28rem;
    overflow-y: auto;
    font-size: 0.875rem;
}

.admin-cards li span {
    display: block;
}

.admin-cards code {
    font-size: 0.75rem;
    color: var(--cb-text-muted);
}

.admin-log {
    overflow-x: auto;
}

.admin-log table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

.admin-log th,
.admin-log td {
    padding: 0.35rem 0.6rem;
    border-bottom: 1px solid var(--cb-border);
    text-align: left;
    vertical-align: top;
}

.admin-log td:nth-child(-n + 3) {
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

/* The registration form's bot trap: off screen, hidden from screen readers too. */
.form-trap {
    position: absolute;
    left: -10000px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

/* Read out by screen readers, not shown. */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}

/* --- Private games --- */
.game-privacy {
    border: 0;
    margin: 0 0 1rem;
    padding: 0;
    display: grid;
    gap: 0.75rem;
}

/* The password only matters for a private game: ask for it once that is ticked. */
.game-privacy:not(:has(input[type="checkbox"]:checked)) .game-privacy__password {
    display: none;
}

.join-by-code__input {
    width: 11rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    font-weight: 700;
}

.lobby-status form:has(.join-password) {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.join-password {
    width: 12rem;
}

/* --- Home --- */
.home {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
    padding-top: 1rem;
}

.home__box {
    display: block;
    width: 100%;
    max-width: 999px;
    height: auto;
}

.home__blurb {
    max-width: 40rem;
    font-size: 1.125rem;
    line-height: 1.6;
    text-align: center;
    color: var(--cb-text);
}

.home__blurb p {
    margin: 0 0 1rem 0;
}

/* Gallows Bound, the pirate edition: words only until it has box art. */
.home__edition {
    max-width: 40rem;
    font-size: 1.05rem;
    line-height: 1.6;
    text-align: center;
}

.home__edition p {
    margin: 0 0 0.75rem 0;
}

.home__edition p:last-child {
    margin-bottom: 0;
}

.home__edition-kicker {
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--cb-text-muted);
}

.home__edition-title {
    margin: 0 0 0.75rem 0;
    font-size: 1.5rem;
}
