/* ============================================================
   Game room: a note to pass, and the names signed on it
   ============================================================ */
#game-room-screen.active {
    display: flex;
    flex-direction: column;
    gap: 26px;
    padding: 20px 24px calc(28px + var(--safe-bottom)) 34px;
}

.mode-chip {
    --tilt: -2deg;
    align-self: flex-start;
    margin-left: 26px;
    padding: 4px 14px;
    background: var(--sticky-yellow);
    box-shadow: var(--shadow-note);
    font-family: var(--font-hand);
    font-weight: 700;
    font-size: 1.35rem;
    transform: rotate(var(--tilt));
    animation: stickOn 0.45s var(--ease-spring) both;
}
.mode-chip.competitive { background: var(--sticky-pink); }
.mode-chip:empty { display: none; }

/* The note itself */
.invite-card { --tilt: 0.8deg; display: flex; flex-direction: column; gap: 14px; margin-left: 8px; transform: rotate(var(--tilt)); animation: stickOn 0.5s var(--ease-spring) 0.1s both; }
.invite-card::before {
    content: '';
    position: absolute;
    top: -10px;
    left: 50%;
    width: 74px;
    height: 22px;
    margin-left: -37px;
    background: rgba(255, 255, 255, 0.55);
    border: 1px solid rgba(0, 0, 0, 0.08);
    transform: rotate(-3deg);
}
.invite-card h2 { font-size: 1.9rem; }
.invite-hint { font-size: 1rem; color: var(--ink-2); margin-top: -8px; line-height: 1.3; }

.code-display { display: flex; align-items: baseline; gap: 10px; }
.code-label { font-size: 1.05rem; color: var(--ink-2); }
.code-value {
    flex: 1;
    min-width: 0;
    border: none;
    border-bottom: 2px solid var(--ink);
    background: transparent;
    font-family: var(--font-hand);
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: 0.18em;
    color: var(--ink-me);
}
.code-value:focus { outline: none; }

.link-row { display: flex; align-items: center; gap: 10px; }
.link-row input {
    flex: 1;
    min-width: 0;
    min-height: 40px;
    padding: 0 4px;
    border: none;
    border-bottom: 1.5px dashed var(--pencil);
    background: transparent;
    font-size: 0.95rem;
    color: var(--ink-2);
    text-overflow: ellipsis;
}

/* Signed by */
.players-section { padding-left: 26px; }
.players-section .section-title { font-size: 1.25rem; }
.player-list { display: flex; flex-direction: column; gap: 10px; }
.player-row {
    display: grid;
    grid-template-columns: 44px 1fr auto;
    align-items: center;
    gap: 12px;
    min-height: 60px;
    padding: 6px 4px 6px 0;
    border-bottom: 1.5px dashed var(--pencil);
}
.player-row.empty { opacity: 0.55; }
.player-avatar {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border: 1.8px solid currentColor;
    border-radius: var(--sketch-oval);
    font-family: var(--font-hand);
    font-weight: 700;
    font-size: 1.2rem;
    color: var(--ink-me);
}
.player-row.them .player-avatar { color: var(--ink-them); }
.player-row.empty .player-avatar { border-style: dashed; color: var(--ink-3); }
.player-info { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.player-row .player-name { font-family: var(--font-hand); font-weight: 700; font-size: 1.5rem; line-height: 1.1; color: var(--ink-me); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.player-row.them .player-name { color: var(--ink-them); }
.player-row.empty .player-name { color: var(--ink-3); }
.player-status { font-size: 1rem; color: var(--ink-2); }
.player-state {
    font-family: var(--font-hand);
    font-weight: 700;
    font-size: 1.1rem;
    padding: 2px 10px;
    color: var(--ink-3);
    border: 1.5px dashed var(--pencil);
    border-radius: var(--sketch-oval);
}
.player-row.ready .player-state { color: var(--pen-red); border: 2px solid var(--pen-red); animation: stickOn 0.4s var(--ease-spring); }

.status-line { padding-left: 26px; font-family: var(--font-hand); font-weight: 500; font-size: 1.35rem; color: var(--ink-2); min-height: 1.4em; }
.status-line.starting { color: var(--pen-red); font-weight: 700; animation: wobble 0.6s ease-in-out; }

.ready-cta { position: sticky; bottom: calc(12px + var(--safe-bottom)); margin: auto 0 0 26px; font-family: var(--font-hand); font-weight: 700; font-size: 1.5rem; }
