/* ===================================================================
   Phone player controller
   ================================================================ */

.player-body {
    min-height: 100vh;
    min-height: 100dvh;
    overflow-x: hidden;
    -webkit-tap-highlight-color: transparent;
    overscroll-behavior: contain;
    touch-action: manipulation;
}

.player {
    position: relative;
    z-index: 1;
    min-height: 100dvh;
    padding: 1rem;
    display: flex;
    flex-direction: column;
}

.view { flex: 1; display: flex; flex-direction: column; }

/* --------------------- Join view ---------------------------- */
.view--join { gap: 1.4rem; }

.join-head { text-align: center; margin-top: 2rem; }
.join-logo {
    display: inline-flex; align-items: baseline; gap: .5rem;
    font-family: var(--f-display); line-height: 1;
}
.join-game {
    font-size: 3rem; color: var(--c-bone);
    letter-spacing: .08em;
}
.join-room {
    font-size: 3rem; color: var(--c-crimson-2);
    text-shadow: 0 0 24px rgba(212,33,61,.7);
    letter-spacing: .08em;
}
.join-sub { font-family: var(--f-display); letter-spacing: .3em; color: var(--c-bone-dim); font-size: .8rem; margin-top: .3rem; }

/* Plain-language intro between the logo and the join form so a first-
   timer landing here knows what's expected. */
.join-intro {
    margin: 1.4rem auto 0;
    max-width: 380px;
    text-align: center;
    padding: 0 .4rem;
}
.join-intro__lead {
    color: var(--c-bone);
    font-size: 1.02rem;
    font-weight: 600;
    line-height: 1.35;
}
.join-intro__sub {
    color: var(--c-bone-dim);
    font-size: .85rem;
    line-height: 1.4;
    margin-top: .45rem;
}

.join-form {
    display: flex; flex-direction: column; gap: 1.1rem;
    margin-top: 1.5rem;
    background: rgba(20,20,32,.7);
    border: 1px solid rgba(255,255,255,.08);
    border-radius: var(--r-xl);
    padding: 1.4rem;
}
.join-field { display: flex; flex-direction: column; gap: .35rem; }
.join-field span {
    font-family: var(--f-display);
    letter-spacing: .18em;
    color: var(--c-bone-dim);
    font-size: .8rem;
}
.join-field input {
    background: rgba(0,0,0,.4);
    border: 1px solid rgba(255,255,255,.12);
    border-radius: var(--r-md);
    padding: 1rem 1.1rem;
    color: var(--c-bone);
    font-size: 1.2rem;
    transition: border-color .15s ease, background .15s ease;
}
.join-field input:focus {
    outline: none;
    border-color: var(--c-crimson-2);
    background: rgba(0,0,0,.6);
}
#codeInput {
    font-family: var(--f-display);
    letter-spacing: .25em;
    text-align: center;
    font-size: 2.2rem;
    text-transform: uppercase;
}

.join-error {
    color: var(--c-crimson-2);
    font-size: .9rem;
    min-height: 1.2em;
    text-align: center;
}

/* Play / Spectate mode picker */
.join-mode {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: .5rem;
}
.join-mode__opt {
    background: rgba(0,0,0,.35);
    border: 1px solid rgba(255,255,255,.1);
    border-radius: var(--r-md);
    padding: .65rem;
    color: var(--c-bone-dim);
    display: flex; align-items: center; justify-content: center; gap: .45rem;
    font-family: var(--f-display);
    letter-spacing: .12em;
    font-size: .85rem;
    transition: all .14s ease;
}
.join-mode__opt:active { transform: scale(.97); }
.join-mode__opt.is-active {
    background: rgba(212,33,61,.18);
    border-color: var(--c-crimson-2);
    color: var(--c-bone);
    box-shadow: 0 0 0 1px var(--c-crimson-2) inset;
}
.join-mode__opt[data-mode="spectate"].is-active {
    background: rgba(155,107,255,.18);
    border-color: var(--c-violet);
    box-shadow: 0 0 0 1px var(--c-violet) inset;
}
.join-mode__icon { font-size: 1.1rem; }

