/* The Play page (boards FinLobby, PhLobby, EmptyLobby, LobbyWaiting,
   LobbyDailyLimit and their phone versions; LightLobby through the tokens).
   Three columns above 1100px; one column, in the phone boards' order, below. */

.page-main--lobby {
    min-height: 0;
}

/* ── Name card (plan 4.1): the banner's shape, directly above it ───────── */

.name-card {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px 24px;
    padding: 10px 18px 10px 24px;
    background: var(--surface);
    border-top: 1px solid var(--hairline);
}

.name-card[hidden] {
    display: none;
}

.name-card__text {
    flex: 1 1 320px;
    min-width: 0;
    padding-top: 4px;
}

.name-card__lead {
    margin-top: 3px;
    font-size: 14px;
    line-height: 1.4;
    color: var(--text-2);
}

.name-card__lead strong {
    font-weight: 500;
    color: var(--text);
    overflow-wrap: anywhere;
}

.name-card__form {
    flex: none;
    display: grid;
    grid-template-columns: 220px auto auto;
    grid-template-areas:
        "input save skip"
        "hint  hint hint";
    align-items: center;
    gap: 4px 8px;
}

.name-card__input {
    grid-area: input;
    height: 28px;
    padding: 0 10px;
    font-size: 13px;
}

.name-card__input:read-only {
    color: var(--text-2);
}

.name-card__save {
    grid-area: save;
}

.name-card__skip {
    grid-area: skip;
    height: 28px;
    padding: 0 4px;
}

.name-card__hint {
    grid-area: hint;
    max-width: 380px;
    font-size: 12px;
    line-height: 17px;
    color: var(--text-2);
}

.name-card__hint.is-error {
    color: var(--red-text);
}

/* ── First-visit tutorial banner ──────────────────────────────────────── */

.tutorial-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 8px 18px 8px 24px;
    background: var(--surface);
    border-top: 1px solid var(--hairline);
}

.tutorial-banner-text {
    font-size: 14px;
    line-height: 1.4;
    color: var(--text-2);
}

.tutorial-banner-lead {
    font-weight: 500;
    color: var(--text);
}

.tutorial-banner-actions {
    flex: none;
    display: flex;
    align-items: center;
    gap: 8px;
}

.tutorial-banner-dismiss {
    flex: none;
    width: 32px;
    height: 32px;
    padding: 0;
    border: 0;
    border-radius: var(--radius);
    background: transparent;
    color: var(--text-2);
    display: flex;
    align-items: center;
    justify-content: center;
}

.tutorial-banner-dismiss:hover {
    color: var(--text);
}

/* ── Grid ─────────────────────────────────────────────────────────────── */

.lobby {
    flex: 1 0 auto;
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr) 300px;
    border-top: 1px solid var(--hairline);
}

