/* Micatro — Balatro look: m6x11 pixel font, flat rounded panels with drop
   "lips", the palette from globals.lua (G.C). The #stage is a fixed design
   canvas (1360-2100 x 900 landscape / 720 x 1322-1700 portrait) scaled to fit the VISIBLE viewport (ui/board.js visibleBox). */
@font-face { font-family: 'm6x11'; src: url('../assets/fonts/m6x11plus.ttf?v=2') format('truetype'); font-display: block; }

:root {
	--blue: #009dff; --blue-d: #0076c2; --red: #fe5f55; --red-d: #c0453d; --orange: #fda200; --orange-d: #c27c00;
	--green: #4bc292; --green-d: #33906b; --grey: #5f7377; --grey-d: #435357; --money: #f3b958; --attn: #ff9a00;
	--panel: #3a4b4f; --panel-d: #2a3739; --panel-dd: #1f2a2c; --edge: #4f6367; --text-dark: #4f6367;
	--purple: #8867a5; --tarot: #a782d1; --planet: #13afce; --spectral: #4584fa;
}
/* touch-action: manipulation, not none — iOS Safari ignores none (and user-scalable=no), so a double
   tap zoomed the page and a tester got stuck zoomed in; manipulation kills double-tap zoom there.
   Cards keep `none` for dragging (.card below); ui/zoomguard.js snaps any other zoom back. */
html, body { margin: 0; height: 100%; overflow: hidden; background: #2d3d40; color: #fff; font-family: 'm6x11', 'Courier New', monospace;
	touch-action: manipulation; overscroll-behavior: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; -webkit-tap-highlight-color: transparent; }