/* Spectator view -- read-only scoreboard */
.view--spectator {
    gap: .8rem;
    padding-bottom: 2rem;
    display: flex;
    flex-direction: column;
}
.spectator-head {
    display: flex; align-items: center; justify-content: space-between;
    background: rgba(155,107,255,.12);
    border: 1px solid rgba(155,107,255,.4);
    border-radius: var(--r-md);
    padding: .55rem .9rem;
    box-shadow: 0 0 24px rgba(155,107,255,.15);
}
.spectator-head__badge {
    font-family: var(--f-display);
    letter-spacing: .2em;
    color: var(--c-violet);
    font-size: .85rem;
}
.spectator-head__room {
    color: var(--c-bone-dim);
    font-size: .9rem;
}
.spectator-head__room strong { color: var(--c-bone); font-family: var(--f-display); letter-spacing: .1em; }

.spectator-game-info {
    background: rgba(20,20,32,.7);
    border: 1px solid rgba(255,255,255,.07);
    border-radius: var(--r-md);
    padding: .8rem;
    text-align: center;
}
.spectator-game-info__name {
    font-family: var(--f-display);
    font-size: 1.6rem;
    color: var(--c-bone);
    letter-spacing: .06em;
    line-height: 1;
}
.spectator-game-info__phase {
    color: var(--c-bone-dim);
    font-size: .85rem;
    margin-top: .35rem;
    letter-spacing: .04em;
}

