/* Fight view (arena HUD + poker strip). Loaded automatically by fight.js. */
.pm-fight {
  --bg: #0b0d12; --panel: #141821; --text: #f2f4f8; --muted: #9aa3b2; --accent: #ffcc33;
  --p0: #ff5a36; --p1: #36b6ff;
  --pm-display: "Avenir Next Condensed", "Roboto Condensed", "Arial Narrow", "Helvetica Neue", Impact, sans-serif;
  --pm-ui: "Geist", "Manrope", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --pm-ease: cubic-bezier(0.2, 0.9, 0.2, 1);
  position: relative; display: flex; flex-direction: column; width: 100%; height: 100%; min-height: 0;
  background: #05060a; color: var(--text); font-family: var(--pm-ui); overflow: hidden;
  container-type: size; container-name: pmfight; user-select: none; -webkit-user-select: none; -webkit-tap-highlight-color: transparent;
}
.pm-fight *, .pm-fight *::before, .pm-fight *::after { box-sizing: border-box; }
.pm-fight .pm-p0 { --pc: var(--p0); } .pm-fight .pm-p1 { --pc: var(--p1); }
.pm-vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }

.pm-arena { position: relative; flex: 1 1 auto; min-height: 0; overflow: hidden; background: radial-gradient(120% 90% at 50% 100%, #14122b 0%, #05060a 70%); }
.pm-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.pm-arena::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(180deg, rgba(3,4,8,.82) 0, rgba(3,4,8,0) 22%, rgba(3,4,8,0) 82%, rgba(3,4,8,.55) 100%); }
.pm-arena > :not(canvas) { z-index: 2; }

/* ------------------------------------------------------------ HUD */
.pm-hud { position: absolute; left: 0; right: 0; top: 0; display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: clamp(6px, 1.6cqw, 22px); align-items: start;
  padding: clamp(8px, 1.6cqw, 18px) clamp(8px, 2cqw, 28px) 0; pointer-events: none; }
.pm-bar { min-width: 0; }
.pm-bar__top { display: flex; align-items: center; gap: clamp(5px, 1cqw, 12px); margin-bottom: 5px; }
.pm-bar.pm-p1 .pm-bar__top { flex-direction: row-reverse; text-align: right; }
.pm-badge { position: relative; flex: 0 0 auto; width: clamp(28px, 4.4cqw, 44px); aspect-ratio: 1; display: grid; place-items: center; }
.pm-badge svg { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); }
.pm-badge circle { fill: rgba(8,10,16,.8); stroke: rgba(255,255,255,.14); stroke-width: 3; }
.pm-badge .pm-ring { fill: none; stroke: var(--pc); stroke-dasharray: 100; stroke-dashoffset: 100; stroke-linecap: round; opacity: 0; transition: opacity .2s; }
.pm-bar.is-thinking .pm-ring { opacity: 1; filter: drop-shadow(0 0 4px var(--pc)); }
.pm-bar.is-thinking.is-hurry .pm-ring { stroke: #ff3d3d; }
.pm-badge em { position: relative; font: italic 800 clamp(13px, 2.2cqw, 20px)/1 var(--pm-display); color: var(--pc); text-shadow: 0 0 10px color-mix(in srgb, var(--pc) 70%, transparent); }
.pm-bar.is-thinking .pm-badge em { animation: pm-pulse 1s ease-in-out infinite; }
.pm-id { min-width: 0; flex: 1 1 auto; display: flex; flex-direction: column; }
.pm-name { font: italic 800 clamp(14px, 2.5cqw, 26px)/1.05 var(--pm-display); letter-spacing: .02em; text-transform: uppercase; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  text-shadow: 0 2px 0 rgba(0,0,0,.6), 0 0 18px color-mix(in srgb, var(--pc) 55%, transparent); padding-inline: 2px; }
.pm-model { font: 500 clamp(9px, 1.25cqw, 12px)/1.2 var(--pm-ui); color: var(--muted); letter-spacing: .04em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding-inline: 2px; }
.pm-chips { flex: 0 0 auto; display: flex; flex-direction: column; align-items: flex-end; }
.pm-bar.pm-p1 .pm-chips { align-items: flex-start; }
.pm-chips b { font: italic 800 clamp(18px, 3.4cqw, 36px)/0.95 var(--pm-display); font-variant-numeric: tabular-nums; color: #fff; text-shadow: 0 2px 0 rgba(0,0,0,.6); }
.pm-chips small { font: 600 clamp(9px, 1.15cqw, 12px)/1.2 var(--pm-ui); color: var(--accent); min-height: 1.2em; white-space: nowrap; font-variant-numeric: tabular-nums; }
.pm-chips small.is-up { color: #6dffa8; } .pm-chips small.is-down { color: #ff7a6b; }
.pm-track { position: relative; height: clamp(10px, 1.7cqw, 18px); transform: skewX(-22deg); background: rgba(6,8,13,.85); border: 1px solid rgba(255,255,255,.22); box-shadow: 0 3px 14px rgba(0,0,0,.6), inset 0 0 0 1px rgba(0,0,0,.6); overflow: hidden; margin-inline: 5px; }
.pm-bar.pm-p1 .pm-track { transform: skewX(22deg); }
.pm-track > div { position: absolute; top: 0; bottom: 0; left: 0; width: 0; }
.pm-bar.pm-p1 .pm-track > div { left: auto; right: 0; }
.pm-ghost { background: #fff; transition: width .5s .45s ease-in; }
.pm-risk { background: repeating-linear-gradient(90deg, color-mix(in srgb, var(--accent) 85%, #000) 0 4px, rgba(60,44,0,.9) 4px 7px); transition: width .25s ease-out; }
.pm-fill { background: linear-gradient(180deg, color-mix(in srgb, var(--pc) 55%, #fff) 0%, var(--pc) 42%, color-mix(in srgb, var(--pc) 62%, #000) 100%); box-shadow: 0 0 16px color-mix(in srgb, var(--pc) 70%, transparent); transition: width .55s var(--pm-ease); }
.pm-track .pm-ticks { width: 100% !important; background: repeating-linear-gradient(90deg, transparent 0 calc(10% - 1px), rgba(0,0,0,.55) calc(10% - 1px) 10%); pointer-events: none; }
.pm-bar.is-instant .pm-track > div { transition: none; }
.pm-bar.is-gain .pm-track { animation: pm-gain .7s ease-out; }
.pm-bar.is-loss .pm-chips b { animation: pm-shake .4s linear; }
.pm-bar.is-allin .pm-track { animation: pm-allin .5s ease-in-out infinite alternate; }
.pm-bar.is-allin .pm-chips b { color: var(--accent); }
.pm-bar.is-low .pm-fill { animation: pm-pulse .7s ease-in-out infinite; }

.pm-round { display: flex; flex-direction: column; align-items: center; justify-content: center; width: clamp(50px, 8cqw, 86px); aspect-ratio: 1 / 1.02; padding-top: 2px;
  background: linear-gradient(180deg, #232838, #0d1018); clip-path: polygon(50% 0, 100% 24%, 100% 76%, 50% 100%, 0 76%, 0 24%); position: relative; filter: drop-shadow(0 0 10px rgba(255,204,51,.35)); }
.pm-round::before { content: ""; position: absolute; inset: 0; background: var(--accent); clip-path: polygon(50% 0, 100% 24%, 100% 76%, 50% 100%, 0 76%, 0 24%, 50% 0, 50% 4%, 5% 26.500%, 5% 73.500%, 50% 96%, 95% 73.500%, 95% 26.500%, 50% 4%); }
.pm-round small { font: 700 clamp(6px, 1cqw, 10px)/1 var(--pm-ui); letter-spacing: .16em; color: var(--muted); }
.pm-round b { font: italic 800 clamp(20px, 3.6cqw, 40px)/0.95 var(--pm-display); color: var(--accent); font-variant-numeric: tabular-nums; }
.pm-round span { font: 700 clamp(6px, .95cqw, 10px)/1 var(--pm-ui); letter-spacing: .08em; color: #cfd5e2; min-height: 1em; }

/* pot label under the orb */
.pm-pot { position: absolute; left: 0; top: 0; display: flex; align-items: baseline; gap: 5px; padding: 2px 9px 3px; border-radius: 99px; background: rgba(10,9,3,.72); border: 1px solid rgba(255,204,51,.55);
  opacity: 0; transition: opacity .25s; pointer-events: none; white-space: nowrap; box-shadow: 0 0 18px rgba(255,204,51,.25); will-change: transform; }
.pm-pot.is-on { opacity: 1; }
.pm-pot small { font: 700 9px/1 var(--pm-ui); letter-spacing: .14em; color: var(--accent); }
.pm-pot b { font: italic 800 clamp(15px, 2.4cqw, 22px)/1 var(--pm-display); font-variant-numeric: tabular-nums; }

/* speech bubbles (the bot's own line) */
.pm-bubble { position: absolute; left: 0; top: 0; max-width: min(280px, 62cqw); padding: 7px 11px 8px; border-radius: 12px; background: rgba(9,11,17,.93); border: 1.5px solid var(--pc);
  font: 600 clamp(12px, 1.7cqw, 15px)/1.28 var(--pm-ui); color: var(--text); opacity: 0; transition: opacity .2s; pointer-events: none; will-change: transform; box-shadow: 0 6px 22px rgba(0,0,0,.55), 0 0 16px color-mix(in srgb, var(--pc) 35%, transparent); overflow-wrap: anywhere; }
.pm-bubble::after { content: ""; position: absolute; left: var(--tail, 50%); bottom: -7px; width: 12px; height: 12px; background: rgba(9,11,17,.96); border-right: 1.5px solid var(--pc); border-bottom: 1.5px solid var(--pc); transform: translateX(-50%) rotate(45deg); }
.pm-arena > .pm-bubble { z-index: 3; }
.pm-bubble.is-on { opacity: 1; animation: pm-pop .28s var(--pm-ease); }

/* move callouts */
.pm-callout { position: absolute; top: 31%; left: 5%; pointer-events: none; opacity: 0; --kc: #fff; }
.pm-callout.pm-p1 { left: auto; right: 5%; }
.pm-callout span { display: block; font: italic 800 clamp(26px, 6.2cqw, 70px)/0.95 var(--pm-display); letter-spacing: .01em; color: #fff; transform: skewX(-8deg) rotate(-4deg); padding: 0 .12em;
  -webkit-text-stroke: clamp(1px, .22cqw, 2.5px) rgba(4,5,9,.9); paint-order: stroke fill; text-shadow: 0 0 22px var(--kc), 3px 4px 0 color-mix(in srgb, var(--kc) 75%, #000); }
.pm-callout.pm-p1 span { transform: skewX(-8deg) rotate(4deg); }
.pm-callout.is-on { animation: pm-slam 1s var(--pm-ease) both; }
.pm-k-check { --kc: #8fb6ff; } .pm-k-check span { font-size: clamp(20px, 4.2cqw, 46px); }
.pm-k-call { --kc: #37e0c8; } .pm-k-call span { font-size: clamp(22px, 4.8cqw, 52px); }
.pm-k-bet { --kc: #ff9a2e; } .pm-k-raise { --kc: #ff4d2e; } .pm-k-reraise { --kc: #ff3db8; } .pm-k-combo { --kc: #ff3db8; }
.pm-k-combo span { font-size: clamp(18px, 3.8cqw, 40px); }
.pm-k-fold { --kc: #5c6474; } .pm-k-fold span { color: #b9c0cd; font-size: clamp(20px, 4.4cqw, 48px); }
.pm-k-fallback { --kc: #b68cff; } .pm-k-fallback span { font-size: clamp(18px, 4cqw, 44px); }
.pm-k-win { --kc: var(--accent); } .pm-k-win span { color: var(--accent); }
.pm-callout.is-big { left: 0; right: 0; top: 24%; text-align: center; --kc: var(--accent); }
.pm-callout.is-big span { font-size: clamp(54px, 15cqw, 170px); transform: skewX(-10deg) rotate(-3deg); background: linear-gradient(180deg, #fff 20%, var(--accent) 55%, #ff7a1a 100%); -webkit-background-clip: text; background-clip: text; color: transparent;
  -webkit-text-stroke: 0; filter: drop-shadow(0 0 26px rgba(255,190,40,.8)) drop-shadow(4px 6px 0 rgba(120,30,0,.9)); text-shadow: none; }
.pm-callout.is-big.is-on { animation: pm-slam-big 1.7s var(--pm-ease) both; }

/* coach beat (owner moved a slider) */
.pm-coach { position: absolute; top: clamp(60px, 11.500cqw, 112px); left: clamp(8px, 2cqw, 28px); display: flex; flex-direction: column; gap: 2px; padding: 6px 10px 7px; border-radius: 4px 10px 10px 4px; background: rgba(9,11,17,.9);
  border-left: 3px solid var(--pc); box-shadow: 0 6px 22px rgba(0,0,0,.5), 0 0 18px color-mix(in srgb, var(--pc) 35%, transparent); opacity: 0; pointer-events: none; transform: translateX(-14px); transition: opacity .25s, transform .35s var(--pm-ease); max-width: 46cqw; }
.pm-coach.pm-p1 { left: auto; right: clamp(8px, 2cqw, 28px); border-left: 0; border-right: 3px solid var(--pc); border-radius: 10px 4px 4px 10px; transform: translateX(14px); align-items: flex-end; }
.pm-coach.is-on { opacity: 1; transform: none; }
.pm-coach small { font: 800 9px/1 var(--pm-ui); letter-spacing: .22em; color: var(--pc); }
.pm-coach span { display: flex; align-items: baseline; gap: 6px; white-space: nowrap; font: italic 800 clamp(13px, 2cqw, 19px)/1.1 var(--pm-display); text-transform: uppercase; letter-spacing: .02em; }
.pm-coach b { font-weight: 800; overflow: hidden; text-overflow: ellipsis; }
.pm-coach i { font-style: normal; font-size: .8em; color: var(--muted); } .pm-coach i.is-up { color: #6dffa8; } .pm-coach i.is-down { color: #ff7a6b; }
.pm-coach em { font-style: italic; color: var(--accent); font-variant-numeric: tabular-nums; }

/* centre banners */
.pm-banner { position: absolute; left: 0; right: 0; top: 40%; display: flex; flex-direction: column; align-items: center; gap: 2px; pointer-events: none; opacity: 0; text-align: center; }
.pm-banner__bar { position: absolute; left: -5%; right: -5%; top: 50%; height: 118%; transform: translateY(-50%) skewY(-2.5deg); background: linear-gradient(90deg, transparent, rgba(5,6,10,.86) 18%, rgba(5,6,10,.86) 82%, transparent);
  border-block: 2px solid color-mix(in srgb, var(--accent) 80%, transparent); z-index: -1; }
.pm-banner strong { font: italic 800 clamp(30px, 8cqw, 96px)/1 var(--pm-display); letter-spacing: .03em; color: #fff; text-shadow: 0 0 24px rgba(255,204,51,.55), 3px 4px 0 rgba(0,0,0,.7); transform: skewX(-8deg); padding: .08em .3em 0; white-space: nowrap; }
.pm-banner span { font: italic 800 clamp(15px, 3.4cqw, 40px)/1 var(--pm-display); letter-spacing: .22em; color: var(--accent); padding-bottom: .25em; text-indent: .22em; }
.pm-banner.is-on { animation: pm-banner 1s var(--pm-ease) both; }
.pm-banner--round strong { font-size: clamp(24px, 5.6cqw, 62px); } .pm-banner--round span { font-size: clamp(13px, 2.6cqw, 28px); }
.pm-banner--round.is-on { animation-duration: .8s; }
.pm-banner--round-big.is-on { animation-duration: 1.5s; }
.pm-banner--vs { top: 22%; } .pm-banner--vs strong { font-size: clamp(20px, 5.4cqw, 66px); background: linear-gradient(90deg, var(--p0) 30%, #fff 50%, var(--p1) 70%); -webkit-background-clip: text; background-clip: text; color: transparent; text-shadow: none; filter: drop-shadow(2px 3px 0 rgba(0,0,0,.8)); }
.pm-banner--vs span { font-size: clamp(9px, 1.6cqw, 16px); letter-spacing: .1em; color: var(--muted); font-style: normal; font-family: var(--pm-ui); font-weight: 600; }
.pm-banner--vs.is-on { animation-duration: 2.1s; }
.pm-banner--street { top: clamp(64px, 12cqw, 118px); }
.pm-banner--street .pm-banner__bar { display: none; }
.pm-banner--street strong { font-size: clamp(16px, 3cqw, 30px); color: var(--accent); letter-spacing: .2em; text-indent: .2em; }
.pm-banner--street span { font: 700 clamp(11px, 1.6cqw, 15px)/1.2 var(--pm-ui); letter-spacing: .12em; color: #fff; font-style: normal; }
.pm-banner--street.is-on { animation: pm-fadeup .7s ease-out both; }
.pm-banner--showdown { top: 20%; } .pm-banner--showdown strong { color: var(--accent); font-size: clamp(26px, 6cqw, 72px); } .pm-banner--showdown.is-on { animation-duration: 1.3s; }
.pm-banner--split strong { font-size: clamp(24px, 6cqw, 70px); } .pm-banner--split.is-on { animation-duration: 1.1s; }
.pm-banner--ko { top: 30%; }
.pm-banner--ko strong { font-size: clamp(76px, 22cqw, 260px); line-height: .9; background: linear-gradient(180deg, #fff 15%, var(--accent) 50%, #ff3d1f 100%); -webkit-background-clip: text; background-clip: text; color: transparent; text-shadow: none;
  filter: drop-shadow(0 0 34px rgba(255,120,30,.85)) drop-shadow(5px 7px 0 rgba(90,10,0,.95)); padding-inline: .2em; }
.pm-banner--ko span { font-size: clamp(16px, 4cqw, 44px); color: #fff; }
.pm-banner--ko .pm-banner__bar { height: 62%; }
.pm-banner--ko.is-on { animation: pm-ko 2.3s var(--pm-ease) both; }

.pm-flash { position: absolute; inset: 0; background: #fff; opacity: 0; pointer-events: none; mix-blend-mode: screen; }

.pm-result { position: absolute; left: 50%; bottom: clamp(10px, 4cqw, 40px); transform: translate(-50%, 16px); width: min(92%, 400px); padding: 14px 16px 12px; border-radius: 14px; background: rgba(10,12,18,.9); border: 1px solid rgba(255,204,51,.5);
  box-shadow: 0 18px 60px rgba(0,0,0,.7), 0 0 30px rgba(255,204,51,.18); text-align: center; opacity: 0; pointer-events: none; transition: opacity .4s, transform .5s var(--pm-ease); backdrop-filter: blur(6px); }
.pm-result.is-on { opacity: 1; transform: translate(-50%, 0); }
.pm-result > small { font: 700 10px/1 var(--pm-ui); letter-spacing: .3em; color: var(--accent); }
.pm-result strong { display: block; font: italic 800 clamp(26px, 6cqw, 40px)/1.05 var(--pm-display); text-transform: uppercase; color: var(--pc, #fff); text-shadow: 0 0 18px color-mix(in srgb, var(--pc, #fff) 60%, transparent); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding-inline: 4px; }
.pm-result em { display: block; font: 600 11px/1.4 var(--pm-ui); color: var(--muted); letter-spacing: .08em; font-style: normal; margin-bottom: 8px; }
.pm-result ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.pm-result li { display: grid; grid-template-columns: minmax(0, 1fr) auto auto auto; gap: 10px; align-items: baseline; padding: 5px 9px; border-radius: 7px; background: rgba(255,255,255,.05); border-left: 3px solid var(--pc); text-align: left; font: 600 13px/1.2 var(--pm-ui); }
.pm-result li span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pm-result li small { color: var(--muted); font-size: 10px; } .pm-result li b { font-variant-numeric: tabular-nums; } .pm-result li i { font-style: normal; color: #ff7a6b; font-variant-numeric: tabular-nums; min-width: 3.4em; text-align: right; }
.pm-result li.is-w i { color: #6dffa8; }

.pm-tag { position: absolute; left: 10px; bottom: 9px; padding: 3px 8px; border-radius: 5px; font: 700 10px/1 var(--pm-ui); letter-spacing: .16em; color: var(--accent); background: rgba(8,9,13,.7); border: 1px solid rgba(255,204,51,.4); opacity: 0; pointer-events: none; }
.pm-tag.is-on { opacity: 1; }
.pm-action { position: absolute; right: 10px; bottom: 8px; height: 32px; padding: 0 14px; border-radius: 99px; border: 1px solid var(--accent); background: rgba(12,11,5,.85); color: var(--accent); font: 700 13px/1 var(--pm-ui); letter-spacing: .04em; cursor: pointer;
  box-shadow: 0 0 18px rgba(255,204,51,.3); transition: background .2s, color .2s; }
.pm-action:hover, .pm-action[aria-expanded="true"] { background: var(--accent); color: #15120a; }
.pm-action:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.pm-loading { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 14px; background: #05060a; opacity: 0; pointer-events: none; transition: opacity .5s; z-index: 5 !important; }
.pm-loading.is-on { opacity: 1; }
.pm-loading span { width: 34px; height: 34px; border-radius: 50%; border: 3px solid rgba(255,204,51,.2); border-top-color: var(--accent); animation: pm-spin .8s linear infinite; }
.pm-loading b { font: italic 800 14px/1 var(--pm-display); letter-spacing: .18em; text-transform: uppercase; color: var(--muted); }

/* ------------------------------------------------------------ replay controls */
.pm-controls { flex: 0 0 auto; display: flex; align-items: center; gap: 4px; padding: 4px 8px; background: #0c0e14; border-top: 1px solid rgba(255,255,255,.08); }
.pm-controls button { flex: 0 0 auto; display: grid; place-items: center; width: 36px; height: 32px; border: 0; border-radius: 8px; background: transparent; color: var(--text); cursor: pointer; font: italic 800 15px/1 var(--pm-display); transition: background .15s, color .15s; }
.pm-controls button:hover { background: rgba(255,255,255,.09); }
.pm-controls button:focus-visible, .pm-controls select:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.pm-controls svg { width: 18px; height: 18px; fill: currentColor; }
.pm-controls .pm-play { background: var(--accent); color: #15120a; }
.pm-controls .pm-play:hover { background: #ffd95e; }
.pm-controls .pm-speed { color: var(--accent); width: 40px; }
.pm-controls select { height: 30px; max-width: 132px; border-radius: 8px; border: 1px solid rgba(255,255,255,.14); background: #141821; color: var(--text); font: 600 12px/1 var(--pm-ui); padding: 0 6px; }
.pm-progress { flex: 1 1 auto; min-width: 16px; height: 4px; border-radius: 4px; background: rgba(255,255,255,.1); overflow: hidden; margin-inline: 4px; }
.pm-progress i { display: block; height: 100%; background: linear-gradient(90deg, var(--p0), var(--accent), var(--p1)); transform-origin: left; transform: scaleX(0); }
.pm-controls [aria-pressed="true"] { color: var(--accent); background: rgba(255,204,51,.12); }
.pm-snd .pm-wave { display: none; } .pm-snd[aria-pressed="true"] .pm-wave { display: inline; } .pm-snd[aria-pressed="true"] .pm-mute { display: none; }
.pm-snd:not([aria-pressed="true"]), .pm-q:not([aria-pressed="true"]) { color: var(--muted); }
.pm-controls[data-live="true"] [data-a="prev"], .pm-controls[data-live="true"] [data-a="next"], .pm-controls[data-live="true"] .pm-handsel { display: none; }

/* ------------------------------------------------------------ poker strip */
.pm-strip { --cw: clamp(27px, 7.4cqw, 44px); flex: 0 0 auto; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; grid-template-areas: "s0 mid s1" "log log log"; align-items: center; gap: 4px 8px;
  padding: 7px 10px max(7px, env(safe-area-inset-bottom)); background: linear-gradient(180deg, #151923, #0d1017); border-top: 1px solid rgba(255,255,255,.1); min-height: 15%; }
.pm-seat { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.pm-seat.pm-p0 { grid-area: s0; align-items: flex-start; } .pm-seat.pm-p1 { grid-area: s1; align-items: flex-end; }
.pm-hole, .pm-board { display: flex; gap: 3px; }
.pm-hole { padding: 2px; border-radius: 7px; box-shadow: 0 0 0 1.5px var(--pc); background: color-mix(in srgb, var(--pc) 16%, transparent); transition: opacity .3s, filter .3s, box-shadow .3s; }
.pm-hole.is-folded { opacity: .38; filter: grayscale(1); }
.pm-hole.is-winner { box-shadow: 0 0 0 2px var(--accent), 0 0 16px rgba(255,204,51,.6); }
.pm-seatinfo { display: flex; gap: 6px; align-items: baseline; max-width: calc(var(--cw) * 2 + 40px); font: 700 10px/1.1 var(--pm-ui); }
.pm-p1 .pm-seatinfo { flex-direction: row-reverse; }
.pm-sname { color: var(--pc); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.pm-bet { color: var(--accent); white-space: nowrap; font-variant-numeric: tabular-nums; }
.pm-mid { grid-area: mid; display: flex; flex-direction: column; align-items: center; gap: 3px; min-width: 0; }
.pm-midinfo { display: flex; gap: 8px; font: 600 10px/1.1 var(--pm-ui); color: var(--muted); white-space: nowrap; text-transform: capitalize; }
.pm-midinfo b { color: var(--accent); font-variant-numeric: tabular-nums; } .pm-midinfo .pm-street { color: #dfe4ee; }
.pm-card { position: relative; width: var(--cw); aspect-ratio: 5 / 7; border-radius: calc(var(--cw) * .13); background: linear-gradient(160deg, #fff, #e9e5da); color: #14161c; display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: .95;
  box-shadow: 0 2px 5px rgba(0,0,0,.5); flex: 0 0 auto; }
.pm-card b { font: 800 calc(var(--cw) * .5)/.9 var(--pm-ui); letter-spacing: -.04em; } .pm-card i { font: normal calc(var(--cw) * .46)/.9 "Apple Symbols", "Segoe UI Symbol", "Noto Sans Symbols 2", sans-serif; }
.pm-card[data-suit="h"] { color: #d92b2b; } .pm-card[data-suit="d"] { color: #1f63d8; } .pm-card[data-suit="c"] { color: #15803d; }
.pm-card--back { background: repeating-linear-gradient(45deg, #1b2030 0 4px, #232a40 4px 8px); box-shadow: inset 0 0 0 2px #0d1017, inset 0 0 0 3px rgba(255,204,51,.55), 0 2px 5px rgba(0,0,0,.5); }
.pm-card--empty { background: transparent; box-shadow: inset 0 0 0 1px rgba(255,255,255,.16); border-radius: calc(var(--cw) * .13); }
.pm-card.is-flip { animation: pm-flip .38s var(--pm-ease) both; }
.pm-log { grid-area: log; list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 1px; height: 2.7em; overflow: hidden; font: 500 11.500px/1.35 var(--pm-ui); color: var(--muted); }
.pm-log li { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding-left: 8px; border-left: 2px solid var(--pc, rgba(255,255,255,.25)); opacity: .5; flex: 0 0 auto; }
.pm-log li:first-child { opacity: 1; color: var(--text); animation: pm-fadeup .25s ease-out; }
.pm-log li b { color: var(--pc, var(--text)); font-weight: 700; } .pm-log li em { color: #b68cff; font-style: normal; }
.pm-log .pm-log--sys b { color: var(--text); }

@container pmfight (min-width: 860px) {
  .pm-strip { --cw: clamp(40px, 4.4cqw, 58px); grid-template-columns: auto minmax(0, 1fr) auto minmax(220px, 28cqw); grid-template-areas: "s0 mid s1 log"; padding: 10px 18px; gap: 4px 18px; }
  .pm-log { height: calc(var(--cw) * 1.4 + 18px); font-size: 12.500px; border-left: 1px solid rgba(255,255,255,.08); padding-left: 14px; }
  .pm-seatinfo, .pm-midinfo { font-size: 12px; }
  .pm-controls { padding: 5px 18px; }
}

@container pmfight (max-width: 560px) {
  .pm-callout { top: 23%; left: 3%; } .pm-callout.pm-p1 { right: 3%; }
  .pm-callout.is-big { top: 19%; }
  .pm-chips small { display: none; }
  .pm-banner { top: 36%; }
  .pm-progress { display: none; }
  .pm-controls { justify-content: space-between; }
}

/* short viewports (phone in landscape): one-row strip, slimmer HUD */
@container pmfight (max-height: 440px) and (max-width: 599px) {
  .pm-strip { --cw: 30px; min-height: 0; padding-block: 5px; } .pm-log, .pm-midinfo { display: none; }
  .pm-model { display: none; }
  .pm-result ul { display: none; }
}
@container pmfight (max-height: 440px) and (min-width: 600px) {
  .pm-strip { --cw: 26px; grid-template-columns: auto minmax(0, auto) auto minmax(120px, 1fr); grid-template-areas: "s0 mid s1 log"; padding: 4px 10px max(4px, env(safe-area-inset-bottom)); gap: 2px 12px; min-height: 0; }
  .pm-log { height: 2.7em; font-size: 11px; }
  .pm-controls { padding: 2px 8px; } .pm-controls button { height: 28px; }
  .pm-model { display: none; }
  .pm-round { width: clamp(44px, 6cqw, 60px); }
  .pm-banner--ko strong { font-size: clamp(60px, 15cqw, 150px); }
  .pm-result { bottom: 6px; padding: 8px 12px; } .pm-result ul { display: none; }
}

/* compact embed (home page hero) */
.pm-fight[data-compact="true"] .pm-model, .pm-fight[data-compact="true"] .pm-chips small { display: none; }
.pm-fight[data-compact="true"] .pm-bubble { font-size: clamp(10px, 2.2cqw, 13px); padding: 5px 8px 6px; max-width: min(200px, 48cqw); }
.pm-fight[data-compact="true"] .pm-callout { top: 34%; }

@keyframes pm-slam { 0% { opacity: 0; transform: scale(2.6); } 14% { opacity: 1; transform: scale(.94); } 22% { transform: scale(1.04); } 30%, 78% { opacity: 1; transform: scale(1); } 100% { opacity: 0; transform: scale(1.06) translateY(-10px); } }
@keyframes pm-slam-big { 0% { opacity: 0; transform: scale(4); } 10% { opacity: 1; transform: scale(.9); } 16% { transform: scale(1.08); } 22%, 80% { opacity: 1; transform: scale(1); } 100% { opacity: 0; transform: scale(1.25); } }
@keyframes pm-banner { 0% { opacity: 0; transform: translateX(-9%) scaleY(.2); } 14% { opacity: 1; transform: none; } 80% { opacity: 1; transform: translateX(1.500%); } 100% { opacity: 0; transform: translateX(9%) scaleY(.2); } }
@keyframes pm-ko { 0% { opacity: 0; transform: scale(5); } 8% { opacity: 1; transform: scale(.92); } 13% { transform: scale(1.06); } 18%, 84% { opacity: 1; transform: scale(1); } 100% { opacity: 0; transform: scale(1.1); } }
@keyframes pm-fadeup { 0% { opacity: 0; transform: translateY(8px); } 25%, 75% { opacity: 1; transform: none; } 100% { opacity: 0; } }
.pm-log li:first-child { animation-name: pm-in; }
@keyframes pm-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes pm-pop { from { scale: .7; } to { scale: 1; } }
@keyframes pm-flip { 0% { transform: rotateY(90deg) translateY(-6px); filter: brightness(2); } 100% { transform: none; filter: none; } }
@keyframes pm-pulse { 50% { opacity: .45; } }
@keyframes pm-gain { 0% { filter: brightness(2.6); } 100% { filter: none; } }
@keyframes pm-shake { 20% { transform: translateX(-3px); } 40% { transform: translateX(3px); } 60% { transform: translateX(-2px); } 80% { transform: translateX(2px); } }
@keyframes pm-allin { from { box-shadow: 0 0 0 1px var(--accent), 0 0 6px rgba(255,204,51,.4); } to { box-shadow: 0 0 0 1px var(--accent), 0 0 22px rgba(255,204,51,.95); } }
@keyframes pm-spin { to { transform: rotate(360deg); } }

.pm-fight[data-reduced="true"] .pm-callout.is-on, .pm-fight[data-reduced="true"] .pm-banner.is-on { animation-name: pm-fadeup; }
.pm-fight[data-reduced="true"] .pm-card.is-flip, .pm-fight[data-reduced="true"] .pm-bubble.is-on, .pm-fight[data-reduced="true"] .pm-bar * { animation: none !important; }
@media (prefers-reduced-motion: reduce) { .pm-fight .pm-card.is-flip, .pm-fight .pm-bubble.is-on { animation: none; } }
