/* texas-holdem · HD tuning for the shared card kit, all under html.hdc (classic returns with ?hd=0 or the perf guard). */
html.hdc .pc.slot { background: #ffffff14 !important; border: 1.5px dashed #ffffff55 !important; box-shadow: none; }
html.hdc .pc.win { box-shadow: 0 0 0 3px #fde047, 0 0 16px 3px #fde04799, 0 8px 12px -4px #0008; }
html.hdc .pc.dim { filter: brightness(.6) saturate(.7); }
html.hdc .th-seat.folded .pc, html.hdc .th-me.folded .pc { filter: brightness(.65); }

/* Full screen: the frozen board grid sizes cards by its own width, so zoom-fit can never shrink it; cap the row. */
html.pip-immersive body[data-pip-frame] .th-board { max-width: 340px; margin-inline: auto; }

/* Third pass: table depth, press feedback, full screen safe areas. Pure CSS, no per-frame work. */
.th-table { box-shadow: inset 0 0 38px 6px #00000055, inset 0 2px 0 #ffffff22, 0 10px 22px -10px #0007; }
.th-pot { text-shadow: 0 1px 0 #0006; letter-spacing: .01em; }
.th-acts .btn { transition: transform .08s ease, box-shadow .08s ease, filter .12s ease; }
.th-acts .btn:active:not(:disabled) { transform: translateY(3px); box-shadow: 0 1px 0 0 #0004; filter: brightness(.96); }
.th-presets button { transition: transform .08s ease, background-color .12s ease; }
.th-presets button:active { transform: scale(.95); }
.pc { transition: filter .2s ease, box-shadow .2s ease; }
@media (prefers-reduced-motion: reduce) { .th-acts .btn, .th-presets button, .pc { transition: none; } }
html.pip-immersive .th-controls { padding-bottom: calc(.55rem + env(safe-area-inset-bottom, 0px)); }
html.pip-immersive .th-acts .btn, html.pip-immersive .th-presets button { min-height: 44px; }

/* Full screen fit (own layout, no zoom): flex column in portrait, table left and controls right in landscape.
   Scoped to html.pip-immersive / html.pip-native; nothing here applies on the normal page. */
html:is(.pip-immersive, .pip-native) body[data-pip-frame] .game-wrap.pip-stage { display: flex; flex-direction: column; gap: 4px; overflow: hidden; padding-left: max(6px, env(safe-area-inset-left, 0px)); padding-right: max(6px, env(safe-area-inset-right, 0px)); padding-bottom: 6px; box-sizing: border-box; }
html.pip-native body[data-pip-frame] .game-wrap.pip-stage { height: 100%; padding-top: max(6px, env(safe-area-inset-top, 0px)); }
html:is(.pip-immersive, .pip-native) body[data-pip-frame] .pip-stage > :is(.game-title, .facts, .th-howto, #th-setup, #th-depth-gameplay, #th-depth-review, #th-call-price, #th-log, #th-goals, #th-coach, .th-stats, .th-rules, .th-keys, .pip-actions) { display: none; }
html:is(.pip-immersive, .pip-native) body[data-pip-frame] .th-keys, html:is(.pip-immersive, .pip-native) body[data-pip-frame] .th-depth-board-label { display: none; }
html:is(.pip-immersive, .pip-native) body[data-pip-frame] .th-table { flex: 1 1 0; min-height: 0; margin: 0; padding: 6px; overflow: hidden; display: flex; flex-direction: column; justify-content: space-evenly; box-sizing: border-box; }
html:is(.pip-immersive, .pip-native) body[data-pip-frame] .th-top, html:is(.pip-immersive, .pip-native) body[data-pip-frame] .th-mid { margin-block: 0; gap: 4px; }
html:is(.pip-immersive, .pip-native) body[data-pip-frame] .th-center { padding-block: 0; }
html:is(.pip-immersive, .pip-native) body[data-pip-frame] .th-board { max-width: 300px; margin-inline: auto; }
html:is(.pip-immersive, .pip-native) body[data-pip-frame] .th-blinds { margin-top: 2px; font-size: .68rem; line-height: 1.25; }
html:is(.pip-immersive, .pip-native) body[data-pip-frame] .th-pot { padding: 2px 10px; font-size: 1rem; }
html:is(.pip-immersive, .pip-native) body[data-pip-frame] .th-seat { padding: 3px 4px; }
html:is(.pip-immersive, .pip-native) body[data-pip-frame] .th-row2 { min-height: 0; margin-block: 2px; }
html:is(.pip-immersive, .pip-native) body[data-pip-frame] .th-act { min-height: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: .66rem; line-height: 1.2; }
html:is(.pip-immersive, .pip-native) body[data-pip-frame] .th-me { flex: none; margin: 0; padding: 4px 8px; gap: 8px; }
html:is(.pip-immersive, .pip-native) body[data-pip-frame] .th-hole { min-width: 94px; min-height: 0; gap: 4px; }
html:is(.pip-immersive, .pip-native) body[data-pip-frame] .th-hole .pc { width: 44px !important; height: 62px !important; }
html:is(.pip-immersive, .pip-native) body[data-pip-frame] .th-mebet, html:is(.pip-immersive, .pip-native) body[data-pip-frame] .th-strength { min-height: 0; margin-top: 0; font-size: .7rem; line-height: 1.25; }
html:is(.pip-immersive, .pip-native) body[data-pip-frame] .th-mestack { font-size: 1rem; }
html:is(.pip-immersive, .pip-native) body[data-pip-frame] #th-status { flex: none; min-height: 0; margin: 0; font-size: .8rem; line-height: 1.25; }
html:is(.pip-immersive, .pip-native) body[data-pip-frame] .th-controls { flex: none; min-height: 0; padding: 6px; padding-bottom: calc(6px + env(safe-area-inset-bottom, 0px)); }
html:is(.pip-immersive, .pip-native) body[data-pip-frame] .th-acts { gap: 6px; }
html:is(.pip-immersive, .pip-native) body[data-pip-frame] .th-acts .btn { min-height: 48px; padding: .3rem .25rem; font-size: .9rem; }
html:is(.pip-immersive, .pip-native) body[data-pip-frame] .th-sizer { margin: 4px 0; min-height: 44px; }
html:is(.pip-immersive, .pip-native) body[data-pip-frame] #th-slider { min-height: 44px; }
html:is(.pip-immersive, .pip-native) body[data-pip-frame] .th-presets button { min-height: 44px; }
html:is(.pip-immersive, .pip-native) body[data-pip-frame] .th-wait { min-height: 0; margin-top: 2px; font-size: .7rem; line-height: 1.2; }
html:is(.pip-immersive, .pip-native) body[data-pip-frame] .th-banner { padding: 2px; }
html:is(.pip-immersive, .pip-native) body[data-pip-frame] .th-banner .btn { min-height: 48px; margin-top: 4px; }
html:is(.pip-immersive, .pip-native) body[data-pip-frame] #th-banner-text { font-size: .95rem; line-height: 1.25; }
html:is(.pip-immersive, .pip-native) body[data-pip-frame] #th-banner-sub { margin-top: 2px; font-size: .74rem; line-height: 1.25; }
html:is(.pip-immersive, .pip-native) body[data-pip-frame] .th-banner[hidden], html:is(.pip-immersive, .pip-native) body[data-pip-frame] #th-acts-wrap[hidden] { display: none; }
@media (orientation: landscape) {
  html:is(.pip-immersive, .pip-native) body[data-pip-frame] .game-wrap.pip-stage { display: grid; grid-template-columns: minmax(0, 1fr) minmax(260px, 36%); grid-template-rows: auto auto 1fr; column-gap: 8px; row-gap: 4px; align-content: stretch; }
  html:is(.pip-immersive, .pip-native) body[data-pip-frame] .game-wrap.pip-stage > .th-table { grid-column: 1; grid-row: 1 / span 3; }
  html:is(.pip-immersive, .pip-native) body[data-pip-frame] .game-wrap.pip-stage > .th-me { grid-column: 2; grid-row: 1; }
  html:is(.pip-immersive, .pip-native) body[data-pip-frame] .game-wrap.pip-stage > #th-status { grid-column: 2; grid-row: 2; }
  html:is(.pip-immersive, .pip-native) body[data-pip-frame] .game-wrap.pip-stage > .th-controls { grid-column: 2; grid-row: 3; align-self: start; }
  html:is(.pip-immersive, .pip-native) body[data-pip-frame] .th-board { max-width: 250px; }
}
