/* Topo Loco 7.18.0: the cabinet around the fairground board. Dark chrome so the scene pops; gold and grass accents.
   The layout panes (.palm-game-pane, [data-palm-layout], .palm-signal-pane) come from palm-beat.css and are shared; everything inside #topo is here. */
#topo{
  --tp-bg:#0f1320;--tp-panel:#171c2c;--tp-panel2:#202740;--tp-line:#2c3550;--tp-ink:#f7f3e8;--tp-muted:#aab3c8;--tp-accent:#ffd45c;--tp-accent2:#7bd86a;--tp-danger:#ff6b7d;--tp-hover:#262f4a;
  color-scheme:dark;font:13px/1.45 var(--font-ui,Manrope,system-ui,sans-serif);color:var(--tp-ink);background:var(--tp-bg);padding:0;border:0;border-radius:0;box-sizing:border-box;
  width:100%;max-width:none;height:100%;max-height:none;overflow:hidden;margin:0;container-type:inline-size;container-name:topo-stage;
}
#topo[data-theme=night]{--tp-bg:#0a0d1c;--tp-panel:#131833;--tp-panel2:#1b2246;--tp-line:#2b3466;--tp-accent:#ffcf5a}
#topo[open]{display:flex;flex-direction:column}
#topo[data-docked=true]{position:relative;inset:auto;min-height:0;flex:1}
#topo:not([data-docked=true]){position:fixed;inset:0;width:100dvw;height:100dvh;max-width:100dvw;max-height:100dvh}
#topo::backdrop{background:#080b16}
#topo *{box-sizing:border-box}
#topo [hidden]{display:none!important}
#topo :is(button,input,select,textarea){font:inherit}
#topo button{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:38px;padding:8px 14px;border:1px solid var(--tp-line);border-radius:10px;background:var(--tp-panel);color:var(--tp-ink);cursor:pointer;white-space:normal;box-shadow:inset 0 1px #ffffff0a;transition:background 140ms ease,border-color 140ms ease,transform 90ms ease}
#topo button:hover{background:var(--tp-hover);border-color:#5b6a93}
#topo button:active{transform:translateY(1px)}
#topo button:disabled{opacity:.4;cursor:default}
#topo .i{width:18px;height:18px;flex:none}
#topo :focus-visible{outline:2px solid var(--tp-accent);outline-offset:3px}
#topo :is(input,select,textarea){width:100%;min-height:40px;padding:8px 12px;border:1px solid #3b4670;border-radius:8px;background:#0c1122;color:var(--tp-ink);box-shadow:inset 0 1px 3px #0004;max-width:100%}
#topo select{appearance:none;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16'%3E%3Cpath d='m4 6 4 4 4-4' fill='none' stroke='%23b6c5d7' stroke-width='1.5'/%3E%3C/svg%3E");background-repeat:no-repeat;background-position:right 10px center;padding-right:31px}
#topo input[type=checkbox]{width:18px;min-height:18px;accent-color:var(--tp-accent)}
#topo input[type=range]{padding:0;accent-color:var(--tp-accent)}
#topo :is(h1,h2,h3){margin:0;color:var(--tp-ink);letter-spacing:-.03em}
#topo h1{font-size:clamp(1.7rem,1.2rem + 2.3vw,2.7rem);line-height:1.08}
#topo h2{font-size:21px;line-height:1.2}
#topo h3{font-size:16px;line-height:1.3}
#topo p{margin:0}
#topo code,#topo kbd{font-family:var(--font-mono,ui-monospace,monospace)}
#topo code{padding:1px 6px;border-radius:5px;background:#0a0e1c;border:1px solid #2c3550;color:#d9e6ff;font-size:.92em}
#topo .tp-table code{white-space:nowrap}
#topo kbd{display:inline-block;min-width:24px;padding:1px 6px;margin:0 2px;border:1px solid #4a5688;border-bottom-width:3px;border-radius:6px;background:#1a2140;font-size:12px;font-weight:700;text-align:center}
#topo .tp-sr{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}
#topo .tp-bg{position:absolute;inset:0;background:radial-gradient(1100px 520px at 78% -10%,#3a2c1a55,transparent 70%),radial-gradient(900px 480px at 8% 110%,#1d4a3a55,transparent 70%);pointer-events:none}
#topo .tp-bg~*{position:relative}
#topo .tp-primary{background:linear-gradient(#ffdf75,#f3b93a);border-color:#ffe9a0;color:#2c1a05;font-weight:800;letter-spacing:.02em;box-shadow:0 6px 18px #f3b93a33,inset 0 1px #fff8}
#topo .tp-primary:hover{background:linear-gradient(#ffe790,#f7c24d);border-color:#fff2c2}
#topo .tp-overline{display:block;margin-bottom:8px;font:700 11px/1 var(--font-mono,ui-monospace,monospace);letter-spacing:.14em;color:var(--tp-accent2)}
#topo .tp-lead{color:var(--tp-muted);font-size:15px;line-height:1.55;max-width:60ch}
#topo .tp-note{color:var(--tp-muted);font-size:12px;line-height:1.5}
#topo .tp-hint{padding:12px 14px;border:1px solid #3d4c2f;border-radius:10px;background:#16241a;color:#d6e8c4;font-size:12px;line-height:1.55}
/* header */
#topo .tp-top{display:flex;align-items:center;gap:14px;flex:none;min-height:52px;padding:7px 14px;border-bottom:1px solid var(--tp-line);background:#0d1120e6;backdrop-filter:blur(6px)}
#topo .tp-brand{min-height:38px;padding:4px 8px;border:0;background:transparent;box-shadow:none;gap:10px}
#topo .tp-brand svg{width:30px;height:30px;color:var(--tp-accent)}
#topo .tp-brand span{display:flex;flex-direction:column;align-items:flex-start;font:900 16px/1 var(--font-ui,sans-serif);letter-spacing:.08em}
#topo .tp-brand small{font:600 9px/1.2 var(--font-mono,monospace);letter-spacing:.18em;color:var(--tp-muted);margin-top:3px}
#topo .tp-header-actions{margin-left:auto;display:flex;align-items:center;gap:6px;min-width:0}
#topo .tp-icon-button{min-width:38px;padding:6px 9px}
#topo .tp-full-controls{width:auto;min-width:150px;max-width:200px;min-height:36px;font-size:12px}
#topo .tp-score-strip{display:flex;align-items:center;gap:22px;margin:0 auto;padding:0 8px}
#topo .tp-score-strip>div{display:flex;flex-direction:column;align-items:flex-start;gap:1px;position:relative;min-width:0}
#topo .tp-score-strip>div:nth-child(2){display:grid;grid-template-columns:auto auto;column-gap:5px;align-items:end}
#topo .tp-score-strip>div:nth-child(2) small{grid-column:1/-1}
#topo .tp-score-strip small{font:700 9px/1 var(--font-mono,monospace);letter-spacing:.14em;color:var(--tp-muted)}
#topo .tp-score-strip b{font:900 22px/1.05 var(--font-ui,sans-serif);font-variant-numeric:tabular-nums;color:var(--tp-ink)}
#topo .tp-score-strip em{font:800 11px var(--font-mono,monospace);color:var(--tp-accent2);font-style:normal;padding-bottom:3px}
#topo .tp-score-strip em.is-fever{color:var(--tp-accent);text-shadow:0 0 10px #ffd45c88}
#topo .tp-score-strip b.is-danger{color:var(--tp-danger);animation:tp-pulse .9s ease-in-out infinite}
@keyframes tp-pulse{50%{opacity:.55}}
#topo .tp-tabs{display:flex;gap:4px;flex:none;padding:6px 12px;border-bottom:1px solid var(--tp-line);background:#0d1120;overflow-x:auto}
#topo .tp-tabs button{min-height:34px;border-color:transparent;background:transparent;font-weight:600;white-space:nowrap}
#topo .tp-tabs button[aria-current=true]{background:var(--tp-panel2);border-color:#4a5688;color:var(--tp-accent)}
#topo .tp-content{flex:1;min-height:0;overflow:auto;padding:20px clamp(14px,3cqi,34px) 26px;overscroll-behavior:contain;scrollbar-gutter:stable}
#topo[data-tab=home] .tp-content{padding:0;touch-action:pan-y}
#topo[data-tab=play] .tp-content{padding:0;overflow:hidden;display:flex;flex-direction:column;scrollbar-gutter:auto}
#topo .tp-footer{flex:none;display:flex;justify-content:space-between;gap:12px;padding:6px 14px;border-top:1px solid var(--tp-line);background:#0b0e1a;color:var(--tp-muted);font-size:11px;line-height:1.4;min-height:30px;align-items:center}
/* home */
#topo .tp-home{display:flex;flex-direction:column;gap:22px;padding:clamp(16px,3cqi,36px)}
#topo .tp-hero{display:grid;grid-template-columns:minmax(0,1.02fr) minmax(0,1fr);gap:clamp(18px,3cqi,40px);align-items:center}
#topo .tp-hero-copy{display:flex;flex-direction:column;gap:14px;min-width:0}
#topo .tp-hero-copy h1{font-size:clamp(2.4rem,1.3rem + 4.6cqi,4.6rem);font-weight:900;letter-spacing:-.04em;background:linear-gradient(#fff1b8,#ffc93a 60%,#e7952a);-webkit-background-clip:text;background-clip:text;color:transparent;text-shadow:none;filter:drop-shadow(0 4px 0 #6a3c0e) drop-shadow(0 10px 18px #0008)}
#topo .tp-levels{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
#topo .tp-level{flex-direction:column;align-items:flex-start;gap:3px;padding:10px 12px;text-align:left;min-height:68px}
#topo .tp-level b{font-size:14px}
#topo .tp-level small{font-size:10.5px;color:var(--tp-muted);line-height:1.3}
#topo .tp-level .tp-level-n{font:800 10px var(--font-mono,monospace);color:var(--tp-accent2);letter-spacing:.12em}
#topo .tp-level[aria-pressed=true]{border-color:var(--tp-accent);background:linear-gradient(#2a2713,#1a1d2a);box-shadow:0 0 0 1px var(--tp-accent),0 8px 22px #ffd45c1c}
#topo .tp-options{display:grid;grid-template-columns:1fr 1fr;gap:10px;align-items:end}
#topo .tp-options label{display:grid;gap:5px;font-size:11px;color:var(--tp-muted);font-weight:600}
#topo .tp-segment{grid-column:1/-1;display:flex;gap:0;border:1px solid var(--tp-line);border-radius:10px;overflow:hidden}
#topo .tp-segment button{flex:1;border:0;border-radius:0;border-right:1px solid var(--tp-line);font-size:12px;min-height:38px;padding:6px 8px}
#topo .tp-segment button:last-child{border-right:0}
#topo .tp-segment button[aria-pressed=true]{background:var(--tp-accent);color:#2c1a05;font-weight:800}
#topo .tp-cta{display:flex;align-items:center;gap:16px;flex-wrap:wrap}
#topo #tp-play{min-height:54px;padding:10px 38px;font-size:19px;border-radius:14px}
#topo .tp-keys-note{font-size:12px;color:var(--tp-muted)}
#topo .tp-keys-note small{opacity:.8}
#topo .tp-hero-art{min-width:0;border-radius:18px;overflow:hidden;border:1px solid var(--tp-line);box-shadow:0 18px 46px #0009;aspect-ratio:1000/640;background:#1b2a3a}
#topo .tp-preview{display:block;width:100%;height:100%}
#topo .tp-home-grid{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.2fr);gap:16px}
#topo .tp-card{padding:16px 18px;border:1px solid var(--tp-line);border-radius:14px;background:linear-gradient(#1a2033,#151a2a);display:flex;flex-direction:column;gap:10px}
#topo .tp-card p{color:var(--tp-muted);font-size:13px;line-height:1.55}
#topo .tp-top6{list-style:none;margin:0;padding:0;display:grid;gap:5px}
#topo .tp-top6 li{display:grid;grid-template-columns:32px 1fr auto;gap:10px;align-items:center;padding:7px 10px;border-radius:9px;background:#10162a;border:1px solid #232c4b}
#topo .tp-top6 li.is-empty{opacity:.5}
#topo .tp-rank-index{font:800 12px var(--font-mono,monospace);color:var(--tp-accent)}
#topo .tp-rank-player small{display:block;font-size:10.5px;color:var(--tp-muted)}
#topo .tp-top6 b{font:800 15px var(--font-ui,sans-serif);font-variant-numeric:tabular-nums}
#topo .tp-shortcuts{display:flex;flex-wrap:wrap;gap:8px}
/* match */
#topo .tp-game{flex:1;min-height:0;display:flex;flex-direction:column;position:relative}
#topo .tp-canvas-wrap{position:relative;flex:1;min-height:0;background:#0b1224}
#topo #tp-canvas{position:absolute;inset:0;width:100%;height:100%;display:block;touch-action:none;cursor:pointer;-webkit-tap-highlight-color:transparent;user-select:none}
#topo .tp-pads{flex:none;display:grid;grid-template-columns:repeat(8,minmax(0,1fr));gap:6px;padding:8px 10px;background:#0c1020;border-top:1px solid var(--tp-line)}
#topo .tp-pad{flex-direction:column;gap:0;min-height:54px;padding:4px;border-radius:12px;border:2px solid color-mix(in srgb,var(--c) 70%,#000);background:linear-gradient(color-mix(in srgb,var(--c) 22%,#151b2e),#121728);touch-action:none;user-select:none;-webkit-tap-highlight-color:transparent}
#topo .tp-pad b{font:900 20px/1 var(--font-ui,sans-serif);color:var(--c)}
#topo .tp-pad small{font:700 10px/1.1 var(--font-mono,monospace);color:var(--tp-muted);letter-spacing:.06em}
#topo .tp-pad.pressed{background:linear-gradient(var(--c),color-mix(in srgb,var(--c) 70%,#000));transform:translateY(2px);box-shadow:0 0 18px color-mix(in srgb,var(--c) 70%,transparent)}
#topo .tp-pad.pressed b,#topo .tp-pad.pressed small{color:#1b1204}
#topo .tp-live-note{position:absolute;left:12px;bottom:78px;max-width:60%;font:700 11px var(--font-mono,monospace);letter-spacing:.06em;color:#ffffffb8;text-shadow:0 1px 3px #000;pointer-events:none}
#topo .tp-render-recovery{position:absolute;inset:0;z-index:9;display:grid;place-content:center;gap:16px;padding:24px;background:#0b1018f5;color:#f4f7fb;text-align:center}
#topo .tp-render-recovery strong{font-size:22px}#topo .tp-render-recovery p{max-width:350px;margin:0;font-size:13px;line-height:1.6;color:#c2cfdf}
/* result */
#topo .tp-result{max-width:760px;margin:0 auto;display:flex;flex-direction:column;align-items:flex-start;gap:14px;padding:10px 0}
#topo .tp-result-mark svg{width:64px;height:64px;color:var(--tp-accent)}
#topo .tp-stats{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;width:100%}
#topo .tp-stats>div{padding:12px 14px;border:1px solid var(--tp-line);border-radius:12px;background:var(--tp-panel)}
#topo .tp-stats small{display:block;font:700 9.5px var(--font-mono,monospace);letter-spacing:.14em;color:var(--tp-muted)}
#topo .tp-stats b{font:900 26px/1.1 var(--font-ui,sans-serif);font-variant-numeric:tabular-nums}
#topo .tp-holebars{display:grid;grid-template-columns:repeat(8,1fr);gap:8px;width:100%;height:120px;align-items:end;padding:10px 12px;border:1px solid var(--tp-line);border-radius:12px;background:var(--tp-panel)}
#topo .tp-holebars>div{position:relative;height:100%;display:flex;flex-direction:column;justify-content:flex-end;align-items:center;gap:2px}
#topo .tp-holebars i{display:block;width:100%;max-width:34px;min-height:3px;border-radius:5px 5px 2px 2px;background:var(--c)}
#topo .tp-holebars b{font:800 11px var(--font-mono,monospace)}#topo .tp-holebars small{font:700 10px var(--font-mono,monospace);color:var(--tp-muted)}
#topo .tp-actions-row{display:flex;flex-wrap:wrap;gap:8px;align-items:center}
/* sections: program, learn, connection, settings, signals */
#topo .tp-section{max-width:1080px;margin:0 auto;display:flex;flex-direction:column;gap:14px}
#topo .tp-section>h2{margin-top:6px}
#topo .tp-progress{display:flex;align-items:center;gap:6px;flex-wrap:wrap}
#topo .tp-progress span{display:grid;place-items:center;width:34px;height:34px;border-radius:50%;border:2px dashed color-mix(in srgb,var(--c) 55%,#000);color:var(--tp-muted);font-weight:800}
#topo .tp-progress span.done{border-style:solid;background:var(--c);color:#1b1204}
#topo .tp-progress em{font-style:normal;margin-left:8px;color:var(--tp-muted);font-size:12px}
#topo .tp-builder{display:flex;flex-direction:column;gap:12px;padding:16px;border:1px solid var(--tp-line);border-radius:14px;background:var(--tp-panel)}
#topo .tp-rule{display:grid;grid-template-columns:1fr auto 1fr auto 1fr;gap:10px;align-items:end}
#topo .tp-rule label{display:grid;gap:5px;font-size:11px;font-weight:700;color:var(--tp-muted);min-width:0}
#topo .tp-rule>span{align-self:center;padding-top:18px;font:800 11px var(--font-mono,monospace);color:var(--tp-accent2)}
#topo .tp-test{display:flex;flex-direction:column;gap:8px;align-items:flex-start}
#topo .tp-test pre{width:100%;margin:0;padding:12px 14px;max-height:260px;overflow:auto;border:1px solid var(--tp-line);border-radius:10px;background:#0a0e1c;color:#cfe0f4;font:12px/1.55 var(--font-mono,monospace);white-space:pre-wrap}
#topo .tp-grid3{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px}
#topo .tp-grid3>div{padding:14px;border:1px solid var(--tp-line);border-radius:12px;background:var(--tp-panel)}
#topo .tp-grid3 p{color:var(--tp-muted);font-size:13px;line-height:1.55;margin-top:6px}
#topo .tp-diagram{padding:14px 18px;border:1px solid var(--tp-line);border-radius:12px;background:#0d1224;color:var(--tp-accent);max-width:640px}
#topo .tp-diagram svg{width:100%;height:auto;display:block}
#topo .tp-live-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px}
#topo .tp-live-grid>div{display:grid;grid-template-columns:auto 1fr auto;gap:4px 8px;align-items:center;padding:9px 10px;border:1px solid color-mix(in srgb,var(--c) 45%,#000);border-radius:11px;background:var(--tp-panel);font:600 10px var(--font-mono,monospace);color:var(--tp-muted)}
#topo .tp-live-grid .tp-learn-input{grid-row:span 3;min-width:40px;min-height:40px;border-radius:50%;border:2px solid var(--c);color:var(--c);font:900 18px var(--font-ui,sans-serif);padding:0}
#topo .tp-bit{display:inline-grid;place-items:center;min-width:24px;height:22px;padding:0 5px;border-radius:6px;background:#0a0e1c;border:1px solid #2c3550;color:#76809f;font:800 12px var(--font-mono,monospace)}
#topo .tp-bit.on{background:var(--tp-accent2);border-color:#b9f5a8;color:#0c2108;box-shadow:0 0 10px #7bd86a77}
#topo .tp-table-scroll{overflow:auto;border:1px solid var(--tp-line);border-radius:12px;background:var(--tp-panel);max-width:100%}
#topo .tp-table{width:100%;border-collapse:collapse;font-size:12px}
#topo .tp-table th{position:sticky;top:0;text-align:left;padding:8px 10px;background:#1b2240;font:700 10px var(--font-mono,monospace);letter-spacing:.1em;color:var(--tp-muted)}
#topo .tp-table td{padding:6px 10px;border-top:1px solid #232c4b;vertical-align:middle}
#topo .tp-table td small{display:block;color:var(--tp-muted);font-size:10.5px}
#topo .tp-table input{min-height:32px;padding:4px 8px;font-size:12px}
#topo .tp-table tbody tr[style*="--c"] td:first-child{border-left:4px solid var(--c)}
#topo .tp-levels-table input{min-width:70px}#topo .tp-levels-table td:first-child input{min-width:150px}
#topo .tp-connect-grid{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:16px;align-items:start}
#topo .tp-wiring{width:100%;height:auto;color:var(--tp-ink);padding:10px;border:1px solid var(--tp-line);border-radius:12px;background:#0d1224}
#topo .tp-form-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(210px,1fr));gap:12px}
#topo .tp-form-grid label,#topo details label{display:grid;gap:5px;font-size:11px;font-weight:600;color:var(--tp-muted)}
#topo .tp-check{display:flex!important;align-items:center;grid-auto-flow:column;gap:8px!important;color:var(--tp-ink)!important;font-size:12.5px!important}
#topo details{border:1px solid var(--tp-line);border-radius:12px;background:var(--tp-panel);padding:0}
#topo details>summary{cursor:pointer;padding:12px 14px;font-weight:700;list-style:none}
#topo details>summary::before{content:'▸';display:inline-block;width:18px;color:var(--tp-accent)}
#topo details[open]>summary::before{content:'▾'}
#topo details>*:not(summary){margin:0 14px 14px}
#topo .tp-keys-grid{display:grid;grid-template-columns:repeat(8,minmax(0,1fr));gap:8px}
#topo .tp-keys-grid label{grid-template-columns:auto 1fr;align-items:center;padding:6px 8px;border-radius:9px;border:1px solid color-mix(in srgb,var(--c) 50%,#000)}
#topo .tp-keys-grid input{text-align:center;text-transform:uppercase;font-weight:800}
#topo .tp-file{position:relative;display:inline-flex!important;align-items:center;justify-content:center;min-height:38px;padding:8px 14px;border:1px solid var(--tp-line);border-radius:10px;background:var(--tp-panel);cursor:pointer;color:var(--tp-ink)!important;font-size:13px!important;font-weight:400!important}
#topo .tp-file input{position:absolute;inset:0;opacity:0;cursor:pointer;min-height:0}
/* compact when docked beside the Ladder or the plant */
#topo[data-presentation=triple] .tp-top,#topo[data-presentation=ladder-game] .tp-top,#topo[data-presentation=plant-game] .tp-top{padding:5px 9px;gap:6px;min-height:42px}
#topo[data-presentation=triple] .tp-brand span,#topo[data-presentation=ladder-game] .tp-brand span,#topo[data-presentation=plant-game] .tp-brand span{display:none}
#topo[data-presentation=triple] .tp-brand svg,#topo[data-presentation=ladder-game] .tp-brand svg,#topo[data-presentation=plant-game] .tp-brand svg{width:22px;height:22px}
#topo[data-presentation=triple] .tp-score-strip,#topo[data-presentation=ladder-game] .tp-score-strip,#topo[data-presentation=plant-game] .tp-score-strip{gap:12px}
#topo[data-presentation=triple] .tp-score-strip b,#topo[data-presentation=ladder-game] .tp-score-strip b,#topo[data-presentation=plant-game] .tp-score-strip b{font-size:15px}
#topo[data-presentation=triple] .tp-score-strip small,#topo[data-presentation=ladder-game] .tp-score-strip small,#topo[data-presentation=plant-game] .tp-score-strip small{display:none}
#topo[data-presentation=triple] .tp-footer,#topo[data-presentation=ladder-game] .tp-footer,#topo[data-presentation=plant-game] .tp-footer{display:none}
#topo[data-presentation=triple] .tp-full-controls,#topo[data-presentation=ladder-game] .tp-full-controls,#topo[data-presentation=plant-game] .tp-full-controls{min-width:120px;font-size:10px;min-height:28px}
#topo[data-presentation=triple] .tp-pad,#topo[data-presentation=ladder-game] .tp-pad,#topo[data-presentation=plant-game] .tp-pad{min-height:40px}
#topo[data-presentation=triple] .tp-pad small,#topo[data-presentation=ladder-game] .tp-pad small,#topo[data-presentation=plant-game] .tp-pad small{display:none}
@container topo-stage (max-width:860px){
  #topo .tp-hero{grid-template-columns:1fr}
  #topo .tp-hero-art{order:-1;max-height:300px}
  #topo .tp-home-grid,#topo .tp-connect-grid,#topo .tp-grid3{grid-template-columns:1fr}
  #topo .tp-live-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  #topo .tp-rule{grid-template-columns:1fr}#topo .tp-rule>span{padding:0}
  #topo .tp-keys-grid{grid-template-columns:repeat(4,minmax(0,1fr))}
}
@container topo-stage (max-width:560px){
  #topo .tp-live-note{display:none}
  #topo .tp-top{flex-wrap:wrap;gap:6px}#topo .tp-brand span{display:none}
  #topo .tp-score-strip{gap:12px;order:3;width:100%;justify-content:space-between;margin:0}#topo .tp-score-strip b{font-size:17px}#topo .tp-score-strip em{display:none}
  #topo .tp-levels{grid-template-columns:1fr}#topo .tp-options{grid-template-columns:1fr}
  #topo .tp-pads{gap:4px;padding:6px}#topo .tp-pad{min-height:50px}#topo .tp-pad small{display:none}
  #topo .tp-stats{grid-template-columns:repeat(2,minmax(0,1fr))}
  #topo .tp-full-controls{min-width:96px;max-width:120px}
}
#workspace-content:fullscreen #topo .tp-full-controls{display:inline-flex;min-height:32px;height:32px;font-size:11px;color:#e8f2ff;background-color:#101d2e;border:1px solid #355470;padding:4px 22px 4px 8px;max-width:185px}
#workspace-content:fullscreen #topo .tp-match-top{min-height:44px;padding:4px 10px;gap:10px}
#workspace-content:fullscreen #topo .tp-footer{display:none}
#workspace-content:fullscreen #topo #tp-pause{display:inline-flex!important}
#topo:not([data-presentation=cabinet]) .tp-full-controls{display:none}
#workspace-content:fullscreen #topo .tp-full-controls{display:inline-flex}
@media(prefers-reduced-motion:reduce){#topo *{animation:none!important;transition:none!important;scroll-behavior:auto!important}#topo button:active{transform:none}}
#topo.tp-no-motion *{animation:none!important;transition:none!important}
/* the workspace around the cabinet (the same arrangement rules Palm Beat uses, under this game's own body class) */
.topo-project .view-tabs>button[data-view],.topo-project #show-board,.topo-project .plant-toolbar .arcade-tools,.topo-project .pb-lesson-launch{display:none!important}
#topo-workspace-view{width:165px;min-width:130px;flex:0 0 165px;font-size:11px;min-height:30px}
#topo-workspace-view[hidden]{display:none!important}
.topo-project #topo-workspace-view{width:225px;min-width:180px;flex-basis:225px}
.topo-project #workspace-content{position:relative;padding-bottom:var(--palm-io-height,180px);box-sizing:border-box}
.topo-match-active #toggle-run,.topo-match-active #step{display:none!important}
html.is-mobile .mobile-bar.mobile-palm>[data-tab=plant],html.is-mobile .mobile-bar.mobile-palm>[data-tab=ladder],html.is-mobile.topo-project #tp-pause{display:none!important}
html.is-mobile .mobile-bar.mobile-palm #topo-workspace-view{grid-column:span 2;width:100%;min-width:0;max-width:100%;height:44px;margin:0;font-size:10px;display:block}
.topo-project:has(#topo[open]) #focus-workspace{display:none!important}
.topo-project .library-tabs{flex-wrap:wrap}.topo-project .library-tabs:before{content:'COMPONENTES';display:block;flex-basis:100%;font-size:9px;letter-spacing:1px;padding:3px 0;color:#506279}
.topo-project [data-maximize]{display:none!important}
#workspace-content[data-palm-layout=triple] .plant-toolbar :is(.arcade-tools,#plant-image-add,.editor-modes){display:none}