body { height: 100dvh; }
body.no-webgl { background: radial-gradient(circle at 45% 50%, #5a9e83 0%, #3f6b5a 45%, #23332d 100%); }
#bg { position: fixed; inset: 0; width: 100%; height: 100%; image-rendering: pixelated; display: block; }
#viewport { position: fixed; inset: 0; overflow: hidden; }
#stage { position: absolute; left: 0; top: 0; transform-origin: 0 0; font-size: 28px; line-height: 1; }
#stage * { box-sizing: border-box; }
.loading { position: absolute; left: 50vw; top: 45vh; transform: translate(-50%, -50%); font-size: 40px; color: #fff; text-shadow: 0 3px 0 rgba(0,0,0,.4); }
.muted { color: #9fb0b3; }
.money { color: var(--money); }
.blue, .chips { color: var(--blue); }
.red { color: var(--red); }
.orange, .attn { color: var(--attn); }
b { font-weight: normal; }

/* ------------------------------------------------------------------ buttons */
.btn { --b: var(--grey); --bd: var(--grey-d); font-family: inherit; font-size: 28px; line-height: 1; color: #fff; background: var(--b); border: 0; border-radius: 12px;
	padding: 10px 18px; box-shadow: 0 6px 0 var(--bd); text-shadow: 0 2px 0 rgba(0,0,0,.3); cursor: pointer; transition: transform .06s, box-shadow .06s, filter .1s;
	margin-bottom: 6px; touch-action: manipulation; }
.btn:hover:not(:disabled) { filter: brightness(1.1); }
.btn:active:not(:disabled) { transform: translateY(4px); box-shadow: 0 2px 0 var(--bd); }
.btn:disabled { --b: #59676a; --bd: #3d4749; color: #b9c3c5; cursor: default; filter: none; }
.btn.blue { --b: var(--blue); --bd: var(--blue-d); }
.btn.red { --b: var(--red); --bd: var(--red-d); }
.btn.orange { --b: var(--orange); --bd: var(--orange-d); }
.btn.green { --b: var(--green); --bd: var(--green-d); }
.btn.grey { --b: var(--grey); --bd: var(--grey-d); }
.btn.purple { --b: #8e5fb3; --bd: #6b4585; } /* (More Fluff's prepared-card Use: G.C.PURPLE) */
.btn.big { font-size: 34px; padding: 14px 22px; min-height: 80px; border-radius: 14px; }
.btn.wide { width: 100%; }
.btn .money { color: #fff3c9; text-shadow: 0 2px 0 rgba(0,0,0,.35); }
.btn:disabled .money { color: #d9cfa8; }

/* --------------------------------------------------------------------- HUD */
.hud { position: absolute; z-index: 5; display: flex; flex-direction: column; gap: 12px; padding: 14px; border-radius: 18px;
	background: var(--panel); box-shadow: 0 8px 0 var(--panel-dd), inset 0 0 0 3px #46595d; }
.landscape .hud { left: 16px; top: 16px; width: 384px; bottom: 16px; }
.portrait .hud { left: 10px; top: 96px; width: 700px; display: grid; grid-template-columns: 340px 1fr; grid-template-areas: "blind score" "blind hand" "stats stats"; gap: 10px; padding: 10px; }
.hud-blind { --bcol: #3f5154; border-radius: 14px; background: var(--panel-d); overflow: hidden; display: flex; flex-direction: column; transition: background .3s; }
.portrait .hud-blind { grid-area: blind; }
.hb-title { background: var(--bcol); padding: 10px 8px 8px; text-align: center; font-size: 34px; text-shadow: 0 3px 0 rgba(0,0,0,.3); border-radius: 14px 14px 0 0; transition: background .4s; }
.hud-blind.selecting .hb-title { font-size: 28px; padding: 18px 8px; }
.hb-body { display: flex; align-items: center; gap: 10px; padding: 10px; background: color-mix(in srgb, var(--bcol) 45%, #1f2a2c); }
.hud-blind.selecting .hb-body { display: none; }
.hb-chip { width: 96px; height: 96px; flex: 0 0 96px; }
.blind-chip { width: 100%; height: 100%; image-rendering: auto; display: block; }
.hb-info { flex: 1; background: var(--panel-dd); border-radius: 10px; padding: 8px; text-align: center; }
.hb-req-l { font-size: 22px; color: #dfe7e8; }
.hb-req { font-size: 44px; color: var(--red); display: flex; align-items: center; justify-content: center; gap: 6px; margin: 4px 0; text-shadow: 0 3px 0 rgba(0,0,0,.35); }
.hb-reward { font-size: 22px; color: #dfe7e8; }
.hb-desc { padding: 6px 10px 10px; text-align: center; font-size: 22px; color: #fff; background: color-mix(in srgb, var(--bcol) 45%, #1f2a2c); line-height: 1.05; }
.hb-desc:empty { display: none; }
.chip-ico { display: inline-block; width: 30px; height: 30px; background: url('../assets/textures/chips.png') 0 0 / 150px 60px no-repeat; image-rendering: pixelated; flex: 0 0 30px; }
.hud-score { display: flex; align-items: center; gap: 10px; background: var(--panel-d); border-radius: 14px; padding: 10px 12px; }
.portrait .hud-score { grid-area: score; }
.hs-l { font-size: 24px; text-align: center; width: 92px; }
.hs-v { flex: 1; background: var(--panel-dd); border-radius: 10px; padding: 8px 10px; font-size: 44px; display: flex; align-items: center; justify-content: center; gap: 8px; text-shadow: 0 3px 0 rgba(0,0,0,.35); }
.hud-hand { background: var(--panel-d); border-radius: 14px; padding: 10px 12px 12px; transition: transform .1s; }
.portrait .hud-hand { grid-area: hand; }
.hh-name { text-align: center; font-size: 36px; min-height: 40px; display: flex; justify-content: center; align-items: baseline; gap: 12px; text-shadow: 0 3px 0 rgba(0,0,0,.35); white-space: nowrap; overflow: hidden; }
.hud-hand.total .hh-name { font-size: 46px; color: #fff; }
.hh-lvl { font-size: 26px; }
.hh-cxm { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
.hh-chips, .hh-mult { flex: 1; border-radius: 10px; padding: 10px 8px; font-size: 46px; text-align: center; text-shadow: 0 3px 0 rgba(0,0,0,.35); box-shadow: 0 5px 0 rgba(0,0,0,.25); }
.hh-chips { background: var(--blue); text-align: right; }
.hh-mult { background: var(--red); text-align: left; }
.hh-x { font-size: 40px; color: var(--red); text-shadow: 0 3px 0 rgba(0,0,0,.35); }
.portrait .hh-chips, .portrait .hh-mult { font-size: 40px; padding: 6px; }
.portrait .hh-name { font-size: 30px; min-height: 32px; }
.hud-stats { display: flex; gap: 10px; }
.portrait .hud-stats { grid-area: stats; }
.hs-btns { display: flex; flex-direction: column; gap: 10px; width: 112px; }
.hs-btns .btn { flex: 1; font-size: 26px; padding: 8px 6px; }
.portrait .hs-btns { flex-direction: row; width: 230px; }
.hs-grid { flex: 1; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.portrait .hs-grid { grid-template-columns: repeat(5, 1fr); }
.stat { background: var(--panel-d); border-radius: 12px; padding: 6px; text-align: center; }
.stat.wide { grid-column: span 2; }
.portrait .stat.wide { grid-column: span 1; }
.stat-l { font-size: 20px; color: #dfe7e8; }
.stat-v { background: var(--panel-dd); border-radius: 8px; padding: 6px 2px; font-size: 40px; margin-top: 4px; text-shadow: 0 3px 0 rgba(0,0,0,.35); }
.stat.wide .stat-v { font-size: 46px; margin: 0; }
.portrait .stat-v { font-size: 32px; }
.portrait .stat.wide .stat-v { font-size: 32px; margin-top: 24px; }
.stat-v small { font-size: 24px; color: #fff; }
.hud-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.landscape .hud-tags { margin-top: auto; }
.portrait .hud-tags { position: absolute; right: 0; top: calc(100% + 6px); }
.portrait .hud-tags .tag-ico { width: 40px; height: 40px; }
.tag-ico { width: 52px; height: 52px; image-rendering: auto; cursor: pointer; }
.bump { animation: bump .32s ease-out; }
@keyframes bump { 0% { transform: scale(1); } 30% { transform: scale(1.14) rotate(-1deg); } 60% { transform: scale(.97); } 100% { transform: scale(1); } }

/* -------------------------------------------------------- areas + controls */
.area-labels { position: absolute; inset: 0; pointer-events: none; z-index: 2; }
.area-box { position: absolute; background: rgba(0,0,0,.2); border-radius: 16px; }
.area-lbl { position: absolute; font-size: 24px; color: #fff; background: rgba(0,0,0,.25); padding: 3px 10px; border-radius: 8px; white-space: nowrap; }
.area-lbl:empty { display: none; }
.controls { position: absolute; z-index: 15; display: flex; align-items: flex-start; justify-content: center; gap: 22px; }
.controls .btn.big { width: 230px; }
.portrait .controls { gap: 12px; }
.portrait .controls .btn.big { width: 180px; font-size: 32px; min-height: 86px; }
.sortbox { background: var(--panel); border-radius: 14px; padding: 6px 10px 2px; text-align: center; box-shadow: 0 6px 0 var(--panel-dd); }
.sort-l { font-size: 22px; margin-bottom: 4px; }
.sort-b { display: flex; gap: 8px; }
.sort-b .btn { font-size: 24px; padding: 8px 12px; }
.portrait .sortbox { padding: 4px 6px 0; }
.portrait .sort-b .btn { padding: 10px 8px; font-size: 24px; }
.controls.readonly { opacity: .55; pointer-events: none; }
.deck-pile { position: absolute; z-index: 6; width: var(--cw); height: var(--ch); cursor: pointer; }
.portrait .deck-pile { transform: scale(.62); transform-origin: 50% 70%; }
.deck-stack { position: absolute; inset: 0; }
.deck-card { position: absolute; inset: 0; width: 100%; height: 100%; filter: drop-shadow(3px 5px 0 rgba(0,0,0,.3)); }
.deck-count { position: absolute; left: -20px; right: -20px; bottom: -38px; text-align: center; font-size: 26px; text-shadow: 0 2px 0 rgba(0,0,0,.4); }
.portrait .deck-count { font-size: 36px; bottom: -50px; }

/* ------------------------------------------------------------------- cards */
.cards-layer { position: absolute; inset: 0; z-index: 20; pointer-events: none; }
.card { position: absolute; left: 0; top: 0; width: var(--cw); height: var(--ch); transform-origin: 50% 50%; will-change: transform; pointer-events: auto; cursor: pointer; touch-action: none; }
.card-shadow { position: absolute; inset: 3% 4% 1% 4%; background: rgba(0,0,0,.32); border-radius: 9px; transform: translate(5px, 9px); }
.card-inner { position: absolute; inset: 0; }
.card-face, .card-soul { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.card.wee .card-face, .card.wee .card-soul { inset: 15%; width: 70%; height: 70%; }
.card.dissolving .card-shadow { opacity: 0; transition: opacity .3s; }
.card.is-tag .card-shadow { display: none; } /* a Tag sold as a card (Reverie): square sprite, no card shadow */
.shards { position: absolute; left: 0; top: 0; pointer-events: none; z-index: 60; }
.price-tag { position: absolute; left: 50%; top: -44px; transform: translateX(-50%); background: var(--panel); color: var(--money); font-size: 28px; padding: 5px 14px 3px; border-radius: 10px; box-shadow: 0 4px 0 var(--panel-dd); white-space: nowrap; text-shadow: 0 2px 0 rgba(0,0,0,.35); pointer-events: none; }
.price-tag.poor { color: #e88; }
.card-btns { position: absolute; display: flex; gap: 8px; z-index: 5; }
.card-btns .btn { font-size: 24px; padding: 8px 12px; min-width: 84px; text-align: center; line-height: 1.05; white-space: nowrap; }
.card-btns.side { left: calc(100% - 6px); top: 18%; flex-direction: column; }
.card-btns.below { top: calc(100% + 10px); left: 50%; transform: translateX(-50%); }
.portrait .card-btns.side { left: 50%; top: calc(100% + 8px); transform: translateX(-50%); flex-direction: row; }
.mini-card { width: 71px; height: 95px; }

/* -------------------------------------------------------- popups + overlays */
.pop-layer { position: absolute; inset: 0; z-index: 40; pointer-events: none; }
.popup { position: absolute; transform: translate(-50%, -100%); padding: 6px 14px 4px; border-radius: 12px; color: #fff; font-size: 36px; white-space: nowrap;
	text-shadow: 0 3px 0 rgba(0,0,0,.3); box-shadow: 0 5px 0 rgba(0,0,0,.25); animation: popup .95s ease-out forwards; }
.popup.below { animation-name: popdown; }
.popup.float { background: none; box-shadow: none; font-size: 34px; animation: floatup 1.1s ease-out forwards; }
.popup.float.money { color: var(--money); }
.popup.float.red { color: var(--red); }
.popup.dark-ed, .dark-ed.badge { background: linear-gradient(90deg, #6a4cff, #d84fd2, #ff7a59, #3fc3ff); background-size: 300% 100%; animation-name: popup, sheen; animation-duration: .95s, 1.2s; }
@keyframes popup { 0% { transform: translate(-50%, -100%) scale(.2); opacity: 0; } 14% { transform: translate(-50%, -100%) scale(1.18); opacity: 1; } 28% { transform: translate(-50%, -100%) scale(1); } 75% { opacity: 1; } 100% { transform: translate(-50%, -140%) scale(.9); opacity: 0; } }
@keyframes popdown { 0% { transform: translate(-50%, 0) scale(.2); opacity: 0; } 14% { transform: translate(-50%, 0) scale(1.18); opacity: 1; } 28% { transform: translate(-50%, 0) scale(1); } 75% { opacity: 1; } 100% { transform: translate(-50%, 30%) scale(.9); opacity: 0; } }
@keyframes floatup { 0% { transform: translate(-50%, 0); opacity: 0; } 15% { opacity: 1; } 100% { transform: translate(-50%, -70px); opacity: 0; } }
@keyframes sheen { 0% { background-position: 0 0; } 100% { background-position: 100% 0; } }
.attention { position: absolute; left: 50%; top: 34%; z-index: 45; pointer-events: none; font-size: 84px; white-space: nowrap; opacity: 0; transform: translate(-50%, -50%);
	text-shadow: 0 6px 0 rgba(0,0,0,.35), 0 0 20px rgba(0,0,0,.25); }
.landscape .attention { left: calc(50% + 200px); }
.attention.show { animation: attn 1.5s ease-out forwards; }
@keyframes attn { 0% { opacity: 0; transform: translate(-50%, -50%) scale(.3) rotate(-4deg); } 12% { opacity: 1; transform: translate(-50%, -50%) scale(1.15) rotate(2deg); } 24% { transform: translate(-50%, -50%) scale(1) rotate(0); } 75% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%, -60%) scale(.95); } }
.toast { position: absolute; left: 50%; bottom: 140px; z-index: 55; transform: translateX(-50%); background: var(--red); padding: 10px 22px 8px; border-radius: 12px; font-size: 30px; opacity: 0; pointer-events: none; box-shadow: 0 5px 0 var(--red-d); white-space: nowrap; }
.toast.show { animation: toast 2s ease-out forwards; }
/* hold R to restart (ui/main.js startRHold): Balatro's little fill bar */
.restart-hold { position: absolute; left: 50%; top: 40%; z-index: 57; transform: translate(-50%, -50%); background: var(--panel-d, #1e2b2d); padding: 10px 18px 14px; border-radius: 12px; pointer-events: none; box-shadow: 0 5px 0 rgba(0,0,0,.35); text-align: center; }
.rh-label { font-size: 30px; margin-bottom: 8px; }
.rh-track { width: 260px; height: 16px; border-radius: 8px; background: rgba(0,0,0,.4); overflow: hidden; }
.rh-fill { width: 0; height: 100%; background: var(--red); border-radius: 8px; }
@keyframes toast { 0% { opacity: 0; transform: translate(-50%, 20px); } 10% { opacity: 1; transform: translate(-50%, 0); } 80% { opacity: 1; } 100% { opacity: 0; } }
.banner { position: absolute; left: 50%; top: 10px; transform: translateX(-50%); z-index: 52; background: rgba(31,42,44,.92); border-radius: 14px; padding: 10px 20px 8px; font-size: 28px; display: flex; gap: 18px; align-items: center; box-shadow: 0 5px 0 rgba(0,0,0,.3); white-space: nowrap; }
.landscape .banner { left: calc(50% + 200px); }
.portrait .banner { top: 8px; left: 12px; transform: none; max-width: 560px; flex-wrap: wrap; white-space: normal; font-size: 24px; gap: 10px; }
.banner a { color: #9fd3ff; text-decoration: none; }
.banner .watching b { color: var(--attn); }
.spec-status { color: #cfe; font-size: 24px; }
/* a replay recorded on other mod versions (mods/pins.js): warned up front, still plays */
.banner:has(.mod-pin-warn) { flex-wrap: wrap; justify-content: center; row-gap: 8px; max-width: min(1000px, calc(100vw - 24px)); }
.banner .mod-pin-warn { flex: 1 1 100%; color: #ffd9d6; background: rgba(254,95,85,.25); border-radius: 10px; padding: 4px 12px 2px; font-size: 20px; white-space: normal; text-align: center; line-height: 1.2; }

/* the resume prompt (a mod changed since the run started) */
.resume-prompt { display: flex; flex-direction: column; gap: 14px; max-width: 760px; font-size: 26px; text-align: left; }
.resume-prompt p { margin: 0; }
.rz-diff { margin: 0; padding-left: 28px; color: var(--attn); }
.rz-acts { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
/* two different runs in progress (ui/runsync.js): this device's vs the account's */
.run-choice { max-width: 900px; }
.rc-runs { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }
.rc-run { flex: 1 1 300px; display: flex; flex-direction: column; gap: 8px; background: rgba(0,0,0,.25); border-radius: 14px; padding: 14px 16px; align-items: stretch; }
.rc-head { font-size: 24px; color: #cfe8ff; }
.rc-where { font-size: 30px; }
.rc-sub { font-size: 20px; }
.rc-run .btn { margin-top: 6px; }
.rc-note { font-size: 20px; text-align: center; }
/* the main menu: the run on offer came from the account */
.menu-cloud { margin-top: 10px; color: #fff; background: rgba(0,0,0,.35); border-radius: 12px; padding: 8px 16px 6px; font-size: 26px; text-align: center; max-width: calc(100% - 24px); }
.portrait .menu-cloud { font-size: 30px; }
/* retired cards (a mod update removed them): kept, greyed out */
.cd-item.retired, .cd-chip.retired, .retired-card { opacity: .55; filter: grayscale(1); }
.retired-tag { color: #9aa7a9; font-size: 20px; }
.rec-retired { display: flex; flex-direction: column; gap: 4px; font-size: 22px; }
.retired-card small { color: #9aa7a9; }

/* tooltip */
.tip { position: absolute; left: 0; top: 0; z-index: 50; pointer-events: none; display: flex; gap: 8px; align-items: flex-start; max-width: 600px; }
.tip-main, .tip-info { background: var(--panel); border-radius: 14px; padding: 8px; box-shadow: 0 6px 0 var(--panel-dd), inset 0 0 0 3px #bfc7d5; min-width: 220px; max-width: 360px; text-align: center; }
.tip-info { min-width: 180px; max-width: 250px; opacity: .97; }
.tip-name { font-size: 34px; padding: 4px 8px 8px; text-shadow: 0 3px 0 rgba(0,0,0,.35); }
.ti-name { font-size: 26px; padding: 2px 6px 6px; }
/* a playing card's name: Balatro's card_h_popup puts it on a white pill ("6 of" light_black, the suit in its colour) */
.tip-name.pc { text-shadow: none; }
.tip-pc { display: inline-block; background: #fff; color: #4f6367; border-radius: 10px; padding: 2px 14px 0; box-shadow: 0 3px 0 rgba(0,0,0,.25); }
.tip-body { background: #fff; color: var(--text-dark); border-radius: 10px; padding: 8px 10px 6px; font-size: 25px; line-height: 1.08; }
.tip-info .tip-body { font-size: 22px; }
.tip-gap { height: 8px; }
@keyframes mf-tipimg { from { background-position: 0 0; } to { background-position: var(--tw) 0; } } /* (a tooltip picture's frames: board.js renderTip) */
.tip-note { font-size: 20px; margin-top: 6px; color: #dfe7e8; }
.tip-badges { margin-top: 4px; }
.badge { display: inline-block; padding: 4px 16px 2px; border-radius: 9px; color: #fff; font-size: 22px; margin: 6px 3px 0; box-shadow: 0 3px 0 rgba(0,0,0,.25); }
.mk.xbox { color: #fff; padding: 0 4px; border-radius: 5px; }
.mk.dark-ed { background: linear-gradient(90deg, #6a4cff, #d84fd2, #ff7a59); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ---------------------------------------------------------- state overlays */
.overlay { position: absolute; z-index: 10; }
.overlay:empty { pointer-events: none; }
.ov-blinds .blind-row { position: absolute; inset: 0; display: flex; justify-content: center; align-items: flex-end; gap: 22px; padding-bottom: 4px; }
.landscape .blind-body { gap: 6px; padding: 6px; }
.portrait .ov-blinds .blind-row { gap: 8px; align-items: flex-start; padding-top: 30px; }
.blind-col { --bcol: #3b7fa8; width: 31%; max-width: 330px; background: var(--panel); border-radius: 18px; padding: 10px; display: flex; flex-direction: column; gap: 8px;
	box-shadow: 0 8px 0 var(--panel-dd), inset 0 0 0 4px var(--bcol); transform: translateY(70px); transition: transform .35s cubic-bezier(.2, 1.4, .4, 1), filter .3s; filter: brightness(.7); animation: risein .5s cubic-bezier(.2, 1.3, .4, 1) backwards; }
.blind-col:nth-child(2) { animation-delay: .06s; } .blind-col:nth-child(3) { animation-delay: .12s; }
@keyframes risein { from { transform: translateY(500px); } }
.blind-col.st-select { transform: translateY(-6px); filter: none; }
.landscape .blind-col { transform: translateY(36px); }
.landscape .blind-col.st-select { transform: translateY(-6px); }
.blind-col.st-defeated, .blind-col.st-skipped { filter: brightness(.5) saturate(.6); }
.portrait .blind-col { width: 33%; padding: 6px; transform: translateY(40px); }
.portrait .blind-col.st-select { transform: translateY(0); }
.blind-head { min-height: 64px; display: flex; align-items: center; justify-content: center; }
.blind-head .btn { width: 100%; font-size: 34px; min-height: 64px; }
.blind-state { font-size: 30px; color: #c6d1d3; }
.blind-body { background: var(--panel-d); border-radius: 12px; padding: 8px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.blind-name { background: var(--bcol); border-radius: 10px; width: 100%; padding: 8px 4px 6px; font-size: 32px; text-shadow: 0 3px 0 rgba(0,0,0,.3); }
.portrait .blind-name { font-size: 26px; }
.blind-chip.big { width: 92px; height: 92px; }
.portrait .blind-chip.big { width: 84px; height: 84px; }
.blind-desc { font-size: 22px; line-height: 1.05; background: var(--panel-dd); border-radius: 8px; padding: 6px; width: 100%; }
.blind-req { background: var(--panel-dd); border-radius: 10px; padding: 8px; width: 100%; }
.req-l { font-size: 20px; color: #dfe7e8; }
.req-v { font-size: 38px; color: var(--red); display: flex; align-items: center; justify-content: center; gap: 6px; margin-top: 4px; text-shadow: 0 3px 0 rgba(0,0,0,.35); }
.portrait .req-v { font-size: 28px; }
.blind-rew { font-size: 22px; }
.blind-skip { text-align: center; }
.blind-skip .or { font-size: 22px; color: #c6d1d3; margin-bottom: 4px; }
.skip-line { display: flex; align-items: center; justify-content: center; gap: 8px; }
.skip-line .btn { font-size: 26px; padding: 10px 12px; }
.portrait .skip-line { flex-direction: column; gap: 4px; }
.portrait .skip-line .btn { font-size: 22px; padding: 8px; }
.b-reroll-boss { font-size: 24px; }

.ov-eval { display: flex; justify-content: center; align-items: flex-start; }
.eval-panel { width: min(640px, 96%); margin-top: 16px; background: var(--panel); border-radius: 18px; padding: 14px; box-shadow: 0 8px 0 var(--panel-dd), inset 0 0 0 3px #46595d; animation: risein .45s cubic-bezier(.2, 1.3, .4, 1); }
.b-cashout { width: 100%; font-size: 42px; }
.eval-rows { margin-top: 10px; }
.eval-row { display: flex; justify-content: space-between; align-items: center; padding: 10px 8px; border-top: 3px dotted rgba(255,255,255,.18); font-size: 28px; gap: 10px; animation: rowin .35s ease-out backwards; }
.eval-row:nth-child(2) { animation-delay: .1s; } .eval-row:nth-child(3) { animation-delay: .2s; } .eval-row:nth-child(4) { animation-delay: .3s; } .eval-row:nth-child(5) { animation-delay: .4s; } .eval-row:nth-child(6) { animation-delay: .5s; }
@keyframes rowin { from { opacity: 0; transform: translateX(-30px); } }
.eval-row.first { border-top: 0; }
.ev-l { display: block; }
.ev-l .ev-blind, .ev-l .ev-blind + .ev-sub { display: block; }
.ev-l .ev-blind + .ev-sub { margin-top: 4px; }
.ev-blind { font-size: 32px; }
.ev-sub { font-size: 20px; color: #c6d1d3; }
.ev-r { font-size: 34px; letter-spacing: 2px; }

.shop-panel { position: absolute; inset: 0; background: color-mix(in srgb, var(--red) 12%, var(--panel)); border-radius: 20px; box-shadow: 0 8px 0 var(--panel-dd), inset 0 0 0 4px #c0453d; animation: risein .45s cubic-bezier(.2, 1.2, .4, 1); }
.shop-sign { position: absolute; left: 50%; top: -46px; width: 270px; height: 136px; transform: translateX(-50%); image-rendering: auto; }
.portrait .shop-sign { top: -36px; width: 220px; height: 110px; }
.shop-btns { position: absolute; left: 22px; top: 70px; width: 180px; display: flex; flex-direction: column; gap: 14px; }
.shop-btns .btn { min-height: 110px; font-size: 34px; }
.portrait .shop-btns { left: 14px; top: 90px; width: 160px; }
.portrait .shop-btns .btn { min-height: 92px; font-size: 30px; }
.shop-vlabel { position: absolute; text-align: center; font-size: 20px; color: #f7d9a5; background: rgba(0,0,0,.25); border-radius: 8px; padding: 4px 2px 2px; }
.ov-pack { pointer-events: none; }
.pack-head { position: absolute; left: 50%; transform: translateX(-50%); display: flex; align-items: center; gap: 22px; background: var(--panel); border-radius: 16px; padding: 10px 18px; box-shadow: 0 6px 0 var(--panel-dd); pointer-events: auto; white-space: nowrap; }
.pack-name { font-size: 36px; text-shadow: 0 3px 0 rgba(0,0,0,.3); }
.pack-choose { font-size: 26px; color: #dfe7e8; }
.pack-choose b { color: var(--attn); }

/* ---------------------------------------------------------------- modals */
.modal-layer { position: absolute; inset: 0; z-index: 60; pointer-events: none; }
.modal-layer.open { pointer-events: auto; }
.modal { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: rgba(15,22,24,.55); animation: fadein .2s ease-out; }
@keyframes fadein { from { opacity: 0; } }
.modal-box { background: var(--panel); border-radius: 20px; padding: 18px; box-shadow: 0 10px 0 var(--panel-dd), inset 0 0 0 4px #bfc7d5; min-width: 520px; max-width: 94%; max-height: 92%; overflow: auto; display: flex; flex-direction: column; gap: 14px; animation: risein .4s cubic-bezier(.2, 1.2, .4, 1); }
.portrait .modal-box { min-width: 0; width: 94%; }
.modal-title { font-size: 46px; text-align: center; text-shadow: 0 4px 0 rgba(0,0,0,.35); }
.modal .b-back { margin-top: 4px; }
.menu-modal { background: transparent; }
.menu-modal .modal-box { background: transparent; box-shadow: none; width: 100%; height: 100%; max-width: none; max-height: none; min-width: 0; justify-content: space-between; align-items: center; padding: 40px 20px 30px; overflow: hidden; animation: none; }
.main-menu { display: flex; flex-direction: column; align-items: center; justify-content: space-between; height: 100%; width: 100%; }
.logo { margin-top: 10px; font-size: 180px; letter-spacing: 8px; color: #fff; text-shadow: 4px 6px 0 #fe5f55, 8px 12px 0 #009dff, 10px 18px 0 rgba(0,0,0,.3); animation: logo 4s ease-in-out infinite; }
.portrait .logo { font-size: 110px; margin-top: 90px; }
@keyframes logo { 0%, 100% { transform: rotate(-1.5deg) scale(1); } 50% { transform: rotate(1.5deg) scale(1.03); } }
.menu-joker { width: 213px; height: 285px; filter: drop-shadow(8px 12px 0 rgba(0,0,0,.35)); }
.menu-bar { display: flex; gap: 18px; background: var(--panel); padding: 16px; border-radius: 20px; box-shadow: 0 8px 0 var(--panel-dd); flex-wrap: wrap; justify-content: center; }
.menu-bar .btn { width: 210px; min-height: 100px; font-size: 38px; }
.portrait .menu-bar { width: 96%; }
.portrait .menu-bar .btn { width: 46%; }
.menu-foot { display: flex; gap: 30px; align-items: center; margin-top: 14px; flex-wrap: wrap; justify-content: center; }
.back-link, .login-link { color: #cfe8ff; font-size: 28px; text-decoration: none; background: rgba(0,0,0,.3); padding: 10px 16px 8px; border-radius: 12px; }
.back-link:hover, .login-link:hover { background: rgba(0,0,0,.45); }
.new-run { display: flex; flex-direction: column; gap: 14px; width: 760px; max-width: 100%; }
.nr-row { display: flex; align-items: center; gap: 12px; background: var(--panel-d); border-radius: 14px; padding: 12px; }
.nr-row .arrow { font-size: 56px; padding: 6px 14px 14px; min-height: 140px; }
.nr-deckview .nr-back { width: 142px; height: 190px; display: block; filter: drop-shadow(5px 7px 0 rgba(0,0,0,.35)); }
.nr-stakeview .nr-chip { width: 96px; height: 96px; display: block; }
/* a stake this deck hasn't unlocked yet (ui/stakeunlocks.js): greyed chip under a lock; the text says what opens it */
.nr-stakeview { position: relative; }
.nr-locked .nr-chip { filter: grayscale(1) brightness(.55); }
.nr-lock { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 44px; pointer-events: none; text-shadow: 0 2px 0 rgba(0,0,0,.5); }
.nr-locked .nr-info { background: #d9dfe0; }
.nr-lock-text { color: #4f6367; }
.nr-info { flex: 1; background: #fff; color: var(--text-dark); border-radius: 12px; padding: 12px; text-align: center; min-height: 130px; display: flex; flex-direction: column; justify-content: center; gap: 8px; }
.nr-name { font-size: 34px; color: var(--text-dark); }
.nr-desc { font-size: 25px; line-height: 1.1; }
.portrait .new-run { width: 100%; }
.portrait .nr-deckview .nr-back { width: 106px; height: 142px; }
.nr-seed { display: flex; align-items: center; gap: 16px; font-size: 26px; justify-content: center; }
.nr-seed input[type=checkbox] { width: 28px; height: 28px; vertical-align: middle; }
.nr-seed .seed-in { font-family: inherit; font-size: 32px; width: 240px; padding: 8px 12px 6px; border-radius: 10px; border: 3px solid #bfc7d5; background: var(--panel-dd); color: #fff; text-transform: uppercase; letter-spacing: 3px; }
.leaders { min-width: 640px; max-width: 100%; }
.portrait .leaders { min-width: 0; }
.lb-table { display: flex; flex-direction: column; gap: 4px; }
.lb-row { display: grid; grid-template-columns: 60px 1fr 200px 70px 170px; gap: 8px; padding: 8px 10px 6px; background: var(--panel-d); border-radius: 10px; font-size: 26px; align-items: center; }
.portrait .lb-row { grid-template-columns: 44px 1fr 150px 50px; font-size: 22px; }
.portrait .lb-row span:nth-child(5) { display: none; }
.lb-row.lb-h { background: none; color: #c6d1d3; font-size: 22px; }
.lb-row.me { box-shadow: inset 0 0 0 3px var(--attn); }
.lb-row .won { color: var(--money); }
.lb-you { margin-top: 10px; text-align: center; font-size: 26px; }
.howto { max-width: 820px; font-size: 27px; line-height: 1.2; }
.howto p { margin: 0 0 12px; }
.run-info { width: 860px; max-width: 100%; }
.tabs { display: flex; gap: 10px; justify-content: center; margin-bottom: 12px; }
.tabs .btn.on { --b: var(--red); box-shadow: 0 6px 0 var(--red-d), 0 0 0 4px #fff; }
.tabs .btn:not(.on) { --b: #7a4b48; --bd: #4f302e; }
.hand-list { display: flex; flex-direction: column; gap: 6px; }
.hand-row { display: grid; grid-template-columns: 90px 1fr 250px 80px; align-items: center; gap: 10px; background: var(--panel-d); border-radius: 10px; padding: 6px 10px; font-size: 28px; }
.portrait .hand-row { grid-template-columns: 70px 1fr 190px 60px; font-size: 24px; }
.hl-lvl { background: var(--panel-dd); border-radius: 8px; text-align: center; padding: 4px 0 2px; }
.hl-cxm { display: flex; align-items: center; gap: 6px; }
.hl-cxm .cx, .hl-cxm .mx { flex: 1; border-radius: 8px; padding: 4px 6px 2px; text-align: center; }
.hl-cxm .cx { background: var(--blue); } .hl-cxm .mx { background: var(--red); }
.hl-cxm b { color: var(--red); }
.hl-played { color: var(--attn); text-align: right; }
.ri-blinds { display: flex; gap: 12px; justify-content: center; }
.ri-blind { flex: 1; background: var(--panel-d); border-radius: 12px; padding: 10px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 24px; }
.ri-bname { font-size: 30px; }
.ri-bdesc { font-size: 20px; color: #dfe7e8; }
.ri-tag { display: flex; align-items: center; gap: 6px; font-size: 20px; }
.ri-note { text-align: center; margin-top: 12px; font-size: 24px; }
.voucher-list { display: flex; flex-direction: column; gap: 8px; }
.voucher-item { display: flex; gap: 12px; align-items: center; background: var(--panel-d); border-radius: 12px; padding: 8px; }
.v-ico { width: 71px; height: 95px; }
.v-text { flex: 1; background: #fff; color: var(--text-dark); border-radius: 10px; padding: 8px; }
.options { width: 560px; max-width: 100%; display: flex; flex-direction: column; gap: 14px; }
.opt-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; background: var(--panel-d); border-radius: 12px; padding: 10px 12px; }
.opt-l { font-size: 30px; }
.opt-g { display: flex; gap: 8px; }
.opt-g .btn { min-width: 84px; }
.opt-g .btn.on { --b: var(--red); --bd: var(--red-d); }
.opt-keys { background: var(--panel-d); border-radius: 12px; padding: 10px 12px; }
.opt-keys .kb-grid { display: grid; grid-template-columns: auto 1fr; gap: 2px 14px; font-size: 20px; color: #dfe7e8; }
.opt-keys .kb-grid b { color: var(--attn); white-space: nowrap; }
@media (hover: none) and (pointer: coarse) { .opt-keys { display: none; } }
.opt-acts { display: flex; flex-direction: column; gap: 10px; align-items: stretch; text-align: center; }
.deck-view { max-width: 1200px; }
.dv-sum { display: flex; gap: 24px; justify-content: center; font-size: 26px; flex-wrap: wrap; margin-bottom: 10px; }
.dv-sum b { color: var(--attn); }
.dv-grid { display: flex; flex-direction: column; gap: 6px; }
.dv-row { display: flex; }
.dv-row .mini-card { width: 66px; height: 88px; margin-right: -14px; filter: drop-shadow(2px 3px 0 rgba(0,0,0,.3)); }
.portrait .dv-row .mini-card { width: 46px; height: 62px; margin-right: -12px; }
.dv-row .mini-card.used { filter: brightness(.45) grayscale(.4); }
.game-over { display: flex; flex-direction: column; gap: 12px; align-items: center; min-width: 560px; }
.portrait .game-over { min-width: 0; width: 100%; }
.go-title { font-size: 88px; color: var(--red); text-shadow: 0 6px 0 rgba(0,0,0,.35); }
.game-over.win .go-title { color: var(--money); }
.go-stats { width: 100%; display: flex; flex-direction: column; gap: 6px; }
.go-row { display: flex; justify-content: space-between; background: var(--panel-d); border-radius: 10px; padding: 8px 12px 6px; font-size: 28px; gap: 16px; }
.go-rank { font-size: 30px; min-height: 34px; }
.go-acts { display: flex; gap: 14px; flex-wrap: wrap; justify-content: center; }
.go-acts .btn { min-width: 190px; }

/* ------------------------------------------- outside the stage (window px) */
.watchers { position: fixed; right: max(12px, env(safe-area-inset-right)); top: max(58px, calc(env(safe-area-inset-top) + 50px)); z-index: 56; background: rgba(31,42,44,.9); color: #fff; font-family: 'm6x11', monospace; font-size: 18px; padding: 6px 10px 4px; border-radius: 10px; white-space: nowrap; }
@media (max-width: 600px), (max-height: 500px) { .watchers { font-size: 15px; padding: 4px 8px 2px; border-radius: 8px; } }
#chat-wrap { position: fixed; z-index: 57; }

/* no run on the table yet (main menu): hide the play UI */
#stage.no-run .hud, #stage.no-run .controls, #stage.no-run .area-labels, #stage.no-run .deck-pile { display: none; }

/* controller: focus reticle (stage coords) + button-hint bar (window px) */
.pad-reticle { position: absolute; z-index: 65; pointer-events: none; border: 5px solid #fff; border-radius: 16px;
	box-shadow: 0 0 0 4px rgba(0,0,0,.28), 0 0 22px rgba(255,255,255,.55); animation: retic 1.1s ease-in-out infinite; }
.pad-reticle.holding { border-color: var(--attn); box-shadow: 0 0 0 4px rgba(0,0,0,.28), 0 0 22px rgba(255,154,0,.7); }
@keyframes retic { 0%, 100% { opacity: 1; } 50% { opacity: .55; } }
#pad-hints { position: fixed; left: 50%; bottom: max(6px, env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 70; background: rgba(31,42,44,.92);
	color: #fff; font-family: 'm6x11', monospace; font-size: 17px; padding: 6px 12px 4px; border-radius: 10px; white-space: nowrap; max-width: 98vw; overflow: hidden; text-overflow: ellipsis; pointer-events: none; }
#pad-hints .pk { display: inline-block; min-width: 20px; padding: 1px 5px 0; margin-right: 4px; border-radius: 6px; background: #fff; color: #2a3739; text-align: center; }
#pad-hints .sep { display: inline-block; width: 14px; }
.pause { width: 420px; max-width: 100%; display: flex; flex-direction: column; gap: 10px; }
@media (max-width: 600px) { #pad-hints { font-size: 12px; padding: 4px 8px 3px; } #pad-hints .sep { width: 8px; } }
/* the site chat overlay: in portrait the bottom-left corner is the hand, so float it over the play area */
@media (orientation: portrait) and (max-width: 820px) { #chat-wrap #mp-chat { bottom: auto; top: calc(var(--mic-vis-h, 100vh) * .44); /* (--mic-vis-h: the visible height, ui/board.js resize) */ max-width: 62vw; } }
.area-lbl.hand-lbl { transform: translateX(-50%); }
.hud-hand.blocked .hh-hand { color: #ff9a8f; text-decoration: line-through; }

/* ------------------------------------------------------------------- mods */
.badge.mod-badge { font-size: 17px; padding: 3px 10px 1px; margin: 4px 3px 0; border-radius: 7px; box-shadow: 0 2px 0 rgba(0,0,0,.25); vertical-align: middle; }
.tip-modbadges { margin-top: 2px; }
.nr-mods { display: flex; align-items: center; gap: 12px; background: var(--panel-d); border-radius: 14px; padding: 10px 12px; font-size: 26px; }
.nr-mods-l { font-size: 30px; }
.nr-mods-sum { flex: 1; min-width: 0; }
.nr-mods .btn { font-size: 26px; padding: 8px 18px; }
.mods-panel { width: 760px; max-width: 100%; display: flex; flex-direction: column; gap: 10px; }
.portrait .mods-panel { width: 100%; }
.mods-list { display: flex; flex-direction: column; gap: 10px; }
.mod-row { background: var(--panel-d); border-radius: 14px; padding: 10px 12px; display: flex; flex-direction: column; gap: 6px; box-shadow: inset 0 0 0 3px transparent; }
.mod-row.on { box-shadow: inset 0 0 0 3px var(--green); }
.mod-head { display: flex; align-items: center; gap: 12px; }
.mod-title { flex: 1; min-width: 0; font-size: 30px; }
.mod-by { font-size: 22px; color: #c6d1d3; }
.mod-size { font-size: 18px; color: #c6d1d3; background: rgba(0,0,0,.25); border-radius: 6px; padding: 2px 8px 0; white-space: nowrap; }
.mod-toggle { min-width: 96px; font-size: 26px; }
.mod-toggle.on { --b: var(--green); --bd: var(--green-d); }
.mod-desc { font-size: 22px; line-height: 1.1; background: #fff; color: var(--text-dark); border-radius: 10px; padding: 8px 10px 6px; }
.mod-req { font-size: 20px; color: #dfe7e8; }
.mod-req b { color: var(--attn); font-weight: normal; }
.mod-opts { display: flex; flex-direction: column; gap: 6px; padding-left: 8px; border-left: 4px solid var(--edge); }
.mod-opt { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 24px; flex-wrap: wrap; }
.mod-opt .opt-g { flex-wrap: wrap; }
.mod-opt .btn { font-size: 22px; padding: 7px 12px; min-width: 70px; }
.mod-opt-v { font-size: 22px; color: #c6d1d3; }
.mods-note { font-size: 22px; color: var(--attn); text-align: center; min-height: 0; }
.active-mods { background: var(--panel-d); border-radius: 12px; padding: 10px 12px; display: flex; flex-direction: column; gap: 6px; }
.am-title { font-size: 28px; }
.am-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 20px; }
.am-opts { color: #dfe7e8; }
.ri-mods { text-align: center; font-size: 22px; margin-bottom: 8px; }
.lb-tabs { margin-bottom: 8px; }
.lb-mods { display: inline-block; margin-left: 6px; }
.lb-mods .mod-badge { font-size: 14px; padding: 2px 7px 0; margin: 0 2px; }

.mod-preview { display: inline-block; font-size: 0.7em; padding: 1px 6px; border-radius: 4px; background: #fda200; color: #1b1b1b; vertical-align: middle; letter-spacing: 1px; }

.mod-opts-toggle { margin: 4px 0; font-size: 0.85em; }

/* ------------------------------------------------- custom decks (the deck editor, ui/deckeditor.js) */
.nr-cdeck .btn { font-size: 26px; padding: 8px 18px; }
.nr-row .arrow:disabled { --b: #59676a; --bd: #3d4749; opacity: .55; }
.nr-cdeck-sum b { font-weight: normal; }
.lb-cdeck { display: inline-block; margin-left: 6px; font-size: 16px; padding: 2px 8px 0; border-radius: 6px; background: #8867a5; color: #fff; vertical-align: middle; }
.ri-cdeck b { font-weight: normal; }
.cd-list, .cd-editor { width: 900px; max-width: 100%; display: flex; flex-direction: column; gap: 10px; }
.portrait .cd-list, .portrait .cd-editor { width: 100%; }
.cd-status { font-size: 22px; text-align: center; }
.cd-acts { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.cd-h { font-size: 30px; margin-top: 6px; }
.cd-rows { display: flex; flex-direction: column; gap: 8px; }
.cd-row { display: flex; align-items: center; gap: 12px; background: var(--panel-d); border-radius: 14px; padding: 8px 10px; flex-wrap: wrap; }
.cd-back { width: 71px; height: 95px; display: block; filter: drop-shadow(3px 4px 0 rgba(0,0,0,.35)); flex: none; }
.cd-back.big { width: 106px; height: 142px; }
.cd-row-info { flex: 1; min-width: 200px; }
.cd-row-name { font-size: 30px; }
.cd-row-sub { font-size: 20px; color: #c6d1d3; margin-top: 4px; }
.cd-row-sub b { color: var(--attn); font-weight: normal; }
.cd-by { font-size: 20px; color: #c6d1d3; }
.cd-row-btns { display: flex; gap: 8px; flex-wrap: wrap; }
.cd-row-btns .btn { font-size: 22px; padding: 8px 12px; }
.cd-empty { font-size: 22px; padding: 6px 4px; }
.cd-input { font-family: inherit; font-size: 26px; padding: 8px 12px 6px; border-radius: 10px; border: 3px solid #bfc7d5; background: var(--panel-dd); color: #fff; min-width: 0; user-select: text; -webkit-user-select: text; }
.cd-name { font-size: 34px; width: 100%; text-align: center; }
.cd-desc { width: 100%; }
.cd-code { width: 100%; font-size: 20px; }
.cd-head { display: flex; gap: 10px; }
.cd-tabs { flex-wrap: wrap; margin-bottom: 0; }
.cd-tabs .btn { font-size: 24px; padding: 8px 12px; }
.cd-body { display: flex; flex-direction: column; gap: 10px; }
.cd-sec { background: var(--panel-d); border-radius: 14px; padding: 10px 12px; display: flex; flex-direction: column; gap: 8px; }
.cd-sec-t { font-size: 28px; }
.cd-line { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 22px; flex-wrap: wrap; }
.cd-line.changed > .cd-l { color: var(--attn); }
.cd-l { font-size: 22px; flex: 1; min-width: 180px; }
.cd-step { display: flex; align-items: center; gap: 6px; }
.cd-sb { font-size: 26px; padding: 6px 14px; min-width: 52px; }
.cd-num { width: 110px; text-align: center; }
.cd-tog { min-width: 96px; font-size: 22px; padding: 7px 12px; }
.cd-cyc { font-size: 22px; padding: 7px 12px; }
.cd-wrap { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.cd-chip { font-size: 20px; padding: 6px 10px; }
.cd-chip.on { --b: var(--red); --bd: var(--red-d); }
.cd-preset { font-size: 20px; padding: 7px 10px; }
.cd-art { display: flex; align-items: center; gap: 12px; justify-content: center; }
.cd-art .arrow { font-size: 44px; padding: 4px 12px 10px; min-height: 120px; }
.cd-art-n { font-size: 24px; text-align: center; min-width: 160px; }
.cd-art-n b { font-weight: normal; color: var(--attn); }
.cd-small { font-size: 18px; }
.cd-note { font-size: 20px; text-align: center; }
.cd-mods { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.cd-cards { display: flex; flex-direction: column; gap: 6px; }
.cd-cardrow { display: flex; flex-wrap: wrap; gap: 4px; }
.cd-pc { position: relative; padding: 0; border: 0; background: none; cursor: pointer; border-radius: 6px; touch-action: manipulation; }
.cd-pc:focus-visible, .cd-tile:focus-visible { outline: 3px solid var(--attn); }
.cd-pcimg { width: 50px; height: 67px; display: block; }
.cd-pcimg.big { width: 142px; height: 190px; }
.portrait .cd-pcimg { width: 44px; height: 59px; }
.portrait .cd-cardrow { gap: 3px; }
.cd-count { position: absolute; right: -2px; bottom: -2px; font-size: 16px; background: var(--attn); color: #fff; border-radius: 6px; padding: 1px 4px 0; }
.cd-carddlg { display: flex; gap: 14px; align-items: flex-start; width: 760px; max-width: 100%; flex-wrap: wrap; }
.portrait .cd-carddlg { width: 100%; }
.cd-cardpv { flex: none; }
.cd-cardopts { flex: 1; min-width: 300px; display: flex; flex-direction: column; gap: 8px; }
.cd-item { display: flex; align-items: center; gap: 10px; background: var(--panel-dd); border-radius: 10px; padding: 6px 8px; }
.cd-ithumb { width: 57px; height: 76px; flex: none; }
.cd-item-mid { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.cd-item-n { font-size: 24px; }
.cd-x { font-size: 22px; padding: 6px 12px; }
.cd-rgroup { gap: 6px; }
.cd-rhead { text-align: left; font-size: 26px; padding: 10px 12px; }
.cd-rgroup.open .cd-rhead { --b: var(--panel); }
.cd-rhead b { font-weight: normal; }
.cd-msg { font-size: 22px; text-align: center; color: var(--attn); min-height: 0; }
.cd-foot .btn.big { min-width: 220px; }
.cd-picker { width: 900px; max-width: 100%; display: flex; flex-direction: column; gap: 10px; }
.portrait .cd-picker { width: 100%; }
.cd-pick-top { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.cd-search { flex: 1; min-width: 200px; }
.cd-pick-note { font-size: 20px; }
.cd-pick-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 8px; }
.cd-tile { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 6px 4px; border: 0; border-radius: 10px; background: var(--panel-d); color: #fff; font-family: inherit; cursor: pointer; touch-action: manipulation; }
.cd-tile:hover { filter: brightness(1.15); }
.cd-tile .cd-thumb { width: 71px; height: 95px; }
.cd-tile-n { font-size: 17px; line-height: 1.05; text-align: center; }
.cd-modtag { display: block; font-size: 13px; color: #c6d1d3; }
.cd-tile { position: relative; }
.cd-tile[hidden] { display: none; }
.cd-tile.have { box-shadow: inset 0 0 0 3px var(--attn); }
.cd-have:empty { display: none; }
.cd-have { position: absolute; top: 4px; right: 4px; font-size: 16px; background: var(--attn); color: #fff; border-radius: 6px; padding: 1px 5px 0; }
.cd-pick-filters .cd-filter { font-size: 18px; padding: 6px 10px; }
.cd-filter.on { --b: var(--blue); --bd: var(--blue-d); }
/* the picker's pager: Prev / Page 3 / 42 / Next (big touch targets) */
.cd-pager { display: flex; align-items: center; justify-content: center; gap: 12px; }
.cd-pg { font-size: 24px; min-width: 150px; min-height: 64px; padding: 8px 16px; }
.cd-page-ind { font-size: 24px; min-width: 150px; text-align: center; }
.portrait .cd-pg { flex: 1; min-width: 0; }
.portrait .cd-page-ind { min-width: 0; flex: 1.2; }
.cd-share { width: 760px; max-width: 100%; display: flex; flex-direction: column; gap: 10px; font-size: 22px; }
.portrait .cd-share { width: 100%; }
.cd-confirm { display: flex; flex-direction: column; gap: 14px; align-items: center; }
.cd-confirm-t { font-size: 30px; text-align: center; }

/* ---------------------------------------------- run replays (?replay=) */
/* game over / win: the whole run's replay (stage px) */
.go-replay { display: flex; gap: 14px; flex-wrap: wrap; justify-content: center; }
.go-replay .btn { min-width: 250px; font-size: 28px; }
/* leaderboard: a row's run replay */
.lb-replay { display: inline-block; margin-right: 8px; padding: 2px 9px 0; border-radius: 8px; background: var(--green); color: #fff; text-decoration: none; box-shadow: 0 3px 0 var(--green-d); font-size: .85em; vertical-align: 1px; }
.lb-replay:hover { filter: brightness(1.12); }
/* main menu: the Replays list */
.replays { display: flex; flex-direction: column; gap: 10px; width: 820px; max-width: 100%; }
.portrait .replays { width: 100%; }
.rp-note { font-size: 22px; text-align: center; }
.rp-list { display: flex; flex-direction: column; gap: 8px; max-height: 62vh; overflow-y: auto; overscroll-behavior: contain; }
.rp-row { display: flex; align-items: center; gap: 12px; background: var(--panel-d); border-radius: 12px; padding: 10px 12px 8px; }
.rp-info { flex: 1; min-width: 0; }
.rp-top { font-size: 34px; }
.rp-sub { font-size: 22px; margin-top: 4px; line-height: 1.2; }
.rp-mods { margin-top: 4px; }
.rp-acts { display: flex; gap: 8px; flex: none; }
.rp-acts .btn { min-width: 64px; min-height: 60px; font-size: 26px; padding: 8px 10px 6px; }
.rp-empty { font-size: 26px; text-align: center; padding: 24px 0; }
.portrait .rp-row { flex-wrap: wrap; }
.portrait .rp-acts { width: 100%; justify-content: flex-end; }
/* the replay viewer's control bar (window px, outside the scaled stage) */
.replay-bar { position: fixed; left: 50%; bottom: max(8px, env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 58; width: min(940px, calc(100vw - 16px)); box-sizing: border-box;
	background: rgba(31,42,44,.94); border-radius: 14px; box-shadow: 0 5px 0 rgba(0,0,0,.35), inset 0 0 0 2px #4f6367; padding: 8px 10px 8px; color: #fff; font-family: 'm6x11', monospace; font-size: 18px;
	display: flex; flex-direction: column; gap: 6px; transition: transform .25s ease-out, opacity .25s; }
.replay-bar.tucked { transform: translate(-50%, calc(100% - 26px)); opacity: .85; }
.replay-bar .rb-handle { display: none; position: absolute; left: 50%; top: 0; transform: translateX(-50%); background: none; border: 0; color: #cfe8ff; font: inherit; font-size: 16px; padding: 4px 12px; cursor: pointer; }
.replay-bar.tucked .rb-handle { display: block; }
.replay-bar.tucked > :not(.rb-handle) { visibility: hidden; }
.rb-row { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.rb-btn { font: inherit; font-size: 18px; color: #fff; background: #4f6367; border: 0; border-radius: 8px; box-shadow: 0 3px 0 #2a3739; min-width: 40px; min-height: 36px; padding: 5px 9px 3px; cursor: pointer; }
.rb-btn:hover:not(:disabled) { filter: brightness(1.15); }
.rb-btn:disabled { opacity: .4; cursor: default; }
.rb-btn.rb-play { background: var(--blue); box-shadow: 0 3px 0 var(--blue-d); min-width: 52px; }
.rb-btn.rb-play.on { background: var(--orange); box-shadow: 0 3px 0 var(--orange-d); }
.rb-btn.rb-exit { background: var(--red); box-shadow: 0 3px 0 var(--red-d); margin-left: auto; }
.rb-speeds { display: flex; gap: 3px; margin-left: 6px; }
.rb-speed { min-width: 36px; padding: 5px 6px 3px; }
.rb-speed.on { background: var(--attn); box-shadow: 0 3px 0 #b86f00; }
.rb-count { margin-left: 8px; white-space: nowrap; }
.rb-count b { color: var(--attn); }
.rb-where { margin-left: 8px; color: #c6d1d3; }
.rb-scrub { position: relative; height: 26px; }
.rb-range { position: absolute; left: 0; right: 0; top: 4px; width: 100%; margin: 0; accent-color: var(--attn); height: 18px; cursor: pointer; }
.rb-marks { position: absolute; left: 8px; right: 8px; top: 0; bottom: 0; pointer-events: none; }
.rb-mark { position: absolute; top: 7px; width: 2px; height: 12px; margin-left: -1px; background: #8fa3a7; border-radius: 1px; }
.rb-mark.ante { top: 2px; height: 22px; width: 3px; background: var(--attn); }
.rb-mark.win { top: -4px; width: auto; height: auto; background: none; color: var(--money); font-size: 14px; transform: translateX(-50%); }
.rb-mark.stop { top: 0; height: 26px; width: 3px; background: var(--red); }
.rb-antes { display: flex; gap: 5px; overflow-x: auto; overscroll-behavior: contain; padding-bottom: 2px; scrollbar-width: thin; }
.rb-ante { flex: none; font-size: 15px; min-height: 28px; min-width: 0; padding: 4px 8px 2px; }
.rb-ante.on { background: var(--attn); box-shadow: 0 3px 0 #b86f00; }
.rb-ante.rb-win { background: #8a6d2a; }
.rb-note { font-size: 16px; color: #e8f0f1; background: rgba(75,194,146,.18); border-radius: 8px; padding: 5px 8px 3px; }
.rb-note.warn { background: rgba(254,95,85,.25); color: #ffd9d6; }
.b-watch-full { color: #9fd3ff; }
@media (max-width: 520px) {
	.replay-bar { font-size: 16px; padding: 6px 7px; gap: 5px; }
	.rb-btn { font-size: 16px; min-width: 38px; padding: 5px 7px 3px; }
	.rb-count { order: 10; width: 100%; margin-left: 0; text-align: center; }
	.rb-speeds { margin-left: 2px; }
}
.rb-exit .rb-x { display: none; }
body.has-replay-bar #pad-hints { bottom: calc(var(--rb-h, 130px) + max(14px, env(safe-area-inset-bottom))); }
body.has-replay-bar.rb-tucked #pad-hints { bottom: 40px; }
@media (max-width: 520px) {
	.rb-row { gap: 4px; }
	.rb-btn { min-width: 34px; min-height: 40px; padding: 5px 5px 3px; }
	.rb-speed { min-width: 32px; }
	.rb-exit .rb-xl { display: none; }
	.rb-exit .rb-x { display: inline; }
}

/* ---------------------------------------- challenges (screens.js challengesScreen; engine/challenge.js) */
.ch-modal .modal-box { width: 1240px; max-width: 96%; }
.challenges { display: flex; flex-direction: column; gap: 10px; flex-shrink: 0; }
.ch-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 24px; }
.ch-top .btn { font-size: 24px; padding: 8px 16px; }
.ch-main { display: grid; grid-template-columns: 330px 1fr; gap: 12px; align-items: start; min-height: 0; }
.ch-list { display: flex; flex-direction: column; gap: 6px; max-height: 60vh; overflow-y: auto; overscroll-behavior: contain; padding: 4px 6px 8px 2px; }
.ch-group { margin-top: 6px; font-size: 20px; }
.ch-group .mod-badge, .ch-group .badge { margin: 0; }
.badge.ch-base { background: var(--red); font-size: 17px; padding: 3px 10px 1px; border-radius: 7px; }
.btn.ch-item { --b: var(--panel-d); --bd: var(--panel-dd); font-size: 25px; padding: 9px 12px 7px; text-align: left; display: flex; justify-content: space-between; align-items: center; gap: 8px; box-shadow: inset 6px 0 0 var(--chc, var(--red)), 0 4px 0 var(--bd); }
.btn.ch-item.on { --b: #50676b; box-shadow: inset 6px 0 0 var(--chc, var(--red)), 0 4px 0 var(--bd), 0 0 0 3px #fff; }
.ch-tick { color: var(--green); font-size: 24px; }
.ch-detail { background: var(--panel-d); border-radius: 14px; padding: 12px; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.ch-head { font-size: 34px; text-align: center; }
.ch-head .mod-badge { font-size: 16px; }
.ch-done { font-size: 20px; color: var(--green); background: rgba(0,0,0,.25); border-radius: 8px; padding: 3px 8px 1px; vertical-align: middle; }
.ch-tabs { margin-bottom: 2px; }
.ch-tabs .btn { font-size: 24px; padding: 8px 14px; }
.ch-body { display: flex; flex-direction: column; gap: 10px; max-height: 40vh; overflow-y: auto; overscroll-behavior: contain; padding-right: 4px; }
.ch-sec { background: var(--panel); border-radius: 12px; padding: 8px 10px; }
.ch-sec-t { font-size: 22px; color: #c6d1d3; margin-bottom: 6px; }
.ch-lines { background: #fff; color: var(--text-dark); border-radius: 10px; padding: 8px 10px 6px; font-size: 24px; line-height: 1.12; text-align: center; }
.ch-lines .nr-name { font-size: 30px; }
.ch-cards { display: flex; flex-wrap: wrap; gap: 10px; }
.ch-cardw { display: flex; flex-direction: column; align-items: center; width: 92px; gap: 4px; }
.ch-card { width: 71px; height: 95px; filter: drop-shadow(3px 4px 0 rgba(0,0,0,.3)); }
.ch-cname { font-size: 17px; text-align: center; line-height: 1.05; }
.ch-ctag { color: var(--attn); font-size: 15px; }
.ch-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.badge.ch-chip { background: var(--grey); font-size: 20px; padding: 4px 10px 2px; border-radius: 8px; }
.ch-deckrow { display: flex; gap: 12px; align-items: center; }
.ch-deckrow .ch-lines { flex: 1; }
.ch-back { width: 85px; height: 114px; filter: drop-shadow(4px 5px 0 rgba(0,0,0,.35)); }
.ch-deckgrid { padding-left: 4px; }
.ch-deckgrid .dv-row .mini-card.ch-dcard { width: 54px; height: 72px; margin-right: -10px; }
.portrait .ch-deckgrid .dv-row .mini-card.ch-dcard { width: 40px; height: 54px; margin-right: -14px; }
.go-challenge { text-align: center; font-size: 24px; margin-top: -6px; }
.portrait .ch-modal .modal-box { width: 98%; max-width: 98%; }
.portrait .ch-main { grid-template-columns: 1fr; }
.portrait .ch-list { max-height: 30vh; display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.portrait .ch-group { grid-column: 1 / -1; }
.portrait .btn.ch-item { font-size: 22px; padding: 8px 8px 6px; }
.portrait .ch-body { max-height: none; overflow: visible; }

/* ------------------------------------------------ deck sleeves (New Run; engine/sleeve.js) */
.nr-sleeveview { width: 142px; display: flex; justify-content: center; }
.nr-sleeve-art { width: 110px; height: 143px; display: block; filter: drop-shadow(5px 7px 0 rgba(0,0,0,.35)); }
.nr-nosleeve { width: 110px; height: 143px; border: 4px dashed #8a9a9d; border-radius: 12px; display: flex; align-items: center; justify-content: center; text-align: center; color: #b9c6c8; font-size: 26px; }
.nr-sleeve .mod-badge { font-size: 14px; }
.nr-alt { background: var(--green); color: #fff; }
.portrait .nr-sleeveview { width: 106px; }
.portrait .nr-sleeve-art, .portrait .nr-nosleeve { width: 84px; height: 110px; }

/* ------------------------------------------------ deck skins (Options; ui/skins.js) */
.skins-box { background: var(--panel-d); border-radius: 12px; padding: 10px 12px; display: flex; flex-direction: column; gap: 8px; }
.sk-rows { display: flex; flex-direction: column; gap: 8px; }
.sk-row { display: grid; grid-template-columns: 120px 54px 1fr 54px; align-items: center; gap: 8px; background: var(--panel); border-radius: 10px; padding: 6px 8px; }
.sk-suit { font-size: 24px; }
.sk-arrow { font-size: 34px; padding: 6px 0 10px; }
.sk-mid { display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 0; }
.sk-cards { display: flex; gap: 0; }
.sk-card { width: 50px; height: 67px; margin-left: -12px; filter: drop-shadow(2px 3px 0 rgba(0,0,0,.3)); }
.sk-card:first-child { margin-left: 0; }
.sk-name { font-size: 19px; text-align: center; line-height: 1.05; }
.portrait .sk-row { grid-template-columns: 90px 46px 1fr 46px; }

/* ------------------------------------------ mod UI decorations (ui/modui.js; Pokermon's mods/pokermon/ui.js) */
.card-deco { position: absolute; inset: 0; pointer-events: none; }
.poke-type { position: absolute; left: 50%; top: -11px; transform: translateX(-50%); font-size: 15px; line-height: 1; padding: 3px 7px 1px; border-radius: 7px; color: #fff; white-space: nowrap;
	box-shadow: 0 2px 0 rgba(0,0,0,.35), inset 0 0 0 2px rgba(255,255,255,.25); text-shadow: 0 1px 0 rgba(0,0,0,.45); }
.poke-type.dark { color: #374244; text-shadow: none; }
.poke-type.tera { box-shadow: 0 2px 0 rgba(0,0,0,.35), 0 0 0 2px #fff, 0 0 8px 2px rgba(255,255,255,.8); }
.poke-pips { position: absolute; left: 50%; bottom: -9px; transform: translateX(-50%); display: flex; gap: 3px; align-items: center; background: rgba(31,42,44,.85); padding: 3px 5px; border-radius: 8px; }
.poke-pips .pip { display: block; width: 9px; height: 9px; border-radius: 50%; box-shadow: inset 0 0 0 2px #9fb0b3; }
.poke-pips .pip.on { box-shadow: inset 0 0 0 1px rgba(0,0,0,.3); }
.poke-pips .pip.on.c { background: #c8c0f8; }
.poke-pips .pip-more { font-size: 13px; color: #fff; margin-left: 2px; }
.portrait .poke-type { font-size: 13px; top: -9px; padding: 2px 5px 0; }
.card-btns .btn.modui { --b: var(--blue); --bd: var(--blue-d); }

/* ------------------------------------------------ the Pokédex (mods/pokermon/ui.js openPokedex) */
.dex-modal .modal-box { width: 900px; max-width: 96%; }
.pokedex { display: flex; flex-direction: column; gap: 12px; }
.dex-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.btn.dex-card { --b: var(--panel-d); --bd: var(--panel-dd); display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 10px 8px 8px; width: 150px; }
.btn.dex-card.on { box-shadow: 0 4px 0 var(--bd), 0 0 0 4px #fff; --b: #50676b; }
.btn.dex-card.is-you .dex-cname::after { content: ' ★'; color: var(--attn); }
.dex-canvas { width: 106px; height: 142px; filter: drop-shadow(4px 5px 0 rgba(0,0,0,.35)); }
.dex-cname { font-size: 22px; text-align: center; line-height: 1.05; text-shadow: 0 2px 0 rgba(0,0,0,.4); }
.dex-row.many .btn.dex-card { width: 124px; }
.dex-row.many .dex-canvas { width: 85px; height: 114px; }
.dex-info { background: var(--panel-d); border-radius: 14px; padding: 10px; text-align: center; display: flex; flex-direction: column; gap: 6px; }
.dex-name { font-size: 34px; }
.dex-badges .badge { font-size: 18px; padding: 3px 10px 1px; border-radius: 7px; margin: 0 3px; }
.badge.dex-stage { background: var(--grey); }
.dex-body { text-align: center; }
.portrait .btn.dex-card { width: 118px; padding: 8px 4px 6px; }
.portrait .dex-canvas { width: 80px; height: 107px; }
.portrait .dex-cname { font-size: 18px; }

/* ------------------------------------- Pokermon run badges (Nuzlocke / Monotype) + achievements */
.hud-rbadges { display: none; flex-wrap: wrap; gap: 8px; }
.hud.has-rb .hud-rbadges { display: flex; }
.portrait .hud-rbadges { position: absolute; left: 0; top: calc(100% + 8px); max-width: 52%; }
.portrait .hud.has-rb .hud-tags { max-width: 46%; justify-content: flex-end; }
.rb-pill { display: inline-block; padding: 6px 14px 3px; border-radius: 10px; font-size: 24px; line-height: 1.1; color: #fff; background: #7a8a8d; box-shadow: 0 3px 0 rgba(0,0,0,.3); white-space: nowrap; text-shadow: 0 2px 0 rgba(0,0,0,.25); }
.rb-pill.rb-nuz { background: #24407a; }
.portrait .hud-rbadges .rb-pill { font-size: 22px; padding: 5px 12px 2px; }
.rb-pill.rb-sm { font-size: 16px; padding: 2px 8px 0; border-radius: 7px; margin-left: 4px; vertical-align: middle; box-shadow: 0 2px 0 rgba(0,0,0,.25); }
.rb-toast { position: absolute; left: 50%; bottom: 220px; z-index: 56; transform: translateX(-50%); background: #5b3f8f; padding: 10px 22px 8px; border-radius: 12px; font-size: 28px; opacity: 0; pointer-events: none; box-shadow: 0 5px 0 #3b2862; max-width: 92%; width: max-content; text-align: center; line-height: 1.15; white-space: pre-line; }
.rb-toast.show { animation: rbtoast 3.4s ease-out forwards; }
@keyframes rbtoast { 0% { opacity: 0; transform: translate(-50%, 20px); } 8% { opacity: 1; transform: translate(-50%, 0); } 85% { opacity: 1; } 100% { opacity: 0; } }
.ach-toast { position: absolute; left: 50%; top: 22px; z-index: 80; transform: translateX(-50%); min-width: 420px; max-width: 92%; background: linear-gradient(180deg, #f3c45a, #d9982b); color: #3a2a08; border-radius: 16px; padding: 12px 24px 10px; text-align: center; box-shadow: 0 6px 0 #9a6a14, 0 0 30px rgba(243,196,90,.45); pointer-events: none; animation: achin .45s ease-out; }
.ach-toast.out { transition: opacity .4s, transform .4s; opacity: 0; transform: translate(-50%, -20px); }
.ach-t-l { font-size: 20px; letter-spacing: 1px; text-transform: uppercase; opacity: .85; }
.ach-t-n { font-size: 38px; color: #fff; text-shadow: 0 3px 0 rgba(0,0,0,.3); }
.ach-t-d { font-size: 20px; line-height: 1.15; }
@keyframes achin { 0% { opacity: 0; transform: translate(-50%, -30px) scale(.8); } 70% { transform: translate(-50%, 0) scale(1.05); } 100% { opacity: 1; transform: translate(-50%, 0) scale(1); } }
.go-badges { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; align-items: center; font-size: 26px; }
.go-badges .rb-pill { font-size: 26px; }
.rp-badges { margin-top: 4px; }
.rp-badges .rb-pill { font-size: 17px; padding: 2px 9px 0; border-radius: 7px; margin-right: 4px; }
.ach-screen { width: 760px; max-width: 100%; display: flex; flex-direction: column; gap: 10px; }
.portrait .ach-screen { width: 100%; }
.ach-list { display: flex; flex-direction: column; gap: 8px; max-height: 62vh; overflow-y: auto; overscroll-behavior: contain; }
.ach-row { display: flex; gap: 14px; align-items: center; background: var(--panel-d); border-radius: 12px; padding: 10px 14px 8px; }
.ach-ico { flex: 0 0 52px; height: 52px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 30px; background: var(--panel-dd); color: #6c7c7f; }
.ach-row.on .ach-ico { background: linear-gradient(180deg, #f3c45a, #d9982b); color: #fff; text-shadow: 0 2px 0 rgba(0,0,0,.3); }
.ach-row:not(.on) .ach-name { color: #aab6b8; }
.ach-name { font-size: 28px; }
.ach-desc { font-size: 20px; color: #dfe7e8; line-height: 1.15; }
.ach-when { font-size: 18px; color: var(--money); }
.rec-sum { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.rec-stat { position: relative; background: var(--panel-d); border-radius: 12px; padding: 8px; text-align: center; }
.rec-stat b { display: block; font-size: 40px; color: var(--attn); }
.rec-stat span { font-size: 20px; color: #dfe7e8; }
.rec-types { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.portrait .rec-types { grid-template-columns: repeat(3, 1fr); }
.rec-type { border-radius: 10px; padding: 8px 6px 6px; text-align: center; font-size: 22px; box-shadow: 0 3px 0 rgba(0,0,0,.3); }
.rec-type.off { background: var(--panel-dd) !important; color: #6c7c7f !important; box-shadow: none; }
.rec-type small { display: block; font-size: 17px; opacity: .9; }
/* the Record's win stickers (stickers.js specialStickerHTML): the Pokémon in its best stake's ring, like on a card */
.wstk { --wstk-ring: #ffffff; display: inline-flex; align-items: center; justify-content: center; box-sizing: border-box; width: 50px; height: 50px; border-radius: 50%; background: #f2f4f5; border: 5px solid var(--wstk-ring); box-shadow: 0 0 0 2px #4f6367, 0 2px 0 2px rgba(0,0,0,.25); flex: none; }
.wstk img { width: 80%; height: 80%; object-fit: contain; pointer-events: none; }
.wstk.wstk-off { background: rgba(0,0,0,.18); border: 3px dashed rgba(255,255,255,.35); box-shadow: none; }
.wstk.wstk-off img { filter: grayscale(1) brightness(.6); opacity: .35; }
.rec-stat .rec-stk { position: absolute; top: 6px; right: 6px; width: 40px; height: 40px; }
.rec-type { position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px; }
.rec-type .rec-stk { margin-bottom: 2px; }
.rec-type.off .rec-stk { opacity: .7; }
.rec-type .rec-tn { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.rec-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; font-size: 19px; color: #dfe7e8; }
.rec-legend .wstk.sm { width: 30px; height: 30px; border-width: 3px; }
.rec-legend .muted { margin-left: 6px; }
.portrait .rec-stat .rec-stk { position: static; display: inline-flex; width: 44px; height: 44px; border-width: 4px; }
.portrait .rec-stat b { font-size: 34px; }
.portrait .rec-type { font-size: 20px; }
.portrait .rec-type .rec-stk { width: 58px; height: 58px; border-width: 5px; }
.rec-note { font-size: 19px; color: #c6d1d3; line-height: 1.2; }
/* the Decks record (screens.js decksPanel): a deck's back in its best stake's ring; never won = dimmed */
.dk-sum .rec-stat { padding: 6px 8px; }
.dk-sum .rec-stat b { font-size: 34px; line-height: 1.1; }
.dk-sum .rec-stat b small { font-size: 22px; color: #dfe7e8; }
.dk-sum .rec-stat span { font-size: 18px; }
.dk-rec .rec-note, .dk-rec .rec-legend { font-size: 17px; }
.dk-chip { position: absolute; top: 8px; right: 8px; width: 28px; height: 28px; border-radius: 50%; box-sizing: border-box; border: 6px solid var(--ring); box-shadow: 0 0 0 2px #4f6367; }
.dk-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.portrait .dk-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.dk-tile { min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 2px; background: var(--panel-d); border-radius: 10px; padding: 6px 4px 4px; text-align: center; box-shadow: 0 3px 0 rgba(0,0,0,.3); }
.dk-tile[hidden] { display: none; }
.dk-art { --ring: transparent; border-radius: 8px; box-shadow: 0 0 0 4px var(--ring); margin: 4px 0 3px; line-height: 0; }
.dk-back { width: 71px; height: 95px; display: block; }
.dk-name { font-size: 18px; line-height: 1.05; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dk-best { font-size: 16px; color: #dfe7e8; }
.dk-stake { color: var(--attn); }
.dk-tile.off { background: var(--panel-dd); box-shadow: none; color: #6c7c7f; }
.dk-tile.off .dk-best { color: #6c7c7f; }
.dk-tile.off .dk-back { filter: grayscale(1) brightness(.6); opacity: .55; }
.dk-ring-key { display: inline-block; width: 26px; height: 26px; border-radius: 50%; box-sizing: border-box; border: 5px solid var(--ring); box-shadow: 0 0 0 2px #4f6367; }
.portrait .dk-chip { position: static; display: block; margin: 0 auto 2px; width: 24px; height: 24px; border-width: 5px; }
.portrait .dk-name { font-size: 17px; }
.ri-rb { display: flex; flex-direction: column; gap: 10px; font-size: 24px; }
.ri-rb .rb-row { display: flex; gap: 12px; align-items: center; background: var(--panel-d); border-radius: 10px; padding: 8px 12px 6px; }
.ri-rb .rb-off { color: #fe8a80; }
.ri-deck { display: flex; align-items: center; justify-content: center; gap: 10px; font-size: 22px; margin-bottom: 8px; }
.ri-back { width: 54px; height: 72px; flex: 0 0 54px; }
.rb-toast.warn { background: #6b5a2a; box-shadow: 0 5px 0 #463a18; }
.rb-pill.rb-risk { outline: 3px dashed #fda200; outline-offset: 1px; }
