/* poketactica.css — the board's HUD and the camp's screens on the Balatro kit (site/ui/balatro.css). A canvas redrawn every
   frame must not sit on the kit's fixed felt (site/ui/README.md): the page uses the flat --bal-bg (the canvas stops drawing
   while the camp covers it). Layout: Disgaea's — the turn and the gauge on top, the unit under the cursor in a corner, one
   command window; on a phone held upright the command window is a sheet over the bottom bar. */
html, body { height: 100%; margin: 0; overflow: hidden; }
[hidden] { display: none !important; }   /* (the panels set display: flex / grid, which would otherwise beat the hidden attribute) */
html body.bal-page { background: var(--bal-bg); touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
#c, #nums { position: fixed; inset: 0; width: 100%; height: 100%; display: block; }
#nums { pointer-events: none; }

/* ---------------------------------------------------------------- the battle */
.pt-top {
	position: fixed; top: calc(env(safe-area-inset-top, 0px) + 44px); left: max(12px, env(safe-area-inset-left, 0px)); right: max(12px, env(safe-area-inset-right, 0px));
	display: flex; gap: 10px; align-items: center; flex-wrap: wrap; pointer-events: none;
}
.pt-gauge { margin-left: auto; display: flex; align-items: center; gap: 6px; min-width: 160px; pointer-events: auto; }
.pt-gauge .bal-bar { flex: 1; min-width: 90px; }
.pt-gauge-label { font-family: var(--bal-font, m6x11, monospace); color: var(--bal-gold, #f5c542); }
/* what to do next ("Tap a blue tile to move"): one line under the top bar */
.pt-hint {
	position: fixed; left: 50%; transform: translateX(-50%); top: calc(env(safe-area-inset-top, 0px) + 80px); max-width: calc(100vw - 24px);
	font-family: var(--bal-font, m6x11, monospace); font-size: 17px; color: #fff; background: rgba(20, 28, 30, .78); border-radius: 8px; padding: 4px 12px;
	pointer-events: none; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.pt-hint:empty { display: none; }
.pt-hint .bal-key { font-size: 13px; }

.pt-unit {
	position: fixed; left: max(12px, env(safe-area-inset-left, 0px)); bottom: calc(env(safe-area-inset-bottom, 0px) + 70px);
	width: min(300px, calc(100vw - 24px)); padding: 10px; display: flex; flex-direction: column; gap: 6px;
}
.pt-unit-head { display: flex; justify-content: space-between; align-items: center; gap: 6px; }
.pt-row { display: flex; justify-content: space-between; gap: 8px; font-variant-numeric: tabular-nums; }
.pt-more { display: none; }
.pt-unit.pt-open .pt-more { display: block; }
.pt-moves { margin: 4px 0 0; padding-left: 16px; font-size: 14px; }
.pt-ustats { font-size: 13px; font-variant-numeric: tabular-nums; }
.pt-geo { font-size: 13px; }
.pt-geo:empty { display: none; }

/* the command window */
.pt-menu {
	position: fixed; right: max(12px, env(safe-area-inset-right, 0px)); bottom: calc(env(safe-area-inset-bottom, 0px) + 70px);
	padding: 10px; display: flex; flex-direction: column; gap: 6px; min-width: 220px; max-width: min(340px, calc(100vw - 24px)); max-height: calc(100vh - 200px);
}
.pt-menu-title { font-family: var(--bal-font, m6x11, monospace); color: var(--bal-gold, #f5c542); font-size: 18px; }
.pt-menu-title:empty { display: none; }
.pt-menu-items { display: flex; flex-direction: column; gap: 6px; overflow-y: auto; }
.pt-menu .bal-btn { justify-content: space-between; text-align: left; }
.pt-menu .bal-btn small { opacity: .8; margin-left: 8px; }
.pt-menu .bal-btn.is-focus, .ph-root .is-focus { outline: 3px solid var(--bal-gold, #f5c542); outline-offset: 2px; }

.pt-bar {
	position: fixed; left: 0; right: 0; bottom: 0; padding: 8px max(12px, env(safe-area-inset-right, 0px)) calc(env(safe-area-inset-bottom, 0px) + 8px) max(12px, env(safe-area-inset-left, 0px));
	display: flex; gap: 6px; justify-content: center; align-items: center; flex-wrap: nowrap;
}
.pt-cam { display: flex; gap: 4px; margin-right: auto; }
.pt-bar .bal-btn { white-space: nowrap; }
.pt-n:empty { display: none; }
.pt-n { background: rgba(0,0,0,.25); border-radius: 6px; padding: 0 5px; margin-right: 4px; }
.pt-banner {
	position: fixed; left: 50%; top: 38%; transform: translate(-50%, -50%); font-family: var(--bal-font, m6x11, monospace);
	font-size: clamp(30px, 7vw, 56px); color: #fff; text-shadow: 0 4px 0 rgba(0,0,0,.55); pointer-events: none; white-space: nowrap;
}
.pt-banner.pt-in { animation: pt-pop .9s ease-out; }
@keyframes pt-pop { 0% { transform: translate(-50%, -50%) scale(.6); opacity: 0; } 20% { transform: translate(-50%, -50%) scale(1.08); opacity: 1; } 80% { opacity: 1; } 100% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .pt-banner.pt-in { animation: none; } }
/* a campaign map's tip: what the map teaches, shown as it starts (any key, button or tap on it closes it) */
.pt-tip { position: fixed; left: 50%; top: calc(env(safe-area-inset-top, 0px) + 56px); transform: translateX(-50%); z-index: 1050; width: min(560px, calc(100vw - 32px)); font-size: 16px; line-height: 1.35; cursor: pointer; }
.pt-tip b { display: block; font-size: 18px; margin-bottom: 4px; }
.pt-tip small { display: block; margin-top: 6px; opacity: .7; }
.pt-toast { position: fixed; left: 50%; bottom: calc(env(safe-area-inset-bottom, 0px) + 74px); transform: translateX(-50%); z-index: 1100; }
.pt-boot { position: fixed; inset: 0; display: grid; place-items: center; font-family: var(--bal-font, m6x11, monospace); font-size: 24px; color: #fff; background: var(--bal-bg); z-index: 2000; }

/* a phone held upright: the unit panel under the hint, the command window a two-column sheet over the bottom bar */
@media (max-width: 640px) {
	.pt-top { gap: 6px; }
	.pt-gauge { min-width: 120px; }
	.pt-hint { font-size: 15px; top: calc(env(safe-area-inset-top, 0px) + 78px); }
	.pt-unit { bottom: auto; top: calc(env(safe-area-inset-top, 0px) + 108px); right: max(12px, env(safe-area-inset-right, 0px)); width: auto; padding: 8px; gap: 4px; }
	.pt-menu { left: max(8px, env(safe-area-inset-left, 0px)); right: max(8px, env(safe-area-inset-right, 0px)); bottom: calc(env(safe-area-inset-bottom, 0px) + 58px); max-width: none; min-width: 0; max-height: 46vh; padding: 8px; }
	.pt-menu-items { display: grid; grid-template-columns: 1fr 1fr; }
	.pt-menu .bal-btn { min-height: 44px; flex-wrap: wrap; row-gap: 0; }
	.pt-menu .bal-btn small { margin-left: 0; font-size: 12px; width: 100%; }
	.pt-cam .bal-btn { padding-left: 8px; padding-right: 8px; }
	.pt-bar .bal-btn { padding-left: 10px; padding-right: 10px; }
	.pt-bar .bal-key { display: none; }
}
/* short screens (a phone on its side): everything smaller; the command window on the right, the unit on the left */
@media (max-height: 500px) {
	.pt-top { top: calc(env(safe-area-inset-top, 0px) + 8px); padding-right: 52px; }
	.pt-hint { top: calc(env(safe-area-inset-top, 0px) + 42px); font-size: 14px; }
	.pt-unit { width: min(240px, 36vw); bottom: auto; top: calc(env(safe-area-inset-top, 0px) + 72px); right: auto; padding: 6px; font-size: 14px; }
	.pt-menu { left: auto; bottom: calc(env(safe-area-inset-bottom, 0px) + 54px); max-height: calc(100vh - 110px); min-width: 200px; max-width: 46vw; }
	.pt-menu-items { display: flex; }
	.pt-menu .bal-btn { min-height: 34px; padding-top: 2px; padding-bottom: 2px; }
	.pt-bar { padding-top: 4px; padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 4px); }
	.pt-bar .bal-btn { min-height: 36px; }
}
/* a touch screen: no key caps on the battle's buttons; the Back button shows while something is chosen */
@media (hover: none) and (pointer: coarse) { .pt-bar .bal-key, .pt-menu .bal-key { display: none; } }

/* watching (?spectate= / ?replay=): no play controls; a replay has its own bar above the camera buttons */
.pt-watch #b-exec, .pt-watch #b-end, .pt-watch #b-back, .pt-watch #hint { display: none !important; }
.pt-rpbar { position: fixed; left: 50%; bottom: 64px; transform: translateX(-50%); display: flex; gap: 6px; align-items: center; flex-wrap: wrap; justify-content: center; max-width: calc(100vw - 32px); padding: 6px 8px; z-index: 6; }

/* ---------------------------------------------------------------- the camp (js/hub.js) */
/* the top bar's ⚙️ (Games switcher) stays above the camp: .ph-screen leaves it room (top 52px upright, right 60px on its side) */
body #mp-topbar.tb-compact { z-index: 950; }
.ph-root {
	position: fixed; inset: 0; z-index: 900; overflow: hidden; color: #fff;
	background: radial-gradient(ellipse at 50% 30%, #2d4a3e 0%, #1c2e27 55%, var(--bal-bg) 100%);
	font-family: var(--bal-font, m6x11, monospace);
}
.ph-screen {
	box-sizing: border-box; height: 100%; max-width: 1120px; margin: 0 auto; display: flex; flex-direction: column; gap: 10px;
	padding: calc(env(safe-area-inset-top, 0px) + 52px) max(16px, env(safe-area-inset-right, 0px)) calc(env(safe-area-inset-bottom, 0px) + 14px) max(16px, env(safe-area-inset-left, 0px));
}
.ph-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.ph-head .bal-h2 { margin: 0; flex: 1; min-width: 0; }
.ph-head .ph-wallet, .ph-head .ph-sortie { margin-left: auto; }
.ph-logo { font-size: clamp(34px, 7vw, 60px); line-height: 1; flex: 1; }
.ph-logo-sm { font-size: 26px; flex: 0 0 auto; }
.ph-wallet .bal-badge { font-size: 18px; }
.ph-sub { margin: 0; }
.ph-body { flex: 1; min-height: 0; display: flex; gap: 14px; }
.ph-menu, .ph-list { flex: 1.3; display: flex; flex-direction: column; gap: 8px; overflow-y: auto; padding: 4px; min-width: 0; }
.ph-grid { flex: 1.5; min-width: 0; overflow-y: auto; padding: 6px; display: grid; grid-template-columns: repeat(auto-fill, minmax(108px, 1fr)); gap: 10px; align-content: start; }
.ph-side { flex: 1; max-width: 400px; min-width: 0; padding: 14px; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; }
.ph-side p { margin: 6px 0; line-height: 1.3; }
.ph-side .bal-h3 { margin: 0 0 4px; }
.ph-stats { border-top: 2px solid var(--bal-panel-line, #46595d); padding-top: 8px; display: flex; flex-direction: column; gap: 4px; }
.ph-stats b { color: #fff; }

/* a figurine's own tools at the foot of its screen (favourite, release) */
.ph-tools-end { margin: 10px 0 4px; }
/* the camp home's Goals button: one wide row under the list */
.ph-home > .ph-head { order: -2; }
.ph-homegoals { order: -1; flex: none; padding: 0 4px; }
.ph-homegoals .ph-goalsbtn { flex-direction: row; align-items: center; gap: 12px; padding-top: 8px; padding-bottom: 8px; }
/* Goals: a task's progress bar on its row */
.ph-goal-bar { flex: 0 0 90px; height: 8px; border-radius: 4px; background: rgba(0, 0, 0, .35); overflow: hidden; }
.ph-goal-bar > span { display: block; height: 100%; background: #ffd23c; }
.ph-wait { margin-left: 6px; }
/* the Squad's two tools above the grid (sort, show) */
.ph-squad-tools { display: flex; gap: 8px; flex-wrap: wrap; padding: 0 4px 6px; flex: none; }
.ph-squad-tools .ph-row { width: auto; flex: 1 1 200px; max-width: 340px; min-height: 40px; }
/* the camp home's groups: Play, Figurines, Shop and more */
.ph-group { margin: 8px 2px 0; font-size: 15px; letter-spacing: .08em; text-transform: uppercase; color: var(--bal-muted, #c9d1d4); opacity: .9; flex: none; }
.ph-group:first-child { margin-top: 0; }
.ph-wide { width: 100%; display: flex; flex-direction: column; align-items: flex-start; text-align: left; gap: 2px; padding-top: 10px; padding-bottom: 10px; }
.ph-big { font-size: 24px; }
.ph-wide small { opacity: .9; font-size: 15px; }
/* a list row: its name, then what it says and its badges. When they do not fit on one line (a phone) they go onto the next,
   and the name is never squeezed under them (owner, 2026-11-24: "Road" ran into "enemies walk a fixed road") */
.ph-row { width: 100%; display: flex; flex-wrap: wrap; align-items: center; gap: 2px 10px; justify-content: flex-start; text-align: left; min-height: 48px; }
.ph-row-name { flex: 1 1 auto; min-width: min-content; }
/* screens that read at a glance (the modes plan, A1/A2): a row's badges are one group; a detail panel is labelled facts */
.ph-row-tags { display: inline-flex; flex-wrap: nowrap; gap: 6px; align-items: center; margin-left: auto; }
.ph-row-tags .bal-badge { white-space: nowrap; }
.ph-row:has(.ph-row-tags) { height: auto; padding-top: 8px; padding-bottom: 10px; flex-shrink: 0; }   /* (the badges under the name on a narrow screen: the row grows to hold them) */
.ph-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 6px; margin: 8px 0; }
.ph-fact { display: flex; flex-direction: column; gap: 1px; padding: 6px 8px; border-radius: 8px; background: rgba(0, 0, 0, .25); min-width: 0; }
.ph-fact small { font-size: 13px; opacity: .7; text-transform: uppercase; letter-spacing: .04em; }
.ph-fact b { font-size: 18px; font-weight: normal; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ph-tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0; }
.ph-blurb { margin: 2px 0; } .ph-fine { font-size: 14px; margin: 4px 0 0; }
@media (max-width: 600px) {
	.ph-head .bal-h2 { flex: 1 1 55%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
	.ph-facts { grid-template-columns: 1fr 1fr; }
}
.ph-row > small { min-width: 0; }
.ph-row small { opacity: .85; }
.ph-no { opacity: .85; min-width: 2.4em; }
.ph-tick { font-size: 20px; }
.ph-tabs { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.ph-tabkeys { margin-left: auto; display: flex; gap: 4px; }
.is-disabled { opacity: .55; }

.ph-card {
	position: relative; font: inherit; color: #fff; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 2px;
	padding: 8px 4px 6px; border-radius: 12px; border: 3px solid var(--bal-panel-line, #46595d); background: var(--bal-panel-d, #2a3739);
	box-shadow: 0 4px 0 var(--bal-panel-dd, #1f2a2c); transition: transform .08s;
}
.ph-card:hover { transform: translateY(-2px); }
.ph-card.is-on { border-color: var(--bal-green, #4bc292); background: #2c4a40; }
.ph-card img { width: 72px; height: 72px; image-rendering: pixelated; object-fit: contain; pointer-events: none; }
.ph-card-name { font-size: 16px; text-align: center; line-height: 1.05; }
.ph-card-lv { font-size: 14px; opacity: .85; }
.ph-td-none { color: var(--bal-red, #fe5f55); }
/* permanent loss: the risk tag on the team screen, the fallen in the results and the memorial */
.ph-risk { font-size: 13px; }
.ph-fallen .ph-card img { filter: grayscale(1) opacity(.7); }
.pt-fallen { border-left: 4px solid var(--bal-red, #fe5f55); padding-left: 10px; margin: 8px 0; }
/* the Figurine book: owned in colour, met greyed, not yet a silhouette (the name still shows: the book says where to find it) */
.ph-book-none img { filter: brightness(0) opacity(.45); }
.ph-book-met img { filter: grayscale(1) opacity(.75); }
.ph-book-none .ph-card-name, .ph-book-met .ph-card-name { opacity: .7; }
.ph-card .ph-badge.ph-dexno { top: 3px; left: 5px; height: auto; min-width: 0; padding: 0; font-size: 12px; background: none; box-shadow: none; color: rgba(255,255,255,.55); }
/* nine generations: one row that scrolls sideways (inside itself: the page never does) */
.ph-booktabs { gap: 4px; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: thin; padding-bottom: 4px; }
.ph-booktabs .bal-tab { flex: 0 0 auto; padding-left: 8px; padding-right: 8px; }
.ph-booktabs .bal-tab small { opacity: .7; }
@media (max-width: 700px) { .ph-booktabs .bal-tab { padding: 4px 8px; font-size: 15px; } .ph-booktabs .bal-tab small { display: block; font-size: 11px; } }
.ph-ways { margin: 4px 0 8px; padding-left: 18px; }
.ph-ways li { margin: 3px 0; }
.ph-badge { position: absolute; top: 4px; left: 6px; min-width: 22px; height: 22px; border-radius: 11px; background: var(--bal-orange, #fda200); color: #fff; font-size: 15px; display: grid; place-items: center; box-shadow: 0 2px 0 var(--bal-orange-d, #c27c00); }
.ph-types { display: flex; gap: 3px; flex-wrap: wrap; justify-content: center; }
.ph-type { display: inline-block; padding: 0 6px; border-radius: 5px; font-size: 13px; color: #fff; text-shadow: 0 1px 0 rgba(0,0,0,.5); line-height: 1.5; }
.ph-pill-row { display: flex; gap: 6px; flex-wrap: wrap; }
.ph-fig { display: flex; gap: 12px; align-items: center; }
.ph-fig img { width: 88px; height: 88px; image-rendering: pixelated; object-fit: contain; background: var(--bal-panel-dd, #1f2a2c); border-radius: 10px; }
.ph-note { font-size: 13px; }
.ph-statt { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.ph-statt td { padding: 2px 6px; background: var(--bal-panel-d, #2a3739); border: 2px solid var(--bal-panel, #3a4b4f); }
.ph-statt td:nth-child(odd) { color: var(--bal-text-muted, #a9b4b8); }
.ph-moves { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 4px; }
.ph-help { flex: 1; min-height: 0; overflow-y: auto; padding: 16px 18px; font-size: 18px; line-height: 1.35; }
.ph-help p { margin: 0 0 10px; }
.ph-keys { width: 100%; border-collapse: collapse; font-size: 16px; }
.ph-keys th, .ph-keys td { text-align: left; padding: 5px 8px; border-bottom: 2px solid var(--bal-panel-line, #46595d); }
.ph-keys th { color: var(--bal-gold, #f5c542); }
.ph-foot { text-align: center; font-size: 14px; }
@media (hover: none) and (pointer: coarse) { .ph-foot, .ph-tabkeys, .ph-root .bal-key { display: none; } }

/* the camp on a phone held upright: one column; the details under the list */
@media (max-width: 700px) {
	.ph-screen { gap: 8px; padding-left: 10px; padding-right: 10px; }
	.ph-body { flex-direction: column; gap: 8px; }
	.ph-side { max-width: none; flex: 0 0 auto; max-height: 36vh; padding: 10px; }
	.ph-logo-sm { display: none; }
	.ph-home .ph-menu { flex: 0 0 auto; }
	.ph-home .ph-side { max-height: none; flex: 1 1 auto; }
	.ph-grid { grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 8px; }
	.ph-card img { width: 60px; height: 60px; }
	.ph-big { font-size: 20px; }
	.ph-wide { padding-top: 6px; padding-bottom: 6px; }
	.ph-fig img { width: 64px; height: 64px; }
	.ph-help { font-size: 16px; padding: 12px; }
	.ph-keys { font-size: 13px; }
	.ph-keys th, .ph-keys td { padding: 4px; }
}
/* the camp on a phone on its side: side by side, smaller */
@media (max-height: 500px) {
	.ph-screen { padding-top: calc(env(safe-area-inset-top, 0px) + 10px); padding-right: max(60px, env(safe-area-inset-right, 0px)); gap: 6px; }
	.ph-body { flex-direction: row; }
	.ph-side { max-height: none; }
	.ph-logo { font-size: 30px; }
	.ph-wide { padding-top: 4px; padding-bottom: 4px; }
	.ph-big { font-size: 18px; }
	.ph-wide small { font-size: 13px; }
	.ph-row { min-height: 38px; }
	.ph-card img { width: 52px; height: 52px; }
	.ph-foot { display: none; }
}

/* ---------------------------------------------------------------- playability batch 2 (owner, 2026-11-21) */
/* the forecast while aiming: each target's hit chance, damage and KO; its HP bar shows what is left after the low and high roll */
.pt-fc { position: fixed; right: max(12px, env(safe-area-inset-right, 0px)); top: calc(env(safe-area-inset-top, 0px) + 112px); width: min(300px, calc(100vw - 24px)); padding: 10px; display: flex; flex-direction: column; gap: 8px; z-index: 5; }
.pt-fc-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; font-family: var(--bal-font, m6x11, monospace); }
.pt-fc-head b { color: var(--bal-gold, #f5c542); font-size: 18px; }
.pt-fc-row { display: flex; flex-direction: column; gap: 3px; }
.pt-fc-own b { color: #8fd0ff; }
.pt-fc-top { display: flex; align-items: center; gap: 6px; font-variant-numeric: tabular-nums; }
.pt-fc-top b { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pt-fc-hit { background: rgba(0,0,0,.3); border-radius: 6px; padding: 0 6px; }
.pt-fc-dmg { color: #ff9a8a; font-size: 18px; min-width: 3.2em; text-align: right; }
.pt-fc-bar { position: relative; height: 8px; }
.pt-fc-bar .pt-fc-left { background: var(--bal-green, #4bc292); }
.pt-fc-range { position: absolute; top: 0; bottom: 0; background: repeating-linear-gradient(45deg, #f5c542, #f5c542 3px, #c98a1a 3px, #c98a1a 6px); }
/* the first battle's coach */
.pt-coach { position: fixed; left: 50%; transform: translateX(-50%); top: calc(env(safe-area-inset-top, 0px) + 112px); width: min(520px, calc(100vw - 24px)); padding: 10px 12px; z-index: 6; font-size: 17px; line-height: 1.3; }
.pt-coach-head { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.pt-coach-head b { flex: 1; color: var(--bal-gold, #f5c542); font-family: var(--bal-font, m6x11, monospace); }
/* the log: the enemy phase's summary (it closes itself) or the whole battle's (the field menu) */
.pt-log { position: fixed; right: max(12px, env(safe-area-inset-right, 0px)); top: calc(env(safe-area-inset-top, 0px) + 112px); width: min(340px, calc(100vw - 24px)); padding: 10px; z-index: 7; display: flex; flex-direction: column; gap: 6px; max-height: 46vh; }
.pt-log-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.pt-log-head b { color: var(--bal-gold, #f5c542); font-family: var(--bal-font, m6x11, monospace); font-size: 18px; }
.pt-log-list { margin: 0; padding: 0 0 0 16px; overflow-y: auto; font-size: 15px; line-height: 1.3; }
/* the results: each figurine's EXP */
.pt-res-units { display: flex; flex-direction: column; gap: 8px; margin-top: 6px; }
.pt-ru { display: flex; gap: 10px; align-items: center; background: var(--bal-panel-d, #2a3739); border-radius: 10px; padding: 6px 10px; }
.pt-ru img { width: 48px; height: 48px; image-rendering: pixelated; object-fit: contain; flex: 0 0 auto; }
.pt-ru-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.pt-ru-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-variant-numeric: tabular-nums; }
.pt-ru-exp { margin-left: auto; color: #8fd0ff; }
.pt-ru-bar .bal-bar-fill { transition: width .6s ease-out; background: #5ab0ff; }
.pt-ru-up .pt-lvup { animation: pt-pop .9s ease-out; }
.pt-ru-new { font-size: 15px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.pt-ru-moves { font-size: 13px; }
#result .bal-btn.is-focus { outline: 3px solid var(--bal-gold, #f5c542); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { .pt-ru-bar .bal-bar-fill { transition: none; } .pt-ru-up .pt-lvup { animation: none; } }
/* the camp's move slots */
.ph-slots { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.ph-slot { position: relative; padding-right: 34px; }
.ph-slot-no { min-width: 1.4em; height: 1.4em; border-radius: 50%; background: rgba(0,0,0,.3); display: inline-grid; place-items: center; font-size: 14px; }
.ph-slot-x { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: rgba(0,0,0,.35); font-size: 14px; }
.ph-subh { margin: 8px 2px 0; font-family: var(--bal-font, m6x11, monospace); color: var(--bal-gold, #f5c542); font-size: 16px; font-weight: normal; }
.ph-head .ph-movesbtn { margin-left: auto; }
.ph-head .ph-movesbtn + .ph-sortie { margin-left: 0; }
@media (max-width: 640px) {
	.pt-fc, .pt-log { left: max(8px, env(safe-area-inset-left, 0px)); right: max(8px, env(safe-area-inset-right, 0px)); width: auto; top: calc(env(safe-area-inset-top, 0px) + 108px); padding: 8px; }
	.pt-log { max-height: 34vh; }
	.pt-coach { top: calc(env(safe-area-inset-top, 0px) + 108px); font-size: 15px; padding: 8px 10px; }
	.pt-coached .pt-unit { top: calc(env(safe-area-inset-top, 0px) + 212px); }
	.pt-coached .pt-fc { top: auto; bottom: calc(env(safe-area-inset-bottom, 0px) + 64px); }   /* (the coach on top: the forecast under the board) */
	/* the bottom bar must fit 360 px: no zoom button on a touch phone (pinch), narrow camera buttons, Back as ‹ */
	.pt-cam .bal-btn { min-width: 0; padding-left: 7px; padding-right: 7px; }
	.pt-bk-t { display: none; }
	.ph-slots { grid-template-columns: 1fr; }
}
@media (max-height: 500px) {
	.pt-fc, .pt-log { top: calc(env(safe-area-inset-top, 0px) + 72px); max-height: calc(100vh - 140px); overflow-y: auto; width: min(280px, 40vw); }
	.pt-coach { top: calc(env(safe-area-inset-top, 0px) + 64px); font-size: 14px; width: min(420px, 50vw); }
	.pt-ru img { width: 36px; height: 36px; }
}
@media (hover: none) and (pointer: coarse) { #log .bal-key, .ph-keyhint { display: none; } }
@media (hover: none) and (pointer: coarse) and (max-width: 640px) { #b-zoom { display: none; } }
/* (the coach, the forecast and the log never take a tap meant for the board: only their buttons do) */
.pt-coach, .pt-fc, .pt-log { pointer-events: none; }
.pt-coach button, .pt-log button, .pt-log-list { pointer-events: auto; }
.pt-watch #fc, .pt-watch #coach, .pt-watch #b-danger { display: none !important; }

/* ---- items, evolution, the shop (2026-11-21) */
.ph-tools { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 6px; margin-bottom: 8px; }
.ph-tool { min-height: 42px; }
.ph-row-img { width: 40px; height: 40px; object-fit: contain; image-rendering: pixelated; flex: none; }
.ph-evo { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; flex: 1; min-width: 0; }
.ph-evo-pair { display: flex; align-items: center; gap: 14px; }
.ph-evo-pair img { width: 96px; height: 96px; object-fit: contain; image-rendering: pixelated; }
.ph-evo-arrow { font-size: 28px; color: var(--bal-gold); }
.ph-evo-acts { width: 100%; max-width: 320px; }
.ph-evo .ph-statt td:nth-child(3) { color: var(--bal-muted, #9aa); }
.pt-ru-evo { margin-top: 4px; }
@media (max-width: 640px) {
	.ph-evo-pair img { width: 72px; height: 72px; }
	.ph-tools { grid-template-columns: 1fr 1fr; }
}
.ph-badge { padding: 0 5px; width: auto; }

/* ---------------------------------------------------------------- Versus (online PvP, hub.js versus / vsSetup / lobby) */
.ph-vsrow { display: flex; flex-direction: column; gap: 6px; margin-bottom: 10px; }
.ph-vslabel { font-size: 18px; opacity: .85; }
.ph-vsopts { display: flex; flex-wrap: wrap; gap: 6px; }
.ph-pick { min-width: 0; }
.ph-code { font-size: 30px; letter-spacing: 4px; color: var(--bal-gold, #f5c542); }
.ph-seats { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.ph-seat { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 18px; }
.ph-seat-team { display: flex; gap: 2px; width: 100%; }
.ph-seat-team img { width: 40px; height: 40px; image-rendering: pixelated; }
.pt-gauge[hidden] { display: none; }   /* (PvP has no Bonus Gauge) */

/* ---------------------------------------------------------------- the map maker on the board (editmode.js) */
/* Tower Defense (tdmode.js): its own bar in place of the battle's HUD */
/* Mystery Maze (mmmode.js): its own bar at the bottom; the battle's HUD is put away */
body.pt-mming #hud-top, body.pt-mming #b-exec, body.pt-mming #b-danger, body.pt-mming #b-back, body.pt-mming #b-end, body.pt-mming #unit, body.pt-mming #fc, body.pt-mming #coach { display: none !important; }
.pt-mm { position: fixed; bottom: calc(env(safe-area-inset-bottom, 0px) + 10px); left: 50%; transform: translateX(-50%); z-index: 6; display: flex; flex-direction: column; gap: 5px; padding: 8px 10px; width: min(560px, calc(100vw - 24px)); }
.pt-mm-fold { min-width: 34px; padding-left: 8px; padding-right: 8px; }
.pt-mm:has(.pt-mm-small) { width: auto; max-width: calc(100vw - 24px); padding: 5px 8px; }
body.pt-mm-touch .pt-mm:has(.pt-mm-small) { width: auto; left: 8px; transform: none; }
.pt-mm-small { flex-wrap: nowrap; }
.pt-mm-row { display: flex; gap: 6px; align-items: center; justify-content: center; flex-wrap: wrap; }
.pt-mm-chip { font-size: 13px; padding: 2px 7px; border-radius: 8px; background: rgba(0, 0, 0, .28); white-space: nowrap; }
.pt-mm-chip.is-lead { outline: 2px solid #ffd23c; }
/* screens that read at a glance (the modes plan, A2/A3): a party chip is a name, a number and an HP bar; badges sit level */
.pt-mm-chip { display: inline-flex; flex-direction: column; gap: 2px; min-width: 84px; }
.pt-mm-hp { display: block; height: 5px; border-radius: 3px; background: rgba(0, 0, 0, .45); overflow: hidden; }
.pt-mm-hp > span { display: block; height: 100%; border-radius: 3px; background: #5fe08a; transition: width .25s ease; }
.pt-mm-hp.is-amber > span { background: #ffb23c; } .pt-mm-hp.is-red > span { background: #ff5a5a; }
.pt-mm .bal-badge { display: inline-flex; align-items: center; gap: 4px; line-height: 1; height: 28px; box-sizing: border-box; padding-top: 0; padding-bottom: 0; }   /* (one height for all: an emoji in a badge used to make it taller than its neighbours) */
.pt-mm-say { opacity: .62; } .pt-mm-say.is-new { opacity: 1; font-weight: 700; }
.pt-mm-map { cursor: pointer; transition: width .15s ease, height .15s ease; }
.pt-mm-map.is-big { width: min(336px, calc(100vw - 20px)) !important; height: auto !important; aspect-ratio: 112 / 64; z-index: 30; box-shadow: 0 8px 30px rgba(0, 0, 0, .6); }
body.pt-mm-touch .pt-mm-top { flex-wrap: nowrap; gap: 4px; justify-content: space-between; }
body.pt-mm-touch .pt-mm-top .bal-badge { font-size: 14px; padding-left: 7px; padding-right: 7px; }
body.pt-mm-touch .pt-mm-chip { font-size: 14px; flex: 1 1 0; min-width: 0; }
body.pt-mm-touch .pt-mm-who { overflow: hidden; text-overflow: ellipsis; }
body.pt-mm-touch #mm-party { flex-wrap: nowrap; }
.pt-mm-small .bal-badge { height: 24px; } .pt-mm-small .pt-mm-chip { display: inline-block; min-width: 0; flex: none; }
.pt-mm-chip i { font-style: normal; color: #e0b36b; }
.pt-mm-coach { display: flex; gap: 8px; align-items: center; justify-content: center; font-size: 14px; line-height: 1.25; padding: 5px 8px; border-radius: 10px; background: rgba(253, 162, 0, .16); outline: 2px solid rgba(253, 162, 0, .55); }
.pt-mm-coach > span:nth-child(2) { flex: 1; text-align: left; }
.pt-mm-msg { min-height: 3.6em; font-size: 13px; line-height: 1.2; text-align: center; opacity: .92; }
.pt-mm-key { display: inline-block; width: 14px; height: 14px; margin-right: 8px; border-radius: 3px; border: 2px solid rgba(0, 0, 0, .45); vertical-align: -2px; }
.pt-mm-line { font-weight: 400; white-space: normal; text-align: left; }
.pt-mm-map { position: fixed; z-index: 6; left: 10px; top: calc(env(safe-area-inset-top, 0px) + 10px); width: 168px; height: 96px; image-rendering: pixelated; background: rgba(20, 22, 28, .78); border-radius: 8px; border: 2px solid rgba(255, 255, 255, .25); }
@media (hover: none) and (pointer: coarse) { .pt-mm .bal-key { display: none; } }
/* Mystery Maze on a touch screen: the overworld's pad. A joystick bottom left (8 directions), A / B bottom right,
   MENU / MOVES / BAG / WAIT top right. The bar goes to the top, the minimap under it. */
.pt-mm-pad[hidden] { display: none; }
.pt-tbtn {
	position: fixed; z-index: 20; display: flex; align-items: center; justify-content: center;
	--face: var(--bal-grey); --lip: var(--bal-grey-d);
	background: var(--face); box-shadow: 0 5px 0 var(--lip); color: var(--bal-text); border-radius: 12px; font-size: 17px; font-family: var(--bal-font); text-shadow: 0 2px 0 rgba(0, 0, 0, .3); opacity: .92;
	user-select: none; -webkit-user-select: none; touch-action: none; -webkit-touch-callout: none; cursor: default;
}
.pt-tbtn:active { transform: translateY(4px); box-shadow: 0 1px 0 var(--lip); }
#mm-a { --face: var(--bal-blue); --lip: var(--bal-blue-d); right: calc(16px + env(safe-area-inset-right, 0px)); bottom: calc(84px + env(safe-area-inset-bottom, 0px)); width: 76px; height: 76px; border-radius: 50%; font-size: 24px; }
#mm-a.is-word { font-size: 15px; }
#mm-b { --face: var(--bal-orange); --lip: var(--bal-orange-d); right: calc(100px + env(safe-area-inset-right, 0px)); bottom: calc(22px + env(safe-area-inset-bottom, 0px)); width: 62px; height: 62px; border-radius: 50%; font-size: 22px; }
#mm-menu, #mm-moves, #mm-bag, #mm-wait { right: calc(12px + env(safe-area-inset-right, 0px)); width: 70px; height: 40px; }
#mm-menu { --face: var(--bal-orange); --lip: var(--bal-orange-d); top: var(--mm-under, 210px); }
#mm-moves { --face: var(--bal-blue); --lip: var(--bal-blue-d); top: calc(var(--mm-under, 210px) + 48px); }
#mm-bag { --face: var(--bal-purple); --lip: var(--bal-purple-d, #6c4aa0); top: calc(var(--mm-under, 210px) + 96px); }
#mm-wait { top: calc(var(--mm-under, 210px) + 144px); }
.pt-mm-stick {
	position: fixed; z-index: 20; left: calc(18px + env(safe-area-inset-left, 0px)); bottom: calc(22px + env(safe-area-inset-bottom, 0px)); width: 150px; height: 150px; border-radius: 50%;
	background: radial-gradient(circle, rgba(255, 255, 255, .10) 0 38%, rgba(20, 24, 30, .55) 39% 100%); border: 3px solid rgba(255, 255, 255, .28); box-shadow: 0 5px 0 rgba(0, 0, 0, .35);
	touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none;
}
.pt-mm-knob { position: absolute; left: 50%; top: 50%; width: 62px; height: 62px; margin: -31px 0 0 -31px; border-radius: 50%; background: var(--bal-grey); box-shadow: 0 5px 0 var(--bal-grey-d); pointer-events: none; }
body.pt-mm-touch .pt-mm { top: calc(env(safe-area-inset-top, 0px) + 56px); bottom: auto; gap: 3px; padding: 6px 8px; width: calc(100vw - 16px); }
body.pt-mm-touch .pt-mm-msg { min-height: 2.4em; }
body.pt-mm-touch .pt-mm-map { top: var(--mm-under, 210px); width: 112px; height: 64px; }
body.pt-mm-touch .pt-menu { bottom: calc(env(safe-area-inset-bottom, 0px) + 176px); max-height: calc(100vh - 380px); }
body.pt-mm-touch .pt-hint { top: auto; bottom: calc(env(safe-area-inset-bottom, 0px) + 186px); }
body.pt-mm-touch #b-zoom { display: none !important; }
/* the camera's turn buttons would sit under the joystick: they go up under the minimap */
body.pt-mm-touch .pt-cam { position: fixed; z-index: 20; left: calc(10px + env(safe-area-inset-left, 0px)); top: calc(var(--mm-under, 210px) + 76px); margin: 0; }
body.pt-mm-touch .pt-mm-msg { min-height: 1.2em; }
.pt-mm .bal-badge { white-space: nowrap; }
@media (max-width: 600px) { .pt-mm { padding: 6px 8px; } .pt-mm-msg { min-height: 2.4em; font-size: 12px; } .pt-mm-map { width: 112px; height: 64px; } }
body.pt-tding #hud-top, body.pt-tding #b-exec, body.pt-tding #b-danger, body.pt-tding #b-back, body.pt-tding #b-end, body.pt-tding #unit, body.pt-tding #fc, body.pt-tding #coach { display: none !important; }
/* Tower Defense's HUD, in the screen's corners (owner, 2026-11-24): who and what you have top-left, the wave top-right (beside the
   Games button), the wave's button and the clock's bottom-right; the coach top-centre, a replay's controls bottom-centre */
.pt-td { position: fixed; inset: 0; z-index: 6; pointer-events: none; }
.pt-td[hidden] { display: none; }
.pt-td .pt-hud { position: absolute; pointer-events: auto; display: flex; gap: 6px; align-items: center; padding: 6px 8px; box-sizing: border-box; }
.pt-td .pt-hud-tl { top: calc(env(safe-area-inset-top, 0px) + 10px); left: calc(env(safe-area-inset-left, 0px) + 10px); gap: 8px; }
.pt-td .pt-hud-tr { top: calc(env(safe-area-inset-top, 0px) + 10px); right: calc(env(safe-area-inset-right, 0px) + 66px); }
.pt-td .pt-hud-tc { top: calc(env(safe-area-inset-top, 0px) + 120px); left: 50%; transform: translateX(-50%); padding: 0; width: max-content; max-width: min(640px, calc(100vw - 24px)); }
.pt-td .pt-hud-br { right: calc(env(safe-area-inset-right, 0px) + 12px); bottom: calc(env(safe-area-inset-bottom, 0px) + 12px); flex-direction: column; align-items: flex-end; gap: 8px; padding: 0; }
.pt-td .pt-hud-bc { left: 50%; transform: translateX(-50%); bottom: calc(env(safe-area-inset-bottom, 0px) + 12px); flex-wrap: wrap; justify-content: center; max-width: calc(100vw - 24px); }
/* a menu opens over the bottom-right corner: the clock's buttons step aside while it is up */
#menu:not([hidden]) ~ .pt-td .pt-hud-br { visibility: hidden; }
.pt-hud-stats, .pt-hud-small { display: flex; gap: 6px; align-items: center; }
/* the wave to come, under the wave's badge: who walks in, and how many */
.pt-td .pt-hud-tr.has-next { flex-direction: column; align-items: flex-end; gap: 4px; }
.pt-next { font-size: 17px; color: #fff; max-width: 380px; text-align: right; line-height: 1.15; padding: 0 2px 2px; }
.pt-next-boss { color: #ffd23c; }
.pt-next-elite { color: #ff8a5a; }
.pt-next-why { font-size: 14px; color: #cfd6da; }
.pt-next-more { font-size: 14px; color: #e8ecee; }
.pt-next-n { display: inline-block; min-width: 1.4em; padding: 0 4px; border-radius: 6px; background: rgba(255, 255, 255, .16); text-align: center; font-weight: 700; }
.pt-kind { font-weight: 700; }
.pt-kind-runner { color: #7fe3ff; } .pt-kind-splitter { color: #ffb36b; } .pt-kind-shield { color: #c9b8ff; } .pt-kind-healer { color: #7dff9a; }
/* the result: who did the work */
.pt-dealt { margin: 6px 0; }
.pt-dealt p { margin: 0 0 2px; }
.pt-dealt-row { display: grid; grid-template-columns: 110px 1fr 70px; gap: 8px; align-items: center; font-size: 15px; }
.pt-dealt-row b { text-align: right; }
.pt-dealt-bar { height: 8px; background: rgba(0, 0, 0, .3); border-radius: 4px; overflow: hidden; }
.pt-dealt-bar i { display: block; height: 100%; background: #fe5f55; border-radius: 4px; }
.pt-hero-open { margin: 4px 0; }
.pt-hud-tl .bal-badge, .pt-hud-tr .bal-badge { font-size: 18px; white-space: nowrap; }
.pt-td .pt-hud-wave { font-size: 26px; padding: 12px 26px; min-width: 170px; }
.pt-td .pt-hud-wave:disabled { opacity: .45; }
@keyframes pt-hud-bump { 0% { transform: scale(1); } 35% { transform: scale(1.35); filter: brightness(1.4); } 100% { transform: scale(1); } }
@keyframes pt-hud-hit { 0%, 100% { transform: translateX(0); } 20% { transform: translateX(-5px) scale(1.2); } 45% { transform: translateX(5px) scale(1.2); } 70% { transform: translateX(-3px); } }
.pt-td .is-bump { animation: pt-hud-bump .45s ease-out; }
.pt-td .is-hit { animation: pt-hud-hit .45s ease-out; }
@media (prefers-reduced-motion: reduce) { .pt-td .is-bump, .pt-td .is-hit { animation: none; } }
/* Maze Builder: a block shape as a little grid (a card in the hand, a reward) */
.pt-mz-shape { display: inline-grid; gap: 1px; vertical-align: middle; margin: 0 3px; }
.pt-mz-shape i { width: 7px; height: 7px; border-radius: 1px; }
.pt-mz-shape i.on { background: currentColor; }
/* an item's picture (js/goodicons.js: drawn in code, Poketactica's own) in a row, a menu, a panel's heading */
.pt-good-ico { width: 30px; height: 30px; flex: none; vertical-align: middle; }
.pt-good-ico.is-big { width: 44px; height: 44px; margin-right: 8px; }
.ph-slots { white-space: nowrap; }
.pt-iw-bank { margin: 6px 0; padding: 6px 10px; border-radius: 10px; background: rgba(255, 210, 60, .12); box-shadow: inset 0 0 0 2px rgba(255, 210, 60, .5); }
.pt-iw-bank p { margin: 3px 0; }
.pt-menu .pt-good-ico { width: 24px; height: 24px; }
/* Maze Builder's heroes: a portrait drawn in code (js/td/portraits.js), 20 x 20 pixels shown large */
.pt-hero-pic { display: inline-block; width: 34px; height: 34px; border-radius: 7px; image-rendering: pixelated; vertical-align: middle; flex: none; box-shadow: 0 0 0 2px #1c1f24; }
.pt-hero-pic.is-big { width: 100px; height: 100px; border-radius: 14px; box-shadow: 0 0 0 3px #1c1f24, 0 5px 0 3px rgba(0, 0, 0, .3); }
.pt-hero-chip .pt-hero-pic { width: 46px; height: 46px; border-radius: 9px; }
.pt-hero-head { display: flex; gap: 12px; align-items: center; }
.pt-hero-head p { margin: 2px 0 0; }
.pt-hero-chip { display: inline-flex; align-items: center; gap: 8px; border: 0; cursor: pointer; font: inherit; font-size: 18px; color: #fff; padding: 4px 10px 4px 4px; border-radius: 12px; background: #2c3440; box-shadow: 0 3px 0 #1d232c, inset 0 0 0 2px #ffa51f; }
.pt-hero-chip .bal-badge { padding: 1px 6px; font-size: 12px; }
/* the hand: cards along the bottom, fanned; the chosen one stands up; the draw pile at its right */
.pt-mz-tray { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(env(safe-area-inset-bottom, 0px) + 30px); z-index: 6; display: flex; align-items: flex-end; gap: 14px; pointer-events: none; max-width: calc(100vw - 24px); }
.pt-mz-tray > * { pointer-events: auto; }
.pt-mz-fan { display: flex; align-items: flex-end; padding: 22px 6px 0; }
.pt-mz-card { --w: 78px; width: var(--w); height: calc(var(--w) * 1.34); margin: 0 -5px; padding: 0; border: 0; cursor: pointer; display: flex; flex-direction: column; border-radius: 9px; overflow: hidden; font: inherit; color: #3f4f6b;
	background: #f4efe2; box-shadow: 0 5px 0 #b9ae95, 0 0 0 3px #2c3440, 0 9px 12px rgba(0, 0, 0, .35); transform: translateY(var(--dip)) rotate(var(--tilt)); transform-origin: 50% 120%; transition: transform .12s ease-out; }
.pt-mz-card:hover, .pt-mz-card:focus-visible { transform: translateY(calc(var(--dip) - 8px)) rotate(var(--tilt)); outline: none; }
.pt-mz-card.is-on { transform: translateY(-22px) rotate(0deg); box-shadow: 0 5px 0 #b9ae95, 0 0 0 3px #fff, 0 0 0 6px #ffa51f, 0 12px 16px rgba(0, 0, 0, .4); z-index: 2; }
.pt-mz-face { flex: 1; display: flex; align-items: center; justify-content: center; background-image: linear-gradient(rgba(63, 79, 107, .09) 1px, transparent 1px), linear-gradient(90deg, rgba(63, 79, 107, .09) 1px, transparent 1px); background-size: 13px 13px; background-position: center; }
.pt-mz-face .pt-mz-shape { gap: 2px; margin: 0; }
.pt-mz-face .pt-mz-shape i { width: var(--px); height: var(--px); border-radius: 2px; }
.pt-mz-face .pt-mz-shape i.on { box-shadow: inset -2px -2px 0 rgba(0, 0, 0, .22), inset 2px 2px 0 rgba(255, 255, 255, .3); }
.pt-mz-name { font-size: 11px; line-height: 1; padding: 5px 2px 4px; text-align: center; color: #fff; background: #5d6f8c; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* a bonus card wears its bonus's colour */
.pt-mz-b-tall { color: #7a6590; } .pt-mz-b-tall .pt-mz-name { background: #7a6590; }
.pt-mz-b-water { color: #2f86c9; } .pt-mz-b-water .pt-mz-name { background: #2f86c9; }
.pt-mz-b-lava { color: #d9532b; } .pt-mz-b-lava .pt-mz-name { background: #d9532b; }
.pt-mz-b-grass { color: #3d8f3a; } .pt-mz-b-grass .pt-mz-name { background: #3d8f3a; }
.pt-mz-b-ice { color: #3aa9c4; } .pt-mz-b-ice .pt-mz-name { background: #3aa9c4; }
.pt-mz-b-red { color: #d0383f; } .pt-mz-b-red .pt-mz-name { background: #d0383f; }
.pt-mz-b-blue { color: #3257c9; } .pt-mz-b-blue .pt-mz-name { background: #3257c9; }
.pt-mz-b-purple { color: #8a44c2; } .pt-mz-b-purple .pt-mz-name { background: #8a44c2; }
.pt-mz-b-beacon { color: #b8862b; } .pt-mz-b-beacon .pt-mz-name { background: #b8862b; }
.pt-mz-b-mud { color: #6b4a2c; } .pt-mz-b-mud .pt-mz-name { background: #6b4a2c; }
.pt-mz-b-caltrops { color: #4d5661; } .pt-mz-b-caltrops .pt-mz-name { background: #4d5661; }
.pt-mz-card.is-bonus { background: #fff7d6; }
/* a card being dragged onto the board: the hand steps back so the tiles under it can be reached */
body.pt-mzdrag .pt-mz-tray { opacity: .45; }
body.pt-mzdrag .pt-mz-acts { visibility: hidden; }
/* the damage panel's bar under each tower's row */
.pt-dmg-bar { display: block; height: 4px; margin-top: 3px; border-radius: 2px; background: rgba(255, 255, 255, .85); width: var(--w, 0%); min-width: 2px; }
.pt-mz-acts { position: absolute; left: 50%; bottom: calc(100% + 8px); transform: translateX(-50%); display: flex; gap: 6px; white-space: nowrap; }
.pt-mz-next { align-self: center; }
.pt-mz-pile { position: relative; border: 0; padding: 0; background: none; cursor: pointer; font: inherit; display: flex; flex-direction: column; align-items: center; gap: 4px; margin-bottom: 2px; }
.pt-mz-deck { width: 62px; height: 82px; border-radius: 9px; display: flex; align-items: center; justify-content: center; font-size: 34px; color: #fff; background: #3f5f9c; box-shadow: 0 0 0 3px #2c3440, 3px 3px 0 3px #35508a, 6px 6px 0 3px #2c4274, 0 12px 14px rgba(0, 0, 0, .35); }
.pt-mz-bubble { background: #fff; color: #2c3440; border-radius: 10px; padding: 4px 8px; font-size: 13px; white-space: nowrap; box-shadow: 0 3px 0 #b9ae95; }
.pt-mz-pile:disabled { cursor: default; opacity: .5; }
.pt-mz-pile:not(:disabled):hover .pt-mz-deck { transform: translateY(-3px); }
.pt-mz-bad { color: #fe5f55; font-weight: 700; }
.pt-td .bal-badge small, .pt-td .bal-badge .bal-muted { opacity: .75; font-size: 12px; }
@media (hover: none) and (pointer: coarse) { .pt-td .bal-key, .pt-mz-tray .bal-key { display: none; } }
/* a phone: the same corners, smaller; the wave under the Games button; the clock's buttons in one row at the bottom, right of the camera's */
@media (max-width: 600px) {
	.pt-td .pt-hud { padding: 4px 6px; gap: 4px; }
	.pt-td .pt-hud-tl { top: calc(env(safe-area-inset-top, 0px) + 6px); left: 6px; max-width: calc(100vw - 76px); }
	.pt-td .pt-hud-tr { top: calc(env(safe-area-inset-top, 0px) + 64px); right: 6px; }
	.pt-td .pt-hud-tc { top: calc(env(safe-area-inset-top, 0px) + 164px); width: calc(100vw - 12px); max-width: none; }
	body.pt-tding .pt-hint { top: calc(env(safe-area-inset-top, 0px) + 132px); white-space: normal; overflow: visible; font-size: 14px; line-height: 1.2; width: max-content; max-width: calc(100vw - 16px); box-sizing: border-box; }
	.pt-next { font-size: 14px; max-width: 240px; }
	/* (a phone: the kind's explanation is in the enemy's own hint; the two waves after stay, in one small line) */
	.pt-next-why { display: none; }
	.pt-next-more { font-size: 12px; line-height: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding: 0 2px; margin-top: -4px; }
	.pt-td .pt-hud-tc { top: calc(env(safe-area-inset-top, 0px) + 186px); }
	.pt-td .pt-hud-br { right: 6px; bottom: calc(env(safe-area-inset-bottom, 0px) + 10px); flex-direction: row; align-items: center; gap: 4px; padding: 0; }
	.pt-td .pt-hud-bc { bottom: calc(env(safe-area-inset-bottom, 0px) + 64px); }
	.pt-hud-stats, .pt-hud-small { gap: 4px; }
	.pt-hud-tl .bal-badge, .pt-hud-tr .bal-badge { font-size: 14px; }
	.pt-td .pt-hud-wave { font-size: 17px; padding: 8px 12px; min-width: 0; }
	.pt-td .pt-hud-small .bal-btn { padding-left: 8px; padding-right: 8px; }
	.pt-hero-chip { font-size: 14px; padding: 3px 6px 3px 3px; gap: 5px; }
	.pt-hero-chip b { display: none; }
	.pt-hero-chip .pt-hero-pic { width: 34px; height: 34px; }
	.pt-td.is-maze #td-slots { display: none; }
	/* the screens pass (Plans/POKETACTICA_MODES_PLAN.md A3, B5; measured at 390 px, 2026-11-25): nothing under 14 px, the
	   small words on a badge readable, the clock's buttons a thumb's size, the hand's cards bigger */
	.pt-next-more { font-size: 14px; margin-top: -2px; }
	.pt-td .bal-badge small, .pt-td .bal-badge .bal-muted { font-size: 14px; opacity: .92; }
	.pt-td .pt-hud-wave .bal-muted { color: #d6ecff; opacity: 1; }   /* ("when you call it", "5 left": grey on the blue badge was hard to read) */
}
@media (max-width: 600px) and (hover: none) and (pointer: coarse) {
	.pt-td .pt-hud-br .bal-btn { min-height: 44px; }
	.pt-td .pt-hud-bc { bottom: calc(env(safe-area-inset-bottom, 0px) + 70px); }
	body .pt-mz-tray { bottom: calc(env(safe-area-inset-bottom, 0px) + 80px); }
	body .pt-mz-tray:has(.pt-mz-card:nth-child(7)) { bottom: calc(env(safe-area-inset-bottom, 0px) + 98px); }
}
body.pt-editing #hud-top, body.pt-editing #b-exec, body.pt-editing #b-danger, body.pt-editing #b-back, body.pt-editing #unit, body.pt-editing #fc, body.pt-editing #coach { display: none !important; }
.pt-edit { box-sizing: border-box; position: fixed; left: 50%; top: calc(env(safe-area-inset-top, 0px) + 10px); transform: translateX(-50%); width: min(720px, calc(100vw - 80px)); padding: 8px 10px; z-index: 8; display: flex; flex-direction: column; gap: 6px; font-size: 16px; }
.pt-edit[hidden] { display: none; }
.pt-edit-row, .pt-edit-tools, .pt-edit-opt { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.pt-edit-name { font-size: 20px; margin-right: auto; }
.pt-edit-opt > span { min-width: 120px; text-align: center; }
.pt-edit-warn { color: #ffcf6e; }
.pt-edit-ok { color: #7cf08a; }
@media (max-width: 600px) { .pt-edit { width: calc(100vw - 24px); left: 12px; transform: none; top: calc(env(safe-area-inset-top, 0px) + 56px); font-size: 14px; } .pt-edit-say { display: none; } }
body.pt-mzhand .pt-toast { bottom: calc(env(safe-area-inset-bottom, 0px) + 176px); }
/* the hand on a phone: smaller cards, above the camera buttons */
@media (max-width: 600px) {
	.pt-mz-tray { bottom: calc(env(safe-area-inset-bottom, 0px) + 66px); gap: 6px; }
	.pt-mz-card { --w: 56px; margin: 0 -4px; }
	/* (the big maps deal a hand of 8, and a passive can add to it: seven or more overlap further, nine or more further still) */
	.pt-mz-card:nth-last-child(n+7), .pt-mz-card:nth-last-child(n+7) ~ .pt-mz-card { --w: 48px; margin: 0 -7px; }
	.pt-mz-card:nth-last-child(n+9), .pt-mz-card:nth-last-child(n+9) ~ .pt-mz-card { --w: 44px; margin: 0 -9px; }
	.pt-mz-tray:has(.pt-mz-card:nth-child(7)) { bottom: calc(env(safe-area-inset-bottom, 0px) + 84px); }   /* (a hand that wide reaches over the camera buttons: it sits above them) */
	.pt-mz-name { font-size: 11px; padding: 3px 1px; }
	.pt-mz-face .pt-mz-shape { transform: scale(.74); }
	.pt-mz-deck { width: 42px; height: 56px; font-size: 24px; }
	.pt-mz-bubble { font-size: 11px; padding: 3px 5px; }
	.pt-mz-next { display: none; }
	.pt-mz-acts .bal-btn { font-size: 13px; }
}
}
/* the Item World's records line */
.ph-records { margin: 0; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.ph-list > .ph-records { margin-top: 10px; padding-top: 8px; border-top: 2px solid rgba(255, 255, 255, .12); flex-shrink: 0; }   /* (the Item World: your records after the choices, not before them) */
.ph-list > .ph-records .bal-badge { white-space: normal; }
.ph-row-tags .bal-badge.bal-blue.ph-tofloor { background: rgba(0, 0, 0, .28); box-shadow: none; }   /* (on a blue row: a dark tag, not blue on blue) */

/* THE BATTLE ON A PHONE (the screens pass, Plans/POKETACTICA_MODES_PLAN.md A3; measured at 390 px, 2026-11-25).
   - the top row stands BESIDE the settings cog, not under it: the cog covered the Bonus Gauge's level
   - the hint wraps onto a second line; it was cut off with "…" ("on a red tile queues the attack (the box shows the…")
   - every button of the bottom bar is a thumb's size (44 px tall); the three camera buttons were 32 px
   - the small line of a command is 14 px, not 12 */
@media (max-width: 640px) and (min-height: 501px) {
	body:not(.pt-tding):not(.pt-mming) .pt-top { top: calc(env(safe-area-inset-top, 0px) + 10px); padding-right: 56px; min-height: 40px; }
	body:not(.pt-tding):not(.pt-mming) .pt-hint { top: calc(env(safe-area-inset-top, 0px) + 56px); white-space: normal; overflow: visible; line-height: 1.25; width: max-content; max-width: calc(100vw - 16px); box-sizing: border-box; }
	body:not(.pt-tding):not(.pt-mming) .pt-unit, body:not(.pt-tding):not(.pt-mming) .pt-fc, body:not(.pt-tding):not(.pt-mming) .pt-log, body:not(.pt-tding):not(.pt-mming) .pt-coach { top: calc(env(safe-area-inset-top, 0px) + 104px); }
	body:not(.pt-tding):not(.pt-mming).pt-coached .pt-unit { top: calc(env(safe-area-inset-top, 0px) + 208px); }
	.pt-menu .bal-btn small { font-size: 14px; }
}
@media (max-width: 640px) and (min-height: 501px) and (hover: none) and (pointer: coarse) {
	.pt-bar .bal-btn { min-height: 44px; }
	.pt-cam .bal-btn { min-width: 40px; }
	body:not(.pt-tding):not(.pt-mming) .pt-menu { bottom: calc(env(safe-area-inset-bottom, 0px) + 66px); }
}

/* ===== THE BIG MINIMAP SAYS WHAT IS ON IT (screens pass, 2026-11-26; M8) =====
   Names on the map itself (the stairs, the shop, a locked door) and, under it, a key of the colours this floor shows. */
.pt-mm-maplab { position: fixed; z-index: 31; pointer-events: none; }
.pt-mm-maplab span { position: absolute; transform: translate(-50%, -150%); font-size: 13px; line-height: 1; padding: 3px 6px; border-radius: 6px; background: rgba(12, 14, 18, .88); border: 1px solid currentColor; white-space: nowrap; }
.pt-mm-maplab span.is-under { transform: translate(-50%, 50%); }
.pt-mm-mapkey { position: fixed; z-index: 31; box-sizing: border-box; padding: 8px 10px; display: grid; grid-template-columns: 1fr 1fr; gap: 5px 10px; font-size: 14px; line-height: 1.15; cursor: pointer; }
.pt-mm-mapkey .pt-mm-keyrow { display: flex; align-items: center; min-width: 0; }
.pt-mm-mapkey .pt-mm-key { flex: none; }
.pt-mm-mapkey .pt-mm-keyclose { grid-column: 1 / -1; color: #cfd6da; font-size: 13px; }
.pt-mm-map.is-big { background: rgba(14, 16, 20, .94); }

/* ===== THE RESULTS' BUTTONS (screens pass, 2026-11-26; A6) =====
   The orange "Again / Next / Try again" button carried the class of Tower Defense's "next wave" line (.pt-next), so it took
   that line's small text and no padding: the main button was the smallest thing on the screen. It has its own class now.
   On a phone the buttons stand in the same places in every mode: play on (Z) across the top, the replay's two under it,
   Back to camp (X) across the bottom. */
/* (a full squad's results were taller than a phone: the box scrolled as one, and its buttons were under the fold.
   The list scrolls; the title and the buttons stay.) */
#result .bal-modal-box { overflow: hidden; }
#result #r-body { overflow-y: auto; min-height: 0; overscroll-behavior: contain; }
#result .bal-modal-title, #result .bal-modal-acts { flex: none; }
@media (max-width: 640px) {
	#result .bal-modal-acts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px; }
	#result .bal-modal-acts .bal-btn { min-height: 44px; margin: 0; }
	#result .bal-modal-acts .pt-rnext, #result #r-again { grid-column: 1 / -1; }
}

/* ===== MAZE BUILDER: THE KIND'S PICTURE ON A CARD (screens pass, 2026-11-26; B5) =====
   A special card was its shape and a coloured band with a name cut short ("Caltro", "Purple "). It has the kind's picture
   in its corner now; the name starts at the left, where the next card does not cover it; what it does is in white. */
.pt-mz-card { position: relative; }
.pt-mz-kind { position: absolute; top: 3px; left: 3px; z-index: 1; width: 22px; height: 22px; border-radius: 50%; background: currentColor; box-shadow: 0 0 0 2px #fff; display: flex; align-items: center; justify-content: center; font-size: 13px; line-height: 1; }
.pt-mz-say { color: #e8ecee; }
@media (max-width: 640px) {
	.pt-mz-kind { width: 18px; height: 18px; font-size: 11px; top: 2px; left: 2px; }
	.pt-mz-card.is-bonus .pt-mz-name { text-align: left; padding-left: 4px; text-overflow: clip; }

/* ===== INSIDE AN ITEM: THE FLOOR AND THE EXIT, ALL BATTLE LONG (screens pass, 2026-11-26; I3) =====
   On a phone the tag takes the place of the word "Bonus", so the top stays one row. */
.pt-dive-tag { pointer-events: auto; white-space: nowrap; }
.pt-dive-tag[hidden] { display: none; }
@media (max-width: 640px) {
	.pt-top:has(.pt-dive-tag:not([hidden])) .pt-gauge-label { display: none; }
	.pt-top:has(.pt-dive-tag:not([hidden])) .pt-gauge { min-width: 96px; }
	.pt-top:has(.pt-dive-tag:not([hidden])) .pt-gauge .bal-bar { min-width: 40px; }
}

/* ===== TOWER DEFENSE: THE WAVE IN PICTURES (screens pass, 2026-11-26; T3) =====
   The wave to come was a line of words. Each kind of enemy has its picture beside its number and its name. */
.pt-next-one { white-space: nowrap; }
.pt-next-pic { width: 26px; height: 26px; object-fit: contain; image-rendering: pixelated; vertical-align: -7px; margin: -4px 2px -4px 0; }
.pt-next-pic.is-boss { width: 34px; height: 34px; vertical-align: -10px; }
@media (max-width: 640px) { .pt-next-pic { width: 22px; height: 22px; vertical-align: -6px; } .pt-next-pic.is-boss { width: 28px; height: 28px; vertical-align: -8px; } }
@media (max-width: 600px) {
	body.pt-tding .pt-hint { top: max(calc(env(safe-area-inset-top, 0px) + 132px), calc(var(--td-under, 0px) + 6px)); }
	.pt-td .pt-hud-tc { top: max(calc(env(safe-area-inset-top, 0px) + 186px), calc(var(--td-under, 0px) + 62px)); }
}

/* ===== TOWER DEFENSE: BY WHICH ROAD (screens pass, 2026-11-26; the rest of T3) ===== */
.pt-next-roads { font-size: 15px; color: #e8ecee; }
@media (max-width: 600px) { .pt-next-roads { font-size: 14px; } }

/* ===== ICONS WITH THEIR WORD (screens pass, 2026-11-26; A5) =====
   The camera's buttons were a symbol alone (two arrows, an eye, a plus): each has its word under it. */
.pt-cam .bal-btn { display: inline-flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; line-height: 1; }
.pt-cam-g { line-height: 1; }
.pt-cam-w { font-size: 12px; line-height: 1; letter-spacing: 0; text-transform: none; }

/* ===== THE VERSUS LOBBY READS (small items, 2026-11-27; V1): its rules as badges, and what it waits for ===== */
.ph-rules { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; }
.ph-rules .bal-badge { font-size: 16px; white-space: nowrap; }
.ph-waiting { margin: 0; font-size: 17px; }
@media (max-width: 640px) { .ph-rules .bal-badge { font-size: 14px; } .ph-waiting { font-size: 15px; } }

/* ===== TEAM PRESETS (small items, 2026-11-27; V3): three saved teams, under the figurines ===== */
.ph-presets { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 6px 2px 2px; }
.ph-presets .bal-btn { min-height: 44px; }
.ph-presets .bal-btn small { display: block; font-size: 13px; opacity: .9; }
@media (max-width: 640px) { .ph-presets > span { display: none; } .ph-presets .bal-btn { flex: 1; min-width: 0; } }

/* ===== VERSUS: THE TURN CLOCK (small items, 2026-11-27; V5) ===== */
.pt-clock { pointer-events: auto; white-space: nowrap; font-variant-numeric: tabular-nums; }
.pt-clock[hidden] { display: none; }

/* ===== VERSUS: YOUR RECORD WITH A PLAYER, AND A REMATCH (small items, 2026-11-27; V2) ===== */
.pt-vsrec { margin: 6px 0 0; font-size: 17px; }
.pt-vsrec[hidden] { display: none; }

/* ===== MYSTERY MAZE: CHALLENGE RULES ON THE PARTY SCREEN (medium items, 2026-11-27; M1) ===== */
#mm-challenges .bal-btn { display: inline-flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1.1; }
#mm-challenges #mm-ch-pay { display: inline-block; font-size: 15px; white-space: nowrap; }
@media (max-width: 640px) { #mm-challenges #mm-ch-pay { flex-basis: 100%; text-align: center; } }
.ph-chmark { padding-left: 6px; padding-right: 6px; }

/* ===== MYSTERY MAZE: MILESTONES IN THE ABYSS (medium items, 2026-11-27; M2) ===== */
.ph-marks { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 4px; font-size: 16px; }
.ph-marks li { color: #cfd6da; }
.ph-marks li.is-done { color: #fff; }
.ph-marks .bal-badge { min-width: 62px; text-align: center; }

/* ===== MYSTERY MAZE: RECRUITS THAT MATTER (medium items, 2026-11-27; M3) ===== */
.ph-recruits { margin-top: 8px; display: grid; gap: 4px; }
.ph-only { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.ph-only { font-size: 16px; line-height: 1.5; }
.ph-kind { display: inline-block; padding: 0 6px; border-radius: 6px; background: rgba(255, 255, 255, .1); white-space: nowrap; }
.ph-kind.is-got { background: rgba(75, 224, 122, .25); color: #fff; }

/* ===== MAZE BUILDER: HERO CARDS (medium items, 2026-11-27; B1): a gold rim, and each kind its colour ===== */
.pt-mz-b-bastion { color: #8c6b3a; } .pt-mz-b-bastion .pt-mz-name { background: #8c6b3a; }
.pt-mz-b-tidepool { color: #1f7fb5; } .pt-mz-b-tidepool .pt-mz-name { background: #1f7fb5; }
.pt-mz-b-dynamo { color: #c79a12; } .pt-mz-b-dynamo .pt-mz-name { background: #c79a12; }
.pt-mz-b-trellis { color: #2f8a4a; } .pt-mz-b-trellis .pt-mz-name { background: #2f8a4a; }
.pt-mz-b-dragonspire { color: #6a48c9; } .pt-mz-b-dragonspire .pt-mz-name { background: #6a48c9; }
.pt-mz-card.is-herocard { box-shadow: 0 5px 0 #b9ae95, 0 0 0 3px #ffd23c, 0 9px 12px rgba(0, 0, 0, .35); }

/* ===== MAZE BUILDER: A FRAME EARNED WITH EACH HERO (medium items, 2026-11-27; B2) ===== */
.pt-hero-pic.is-frame { border-radius: 6px; }
.pt-hero-pic.is-frame-bronze { box-shadow: 0 0 0 3px #b0703a, 0 0 0 5px #5e3a1c; }
.pt-hero-pic.is-frame-silver { box-shadow: 0 0 0 3px #cfd6dc, 0 0 0 5px #6d7780; }
.pt-hero-pic.is-frame-gold { box-shadow: 0 0 0 3px #ffd23c, 0 0 0 5px #a87a10, 0 0 10px 2px rgba(255, 210, 60, .55); }

/* ===== MAZE BUILDER: RARE PASSIVES AND PAIRS (medium items, 2026-11-27; B3) ===== */
.pt-pair { display: block; color: #b8ffcf; font-weight: 700; }
.pt-pair-hint { color: #cfd6da; }
.pt-rare, .pt-pairon { vertical-align: 2px; }

/* ===== MAZE BUILDER: THE WARP PAD (medium items, 2026-11-27; B4) ===== */
.pt-mz-b-warp { color: #6a4fd0; } .pt-mz-b-warp .pt-mz-name { background: #6a4fd0; }

/* ===== STORY: THE HARD SET AND THE MEDAL (medium items, 2026-11-27; S4) ===== */
.ph-medal { font-size: 15px; } .ph-hardtick { font-size: 10px; }

/* ===== THE DUNGEON: TWO DOORS (medium items, 2026-11-27; D2) ===== */
.pt-door small { display: block; font-weight: 600; opacity: 0.9; }

/* ===== STORY: A MAP SCREEN THAT IS A MAP (2026-11-27; S5) ===== */
/* the 22 maps as one path: stops that lean left, then right, joined by a dotted road; the chapter's name before its first */
.ph-path { position: relative; }
.ph-path .ph-stop { position: relative; width: 78%; margin-bottom: 14px; flex-wrap: wrap; }
.ph-path .ph-stop:nth-of-type(even) { margin-left: 22%; }
.ph-path .ph-stop::after { content: ''; position: absolute; left: 50%; top: 100%; height: 14px; border-left: 3px dotted rgba(255, 255, 255, 0.45); }
.ph-path .ph-stop:last-of-type::after { display: none; }
.ph-path .ph-stop.is-done::after { border-left-color: #6fdc8c; border-left-style: solid; }
.ph-path .ph-stop.is-here { outline: 3px solid #ffd23c; outline-offset: 2px; }
.ph-path .ph-teach { display: block; flex-basis: 100%; text-align: left; opacity: 0.92; }
.ph-path-ch { margin: 6px 0 10px; font-weight: 700; }
.ph-path-ch:first-child { margin-top: 0; }
.ph-path .ph-stop { height: auto; min-height: 0; padding-top: 8px; padding-bottom: 10px; row-gap: 2px; }
.ph-path .ph-teach { white-space: normal; line-height: 1.15; }
.ph-path .ph-stop, .ph-path .ph-path-ch { flex: 0 0 auto; }
.ph-path .ph-stop { overflow: visible; }

/* ===== A PRESS EXPLAINS IT (screens, 2026-11-27; the rest of A5) ===== */
.pt-why { all: unset; cursor: pointer; pointer-events: auto; border-bottom: 1px dotted currentColor; }
.pt-why:focus-visible { outline: 2px solid #ffd23c; }

/* ===== THE TROPHY SHELF (reasons to come back, 2026-11-27; R2) ===== */
.ph-shelf small { display: block; flex-basis: 100%; }
.ph-shelf-next { color: #ffe28a; }
.ph-shelf-facts, .ph-shelf-list { margin: 4px 0 8px; padding-left: 16px; }
.ph-shelf-list { list-style: none; padding-left: 0; }
.ph-shelf-list li.is-done { color: #b8ffcf; }

/* ===== THE BOOK FILLS IN (medium items, 2026-11-27; R3) ===== */
.ph-ways li.is-seen { color: #d6ffe2; }
.ph-way-tick { color: #5fe08a; font-weight: 700; }

/* ===== STORY: THE ENDING AND THE LADDER (2026-11-27; S2) ===== */
.pt-ending { max-width: 560px; margin: 8px auto; padding: 14px 16px; line-height: 1.35; }
.pt-ending p { margin: 8px 0; }
