/* Original mobile shell; upstream card art retains its complete printed face. */
html:has(.pokemon-game),body:has(.pokemon-game){height:100%;overflow:hidden;overscroll-behavior:none}
.pokemon-game{--pk-lime:#dfff00;--pk-muted:#a9adb4;position:fixed;inset:0;margin:0 auto;width:100%;max-width:none;height:100dvh;padding:0;color:#f5f6f2;background:#131518;overflow:hidden;font-family:system-ui,-apple-system,'Noto Sans SC',sans-serif}
.pokemon-game *{box-sizing:border-box}
.pokemon-game button{font:inherit;cursor:pointer;color:inherit;touch-action:manipulation}
.pokemon-game button:disabled{cursor:default;opacity:.43}
.pokemon-game button:focus-visible,.pokemon-game a:focus-visible{outline:2px solid var(--pk-lime);outline-offset:2px}
.pk-frame{height:100%;width:min(100%,580px);margin:auto;display:grid;grid-template-rows:auto minmax(0,1fr) auto;min-height:0;background:radial-gradient(ellipse at 0 0,#2c3236 0,transparent 55%),linear-gradient(135deg,#1f2428,#14181b);border-inline:1px solid #3d454c;box-shadow:0 0 50px #0007}
.pk-header{padding:calc(8px + env(safe-area-inset-top)) 10px 0;min-width:0;border-bottom:1px solid #454d53;background:linear-gradient(120deg,#252b2f,#181c20);box-shadow:0 2px 8px #0003}
.pk-title{display:flex;align-items:center;gap:7px;min-height:34px}
.pk-title h1{font-size:17px;font-weight:900;letter-spacing:-.5px;margin:0;white-space:nowrap}
.pk-title>.pk-ball{width:23px;height:23px;flex:none}
.pk-title>small{font-size:10px;margin-left:auto;color:#b1b5bd;white-space:nowrap}
.pk-icon-button{display:grid;place-items:center;flex:none;width:30px;min-height:32px;padding:0;border:1px solid #42474f;border-radius:6px;background:#292d33;font-weight:700;font-size:21px!important}
.pk-icon-button>svg{display:block;width:18px;height:18px}
.pk-players{display:grid;grid-auto-flow:column;grid-auto-columns:minmax(0,1fr);gap:5px;margin-top:8px}
.pk-player{display:flex;align-items:center;min-width:0;gap:5px;padding:6px 5px;border:1px solid #434c54;border-radius:8px;background:linear-gradient(145deg,#30373d,#1c2126);box-shadow:inset 0 1px #ffffff08,0 2px 3px #0003;text-align:left}
.pk-player.active{border-color:var(--pk-lime);box-shadow:inset 0 0 14px #dfff001a,0 0 0 1px #dfff00a0,0 0 12px #dfff002b}
.pk-player>span:last-child{font-size:10px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;min-width:0}
.pk-player b{display:block;font-size:17px;line-height:1.25}
.pk-player b small{font-size:10px;font-weight:400}
.pk-player.self b{color:var(--pk-lime)}
.pk-player .player-avatar{width:29px;height:29px;min-width:29px;border-radius:6px;border:0;padding:0}
.pk-turn{display:flex;align-items:center;gap:7px;min-height:34px;font-size:11px;min-width:0}
.pk-turn>strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;flex:1}
.pk-turn>strong:before{content:"";display:inline-block;width:8px;height:8px;border:1px solid #edff91;border-radius:100%;background:var(--pk-lime);box-shadow:0 0 0 2px #dfff0025,0 0 7px #dfff0055;margin-right:7px}
.pk-turn>small{color:#b9bdc4;font-size:9px;white-space:nowrap}
.pk-clock{color:var(--pk-lime);font-variant-numeric:tabular-nums;font-size:16px;font-weight:800}
.pk-clock.urgent{color:#ff9393}
.pk-log-button{border:0;background:none;color:#c8ccd3!important;font-size:10px!important;padding:6px 2px;min-height:30px}
.pk-network{font-size:11px;color:#ffc984;margin:0 0 6px}
.pk-market{margin:0!important;padding:8px!important;min-height:0;overflow:auto;overscroll-behavior:contain;scrollbar-width:thin;scrollbar-color:#525963 transparent;display:block!important}
.pk-market-row{display:grid;grid-template-columns:26px repeat(4,minmax(0,1fr));gap:5px;margin-bottom:7px;align-items:start}
.pk-pile{display:flex;align-items:center;flex-direction:column;gap:4px;padding-top:3px}
.pk-pile>b{font-size:10px;white-space:nowrap}
.pk-pile>button{border:1px solid #59616c;background:#323842;border-radius:4px;padding:1px;width:26px;min-height:36px;margin-top:4px;box-shadow:-2px 2px #424954,-4px 4px #2f343d}
.pk-pile img{display:block;width:100%;border-radius:2px}
.pk-pile small{color:#bfc5cc;font-size:11px;font-weight:700}
.pk-card{position:relative;display:block;width:100%;padding:0;border:1px solid #9299a1;border-radius:6px;background:#222830;overflow:hidden;box-shadow:0 2px 5px #0007,inset 0 1px #fff3;min-width:0;aspect-ratio:560/747}
.pk-card img{display:block;width:100%;height:100%;object-fit:contain}
.pk-card.affordable{border-color:var(--pk-lime);box-shadow:0 0 0 1px #dfff0050}
.pk-afford{position:absolute;right:0;top:0;font-size:8px;font-weight:800;background:var(--pk-lime);color:#1a2100;border-radius:0 0 0 4px;padding:3px 4px;box-shadow:0 2px 5px #0004}
.pk-empty-card{display:grid;place-items:center;aspect-ratio:560/747;border:1px dashed #444b55;border-radius:6px;color:#67707b}
.pk-special{display:grid;grid-template-columns:1fr 1fr;gap:7px;margin-left:0}
.pk-special>section{display:flex;align-items:center;gap:5px;min-width:0;border:1px solid #46505a;border-radius:7px;padding:4px;background:linear-gradient(130deg,#262b32,#161b20);box-shadow:inset 0 1px #ffffff06}
.pk-special-label{display:flex;flex:1;flex-direction:column;gap:5px;font-size:11px;min-width:24px;align-items:center}
.pk-special-label>b{color:#d2afff}
.pk-special>section:last-child .pk-special-label>b{color:#ffbf69}
.pk-special-label small{font-size:10px;color:#acb3bd}
.pk-special .pk-card,.pk-special .pk-empty-card{width:70px;flex:none}
.pk-dock{border-top:1px solid #46505a;background:linear-gradient(125deg,#282e34,#1b2025);padding:5px 7px calc(6px + env(safe-area-inset-bottom));max-height:49dvh;overflow:auto;overscroll-behavior:contain;min-height:0;box-shadow:0 -4px 15px #0005}
.pk-bank{padding:5px 7px 2px;border:1px solid #434d57;border-radius:7px;background:linear-gradient(120deg,#ffffff03,#00000015)}
.pk-section-heading,.pk-personal-heading{display:flex;align-items:center;gap:6px}
.pk-section-heading h2,.pk-personal h2{font-size:12px;margin:0;line-height:1.4}
.pk-section-heading>small{color:var(--pk-muted);font-size:9px;margin-left:auto}
.pk-bank-balls{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:4px;margin:3px 0}
.pk-bank-ball{position:relative;display:flex;flex-direction:column;align-items:center;gap:1px;border:1px solid transparent;background:transparent;border-radius:7px;padding:1px 0;min-width:0;transition:background .15s,border-color .15s}
.pk-bank-ball.selected{border-color:var(--pk-lime);background:linear-gradient(#dfff0020,#dfff0008);box-shadow:0 0 8px #dfff0014}
.pk-bank-ball>b{font-size:14px;line-height:1.1;font-variant-numeric:tabular-nums;text-shadow:0 1px 2px #000}
.pk-bank-ball>small{font-size:8px;white-space:nowrap;color:#c2c6cd}
.pk-bank-ball>em{position:absolute;right:0;top:0;min-width:16px;border-radius:8px;background:var(--pk-lime);color:#1e2400;font-size:11px;font-style:normal;font-weight:800}
.pk-ball{--ball-color:#f45854;display:inline-block;vertical-align:middle;flex:none;width:32px;height:32px;color:var(--ball-color);filter:drop-shadow(0 2px 2px #0006)}
.pk-ball>svg{display:block;width:100%;height:100%;overflow:visible}

.pk-blue{--ball-color:#32b9f5}.pk-black{--ball-color:#4e5462}.pk-pink{--ball-color:#ec9bbb}.pk-yellow{--ball-color:#f9d255}.pk-purple{--ball-color:#995ad6}
.pk-token-list{display:inline-flex;align-items:center;flex-wrap:wrap;gap:7px;min-width:0}
.pk-token-list>span{display:inline-flex;align-items:center;gap:2px;font-size:10px}
.pk-token-list .pk-ball{width:16px;height:16px;filter:none}

.pk-personal{border:1px solid #414b55;border-radius:7px;background:linear-gradient(120deg,#ffffff03,#00000012);padding:4px 7px;margin-top:4px}
.pk-personal>.pk-token-list{display:flex;min-height:18px;line-height:1.2}
.pk-personal-heading{margin-bottom:2px}
.pk-personal h2{margin-right:auto}
.pk-personal h2 small{font-size:10px;font-weight:500}
.pk-personal-heading>button{border:1px solid #4a525c;border-radius:4px;background:#292e35;font-size:10px;padding:5px 6px;min-height:30px;white-space:nowrap}
.pk-personal-heading b{color:var(--pk-lime)}
.pk-actions{display:flex;align-items:center;gap:8px;margin-top:4px;min-height:38px}
.pk-button{display:flex;justify-content:center;align-items:center;gap:5px;min-height:40px;padding:8px 14px;border:1px solid #7b8995;border-radius:7px;background:linear-gradient(120deg,#323940,#1d2329);box-shadow:inset 0 1px #ffffff0d;font-size:13px!important;font-weight:750!important}
.pk-button.primary{background:linear-gradient(125deg,#e9ff3a,#d7f700 80%);color:#192000;border-color:#eeff73;box-shadow:inset 0 1px #ffffb3,0 3px 12px #dfff0020;flex:1}
.pk-button>small{font-size:10px;font-weight:500;display:block}
.pk-waiting,.pk-spectator{font-size:11px;color:#c5cad2;text-align:center;width:100%;margin:2px 0;padding:3px;line-height:1.5}
.pk-overlay{position:absolute;inset:0;z-index:50;display:flex;align-items:flex-end;justify-content:center;background:#03060b99;backdrop-filter:blur(2px);padding-top:env(safe-area-inset-top)}
.pk-sheet{width:min(100%,580px);max-height:92%;display:flex;flex-direction:column;min-height:0;border:1px solid #66717b;border-bottom:0;border-radius:17px 17px 0 0;background:radial-gradient(ellipse at 0 0,#333b41,transparent 60%),linear-gradient(125deg,#242b30,#171d21);box-shadow:0 -14px 60px #0008,inset 0 1px #ffffff10;padding:8px 14px calc(12px + env(safe-area-inset-bottom))}
.pk-sheet:before{content:'';display:block;flex:none;align-self:center;width:40px;height:4px;border-radius:4px;background:#646b75;margin-bottom:10px}
.pk-sheet>header{display:flex;align-items:center;justify-content:space-between;gap:12px;padding-bottom:12px;flex:none}
.pk-sheet h2{font-size:20px;margin:0}
.pk-sheet h3{font-size:13px;margin:16px 0 9px}
.pk-sheet-scroll{min-height:0;overflow:auto;overscroll-behavior:contain;scrollbar-width:thin;padding:0 1px 4px}
.pk-sheet-actions{display:flex;gap:10px;padding-top:12px;flex:none}
.pk-sheet-actions>.pk-button{flex:1;min-height:46px;padding-inline:8px}
.pk-card-detail{display:grid;grid-template-columns:minmax(0,.85fr) minmax(0,1.15fr);gap:12px;align-items:start}
.pk-detail-figure{min-width:0;align-self:start;padding:2px;border:1px solid #9da7ae;border-radius:9px;background:#171d22;box-shadow:0 3px 14px #0005}
.pk-detail-art{display:block;width:100%;height:auto;object-fit:contain;border-radius:6px}
.pk-detail-copy{min-width:0}.pk-detail-copy>h3{font-size:22px;line-height:1.2;margin:4px 0 6px;overflow-wrap:anywhere}
.pk-detail-copy .pk-ball{width:20px;height:20px}

.pk-kicker{display:block;color:#b4bbc5;font-size:11px;letter-spacing:1px}
.pk-card-score{display:block;color:var(--pk-lime);font-size:31px;line-height:1.15;white-space:nowrap}
.pk-card-score small{font-size:16px}
.pk-detail-stats{display:flex;align-items:center;justify-content:space-between;gap:4px}
.pk-detail-bonus{display:flex;align-items:center;gap:2px;font-size:11px;flex-wrap:wrap;justify-content:flex-end}.pk-detail-bonus>small{flex-basis:100%;text-align:right;font-size:9px;color:#c9cfd4}
.pk-evo-hint{display:flex;flex-direction:column;gap:5px;color:#c4cdd4;font-size:10px;line-height:1.5;border-block:1px solid #46515a;margin-top:10px;padding:9px 0}.pk-evo-hint>span{display:flex;gap:4px;align-items:center;flex-wrap:wrap}.pk-evo-hint b{color:#edf1ed}
.pk-payment{border:1px solid #4a5661;border-radius:6px;padding:2px 7px;margin-top:10px;background:#0d141940}
.pk-payment>div{display:flex;align-items:center;justify-content:space-between;gap:6px;padding:8px 0;font-size:10px}.pk-payment>div>span:first-child{flex:none}.pk-payment .pk-token-list{gap:4px}.pk-payment .pk-token-list>span{font-size:10px}.pk-payment .pk-ball{width:15px;height:15px}
.pk-payment .pk-token-list{justify-content:flex-end}
.pk-pay-total{border-top:1px solid #48505b;font-weight:700}
.pk-pay-total>b{color:#ffb7a5;font-size:11px}
.pk-detail-note{font-size:11px;line-height:1.7;color:#b5c0c8;margin:12px 0 0}
.pk-reserve-button>.pk-ball{width:24px;height:24px}.pk-reserve-button>span{display:flex;flex-direction:column;gap:2px}.pk-reserve-button small{font-size:9px;color:#aebcc6;font-weight:400}
.pk-muted{color:var(--pk-muted);font-size:11px;line-height:1.7;margin:10px 0}
.pk-inventory-summary{display:flex;justify-content:space-between;border-bottom:1px solid #4a515c;padding:8px 0 15px;font-size:12px}
.pk-inventory-summary b{color:var(--pk-lime);font-size:20px}
.pk-inventory{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
.pk-inventory>.pk-muted{grid-column:1/-1}
.pk-hidden-card{display:grid;place-items:center;aspect-ratio:560/747;border:1px solid #515a66;border-radius:7px;background:repeating-linear-gradient(45deg,#292f38,#292f38 7px,#303640 7px,#303640 9px);color:#7f8997;font-size:32px}
.pk-deck-detail{display:flex;align-items:center;gap:16px;font-size:13px;line-height:1.7}
.pk-deck-detail img{width:35%;max-height:30dvh;object-fit:contain;border-radius:7px}
.pk-evolutions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.pk-evolution{display:grid;grid-template-columns:1fr 24px 1fr;align-items:center;gap:3px;border:1px solid #53624c;border-radius:8px;padding:7px;background:#252d29}
.pk-evolution>img{width:100%;border-radius:3px}
.pk-evolution>strong{grid-column:1/-1;font-size:10px;margin-top:5px}
.pk-evolution>span{font-size:17px}.pk-evolution small{display:block;font-size:9px}.pk-evolution .pk-ball{width:17px;height:17px}
.pk-log{padding:0;list-style:none}.pk-log li{padding:10px 0;border-bottom:1px solid #414954}.pk-log small{font-size:10px;color:#a1aab6}.pk-log p{font-size:13px;line-height:1.6;margin:4px 0}
.pk-help{font-size:13px;line-height:1.85;color:#d0d5dc}.pk-help ul{padding-left:22px}.pk-help li{margin-bottom:10px}.pk-help a{color:var(--pk-lime);overflow-wrap:anywhere}.pk-help hr{border:0;border-top:1px solid #49515d;margin:18px 0}
.pk-results{padding:16px 6px 20px}.pk-results>h2{font-size:28px;margin:8px 0;color:var(--pk-lime)}.pk-results>p{font-size:12px;color:#bfc7d0;line-height:1.7}.pk-results article{display:grid;grid-template-columns:1fr auto;gap:8px;padding:13px;border:1px solid #454f5b;border-radius:7px;margin-bottom:7px;background:#2a3039}.pk-results article.self{border-color:var(--pk-lime)}.pk-results article small{grid-column:1/-1;color:#b2bac6}.pk-results article>strong{color:#e6eeac}
@media(min-width:760px){.pk-frame{width:580px}.pk-market-row{grid-template-columns:32px repeat(4,minmax(0,1fr));gap:8px}.pk-special{margin-left:0}.pk-special .pk-card{width:85px}.pk-title h1{font-size:21px}.pk-title>small{font-size:12px}.pk-player>span:last-child{font-size:12px}.pk-player .player-avatar{width:34px;height:34px}.pk-bank-ball>.pk-ball{width:34px;height:34px}}
@media(max-width:359px){.pk-title h1{font-size:14px}.pk-title{gap:4px}.pk-title>.pk-ball{width:18px;height:18px}.pk-title>small{font-size:9px}.pk-icon-button{width:27px;min-height:29px}.pk-header{padding-inline:7px}.pk-player .player-avatar{width:23px;height:23px;min-width:23px}.pk-player{gap:3px;padding-inline:3px}.pk-player>span:last-child{font-size:9px}.pk-market{padding:6px!important}.pk-market-row{gap:4px;grid-template-columns:24px repeat(4,minmax(0,1fr))}.pk-special{margin-left:0}.pk-special .pk-card{width:57px}.pk-dock{padding-inline:7px}.pk-sheet{padding-inline:10px}.pk-evolutions{grid-template-columns:1fr}.pk-card-detail{gap:10px}.pk-personal-heading>button{padding-inline:4px}.pk-personal h2{font-size:11px}}
@media(max-height:600px){.pk-header{padding-top:calc(4px + env(safe-area-inset-top))}.pk-players{margin-top:3px}.pk-player{padding-block:3px}.pk-player .player-avatar{width:25px;height:25px;min-width:25px}.pk-turn{min-height:28px}.pk-dock{padding-top:4px}.pk-bank-ball>.pk-ball{width:25px;height:25px}.pk-bank-ball{padding:1px 0}.pk-bank-balls{margin:3px 0}.pk-bank-ball>small{font-size:7px}.pk-actions{margin-top:4px;min-height:34px}.pk-actions .pk-button{min-height:34px;padding-block:5px}.pk-personal-heading{margin-bottom:1px}.pk-sheet{max-height:96%}}
@media(max-height:450px) and (min-width:600px){.pk-frame{width:min(100%,1000px);grid-template-columns:minmax(0,1fr) 230px;grid-template-rows:auto minmax(0,1fr)}.pk-header{grid-column:1/-1;padding-top:calc(3px + env(safe-area-inset-top))}.pk-title{min-height:30px}.pk-players{display:flex;position:absolute;top:6px;left:50%;transform:translateX(-50%);max-width:38%;margin:0}.pk-player{width:70px}.pk-player .player-avatar{display:none}.pk-player b{display:inline;font-size:12px;margin-left:5px}.pk-turn{min-height:27px}.pk-title>small{margin-left:0}.pk-title>.pk-icon-button:first-of-type{margin-left:auto}.pk-market{grid-column:1;grid-row:2}.pk-dock{grid-column:2;grid-row:2;max-height:none;border-left:1px solid #4c535d;border-top:0;display:flex;flex-direction:column}.pk-bank-balls{grid-template-columns:repeat(3,1fr)}.pk-section-heading>small{display:none}.pk-personal-heading{flex-wrap:wrap}.pk-personal-heading>h2{flex-basis:100%}.pk-actions{margin-top:auto}.pk-actions .pk-button{font-size:11px!important;padding-inline:7px}.pk-sheet{width:540px}.pk-detail-figure{max-width:155px;justify-self:center}}

/* Redrawn art has no baked-in values; live card data supplies the overlays. */
.pokemon-game h1,.pokemon-game h2,.pk-detail-copy>h3,.pk-showcase-caption>strong{font-family:'Kai Terminal Display','PingFang SC',system-ui,sans-serif;font-weight:900}
.pokemon-game button:disabled.pk-bank-ball{opacity:.72}
.pk-special>.has-showcase{align-items:stretch}
.has-showcase>.pk-special-label{flex:none;justify-content:center;width:25px;font-size:10px}
.pk-special .pk-card.pk-showcase{width:auto;flex:1;aspect-ratio:1.22;min-width:0;border-color:#b59acb}
.pk-special .pk-card.pk-showcase-legend{border-color:#c9a462}
.pk-showcase-art{position:absolute;inset:0;overflow:hidden}.pk-showcase-art>img{width:100%;height:100%;object-fit:cover;object-position:center 38%}
.pk-showcase:after{content:'';position:absolute;inset:0;pointer-events:none;background:linear-gradient(180deg,#050b2230,transparent 40%,#09101bc9 76%,#09101bf2)}
.pk-showcase-score{position:absolute;z-index:1;top:3px;left:4px;display:flex;gap:1px;align-items:baseline;font-size:21px;line-height:1;padding:3px 4px;background:#101925b8;border:1px solid #ffffff30;border-radius:4px;font-weight:800;text-shadow:0 1px 3px #000}
.pk-showcase-score>small{font-size:8px;font-weight:400}
.pk-showcase-bonus{position:absolute;z-index:1;top:5px;right:4px;display:flex;align-items:center;gap:1px;background:#1019259c;border-radius:12px;padding:1px 3px;font-size:8px}.pk-showcase-bonus>.pk-ball{width:17px;height:17px;filter:none}
.pk-showcase-caption{position:absolute;z-index:1;inset:auto 2px 4px;display:flex;flex-direction:column;gap:4px;align-items:center;text-shadow:0 1px 3px #000}
.pk-showcase-caption>strong{font-size:12px;line-height:1.2}
.pk-showcase-caption>.pk-token-list{justify-content:center;gap:3px;flex-wrap:nowrap}
.pk-showcase-caption .pk-token-list>span{font-size:9px;gap:1px}
.pk-showcase-caption .pk-ball{width:12px;height:12px}
.pk-showcase .pk-afford{top:auto;bottom:0;left:0;right:0;z-index:2;text-align:center;padding:1px;font-size:8px}
.pk-showcase.affordable .pk-showcase-caption{bottom:17px}
@media(min-width:760px){.pk-detail-copy>h3{font-size:28px}.pk-payment>div{font-size:12px}.pk-payment .pk-ball{width:18px;height:18px}.pk-showcase-caption>strong{font-size:15px}.pk-showcase-caption .pk-ball{width:15px;height:15px}}
@media(max-width:359px){.pk-card-detail{grid-template-columns:minmax(0,.8fr) minmax(0,1.2fr);gap:8px}.pk-detail-copy>h3{font-size:19px}.pk-detail-stats{align-items:flex-start}.pk-detail-bonus{font-size:10px}.pk-payment{padding-inline:5px}.pk-payment>div{gap:3px}.pk-payment .pk-token-list{gap:2px}.pk-payment .pk-ball{width:13px;height:13px}.pk-detail-copy .pk-kicker{font-size:9px}.pk-card-score{font-size:27px}.has-showcase>.pk-special-label{width:20px;min-width:20px;font-size:9px}.pk-special .pk-card.pk-showcase{aspect-ratio:1.08}.pk-showcase-caption .pk-ball{width:11px;height:11px}.pk-showcase-caption>.pk-token-list{gap:2px}.pk-showcase-caption>strong{font-size:11px}.pk-showcase-bonus{right:2px;padding:1px}.pk-showcase-score{font-size:18px;padding:2px}}

/* Use the actual space between header and dock, including browser/safe-area changes.
   Keep a readable minimum card height; very short screens scroll only the market. */
@media(max-width:599px){
  .pk-header{padding-top:calc(4px + env(safe-area-inset-top))}
  .pk-title{min-height:32px}
  .pk-players{margin-top:4px}
  .pk-player{padding-block:3px}
  .pk-player b{font-size:16px}
  .pk-player .player-avatar{width:26px;height:26px;min-width:26px}
  .pk-turn{min-height:28px}
  .pk-log-button{min-height:28px;padding-block:4px}
  .pk-dock{padding-top:4px}
  .pk-bank{padding:3px 5px 1px}
  .pk-bank-balls{gap:3px;margin:2px 0}
  .pk-bank-ball{display:grid;grid-template-columns:auto auto;justify-content:center;align-content:center;column-gap:3px;row-gap:0;min-height:44px;padding:2px 0}
  .pk-bank-ball>.pk-ball{width:26px;height:26px}
  .pk-bank-ball>small{grid-column:1/-1;font-size:8px;line-height:12px}
  .pk-bank-ball>em{top:-2px;right:-1px}
  .pk-personal{padding-block:3px;margin-top:3px}
  .pk-personal-heading{margin-bottom:0}
  .pk-personal-heading>button{padding-block:3px;min-height:27px}
  .pk-actions{margin-top:3px}
  .pk-actions .pk-button{min-height:38px;padding-block:6px}
  .pokemon-game[data-screen="playing-pokemon"] .pk-market{container-type:size;display:flex!important;flex-direction:column;justify-content:space-between;gap:6px}
  .pokemon-game[data-screen="playing-pokemon"] .pk-market-row{flex:none;height:clamp(80px,calc((100cqh - 108px)/3),calc((100cqw - 46px)*.33348));margin-bottom:0;align-items:center}
  .pokemon-game[data-screen="playing-pokemon"] .pk-market-row>.pk-card,
  .pokemon-game[data-screen="playing-pokemon"] .pk-market-row>.pk-empty-card{height:100%;width:auto;max-width:100%;justify-self:center}
  .pokemon-game[data-screen="playing-pokemon"] .pk-special{flex:none;height:clamp(90px,calc(100cqh - (100cqw - 46px)*1.00044 - 18px),130px)}
  .pokemon-game[data-screen="playing-pokemon"] .pk-special>section{min-height:0;padding:3px}
  .pokemon-game[data-screen="playing-pokemon"] .pk-special .pk-card,
  .pokemon-game[data-screen="playing-pokemon"] .pk-special .pk-empty-card{height:100%;width:auto;max-width:100%}
}

/* The same data-driven face is shared by market, inventory and detail views. */
.pk-card.pk-card-bonus-red{border-color:#e08480}.pk-card.pk-card-bonus-blue{border-color:#7cc9ea}.pk-card.pk-card-bonus-black{border-color:#aeb4c1}.pk-card.pk-card-bonus-pink{border-color:#e9a6c7}.pk-card.pk-card-bonus-yellow{border-color:#e3cc72}.pk-card.pk-card-bonus-purple{border-color:#b99cdb}
.pk-card.pk-showcase.affordable{border-color:var(--pk-lime)}
.pk-market-row .pk-showcase-score,.pk-inventory .pk-showcase-score{font-size:20px;top:2px;left:2px;padding:2px 3px}
.pk-market-row .pk-showcase-score>small,.pk-inventory .pk-showcase-score>small{display:none}
.pk-market-row .pk-showcase-bonus,.pk-inventory .pk-showcase-bonus{top:3px;right:2px;padding:1px}
.pk-market-row .pk-showcase-caption,.pk-inventory .pk-showcase-caption{bottom:4px;gap:3px}
.pk-market-row .pk-showcase-caption>strong,.pk-inventory .pk-showcase-caption>strong{font-size:12px}
.pk-market-row .pk-showcase-caption .pk-token-list,.pk-inventory .pk-showcase-caption .pk-token-list{gap:2px;flex-wrap:wrap}
.pk-market-row .pk-showcase-caption .pk-ball,.pk-inventory .pk-showcase-caption .pk-ball{width:11px;height:11px}
.pk-market-row .pk-showcase.affordable .pk-showcase-caption,.pk-inventory .pk-showcase.affordable .pk-showcase-caption{bottom:16px}
.pk-detail-face{width:100%;aspect-ratio:3/4}
.pk-detail-face .pk-showcase-score{font-size:32px}
.pk-detail-face .pk-showcase-caption{bottom:9px;gap:8px}
.pk-detail-face .pk-showcase-caption>strong{font-size:18px}
.pk-detail-face .pk-showcase-caption .pk-ball{width:17px;height:17px}
.pk-detail-face .pk-showcase-caption>.pk-token-list{flex-wrap:wrap}
.pk-detail-face .pk-showcase-caption .pk-token-list>span{font-size:11px}
.pk-evolution>img{aspect-ratio:3/4;object-fit:cover}
@media(max-width:599px){.pk-market-row .pk-showcase-caption>strong{font-size:10px}.pk-market-row .pk-showcase-caption>.pk-token-list{gap:1px}.pk-market-row .pk-showcase-caption .pk-ball{width:9px;height:9px}.pk-market-row .pk-showcase-caption .pk-token-list>span{font-size:8px}.pk-market-row .pk-showcase-score{font-size:18px}.pk-market-row .pk-showcase-bonus>.pk-ball{width:15px;height:15px}}

/* Player identity is carried by avatar and name; no seat badges in this game. */
.pokemon-game .seat-number{display:none}
/* Wide special cards keep a full-bleed crop. Each source has its own vertical framing.
   Scope to the market so inventory and full-size detail portraits remain unchanged. */
.pk-special .pk-showcase-art>img{object-fit:cover;object-position:50% var(--pk-art-y,38%)}
.pk-special .pk-showcase:after{background:linear-gradient(180deg,#050b221a,transparent 40%,#09101b70 70%,#09101bf2)}
.pk-special [data-card="rr_01"]{--pk-art-y:35%} /* 果然翁：靠上的脸部 */
.pk-special [data-card="rr_02"]{--pk-art-y:45%} /* 喵喵：金币、双眼与胡须 */
.pk-special [data-card="rr_03"]{--pk-art-y:18%}  /* 大岩蛇：头部位于左上方 */
.pk-special [data-card="rr_04"]{--pk-art-y:40%} /* 可达鸭：头顶与喙 */
.pk-special [data-card="rr_05"]{--pk-art-y:38%} /* 皮卡丘：耳根与笑脸 */
.pk-special [data-card="rr_06"]{--pk-art-y:12%}  /* 拉普拉斯：长颈上方的小头 */
.pk-special [data-card="rr_07"]{--pk-art-y:42%} /* 伊布：耳朵与脸 */
.pk-special [data-card="rr_08"]{--pk-art-y:26%} /* 卡比兽：脸部在肚子上方 */
.pk-special [data-card="rr_09"]{--pk-art-y:40%} /* 百变怪：居中的表情 */
.pk-special [data-card="rr_10"]{--pk-art-y:27%}  /* 化石翼龙：头部与张开的嘴 */
.pk-special [data-card="lg_01"]{--pk-art-y:15%}  /* 捷拉奥拉：顶部面部与冠毛 */
.pk-special [data-card="lg_02"]{--pk-art-y:5%}  /* 美洛耶塔：头顶与侧脸 */
.pk-special [data-card="lg_03"]{--pk-art-y:24%}  /* 凯路迪欧：鬃毛与面部 */
.pk-special [data-card="lg_04"]{--pk-art-y:25%}  /* 蒂安希：钻石头冠与面部 */
.pk-special [data-card="lg_05"]{--pk-art-y:50%} /* 比克提尼：大耳朵下的完整表情 */
.pk-special [data-card="lg_06"]{--pk-art-y:7%}  /* 火焰鸟：火冠与喙 */
.pk-special [data-card="lg_07"]{--pk-art-y:5%}  /* 超梦：头部位于画面顶部 */
.pk-special [data-card="lg_08"]{--pk-art-y:19%}  /* 梦幻：头部与眼睛 */
.pk-special [data-card="lg_09"]{--pk-art-y:17%}  /* 急冻鸟：翼间的冠羽与喙 */
.pk-special [data-card="lg_10"]{--pk-art-y:32%} /* 闪电鸟：冠羽下方的脸与长喙 */
