/* SlovoBoj in the browser, the multiplayer screens (plan-web.md W4): the app's MultiplayerPage, CreateRoomPage,
   RoomPinPage, LobbyPage, MultiplayerGamePage, MatchResultsPage, LeaderboardPage and BlockedPlayersPage in the v4
   "Vedro" look, with the variables of tokens.css and the shared pieces of app.css. */

/* ---- "Više igrača": the player's card, the search, the room list (MultiplayerPage, mockup_v4_room) ------------------ */

.mp-top { flex: none; padding: 0 16px; display: flex; flex-direction: column; }
.mp-top .group-caption { margin: 16px 14px 6px; }

.me-card {
    flex: none;
    height: 64px;
    margin-top: 6px;
    padding: 0 18px 0 14px;
    border-radius: 20px;
    background: var(--tile-face);
    color: var(--ink);
    box-shadow: 0 5px 12px color-mix(in srgb, var(--tile-shadow) 45%, transparent);
    display: flex;
    align-items: center;
    gap: 12px;
}

.me-name { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.me-name .caps { font-size: 11px; letter-spacing: 1px; color: var(--tile-edge); line-height: 1.2; }
.me-name b { font-weight: 900; font-size: 21px; line-height: var(--line); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.me-points { flex: none; display: flex; flex-direction: column; align-items: flex-end; }
.me-points b { font-weight: 900; font-size: 24px; line-height: 1.15; }
.me-points span { font-size: 11px; color: var(--tile-edge); line-height: 1.2; }

.search-pill {
    flex: none;
    height: 48px;
    margin-top: 14px;
    padding: 0 4px 0 16px;
    border-radius: 24px;
    background: var(--card);
    border: 1px solid var(--card-border);
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: text;
}

.search-pill > img { width: 20px; height: 20px; opacity: 0.8; }

.search-pill input {
    flex: 1;
    min-width: 0;
    height: 100%;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--text-on-dark);
    font: 700 16px/1.364 Nunito, sans-serif;
    -webkit-user-select: text;
    user-select: text;
}

.search-pill input::placeholder { color: #95a5bc; }
.search-pill input::-webkit-search-cancel-button { display: none; }

.mp-list-host { position: relative; flex: 1; min-height: 0; margin: 0 16px; }

.mp-list {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: none;
}

.mp-list::-webkit-scrollbar { display: none; }
.mp-list[hidden] { display: none; }

/* The footer keeps the last row clear of the floating button. */
.mp-list-footer { flex: none; height: 80px; }

.room-row {
    flex: none;
    padding: 12px 14px 12px 16px;
    border-radius: 20px;
    background: var(--card);
    border: 1px solid var(--card-border);
    color: var(--text-on-dark);
    font: inherit;
    text-align: left;
    display: grid;
    grid-template-columns: 1fr auto;
    column-gap: 10px;
    row-gap: 10px;
    align-items: center;
    cursor: pointer;
    transition: transform 120ms cubic-bezier(0.33, 1, 0.68, 1);
}

.room-row:active { transform: scale(0.97); }
.room-row:focus-visible { outline: 3px solid var(--yellow); outline-offset: 2px; }

.room-name { min-width: 0; font-weight: 900; font-size: 18px; line-height: var(--line); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.room-tags { display: flex; align-items: center; gap: 6px; }

.room-rounds {
    height: 26px;
    padding: 0 10px;
    border-radius: 13px;
    background: var(--pill);
    font-size: 13px;
    line-height: 26px;
    white-space: nowrap;
}

.room-tags img { width: 20px; height: 20px; }
.room-seats { min-width: 0; display: flex; align-items: center; gap: 6px; }

.seat-free {
    flex: none;
    width: 28px;
    height: 28px;
    border-radius: 14px;
    border: 1.5px dashed rgb(255 255 255 / 0.4);
}

.seats-left { margin-left: 6px; font-size: 13px; opacity: 0.7; white-space: nowrap; }
.room-next { justify-self: end; width: 22px; height: 22px; opacity: 0.85; }

.mp-empty {
    position: absolute;
    inset: 0 24px 60px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    text-align: center;
}

.mp-empty b { margin-top: 8px; font-weight: 900; font-size: 22px; line-height: var(--line); }
.mp-empty p { margin: 0; font-size: 15px; line-height: var(--line); opacity: 0.8; }
.mp-empty.failed { gap: 14px; }
.mp-empty.failed p { font-size: 17px; }
.mp-empty.failed .flat { width: auto; align-self: stretch; margin: 0 40px; }
.mp-empty .mp-invite { width: auto; align-self: stretch; margin: 8px 30px 0; }
/* With the invitation under it, centred above the floating "Stvori sobu" (it would touch it on a 640 px screen). */
.mp-empty.no-rooms { bottom: 88px; }
@media (max-height: 700px) { .mp-empty.no-rooms .empty-disc { display: none; } }
/* "Ulazak u sobu…" under the spinner while an invitation's room is joined (pravila-igre-v023, B20.7). */
.mp-empty .mp-joining { margin-top: 16px; font-weight: 700; font-size: 16px; opacity: 1; }

.empty-disc {
    width: 64px;
    height: 64px;
    border-radius: 32px;
    background: var(--slot);
    border: 1.5px dashed rgb(255 255 255 / 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
}

.empty-disc img { width: 28px; height: 28px; opacity: 0.7; }

.mp-list-host .mp-create {
    position: absolute;
    right: 0;
    bottom: 16px;
    width: 196px;
}

/* Over the player card and the report dialog, which it reports on; under the screen's own questions (Dialog, 50 later in the markup). */
.list-toast {
    position: absolute;
    top: calc(120px + var(--safe-top));
    left: 0;
    right: 0;
    z-index: 50;
}

/* ---- "Stvori sobu" (CreateRoomPage, mockup_v4_create) ----------------------------------------------------------- */

.create-rows {
    flex: 1;
    min-height: 0;
    padding: 18px 32px 12px;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: none;
    display: flex;
    flex-direction: column;
}

.create-rows::-webkit-scrollbar { display: none; }

.create-caption {
    margin: 0 0 6px 20px;
    font-size: 13px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    opacity: 0.85;
}

.room-name-pill {
    flex: none;
    height: 62px;
    padding: 0 12px 0 20px;
    border-radius: 31px;
    background: var(--tile-face);
    color: var(--ink);
    box-shadow: 0 6px 12px color-mix(in srgb, var(--tile-shadow) 50%, transparent);
    display: flex;
    align-items: center;
    gap: 12px;
}

.room-name-pill > span {
    flex: 1;
    min-width: 0;
    font-weight: 900;
    line-height: var(--line);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.create-row {
    flex: none;
    height: 66px;
    margin-top: 10px;
    padding: 0 16px 0 20px;
    border-radius: 33px;
    background: var(--card);
    border: 1px solid var(--card-border);
    display: flex;
    align-items: center;
    gap: 4px;
}

.create-row.first { margin-top: 18px; }
.create-row.switch, .create-row.pin { padding-right: 12px; gap: 10px; }
.create-row.switch { cursor: pointer; }
.create-row.pin { gap: 6px; }
.create-row > img { width: 20px; height: 20px; opacity: 0.85; }
.create-label { flex: 1; min-width: 0; font-size: 17px; line-height: var(--line); }
.create-row.pin .create-label { flex: none; }

.create-value {
    width: 44px;
    text-align: center;
    font-weight: 900;
    font-size: 22px;
    line-height: var(--line);
    color: var(--yellow);
}

.pin-digits {
    flex: 1;
    margin-left: 12px;
    font-weight: 900;
    font-size: 24px;
    letter-spacing: 6px;
    line-height: var(--line);
    color: var(--yellow);
}

.create-buttons {
    flex: none;
    padding: 0 50px 24px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

/* ---- the PIN of a private room (RoomPinPage, RoomCodeView, KeypadView; mockup_v4_join) ------------------------------- */

.pin-body {
    flex: 1;
    min-height: 0;
    padding: 0 32px 24px;
    display: flex;
    flex-direction: column;
}

.pin-room {
    margin-top: 14px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
}

.pin-room img { width: 20px; height: 20px; opacity: 0.85; }
.pin-room b { max-width: 260px; font-weight: 900; font-size: 20px; line-height: var(--line); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.pin-prompt { margin: 10px 0 20px; font-size: 15px; line-height: var(--line); text-align: center; opacity: 0.85; }
.room-pin.short .pin-tiles { margin-top: 20px; }

/* The digits as on a 54 px tile (em 55 % → about 30 px); four tiles fit the narrowest column. */
.pin-tiles {
    display: flex;
    justify-content: center;
    gap: 5px;
    height: calc(58px + var(--edge-height) + 12px);
}

.pin-tile, .pin-slot {
    flex: none;
    width: 45px;
    height: 58px;
    border-radius: 11px;
}

.pin-slot { background: var(--slot); box-shadow: inset 0 0 0 1.5px rgb(255 255 255 / 0.25); }

.pin-tile {
    --off: calc(45px * 0.06);
    --spr: calc(45px * 0.12);
    background: var(--tile-face);
    color: var(--ink);
    font-weight: 900;
    font-size: calc(54px * var(--tile-letter-size));
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow:
        0 var(--edge-height) 0 0 var(--tile-edge),
        0 calc(var(--off) + var(--edge-height) / 2 + var(--spr) * 0.2) 0 calc(var(--spr) / 6) color-mix(in srgb, var(--tile-shadow) 40%, transparent),
        0 calc(var(--off) + var(--edge-height) / 2 + var(--spr) * 0.4) 0 calc(var(--spr) / 3) color-mix(in srgb, var(--tile-shadow) 26.67%, transparent),
        0 calc(var(--off) + var(--edge-height) / 2 + var(--spr) * 0.6) 0 calc(var(--spr) / 2) color-mix(in srgb, var(--tile-shadow) 13.33%, transparent);
}

.pin-tile span {
    line-height: 58px;
    transform: translateY(calc((var(--cap-height) / 2 - (var(--ascent) - var(--descent)) / 2) * 1em - var(--tile-letter-lift) * 54px));
}

/* The next position: a white face with a yellow ring and an orange caret. */
.pin-tile.caret { box-shadow: inset 0 0 0 3px var(--yellow); }
.pin-tile.caret i { width: 3px; height: calc(58px * 0.42); border-radius: 1.5px; background: var(--orange); animation: caret 1s steps(1) infinite; }

@keyframes caret { 50% { opacity: 0; } }

.pin-buttons { margin: 26px 18px 0; display: flex; flex-direction: column; gap: 4px; }
.pin-space { flex: 1; min-height: 12px; }

.keypad {
    flex: none;
    width: 100%;
    max-width: 310px;
    align-self: center;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.key {
    height: 51px;
    padding: 0;
    border-radius: 14px;
    border: 1px solid rgb(255 255 255 / 0.18);
    background: rgb(255 255 255 / 0.14);
    color: var(--text-on-dark);
    font: 900 calc(54px * var(--tile-letter-size)) / 51px Nunito, sans-serif;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.key:active { background: rgb(255 255 255 / 0.32); }
.key img { width: 24px; height: 24px; opacity: 0.85; }
.key:focus-visible { outline: 3px solid var(--yellow); outline-offset: 2px; }

/* ---- the header's banner while the connection comes back (PageHeaderView.Banner) ------------------------------------- */

.page-banner {
    height: 40px;
    padding: 0 18px;
    border-radius: 20px;
    background: var(--yellow);
    color: var(--ink);
    font-weight: 900;
    font-size: 17px;
    display: flex;
    align-items: center;
    gap: 10px;
    white-space: nowrap;
}

.banner-spinner {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 2.5px solid rgb(201 146 0 / 0.3);
    border-top-color: var(--yellow-edge);
    animation: spin 900ms linear infinite;
}

/* ---- the lobby (LobbyPage, mockup_v4_lobby / lobby_host) ---------------------------------------------------------- */

.lobby-body {
    flex: 1;
    min-height: 0;
    padding: 0 16px 4px;
    display: flex;
    flex-direction: column;
}

.lobby-pills { flex: none; margin: 10px 0 12px; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.lobby-pill-row { display: flex; align-items: center; gap: 8px; }
/* The round buttons keep 8 px of room for their shadow; the row's gap is the app's 8 between the faces. */
.lobby-pill-row .round { margin: -8px -8px -8px 0; }

.glass-card-pill {
    height: 36px;
    padding: 0 14px;
    border-radius: 18px;
    background: var(--card);
    border: 1px solid var(--card-border);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 16px;
    white-space: nowrap;
}

.glass-card-pill:has(img) { padding: 0 16px; }
.glass-card-pill img { width: 18px; height: 18px; }
.glass-card-pill b, .pin-pill b { font-weight: 900; line-height: var(--line); }

.pin-pill {
    height: 36px;
    padding: 0 14px 0 12px;
    border-radius: 18px;
    background: var(--yellow);
    color: var(--ink);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 16px;
}

.pin-pill img { width: 16px; height: 16px; }

.seats {
    flex: none;
    padding: 4px 16px;
    border-radius: 22px;
    background: var(--card);
    border: 1px solid var(--card-border);
}

.seat { height: 46px; display: flex; align-items: center; gap: 12px; }
.seat.other, .seat.empty { cursor: pointer; }
.seat-free.big { width: 36px; height: 36px; border-radius: 18px; display: grid; place-items: center; }
.seat-free.big img { width: 18px; height: 18px; opacity: 0.8; }

/*
 * "Pozovi prijatelja" as the seats card's last row while a seat is free (v023 B3.6, O5 U1–U3), hardly taller than a
 * seat (its shadow runs into the card's padding). Its label steps down from 17 px to fit between the face's round ends
 * (13 px at least; --chars is the label's length, Nunito Black's mean advance about 0.58 em, the icon 1.18 em and a
 * 12 px gap). Right after creating the room it lights up three times.
 */
.seats { container-type: inline-size; }
.invite-button {
    margin: 2px 0 -8px;
    --font: clamp(13px, calc((100cqi - 54px) / (var(--chars) * 0.58 + 1.18)), 17px) !important;
}
.invite-button.glow .flat-face { animation: invite-glow 700ms ease-in-out 400ms 3; }
@keyframes invite-glow {
    0%, 100% { scale: 1; }
    50% { scale: 1.03; box-shadow: 0 var(--edge-height) 0 0 var(--edge-color), 0 0 0 9px rgb(255 210 63 / 0.6); }
}
.seat-waiting { font-style: italic; font-size: 17px; opacity: 0.6; }
.seat-who { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; }
.seat-name { max-width: 150px; font-size: 19px; line-height: var(--line); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.seat-who img { width: 18px; height: 18px; }

.you-pill {
    flex: none;
    height: 22px;
    padding: 0 8px;
    border-radius: 11px;
    background: rgb(255 255 255 / 0.18);
    font-size: 11px;
    letter-spacing: 1px;
    line-height: 22px;
}

.status-chip {
    flex: none;
    height: 30px;
    padding: 0 12px;
    border-radius: 15px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    white-space: nowrap;
}

.status-chip img { width: 16px; height: 16px; }
.status-chip.ready { background: var(--yellow); color: var(--ink); }
.status-chip.not-ready { background: rgb(255 255 255 / 0.1); box-shadow: inset 0 0 0 1.5px rgb(255 255 255 / 0.7); }
.status-chip.away { background: rgb(255 255 255 / 0.1); box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.18); color: rgb(255 255 255 / 0.6); }

.lobby-action { flex: none; margin-top: 10px; }

.lobby-caption {
    flex: none;
    margin: -2px 0 8px;
    font-size: 15px;
    line-height: var(--line);
    text-align: center;
    opacity: 0.8;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.lobby-caption.maintenance {
    opacity: 1;
    color: var(--yellow);
    white-space: normal;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}

/* iPhone and iPad (W7): what a minute outside the browser costs in a match, under the caption. */
.lobby-note {
    flex: none;
    margin: -4px 8px 8px;
    font-size: 13px;
    line-height: 1.3;
    text-align: center;
    opacity: 0.8;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.chat {
    flex: 1;
    min-height: 0;
    padding: 8px 14px;
    border-radius: 22px;
    background: var(--card);
    border: 1px solid var(--card-border);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: none;
    -webkit-user-select: text;
    user-select: text;
}

.chat::-webkit-scrollbar { display: none; }

.chat-system { flex: none; margin: 4px 0; font-style: italic; font-size: 14px; line-height: var(--line); text-align: center; opacity: 0.7; }

.chat-theirs { flex: none; margin: 3px 0; display: flex; flex-direction: column; align-items: flex-start; gap: 4px; cursor: pointer; }
.chat-who { display: flex; align-items: baseline; gap: 8px; }
.chat-who b { font-weight: 700; font-size: 14px; color: var(--yellow); }
.chat-who span { font-size: 13px; opacity: 0.6; }

.chat-theirs p, .chat-mine {
    max-width: 240px;
    margin: 0;
    padding: 8px 14px;
    border-radius: 14px;
    font-size: 16px;
    line-height: var(--line);
    overflow-wrap: anywhere;
}

.chat-theirs p { background: #dde3eb; color: var(--ink); }

.chat-mine {
    flex: none;
    margin: 3px 0;
    align-self: flex-end;
    background: rgb(255 255 255 / 0.2);
    box-shadow: inset 0 0 0 1.5px rgb(255 210 63 / 0.67);
}

.chat-input {
    flex: none;
    position: relative;
    height: 48px;
    margin-top: 14px;
    padding: 0 53px 0 19px;
    border-radius: 24px;
    background: var(--card);
    border: 1px solid var(--card-border);
    display: flex;
    align-items: center;
    cursor: text;
}

.chat-input input {
    flex: 1;
    min-width: 0;
    height: 100%;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--text-on-dark);
    font: 700 16px/1.364 Nunito, sans-serif;
    -webkit-user-select: text;
    user-select: text;
}

.chat-input input::placeholder { color: #95a5bc; }
.chat-input .round { position: absolute; right: -12px; top: 50%; transform: translateY(-50%); }

.chat-closed {
    flex: none;
    min-height: 48px;
    margin: 14px 0 0;
    padding: 4px 20px;
    border-radius: 24px;
    background: var(--card);
    border: 1px solid var(--card-border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    line-height: var(--line);
    text-align: center;
    opacity: 0.85;
}

.scrim.starting { justify-content: center; }
.scrim.starting b { font-weight: 900; font-size: 28px; }

/* ---- the player card and the report dialog (PlayerCardView, ReportDialogView) -------------------------------------- */

.player-card { padding: 24px 22px 8px; }
.player-card .card-avatar { align-self: center; }
.player-card .dialog-title { margin-top: 10px; }
.card-points { margin: 0; font-size: 15px; text-align: center; color: var(--muted-ink); }

.card-quote {
    margin: 12px 0 0;
    padding: 8px 14px;
    border-radius: 14px;
    background: var(--reason-idle);
    color: var(--ink);
    font-size: 15px;
    line-height: var(--line);
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    -webkit-user-select: text;
    user-select: text;
}

.card-quote.two { -webkit-line-clamp: 2; margin-top: 10px; }
.player-card .card-report { margin-top: 16px; }

.card-close {
    align-self: center;
    padding: 10px 16px 12px;
    border: 0;
    background: none;
    color: var(--ink);
    opacity: 0.7;
    font: 900 17px/1.364 Nunito, sans-serif;
    cursor: pointer;
}

.report-veil { padding: 12px 0; }

.report-card {
    margin: 0 24px;
    max-height: 100%;
    padding: 22px 20px 6px;
}

.report-rows {
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: none;
    display: flex;
    flex-direction: column;
}

.report-rows::-webkit-scrollbar { display: none; }

.report-title { margin: 0; font-weight: 900; font-size: 22px; line-height: var(--line); text-align: center; color: var(--ink); }

.report-caption {
    margin: 14px 0 6px 4px;
    font-size: 12px;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--muted-ink);
}

.report-reasons { display: flex; flex-direction: column; gap: 6px; }

.reason {
    flex: none;
    height: 40px;
    padding: 0 12px 0 16px;
    border: 0;
    border-radius: 20px;
    background: var(--reason-idle);
    color: var(--ink);
    font: 700 16px/1.364 Nunito, sans-serif;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    text-align: left;
    cursor: pointer;
}

.reason.selected { background: var(--yellow); }
.reason img { width: 20px; height: 20px; }

.report-note {
    flex: none;
    height: 44px;
    margin-top: 8px;
    padding: 0 16px;
    border: 0;
    outline: 0;
    border-radius: 22px;
    background: var(--reason-idle);
    color: var(--ink);
    font: 700 16px/1.364 Nunito, sans-serif;
    -webkit-user-select: text;
    user-select: text;
}

.report-note::placeholder { color: #8a97ad; }

.report-block {
    margin: 10px 0 0 4px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--ink);
    font-size: 16px;
    line-height: var(--line);
    cursor: pointer;
}

.report-block span { flex: 1; }
.report-buttons { flex: none; margin-top: 12px; display: flex; flex-direction: column; }

/* ---- a round of the match (MultiplayerGamePage, mockup_v4_multiplayer_game_screen) -------------------------------- */

.score-strip { flex: none; margin-top: 10px; display: flex; align-items: center; gap: 6px; }

.round-pill {
    flex: none;
    height: 50px;
    padding: 0 10px;
    border-radius: 14px;
    background: var(--yellow);
    color: var(--ink);
    font-weight: 900;
    font-size: 16px;
    line-height: 50px;
}

.score-cards {
    flex: 1;
    min-width: 0;
    display: flex;
    justify-content: safe center;
    gap: 6px;
    overflow-x: auto;
    scrollbar-width: none;
}

.score-cards::-webkit-scrollbar { display: none; }

.score-card {
    flex: none;
    min-width: 60px;
    height: 50px;
    padding: 4px 8px;
    border-radius: 14px;
    background: var(--pill);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.score-card.me { background: var(--yellow); color: var(--ink); }
.score-card.quit { opacity: 0.45; }
.score-name { max-width: 72px; font-size: 12px; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.score-card b { font-weight: 900; font-size: 18px; line-height: 1.2; font-variant-numeric: tabular-nums; }

.mp-board { position: relative; flex: 1; min-height: 0; margin: 10px -10px 0; }

.finish-pill {
    position: absolute;
    top: -4px;
    left: 50%;
    transform: translateX(-50%);
    height: 34px;
    padding: 0 16px;
    border-radius: 17px;
    background: var(--yellow);
    color: var(--ink);
    font-weight: 900;
    font-size: 16px;
    line-height: 34px;
    white-space: nowrap;
    box-shadow: 0 4px 8px color-mix(in srgb, var(--tile-shadow) 40%, transparent);
    pointer-events: none;
    z-index: 5;
}

.mp-banner {
    position: absolute;
    top: calc(12px + var(--safe-top));
    left: 50%;
    transform: translateX(-50%);
    height: 36px;
    padding: 0 16px;
    border-radius: 18px;
    background: var(--yellow);
    color: var(--ink);
    font-weight: 900;
    font-size: 15px;
    line-height: 36px;
    white-space: nowrap;
    z-index: 45;
}

.white-card.mp-card { margin: 0 40px; }
.card-heading.small { font-size: 30px; }

.round-coins { margin-top: -2px; display: flex; justify-content: center; align-items: center; gap: 6px; }
.round-coins img { width: 33px; height: 22px; }
.round-coins b { font-weight: 900; font-size: 18px; color: var(--yellow-edge); }

.round-reason { margin: -4px 0 6px; font-size: 14px; line-height: var(--line); text-align: center; color: var(--ink); opacity: 0.7; }
.next-round { font-weight: 900; font-size: 24px; line-height: var(--line); text-align: center; color: var(--orange); }

.spinner.orange { align-self: center; border-color: rgb(255 143 60 / 0.25); border-top-color: var(--orange); }
.mp-card .flat { margin-top: 10px; }

/* ---- the match's results (MatchResultsPage, RankBadge, WordPillView) ----------------------------------------------- */

.results-body { padding-top: 4px; display: flex; flex-direction: column; gap: 10px; }
.results-headline { margin: 0; font-weight: 900; font-size: 26px; line-height: var(--line); text-align: center; }
.results-reason { margin: -6px 0 0; font-size: 15px; line-height: var(--line); text-align: center; opacity: 0.75; }
.results-rounds { margin: -6px 0 4px; font-size: 13px; text-align: center; opacity: 0.75; }

.standings { display: flex; flex-direction: column; gap: 8px; }

.standing {
    flex: none;
    height: 52px;
    padding: 0 16px 0 12px;
    border-radius: 26px;
    background: var(--pill);
    border: 1px solid var(--card-border);
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
}

.standing.me { background: var(--yellow); border-color: transparent; color: var(--ink); cursor: default; }
.standing.quit { opacity: 0.45; }
.standing-name { flex: 1; min-width: 0; font-size: 19px; line-height: var(--line); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.standing-rounds { font-size: 14px; opacity: 0.8; white-space: nowrap; }
.standing-score { font-weight: 900; font-size: 20px; color: var(--yellow); font-variant-numeric: tabular-nums; }
.standing.me .standing-score { color: var(--ink); }
.standing-lp { min-width: 62px; font-size: 15px; text-align: right; white-space: nowrap; }

.rank-badge {
    flex: none;
    width: 28px;
    height: 28px;
    border-radius: 14px;
    font-weight: 900;
    font-size: 14px;
    line-height: 28px;
    text-align: center;
}

.rank-badge.me { background: var(--yellow-edge); color: var(--ink); }
.rank-badge.gold { background: var(--yellow); color: var(--ink); }
.rank-badge.silver { background: #dbe6f2; color: var(--ink); }
.rank-badge.bronze { background: #d9905a; color: #2a1405; }
.rank-badge.none { background: rgb(255 255 255 / 0.12); color: rgb(255 255 255 / 0.6); }
.rank-badge.other { background: rgb(255 255 255 / 0.2); color: var(--text-on-dark); }

.white-card.my-result { margin: 8px 0 0; padding: 16px 22px; gap: 6px; animation: none; }
.my-result .card-title { margin-bottom: 4px; }

.results-caption { margin: 10px 0 2px; font-size: 13px; letter-spacing: 1px; text-transform: uppercase; opacity: 0.75; }

.round-board { display: flex; flex-direction: column; gap: 4px; }
.round-heading { display: flex; gap: 8px; font-size: 14px; }
.round-heading b { font-weight: 900; }
.round-heading span { opacity: 0.75; }
.round-words { display: flex; flex-wrap: wrap; gap: 8px; }

.word-pill {
    height: 32px;
    padding: 0 12px;
    border-radius: 16px;
    background: var(--slot);
    color: rgb(255 255 255 / 0.7);
    font-weight: 900;
    font-size: 15px;
    line-height: 32px;
    white-space: nowrap;
}

.word-pill.found { background: var(--tile-face); color: var(--ink); }

.results-buttons { flex: none; padding: 6px 34px 16px; display: flex; flex-direction: column; gap: 2px; }

/* ---- the league table (LeaderboardPage, mockup_v4_leaderboard / _empty / _noname) ------------------------------------ */

.board-top { flex: none; padding: 0 16px; }

.white-card.my-board-card { margin: 6px 0 0; padding: 14px 18px; gap: 8px; animation: none; }
.my-board-who { display: flex; align-items: center; gap: 12px; }
.my-board-avatar { position: relative; flex: none; width: 54px; height: 50px; }

.my-rank {
    position: absolute;
    right: 0;
    bottom: 0;
    min-width: 24px;
    height: 24px;
    padding: 0 5px;
    border-radius: 12px;
    background: var(--yellow);
    box-shadow: 0 0 0 2px var(--tile-face);
    color: var(--ink);
    font-weight: 900;
    font-size: 11px;
    line-height: 24px;
    text-align: center;
}

.my-board-name { padding: 0; border: 0; background: none; text-align: left; cursor: pointer; }
.my-board-points { flex: none; display: flex; flex-direction: column; align-items: flex-end; }
.my-board-points b { font-weight: 900; font-size: 30px; line-height: 1.1; }
.my-board-points span { font-size: 13px; color: var(--tile-edge); }
.my-board-card hr { width: 100%; height: 1px; margin: 0; border: 0; background: #dbe6f2; }
.my-board-four { margin-top: 2px; display: grid; grid-template-columns: repeat(4, 1fr); }
.my-board-four > div { display: flex; flex-direction: column; align-items: center; min-width: 0; }
.my-board-four b { font-weight: 900; font-size: 22px; line-height: var(--line); }
/* A caption wider than its quarter ("ODUSTAJANJA" on a 360 px phone) ends in "…", as in the app */
.my-board-four span {
    max-width: 100%;
    font-size: 12px;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--muted-ink);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.board-invitation {
    margin-top: 6px;
    padding: 18px 16px;
    border-radius: 24px;
    background: var(--card);
    border: 1.5px dashed rgb(255 210 63 / 0.67);
    display: flex;
    align-items: center;
    gap: 14px;
}

.invitation-disc {
    flex: none;
    width: 52px;
    height: 52px;
    border-radius: 26px;
    background: rgb(255 255 255 / 0.18);
    display: flex;
    align-items: center;
    justify-content: center;
}

.invitation-disc img { width: 24px; height: 24px; }
.board-invitation > div { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.board-invitation p { margin: 0; font-size: 15px; line-height: var(--line); text-align: center; }

/* The captions sit on the same grid as a row (its columns and gaps, inset by its padding and border). Wins stand over
   games in the last column: both apart took 112 px, and on a 360 px phone the nickname kept 4 letters. */
.board-columns, .board-row-entry {
    display: grid;
    grid-template-columns: 28px 30px minmax(0, 1fr) 64px 48px;
    column-gap: 8px;
    align-items: center;
}

.board-columns {
    margin: 14px 15px 6px 13px;
    align-items: end;
    font-size: 13px;
    line-height: var(--line);
    letter-spacing: 1px;
    text-transform: uppercase;
    opacity: 0.7;
}

.board-columns .col-lp { text-align: right; }
.board-columns .col-score { display: flex; flex-direction: column; align-items: flex-end; font-size: 10px; letter-spacing: 0.5px; }
/* 0.5 in all, under the captions' 0.7 */
.board-columns .col-score > span + span { margin-top: -1px; opacity: 0.71; }

.board-table-host { position: relative; flex: 1; min-height: 0; margin: 0 16px; }

.board-table {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: none;
}

.board-table::-webkit-scrollbar { display: none; }

.board-row-entry {
    flex: none;
    height: 52px;
    padding: 0 14px 0 12px;
    border-radius: 26px;
    background: var(--pill);
    border: 1px solid var(--card-border);
    cursor: pointer;
}

.board-row-entry.me { background: var(--yellow); border-color: transparent; color: var(--ink); cursor: default; }
/* A nickname may take two lines before it is cut; a long word breaks where it must */
.board-row-entry .col-name {
    font-size: 16px;
    line-height: var(--line);
    overflow-wrap: anywhere;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.board-row-entry .col-lp { font-weight: 900; font-size: 20px; text-align: right; color: var(--yellow); font-variant-numeric: tabular-nums; }
.board-row-entry.me .col-lp { color: var(--ink); }
.board-row-entry .col-score {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    font-size: 15px;
    line-height: var(--line);
    opacity: 0.85;
    font-variant-numeric: tabular-nums;
}

.board-row-entry .col-score > span + span { margin-top: -3px; font-size: 13px; opacity: 0.7; }
.board-row-entry.pinned { box-shadow: 0 5px 10px color-mix(in srgb, var(--tile-shadow) 45%, transparent); }

.board-pinned { flex: none; margin: 4px 16px 0; display: flex; flex-direction: column; gap: 4px; }
.board-pinned .dots { font-weight: 900; font-size: 14px; text-align: center; opacity: 0.6; }
.board-footer { flex: none; margin: 10px 16px 8px; font-size: 13px; text-align: center; opacity: 0.65; }

.board-empty {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 12px;
    text-align: center;
}

.empty-places { margin-bottom: 20px; display: flex; justify-content: center; gap: 10px; }

.empty-places span {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    background: var(--slot);
    border: 1px solid rgb(255 255 255 / 0.25);
    font-weight: 900;
    font-size: 26px;
    line-height: 54px;
    opacity: 0.5;
}

.board-empty b { font-weight: 900; font-size: 26px; line-height: var(--line); }
.board-empty p { margin: 0 20px; font-size: 16px; line-height: var(--line); opacity: 0.8; }
.board-empty .flat { margin: 16px 34px 0; width: auto; }

/* ---- "Blokirani igrači" (BlockedPlayersPage) ------------------------------------------------------------------------ */

.blocked-card { margin-top: 12px; padding: 4px 16px; }
.blocked-row { height: 64px; display: flex; align-items: center; gap: 12px; }
.blocked-who { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.blocked-who b { font-weight: 700; font-size: 18px; line-height: var(--line); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.blocked-who span {
    font-size: 13px;
    line-height: var(--line);
    opacity: 0.7;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.flat.blocked-unblock { flex: none; width: 132px; }

.blocked-empty {
    flex: 1;
    padding: 0 24px 60px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.blocked-empty img { width: 48px; height: 48px; opacity: 0.6; }
.blocked-empty p { margin: 0; font-size: 17px; line-height: var(--line); text-align: center; opacity: 0.8; }