.lobby__col--left {
    background: var(--surface);
    border-right: 1px solid var(--hairline);
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.lobby__col--center {
    min-width: 0;
    padding: 20px 24px;
    display: flex;
    flex-direction: column;
}

.lobby__col--right {
    background: var(--surface);
    border-left: 1px solid var(--hairline);
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.lobby__head {
    margin-bottom: 8px;
}

.lobby__bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.lobby__bar--sm {
    margin-bottom: 8px;
}

.lobby__bar .lobby__head {
    margin: 0;
}

.lobby__count {
    font-size: 14px;
    color: var(--text-2);
}

.lobby__count--sm {
    font-size: 13px;
}

.lobby__lock,
.lobby__empty,
.lobby__loading {
    font-size: 13px;
    line-height: 1.45;
    color: var(--text-2);
}

/* Retry sits in the sentence it belongs to, not on its own padded line. */
.lobby__retry {
    height: auto;
    padding: 0 2px;
    vertical-align: baseline;
}

.lobby__phone-actions {
    display: none;
}

/* ── Quick Play ───────────────────────────────────────────────────────── */

.qp-label {
    margin: 14px 0 6px;
}

.qp-instant .qp-label {
    margin-top: 0;
}

.qp-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

button.qp-card {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

button.qp-card:disabled {
    cursor: default;
}

button.qp-card:disabled:hover {
    background: var(--elevated);
}

.qp-card__waiting {
    font-weight: 500;
    color: var(--text);
}

button.qp-card--ai {
    flex-direction: row;
    align-items: center;
    gap: 12px;
}

.qp-card--ai svg {
    flex: none;
    color: var(--gold);
}

.qp-card__text {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.qp-note {
    font-size: 12px;
    line-height: 1.45;
    color: var(--text-2);
}

.qp-note--lock {
    margin-top: 16px;
    font-size: 13px;
}

.qp-note--group {
    margin-bottom: 8px;
}

.qp-note--lock + .qp-presets > .qp-label:first-child {
    margin-top: 12px;
}

.qp-presets.is-locked,
.qp-group.is-locked {
    opacity: 0.5;
}

.qp-presets.is-locked .qp-group.is-locked {
    opacity: 1;
}

.lobby__quick .status {
    margin-top: 0;
}

/* The Tutorial entry at the foot of the left column. */
.lobby__tutorial {
    margin-top: auto;
    padding-top: 16px;
    border-top: 1px solid var(--hairline);
}

.tutorial-btn {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: transparent;
    color: var(--text);
    text-align: left;
}

.tutorial-btn:hover {
    background: var(--hover);
}

.tutorial-btn__icon {
    flex: none;
    color: var(--gold);
}

.tutorial-btn__text {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.tutorial-btn__title {
    font-size: 14px;
    font-weight: 500;
    line-height: 1.35;
}

.tutorial-btn__note {
    font-size: 12px;
    line-height: 1.4;
    color: var(--text-2);
}

.tutorial-btn__chev {
    flex: none;
    color: var(--text-2);
}

/* ── Live Debates ─────────────────────────────────────────────────────── */

.lobby__live {
    margin-bottom: 24px;
}

.lobby__live-title {
    display: flex;
    align-items: center;
    gap: 8px;
}

.lobby__live-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--red);
}

.live-list,
.open-list,
.daily-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.live-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 14px 20px;
}

.live-item__body,
.open-item__body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.live-item__title,
.open-item__title,
.open-empty__title {
    font-size: 15px;
    font-weight: 500;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.live-item__meta,
.open-item__meta,
.open-empty__text {
    font-size: 13px;
    line-height: 1.4;
    color: var(--text-2);
}

.live-item__phase {
    font-weight: 500;
    color: var(--gold);
}

.live-item .btn--watch {
    flex: none;
}

/* ── Open Debates ─────────────────────────────────────────────────────── */

.open-list {
    gap: 8px;
}

.open-item {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    column-gap: 16px;
    row-gap: 6px;
    padding: 16px 20px;
    border-radius: var(--radius);
}

.open-item.card--turn {
    border-radius: 0 var(--radius) var(--radius) 0;
}

.open-item__body {
    gap: 6px;
}

.open-item__body .status {
    margin-top: 0;
}

.open-item__rating {
    font-family: var(--serif);
    font-weight: 600;
    color: var(--gold);
}

.open-item__note {
    grid-column: 1;
    font-size: 12px;
    line-height: 1.4;
    color: var(--text-2);
}

.open-item__actions {
    grid-column: 2;
    grid-row: 1;
    display: flex;
    gap: 8px;
}

.open-item:has(.open-item__note) .open-item__actions {
    grid-row: 1 / span 2;
}

.open-item__actions .btn {
    flex: none;
}

.open-item__actions .btn--quiet {
    font-size: 14px;
}

/* Locked by the daily limit (LobbyDailyLimit) rather than busy. */
.open-item__actions .btn[aria-describedby^="open-lock-"]:disabled {
    opacity: 0.5;
}

.open-empty {
    padding: 40px 24px;
    border-radius: var(--radius);
    text-align: center;
}

.open-empty__text {
    margin-top: 6px;
}

/* ── Suggested opponents ──────────────────────────────────────────────── */

.lobby__sugg {
    margin-top: 44px;
}

.lobby__sugg-title {
    margin-bottom: 4px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    text-align: center;
    color: var(--text-2);
}

.lobby__sugg-note,
.sugg-lock {
    margin-bottom: 12px;
    font-size: 12px;
    line-height: 1.4;
    text-align: center;
    color: var(--text-2);
}

.sugg-lock {
    margin-top: -10px;
}

.sugg-list {
    max-width: 620px;
    margin: 0 auto;
}

.sugg-featured,
.sugg-card {
    display: flex;
    align-items: center;
    border-radius: var(--radius-lg);
}

.sugg-featured {
    gap: 11px;
    margin-bottom: 6px;
    padding: 10px 14px;
    background: var(--elevated);
    border: 1px solid var(--gold-rule);
}

.sugg-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
}

.sugg-card {
    min-width: 0;
    gap: 8px;
    padding: 8px 12px;
    background: var(--surface);
    border: 1px solid var(--hairline);
}

.sugg__body {
    flex: 1;
    min-width: 0;
}

.sugg-featured__name {
    display: flex;
    align-items: baseline;
    gap: 8px;
    line-height: 1.35;
}

.sugg__name {
    overflow: hidden;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.35;
    color: var(--text);
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sugg-featured .sugg__name {
    /* A short name is never cut to one letter beside BEST MATCH. */
    min-width: 3.5em;
    font-size: 14px;
}

.sugg-featured__tag {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--gold);
}

.sugg__record {
    font-size: 12px;
    line-height: 1.4;
    color: var(--text-2);
    white-space: nowrap;
}

.sugg-featured .sugg__record {
    margin-top: 2px;
    white-space: normal;
}

.sugg__rating {
    flex: none;
    font-family: var(--serif);
    font-size: 13px;
    font-weight: 600;
    color: var(--gold);
}

.sugg__rating--lg {
    font-size: 15px;
}

.sugg__btn {
    flex: none;
}

.sugg__btn:disabled {
    opacity: 0.5;
}

/* The site footer sits at the foot of the centre column. */
.page-main--lobby .site-footer {
    margin-top: auto;
    padding: 32px 0 4px;
    border-top: 0;
}

.page-main--lobby .site-footer__sep {
    opacity: 1;
}

/* ── Daily Debates ────────────────────────────────────────────────────── */

.lobby__daily,
.lobby__create {
    padding-bottom: 24px;
    border-bottom: 1px solid var(--hairline);
}

a.daily-card {
    display: block;
}

.daily-card__title {
    display: block;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.35;
    color: var(--text);
}

.daily-card__row {
    margin-top: 6px;
    display: flex;
    justify-content: space-between;
    gap: 12px;
}

.daily-card__row,
.daily-card__meta {
    font-size: 12px;
    line-height: 1.4;
    color: var(--text-2);
}

.daily-card__meta {
    margin-top: 6px;
}

.daily-card__flag {
    font-weight: 600;
    color: var(--gold);
}

.daily-card__rating {
    font-family: var(--serif);
    font-weight: 600;
    color: var(--gold);
}

.daily-card__left {
    white-space: nowrap;
}

/* A daily debate finished in the last 48 hours: quiet, no rule. */
.daily-card--done .daily-card__title {
    color: var(--text-2);
}

.daily-card__see {
    font-weight: 500;
    color: var(--text);
}

.daily-card__actions {
    margin-top: 10px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.daily-card__actions .btn--sm {
    padding: 0 14px;
}

.daily-card__decline {
    height: 28px;
    font-size: 12px;
}

/* ── Create Debate ────────────────────────────────────────────────────── */

.lobby__create.is-locked .lobby__head {
    margin-bottom: 6px;
}

.lobby__create .lobby__lock {
    margin-bottom: 12px;
}

.lobby__create.is-locked .lobby__create-form,
.lobby__create.is-locked .lobby__friend {
    opacity: 0.5;
}

.lobby__create.is-locked .seg,
.lobby__create.is-locked .lobby__create-form .btn:disabled {
    opacity: 1;
}

.create-form__submit {
    margin-top: 2px;
}

.create-form__daily {
    margin: 14px 0 6px;
}

.create-form__note {
    margin-top: 6px;
    font-size: 12px;
    line-height: 1.45;
    color: var(--text-2);
}

.create-form .input[aria-invalid="true"] ~ .hint {
    display: none;
}

.create-form .field .status {
    margin-top: 4px;
}

.lobby__friend {
    margin-top: 8px;
}

/* ── Top Players ──────────────────────────────────────────────────────── */

.lobby__top .lobby__head {
    margin-bottom: 4px;
}

.lobby__top-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: inherit;
}

.lobby__top-link:hover {
    text-decoration: none;
}

.lobby__top-link svg {
    color: var(--text-2);
}

.top {
    list-style: none;
}

.top__row {
    display: grid;
    grid-template-columns: 24px 1fr auto;
    align-items: center;
    gap: 10px;
    padding: 9px 0;
    border-bottom: 1px solid var(--hairline);
}

.top__row:last-child {
    border-bottom: 0;
}

.top__rank {
    font-family: var(--serif);
    font-size: 15px;
    font-weight: 700;
    text-align: center;
    color: var(--text-2);
}

.top__rank--1 { color: var(--medal-1); }
.top__rank--2 { color: var(--medal-2); }
.top__rank--3 { color: var(--medal-3); }

.top__name {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 14px;
    font-weight: 500;
    color: var(--text);
}

.top__rating {
    font-family: var(--serif);
    font-size: 14px;
    font-weight: 600;
    color: var(--gold);
}

/* ── One column (1100px and below): the phone boards' order ───────────── */

@media (max-width: 1100px) {
    /* The columns open up and the sections are re-ordered (PhLobby);
       lobby/reading-order.js moves them in the DOM to match, so Tab follows
       what is seen. */
    .lobby {
        display: flex;
        flex-direction: column;
        padding: 20px 24px 0;
        border-top: 0;
    }

    .lobby__col {
        display: contents;
    }

    .lobby__daily { order: 1; }
    .lobby__open { order: 2; }
    .lobby__phone-actions { order: 3; }
    .lobby__sugg { order: 4; }
    .lobby__quick { order: 5; }
    .lobby__tutorial { order: 6; }
    .lobby__live { order: 7; }
    .lobby__top { order: 8; }
    .page-main--lobby .site-footer { order: 9; }

    .lobby__create,
    .qp-instant {
        display: none;
    }

    .lobby__daily {
        padding-bottom: 0;
        border-bottom: 0;
    }

    .lobby__open,
    .lobby__phone-actions,
    .lobby__sugg,
    .lobby__quick,
    .lobby__live,
    .lobby__top {
        margin-top: 28px;
    }

    .lobby__live {
        margin-bottom: 0;
    }

    .lobby .section-title {
        font-size: 17px;
    }

    .lobby__bar,
    .lobby__bar--sm {
        margin-bottom: 10px;
    }

    /* With nothing to list, the sentence sits 8px under the title (PhEmptyLobby). */
    .lobby__bar--sm:has(+ [data-daily-list][hidden]) {
        margin-bottom: 8px;
    }

    .lobby__quick > .lobby__head {
        margin-bottom: 10px;
    }

    .qp-presets > .qp-label:first-child {
        margin-top: 0;
    }

    .qp-note--lock {
        margin: 0 0 12px;
    }

    .lobby__quick:has(.qp-note--lock) > .lobby__head {
        margin-bottom: 8px;
    }

    .qp-note--group {
        font-size: 13px;
    }

    .lobby__tutorial {
        margin-top: 14px;
        padding-top: 0;
        border-top: 0;
    }

    .tutorial-btn {
        min-height: 48px;
    }

    .lobby__phone-actions {
        display: flex;
        flex-direction: column;
        gap: 8px;
    }

    .lobby__phone-actions .lobby__lock {
        margin-bottom: 2px;
    }

    .lobby__phone-actions .btn:disabled {
        opacity: 0.5;
    }

    .lobby__phone-actions .btn {
        height: 40px;
    }

    .lobby__phone-pair {
        display: flex;
        gap: 8px;
    }

    .lobby__phone-pair .btn {
        flex: 1;
        min-width: 0;
        padding: 0 8px;
    }

    .lobby__phone-pair svg {
        flex: none;
    }

    .live-item,
    .open-item {
        gap: 12px;
        padding: 12px 14px;
    }

    .open-item {
        row-gap: 5px;
    }

    .open-item__body {
        gap: 5px;
    }

    .open-item__note {
        grid-column: 1 / -1;
        margin-top: 3px;
        line-height: 1.45;
    }

    .open-item:has(.open-item__note) .open-item__actions {
        grid-row: 1;
    }

    .live-item__phase {
        white-space: nowrap;
    }

    .open-empty {
        padding: 28px 20px;
    }

    .lobby__sugg-title {
        font-family: var(--serif);
        font-size: 17px;
        font-weight: 600;
        line-height: 1.3;
        letter-spacing: 0;
        text-transform: capitalize;
        text-align: left;
        color: var(--text);
    }

    .lobby__sugg-note,
    .sugg-lock {
        margin-bottom: 10px;
        font-size: 13px;
        text-align: left;
    }

    .sugg-lock {
        margin-top: -6px;
    }

    .sugg-list {
        max-width: none;
        display: flex;
        flex-direction: column;
        gap: 6px;
    }

    .sugg-featured {
        gap: 10px;
        margin-bottom: 0;
        padding: 10px 12px;
    }

    .sugg-grid {
        display: flex;
        flex-direction: column;
    }

    .sugg-card {
        gap: 10px;
    }

    .sugg-featured .sugg__record {
        white-space: nowrap;
    }

    .lobby__top .lobby__head {
        margin: -11px 0 -7px;
    }

    .lobby__top-link {
        min-height: 44px;
        padding-right: 12px;
    }

    .page-main--lobby .site-footer {
        padding: 24px 0 8px;
    }
}

@media (max-width: 768px) {
    /* Every control is 44px tall on phones, the quiet Decline included. */
    .daily-card__decline {
        height: 44px;
    }

    /* A Top Players name is a 44px target that keeps the board's 38px row:
       the padding is taken back by the negative margin. */
    .top__name {
        padding: 12px 0;
        margin: -12px 0;
    }

    .lobby {
        padding: 20px 16px 0;
    }

    .name-card {
        display: block;
        padding: 12px 16px 14px;
        border-top: 0;
        border-bottom: 1px solid var(--hairline);
    }

    .name-card__text {
        padding-top: 0;
    }

    .name-card__form {
        margin-top: 10px;
        grid-template-columns: auto auto minmax(0, 1fr);
        grid-template-areas:
            "input input input"
            "hint  hint  hint"
            "save  skip  .";
        gap: 6px 4px;
    }

    .name-card__input {
        height: 44px;
        padding: 0 12px;
        font-size: 16px;
    }

    .name-card__hint {
        max-width: none;
    }

    .name-card__save {
        height: 44px;
        margin-top: 4px;
        padding: 0 20px;
        font-size: 14px;
    }

    .name-card__skip {
        height: 44px;
        margin-top: 4px;
        padding: 0 12px;
        font-size: 14px;
    }

    .tutorial-banner {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        align-items: start;
        gap: 0 4px;
        padding: 10px 6px 12px 16px;
        border-top: 0;
        border-bottom: 1px solid var(--hairline);
    }

    .tutorial-banner-text {
        padding-top: 2px;
    }

    .tutorial-banner-actions {
        display: contents;
    }

    .tutorial-banner-dismiss {
        grid-column: 2;
        grid-row: 1;
        width: 44px;
        height: 44px;
        margin-top: -10px;
    }

    .tutorial-banner-btn {
        grid-column: 1 / -1;
        justify-self: start;
        margin-top: 8px;
        padding: 0 16px;
        font-size: 14px;
    }

    .lobby__phone-actions .btn {
        height: 44px;
    }

    .sugg__btn,
    .sugg__btn.btn--xs {
        padding: 0 14px;
        font-size: 13px;
    }

    .page-main--lobby .site-footer {
        font-size: 12px;
    }
}

/* ── Suggested opponents: the in-place challenge (PopSuggest, PhPopSuggest) ── */

.sugg-item--featured {
    margin-bottom: 6px;
}

.sugg-item .sugg-featured {
    margin-bottom: 0;
}

.sugg-grid {
    align-items: start;
}

.sugg-featured.is-open,
.sugg-card.is-open {
    border-color: var(--gold-rule);
    border-bottom: 0;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.sugg__close {
    width: 28px;
    height: 28px;
    padding: 0;
}

.sugg__close svg {
    width: 12px;
    height: 12px;
}

.sugg__btn.sugg__sent {
    gap: 5px;
    border-color: var(--line);
}

.sugg__btn.sugg__sent:disabled {
    opacity: 1;
}

.sugg-panel {
    padding: 10px 14px 12px;
    background: var(--surface);
    border: 1px solid var(--gold-rule);
    border-top-color: var(--hairline);
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}

.sugg-card.is-open + .sugg-panel {
    padding: 10px 12px 12px;
}

.sugg-panel__days {
    display: flex;
    align-items: center;
    gap: 12px;
}

.sugg-panel__days .label {
    flex: none;
}

.sugg-panel__send {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
}

.sugg-panel__send .input {
    flex: 1;
    min-width: 0;
}

.sugg-panel__send .btn {
    flex: none;
}

.sugg-panel__send .status {
    flex-basis: 100%;
    margin-top: -2px;
}

/* ── Dialogs and sheets (PopPractice, PopChallenge, PopChallengeLink,
      PopChallengeAccept, StatesDialogs; phones PhPop…, PhCreate) ──────── */

.lobby-dialog__submit {
    margin-top: 6px;
}

.lobby-dialog .dialog__title:focus {
    outline: none;
}

.lobby-dialog__form .input[aria-invalid="true"] ~ .hint {
    display: none;
}

.lobby-dialog .lobby-dialog__submit + .status,
.lobby-dialog .lobby-dialog__accept + .status,
.lobby-dialog .lobby-dialog__quiet + .status {
    text-align: center;
}

.lobby-dialog .lobby-dialog__quiet + .status {
    margin-top: 4px;
}

.lobby-dialog__foot {
    margin-top: 12px;
    font-size: 12px;
    line-height: 1.4;
    text-align: center;
    color: var(--text-2);
}

.lobby-dialog__lead {
    font-size: 14px;
    line-height: 1.45;
    color: var(--text-2);
}

.lobby-dialog__link-field {
    margin-top: 14px;
}

.lobby-dialog__summary {
    margin-top: 16px;
    padding: 12px 14px;
    background: var(--elevated);
    border: 1px solid var(--hairline);
    border-radius: var(--radius);
}

.lobby-dialog__summary-topic {
    font-size: 14px;
    font-weight: 500;
    line-height: 1.35;
}

.lobby-dialog__summary-meta {
    margin-top: 5px;
    font-size: 12px;
    line-height: 1.4;
    color: var(--text-2);
}

.lobby-dialog__waiting {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 16px;
    font-size: 13px;
    line-height: 1.4;
    color: var(--text-2);
}

.lobby-dialog__dot {
    flex: none;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--gold);
}

.lobby-dialog__quiet {
    display: block;
    margin: 16px auto 0;
    padding: 0 12px;
}

.lobby-dialog__decline {
    margin-top: 8px;
}

.lobby-dialog__details {
    margin: 0;
    background: var(--elevated);
    border: 1px solid var(--hairline);
    border-radius: var(--radius);
}

.lobby-dialog__row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 24px;
    padding: 12px 14px;
    border-bottom: 1px solid var(--hairline);
}

.lobby-dialog__row:last-child {
    border-bottom: 0;
}

.lobby-dialog__row dt {
    flex: none;
}

.lobby-dialog__row dd {
    min-width: 0;
    margin: 0;
    overflow-wrap: anywhere;
    font-size: 14px;
    line-height: 1.4;
    text-align: right;
    color: var(--text-2);
}

.lobby-dialog__row--topic dd {
    font-weight: 500;
    color: var(--text);
}

.lobby-dialog__row--who dd {
    display: flex;
    align-items: baseline;
    gap: 6px;
}

.lobby-dialog__name {
    min-width: 0;
    font-weight: 500;
    color: var(--text);
}

.lobby-dialog__rating {
    flex: none;
    overflow-wrap: normal;
    font-family: var(--serif);
    font-size: 15px;
    font-weight: 600;
    color: var(--gold);
}

.lobby-dialog__accept {
    margin-top: 20px;
}

.lobby-dialog__ok {
    display: flex;
    margin: 16px auto 0;
    padding: 0 16px;
}

.lobby-dialog--create .create-form__submit {
    margin-top: 4px;
}

/* A sheet's body starts closer to its head (PhPopPractice, PhCreate). */
.sheet .dialog__body {
    margin-top: 8px;
}

/* ── The lobby tour (tutorial-spotlight.js; no board, the shared language) ── */

#tut-spotlight-root {
    position: fixed;
    inset: 0;
    z-index: 200;
    pointer-events: none;
}

