/*
 * APOC Poker – ein Spieltisch im Dunkeln, eine Lampe darüber (Basis aus APOC Solitaire).
 * Farbwelt wie apocalyptical.de: Night, Soot, Logo-Rot, Bone. Schriften lokal (SIL OFL).
 */
@font-face { font-family: "Archivo"; font-style: normal; font-weight: 100 900; font-stretch: 62% 125%; font-display: swap; src: url("../fonts/archivo.woff2") format("woff2"); }
@font-face { font-family: "Bodoni Moda"; font-style: normal; font-weight: 400 900; font-display: swap; src: url("../fonts/bodoni-moda.woff2") format("woff2"); }
@font-face { font-family: "Bodoni Moda"; font-style: italic; font-weight: 400 900; font-display: swap; src: url("../fonts/bodoni-moda-italic.woff2") format("woff2"); }

.sol {
  --night: #0d0a09; --soot: #171211; --vermilion: #e44028; --bone: #ece3d6; --ash: #a39589; --rule: rgba(236, 227, 214, .13);
  --display: "Archivo", "Arial Black", Arial, sans-serif; --serif: "Bodoni Moda", "Bodoni 72", Didot, "Times New Roman", serif;
  --radius: 6% / 4.3%;
  position: relative; display: flex; flex-direction: column; overflow: hidden; isolation: isolate;
  color: var(--bone); font-family: var(--display); -webkit-font-smoothing: antialiased; user-select: none; -webkit-user-select: none;
  background:
    radial-gradient(ellipse 75% 65% at 50% 6%, #3b2219 0%, #25140f 36%, #130a08 66%, #070404 100%);
  outline: none;
}
.sol *, .sol *::before, .sol *::after { box-sizing: border-box; }
.sol::before { /* felt */
  content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none; opacity: .55; mix-blend-mode: overlay;
  background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='220' height='220'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 .55  0 0 0 0 .45  0 0 0 0 .4  0 0 0 .55 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}
.sol::after { /* vignette */
  content: ""; position: absolute; inset: 0; z-index: 3; pointer-events: none;
  background: radial-gradient(ellipse 85% 85% at 50% 45%, transparent 55%, rgba(0, 0, 0, .62) 100%);
}
body.apoc-poker-page { margin: 0; background: #070404; overflow: hidden; }
.sol-full { position: fixed; inset: 0; }
body.admin-bar .sol-full { top: 32px; }
@media (max-width: 782px) { body.admin-bar .sol-full { top: 46px; } }
.sol-embedded { height: min(88vh, 900px); min-height: 560px; border-radius: 16px; }
.sol:fullscreen { border-radius: 0; }
.sol-light {
  position: absolute; left: 50%; top: -18%; width: 130%; height: 115%; transform: translateX(-50%); z-index: 1; pointer-events: none;
  background: radial-gradient(ellipse 46% 58% at 50% 0%, rgba(255, 214, 170, .22), rgba(255, 186, 135, .08) 46%, transparent 72%);
  mix-blend-mode: screen; animation: sol-breathe 14s ease-in-out infinite; transition: filter 3s ease;
}
@keyframes sol-breathe { 50% { opacity: .82; transform: translateX(-50%) scale(1.03); } }
.sol-glow .sol-light { filter: brightness(1.8) saturate(1.2); }
.sol-dust { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 2; pointer-events: none; }

/* ---------- HUD ---------- */
.sol-hud { position: relative; z-index: 10; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; padding: 12px clamp(10px, 2.4vw, 26px); }
.sol-brand { display: flex; align-items: baseline; gap: 12px; white-space: nowrap; }
.sol-brand b { font-weight: 900; font-stretch: 125%; font-size: .72rem; letter-spacing: .3em; color: var(--ash); }
.sol-brand i { font-family: var(--serif); font-size: 1.35rem; color: var(--bone); }
.sol-stats { display: flex; gap: 10px; align-items: baseline; font-variant-numeric: tabular-nums; font-size: .82rem; letter-spacing: .14em; color: var(--ash); }
.sol-time { font-family: var(--serif); font-size: 1.25rem; letter-spacing: .02em; color: var(--bone); }
.sol-dot { opacity: .4; }
.sol-tools { display: flex; justify-content: flex-end; gap: 6px; }
.sol-tools button { width: 40px; height: 40px; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; border: 1px solid var(--rule); background: rgba(13, 10, 9, .45); color: var(--bone); cursor: pointer; transition: border-color .25s, background .25s, opacity .25s; }
.sol-tools button[hidden] { display: none; }
.sol-tools button:hover { border-color: rgba(236, 227, 214, .45); background: rgba(236, 227, 214, .06); }
.sol-tools button:disabled { opacity: .35; cursor: default; }
.sol-tools button.off { opacity: .45; }
.sol-tools button.off svg { stroke-dasharray: 2 2; }
.sol-tools svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.sol button:focus-visible, .sol select:focus-visible, .sol input:focus-visible { outline: 2px solid var(--vermilion); outline-offset: 2px; }

/* ---------- table ---------- */
.sol-table { position: relative; z-index: 5; flex: 1; min-height: 0; touch-action: none; }
.sol-slot { position: absolute; left: 0; top: 0; width: var(--cw); height: var(--ch); border-radius: var(--radius); border: 1px solid var(--rule); background: rgba(0, 0, 0, .16); box-shadow: inset 0 0 22px rgba(0, 0, 0, .45); display: flex; align-items: center; justify-content: center; }
.sol-slot span { font-family: var(--serif); font-size: calc(var(--cw) * .5); color: rgba(236, 227, 214, .1); line-height: 1; }
.sol-slot-s { cursor: pointer; }
.sol-slot-s .sol-recycle { opacity: 0; font-family: var(--display); font-size: calc(var(--cw) * .42); color: rgba(236, 227, 214, .35); transition: opacity .3s; }
.sol-slot-s.can-recycle .sol-recycle { opacity: 1; }
.sol-slot.sol-hint { border-color: var(--vermilion); box-shadow: inset 0 0 22px rgba(0, 0, 0, .45), 0 0 18px rgba(228, 64, 40, .55); }

/* ---------- cards ---------- */
.sol-c {
  position: absolute; left: 0; top: 0; width: var(--cw); height: var(--ch); cursor: pointer; perspective: 1000px; will-change: transform;
  transition-property: transform, filter; transition-timing-function: cubic-bezier(.22, .8, .2, 1); transition-duration: .42s, .5s;
}
.sol-flip { position: relative; width: 100%; height: 100%; transform-style: preserve-3d; transform: rotateY(180deg); transition: transform .5s cubic-bezier(.3, .7, .2, 1); }
.sol-c.up .sol-flip { transform: rotateY(0deg); }
.sol-face { position: absolute; inset: 0; border-radius: var(--radius); overflow: hidden; -webkit-backface-visibility: hidden; backface-visibility: hidden; background: #ece3d6;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .55), 0 5px 12px rgba(0, 0, 0, .32); transition: box-shadow .25s ease; }
.sol-back { transform: rotateY(180deg); background: #3c1712; }
.sol-face img { width: 100%; height: 100%; object-fit: cover; display: block; pointer-events: none; -webkit-user-drag: none; }
.sol-front::after { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; background: linear-gradient(160deg, rgba(255, 240, 220, .12), transparent 40%, rgba(0, 0, 0, .06)); }
.sol-c.sol-drag .sol-face { box-shadow: 0 16px 34px rgba(0, 0, 0, .55), 0 4px 10px rgba(0, 0, 0, .4); }
.sol-c.sol-hint .sol-face { box-shadow: 0 0 0 2px var(--vermilion), 0 0 24px rgba(228, 64, 40, .65); }
.sol-c.sol-nope .sol-flip { animation: sol-shake .32s ease; }
@keyframes sol-shake { 25% { translate: -4px 0; } 75% { translate: 4px 0; } }

/* stock thickness */
.sol-slot-s::before { content: ""; position: absolute; inset: 0; border-radius: inherit; background: var(--back) center / cover; opacity: 0; }

/* ---------- footer ---------- */
.sol-foot { position: relative; z-index: 10; display: flex; justify-content: space-between; gap: 12px; padding: 8px clamp(10px, 2.4vw, 26px) 12px; font-size: .68rem; letter-spacing: .16em; text-transform: uppercase; color: rgba(163, 149, 137, .75); }
.sol-track { text-transform: none; letter-spacing: .04em; font-family: var(--serif); font-style: italic; font-size: .82rem; }

/* ---------- overlay (start / win / loading) ---------- */
.sol-overlay { position: absolute; inset: 0; z-index: 60; display: flex; align-items: center; justify-content: center; padding: 20px; background: rgba(5, 3, 3, .5); backdrop-filter: blur(3px); opacity: 0; transition: opacity .45s ease; }
.sol-overlay.show { opacity: 1; }
.sol-overlay[hidden] { display: none; }
.sol-card-ui { max-width: 520px; text-align: center; transform: translateY(12px); transition: transform .6s cubic-bezier(.2, .7, .2, 1); }
.sol-overlay.show .sol-card-ui { transform: none; }
.sol-kicker { margin: 0 0 10px; font-weight: 700; font-stretch: 112%; font-size: .7rem; letter-spacing: .34em; text-transform: uppercase; color: var(--vermilion); }
.sol-title { margin: 0 0 16px; font-family: var(--serif); font-style: italic; font-weight: 500; font-size: clamp(3.2rem, 2rem + 6vw, 6.4rem); line-height: 1; color: var(--bone); text-shadow: 0 0 40px rgba(255, 200, 150, .25); }
.sol-title-sm { font-size: clamp(2.6rem, 1.8rem + 4vw, 4.6rem); }
.sol-h2 { margin: 0 0 18px; font-family: var(--serif); font-style: italic; font-weight: 500; font-size: 1.8rem; }
.sol-lead { margin: 0 auto 26px; max-width: 30em; color: #d6cbbd; line-height: 1.6; }
.sol-small { margin: 18px 0 0; font-size: .74rem; letter-spacing: .1em; color: var(--ash); }
.sol-btns { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; }
.sol-btn { min-height: 48px; padding: 0 28px; border: 1px solid rgba(236, 227, 214, .35); background: transparent; color: var(--bone); font: 700 .78rem/1 var(--display); font-stretch: 115%; letter-spacing: .22em; text-transform: uppercase; cursor: pointer; transition: background .2s, border-color .2s, transform .2s; }
.sol-btn:hover { border-color: var(--bone); background: rgba(236, 227, 214, .06); }
.sol-primary { background: var(--vermilion); border-color: var(--vermilion); color: #fff; }
.sol-primary:hover { background: #ff5338; border-color: #ff5338; transform: translateY(-1px); }
.sol-prog { width: 220px; height: 3px; margin: 0 auto; background: rgba(236, 227, 214, .12); overflow: hidden; }
.sol-prog i { display: block; height: 100%; width: 0; background: var(--vermilion); transition: width .2s; }
.sol-result { display: flex; justify-content: center; gap: 34px; margin: 0 0 28px; }
.sol-result div { display: flex; flex-direction: column-reverse; }
.sol-result dt { font-size: .66rem; letter-spacing: .24em; text-transform: uppercase; color: var(--ash); }
.sol-result dd { margin: 0; font-family: var(--serif); font-size: 2rem; }
/* APOC Rewards: Cosmic Coins */
.sol-rw { margin: -10px auto 26px; max-width: 30em; font-size: .86rem; line-height: 1.6; color: #d6cbbd; }
.sol-rw b { font-weight: 700; font-stretch: 112%; letter-spacing: .08em; color: var(--vermilion); }
.sol-rw-link { color: var(--bone); text-decoration: underline; text-underline-offset: 2px; }
.sol-rw-link:hover { color: #fff; }
.sol-rw-hint[hidden] { display: none; }

/* ---------- settings panel ---------- */
.sol-panel { position: absolute; top: 0; right: 0; bottom: 0; z-index: 50; width: min(360px, 92vw); overflow-y: auto; padding: 18px 22px 30px; background: rgba(16, 10, 9, .95); backdrop-filter: blur(10px); border-left: 1px solid var(--rule); box-shadow: -20px 0 60px rgba(0, 0, 0, .5); transform: translateX(105%); transition: transform .38s cubic-bezier(.2, .7, .2, 1); user-select: auto; }
.sol-panel.show { transform: none; }
.sol-panel[hidden] { display: none; }
.sol-panel-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.sol-panel h2 { margin: 0; font-family: var(--serif); font-style: italic; font-weight: 500; font-size: 1.7rem; }
.sol-panel h3 { margin: 22px 0 10px; font-size: .66rem; letter-spacing: .26em; text-transform: uppercase; color: var(--vermilion); font-weight: 700; }
.sol-x { width: 38px; height: 38px; border: 1px solid var(--rule); border-radius: 50%; background: none; color: var(--bone); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.sol-x svg { width: 16px; height: 16px; stroke: currentColor; stroke-width: 1.8; fill: none; }
.sol-field { display: flex; align-items: center; gap: 12px; margin: 0 0 12px; font-size: .78rem; color: var(--ash); }
.sol-field span { min-width: 66px; }
.sol-field select { flex: 1; min-height: 38px; background: var(--soot); color: var(--bone); border: 1px solid var(--rule); padding: 0 10px; font: 500 .86rem var(--display); }
.sol-field input[type=range] { flex: 1; accent-color: var(--vermilion); }
.sol-check { display: flex; align-items: center; gap: 10px; margin: 0 0 12px; font-size: .86rem; cursor: pointer; }
.sol-check input { accent-color: var(--vermilion); width: 16px; height: 16px; }
.sol-seg { display: flex; border: 1px solid var(--rule); margin: 0 0 10px; }
.sol-seg button { flex: 1; min-height: 36px; border: 0; background: none; color: var(--ash); font: 600 .7rem var(--display); letter-spacing: .12em; text-transform: uppercase; cursor: pointer; }
.sol-seg button.on { background: var(--bone); color: var(--night); }
.sol-note { margin: 4px 0 10px; font-size: .74rem; line-height: 1.5; color: var(--ash); }
.sol-link { border: 0; background: none; padding: 0; color: var(--bone); text-decoration: underline; cursor: pointer; font: inherit; }
.sol-backs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 6px 0 12px; }
.sol-backopt { min-width: 0; width: 100%; padding: 0; border: 0; background: none; color: var(--ash); cursor: pointer; font-size: .62rem; letter-spacing: .06em; text-align: center; }
.sol-backopt img { display: block; width: 100%; height: auto; max-width: 100%; aspect-ratio: 5 / 7; object-fit: cover; border-radius: var(--radius); box-shadow: 0 4px 12px rgba(0, 0, 0, .5); outline: 2px solid transparent; outline-offset: 2px; transition: outline-color .2s, transform .2s; }
.sol-backopt span { display: block; margin-top: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sol-backopt:hover img { transform: translateY(-2px); }
.sol-backopt.on img { outline-color: var(--vermilion); }
.sol-backopt.on span { color: var(--bone); }
.sol-upload { display: inline-block; margin: 2px 0 6px; padding: 10px 14px; border: 1px dashed rgba(236, 227, 214, .3); font-size: .78rem; cursor: pointer; }
.sol-upload:hover { border-color: var(--bone); }
.sol-statlist { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 16px; margin: 0; }
.sol-statlist div { display: flex; flex-direction: column-reverse; }
.sol-statlist dt { font-size: .62rem; letter-spacing: .2em; text-transform: uppercase; color: var(--ash); }
.sol-statlist dd { margin: 0; font-family: var(--serif); font-size: 1.3rem; }

.sol-toast { position: absolute; left: 50%; bottom: 46px; z-index: 70; transform: translate(-50%, 20px); padding: 10px 18px; background: rgba(16, 10, 9, .92); border: 1px solid var(--rule); font-size: .82rem; opacity: 0; pointer-events: none; transition: opacity .3s, transform .3s; }
.sol-toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 700px) {
  .sol-hud { grid-template-columns: auto 1fr; padding: 8px 10px; }
  .sol-brand b { display: none; }
  .sol-brand i { font-size: 1.1rem; }
  .sol-stats { display: none; }
  .sol-tools button { width: 36px; height: 36px; }
  .sol-foot { font-size: .58rem; padding: 6px 10px 10px; }
  .sol-foot .sol-track { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .sol-light { animation: none; }
  .sol-c, .sol-flip { transition-duration: .01s !important; }
}

/* ================= APOC Poker – the table ================= */
.pk-room { position: relative; z-index: 5; flex: 1; min-height: 0; }
.pk-felt {
  position: absolute; border-radius: 50%; z-index: 0;
  background: radial-gradient(ellipse at 50% 38%, #4a1b14 0%, #34120d 42%, #1d0a07 78%, #120605 100%);
  box-shadow: 0 30px 80px rgba(0, 0, 0, .7), inset 0 0 70px rgba(0, 0, 0, .65), inset 0 2px 0 rgba(255, 210, 170, .08);
}
.pk-felt::before { /* felt grain */
  content: ""; position: absolute; inset: 0; border-radius: 50%; opacity: .5; mix-blend-mode: overlay;
  background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='1.1' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 .6  0 0 0 0 .4  0 0 0 0 .35  0 0 0 .6 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}
.pk-felt-rim { position: absolute; inset: -14px; border-radius: 50%; border: 14px solid #1a0f0c; box-shadow: inset 0 0 0 1px rgba(201, 162, 74, .35), 0 0 0 1px rgba(0, 0, 0, .8), inset 0 6px 12px rgba(255, 220, 180, .06); pointer-events: none;
  background: none; }
.pk-felt-rim::after { content: ""; position: absolute; inset: 10px; border-radius: 50%; border: 1px solid rgba(201, 162, 74, .22); }
.pk-felt-mark { position: absolute; left: 0; right: 0; top: 64%; text-align: center; font-weight: 900; font-stretch: 125%; letter-spacing: .5em; font-size: clamp(.55rem, 1.1vw, .9rem); color: rgba(236, 227, 214, .07); pointer-events: none; }

/* seats */
.pk-seat { position: absolute; left: 0; top: 0; z-index: 30; width: 0; height: 0; transition: transform .6s cubic-bezier(.2, .7, .2, 1); }
.pk-seat > * { position: absolute; transform: translateX(-50%); left: 0; }
.pk-ava { width: clamp(42px, 4.6vw, 62px); height: clamp(42px, 4.6vw, 62px); top: calc(clamp(42px, 4.6vw, 62px) * -.62); border-radius: 50%; box-shadow: 0 6px 18px rgba(0, 0, 0, .6); transition: box-shadow .3s, filter .3s; }
.pk-ava svg { width: 100%; height: 100%; display: block; }
.pk-plate { top: calc(clamp(42px, 4.6vw, 62px) * .42); min-width: 108px; padding: 5px 12px 6px; text-align: center; white-space: nowrap; background: rgba(13, 10, 9, .86); border: 1px solid var(--rule); border-radius: 3px; box-shadow: 0 6px 16px rgba(0, 0, 0, .5); }
.pk-plate b { display: block; font-family: var(--serif); font-style: italic; font-weight: 500; font-size: .95rem; line-height: 1.15; }
.pk-plate .pk-stack { font-size: .74rem; letter-spacing: .1em; color: #e5c77e; font-variant-numeric: tabular-nums; }
.pk-status { top: calc(clamp(42px, 4.6vw, 62px) * -.62 - 22px); font-size: .62rem; letter-spacing: .2em; text-transform: uppercase; color: var(--ash); white-space: nowrap; }
.pk-handname { top: calc(clamp(42px, 4.6vw, 62px) * .42 + 48px); font-family: var(--serif); font-style: italic; font-size: .86rem; color: var(--bone); white-space: nowrap; text-shadow: 0 2px 8px #000; }
.pk-me .pk-handname { top: calc(clamp(42px, 4.6vw, 62px) * .42 + 48px); }
.pk-turn .pk-ava { box-shadow: 0 0 0 2px var(--vermilion), 0 0 26px rgba(228, 64, 40, .7); animation: pk-pulse 1.4s ease-in-out infinite; }
.pk-turn .pk-status { color: var(--vermilion); }
@keyframes pk-pulse { 50% { box-shadow: 0 0 0 2px var(--vermilion), 0 0 10px rgba(228, 64, 40, .3); } }
.pk-folded .pk-ava, .pk-folded .pk-plate { filter: grayscale(.8) brightness(.55); }
.pk-out { opacity: .35; }
.pk-allin .pk-plate { border-color: rgba(228, 64, 40, .6); }
.pk-win .pk-ava { box-shadow: 0 0 0 2px #e5c77e, 0 0 34px rgba(229, 199, 126, .75); }
.pk-win .pk-status { color: #e5c77e; }

/* bets, chips, pot, dealer */
.pk-bet { position: absolute; left: 0; top: 0; z-index: 25; display: flex; align-items: center; gap: 6px; translate: -50% -50%; transition: transform .5s cubic-bezier(.3, .7, .2, 1), opacity .3s; font-size: .76rem; font-variant-numeric: tabular-nums; color: var(--bone); text-shadow: 0 1px 4px #000; pointer-events: none; }
.pk-bet:empty { display: none; }
.pk-bet.pk-sweep { transition-duration: .45s; opacity: .2; }
.pk-chipstack { position: relative; display: inline-block; width: 22px; height: 26px; }
.pk-chip { position: absolute; left: 0; bottom: calc(var(--k) * 3px); width: 22px; height: 9px; border-radius: 50%; box-shadow: 0 1px 0 rgba(0, 0, 0, .55), inset 0 -1px 0 rgba(0, 0, 0, .35);
  background: repeating-conic-gradient(from 0deg, var(--c1) 0 30deg, var(--c2) 30deg 45deg); }
.pk-chip::after { content: ""; position: absolute; inset: 2px 5px; border-radius: 50%; background: var(--c1); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .25); }
.pk-bone { --c1: #e9e0d0; --c2: #8e1714; }
.pk-red { --c1: #a3161a; --c2: #ece3d6; }
.pk-black { --c1: #1b1514; --c2: #c9a24a; }
.pk-gold { --c1: #c9a24a; --c2: #1b1514; }
.pk-pot { position: absolute; left: 0; top: 0; z-index: 26; display: flex; flex-direction: column; align-items: center; gap: 4px; translate: -50% -100%; pointer-events: none; }
.pk-pot[hidden] { display: none; }
.pk-pot-chips .pk-chipstack { transform: scale(1.3); }
.pk-pot-label { font-size: .7rem; letter-spacing: .22em; text-transform: uppercase; color: var(--ash); white-space: nowrap; }
.pk-pot-label b { font-family: var(--serif); font-size: 1.15rem; letter-spacing: 0; color: #e5c77e; margin-left: 4px; font-weight: 500; }
.pk-dealer { position: absolute; left: 0; top: 0; z-index: 27; width: 26px; height: 26px; margin: -13px 0 0 -13px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fff, #e6dccb 60%, #b9ad98); color: #1b1514; font: 900 .72rem/26px var(--display); text-align: center; box-shadow: 0 3px 8px rgba(0, 0, 0, .6); transition: transform .7s cubic-bezier(.2, .7, .2, 1); }

/* cards on the table */
.pk-c { z-index: 40; transform-origin: 50% 50%; transition-property: transform, opacity, filter; }
.pk-c.pk-dim { filter: brightness(.45) saturate(.6); }
.pk-c.pk-best .sol-face { box-shadow: 0 0 0 2px #e5c77e, 0 0 22px rgba(229, 199, 126, .6); }

.pk-banner { position: absolute; left: 50%; bottom: 6%; z-index: 55; translate: -50% 0; max-width: 92%; padding: 10px 22px; background: rgba(13, 10, 9, .9); border: 1px solid rgba(229, 199, 126, .35); font-family: var(--serif); font-style: italic; font-size: clamp(.95rem, 1.6vw, 1.25rem); text-align: center; color: var(--bone); box-shadow: 0 12px 40px rgba(0, 0, 0, .6); opacity: 0; }
.pk-banner.show { animation: pk-banner .6s ease forwards; }
@keyframes pk-banner { from { opacity: 0; translate: -50% 10px; } to { opacity: 1; translate: -50% 0; } }

/* action bar */
.pk-actions { position: relative; z-index: 45; display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 10px 18px; padding: 10px clamp(10px, 2.4vw, 26px) 4px; }
.pk-wait { grid-column: 1 / -1; min-height: 1.2em; text-align: center; font-family: var(--serif); font-style: italic; color: var(--ash); font-size: .92rem; }
.pk-actions.pk-myturn .pk-wait { display: none; }
.pk-raise { display: flex; flex-direction: column; gap: 8px; max-width: 520px; width: 100%; justify-self: end; }
.pk-raise[hidden] { visibility: hidden; display: flex; }
.pk-presets { display: flex; gap: 4px; }
.pk-presets button { flex: 1; min-height: 32px; border: 1px solid var(--rule); background: rgba(13, 10, 9, .6); color: var(--ash); font: 600 .66rem var(--display); letter-spacing: .12em; text-transform: uppercase; cursor: pointer; }
.pk-presets button:hover:not(:disabled) { color: var(--bone); border-color: rgba(236, 227, 214, .4); }
.pk-slider { width: 100%; accent-color: var(--vermilion); }
.pk-btns { display: flex; gap: 8px; }
.pk-btn { min-height: 54px; min-width: 132px; padding: 0 20px; border: 1px solid rgba(236, 227, 214, .35); background: rgba(13, 10, 9, .7); color: var(--bone); font: 700 .78rem/1.1 var(--display); font-stretch: 112%; letter-spacing: .14em; text-transform: uppercase; cursor: pointer; transition: background .2s, border-color .2s, transform .2s, opacity .2s; }
.pk-btn:hover:not(:disabled) { border-color: var(--bone); background: rgba(236, 227, 214, .07); }
.pk-btn.pk-primary { background: var(--vermilion); border-color: var(--vermilion); color: #fff; }
.pk-btn.pk-primary:hover:not(:disabled) { background: #ff5338; }
.pk-btn[hidden] { display: none; }
.pk-btn kbd { display: inline-block; margin-left: 6px; padding: 1px 5px; border: 1px solid currentColor; border-radius: 3px; font: 600 .58rem var(--display); opacity: .55; }
.pk-actions button:disabled, .pk-actions input:disabled { opacity: .32; cursor: default; }
.pk-actions:not(.pk-myturn) .pk-raise, .pk-actions:not(.pk-myturn) .pk-btns { opacity: .55; }

/* start screen extras */
.pk-opp-label { margin: 4px 0 8px; font-size: .66rem; letter-spacing: .26em; text-transform: uppercase; color: var(--ash); }
.pk-oppseg { max-width: 300px; margin: 0 auto 16px; }
.pk-faces { display: flex; justify-content: center; gap: 12px; margin: 0 0 24px; flex-wrap: wrap; }
.pk-face { display: flex; flex-direction: column; align-items: center; gap: 4px; width: 74px; opacity: .25; transition: opacity .3s, transform .3s; }
.pk-face.on { opacity: 1; transform: translateY(-2px); }
.pk-face svg { width: 48px; height: 48px; }
.pk-face small { font-size: .6rem; letter-spacing: .06em; color: var(--ash); text-align: center; line-height: 1.2; }
.pk-ranks { list-style: none; counter-reset: r; margin: 0 auto 18px; padding: 0; max-width: 380px; text-align: left; }
.pk-ranks li { counter-increment: r; display: flex; gap: 12px; align-items: baseline; padding: 6px 0; border-bottom: 1px solid var(--rule); }
.pk-ranks li::before { content: counter(r); width: 20px; color: var(--vermilion); font-size: .7rem; }
.pk-ranks b { font-family: var(--serif); font-style: italic; font-weight: 500; font-size: 1.05rem; min-width: 140px; }
.pk-ranks span { font-size: .76rem; color: var(--ash); }
.pk-small { font-size: .8rem; }
.pk-small-dd { font-size: 1.05rem !important; max-width: 220px; }

@media (max-width: 700px) {
  .pk-actions { grid-template-columns: 1fr; padding: 6px 8px 2px; }
  .pk-raise { justify-self: stretch; max-width: none; }
  .pk-btns { justify-content: stretch; }
  .pk-btn { flex: 1; min-width: 0; min-height: 48px; padding: 0 8px; font-size: .68rem; letter-spacing: .08em; }
  .pk-btn kbd { display: none; }
  .pk-plate { min-width: 0; padding: 3px 8px 4px; }
  .pk-plate b { font-size: .78rem; }
  .pk-plate .pk-stack { font-size: .64rem; }
  .pk-info .pk-nextlvl, .pk-info .pk-lvl-dot { display: none; }
  .pk .sol-hud { grid-template-columns: auto 1fr; row-gap: 4px; }
  .pk .sol-hud .pk-info { display: flex; grid-column: 1 / -1; order: 3; justify-content: center; font-size: .62rem; }
  .pk .sol-tools { justify-content: flex-end; }
  .pk-status { font-size: .54rem; letter-spacing: .12em; }
  .pk-felt-rim { inset: -8px; border-width: 8px; }
}

/* ---------- Cosmic Coins: modes on the start screen ---------- */
.pk-modeseg { max-width: 30em; margin: 0 auto 22px; }
.pk-buyinseg { max-width: 22em; margin: 0 auto 16px; }
.pk-coinfacts { margin: 6px auto 20px; }
.pk-why { color: #e8a090; }
a.sol-btn { display: inline-flex; align-items: center; justify-content: center; text-decoration: none; }
.sol-btn:disabled { opacity: .42; cursor: default; }
.pk-drawn { margin-top: 6px; }
