/* Bunt! — spielspezifische Styles. Eigenes Kartendesign: Farbfläche + großes
   Symbol, KEINE fremde Optik (Rebranding-Liste). Chrome aus ../style.css. */
:root {
    --card-w: clamp(58px, 13vw, 84px);
    --card-h: calc(var(--card-w) * 1.45);
    --c-red: #e5484d;
    --c-green: #3fbf6f;
    --c-blue: #4f8cff;
    --c-yellow: #f2c14e;
}

/* Home-Hero */
.hero-cards { display: flex; justify-content: center; gap: 6px; margin-bottom: 14px; }
.mini-card {
    width: 44px; height: 62px; border-radius: 10px; color: #fff;
    font-weight: 800; display: grid; place-items: center; font-size: 17px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, .45);
}
.mini-card.c-red { background: var(--c-red); }
.mini-card.c-blue { background: var(--c-blue); }
.mini-card.c-green { background: var(--c-green); }
.hero-cards .mini-card:nth-child(1) { transform: rotate(-10deg) translateY(6px); }
.hero-cards .mini-card:nth-child(3) { transform: rotate(10deg) translateY(6px); }

/* ── Spielfläche (Muster Mau+) ────────────────────── */
.opponents { display: flex; justify-content: center; gap: 14px; flex-wrap: wrap; margin: 6px 0 18px; }
.opp {
    display: flex; flex-direction: column; align-items: center; gap: 4px;
    padding: 10px 16px; border-radius: 12px; background: var(--panel);
    border: 1px solid var(--panel-border); min-width: 96px;
}
.opp.turn { border-color: var(--gold); box-shadow: 0 0 18px rgba(242, 193, 78, .25); animation: pulse 1.6s infinite; }
.opp .nm { font-size: 14px; font-weight: 600; display: flex; align-items: center; gap: 6px; }
.opp .cnt { font-size: 12.5px; color: var(--muted); }
@keyframes pulse { 50% { box-shadow: 0 0 26px rgba(242, 193, 78, .4); } }

.table { display: flex; justify-content: center; align-items: center; gap: 34px; margin: 10px 0 6px; }
.pile { background: none; border: 0; cursor: pointer; position: relative; padding: 0; border-radius: 12px; }
.pile:disabled { cursor: default; opacity: .8; }
.pile.can .card.back { box-shadow: inset 0 0 0 5px rgba(255, 255, 255, .12), 0 0 0 3px rgba(79, 140, 255, .75), 0 8px 26px rgba(79, 140, 255, .35); }
.pile.must .card.back { animation: must-draw 1s infinite; }
@keyframes must-draw {
    0%, 100% { box-shadow: inset 0 0 0 5px rgba(255, 255, 255, .12), 0 0 0 3px rgba(229, 72, 77, .85), 0 8px 26px rgba(229, 72, 77, .45); }
    50% { box-shadow: inset 0 0 0 5px rgba(255, 255, 255, .12), 0 0 0 6px rgba(229, 72, 77, .55), 0 8px 34px rgba(229, 72, 77, .6); }
}
.pile-count {
    position: absolute; right: -8px; top: -8px; background: var(--accent); color: #fff;
    border-radius: 999px; min-width: 24px; padding: 3px 7px; font-size: 12.5px; font-weight: 700;
}
.discard-wrap { position: relative; }
.color-chip {
    position: absolute; left: 50%; top: -16px; transform: translateX(-50%);
    width: 30px; height: 30px; border-radius: 50%;
    border: 3px solid #fff; box-shadow: 0 4px 14px rgba(0, 0, 0, .5);
}
.pending-chip {
    position: absolute; right: -14px; top: -12px; background: var(--red); color: #fff;
    border-radius: 999px; padding: 3px 10px; font-weight: 800; font-size: 14px;
}
.dir-chip {
    position: absolute; right: -30px; bottom: 4px; font-size: 22px; color: var(--muted);
    transition: transform .3s;
}