.tut-panel {
    position: absolute;
    background: var(--scrim);
    pointer-events: all;
}

.tut-tooltip {
    position: absolute;
    width: 320px;
    max-width: calc(100vw - 16px);
    padding: 16px 18px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    pointer-events: all;
    transition: top 0.2s ease, left 0.2s ease;
}

/* On a phone the tip takes the page gutter on both sides (tutorial-spotlight.js
   uses the same width when it places it). */
@media (max-width: 419.98px) {
    .tut-tooltip {
        width: calc(100vw - 32px);
        max-width: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    .tut-tooltip {
        transition: none;
    }
}

.tut-progress {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-2);
}

.tut-title {
    margin: 4px 0 6px;
    font-family: var(--serif);
    font-size: 16px;
    font-weight: 600;
    line-height: 1.3;
}

.tut-body {
    margin-bottom: 14px;
    font-size: 13px;
    line-height: 1.5;
    color: var(--text-2);
}

.tut-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.tut-nav-btns {
    display: flex;
    gap: 8px;
}

.tut-exit-btn,
.tut-back-btn,
.tut-next-btn {
    height: 28px;
    padding: 0 12px;
    border: 1px solid transparent;
    border-radius: var(--radius);
    background: transparent;
    font-size: 12px;
    font-weight: 500;
    color: var(--text-2);
}

