/* Steinreich (Etappe 71).
   Anzeige-Entscheidung (S21): DER TISCH ist das Wichtigste — er ist das, was
   man umbaut, und er gehört allen. Er bekommt die Fläche und scrollt für sich.
   Darunter klebt, was zu tun ist; ganz unten die eigenen Steine, die
   gleichzeitig die Bedienung sind. */

.hero-tiles { display: flex; gap: 6px; justify-content: center; margin-bottom: 10px; }
.hero-tiles span {
    display: grid; place-items: center; width: 38px; height: 48px; border-radius: 8px;
    font-weight: 800; font-size: 19px; color: #10131a; background: #f3f4f7;
    box-shadow: 0 3px 10px rgba(0, 0, 0, .35);
}
.hero-tiles span:nth-child(1) { background: #ff8787; }
.hero-tiles span:nth-child(2) { background: #8ce99a; }
.hero-tiles span:nth-child(3) { background: #74c0fc; }
.hero-tiles span:nth-child(4) { background: linear-gradient(135deg, #ffd43b, #ff8787); }

/* ── Steine ──
   Farbe ist NIE das einzige Merkmal: Jeder Stein trägt seine Zahl und ein
   aria-label. */
.tile {
    display: inline-grid; place-items: center;
    width: 34px; height: 44px; border-radius: 7px;
    font-size: 18px; font-weight: 800; color: #10131a;
    background: #e9ecf1; box-shadow: 0 2px 5px rgba(0, 0, 0, .3);
    font-variant-numeric: tabular-nums;
}
.tile.c-r { background: #ff8787; }
.tile.c-g { background: #8ce99a; }
.tile.c-b { background: #74c0fc; }
.tile.c-y { background: #ffe066; }
.tile.joker { background: linear-gradient(135deg, #ffd43b, #ff8787); }
.tile.empty { background: transparent; border: 1px dashed var(--panel-border); color: var(--muted); }

/* ── Mitspieler: eine Zeile, eine Zahl ── */
.players { display: grid; gap: 4px; margin-bottom: 8px; }
.pl {
    display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
    padding: 6px 10px; border-radius: 10px; background: var(--panel);
    border: 1px solid var(--panel-border);
}
.pl.turn { border-color: rgba(242, 193, 78, .6); background: rgba(242, 193, 78, .08); }
.pl.me { border-color: rgba(79, 140, 255, .45); }
.pl .nm { display: flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 600;
    flex: 1 1 auto; min-width: 5em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pl .tag { font-size: 11px; color: var(--muted); border: 1px solid var(--panel-border);
    border-radius: 999px; padding: 1px 8px; white-space: nowrap; }
.pl .tag.wait { color: var(--gold); border-color: rgba(242, 193, 78, .4); }

/* ── Der Tisch: bekommt die Fläche ── */
.table {
    display: grid; gap: 8px; align-content: start;
    min-height: 34vh; max-height: 52vh; overflow-y: auto; overscroll-behavior: contain;
    padding: 10px; border-radius: 14px;
    background: var(--panel); border: 1px solid var(--panel-border);
}
/* Während des Umbauens sieht man, dass es ein ENTWURF ist. */
.table.drafting { border-color: rgba(242, 193, 78, .55); background: rgba(242, 193, 78, .05); }

.row {
    display: flex; align-items: center; gap: 3px; flex-wrap: wrap;
    padding: 5px; border-radius: 10px; border: 1px solid transparent;
}
.row.bad { border-color: rgba(255, 107, 107, .55); background: rgba(255, 107, 107, .07); }
.row-note { font-size: 11px; color: #ff8787; flex-basis: 100%; }

.t-tile, .hand-tile {
    padding: 0; border: 2px solid transparent; border-radius: 9px;
    background: none; cursor: pointer; line-height: 0;
}
.t-tile:disabled, .hand-tile:disabled { cursor: default; opacity: .85; }
.t-tile.picked, .hand-tile.picked { border-color: var(--gold); transform: translateY(-4px); }

.row-drop {
    min-width: 44px; min-height: 34px; padding: 0 10px; margin-left: 4px;
    font-size: 12px; font-weight: 700; color: var(--muted);
    background: none; border: 1px dashed var(--panel-border); border-radius: 9px; cursor: pointer;
}
.row-drop:disabled { opacity: .3; cursor: default; }
.new-row { justify-self: start; }
.empty-note { color: var(--muted); font-size: 13px; margin: 4px 2px; }

/* ── Was zu tun ist: klebt über der Hand ── */
.act-bar {
    position: sticky; bottom: 0; z-index: 4;
    padding: 8px 0 6px; margin-top: 8px;
    background: linear-gradient(to top, var(--bg) 72%, transparent);
}
.turn-hint { font-size: 14px; font-weight: 600; margin: 0 2px 6px; min-height: 1.2em; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; }
.actions .btn { flex: 1 1 auto; min-height: 44px; }

/* ── Die eigenen Steine ── */
.hand {
    display: flex; flex-wrap: wrap; gap: 4px;
    padding: 8px; border-radius: 14px;
    background: var(--panel); border: 1px solid var(--panel-border);
}

@media (max-width: 430px) {
    .tile { width: 30px; height: 40px; font-size: 16px; }
    .table { max-height: 44vh; }
}