.spectator-players {
    background: rgba(20,20,32,.7);
    border: 1px solid rgba(255,255,255,.07);
    border-radius: var(--r-md);
    padding: .7rem;
    display: flex; flex-direction: column; gap: .35rem;
}
.spectator-player {
    background: rgba(0,0,0,.3);
    border: 1px solid rgba(255,255,255,.05);
    border-radius: var(--r-sm);
    padding: .55rem .8rem;
    display: flex; align-items: center; gap: .7rem;
}
.spectator-player.is-current {
    background: rgba(246,200,19,.12);
    border-color: rgba(246,200,19,.5);
    box-shadow: 0 0 0 1px rgba(246,200,19,.4) inset;
}
.spectator-player.is-bot { opacity: .85; }
.spectator-player__avatar {
    width: 30px; height: 30px;
    border-radius: 50%;
    background: var(--c-crimson);
    color: var(--c-bone);
    display: flex; align-items: center; justify-content: center;
    font-family: var(--f-display);
    font-size: .85rem;
    flex-shrink: 0;
}
.spectator-player__info {
    flex: 1; min-width: 0;
    display: flex; flex-direction: column; gap: .1rem;
}
.spectator-player__name {
    color: var(--c-bone);
    font-weight: 600;
    font-size: .95rem;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.spectator-player__meta {
    color: var(--c-bone-dim);
    font-size: .75rem;
}
.spectator-player__badge {
    font-family: var(--f-display);
    color: var(--c-amber);
    font-size: .8rem;
    letter-spacing: .1em;
}

.spectator-hint {
    color: var(--c-bone-dim);
    font-size: .85rem;
    text-align: center;
    padding: .8rem;
    background: rgba(255,255,255,.03);
    border-radius: var(--r-sm);
    line-height: 1.4;
}
.spectator-hint__auto {
    color: var(--c-amber);
    font-weight: 600;
    margin-top: .35rem;
}
.spectator-claim {
    margin-top: .4rem;
}

.join-foot {
    margin-top: auto;
    color: var(--c-bone-dim);
    font-size: .8rem;
    text-align: center;
    padding-bottom: 1rem;
}
.join-foot code { background: rgba(255,255,255,.05); padding: .1rem .3rem; border-radius: 3px; }

/* --------------------- Lobby (post-join) -------------------- */
.view--lobby { justify-content: center; }
.player-card {
    background: rgba(20,20,32,.75);
    border: 1px solid rgba(255,255,255,.08);
    border-radius: var(--r-xl);
    padding: 1.6rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
.player-card__top { display: flex; align-items: center; gap: .8rem; }
.player-card__badge {
    background: var(--c-crimson);
    color: var(--c-bone);
    font-family: var(--f-display);
    letter-spacing: .15em;
    font-size: .8rem;
    padding: .2rem .55rem;
    border-radius: 4px;
}
.player-card h2 {
    font-size: 2rem;
    color: var(--c-bone);
    line-height: 1;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.player-card__hint {
    color: var(--c-bone-dim);
    font-size: .95rem;
}

/* Tap-to-rename pencil + inline form */
.rename-pencil {
    background: rgba(255,255,255,.06);
    border: 1px solid rgba(255,255,255,.1);
    color: var(--c-bone-dim);
    width: 32px; height: 32px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 1rem;
    line-height: 1;
    transition: background .12s ease, color .12s ease, transform .12s ease;
    flex-shrink: 0;
}
.rename-pencil:hover { background: rgba(212,33,61,.18); color: var(--c-bone); }
.rename-pencil:active,
.rename-pencil.is-active { transform: scale(.92); color: var(--c-crimson-2); }

.player-card h2.is-hidden-by-rename { display: none; }
.rename-form {
    display: grid;
    grid-template-columns: 1fr auto auto;
    gap: .4rem;
    align-items: center;
    width: 100%;
}
.rename-form input {
    grid-column: 1 / 4;
    background: rgba(0,0,0,.45);
    border: 1px solid var(--c-crimson-2);
    border-radius: var(--r-md);
    padding: .7rem .9rem;
    font-size: 1.15rem;
    color: var(--c-bone);
    letter-spacing: .02em;
}
.rename-form input:focus { outline: none; box-shadow: 0 0 0 2px rgba(212,33,61,.35); }
.rename-form__save {
    font-size: 1rem;
    padding: .55rem 1rem;
    grid-column: 2;
    grid-row: 2;
}
.rename-form__cancel {
    grid-column: 3;
    grid-row: 2;
    font-size: .8rem;
    padding: .55rem .9rem;
}
.rename-form__error {
    grid-column: 1;
    grid-row: 2;
    color: var(--c-crimson-2);
    font-size: .82rem;
    line-height: 1.2;
    align-self: center;
}

.lobby-roster h3 {
    font-size: 1rem;
    letter-spacing: .15em;
    color: var(--c-bone-dim);
    margin-bottom: .5rem;
}
.lobby-roster ul {
    list-style: none;
    display: flex; flex-wrap: wrap; gap: .35rem;
}
.lobby-roster li {
    background: rgba(255,255,255,.05);
    border: 1px solid rgba(255,255,255,.07);
    border-radius: 999px;
    padding: .3rem .7rem;
    font-size: .85rem;
    color: var(--c-bone);
}
.lobby-roster li.me {
    background: rgba(212,33,61,.18);
    border-color: rgba(212,33,61,.4);
    color: var(--c-bone);
    font-weight: 700;
}
.lobby-roster li.is-gm::after {
    content: 'GM';
    display: inline-block;
    margin-left: .35rem;
    font-family: var(--f-display);
    font-size: .65rem;
    letter-spacing: .15em;
    color: var(--c-amber);
    background: rgba(246,183,60,.12);
    padding: .05rem .35rem;
    border-radius: 3px;
    vertical-align: 1px;
}
.gm-indicator {
    font-family: var(--f-body);
    font-size: .8rem;
    color: var(--c-bone-dim);
    letter-spacing: 0;
    text-transform: none;
    margin-left: .35rem;
}
.gm-indicator strong { color: var(--c-amber); font-family: var(--f-display); letter-spacing: .04em; }

/* GM badge next to your name */
.player-card__gm {
    margin-left: auto;
    background: linear-gradient(135deg, var(--c-amber), #c47b00);
    color: var(--c-ink);
    font-family: var(--f-display);
    letter-spacing: .15em;
    font-size: .8rem;
    padding: .2rem .55rem;
    border-radius: 4px;
    box-shadow: 0 0 18px rgba(246,183,60,.45);
}

/* GM control panel ------------------------------------------------ */
.gm-panel {
    border: 1px solid rgba(246,183,60,.35);
    background: linear-gradient(160deg, rgba(246,183,60,.07), rgba(246,183,60,.02));
    border-radius: var(--r-lg);
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: .8rem;
    box-shadow: 0 0 30px rgba(246,183,60,.08);
}
.gm-panel__head { display: flex; align-items: center; gap: .5rem; }
.gm-panel__title {
    font-family: var(--f-display);
    color: var(--c-amber);
    letter-spacing: .15em;
    font-size: .9rem;
}
.gm-panel__setting {
    display: flex; align-items: center; justify-content: space-between;
    gap: .8rem;
    color: var(--c-bone-dim);
    font-size: .85rem;
}
.gm-panel__setting select {
    background: rgba(0,0,0,.55);
    color: var(--c-bone);
    border: 1px solid rgba(255,255,255,.1);
    border-radius: var(--r-sm);
    padding: .4rem .6rem;
    font-size: .9rem;
}

.gm-panel__bots summary {
    cursor: pointer;
    color: var(--c-bone);
    font-weight: 600;
    font-size: .9rem;
    padding: .4rem 0;
    list-style: none;
    display: flex; align-items: center; justify-content: space-between;
}
.gm-panel__bots summary::-webkit-details-marker { display: none; }
.gm-panel__bots summary::after {
    content: '+';
    font-family: var(--f-display);
    font-size: 1.2rem;
    color: var(--c-amber);
    line-height: 1;
}
.gm-panel__bots[open] summary::after { content: '−'; }
.gm-panel__bots .dim { color: var(--c-bone-dim); font-weight: 400; }

/* QR + room-code share section (phone GM) */
.gm-share {
    display: flex; gap: .8rem; align-items: center;
    background: rgba(0,0,0,.35);
    border: 1px solid rgba(255,255,255,.08);
    border-radius: var(--r-md);
    padding: .7rem;
}
.gm-share__qr {
    background: var(--c-bone);
    border-radius: var(--r-sm);
    padding: .35rem;
    flex-shrink: 0;
}
.gm-share__qr img { display: block; width: 86px; height: 86px; }
.gm-share__info { flex: 1; min-width: 0; }
.gm-share__code {
    font-family: var(--f-display);
    font-size: 1.8rem;
    color: var(--c-bone);
    letter-spacing: .2em;
    line-height: 1;
    text-shadow: 0 0 18px rgba(212,33,61,.3);
}
.gm-share__url {
    font-family: var(--f-mono);
    font-size: .7rem;
    color: var(--c-bone-dim);
    word-break: break-all;
    margin-top: .25rem;
}
.gm-share__hint {
    color: var(--c-amber);
    font-size: .72rem;
    margin-top: .25rem;
    letter-spacing: .04em;
}

/* Game picker tiles (phone GM) */
.gm-game-picker {
    display: flex; flex-direction: column; gap: .4rem;
}
.gm-game-picker__label {
    font-family: var(--f-display);
    letter-spacing: .15em;
    color: var(--c-bone-dim);
    font-size: .8rem;
}
.gm-game-tiles {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: .4rem;
}
.gm-game-tile {
    background: rgba(0,0,0,.35);
    border: 1px solid rgba(255,255,255,.1);
    border-radius: var(--r-md);
    padding: .55rem .35rem;
    color: var(--c-bone-dim);
    display: flex; flex-direction: column; align-items: center; gap: .15rem;
    cursor: pointer;
    transition: all .14s ease;
}
.gm-game-tile:active { transform: scale(.97); }
.gm-game-tile.is-active {
    background: rgba(212,33,61,.18);
    border-color: var(--c-crimson-2);
    color: var(--c-bone);
    box-shadow: 0 0 0 1px var(--c-crimson-2) inset;
}
.gm-game-tile[data-game="crew"].is-active {
    background: rgba(77,171,255,.18);
    border-color: var(--c-blue);
    box-shadow: 0 0 0 1px var(--c-blue) inset;
}
.gm-game-tile[data-game="uno"].is-active {
    background: rgba(246,200,19,.18);
    border-color: #f6c813;
    box-shadow: 0 0 0 1px #f6c813 inset;
}
.gm-game-tile__icon { font-size: 1.3rem; }
.gm-game-tile__name {
    font-family: var(--f-display);
    letter-spacing: .04em;
    font-size: .85rem;
    line-height: 1;
}
.gm-game-tile__sub {
    color: var(--c-bone-dim);
    font-size: .62rem;
    letter-spacing: .04em;
}

.gm-bot-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: .4rem;
    margin: .6rem 0;
}
.gm-bot-tile {
    background: rgba(0,0,0,.4);
    border: 1px solid rgba(255,255,255,.08);
    border-left: 3px solid var(--bot-accent, var(--c-violet));
    border-radius: var(--r-sm);
    padding: .4rem .55rem;
    color: var(--c-bone);
    text-align: left;
    display: flex; align-items: center; gap: .45rem;
    font-family: var(--f-body);
    font-size: .8rem;
    cursor: pointer;
    transition: background .12s ease, transform .1s ease;
}
.gm-bot-tile:hover { background: rgba(0,0,0,.55); }
.gm-bot-tile:active { transform: scale(.97); }
.gm-bot-tile__emoji {
    width: 26px; height: 26px;
    border-radius: 50%;
    background: var(--bot-accent);
    color: var(--c-ink);
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
    font-size: 1rem;
}
.gm-bot-tile__name {
    font-family: var(--f-display);
    letter-spacing: .03em;
    font-size: .82rem;
    line-height: 1.1;
    color: var(--c-bone);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* Per-player kick option in roster (GM only) */
.lobby-roster li .kick-mini {
    margin-left: .3rem;
    background: rgba(212,33,61,.18);
    color: var(--c-crimson-2);
    width: 18px; height: 18px;
    border-radius: 50%;
    font-size: .8rem;
    line-height: 1;
    display: inline-flex; align-items: center; justify-content: center;
}
.lobby-roster li .kick-mini:hover { background: rgba(212,33,61,.35); }

/* End-card GM buttons get spacing */
.end-card .primary-btn { margin-top: .8rem; }

/* --------------------- Active game -------------------------- */
.view--game {
    gap: 1rem;
    padding-bottom: 5rem; /* space for sticky actions */
}

.game-head-mobile {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    background: rgba(20,20,32,.7);
    border: 1px solid rgba(255,255,255,.07);
    border-radius: var(--r-lg);
    padding: .7rem 1rem;
}
.me { display: flex; flex-direction: column; gap: .2rem; flex: 1; min-width: 0; }
.me-name {
    font-family: var(--f-display);
    letter-spacing: .03em;
    font-size: 1.4rem;
    color: var(--c-bone);
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.me-status {
    font-family: var(--f-display);
    font-size: .7rem;
    letter-spacing: .15em;
    padding: .15rem .4rem;
    border-radius: 4px;
    background: rgba(255,255,255,.08);
    color: var(--c-bone-dim);
    align-self: flex-start;
}
.me-status[data-status="in_round"] { background: rgba(56,217,169,.15); color: var(--c-teal); }
.me-status[data-status="stayed"]   { background: rgba(77,171,255,.15); color: var(--c-blue); }
.me-status[data-status="busted"]   { background: rgba(212,33,61,.2); color: var(--c-crimson-2); }
.me-status[data-status="flip_7"]   { background: rgba(246,183,60,.2); color: var(--c-amber); }

.me-score { text-align: right; }
.me-score__round {
    font-family: var(--f-display);
    font-size: 2.4rem;
    line-height: 1;
    color: var(--c-amber);
    text-shadow: 0 0 16px rgba(246,183,60,.4);
}
.me-score__total {
    color: var(--c-bone-dim);
    font-size: .8rem;
    margin-top: .15rem;
}
.me-score__total span { color: var(--c-bone); font-weight: 700; }

.turn-banner {
    background: linear-gradient(135deg, var(--c-crimson), var(--c-blood));
    color: var(--c-bone);
    padding: .7rem 1rem;
    border-radius: var(--r-lg);
    text-align: center;
    font-family: var(--f-display);
    font-size: 1.3rem;
    letter-spacing: .08em;
    box-shadow: 0 6px 20px rgba(212,33,61,.3);
    animation: turnPulse 1.8s ease-in-out infinite alternate;
}
.turn-banner.is-other {
    background: linear-gradient(135deg, var(--c-ink-3), var(--c-ink-4));
    color: var(--c-bone-dim);
    animation: none;
    box-shadow: none;
    font-size: 1.1rem;
}
.turn-banner.is-stay  { background: linear-gradient(135deg, #1a4566, #102433); color: var(--c-blue); animation: none; }
.turn-banner.is-bust  { background: linear-gradient(135deg, var(--c-blood), #4a0710); animation: none; }
.turn-banner.is-flip7 { background: linear-gradient(135deg, var(--c-amber), #c47b00); color: var(--c-ink); animation: none; }
@keyframes turnPulse {
    from { box-shadow: 0 6px 20px rgba(212,33,61,.3); }
    to   { box-shadow: 0 6px 30px rgba(212,33,61,.6); }
}

.my-hand {
    background: rgba(20,20,32,.7);
    border: 1px solid rgba(255,255,255,.07);
    border-radius: var(--r-lg);
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: .9rem;
}
.my-hand__zone h4 {
    font-family: var(--f-display);
    letter-spacing: .15em;
    color: var(--c-bone-dim);
    font-size: .85rem;
    margin-bottom: .45rem;
    display: flex; align-items: center; gap: .4rem;
}
.my-hand__count { color: var(--c-bone); }
.my-hand__count #myUnique { color: var(--c-amber); font-weight: 700; }
.my-hand__cards {
    display: flex; flex-wrap: wrap; gap: .35rem;
    min-height: 60px;
    align-items: flex-end;
}
.my-hand__zone .card { width: 48px; height: 68px; }
.my-hand__zone .card .card__pip { font-size: 1.65rem; }
.my-hand__zone .card .card__corner { font-size: .65rem; }
.my-hand__row { display: grid; grid-template-columns: 1.4fr 1fr; gap: .8rem; }
.my-hand__zone--small { background: rgba(0,0,0,.2); padding: .55rem; border-radius: var(--r-md); }
.my-hand__zone--small .my-hand__cards { min-height: 50px; }

/* --------------------- Actions panel ------------------------ */
.actions-panel {
    position: fixed;
    left: 1rem; right: 1rem;
    bottom: 1rem;
    display: flex;
    gap: .6rem;
    z-index: 50;
    pointer-events: auto;
}
.action-btn {
    flex: 1;
    background: linear-gradient(160deg, var(--c-ink-3), var(--c-ink-2));
    border: 1px solid rgba(255,255,255,.1);
    border-radius: var(--r-lg);
    padding: 1.2rem .8rem 1rem;
    color: var(--c-bone);
    display: flex; flex-direction: column; align-items: center; gap: .15rem;
    box-shadow: 0 10px 30px rgba(0,0,0,.4);
    transition: transform .12s ease, box-shadow .12s ease, filter .12s ease;
    position: relative;
    overflow: hidden;
}
.action-btn:active { transform: translateY(2px) scale(.99); }
.action-btn__main {
    font-family: var(--f-display);
    font-size: 1.8rem;
    letter-spacing: .08em;
    line-height: 1;
}
.action-btn__sub {
    font-size: .7rem;
    letter-spacing: .05em;
    color: var(--c-bone-dim);
}
.action-btn--hit {
    background: linear-gradient(160deg, var(--c-crimson-2), var(--c-blood));
    box-shadow: 0 10px 30px rgba(212,33,61,.4), 0 0 0 1px rgba(212,33,61,.6) inset;
}
.action-btn--hit .action-btn__sub { color: rgba(255,255,255,.75); }
.action-btn--stay {
    background: linear-gradient(160deg, #2a5c8a, #163147);
    box-shadow: 0 10px 30px rgba(77,171,255,.18), 0 0 0 1px rgba(77,171,255,.4) inset;
}
.action-btn--stay .action-btn__sub { color: rgba(220,235,255,.75); }
.action-btn--flip {
    background: linear-gradient(160deg, var(--c-amber), #b27a00);
    color: var(--c-ink);
    box-shadow: 0 10px 30px rgba(246,183,60,.3), 0 0 0 1px rgba(246,183,60,.6) inset;
}
.action-btn--flip .action-btn__sub { color: rgba(20,20,20,.75); }

.action-btn:disabled { opacity: .35; filter: grayscale(.5); pointer-events: none; }

/* --------------------- Target picker ------------------------ */
.target-panel {
    background: rgba(155,107,255,.1);
    border: 1px solid rgba(155,107,255,.4);
    border-radius: var(--r-lg);
    padding: 1rem;
    box-shadow: 0 0 20px rgba(155,107,255,.2);
}
.target-panel h3 {
    color: var(--c-violet);
    font-size: 1.3rem;
    letter-spacing: .08em;
    margin-bottom: .2rem;
}
.target-panel p { color: var(--c-bone-dim); font-size: .9rem; margin-bottom: .8rem; }
.target-list { list-style: none; display: flex; flex-direction: column; gap: .5rem; }
.target-list li {
    background: rgba(0,0,0,.3);
    border: 1px solid rgba(255,255,255,.1);
    border-radius: var(--r-md);
    padding: .8rem 1rem;
    display: flex; align-items: center; gap: .8rem;
    transition: background .12s ease, border-color .12s ease, transform .12s ease;
}
.target-list li:active { transform: scale(.98); }
.target-list li.is-self { border-color: rgba(212,33,61,.5); background: rgba(212,33,61,.12); }
.target-list li .avatar {
    width: 32px; height: 32px;
    border-radius: 50%;
    background: var(--c-crimson);
    color: var(--c-bone);
    display: flex; align-items: center; justify-content: center;
    font-family: var(--f-display);
    flex-shrink: 0;
}
.target-list li .nm { flex: 1; color: var(--c-bone); font-weight: 600; }
.target-list li .sub { color: var(--c-bone-dim); font-size: .8rem; }

/* --------------------- Spectate panel ----------------------- */
.spectate-panel {
    background: rgba(20,20,32,.7);
    border: 1px solid rgba(255,255,255,.08);
    border-radius: var(--r-lg);
    padding: 1rem;
}
.spectate-panel h3 { color: var(--c-bone-dim); letter-spacing: .15em; font-size: .9rem; margin-bottom: .3rem; }
.spectate-panel p  { color: var(--c-bone); font-size: 1.05rem; line-height: 1.4; }
.other-turn { margin-top: .8rem; }
.other-turn .pill {
    display: inline-flex; align-items: center; gap: .4rem;
    background: rgba(255,255,255,.06);
    border-radius: 999px;
    padding: .35rem .8rem;
    color: var(--c-bone);
    font-size: .9rem;
}
.other-turn .pill .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--c-teal); animation: dotPulse 1.4s ease-in-out infinite; }
@keyframes dotPulse { 0%,100% { opacity: 1; } 50% { opacity: .3; } }

/* --------------------- Round/Game end (mobile) -------------- */
.view--end { justify-content: center; }
.end-card {
    background: rgba(20,20,32,.8);
    border: 1px solid rgba(255,255,255,.1);
    border-radius: var(--r-xl);
    padding: 1.6rem;
    text-align: center;
}
.end-card h2 {
    color: var(--c-crimson-2);
    font-size: 1.8rem;
    letter-spacing: .06em;
    margin-bottom: 1rem;
}
.end-row {
    display: flex; justify-content: space-between; align-items: baseline;
    padding: .5rem 0;
    border-bottom: 1px solid rgba(255,255,255,.06);
}
.end-row span { color: var(--c-bone-dim); font-size: .9rem; }
.end-row strong { color: var(--c-bone); font-family: var(--f-display); font-size: 1.6rem; letter-spacing: .04em; }
#endHint { margin-top: 1rem; color: var(--c-bone-dim); font-size: .85rem; }
