/* Pitchside, web edition: the terminal on page 4.
   Colours are the app's own (crates/pitchside/src/ui/theme.rs): Ember, Graphite and Daylight. */

.pst {
  container: pst / inline-size;
  --canvas: #1E1714; --sidebar: #271E18; --card: #272019; --raised: #31281F; --popover: #2D2520;
  --border: rgba(255, 255, 255, 0.078); --border-strong: rgba(255, 255, 255, 0.141);
  --text: #F5F1EE; --muted: #A89D96; --faint: #958A84;
  --accent: #E0784F; --on-accent: #1E1714; --selected: #4A3022;
  --live: #5B8DEF; --success: #34D399; --danger: #FB414A; --warning: #FBBF24; --info: #60A5FA;
  --bid: #34D399; --ask: #FB6A6F; --kbd: #3A302A;
  --home: #34D399; --draw: #8A817B; --away: #5B8DEF;
  --ui: -apple-system, BlinkMacSystemFont, 'Inter', 'Segoe UI', system-ui, sans-serif;
  --num: ui-monospace, 'SF Mono', 'JetBrains Mono', Menlo, Consolas, monospace;
  position: relative;
}
.pst[data-theme='graphite'] {
  --canvas: #0A0A0A; --sidebar: #101011; --card: #121213; --raised: #1A1A1C; --popover: #18181A;
  --border: rgba(255, 255, 255, 0.078); --border-strong: rgba(255, 255, 255, 0.149);
  --text: #F1F3F7; --muted: #A3A3A3; --faint: #8C8C8C; --accent: #4D6FF0; --on-accent: #FFFFFF; --selected: #1F2125; --kbd: #26262A;
  --draw: #8C8C8C;
}
.pst[data-theme='daylight'] {
  --canvas: #F4F1EC; --sidebar: #ECE7E0; --card: #FFFFFF; --raised: #F0ECE6; --popover: #FFFFFF;
  --border: rgba(0, 0, 0, 0.086); --border-strong: rgba(0, 0, 0, 0.157);
  --text: #1F1A16; --muted: #5E554E; --faint: #6B625B; --accent: #B34A22; --on-accent: #FFFFFF; --selected: #F6DCCD;
  --live: #2A62CC; --success: #08744F; --danger: #C6222F; --warning: #8F5C12; --info: #2A62CC; --bid: #08744F; --ask: #C43039; --kbd: #E6E0D8;
  --home: #08744F; --draw: #9A918A; --away: #2A62CC;
}

.pst-win {
  position: relative; overflow: hidden; border: 1px solid var(--ink, #141210); border-radius: 12px;
  background: var(--canvas); color: var(--text); font: 400 13px/1.35 var(--ui); font-feature-settings: 'tnum' 1;
  -webkit-font-smoothing: antialiased; letter-spacing: 0; text-align: left;
  box-shadow: 0 1px 0 rgba(20, 18, 16, 0.25), 0 30px 60px -34px rgba(20, 18, 16, 0.55);
}
.pst *, .pst *::before, .pst *::after { box-sizing: border-box; }
.pst p { margin: 0; }
:where(.pst) button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; text-align: inherit; }
.pst button:focus-visible, .pst input:focus-visible, .pst select:focus-visible, .pst [tabindex]:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; border-radius: 6px; }
.pst kbd { display: inline-flex; align-items: center; min-width: 0; padding: 1px 5px; border: 0; border-radius: 4px; background: var(--kbd); color: var(--muted); font: 500 11px/1.35 var(--num); }
.pst .mono { font-family: var(--num); font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
.pst-dim { color: var(--muted); }
.pst-small { font-size: 11.5px; }
.pst-grow { flex: 1 1 auto; }
.pst .ok { color: var(--success); }
.pst .bad { color: var(--danger); }
.pst .pi { width: 15px; height: 15px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.pst .pi.flip { transform: scaleY(-1); }
.pst .dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--faint); flex: none; }
.pst .dot.ok { background: var(--success); }
.pst .dot.live { background: var(--live); }

/* titlebar */
.pst-title { display: flex; align-items: center; gap: 6px; height: 42px; padding: 0 8px 0 12px; border-bottom: 1px solid var(--border); background: var(--canvas); }
.pst-lights { display: flex; gap: 7px; margin-right: 6px; }
.pst-lights i { width: 11px; height: 11px; border-radius: 50%; background: var(--border-strong); }
.pst-ib { display: inline-grid; place-items: center; width: 30px; height: 28px; border-radius: 6px; color: var(--muted); }
.pst-ib:hover { background: var(--raised); color: var(--text); }
.pst-ib[aria-pressed='true'] { background: var(--raised); color: var(--text); }
.pst-crumb { display: flex; align-items: center; gap: 8px; min-width: 0; white-space: nowrap; overflow: hidden; }
.pst-crumb-m { font-weight: 600; overflow: hidden; text-overflow: ellipsis; }
.pst-de { display: inline-grid; place-items: center; height: 18px; padding: 0 4px; border-radius: 4px; background: #B4233A; color: #fff; font: 700 10px/1 var(--ui); letter-spacing: 0.02em; }
.pst-pill { display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 9px; border-radius: 11px; font-size: 12px; font-weight: 500; white-space: nowrap; }
.pst-pill.warn { background: color-mix(in srgb, var(--warning) 16%, transparent); color: var(--warning); border: 1px solid color-mix(in srgb, var(--warning) 45%, transparent); }
.pst-pill.warn .dot { background: var(--warning); }
.pst-pill.live { background: color-mix(in srgb, var(--live) 16%, transparent); color: var(--live); font-family: var(--num); }
.pst-pill.live .dot { background: var(--live); animation: pst-pulse 1.6s ease-in-out infinite; }
@keyframes pst-pulse { 50% { opacity: 0.35; } }
.pst-kill { display: inline-flex; align-items: center; gap: 6px; height: 28px; margin-left: 4px; padding: 0 6px 0 9px; border-radius: 7px; border: 1px solid color-mix(in srgb, var(--danger) 55%, transparent); background: color-mix(in srgb, var(--danger) 14%, transparent); color: var(--danger); font-weight: 600; }
.pst-kill:hover { background: color-mix(in srgb, var(--danger) 24%, transparent); }
.pst-kill kbd { background: color-mix(in srgb, var(--danger) 18%, transparent); color: inherit; }
.pst-kill.hit { animation: pst-hit 0.6s ease-out; }
@keyframes pst-hit { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--danger) 70%, transparent); } 100% { box-shadow: 0 0 0 12px transparent; } }

/* the body */
.pst-body { display: grid; grid-template-columns: 208px minmax(0, 1fr) 268px; grid-template-areas: 'side main rail'; height: 936px; }
.pst[data-side='0'] .pst-body { grid-template-columns: minmax(0, 1fr) 268px; grid-template-areas: 'main rail'; }
.pst[data-side='0'] .pst-side { display: none; }
.pst[data-watch='1'] .pst-body { grid-template-columns: minmax(0, 1fr) 340px; grid-template-areas: 'main rail'; }
.pst[data-watch='1'] .pst-side { display: none; }

