/* Native card art lives inside presentation layers; transforms/motion keep their owners. */
:root{--card-paper:#FAFAF5;--card-black:#1B1E1F;--card-red:#D94F70;--card-highlight:#F2C14E}
.native-card-art{display:block!important;width:100%!important;height:100%!important;object-fit:fill;pointer-events:none;user-select:none;border-radius:inherit}
.hero-playing-card{height:calc(var(--card-w)*1.5);background:var(--card-paper);border:1px solid #0000001f;border-radius:calc(var(--card-w)*.0833);box-shadow:1px 2px 0 #aaa99d,5px 15px 26px #0006;overflow:hidden}
.hero-playing-card.back{background:#0F2830;border:3px solid #EFE6CE;border-radius:calc(var(--card-w)*.125);box-shadow:1px 2px 0 #aaa99d,5px 15px 26px #0006}
.hero-playing-card.back::before{content:none}.hero-playing-card.back .native-card-art{object-fit:cover}
.games-section .game-mini-art .mini-card{height:108px;background:var(--card-paper);border:1px solid #0000001f;border-radius:6px;box-shadow:0 2px 4px #0004;overflow:hidden}
.games-section .game-mini-art .mini-card.back,.games-section .game-mini-art .flip-back{background:var(--game-back);border:3px solid var(--game-trim);border-radius:9px;box-shadow:0 2px 4px #0004}
.games-section .game-mini-art .mini-card.flip-card{background:transparent;border:0;overflow:visible;box-shadow:none}
.flip-front{background:var(--card-paper);border:1px solid #0000001f;border-radius:6px;overflow:hidden;box-shadow:0 2px 4px #0004}
.flip-back{overflow:hidden}.mini-card.back .native-card-art,.flip-back .native-card-art{object-fit:cover}
.learn-card{width:61px;height:91px;background:var(--card-paper);border:1px solid #0000001f;border-radius:5px;box-shadow:0 2px 5px #0004;overflow:hidden;padding:0;font-size:inherit}
.learn-card.red{color:var(--card-red)}.learn-table{height:360px}.card-slot{width:61px;height:91px}
.learn-hand .learn-card{width:42px;height:63px;border-radius:4px}.learn-hand .learn-card:disabled{opacity:.35}.learn-hand .learn-card[aria-pressed=true]{outline:2px solid var(--card-highlight)}
.played-card.winning .learn-card{outline:2px solid var(--card-highlight)}
.partner-options .learn-card{width:68px;height:102px;border-radius:6px}
.step-deck{height:60px;background:#0F2830;border:2px solid #EFE6CE;border-radius:5px;overflow:hidden}.step-deck .native-card-art{object-fit:cover}
.mini-hand{display:flex;justify-content:center;gap:8px;background:transparent!important;padding:0!important;transform:none!important}.practice-native-card{display:block;width:48px;height:72px;border:1px solid #0000001f;border-radius:4px;overflow:hidden;box-shadow:0 3px 8px #0005}.practice-native-card:first-child{transform:rotate(-10deg)}.practice-native-card:last-child{transform:rotate(8deg)}
@media(max-width:700px){.games-section .game-mini-art .mini-card{height:90px}.learn-table{height:290px}.learn-card,.card-slot{width:42px;height:63px}.learn-hand .learn-card{width:38px;height:57px}.kt-call .learn-card{width:40px;height:60px}}
@media(max-width:360px){.learn-table{height:272px}.learn-card,.card-slot{width:37px;height:55.5px}.learn-hand .learn-card{width:34px;height:51px}}

/* The angle/deal wrapper stays separate from the two-sided face turn. */
.hero-playing-card:not(.back){overflow:visible;background:transparent;border:0;box-shadow:none;transform-style:preserve-3d}
.card-turn{display:block;position:relative;width:100%;height:100%;border-radius:inherit;transform-style:preserve-3d;transform-origin:center}
.card-side{position:absolute;inset:0;display:block;border-radius:inherit;border:1px solid #0000001f;background:var(--card-paper);overflow:hidden;backface-visibility:hidden;-webkit-backface-visibility:hidden;box-shadow:0 2px 5px #0004}
.card-side-front{transform:translateZ(.2px)}.card-side-back{transform:rotateY(180deg);border:3px solid #EFE6CE;background:#0F2830;border-radius:inherit}.card-side-back .native-card-art{object-fit:cover}
.hero-playing-card .card-side{box-shadow:1px 2px 0 #aaa99d,5px 15px 26px #0006}.hero-playing-card .card-side-back{border-radius:calc(var(--card-w)*.125)}
.card-sheen{position:absolute;inset:-10%;pointer-events:none;background:linear-gradient(110deg,transparent 36%,#ffffff90 50%,transparent 64%);transform:translateX(-125%);opacity:0}
.games-section .game-mini-art .revealing-card{background:transparent;border:0;overflow:visible;box-shadow:none}
html[data-motion=active] [data-card-pending=true] .card-turn{transform:rotateY(180deg)}
.deal-ripple{position:absolute;inset:10%;border-radius:50%;border:1px solid #F0C051;opacity:0;pointer-events:none}
html[data-reduced=true] .card-turn{transform:none!important}html[data-reduced=true] .card-sheen,html[data-reduced=true] .deal-ripple{display:none}
@media(prefers-reduced-motion:reduce){.card-turn{transform:none!important}.card-sheen,.deal-ripple{display:none}}
.world-scene .scene-caption{left:50%;transform:translateX(-50%);padding-right:0;text-align:center;max-width:calc(100% - 110px);bottom:3px;font-size:12px;line-height:1.4}.world-scene .scene-caption span{display:none}
@media(max-width:700px){.world-scene .scene-caption{max-width:calc(100% - 100px);bottom:-5px;font-size:11px}}

/* Coating covers artwork only; grain particles stay inside the same rounded card. */
.hero-seats{display:none!important}
.sand-coat,.sand-grains{position:absolute;inset:0;width:100%;height:100%;border-radius:inherit;display:none}
.sand-grains{pointer-events:none}
html[data-motion=active] .world-scene[data-dust=waiting] .card-side-front:not(:has(.sand-coat[data-revealed=true]))::after{content:'';position:absolute;inset:0;background:#0F2830 url('/assets/cards/mk-back.png') center/cover no-repeat;pointer-events:none}
.world-scene[data-dust=ready] .sand-coat,.world-scene[data-dust=ready] .sand-grains{display:block}
/* Vertical swipes and pinch stay browser-owned; horizontal strokes brush the artwork. */
.sand-coat{touch-action:pan-y pinch-zoom}
body:has(:focus-visible) .world-scene .sand-coat,body:has(:focus-visible) .world-scene .sand-grains{display:none}
body:has(:focus-visible) .world-scene .card-side-front::after{content:none}
html[data-reduced=true] .sand-coat,html[data-reduced=true] .sand-grains{display:none!important}
@media(prefers-reduced-motion:reduce){.sand-coat,.sand-grains{display:none!important}}
/* A dedicated lower strip keeps mobile captions/pause clear of the card fan. */
@media(max-width:700px){.world-scene{height:282px}.world-scene .scene-caption{left:0;transform:none;text-align:left;max-width:calc(100% - 116px);bottom:-1px}}
@media(max-width:360px){.world-scene{height:268px}}
.world-scene .scene-caption{left:0;transform:none;text-align:center;width:calc(100% - 126px);max-width:calc(100% - 126px)}
@media(min-width:701px) and (max-width:1000px){.world-scene{height:394px}}
@media(max-width:700px){.world-scene .scene-caption{text-align:left;width:calc(100% - 116px);max-width:calc(100% - 116px)}}

.world-scene>.sand-grains{border-radius:0;z-index:4;pointer-events:none}

.sand-coat[data-revealed=true]{display:none!important}

/* No preview controls: the caption owns its full lower strip. */
.world-scene .scene-caption{left:0;transform:none;padding-right:0;text-align:center;width:100%;max-width:100%;font-size:12px;bottom:0}
@media(max-width:700px){.world-scene .scene-caption{width:100%;max-width:100%;text-align:center;font-size:11px;bottom:-1px}}
