/* ladi play – Texas Hold'em: Pokertisch (eigene Datei) */

/* ---------- Raum ---------- */
#collection-dialog.holdem-room-active .hd-root {
  --hd-top: 96px;
  --gold: #ffd25e;
  --fh: 160px;
  --cw: 70px;
  --ow: 40px;
  position: fixed; inset: 0; z-index: 1;
  display: grid; grid-template-rows: minmax(0, 1fr) auto; gap: 0;
  padding: var(--hd-top) max(10px, env(safe-area-inset-right)) max(6px, env(safe-area-inset-bottom)) max(10px, env(safe-area-inset-left));
  overflow: hidden; color: #fff; border-radius: 0;
  background: radial-gradient(ellipse at 50% 55%, rgba(0, 0, 0, 0) 30%, rgba(5, 10, 12, .62) 100%), linear-gradient(rgba(8, 14, 18, .5), rgba(8, 14, 18, .7));
  -webkit-user-select: none; user-select: none; touch-action: manipulation; -webkit-tap-highlight-color: transparent;
}
#collection-dialog.holdem-room-active.portal-fullscreen .hd-root,
#collection-dialog.holdem-room-active:fullscreen .hd-root { --hd-top: 70px; }
#collection-dialog.holdem-room-active .collection-stage:has(> .hd-root) { contain: none !important; }
#collection-dialog.holdem-room-active .collection-layout:has(.hd-root) { border-color: transparent; background: transparent; }
.hd-root button { font: inherit; }
.hd-root canvas { -webkit-touch-callout: none; }
.hd-card { display: block; width: 100%; height: auto; aspect-ratio: 5 / 7; border-radius: 8% / 6%; box-shadow: 0 3px 8px rgba(0, 0, 0, .4); background: #f6f1e7; }

/* ---------- Anzeige oben ---------- */
.hd-hud { position: absolute; z-index: 25; top: calc(var(--hd-top) - 70px); left: 50%; transform: translateX(-50%); width: min(640px, calc(100% - 330px)); pointer-events: none; }
.hd-hud-main {
  display: flex; align-items: center; gap: 12px; padding: 6px 10px 6px 8px; border: 1px solid rgba(255, 255, 255, .26); border-radius: 16px;
  background: rgba(12, 22, 27, .88); box-shadow: 0 10px 26px rgba(0, 0, 0, .35);
}
.hd-hud-blinds { display: grid; flex: 0 0 auto; padding: 3px 12px; border-radius: 12px; line-height: 1.1; color: #1d1600; background: linear-gradient(160deg, #ffe48a, #f0b93f); box-shadow: inset 0 -3px 0 rgba(0, 0, 0, .14); }
.hd-hud-blinds small { font-size: .62rem; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }
.hd-hud-blinds strong { font-size: clamp(1.05rem, 2.1vw, 1.45rem); font-weight: 950; white-space: nowrap; }
.hd-hud-blinds span { font-size: .7rem; font-weight: 850; }
.hd-hud-info { display: grid; min-width: 0; flex: 1 1 auto; gap: 1px; font-size: clamp(.72rem, 1.3vw, .88rem); line-height: 1.25; color: #dfeaec; }
.hd-hud-info b { color: #fff; }
.hd-hud-info span { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.hd-hud-money { flex: 0 0 auto; padding: 4px 9px; border: 1px dashed rgba(255, 255, 255, .45); border-radius: 999px; color: #c9f2dc; font-size: .7rem; font-weight: 900; letter-spacing: .04em; }

.hd-menu-button, .hd-log-button {
  position: absolute; z-index: 30; left: max(10px, env(safe-area-inset-left));
  display: inline-flex; align-items: center; gap: 7px; min-height: 46px; padding: 6px 14px; border: 1px solid rgba(255, 255, 255, .35);
  border-radius: 14px; color: #fff; background: rgba(14, 24, 30, .84); box-shadow: 0 8px 20px rgba(0, 0, 0, .3); cursor: pointer;
}
.hd-menu-button { top: calc(var(--hd-top) - 70px); }
.hd-log-button { top: calc(var(--hd-top) - 16px); }
.hd-menu-button span, .hd-log-button span { font-size: 1.2rem; line-height: 1; }
.hd-menu-button b, .hd-log-button b { font-size: .92rem; }
.hd-menu-button:focus-visible, .hd-log-button:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }

/* ---------- Tisch ---------- */
.hd-arena { position: relative; min-height: 0; }
.hd-felt {
  position: absolute; z-index: 3; border-radius: 50%;
  border: clamp(10px, 1.5vw, 20px) solid #6e3f1d;
  background: radial-gradient(ellipse at 50% 36%, #3fa572 0%, #2a7d52 42%, #185638 78%, #103e28 100%);
  box-shadow: 0 0 0 3px #3a1f0c, 0 0 0 6px rgba(255, 214, 150, .14), 0 30px 60px rgba(0, 0, 0, .6), inset 0 16px 40px rgba(0, 0, 0, .45), inset 0 -10px 26px rgba(255, 255, 255, .06);
}
.hd-felt::before { content: ''; position: absolute; inset: -4px; border-radius: inherit; pointer-events: none; box-shadow: inset 0 3px 0 rgba(255, 220, 160, .3), inset 0 -2px 0 rgba(0, 0, 0, .4); }
.hd-felt-line { position: absolute; inset: 9%; border: 2px solid rgba(255, 255, 255, .12); border-radius: 50%; }
.hd-felt-mark { position: absolute; left: 50%; bottom: 13%; transform: translateX(-50%); color: rgba(255, 255, 255, .18); font-size: clamp(.7rem, 1.4vw, 1rem); font-weight: 950; letter-spacing: .14em; white-space: nowrap; text-transform: uppercase; }

.hd-board { position: absolute; z-index: 8; display: flex; gap: calc(var(--cw) * .1); transform: translate(-50%, -50%); }
.hd-slot { display: block; width: var(--cw); aspect-ratio: 5 / 7; border-radius: 9%; background: rgba(0, 0, 0, .16); box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .12); perspective: 600px; }
.hd-slot .hd-card { transition: filter .3s ease, transform .3s ease; }
.hd-slot.best .hd-card, .hd-card.best { box-shadow: 0 0 0 3px var(--gold), 0 0 18px rgba(255, 210, 94, .7); transform: translateY(-5px); }
.hd-slot.dim .hd-card { filter: brightness(.62) saturate(.6); }

.hd-pot { position: absolute; z-index: 9; transform: translate(-50%, -50%); display: grid; justify-items: center; gap: 3px; pointer-events: none; }
.hd-pot-main { display: flex; align-items: center; gap: 8px; padding: 4px 12px 4px 8px; border-radius: 999px; background: rgba(8, 20, 14, .7); box-shadow: 0 6px 14px rgba(0, 0, 0, .35); }
.hd-pot-main span { display: grid; line-height: 1.05; }
.hd-pot-main small { color: #bfe9d0; font-size: .62rem; font-weight: 900; letter-spacing: .1em; text-transform: uppercase; }
.hd-pot-main b { color: #fff; font-size: clamp(1rem, 2vw, 1.35rem); font-weight: 950; }
.hd-pot-side { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px; }
.hd-pot-side span { padding: 1px 8px; border-radius: 999px; color: #e8f6ee; background: rgba(8, 20, 14, .62); font-size: .72rem; font-weight: 800; white-space: nowrap; }

.hd-banner {
  position: absolute; z-index: 12; transform: translate(-50%, -50%); display: grid; gap: 3px; justify-items: center; width: max-content; max-width: min(92%, 460px);
  padding: 7px 14px; border: 2px solid var(--gold); border-radius: 14px; color: #fff; background: rgba(14, 22, 18, .9);
  box-shadow: 0 10px 26px rgba(0, 0, 0, .45); text-align: center; font-size: clamp(.8rem, 1.5vw, 1rem); line-height: 1.25; animation: hd-pop .4s ease-out;
}
.hd-banner b { color: var(--gold); }
.hd-banner > span { display: flex; align-items: center; gap: 8px; }
.hd-banner > span > span { display: block; }
.hd-banner em { display: block; color: #cfe9dc; font-size: .86em; font-style: normal; font-weight: 800; }
.hd-banner strong { color: #fff; font-weight: 950; }
.hd-banner small { color: #cfe9dc; font-size: .7rem; font-weight: 900; letter-spacing: .1em; text-transform: uppercase; }
.hd-root[data-phase="done"] .hd-bubble, .hd-root[data-phase="over"] .hd-bubble { display: none; }

/* Offen liegende Karten vor den Plätzen (All-in-Aufdecken und Showdown) */
.hd-reveal { z-index: 11; display: grid; justify-items: center; transform: translate(-50%, -50%); pointer-events: none; }
.hd-reveal[hidden] { display: none; }
.hd-rcards { display: flex; gap: 6px; perspective: 600px; }
.hd-rcards i { display: block; width: var(--rw, 60px); transform: rotate(calc((var(--k) - .5) * 5deg)); }
.hd-rcards .hd-card { box-shadow: 0 6px 14px rgba(0, 0, 0, .5); transition: filter .3s ease, transform .3s ease; }
.hd-rcards .hd-card.lose { filter: brightness(.7) saturate(.7); }
.hd-rlabel { position: relative; z-index: 2; white-space: nowrap; margin-top: -12px; padding: 2px 10px; border-radius: 12px; color: #fff; background: rgba(12, 22, 27, .94); box-shadow: 0 4px 10px rgba(0, 0, 0, .4); font-size: clamp(.7rem, 1.2vw, .84rem); font-weight: 900; line-height: 1.15; text-align: center; }
.hd-rlabel:empty { display: none; }
.hd-reveal.win .hd-rlabel { color: #2a1d00; background: var(--gold); }
.hd-reveal.win .hd-rcards { filter: drop-shadow(0 0 12px rgba(255, 210, 94, .7)); }
.hd-reveal.lost { opacity: .9; }
.hd-seat.reveal .hd-hole { opacity: 0; }
.hd-seat.reveal .hd-bet { opacity: 0; }

/* Chips mit Tiefe */
.hd-chips { position: relative; display: inline-block; width: 26px; height: 22px; flex: 0 0 auto; }
.hd-chips i {
  position: absolute; left: 0; bottom: calc(var(--i) * 3px); width: 26px; height: 10px; border-radius: 50%;
  background: radial-gradient(ellipse at 50% 40%, rgba(255, 255, 255, .55) 0 18%, transparent 19%), repeating-conic-gradient(from 0deg, var(--c) 0 30deg, #f6f2ea 30deg 45deg);
  box-shadow: 0 2px 0 rgba(0, 0, 0, .45), inset 0 -2px 0 rgba(0, 0, 0, .25);
}

/* ---------- Plätze ---------- */
.hd-seat { position: absolute; inset: 0; pointer-events: none; }
.hd-seat > * { position: absolute; pointer-events: auto; }
.hd-figure { z-index: 2; width: calc(var(--fh) * .92); height: var(--fh); transform: translate(-50%, -100%); pointer-events: none; transition: transform .3s ease, filter .3s ease; }
.hd-figure canvas { width: 100%; height: 100%; object-fit: contain; object-position: 50% 100%; filter: drop-shadow(0 10px 12px rgba(0, 0, 0, .45)); }
.hd-figure.mirror canvas { transform: scaleX(-1); filter: drop-shadow(0 10px 12px rgba(0, 0, 0, .45)) hue-rotate(160deg); }
.hd-seat.low .hd-figure { z-index: 4; }
.hd-seat.active .hd-figure { transform: translate(-50%, calc(-100% - 6px)); }
.hd-seat.folded .hd-figure { filter: grayscale(.55) brightness(.75); }
.hd-seat.out .hd-figure { filter: grayscale(1) brightness(.45); opacity: .55; }
.hd-hole { z-index: 6; display: flex; transform: translate(-50%, -50%); pointer-events: none; }
.hd-hole i { display: block; width: var(--ow); margin: 0 calc(var(--ow) * -.18); transform: rotate(calc((var(--k) - .5) * 14deg)); transform-origin: 50% 90%; perspective: 500px; }
.hd-hole.open i { width: calc(var(--ow) * 1.18); margin: 0 calc(var(--ow) * -.04); transform: rotate(calc((var(--k) - .5) * 8deg)) translateY(calc(var(--ow) * .22)); }
.hd-seat.folded .hd-hole { opacity: 0; transition: opacity .4s ease; }
.hd-plate {
  z-index: 10; display: grid; justify-items: center; gap: 0; min-width: 92px; max-width: 196px; padding: 4px 11px 5px; transform: translate(-50%, -50%);
  border: 2px solid rgba(255, 255, 255, .7); border-radius: 13px; color: #fff; background: rgba(14, 24, 30, .92); box-shadow: 0 8px 16px rgba(0, 0, 0, .4); line-height: 1.12;
  transition: border-color .25s ease, box-shadow .25s ease, opacity .3s ease;
}
.hd-name { max-width: 100%; overflow: hidden; font-size: clamp(.74rem, 1.35vw, .92rem); font-weight: 900; white-space: nowrap; text-overflow: ellipsis; }
.hd-stack { color: var(--gold); font-size: clamp(.82rem, 1.5vw, 1.02rem); font-weight: 950; }
.hd-last { display: none; max-width: 100%; margin-top: 2px; padding: 0 7px; overflow: hidden; border-radius: 999px; color: #10221a; background: #c8f0da; font-size: .68rem; font-style: normal; font-weight: 900; white-space: nowrap; text-overflow: ellipsis; }
.hd-last.show { display: block; }
.hd-seat.active .hd-plate { border-color: var(--gold); box-shadow: 0 0 0 4px rgba(255, 210, 94, .35), 0 8px 18px rgba(0, 0, 0, .4); }
.hd-seat.folded .hd-plate { opacity: .72; }
.hd-seat.folded .hd-last { color: #eee; background: #57606a; }
.hd-seat.allin .hd-last { color: #fff; background: #d8433a; }
.hd-seat.winner .hd-plate { border-color: var(--gold); box-shadow: 0 0 0 5px rgba(255, 210, 94, .45), 0 0 26px rgba(255, 210, 94, .6); }
.hd-seat.winner .hd-last { color: #2a1d00; background: var(--gold); }
.hd-seat.out .hd-plate { opacity: .55; }
.hd-seat.away .hd-name::after { content: ' · weg'; color: #ffb4a6; }
.hd-seat.me .hd-plate { display: none; }
.hd-bet { z-index: 9; display: flex; align-items: center; gap: 5px; padding: 2px 9px 2px 4px; transform: translate(-50%, -50%); border-radius: 999px; background: rgba(6, 18, 12, .62); pointer-events: none; }
.hd-bet b { color: #fff; font-size: clamp(.78rem, 1.4vw, .95rem); font-weight: 950; white-space: nowrap; }
.hd-dealer {
  z-index: 9; display: grid; place-items: center; width: 30px; height: 30px; transform: translate(-50%, -50%); border-radius: 50%; color: #1b1b1b; font-size: .9rem; font-weight: 950;
  background: radial-gradient(circle at 35% 30%, #fff, #e6e0d2 60%, #b9b09a); box-shadow: 0 3px 6px rgba(0, 0, 0, .45), inset 0 -2px 0 rgba(0, 0, 0, .18); pointer-events: none;
}
.hd-bubble {
  z-index: 24; max-width: 180px; padding: 6px 12px; transform: translate(-50%, -50%); border-radius: 14px; color: #1b2430; background: #fff; box-shadow: 0 8px 18px rgba(0, 0, 0, .35);
  font-size: clamp(.82rem, 1.5vw, 1rem); font-weight: 950; white-space: nowrap; pointer-events: none;
}
.hd-bubble::after { content: ''; position: absolute; left: 50%; bottom: -7px; width: 14px; height: 14px; transform: translateX(-50%) rotate(45deg); background: #fff; }
.hd-bubble.pop { animation: hd-pop .32s ease-out; }
.hd-timer { display: none; }

/* ---------- Unten: eigene Karten und Knöpfe ---------- */
.hd-dock { position: relative; z-index: 20; display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); grid-template-areas: 'online online online' 'coach mine right' 'left mine right' 'line line line'; align-items: end; gap: 6px 16px; padding: 4px 4px 0; }
.hd-online { grid-area: online; justify-self: center; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; justify-content: center; font-size: .8rem; }
.hd-online .skt-room-tag { padding: 2px 9px; border-radius: 999px; background: rgba(255, 255, 255, .16); font-weight: 900; }
.hd-online .skt-away { padding: 2px 9px; border-radius: 999px; color: #ffe1db; background: rgba(160, 40, 30, .55); }
.hd-online button { min-height: 36px; padding: 4px 12px; border: 0; border-radius: 10px; color: #1b1b1b; background: var(--gold); font-weight: 900; cursor: pointer; }
.hd-mine { grid-area: mine; justify-self: center; display: flex; align-items: flex-end; gap: 12px; padding: 6px 12px 6px 8px; border-radius: 18px; background: rgba(10, 18, 22, .74); box-shadow: 0 10px 24px rgba(0, 0, 0, .35); transition: box-shadow .25s ease; }
.hd-mine.turn { box-shadow: 0 0 0 3px var(--gold), 0 10px 24px rgba(0, 0, 0, .35); }
.hd-mine.winner { box-shadow: 0 0 0 4px var(--gold), 0 0 30px rgba(255, 210, 94, .55); }
.hd-mycards { display: flex; min-height: calc(var(--cw) * 1.85); }
.hd-mycards i { display: block; width: calc(var(--cw) * 1.32); margin-right: calc(var(--cw) * -.28); transform: rotate(calc((var(--k) - .5) * 7deg)); transform-origin: 50% 100%; }
.hd-mycards i:last-child { margin-right: 0; }
.hd-mycards.folded { opacity: .45; filter: grayscale(.6); }
.hd-myinfo { display: grid; gap: 1px; min-width: 120px; max-width: 220px; line-height: 1.2; }
.hd-myname { color: #cfe; font-size: .8rem; font-weight: 900; }
.hd-mystack { color: var(--gold); font-size: clamp(1.1rem, 2.2vw, 1.5rem); font-weight: 950; }
.hd-myhand { color: #fff; font-size: clamp(.86rem, 1.6vw, 1.05rem); font-style: normal; font-weight: 900; }
.hd-myhint { color: #b9d8cf; font-size: .74rem; font-weight: 700; }
.hd-controls { display: contents; }
.hd-ctl-left, .hd-ctl-right { display: grid; align-content: end; gap: 8px; min-width: 0; }
.hd-ctl-left { grid-area: left; justify-items: start; }
.hd-ctl-coach { grid-area: coach; align-self: end; min-width: 0; }
.hd-coach { display: grid; gap: 2px; max-width: 400px; padding: 7px 11px; border-left: 4px solid #63c99a; border-radius: 12px; color: #e9f6ef; background: rgba(10, 30, 22, .82); box-shadow: 0 6px 16px rgba(0, 0, 0, .3); font-size: clamp(.72rem, 1.2vw, .84rem); font-weight: 700; line-height: 1.3; animation: hd-rise .35s ease-out; }
.hd-coach b { color: #9fe6c0; font-size: .7rem; font-weight: 950; letter-spacing: .08em; text-transform: uppercase; }
.hd-dsay { z-index: 13; padding: 4px 14px; transform: translate(-50%, -50%); border-radius: 999px; color: #1f1600; background: linear-gradient(180deg, #fff3c4, #f0c75a); box-shadow: 0 6px 14px rgba(0, 0, 0, .4); font-size: clamp(.82rem, 1.5vw, 1rem); font-weight: 950; white-space: nowrap; pointer-events: none; position: absolute; }
.hd-dsay[hidden] { display: none; }
.hd-dsay.pop { animation: hd-pop .32s ease-out; }
.hd-ctl-right { grid-area: right; justify-items: end; }
.hd-controls.turn .hd-ctl-left, .hd-controls.turn .hd-ctl-right { animation: hd-rise .3s ease-out; }
.hd-ctl-left .hd-btn.fold { min-width: clamp(110px, 14vw, 170px); }
.hd-main-buttons { display: flex; justify-content: flex-end; gap: 8px; width: min(420px, 100%); }
.hd-main-buttons .hd-btn { flex: 1 1 0; min-width: 0; }
.hd-btn.next { display: grid; justify-items: center; gap: 1px; width: min(320px, 100%); min-height: 64px; color: #2a1d00; background: linear-gradient(180deg, #ffe48a, #f0b93f); animation: hd-rise .35s ease-out; }
.hd-btn.next small { font-size: .62em; font-weight: 800; opacity: .8; }
.hd-wait-note { margin: 0; padding: 8px 12px; border-radius: 12px; color: #fff; background: rgba(10, 18, 22, .78); font-weight: 800; text-align: right; }
.hd-btn {
  min-width: clamp(96px, 13vw, 150px); min-height: 56px; padding: 6px 16px; border: 0; border-radius: 16px; color: #fff; font-size: clamp(1rem, 1.8vw, 1.2rem); font-weight: 950;
  box-shadow: inset 0 -4px 0 rgba(0, 0, 0, .25), 0 8px 18px rgba(0, 0, 0, .35); cursor: pointer; transition: transform .12s ease, filter .12s ease;
}
.hd-btn:active { transform: translateY(2px); }
.hd-btn:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.hd-btn.fold { background: linear-gradient(180deg, #8a4b55, #6a2f3a); }
.hd-btn.call { background: linear-gradient(180deg, #2f8fd8, #1d64a8); }
.hd-btn.raise { display: grid; line-height: 1.05; background: linear-gradient(180deg, #2fae6b, #1c7b48); }
.hd-btn.raise span { font-size: .78em; }
.hd-btn.raise b { font-size: 1.08em; }
.hd-btn.raise.allin { background: linear-gradient(180deg, #e0563c, #b32f1f); }
.hd-raise { display: grid; gap: 6px; width: min(420px, 100%); padding: 7px 9px; border-radius: 14px; background: rgba(10, 18, 22, .78); }
.hd-quick { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.hd-quick button, .hd-slider button { min-height: 40px; border: 1px solid rgba(255, 255, 255, .3); border-radius: 11px; color: #fff; background: rgba(255, 255, 255, .1); font-weight: 900; cursor: pointer; }
.hd-quick button:active, .hd-slider button:active { background: rgba(255, 255, 255, .25); }
.hd-slider { display: grid; grid-template-columns: 44px minmax(0, 1fr) 44px; align-items: center; gap: 8px; }
.hd-slider input { width: 100%; height: 36px; accent-color: #2fae6b; }
.hd-think { display: block; width: min(420px, 100%); height: 5px; overflow: hidden; border-radius: 999px; background: rgba(255, 255, 255, .15); }
.hd-think b { display: block; width: 100%; height: 100%; background: var(--gold); transition: width .25s linear; }
.hd-skip { min-height: 44px; }
.hd-line { grid-area: line; min-height: 1.3em; margin: 0; color: #f1f6f4; font-size: clamp(.8rem, 1.45vw, .98rem); font-weight: 800; text-align: center; text-shadow: 0 2px 6px rgba(0, 0, 0, .7); }

/* ---------- Fliegende Chips ---------- */
.hd-fly { position: absolute; inset: 0; z-index: 40; pointer-events: none; }
.hd-flychip { position: absolute; padding: 0 4px; }

/* ---------- Overlays ---------- */
.hd-overlay { position: absolute; inset: 0; z-index: 80; display: grid; place-items: center; padding: 16px; background: rgba(5, 10, 12, .55); }
.hd-overlay[hidden] { display: none; }
.hd-sheet {
  width: min(560px, 100%); max-height: calc(100% - 24px); overflow: auto; padding: 18px 20px; border-radius: 20px; color: #23303e; background: #fbf8f2;
  box-shadow: 0 30px 70px rgba(0, 0, 0, .5); animation: hd-pop .3s ease-out;
}
.hd-sheet h3 { margin: 0 0 8px; color: #1e2a38; font-size: clamp(1.3rem, 2.6vw, 1.8rem); }
.hd-sheet p { margin: 0 0 10px; color: #4b5767; }
.hd-sheet-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.hd-sheet-actions button { min-height: 48px; }
.hd-menu-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin: 8px 0; font-weight: 800; }
.hd-check { flex-wrap: nowrap; justify-content: flex-start; }
.hd-check input { width: 22px; height: 22px; flex: 0 0 auto; accent-color: #2a7d52; }
.hd-segment { display: inline-flex; gap: 4px; padding: 3px; border-radius: 12px; background: rgba(40, 60, 80, .1); }
.hd-segment button { min-height: 40px; padding: 4px 12px; border: 0; border-radius: 9px; color: #2b3a4a; background: transparent; font-weight: 900; cursor: pointer; }
.hd-segment button.on { color: #fff; background: #2a7d52; }
.hd-log { display: grid; gap: 4px; max-height: 50vh; margin: 0; padding: 0 0 0 22px; overflow: auto; font-size: .88rem; }
.hd-log b { font-weight: 950; }
.hd-log .s-h, .hd-log .s-d { color: #c21f2c; }
.hd-ranks { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; }
.hd-ranks li { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 4px 8px; border-radius: 10px; background: rgba(40, 60, 80, .06); }
.hd-ranks span { display: flex; gap: 3px; }
.hd-card.mini { width: 30px; box-shadow: 0 1px 3px rgba(0, 0, 0, .3); }
.hd-overlay.result .hd-sheet { text-align: center; }
.hd-overlay.result .hd-sheet-actions { justify-content: center; }
.hd-standings { display: grid; gap: 4px; max-width: 360px; margin: 8px auto; padding: 0; list-style: none; text-align: left; }
.hd-standings li { display: flex; gap: 10px; padding: 6px 10px; border-radius: 10px; background: rgba(40, 60, 80, .06); }
.hd-standings li.me { background: #fff1c2; font-weight: 900; }
.hd-note { font-size: .82rem; }
.hd-trophy { position: relative; width: 110px; height: 120px; margin: 0 auto 8px; }
.hd-trophy i { position: absolute; left: 20px; top: 0; width: 70px; height: 62px; border-radius: 8px 8px 40px 40px; background: linear-gradient(120deg, #fff3b0, #f2c235 45%, #b9850f); box-shadow: inset -6px -6px 0 rgba(0, 0, 0, .12); }
.hd-trophy i::before, .hd-trophy i::after { content: ''; position: absolute; top: 8px; width: 22px; height: 30px; border: 7px solid #e3b32c; border-radius: 50%; }
.hd-trophy i::before { left: -24px; border-right-color: transparent; }
.hd-trophy i::after { right: -24px; border-left-color: transparent; }
.hd-trophy b { position: absolute; left: 47px; top: 60px; width: 16px; height: 26px; background: linear-gradient(90deg, #d9a51f, #f5d35a, #b9850f); }
.hd-trophy span { position: absolute; left: 25px; top: 86px; width: 60px; height: 22px; border-radius: 6px; background: linear-gradient(180deg, #6b4a2a, #3f2a16); box-shadow: 0 6px 12px rgba(0, 0, 0, .3); }
.hd-overlay.won .hd-trophy { animation: hd-trophy 1.6s ease-in-out infinite alternate; }

/* ---------- Einstellungen ---------- */
.hd-settings .skat-hero { align-items: start; }
.hd-settings .hd-money-note { max-width: 270px; margin: 0; padding: 10px 12px; border-left: 4px solid #2a7d52; border-radius: 10px; color: #234b37; background: rgba(42, 125, 82, .1); font-size: .86rem; }
.hd-settings .hd-grid { margin-top: 14px; }
.hd-settings .hd-play-settings { grid-template-columns: minmax(170px, 1fr) repeat(4, auto); align-items: center; }
.hd-settings .hd-play-settings > .hd-segment { display: inline-flex; justify-self: start; }
.hd-play-settings .hd-segment button { min-width: 78px; }
.hd-play-settings .hd-segment { justify-self: start; }
.hd-name-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.hd-name-grid label { display: grid; gap: 4px; color: #566176; font-size: .8rem; font-weight: 800; }
.hd-name-grid input { min-height: 40px; padding: 6px 10px; border: 1px solid rgba(73, 91, 118, .25); border-radius: 10px; font: inherit; }

@keyframes hd-pop { from { transform: translate(-50%, -50%) scale(.7); opacity: 0; } to { transform: translate(-50%, -50%) scale(1); opacity: 1; } }
.hd-sheet { animation-name: hd-sheet; }
@keyframes hd-sheet { from { transform: translateY(14px) scale(.96); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes hd-rise { from { transform: translateY(12px); opacity: .3; } to { transform: none; opacity: 1; } }
@keyframes hd-trophy { from { transform: translateY(0) rotate(-3deg); } to { transform: translateY(-6px) rotate(3deg); } }
@media (prefers-reduced-motion: reduce) {
  .hd-root *, .hd-sheet { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* ---------- Hochformat (iPad hoch, Telefon) ---------- */
@media (orientation: portrait), (max-aspect-ratio: 1/1) {
  .hd-hud { width: calc(100% - 150px); left: calc(50% + 50px); max-width: 560px; }
  .hd-hud-money { display: none; }
  .hd-dock { grid-template-columns: minmax(0, 1fr) minmax(0, 2.3fr); grid-template-areas: 'online online' 'mine mine' 'coach coach' 'left right' 'line line'; }
  .hd-coach { max-width: none; }
  .hd-ctl-left .hd-btn.fold { width: 100%; min-width: 0; }
  .hd-ctl-left { justify-items: stretch; }
  .hd-ctl-left .hd-skip { width: 100%; }
  .hd-mycards { min-height: calc(var(--cw) * 1.6); }
  .hd-mycards i { width: calc(var(--cw) * 1.18); }
}
@media (max-width: 700px) {
  .hd-hud-info span:last-child { display: none; }
  .hd-btn { min-width: 0; padding: 6px 10px; }
  .hd-main-buttons { width: 100%; flex-wrap: nowrap; }
  .hd-menu-button b, .hd-log-button b { display: none; }
  .hd-name-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hd-settings .hd-play-settings { grid-template-columns: 1fr; }
  .hd-settings .hd-money-note { max-width: none; }
  .hd-settings .skat-hero { grid-template-columns: 1fr; }
}
@media (max-height: 640px) and (orientation: landscape) {
  #collection-dialog.holdem-room-active .hd-root { --hd-top: 64px; }
  .hd-raise { grid-template-columns: auto 1fr; align-items: center; }
  .hd-btn { min-height: 46px; }
}
/* Spielertyp unter dem Namen, Dead Button, Regel-Hinweise */
.hd-name[data-style]::after { content: attr(data-style); display: block; margin-top: -1px; font-weight: 700; opacity: .72; font-size: .74em; line-height: 1.1; overflow: hidden; text-overflow: ellipsis; }
.hd-seat.dead-button .hd-dealer { opacity: .6; filter: grayscale(.6); }
.hd-rules-extra { margin: 10px 0 0; font-size: .86rem; line-height: 1.45; color: inherit; opacity: .86; }
/* Ton-Knopf am Tisch (Ton + Sprache an/aus), Stimmenwahl im Menü */
.hd-sound-button {
  position: absolute; z-index: 30; left: max(10px, env(safe-area-inset-left)); top: calc(var(--hd-top) + 38px);
  display: inline-flex; align-items: center; gap: 7px; min-height: 46px; min-width: 46px; padding: 6px 14px; border: 1px solid rgba(255, 255, 255, .35);
  border-radius: 14px; color: #fff; background: rgba(14, 24, 30, .84); box-shadow: 0 8px 20px rgba(0, 0, 0, .3); cursor: pointer;
}
.hd-sound-button span { display: inline-flex; line-height: 0; }
.hd-sound-button b { font-size: .92rem; }
.hd-sound-button.off { color: #ffd0c4; border-color: rgba(255, 150, 120, .6); background: rgba(70, 22, 16, .86); }
.hd-sound-button:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.hd-voice-pick { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; min-width: 0; flex: 1 1 260px; justify-content: flex-end; }
.hd-voice-pick select { min-height: 44px; max-width: 100%; flex: 1 1 200px; padding: 6px 10px; border: 1px solid rgba(73, 91, 118, .3); border-radius: 10px; font: inherit; font-weight: 700; background: #fff; color: #1e2a38; }
.hd-voice-pick button { min-height: 44px; }
.hd-voice-tip { margin: 4px 0 8px !important; font-size: .82rem; line-height: 1.4; color: #5a6676 !important; }
@media (max-width: 700px) { .hd-sound-button b { display: none; } }
@media (max-height: 640px) and (orientation: landscape) {
  .hd-menu-button b, .hd-log-button b, .hd-sound-button b { display: none; }
  .hd-sound-button { top: calc(var(--hd-top) - 70px); left: calc(max(10px, env(safe-area-inset-left)) + 58px); padding: 6px 12px; }
}