/* ── Bunt!-Karten: Farbfläche, großes Symbol, Ring ── */
.bcard {
    /* Höhe DIREKT aus --card-w — var(--card-h) würde am :root berechnet
       und ignoriert das F5-Skalierungs-Override auf .hand */
    width: var(--card-w); height: calc(var(--card-w) * 1.45); border-radius: calc(var(--card-w) * .14);
    position: relative; display: grid; place-items: center;
    color: #fff; font-weight: 800; user-select: none;
    box-shadow: 0 6px 16px rgba(0, 0, 0, .45);
}
.bcard::before {   /* Innen-Ring als eigenes Designelement (F3: dezenter, weiter innen) */
    content: ''; position: absolute; inset: 16%; border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, .35); pointer-events: none;
}
.bcard .sym { font-size: calc(var(--card-w) * .44); line-height: 1; text-shadow: 0 2px 6px rgba(0, 0, 0, .4); z-index: 1; }
.bcard .pip { position: absolute; font-size: calc(var(--card-w) * .14); line-height: 1; top: 5%; left: 8%; opacity: .9; }
.bcard .pip.br { top: auto; left: auto; bottom: 5%; right: 8%; transform: rotate(180deg); }
/* F3: 6 und 9 mit Unterstrich unterscheidbar */
.bcard.u69 .sym, .bcard.u69 .pip { text-decoration: underline 2px; text-underline-offset: 12%; }
.bcard.c-r { background: linear-gradient(150deg, #ef5b60, #c93338); }
.bcard.c-g { background: linear-gradient(150deg, #4ecd7f, #2c9a55); }
.bcard.c-b { background: linear-gradient(150deg, #659dff, #3568cf); }
.bcard.c-y { background: linear-gradient(150deg, #f4cb66, #d9a32e); }
.bcard.c-w { background: linear-gradient(150deg, #2b2f3a, #14161d); }
.bcard.c-w::before { border-color: transparent; background:
    conic-gradient(var(--c-red) 0 25%, var(--c-yellow) 0 50%, var(--c-green) 0 75%, var(--c-blue) 0) border-box;
    -webkit-mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor; mask-composite: exclude; border: 3px solid transparent; }

/* Hand */
.hand-wrap { margin-top: auto; text-align: center; }
.hand { display: flex; justify-content: center; flex-wrap: wrap; padding: 14px 6px 6px; min-height: calc(var(--card-h) + 26px); }
.hand .bcard { margin: 0 calc(var(--card-w) * -0.16); cursor: pointer; transition: transform .12s, box-shadow .12s; }
.hand .bcard.ok:hover, .hand .bcard.ok:focus-visible { transform: translateY(-16px); z-index: 5; }
.hand .bcard.ok { outline: 3px solid rgba(255, 255, 255, .85); outline-offset: 2px; }
.hand .bcard.drawn { outline-color: var(--gold); }
.hand .bcard.no { filter: brightness(.55) saturate(.65); }
.hand .bcard.deal { animation: deal-in .3s ease-out; }
@keyframes deal-in { from { transform: translateY(36px) scale(.85); opacity: 0; } to { transform: none; opacity: 1; } }
.bcard.pop { animation: discard-in .28s cubic-bezier(.2, 1.6, .4, 1); }
.btn.pass { margin: 10px 0 4px; }

/* Farbwunsch */
.wish-btns { display: flex; gap: 10px; justify-content: center; margin-top: 14px; }
.wish-btn { width: 60px; height: 60px; padding: 0; border: 3px solid rgba(255,255,255,.7); border-radius: 16px; }
.wish-btn.c-red { background: var(--c-red); }
.wish-btn.c-green { background: var(--c-green); }
.wish-btn.c-blue { background: var(--c-blue); }
.wish-btn.c-yellow { background: var(--c-yellow); }

@media (max-width: 480px) { .table { gap: 20px; } }

/* §4.16 Desktop-Fill */
@media (min-width: 1100px) {
    :root { --card-w: 112px; }
    .table { gap: 56px; }
    .opp { font-size: 16px; min-width: 120px; }
}

/* F4 (Etappe 23): Sortier-Button */
.sort-btn { font-size: 12.5px; padding: 6px 12px; color: var(--muted); margin-bottom: 2px; }
.sort-btn.on { color: var(--text); border-color: var(--accent); }