.tut-exit-btn {
    padding: 0;
}

.tut-back-btn {
    border-color: var(--line-strong);
}

.tut-next-btn {
    border: 0;
    background: var(--gold-fill);
    color: var(--on-gold);
    font-weight: 600;
}

.tut-exit-btn:hover,
.tut-back-btn:hover {
    color: var(--text);
}

.tut-confirm .confirm__actions {
    margin-top: 6px;
}

@media (max-width: 1100px) {
    .sugg-grid {
        align-items: stretch;
    }

    .sugg-item--featured {
        margin-bottom: 0;
    }
}

@media (max-width: 768px) {
    .sugg__close {
        width: 44px;
        height: 44px;
    }

    .sugg__close svg {
        width: 14px;
        height: 14px;
    }

    .sugg__btn.sugg__sent {
        gap: 6px;
    }

    .sugg-panel,
    .sugg-card.is-open + .sugg-panel {
        padding: 12px;
    }

    .sugg-panel__days .seg {
        flex: 1;
        min-width: 0;
    }

    .sugg-panel__days .seg button {
        flex: 1;
        padding: 0;
        font-size: 13px;
    }

    .sugg-panel__send .input {
        padding: 0 12px;
        font-size: 14px;
    }

    .sugg-panel__send .btn {
        padding: 0 14px;
        font-size: 13px;
    }

    .lobby-dialog__submit {
        margin-top: 4px;
    }

    .lobby-dialog__link {
        font-size: 13px;
    }

    .lobby-dialog .input-group__btn {
        font-size: 14px;
    }

    .lobby-dialog__quiet {
        margin-top: 8px;
        padding: 0 16px;
        font-size: 14px;
    }

    .lobby-dialog__row {
        gap: 16px;
    }

    .lobby-dialog__row--topic {
        display: block;
    }

    .lobby-dialog__row--topic dt {
        margin-bottom: 4px;
    }

    .lobby-dialog__row--topic dd {
        /* start, not left: a right-to-left topic starts from the right (PG-9). */
        text-align: start;
    }

    .tut-exit-btn,
    .tut-back-btn,
    .tut-next-btn {
        height: 44px;
    }
}