/* sidebar */
.pst-side { grid-area: side; display: flex; flex-direction: column; gap: 8px; min-height: 0; overflow-y: auto; padding: 10px 10px 10px; background: var(--sidebar); border-right: 1px solid var(--border); }
.pst-brand { display: flex; align-items: center; gap: 7px; padding: 2px 2px 4px; font-size: 14px; }
.pst-brand .pi { color: var(--accent); }
.pst-search { display: flex; align-items: center; gap: 7px; height: 32px; padding: 0 6px 0 9px; border: 1px solid var(--border-strong); border-radius: 7px; color: var(--muted); }
.pst-search input { flex: 1; min-width: 0; height: 100%; border: 0; background: none; color: var(--text); font: inherit; outline: none; }
.pst-search input::placeholder { color: var(--faint); }
.pst-search:focus-within { border-color: var(--accent); }
.pst-sh { display: flex; align-items: center; gap: 6px; margin-top: 6px; padding: 0 2px; color: var(--muted); font-size: 12px; }
.pst-sh b { font-weight: 500; color: var(--text); }
.pst-mcard { display: grid; gap: 4px; padding: 9px 10px; border-radius: 8px; background: color-mix(in srgb, var(--accent) 16%, var(--sidebar)); }
.pst-mcard:hover { background: color-mix(in srgb, var(--accent) 22%, var(--sidebar)); }
.pst-mcard-1, .pst-mcard-3 { display: flex; align-items: center; gap: 6px; font-size: 12px; }
.pst-mcard-2 { font-weight: 600; font-size: 13px; }
.pst-live-s { display: inline-flex; align-items: center; gap: 4px; color: var(--live); font-size: 12px; }
.pst-live-s .pi { width: 13px; height: 13px; }
.pst-moments { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.pst-moments button { display: grid; grid-template-columns: 44px 1fr; gap: 6px; width: 100%; padding: 6px; border-radius: 6px; font-size: 12px; }
.pst-moments button:hover { background: var(--raised); }
.pst-moments .mono { color: var(--accent); padding-top: 1px; }
.pst-moments b { display: block; font-weight: 500; }
.pst-moments i { display: block; font-style: normal; color: var(--faint); font-size: 11.5px; }
.pst-side-note { margin-top: auto !important; padding: 8px 2px 0; border-top: 1px solid var(--border); color: var(--faint); font-size: 11.5px; line-height: 1.4; }
.pst-side-foot { display: flex; justify-content: space-between; padding: 0 2px; font-size: 11.5px; color: var(--muted); }

/* main */
.pst-main { grid-area: main; display: grid; min-width: 0; min-height: 0; gap: 8px; padding: 8px;
  grid-template-columns: minmax(0, 1fr) 292px; grid-template-rows: auto auto auto minmax(0, 1fr) 236px;
  grid-template-areas: 'tr tr' 'mc mc' 'oc oc' 'ch bk' 'tb tk'; }
.pst-card { min-width: 0; background: var(--card); border: 1px solid var(--border); border-radius: 9px; }
.pst-tr { grid-area: tr; } .pst-match { grid-area: mc; } .pst-outs { grid-area: oc; } .pst-chart { grid-area: ch; }
.pst-book { grid-area: bk; } .pst-tabs { grid-area: tb; } .pst-ticket { grid-area: tk; }
.pst-mtabs { display: none; }

/* transport */
.pst-tr { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 6px 8px 6px 12px; }
.pst-tr-l { display: flex; align-items: center; gap: 7px; white-space: nowrap; }
.pst-tr-l .pi { color: var(--warning); }
.pst-play { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px 0 9px; border-radius: 7px; background: var(--accent); color: var(--on-accent); font-weight: 600; }
.pst-play:hover { filter: brightness(1.08); }
.pst-tr-clock { min-width: 46px; font-size: 15px; font-weight: 600; }
.pst-scrub { --v: 0%; flex: 1 1 120px; min-width: 80px; height: 22px; margin: 0; background: none; -webkit-appearance: none; appearance: none; cursor: pointer; }
.pst-scrub::-webkit-slider-runnable-track { height: 4px; border-radius: 2px; background: linear-gradient(to right, var(--accent) var(--v), var(--border-strong) var(--v)); }
.pst-scrub::-moz-range-track { height: 4px; border-radius: 2px; background: var(--border-strong); }
.pst-scrub::-moz-range-progress { height: 4px; border-radius: 2px; background: var(--accent); }
.pst-scrub::-webkit-slider-thumb { -webkit-appearance: none; width: 14px; height: 14px; margin-top: -5px; border-radius: 50%; background: var(--text); border: 2px solid var(--accent); }
.pst-scrub::-moz-range-thumb { width: 12px; height: 12px; border-radius: 50%; background: var(--text); border: 2px solid var(--accent); }
.pst-seg { display: inline-flex; flex: none; padding: 2px; border-radius: 7px; background: var(--raised); border: 1px solid var(--border); }
.pst-seg button { height: 24px; padding: 0 9px; border-radius: 5px; color: var(--muted); font-size: 12px; font-weight: 500; white-space: nowrap; }
.pst-seg button:hover { color: var(--text); }
.pst-seg button[aria-pressed='true'] { background: var(--card); color: var(--text); box-shadow: 0 0 0 1px var(--border-strong); }
.pst-btn { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 10px; border-radius: 7px; color: var(--muted); white-space: nowrap; }
.pst-btn:hover { background: var(--raised); color: var(--text); }

/* match card */
.pst-match { padding: 10px 14px 9px; }
.pst-mc-top { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; }
.pst-mc-id { display: flex; align-items: center; gap: 8px; }
.pst-mc-id > span { display: grid; }
.pst-mc-id b { font-size: 12.5px; }
.pst-mc-id i { font-style: normal; color: var(--muted); font-size: 12px; }
.pst-mc-teams { display: flex; align-items: center; gap: 12px; white-space: nowrap; }
.pst-team { font-size: 16px; font-weight: 600; }
.pst-score { padding: 1px 10px; border: 1px solid var(--border-strong); border-radius: 7px; font-size: 22px; font-weight: 600; }
.pst-mc-top > .pst-pill { justify-self: end; }
.pst-prob { display: flex; gap: 3px; height: 5px; margin: 10px 0 5px; }
.pst-prob i { flex: 1 1 0; border-radius: 3px; transition: flex-grow 0.4s; }
.pst-prob .h { background: var(--home); } .pst-prob .d { background: var(--draw); } .pst-prob .a { background: var(--away); }
.pst-prob-l { display: flex; justify-content: space-between; font-size: 12px; font-weight: 600; }
.pst-prob-l .h { color: var(--home); } .pst-prob-l .d { color: var(--muted); font-weight: 400; } .pst-prob-l .a { color: var(--away); }
.pst-specs { display: flex; flex-wrap: wrap; gap: 4px 18px; margin-top: 5px !important; color: var(--muted); font-size: 12px; }
.pst-specs b { color: var(--text); font-weight: 500; }

/* outcome cards */
.pst-outs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.pst-out { display: grid; gap: 4px; padding: 8px 10px 8px; text-align: left; transition: border-color 0.15s; }
.pst-out:hover { border-color: var(--border-strong); }
.pst-out[aria-pressed='true'] { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 7%, var(--card)); }
.pst-out-h { display: flex; align-items: center; gap: 6px; min-width: 0; }
.pst-out-n { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pst-tag { display: inline-grid; place-items: center; min-width: 20px; height: 16px; padding: 0 3px; border-radius: 4px; font: 700 9.5px/1 var(--ui); color: #fff; }
.pst-tag.t-home { background: #B4233A; } .pst-tag.t-draw { background: var(--draw); } .pst-tag.t-away { background: #1E5AA8; }
.pst-delta { display: inline-flex; align-items: center; gap: 3px; margin-left: auto; padding: 1px 6px; border-radius: 5px; font: 600 11.5px/1.35 var(--num); color: var(--muted); background: var(--raised); white-space: nowrap; }
.pst-delta .pi { width: 12px; height: 12px; }
.pst-delta.up { color: var(--bid); background: color-mix(in srgb, var(--bid) 14%, transparent); }
.pst-delta.down { color: var(--ask); background: color-mix(in srgb, var(--ask) 14%, transparent); }
.pst-out-m { display: flex; align-items: center; gap: 7px; min-width: 0; }
.pst-out-p { font-size: 21px; font-weight: 700; letter-spacing: -0.02em; }
.pst-pos { padding: 1px 5px; border-radius: 4px; background: var(--raised); font-size: 11px; white-space: nowrap; }
.pst-pos[hidden] { display: none; }
.pst-spark { flex: 1 1 60px; min-width: 40px; height: 26px; }
.pst-out-q { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; }
.pst-out-q > span { display: flex; justify-content: space-between; gap: 6px; padding: 3px 7px; border-radius: 5px; font-size: 12px; font-weight: 500; white-space: nowrap; }
.pst-out-q b { font-weight: 500; color: var(--text); }
.pst-out-q .yes { color: var(--bid); background: color-mix(in srgb, var(--bid) 11%, transparent); }
.pst-out-q .no { color: var(--ask); background: color-mix(in srgb, var(--ask) 11%, transparent); }

/* chart */
.pst-chart { display: flex; flex-direction: column; min-height: 0; padding: 10px 10px 4px 12px; }
.pst-ch-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.pst-ch-name { color: var(--muted); font-size: 12.5px; }
.pst-ch-price { display: flex; align-items: baseline; gap: 7px; }
.pst-ch-price b { font-size: 20px; font-weight: 700; }
.pst-ch-price [data-r='ch-delta'] { font: 600 12px var(--num); }
.pst-ch-canvas { flex: 1 1 auto; width: 100%; min-height: 0; margin-top: 4px; }

/* book */
.pst-book { display: flex; flex-direction: column; min-height: 0; padding: 10px 10px 8px; }
.pst-bk-head { display: flex; justify-content: space-between; align-items: baseline; }
.pst-bk-head b { font-weight: 600; }
.pst-bk-depth { display: flex; justify-content: space-between; margin-top: 6px; color: var(--muted); font-size: 11.5px; }
.pst-bk-bar { height: 3px; margin: 3px 0 6px; border-radius: 2px; background: var(--ask); overflow: hidden; }
.pst-bk-bar i { display: block; height: 100%; background: var(--bid); transition: width 0.3s; }
.pst-bk-cols, .pst-bk-r { display: grid; grid-template-columns: 1fr 52px 1fr; align-items: center; }
.pst-bk-cols { padding: 2px 0 4px; color: var(--muted); font-size: 11.5px; text-align: center; }
.pst-bk-rows { display: grid; gap: 1px; min-height: 0; }
.pst-bk-r { position: relative; height: 22px; border-radius: 4px; font-size: 12.5px; }
.pst-bk-r:hover { background: var(--raised); }
.pst-bk-r .p { text-align: center; font-weight: 600; }
.pst-bk-r.bid .p { color: var(--bid); }
.pst-bk-r.ask .p { color: var(--muted); }
.pst-bk-r.ask.touch { background: color-mix(in srgb, var(--ask) 12%, transparent); }
.pst-bk-r.ask.touch .p { color: var(--ask); }
.pst-bk-r.bid.touch { background: color-mix(in srgb, var(--bid) 11%, transparent); box-shadow: inset 2px 0 0 var(--bid); }
.pst-bk-r.mine { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 70%, transparent); background: color-mix(in srgb, var(--accent) 12%, transparent); }
.pst-bk-r .b, .pst-bk-r .a { position: relative; display: flex; align-items: center; height: 100%; padding: 0 6px; }
.pst-bk-r .b { justify-content: flex-end; }
.pst-bar { position: absolute; top: 2px; bottom: 2px; width: calc(var(--w) * 100%); border-radius: 3px; }
.pst-bk-r.bid .pst-bar { right: 0; background: color-mix(in srgb, var(--bid) 22%, transparent); }
.pst-bk-r.ask .pst-bar { left: 0; background: color-mix(in srgb, var(--ask) 22%, transparent); }
.pst-bk-r .b b, .pst-bk-r .a b { position: relative; font-weight: 500; }
.pst-my { font-style: normal; color: var(--accent); font-size: 11px; }
.pst-bk-foot { display: flex; align-items: center; gap: 6px; margin-top: auto !important; padding-top: 6px; color: var(--muted); font-size: 11.5px; }
.pst-bk-foot .pi { width: 13px; height: 13px; }
.pst-bk-foot b { color: var(--text); font-weight: 500; }
.pst-bk-off { min-height: 15px; color: var(--muted); font: 500 11px/1.35 var(--num); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* tabs */
.pst-tabs { display: flex; flex-direction: column; min-height: 0; padding: 8px 10px 6px; }
.pst-tabbar { display: flex; gap: 1px; padding-bottom: 6px; border-bottom: 1px solid var(--border); overflow-x: auto; scrollbar-width: none; }
.pst-tabbar::-webkit-scrollbar { display: none; }
/* where the strip is wider than its card it scrolls sideways, and fades out towards whatever is still out of sight */
.pst-tabbar[data-more='r'] { -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 44px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 44px), transparent); }
.pst-tabbar[data-more='l'] { -webkit-mask-image: linear-gradient(270deg, #000 calc(100% - 44px), transparent); mask-image: linear-gradient(270deg, #000 calc(100% - 44px), transparent); }
.pst-tabbar[data-more='lr'] { -webkit-mask-image: linear-gradient(90deg, transparent, #000 44px, #000 calc(100% - 44px), transparent); mask-image: linear-gradient(90deg, transparent, #000 44px, #000 calc(100% - 44px), transparent); }
.pst-tabbar button { flex: none; height: 28px; padding: 0 5px; border-radius: 6px; color: var(--muted); font-weight: 500; white-space: nowrap; }
.pst-tabbar button:hover { color: var(--text); }
.pst-tabbar button[aria-selected='true'] { background: var(--raised); color: var(--text); box-shadow: 0 0 0 1px var(--border-strong); }
.pst-tabbar .mono { margin-left: 3px; font-size: 11.5px; }
/* the strip holds all seven tabs without a scroll: 5 px of padding and a 1 px gap fit it at 1440 and 1024; where the
   desktop grid gives this panel its narrowest column (about 1265 to 1310 wide) the labels are set a size smaller */
.pst-tabs { container: pst-tabs / inline-size; }
@container pst-tabs (min-width: 360px) and (max-width: 404px) {
  .pst-tabbar button { padding: 0 3px; font-size: 12px; }
  .pst-tabbar .mono { margin-left: 2px; font-size: 11px; }
}
.pst-tabbody { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding-top: 4px; scrollbar-width: thin; scrollbar-color: var(--border-strong) transparent; }
.pst-tbl { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.pst-tbl th { position: sticky; top: 0; z-index: 1; padding: 5px 6px; background: var(--card); color: var(--muted); font-weight: 500; text-align: left; white-space: nowrap; }
.pst-tbl td { padding: 5px 6px; border-top: 1px solid var(--border); white-space: nowrap; }
.pst-tbl .r { text-align: right; }
.pst-tbl .buy { color: var(--bid); font-weight: 600; } .pst-tbl .sell { color: var(--ask); font-weight: 600; }
.pst-state { display: inline-block; padding: 1px 7px; border-radius: 9px; background: color-mix(in srgb, var(--success) 16%, transparent); color: var(--success); font-size: 11.5px; }
.pst-fillbar { --f: 0; display: inline-block; min-width: 86px; padding-bottom: 2px; background: linear-gradient(var(--bid), var(--bid)) 0 100% / calc(var(--f) * 100%) 2px no-repeat, linear-gradient(var(--border-strong), var(--border-strong)) 0 100% / 100% 2px no-repeat; }
.pst-x { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 5px; color: var(--muted); }
.pst-x:hover { background: color-mix(in srgb, var(--danger) 18%, transparent); color: var(--danger); }
.pst-x .pi { width: 13px; height: 13px; }
.pst-src { font-size: 12px; } .pst-src.s-ladder, .pst-src.s-panic { color: var(--accent); }
.pst-tabact { padding: 4px 6px 2px; font-size: 12px; }
.pst-link { color: var(--danger); font-size: 12px; } .pst-link:hover { text-decoration: underline; }
.pst-goalsum b { color: var(--text); font-weight: 600; }
.pst-empty { padding: 14px 6px; color: var(--muted); font-size: 12.5px; list-style: none; }
.pst-evlist, .pst-log, .pst-feedlist { list-style: none; margin: 0; padding: 0; }
.pst-evlist li { display: grid; grid-template-columns: 32px 18px 1fr auto; align-items: start; gap: 6px; padding: 6px 6px; border-top: 1px solid var(--border); font-size: 12.5px; }
.pst-evlist li:first-child { border-top: 0; }
.pst-evlist li.key { background: color-mix(in srgb, var(--success) 10%, transparent); border-radius: 6px; font-weight: 600; }
.pst-evlist li .pi { color: var(--success); margin-top: 1px; }
.pst-evlist em { display: block; font-style: normal; font-weight: 400; color: var(--warning); font-size: 11.5px; }
.pst-log li { display: grid; grid-template-columns: 46px 1fr; gap: 8px; padding: 4px 6px; border-top: 1px solid var(--border); font-size: 12px; }
.pst-log li.pk-warn span:last-child { color: var(--warning); }
.pst-log li.pk-fill span:last-child { color: var(--bid); }
.pst-log li.pk-kill span:last-child { color: var(--danger); font-weight: 600; }
.pst-log li.pk-goal span:last-child { color: var(--live); }

/* ticket */
.pst-ticket { display: flex; flex-direction: column; gap: 8px; padding: 10px; }
.pst-tk-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.pst-tk-head b { font-weight: 600; }
.pst-tk-head span { font-size: 11.5px; }
.pst-tk-row { display: flex; align-items: center; gap: 6px; }
.pst-select { position: relative; flex: 1; min-width: 0; }
.pst-select select { width: 100%; height: 30px; padding: 0 22px 0 9px; border: 1px solid var(--border-strong); border-radius: 7px; background: var(--card); color: var(--text); font: 500 12.5px var(--ui); -webkit-appearance: none; appearance: none; text-overflow: ellipsis; }
.pst-select::after { content: '⌄'; position: absolute; right: 8px; top: 3px; color: var(--muted); pointer-events: none; }
.pst-lbl { color: var(--muted); font-size: 12px; width: 28px; flex: none; }
.pst-chips { display: flex; gap: 3px; }
.pst-chips button { height: 24px; padding: 0 6px; border-radius: 5px; background: var(--raised); color: var(--muted); font: 500 11.5px var(--num); }
.pst-chips button[aria-pressed='true'] { color: var(--accent); background: color-mix(in srgb, var(--accent) 16%, transparent); }
.pst-num { display: flex; align-items: center; gap: 4px; flex: 1; min-width: 0; height: 30px; padding: 0 8px; border: 1px solid var(--border-strong); border-radius: 7px; color: var(--muted); font-size: 12px; }
.pst-num input { flex: 1; min-width: 0; width: 100%; border: 0; background: none; color: var(--text); font: 600 13px var(--num); text-align: right; outline: none; }
.pst-num input::placeholder { color: var(--faint); font-weight: 400; }
.pst-num:focus-within { border-color: var(--accent); }
.pst-bestp { flex: none; height: 28px; padding: 0 9px; border-radius: 7px; background: var(--raised); font-size: 12px; font-weight: 600; }
.pst-bestp:hover { box-shadow: 0 0 0 1px var(--border-strong); }
.pst-tk-hint { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 11.5px; line-height: 1.3; }
.pst-tk-hint .pi { width: 13px; height: 13px; }
.pst-submit { display: inline-flex; align-items: center; justify-content: center; gap: 6px; align-self: flex-end; height: 32px; margin-top: auto; padding: 0 14px; border-radius: 7px; border: 1px solid var(--accent); background: color-mix(in srgb, var(--accent) 14%, transparent); color: var(--accent); font-weight: 600; }
.pst-submit:hover { background: color-mix(in srgb, var(--accent) 24%, transparent); }
.pst-submit.sell .pi { transform: rotate(180deg); }

/* right rail */
.pst-rail { grid-area: rail; display: flex; flex-direction: column; gap: 8px; min-height: 0; overflow-y: auto; padding: 8px 8px 8px 0; scrollbar-width: thin; scrollbar-color: var(--border-strong) transparent; }
.pst-rc { flex: none; padding: 10px 12px; background: var(--card); border: 1px solid var(--border); border-radius: 9px; }
.pst-rc > header { display: flex; align-items: center; gap: 7px; margin-bottom: 8px; }
.pst-rc > header b { font-weight: 600; }
.pst-rc > header .pi { color: var(--muted); }
.pst-mini { display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 4px 0 8px; border-radius: 6px; background: color-mix(in srgb, var(--accent) 14%, transparent); color: var(--accent); font-weight: 600; font-size: 12px; }
.pst-mini kbd { background: transparent; color: inherit; padding: 0 3px; }
.pst-ladbtns { display: grid; grid-template-columns: 1fr; gap: 6px; }
.pst-ladbtns button { display: flex; align-items: center; justify-content: space-between; gap: 4px; min-width: 0; height: 32px; padding: 0 5px 0 9px; border: 1px solid var(--border-strong); border-radius: 7px; font-weight: 600; font-size: 12.5px; transition: background 0.15s, border-color 0.15s; }
.pst-ladbtns button span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pst-ladbtns button:hover { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 10%, transparent); }
.pst[data-cue='ladder'] .pst-ladbtns [data-ladder='away'] { border-color: var(--accent); animation: pst-cue 1.4s ease-in-out infinite; }
@keyframes pst-cue { 50% { box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 30%, transparent); } }
.pst-ladlist { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 1px; }
.pst-ladlist li { display: grid; grid-template-columns: auto 1fr auto; gap: 8px; align-items: baseline; padding: 4px 2px; font-size: 12.5px; }
.pst-ladlist li .mono { color: var(--bid); }
.pst-ladlist li b { font-weight: 500; color: var(--muted); }
.pst-ladlist li.filled b { color: var(--bid); }
.pst-ladlist li.pst-empty { display: block; padding: 2px; color: var(--faint); font-size: 11.5px; line-height: 1.4; }
.pst-rc > header kbd { margin-left: auto; }
.pst-grow-row { display: flex; align-items: center; gap: 9px; padding: 3px 0; font-size: 12.5px; }
.pst-guardlist .pst-empty { padding: 0; color: var(--faint); font-size: 11.5px; line-height: 1.4; }
.pst-switch { position: relative; flex: none; width: 34px; height: 20px; border-radius: 10px; background: var(--border-strong); transition: background 0.2s; }
.pst-switch i { position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform 0.2s; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3); }
.pst-switch[aria-checked='true'] { background: var(--accent); }
.pst-switch[aria-checked='true'] i { transform: translateX(14px); }
.r-status p { display: flex; align-items: center; gap: 8px; padding: 3px 0; font-size: 12.5px; }
.r-status p b { font-weight: 500; }
.r-status .pi { color: var(--muted); }
.pst-feeds { gap: 12px !important; color: var(--muted); }
.pst-feeds span { display: inline-flex; align-items: center; gap: 5px; }
.pst-feeds .dot { width: 6px; height: 6px; }
.r-account > header .pst-dim { font-size: 11.5px; }
.pst-pnl { display: flex; align-items: baseline; gap: 8px; }
.pst-pnl b { font-size: 26px; font-weight: 700; letter-spacing: -0.02em; }
.pst-acct { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 14px; margin: 6px 0 0; font-size: 12px; }
.pst-acct div { display: flex; justify-content: space-between; gap: 6px; }
.pst-acct dt { color: var(--muted); }
.pst-acct dd { margin: 0; font-weight: 500; }
.pst-lim { --f: 0; display: grid; grid-template-columns: 74px 1fr auto; align-items: center; gap: 8px; padding: 3px 0; font-size: 12px; }
.pst-lim > span:first-child { color: var(--muted); }
.pst-lim-bar { position: relative; height: 4px; border-radius: 2px; background: var(--border-strong); }
.pst-lim-bar i { position: absolute; left: 0; top: 0; bottom: 0; width: max(2px, calc(var(--f) * 100%)); border-radius: 2px; background: var(--text); transition: width 0.3s; }
.pst-lim.hot .pst-lim-bar i { background: var(--danger); }
.r-limits .pst-small { margin-top: 5px; }
.pst-auto { display: grid; grid-template-columns: 18px 1fr auto; align-items: center; gap: 9px; padding: 7px 0; border-top: 1px solid var(--border); }
.pst-auto:first-of-type { border-top: 0; padding-top: 0; }
.pst-auto > .pi { color: var(--warning); }
.pst-auto-t b { display: block; font-weight: 600; font-size: 12.5px; }
.pst-auto-t i { display: block; font-style: normal; color: var(--muted); font-size: 11.5px; line-height: 1.3; }
.pst-auto[data-a='panic'] .pst-auto-t i { color: var(--accent); }
.r-watch, .r-feed { display: none; }
.pst[data-watch='1'] .r-watch, .pst[data-watch='1'] .r-feed { display: block; }
.pst[data-watch='1'] .r-status, .pst[data-watch='1'] .r-limits, .pst[data-watch='1'] .r-auto { display: none; }
.r-watch { padding: 0; overflow: hidden; border-style: dashed; border-color: var(--border-strong); }
.pst-bc { position: relative; aspect-ratio: 16 / 9; background: #0f2418; color: #fff; }
.pst-bc-pitch { position: absolute; inset: 0; width: 100%; height: 100%; }
.pst-bc-pitch [data-r='bc-ball'] { transition: cx 0.25s linear, cy 0.25s linear; }
.pst-bc-score { position: absolute; left: 8px; top: 8px; padding: 2px 7px; border-radius: 4px; background: rgba(10, 10, 10, 0.82); font-size: 12px; font-weight: 600; }
.pst-bc-min { position: absolute; left: 8px; top: 31px; padding: 1px 6px; border-radius: 4px; background: var(--live); font-size: 11px; font-weight: 600; }
.pst-bc-lower { position: absolute; left: 8px; right: 8px; bottom: 26px; padding: 4px 8px; border-radius: 4px; background: rgba(10, 10, 10, 0.84); font-size: 11.5px; line-height: 1.3; opacity: 0; transform: translateY(4px); transition: opacity 0.3s, transform 0.3s; }
.pst-bc-lower.on { opacity: 1; transform: none; }
.pst-bc-tag { position: absolute; left: 0; right: 0; bottom: 0; padding: 4px 8px; background: rgba(0, 0, 0, 0.55); color: rgba(255, 255, 255, 0.82); font-size: 11px; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pst-feedlist li { display: grid; grid-template-columns: 28px 16px 1fr; gap: 6px; padding: 4px 0; border-top: 1px solid var(--border); font-size: 12px; color: var(--muted); }
.pst-feedlist li.key { color: var(--text); font-weight: 600; }
.pst-feedlist li .pi { width: 14px; height: 14px; color: var(--success); }

/* status bar, toast */
.pst-status { display: flex; align-items: center; gap: 12px; height: 30px; padding: 0 12px; border-top: 1px solid var(--border); font-size: 12px; white-space: nowrap; }
.pst-st-msg { display: flex; align-items: center; gap: 7px; flex: 1 1 0; min-width: 0; overflow: hidden; }
.pst-status > .pst-grow { display: none; }
.pst-st-msg b { flex: none; font-weight: 600; }
.pst-st-msg span { overflow: hidden; text-overflow: ellipsis; color: var(--muted); }
.pst-st-msg .pi { width: 13px; height: 13px; color: var(--success); }
.pst-st-msg.pk-warn .pi, .pst-st-msg.pk-warn b { color: var(--warning); }
.pst-st-msg.pk-kill .pi, .pst-st-msg.pk-kill b { color: var(--danger); }
.pst-st-k { display: inline-flex; align-items: center; gap: 5px; color: var(--muted); }
.pst-st-k .dot { width: 6px; height: 6px; }
.pst-toast { position: absolute; z-index: 6; left: 12px; right: 12px; top: calc(52px + var(--gd-h, 0px)); width: fit-content; max-width: 620px; margin: 0 auto; display: flex; align-items: center; gap: 8px; padding: 9px 14px; border-radius: 9px; background: var(--popover); border: 1px solid var(--border-strong); box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35); font-size: 13px; font-weight: 500; opacity: 0; transform: translateY(-8px); pointer-events: none; transition: opacity 0.2s, transform 0.2s; }
.pst-toast.on { opacity: 1; transform: none; }
.pst-toast .pi { color: var(--success); }
.pst-toast.pk-warn { border-color: color-mix(in srgb, var(--warning) 60%, transparent); }
.pst-toast.pk-warn .pi { color: var(--warning); }
.pst-toast.pk-fill .pi { color: var(--bid); }
.pst-toast.pk-kill { border-color: color-mix(in srgb, var(--danger) 70%, transparent); }
.pst-toast.pk-kill .pi { color: var(--danger); }
.pst-toast.pk-goal .pi { color: var(--live); }

/* palette, settings */
.pst-layer { position: absolute; z-index: 8; inset: 0; display: flex; justify-content: center; align-items: flex-start; padding: 70px 16px 16px; background: rgba(0, 0, 0, 0.42); }
.pst[data-theme='daylight'] .pst-layer { background: rgba(31, 26, 22, 0.28); }
.pst-layer[hidden] { display: none; }
.pst-pal-box, .pst-set-box { width: min(620px, 100%); max-height: calc(100% - 20px); display: flex; flex-direction: column; padding: 8px; border-radius: 12px; background: var(--popover); border: 1px solid var(--border-strong); box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45); }
.pst-pal-in { display: flex; align-items: center; gap: 8px; height: 38px; padding: 0 10px; border: 1px solid var(--accent); border-radius: 8px; color: var(--muted); }
.pst-pal-in input:focus-visible { outline: none; }
.pst-pal-in input { flex: 1; min-width: 0; border: 0; background: none; color: var(--text); font: 400 14px var(--ui); outline: none; }
.pst-pal-list { list-style: none; margin: 6px 0 0; padding: 0; overflow-y: auto; min-height: 0; max-height: 420px; scrollbar-width: thin; scrollbar-color: var(--border-strong) transparent; }
.pst-pal-g { padding: 8px 8px 4px; color: var(--muted); font-size: 11.5px; font-weight: 500; }
.pst-pal-list [role='option'] { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; padding: 8px 10px; border-radius: 7px; font-weight: 500; cursor: pointer; }
.pst-pal-list [role='option'] .pst-dim { text-align: right; font-weight: 400; font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pst-pal-list [aria-selected='true'] { background: var(--selected); }
.pst-pal-list .bad > span:first-child { color: var(--danger); }
.pst-pal-foot { display: flex; align-items: center; gap: 6px; padding: 8px 6px 2px; border-top: 1px solid var(--border); margin-top: 6px !important; color: var(--muted); font-size: 12px; }
.pst-set-box { width: min(440px, 100%); padding: 12px 14px 14px; }
.pst-set-box header { display: flex; align-items: center; }
.pst-set-k { margin: 12px 0 6px !important; color: var(--muted); font-size: 12px; }
.pst-themes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.pst-themes button { display: grid; gap: 6px; padding: 8px; border: 1px solid var(--border-strong); border-radius: 8px; font-size: 12.5px; }
.pst-themes button[aria-pressed='true'] { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.pst-themes b { font-weight: 600; }
.pst-sw { display: flex; height: 34px; border-radius: 5px; overflow: hidden; }
.pst-sw i { flex: 1; }
.sw-ember i:nth-child(1) { background: #1E1714; flex: 2; } .sw-ember i:nth-child(2) { background: #31281F; } .sw-ember i:nth-child(3) { background: #E0784F; }
.sw-graphite i:nth-child(1) { background: #0A0A0A; flex: 2; } .sw-graphite i:nth-child(2) { background: #1A1A1C; } .sw-graphite i:nth-child(3) { background: #4D6FF0; }
.sw-daylight i:nth-child(1) { background: #F4F1EC; flex: 2; } .sw-daylight i:nth-child(2) { background: #FFFFFF; } .sw-daylight i:nth-child(3) { background: #B34A22; }
.pst-set-l { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 16px; margin: 0; font-size: 12.5px; }
.pst-set-l div { display: flex; justify-content: space-between; gap: 8px; padding: 3px 0; border-bottom: 1px solid var(--border); }
.pst-set-l dt { color: var(--muted); } .pst-set-l dd { margin: 0; }

/* ───────── narrower windows ───────── */
@container pst (max-width: 1179px) {
  .pst[data-side='1'] .pst-body { grid-template-columns: minmax(0, 1fr) 268px; grid-template-areas: 'main rail'; }
  .pst[data-side='1'] .pst-side { position: absolute; z-index: 7; left: 0; top: 42px; bottom: 30px; width: 232px; box-shadow: 12px 0 30px rgba(0, 0, 0, 0.35); }
}
@container pst (max-width: 1000px) {
  .pst-body, .pst[data-side] .pst-body { grid-template-columns: minmax(0, 1fr) 236px; }
  .pst[data-watch='1'] .pst-body { grid-template-columns: minmax(0, 1fr) 280px; }
  .pst-main { grid-template-columns: minmax(0, 1fr) 256px; }
  .pst-tr-l .pst-xs, .pst-xs { display: none; }
  .pst-tr-l b { display: none; }
  .pst-team { font-size: 14.5px; }
  .pst-out-q > span { padding: 3px 5px; font-size: 11.5px; }
  .pst-out-p { font-size: 19px; }
  .pst-spark { display: none; }
  .pst-chips button { padding: 0 5px; }
  /* the ticket's column is 236 px here: the last row gives its price box room for the whole of "price" */
  .pst-ticket .pst-tk-row { gap: 5px; }
  .pst-ticket .pst-seg button { padding: 0 7px; }
  .pst-bestp { padding: 0 6px; }
  .pst-num { padding: 0 6px; gap: 3px; }
  .pst-num input::placeholder { font-size: 12px; }
  .pst-fillbar { min-width: 56px; }
  .pst-tbl { font-size: 12px; }
  .pst-tbl th, .pst-tbl td { padding: 5px 4px; }
  .pst-tbl .pst-yes { display: none; }
}
@container pst (max-width: 860px) {
  .pst-body, .pst[data-side] .pst-body, .pst[data-watch='1'] .pst-body { display: block; height: auto; }
  .pst-main { grid-template-columns: minmax(0, 1fr) 264px; grid-template-rows: auto auto auto 330px 270px; }
  .pst-rail { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; overflow: visible; padding: 0 8px 8px; }
  .pst-rail .r-watch { grid-column: 1 / -1; width: 100%; }
  .pst[data-watch='1'] .pst-rail .r-watch { max-width: 560px; }
  .pst-side { display: none !important; }
  [data-do='side'] { display: none !important; }
}

/* phones: one panel group at a time, the match and the transport always on top */
@container pst (max-width: 740px) {
  .pst-win { border-radius: 10px; font-size: 13px; }
  .pst-title { gap: 4px; height: 44px; padding: 0 6px 0 10px; }
  .pst-lights, .pst-crumb .pst-dim, .pst-crumb .pst-sl, .pst-kill kbd { display: none; }
  .pst-crumb { display: none; }
  .pst-kill { padding: 0 9px 0 7px; }
  .pst-pill.warn { padding: 0 7px; }
  .pst-main { display: flex; flex-direction: column; gap: 8px; padding: 8px; }
  .pst-tr { flex-wrap: wrap; gap: 8px 8px; padding: 8px; }
  .pst-tr-l { display: none; }
  .pst-tr-clock { order: 1; font-size: 16px; }
  .pst-play { order: 0; height: 34px; }
  .pst-tr .pst-seg { order: 2; margin-left: auto; }
  .pst-tr .pst-seg button { height: 28px; padding: 0 8px; }
  .pst-scrub { order: 3; flex: 1 1 0; height: 30px; }
  .pst-tr .pst-btn { order: 4; height: 32px; padding: 0 9px; border: 1px solid var(--border-strong); }
  .pst-tr .pst-btn span { display: none; }
  .pst-match { padding: 10px 10px 8px; }
  .pst-mc-top { grid-template-columns: 1fr auto; gap: 6px 8px; }
  .pst-mc-id { display: none; }
  .pst-mc-teams { gap: 8px; min-width: 0; }
  .pst-team { font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; }
  .pst-score { font-size: 18px; padding: 0 7px; }
  .pst-prob-l { font-size: 11.5px; gap: 6px; }
  .pst-prob-l span { white-space: nowrap; }
  .pst-specs { gap: 2px 12px; font-size: 11.5px; }
  .pst-mtabs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; padding: 3px; border-radius: 9px; background: var(--card); border: 1px solid var(--border); }
  .pst-mtabs button { display: grid; justify-items: center; gap: 3px; min-height: 48px; padding: 6px 2px 5px; border-radius: 7px; color: var(--muted); font-size: 11px; font-weight: 600; line-height: 1.15; text-align: center; }
  .pst-mtabs button .pi { width: 16px; height: 16px; }
  .pst-mtabs button[aria-selected='true'] { background: var(--raised); color: var(--text); box-shadow: 0 0 0 1px var(--border-strong); }
  .pst-mtabs button[aria-selected='true'] .pi { color: var(--accent); }
  .pst-outs, .pst-chart, .pst-book, .pst-ticket, .pst-tabs, .pst-rail { display: none !important; }
  .pst[data-mtab='chart'] .pst-outs { display: grid !important; }
  .pst[data-mtab='chart'] .pst-chart { display: flex !important; height: 300px; }
  .pst[data-mtab='book'] .pst-book { display: flex !important; }
  .pst[data-mtab='book'] .pst-ticket { display: flex !important; }
  .pst[data-mtab='orders'] .pst-tabs { display: flex !important; height: 420px; }
  .pst[data-mtab='tools'] .pst-rail { display: flex !important; flex-direction: column; align-items: stretch; padding: 0 8px 8px; }
  .pst[data-mtab='chart'][data-watch='1'] .pst-rail { display: flex !important; flex-direction: column; align-items: stretch; padding: 0 8px 8px; }
  .pst[data-mtab='chart'][data-watch='1'] .pst-rail > :not(.r-watch) { display: none; }
  .pst[data-watch='1'] .pst-rail .r-watch { max-width: none; }
  .pst-outs { grid-template-columns: 1fr; gap: 6px; }
  .pst-out { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: 'h q' 'm q'; align-items: center; column-gap: 10px; padding: 8px 10px; }
  .pst-out-h { grid-area: h; } .pst-out-m { grid-area: m; } .pst-out-q { grid-area: q; grid-template-columns: 1fr; gap: 4px; }
  .pst-out-q > span { min-width: 98px; }
  .pst-spark { display: block; max-width: 90px; }
  .pst-book { padding: 10px; }
  .pst-bk-r { height: 30px; font-size: 13.5px; }
  .pst-bk-off { white-space: normal; }
  .pst-ticket { gap: 10px; }
  .pst-tk-row { flex-wrap: wrap; }
  .pst-chips button { height: 32px; padding: 0 10px; font-size: 13px; }
  .pst-num { flex: 1 1 90px; height: 36px; }
  .pst-select select { height: 36px; }
  .pst-seg button { height: 30px; }
  .pst-submit { align-self: stretch; height: 40px; }
  .pst-tbl { font-size: 12px; }
  .pst-tbl th, .pst-tbl td { padding: 5px 4px; }
  /* the tables: six columns of Fills fit a 390 px phone whole; anything wider scrolls inside the panel, never the page */
  .pst-tabs { padding: 8px 8px 6px; }
  .pst-tabbody { overflow-x: auto; overscroll-behavior-x: contain; }
  .pst-tbl th, .pst-tbl td { padding: 5px 3px; }
  .pst-tbl th:first-child, .pst-tbl td:first-child { padding-left: 2px; }
  .pst-tbl th:last-child, .pst-tbl td:last-child { padding-right: 2px; }
  .pst-auto { display: none; }
  .pst-tabbar button { height: 32px; padding: 0 7px; }
  .pst-ladbtns button { height: 40px; }
  .pst-tbl .pst-yes { display: none; }
  .pst-switch { width: 40px; height: 24px; } .pst-switch i { width: 20px; height: 20px; } .pst-switch[aria-checked='true'] i { transform: translateX(16px); }
  .pst-status { height: auto; min-height: 30px; padding: 6px 10px; flex-wrap: wrap; gap: 4px 10px; white-space: normal; }
  .pst-st-msg { flex: 1 1 100%; }
  .pst-st-msg span { white-space: nowrap; }
  .pst-toast { top: calc(50px + var(--gd-h, 0px)); font-size: 12.5px; }
  .pst-layer { padding: 54px 8px 8px; }
  .pst-pal-list [role='option'] { grid-template-columns: 1fr auto; }
  .pst-pal-list [role='option'] .pst-dim { display: none; }
  .pst-set-l { grid-template-columns: 1fr; }
}
@container pst (max-width: 400px) {
  .pst-pill.warn .dot { display: none; }
  .pst-team { font-size: 12.5px; }
  .pst-mtabs button { font-size: 11px; }
  .pst-tr .pst-seg button { padding: 0 6px; }
  .pst-ib { width: 28px; }
  .pst-kill span { display: none; }
  .pst-kill { padding: 0 7px; }
}
@media (prefers-reduced-motion: reduce) {
  .pst *, .pst *::before { transition: none !important; animation: none !important; }
}
.pst-grow-row > span { white-space: nowrap; }
.pst-grow-row > span:nth-child(2) { min-width: 0; overflow: hidden; text-overflow: ellipsis; }

/* ── the guided example (terminal-guide.js): a coach bar under the title bar, and while it runs a pointer, a
      spotlight ring and one callout, all inside the window. Amber for what to press, green for what is done. ── */
.pst { --gd: #E08A4B; --gd-ok: #4BB67A; --gd-ink: #1E1714; }
.pst[data-theme='daylight'] { --gd: #A8561F; --gd-ok: #08744F; --gd-ink: #FFFFFF; }
.pst-guide { display: flex; align-items: center; gap: 10px; min-height: 46px; padding: 7px 10px 7px 12px; border-bottom: 1px solid var(--border); background: var(--sidebar); font-size: 12.5px; }
.pst-gd-k { display: inline-flex; align-items: center; gap: 7px; flex: none; color: var(--text); white-space: nowrap; }
.pst-gd-k b { font-weight: 600; letter-spacing: 0.01em; }
.pst-gd-lamp { width: 7px; height: 7px; border-radius: 50%; background: var(--gd); box-shadow: 0 0 0 3px color-mix(in srgb, var(--gd) 22%, transparent); }
.pst-guide[data-state='run'] .pst-gd-lamp { animation: pst-gd-blink 1.1s ease-in-out infinite; }
.pst-guide[data-state='done'] .pst-gd-lamp { background: var(--gd-ok); box-shadow: 0 0 0 3px color-mix(in srgb, var(--gd-ok) 22%, transparent); }
@keyframes pst-gd-blink { 50% { opacity: 0.35; } }
.pst-gd-steps { display: flex; gap: 6px; margin: 0; padding: 0; list-style: none; flex: none; }
.pst-gd-steps button { position: relative; display: flex; align-items: center; gap: 7px; height: 32px; padding: 0 10px 0 5px; overflow: hidden; border: 1px solid var(--border-strong); border-radius: 7px; background: var(--card); color: var(--muted); white-space: nowrap; transition: border-color 0.2s, background-color 0.2s, color 0.2s; }
.pst-gd-steps button:hover { color: var(--text); border-color: color-mix(in srgb, var(--gd) 60%, var(--border-strong)); }
.pst-gd-steps em { display: grid; place-items: center; width: 20px; height: 20px; border-radius: 5px; background: var(--raised); color: var(--muted); font: 600 11.5px/1 var(--num); font-style: normal; }
.pst-gd-steps span { display: flex; align-items: baseline; gap: 6px; }
.pst-gd-steps b { font-weight: 600; color: inherit; }
.pst-gd-steps i { font-style: normal; font-size: 11px; color: var(--faint); }
.pst-gd-steps s { position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: var(--gd); transform: scaleX(var(--p, 0)); transform-origin: 0 50%; text-decoration: none; }
.pst-gd-steps button[aria-current='step'] { color: var(--text); border-color: var(--gd); background: color-mix(in srgb, var(--gd) 12%, var(--card)); }
.pst-gd-steps button[aria-current='step'] em { background: var(--gd); color: var(--gd-ink); }
.pst-gd-steps button[data-done='true'] em { background: color-mix(in srgb, var(--gd-ok) 22%, var(--raised)); color: var(--gd-ok); }
.pst-gd-steps button[data-done='true'] s { background: var(--gd-ok); }
.pst-gd-status { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); }
.pst-gd-status b { font-weight: 600; color: var(--text); }
.pst-gd-ctl { display: flex; gap: 6px; flex: none; margin-left: auto; }
.pst-gd-ctl button { display: inline-flex; align-items: center; gap: 7px; height: 32px; padding: 0 12px; border-radius: 7px; font-weight: 600; white-space: nowrap; }
.pst-gd-go { background: var(--gd); color: var(--gd-ink); }
.pst-gd-go:hover { background: color-mix(in srgb, var(--gd) 86%, #fff); }
.pst-gd-go span:first-child { font-size: 10.5px; }
.pst-guide[data-state='run'] .pst-gd-go, .pst-guide[data-state='paused'] .pst-gd-go, .pst-guide[data-state='done'] .pst-gd-go { background: transparent; color: var(--text); box-shadow: inset 0 0 0 1px var(--border-strong); }
.pst-guide[data-state='done'] .pst-gd-go span:first-child { font-size: 13px; color: var(--gd); }
.pst-gd-drive { color: var(--muted); box-shadow: inset 0 0 0 1px var(--border-strong); }
.pst-gd-drive:hover { color: var(--text); }
.pst-guide[data-state='done'] .pst-gd-drive { display: none; }

.pst-gd-fx { position: absolute; z-index: 7; inset: 0; pointer-events: none; opacity: 0; transition: opacity 0.3s; }
.pst-gd-fx.on { opacity: 1; }
.pst-gd-fx.leaving { opacity: 0; }
.pst-gd-fx > i { position: absolute; left: 0; top: 0; display: block; }
.pst-gd-ring, .pst-gd-echo { opacity: 0; border-radius: 10px; transition: transform 0.45s cubic-bezier(0.3, 0.7, 0.2, 1), width 0.45s cubic-bezier(0.3, 0.7, 0.2, 1), height 0.45s cubic-bezier(0.3, 0.7, 0.2, 1), opacity 0.25s; }
.pst-gd-ring { box-shadow: 0 0 0 1.5px var(--gd), 0 0 0 5px color-mix(in srgb, var(--gd) 18%, transparent), 0 0 26px color-mix(in srgb, var(--gd) 32%, transparent); animation: pst-gd-halo 1.6s ease-in-out infinite; }
.pst-gd-ring.on, .pst-gd-echo.on { opacity: 1; }
.pst-gd-ring b { position: absolute; right: -4px; top: -4px; width: 8px; height: 8px; border-radius: 50%; background: var(--gd); box-shadow: 0 0 0 2px var(--canvas); }
.pst-gd-ring b::after { content: ''; position: absolute; inset: -5px; border-radius: 50%; border: 1.5px solid var(--gd); animation: pst-gd-beacon 1.6s ease-out infinite; }
.pst-gd-echo { border: 1px dashed color-mix(in srgb, var(--gd-ok) 80%, transparent); background: color-mix(in srgb, var(--gd-ok) 5%, transparent); }
@keyframes pst-gd-halo { 50% { box-shadow: 0 0 0 1.5px var(--gd), 0 0 0 8px color-mix(in srgb, var(--gd) 10%, transparent), 0 0 34px color-mix(in srgb, var(--gd) 24%, transparent); } }
@keyframes pst-gd-beacon { from { transform: scale(0.5); opacity: 1; } to { transform: scale(1.8); opacity: 0; } }
.pst-gd-ptr { width: 22px; height: 22px; margin: -3px 0 0 -5px; opacity: 0; transition: transform 0.7s cubic-bezier(0.45, 0.05, 0.25, 1), opacity 0.25s; filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.45)); }
.pst-gd-ptr.on { opacity: 1; }
.pst-gd-ptr.jump { transition: none; }
.pst-gd-ptr svg { display: block; width: 22px; height: 22px; fill: #F5F1EE; stroke: #1E1714; stroke-width: 1.3; stroke-linejoin: round; transition: transform 0.1s; transform-origin: 20% 10%; }
.pst-gd-ptr.down svg { transform: scale(0.84); }
.pst-gd-rip { width: 0; height: 0; }
.pst-gd-rip::before { content: ''; position: absolute; left: -16px; top: -16px; width: 32px; height: 32px; border-radius: 50%; border: 2px solid var(--gd); opacity: 0; }
.pst-gd-rip.go::before { animation: pst-gd-rip 0.6s cubic-bezier(0.2, 0.7, 0.3, 1) forwards; }
@keyframes pst-gd-rip { from { transform: scale(0.25); opacity: 1; } to { transform: scale(1.9); opacity: 0; } }

.pst-gd-call { position: absolute; z-index: 7; left: 0; top: 0; max-width: 280px; padding: 11px 12px 9px; border: 1px solid color-mix(in srgb, var(--gd) 55%, var(--border-strong)); border-left: 3px solid var(--gd); border-radius: 9px; background: var(--popover); color: var(--text); box-shadow: 0 16px 36px rgba(0, 0, 0, 0.42); font-size: 12.5px; line-height: 1.45; opacity: 0; transition: opacity 0.25s, transform 0.45s cubic-bezier(0.3, 0.7, 0.2, 1); }
.pst-gd-call.on { opacity: 1; }
.pst-gd-call[hidden] { display: none; }
.pst-gd-cn { display: flex; align-items: baseline; gap: 7px; margin-bottom: 4px; font-weight: 600; font-size: 13px; }
.pst-gd-cn b { color: var(--gd); font-size: 12px; }
.pst-gd-ct { color: var(--muted); }
.pst-gd-ct b { color: var(--text); font-weight: 600; }
.pst-gd-call kbd { padding: 0 5px; color: var(--text); font-size: 11.5px; }
.pst-gd-live { margin-top: 6px; color: var(--gd-ok); font-size: 11.5px; min-height: 1.3em; }
.pst-gd-live:empty { display: none; }
.pst-gd-cb { display: flex; align-items: center; gap: 4px; margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--border); }
.pst-gd-dots { display: flex; gap: 4px; margin-right: auto; }
.pst-gd-dots i { width: 12px; height: 3px; border-radius: 2px; background: var(--border-strong); }
.pst-gd-dots i.on { background: var(--gd); }
.pst-gd-cb button { height: 26px; padding: 0 8px; border-radius: 6px; font-weight: 600; font-size: 12px; color: var(--muted); white-space: nowrap; }
.pst-gd-cb button:hover { color: var(--text); background: var(--raised); }
.pst-gd-cb [data-g='next'] { color: var(--gd-ink); background: var(--gd); }
.pst-gd-cb [data-g='next']:hover { background: color-mix(in srgb, var(--gd) 86%, #fff); color: var(--gd-ink); }

/* narrower windows: the steps lose their minute, then the status goes to the callout */
@container pst (max-width: 1240px) { .pst-gd-steps i { display: none; } }
@container pst (max-width: 1060px) { .pst-gd-status { display: none; } .pst-gd-ctl { margin-left: auto; } }
@container pst (max-width: 740px) {
  .pst-guide { flex-wrap: wrap; gap: 7px 8px; padding: 8px; }
  .pst-gd-steps { order: 3; flex: 1 1 100%; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 5px; }
  .pst-gd-steps button { height: auto; min-height: 40px; padding: 5px 6px 6px 5px; white-space: normal; text-align: left; line-height: 1.2; }
  .pst-gd-steps span { display: block; }
  .pst-gd-steps b { font-size: 11.5px; }
  .pst-gd-ctl button { height: 36px; padding: 0 11px; }
  .pst-gd-call { max-width: none; font-size: 13px; }
  .pst-gd-cb button { height: 32px; padding: 0 11px; }
}
@container pst (max-width: 400px) {
  .pst-guide[data-state='idle'] .pst-gd-k b { display: none; }
  .pst-gd-ctl button { padding: 0 9px; font-size: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  .pst-gd-fx, .pst-gd-ring, .pst-gd-echo, .pst-gd-call, .pst-gd-ptr { transition: none !important; }
}
@container pst (max-width: 330px) {
  .pst-gd-steps { gap: 4px; }
  .pst-gd-steps button { gap: 5px; padding: 5px 4px 6px 4px; }
  .pst-gd-steps em { width: 17px; height: 17px; font-size: 10.5px; }
  .pst-gd-steps b { font-size: 11px; }
}
/* while the guide narrates, its callout carries the fills: the terminal's own toasts would land on the transport it points at (the status bar still reports each one) */
.pst-win[data-guide='run'] .pst-toast, .pst-win[data-guide='paused'] .pst-toast { visibility: hidden; }
