/* Shared by terminal, library, enlarged dialog and canvas game renderers. */
#ipit-motion{--secret-bg:#f5f6ef;--secret-ink:#252d20;--secret-muted:#59664b;--secret-accent:#4b631c;--secret-border:#b8c3a7;--secret-button:#e2e9d6;--secret-card:#edf1e5;--secret-backdrop:#29302166;--secret-board:#f8f9f3;--secret-grid:#344b2514;--secret-overlay:#f8f9f3cc;--secret-secondary:#708447;--secret-food:#a45416;--secret-highlight:#ffffff50;--secret-block-1:#307d79;--secret-block-2:#a57a17;--secret-block-3:#775aa0;--secret-block-4:#3c6e98;--secret-block-5:#ac612d;--secret-block-6:#5f7a2c;--secret-block-7:#a45559}
html[data-theme=dark] #ipit-motion{--secret-bg:#151a12;--secret-ink:#e9edde;--secret-muted:#b6c2a3;--secret-accent:#d8ed73;--secret-border:#586449;--secret-button:#252e1b;--secret-card:#1c2317;--secret-backdrop:#090c08bf;--secret-board:#12150f;--secret-grid:#ffffff09;--secret-overlay:#12150fcc;--secret-secondary:#829454;--secret-food:#f1bc76;--secret-highlight:#ffffff24;--secret-block-1:#9bc3b9;--secret-block-2:#e4ce83;--secret-block-3:#b4a1c9;--secret-block-4:#94adc6;--secret-block-5:#dda77a;--secret-block-6:#aabd79;--secret-block-7:#cb9691}
#ipit-motion .mac-controls{position:absolute;right:var(--gutter);bottom:95px;z-index:5;display:flex;align-items:center;justify-content:flex-end;gap:10px;flex-wrap:wrap;max-width:calc(100% - 360px);font-size:12px}
#ipit-motion .mac-controls button{min-width:44px;min-height:44px;padding:10px 14px;border:1px solid var(--im-line);border-radius:4px;background:var(--im-paper);font:inherit}
#ipit-motion .mac-controls button:hover{border-color:var(--im-blue)}
#ipit-motion .mac-controls .mac-hint{font:10px ui-monospace,SFMono-Regular,Consolas,monospace;border-color:transparent;color:var(--im-muted)}
#ipit-motion .mac-clue{flex-basis:100%;text-align:right;font-size:11px;color:var(--im-muted)}
#ipit-motion .mac-clue:empty{display:none}
#ipit-motion .scene-stage.mac-interactive{cursor:grab;touch-action:pan-y}
#ipit-motion .scene-stage.mac-dragging{cursor:grabbing}
#ipit-motion .mac-secret{position:absolute;inset:calc(var(--screen-menu-height) + var(--screen-toolbar-height)) 0 0;z-index:29;pointer-events:auto;background:var(--secret-bg);color:var(--secret-ink);display:flex;flex-direction:column;overflow:hidden;font:30px/1.6 ui-monospace,SFMono-Regular,Consolas,monospace;--secret-target:120px}
#ipit-motion .mac-secret button{min-height:var(--secret-target);min-width:var(--secret-target);border:1px solid var(--secret-border);border-radius:5px;background:var(--secret-button);color:var(--secret-ink);padding:12px 22px;font:inherit}
#ipit-motion .secret-header{display:flex;align-items:center;justify-content:space-between;gap:20px;padding:10px 32px;border-bottom:1px solid var(--secret-border);font-size:25px;letter-spacing:.04em}
#ipit-motion .secret-header i{display:inline-block;width:10px;height:10px;margin-right:12px;border-radius:50%;background:var(--secret-accent)}
#ipit-motion .secret-header .secret-close{border-color:transparent;background:none;font-size:42px}
#ipit-motion .secret-playing .secret-header{display:none}
#ipit-motion .secret-terminal{display:flex;flex-direction:column;flex:1;min-height:0;padding:25px 40px}
#ipit-motion .secret-output{flex:1;overflow:auto;white-space:pre-wrap;overscroll-behavior:contain}
#ipit-motion .secret-output p{margin:0 0 12px}
#ipit-motion .secret-output .secret-welcome{color:var(--secret-accent);font-size:38px;margin-bottom:22px}
#ipit-motion .secret-echo{color:var(--secret-muted)}
#ipit-motion .secret-command{display:flex;align-items:center;gap:20px;border-top:1px solid var(--secret-border);margin-top:15px;padding-top:15px}
#ipit-motion .secret-command label{white-space:nowrap;color:var(--secret-accent)}
#ipit-motion .secret-command input{min-width:0;flex:1;min-height:var(--secret-target);background:none;border:0;color:var(--secret-ink);font:inherit;padding:10px}
#ipit-motion .secret-game{flex:1;min-height:0;display:flex;flex-direction:column;padding:10px 32px 20px;gap:10px;font-size:26px}
#ipit-motion .snake-heading{display:flex;align-items:center;justify-content:space-between;gap:20px}
#ipit-motion .snake-heading output{color:var(--secret-accent);margin-left:auto}
#ipit-motion .secret-game canvas{width:100%;height:100%;max-width:100%;min-height:0;object-fit:contain;align-self:center;flex:1;touch-action:none;border:1px solid var(--secret-border);border-radius:6px}
#ipit-motion .snake-controls{display:flex;align-items:center;justify-content:space-between;gap:18px}
#ipit-motion .snake-pad{display:flex;gap:8px}
#ipit-motion .snake-help{font-size:20px;color:var(--secret-muted);max-width:260px}
#ipit-motion .snake-state{font-size:20px;color:var(--secret-muted)}
#ipit-motion .mac-secret-dialog{width:min(960px,calc(100vw - 32px));max-height:calc(100dvh - 32px);margin:auto;padding:0;border:1px solid var(--secret-border);border-radius:12px;background:var(--secret-bg);color:var(--secret-ink);overflow:auto}
#ipit-motion .mac-secret-dialog::backdrop{background:var(--secret-backdrop);backdrop-filter:blur(8px)}
#ipit-motion .mac-secret-dialog .mac-secret{position:relative;inset:auto;min-height:min(580px,calc(100dvh - 110px));max-height:calc(100dvh - 100px);font-size:14px;--secret-target:44px!important}
#ipit-motion .mac-secret-dialog .secret-header{font-size:12px;padding:6px 16px}
#ipit-motion .mac-secret-dialog .secret-close{font-size:24px}
#ipit-motion .mac-secret-dialog .secret-terminal{padding:18px;min-height:240px}
#ipit-motion .mac-secret-dialog .secret-welcome{font-size:20px;margin-bottom:12px}
#ipit-motion .mac-secret-dialog .secret-command{gap:8px;padding-top:8px}
#ipit-motion .mac-secret-dialog .mac-secret button{padding:8px 12px}
#ipit-motion .mac-secret-dialog .secret-game{padding:10px 16px;font-size:13px}
#ipit-motion .mac-secret-dialog .mac-secret.secret-playing{min-height:0}
#ipit-motion .mac-secret-dialog .secret-game canvas{flex:0 1 auto;height:auto;aspect-ratio:2;max-height:calc(100dvh - 240px)}
#ipit-motion .mac-secret-dialog .snake-heading{gap:12px}
#ipit-motion .mac-secret-dialog .snake-help,#ipit-motion .mac-secret-dialog .snake-state{font-size:11px}
#ipit-motion .mac-secret-dialog .snake-controls{gap:8px;flex-wrap:wrap}
#ipit-motion .mac-secret-dialog .snake-pad{gap:4px}
#ipit-motion .secret-collapse{display:block;margin:8px auto;min-height:44px;padding:10px 18px;background:none;border:1px solid var(--secret-border);border-radius:4px;color:inherit;font:14px 'Inter Tight',sans-serif}
@media(max-width:760px){#ipit-motion .mac-controls{bottom:68px;right:24px;left:24px;max-width:none;font-size:11px;gap:3px}#ipit-motion .mac-controls button{padding:8px 10px}#ipit-motion .mac-controls .mac-hint{font-size:9px}#ipit-motion .mac-clue{font-size:10px}}
@media(max-height:600px){#ipit-motion .mac-controls{bottom:74px;max-width:180px;right:20px;left:auto}#ipit-motion .mac-clue,#ipit-motion .snake-help{display:none}#ipit-motion .mac-secret-dialog .secret-game canvas{max-height:calc(100dvh - 240px)}}
#ipit-motion .secret-header-actions{display:flex;align-items:center;gap:12px}
#ipit-motion .secret-library{flex:1;min-height:0;overflow:auto;padding:26px 40px;overscroll-behavior:contain}
#ipit-motion .arcade-eyebrow{font-size:18px;letter-spacing:.1em;color:var(--secret-muted);margin:0 0 14px}
#ipit-motion .secret-library h2{font:500 48px/1.13 'Inter Tight',sans-serif;letter-spacing:-.025em;margin:0 0 26px;color:var(--secret-ink)}
#ipit-motion .arcade-list{display:grid;gap:12px}
#ipit-motion .arcade-list button{display:flex;align-items:center;gap:24px;width:100%;text-align:left;background:var(--secret-card);border-color:var(--secret-border);padding:10px 24px}
#ipit-motion .arcade-list button:hover{border-color:var(--secret-accent);background:var(--secret-button)}
#ipit-motion .arcade-list button>span:last-child{margin-left:auto;color:var(--secret-muted)}
#ipit-motion .arcade-list strong{display:block;font-weight:500;font-size:32px;color:var(--secret-ink)}
#ipit-motion .arcade-list small{display:block;font-size:22px;color:var(--secret-muted)}
#ipit-motion .arcade-symbol{width:70px;color:var(--secret-accent);font-size:36px;text-align:center}
#ipit-motion .arcade-note,#ipit-motion .arcade-error{font-size:19px;color:var(--secret-muted);margin:20px 0 0}
#ipit-motion .arcade-error:empty{display:none}
#ipit-motion .secret-game[data-game=blocks] .snake-pad{flex-wrap:wrap}
#ipit-motion .mac-secret-dialog .secret-header-actions{gap:6px}
#ipit-motion .mac-secret-dialog .secret-library{padding:20px}
#ipit-motion .mac-secret-dialog .arcade-eyebrow{font-size:10px;margin-bottom:12px}
#ipit-motion .mac-secret-dialog .secret-library h2{font-size:28px;margin-bottom:22px}
#ipit-motion .mac-secret-dialog .arcade-list{gap:10px}
#ipit-motion .mac-secret-dialog .arcade-list button{min-height:68px;gap:12px;padding:12px}
#ipit-motion .mac-secret-dialog .arcade-list strong{font-size:17px}
#ipit-motion .mac-secret-dialog .arcade-list small{font-size:11px}
#ipit-motion .mac-secret-dialog .arcade-symbol{font-size:24px;width:36px}
#ipit-motion .mac-secret-dialog .arcade-note,#ipit-motion .mac-secret-dialog .arcade-error{font-size:11px}
#ipit-motion .mac-secret-dialog .secret-game[data-game=blocks] canvas{aspect-ratio:1;max-height:calc(100dvh - 300px)}
@media(max-height:600px) and (min-width:600px){
 #ipit-motion .mac-secret-dialog .secret-game[data-game=blocks]{display:grid;grid-template-columns:minmax(0,1fr) minmax(210px,.8fr);grid-template-rows:auto 1fr auto;gap:8px 20px}
 #ipit-motion .mac-secret-dialog .secret-game[data-game=blocks] .snake-heading{grid-column:1/-1}
 #ipit-motion .mac-secret-dialog .secret-game[data-game=blocks] canvas{grid-column:1;grid-row:2/4;width:auto;height:calc(100dvh - 190px);max-height:calc(100dvh - 190px)}
 #ipit-motion .mac-secret-dialog .secret-game[data-game=blocks] .snake-controls{grid-column:2;grid-row:2;flex-direction:column;align-items:flex-start;justify-content:center}
 #ipit-motion .mac-secret-dialog .secret-game[data-game=blocks] .snake-state{grid-column:2;grid-row:3;margin:0}
}

#ipit-motion .mac-secret .secret-theme{display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;padding:0;background:transparent}
#ipit-motion .mac-secret .secret-theme .theme-dot{width:calc(var(--secret-target)*.4);height:calc(var(--secret-target)*.4);pointer-events:none}
#ipit-motion .mac-secret button:hover{border-color:var(--secret-accent)}
#ipit-motion .mac-secret input::placeholder{color:var(--secret-muted);opacity:1}
