/* One phone viewport: manipulation and scrolling have separate surfaces. */
.phone-nav,.phone-only,#phone-view-tools{display:none}
.toolbar-home{display:contents}
.site-settings{display:contents}
.site-settings-toggle{display:none}
html.metatron-phone{--header:62px;--tools:54px;--rail:max(20px,env(safe-area-inset-left,0px),env(safe-area-inset-right,0px));height:100%;overflow:hidden}
html.metatron-phone body{height:100%;overflow:hidden;overscroll-behavior:none}
.metatron-phone .masthead{height:var(--header);align-items:center;padding:12px var(--rail);gap:12px}
.metatron-phone .brand img{height:29px}
.metatron-phone .app-title{font-size:12px;max-width:60%;text-align:right;padding:0}
.metatron-phone .workspace,.metatron-phone .workspace.reading-expanded,.metatron-phone .workspace.focus-mode{position:fixed;inset:var(--header) 0 auto;height:calc(var(--phone-height,100dvh) - var(--header) - var(--sudu-tool-footer,52px) - var(--tools));min-height:0;display:block;padding:0 var(--rail);overflow:hidden}
.metatron-phone .stage{height:100%;min-height:0;display:grid;grid-template-rows:minmax(0,1fr) auto;grid-template-columns:minmax(0,1fr);overflow:hidden}
.metatron-phone #model{grid-row:1;grid-column:1;min-height:0;width:100%;height:100%;scroll-margin:0}
.metatron-phone .stage-top{inset:5px 0 auto;flex-direction:row;font-size:10px;gap:10px;line-height:1.4}
.metatron-phone .stage-top span:last-child{max-width:48%;text-align:right}
.metatron-phone .discovery-dock{position:relative;inset:auto;grid-row:2;grid-column:1;width:100%;max-width:480px;padding:7px 0 12px;margin:0 auto;gap:0;background:var(--paper)}
.metatron-phone .journey-stepper{grid-template-columns:48px minmax(0,1fr) 48px;gap:4px;width:100%}
.metatron-phone .journey-stepper button{width:48px;height:48px}
.metatron-phone .journey-stepper .sudu-chevron{font-size:30px}
.metatron-phone #step-title{font-size:25px;line-height:1.16;overflow-wrap:anywhere}
.metatron-phone .step-eyebrow{font-size:10px;margin-bottom:4px}
.metatron-phone #action-note{font-size:14px;line-height:1.4;margin:8px 0;max-width:360px;min-height:0}
.metatron-phone .scrub-control{width:min(100% - 32px,360px);margin:2px 0 0}
.metatron-phone .scrub-control label{font-size:12px}
.metatron-phone input[type=range]{height:44px;touch-action:pan-y}
.metatron-phone input[type=range]::-webkit-slider-thumb{width:22px;height:22px;margin-top:-10px}
.metatron-phone input[type=range]::-moz-range-thumb{width:16px;height:16px}
.metatron-phone .range-ends{font-size:11px}
.metatron-phone #touch-hint{display:block;font-size:12px;line-height:1.4;margin:7px 0 0;opacity:.8}
.metatron-phone .structures{display:none;position:relative;height:100%;max-height:none!important;border:0;padding:0 0 24px;overflow:auto;overscroll-behavior-y:contain;touch-action:pan-y;scrollbar-width:thin;-webkit-overflow-scrolling:touch}
.metatron-phone .workspace[data-phone-view=shapes] .stage,.metatron-phone .workspace[data-phone-view=read] .stage{display:none}
.metatron-phone .workspace:not([data-phone-view=explore]) .structures{display:block}
.metatron-phone .structures>*{display:none}
.metatron-phone [data-phone-view=shapes] #families{display:flex;position:sticky;top:0;z-index:3;background:var(--paper);gap:0;justify-content:space-between}
.metatron-phone .family-tabs button{font-size:17px;min-height:54px;padding:0 8px}
.metatron-phone [data-phone-view=shapes] #shapes{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px 4px;margin:16px 0;padding:0;overflow:visible}
.metatron-phone .shape-grid button{min-height:112px;font-size:14px;padding:8px 0;flex:none;gap:8px;opacity:.85}
.metatron-phone .shape-grid button svg{width:60px;height:54px}
.metatron-phone .shape-grid button span{min-height:34px;overflow-wrap:anywhere;hyphens:auto}
.metatron-phone [data-phone-view=shapes] #entry-actions{display:flex;border-top:.5px solid var(--line);padding-top:10px}
.metatron-phone .workspace[data-phone-view=controls]{display:grid;grid-template-columns:minmax(0,1fr);grid-template-rows:minmax(140px,40%) minmax(0,1fr);gap:0}
.metatron-phone [data-phone-view=controls] .stage{grid-row:1;grid-column:1;display:block}
.metatron-phone [data-phone-view=controls] .discovery-dock{display:none}
.metatron-phone [data-phone-view=controls] .structures{grid-row:2;grid-column:1;border-top:.5px solid var(--line);padding-top:6px}
.metatron-phone [data-phone-view=controls] #phone-view-tools,.metatron-phone [data-phone-view=controls] #construction-panel,.metatron-phone [data-phone-view=controls] .adjustments{display:block}
.metatron-phone #phone-view-tools .view-toolbar{display:flex;justify-content:space-between;gap:0;margin:0;width:100%}
.metatron-phone .view-toolbar button{width:48px;height:52px;min-height:48px}
.metatron-phone .view-toolbar button svg{width:22px;height:22px}
.metatron-phone .view-toolbar .toolbar-line,.metatron-phone #focus{display:none}
.metatron-phone #zoom-value{font-size:14px;width:50px}
.metatron-phone .adjustments{margin-top:4px;padding-top:8px}
.metatron-phone .model-actions{justify-content:flex-start;gap:0 20px}
.metatron-phone .model-actions button{font-size:15px;min-height:48px;line-height:1.5}
.metatron-phone .control-note,.metatron-phone #construction-note{font-size:14px;line-height:1.6}
.metatron-phone #node-control summary{font-size:15px;min-height:48px}
.metatron-phone #node{font-size:16px;min-height:48px}
.metatron-phone [data-phone-view=controls] .phone-help{display:block;border-top:.5px solid var(--line);margin-top:14px}
.metatron-phone .phone-help summary{font-size:15px;min-height:48px;align-content:center;cursor:pointer}
.metatron-phone .phone-help p{font-size:15px;line-height:1.65}
.metatron-phone .construction-panel{margin-top:8px;padding-top:12px}
.metatron-phone .construction-steps button{min-height:48px;font-size:13px;overflow-wrap:anywhere}
.metatron-phone .plane-picker button{min-height:48px;min-width:44px;font-size:14px}
.metatron-phone [data-phone-view=read] #reading-panel{display:block;margin:0;border:0}
.metatron-phone .reading-header{position:static;padding:0 0 14px}
.metatron-phone .reading-return{min-height:48px;font-size:14px}
.metatron-phone .reading-header h2{font-size:32px;margin:12px 0 0}
.metatron-phone .inline-reading .reading-tabs{position:sticky;top:0;z-index:2;gap:0;justify-content:space-between;background:var(--paper);padding:0}
.metatron-phone .inline-reading .reading-tabs button{font-size:16px;min-height:54px;padding:0 6px}
.metatron-phone .inline-reading .article{font-size:18px;line-height:1.75;max-width:640px;padding:22px 0 16px}
.metatron-phone .inline-reading .article-kicker{font-size:12px;line-height:1.5}
.metatron-phone .inline-reading .source-list a{font-size:16px;min-height:48px}
.metatron-phone .inline-reading .source-list p{font-size:15px}
.metatron-phone .golden-explanation summary{min-height:48px;font-size:16px}
.metatron-phone .archive-links a{font-size:14px;min-height:48px}
.metatron-phone .footer{display:none}
.metatron-phone .phone-nav{position:fixed;inset:calc(var(--phone-height,100dvh) - var(--sudu-tool-footer,52px) - var(--tools)) 0 auto;height:var(--tools);display:grid;grid-template-columns:repeat(4,minmax(0,1fr));padding:0 12px;gap:4px;border-top:.5px solid var(--line);background:var(--paper);z-index:30}
.metatron-phone .phone-nav button{min-width:0;min-height:48px;font-size:15px;line-height:1.2;position:relative;padding:4px 0;opacity:.75;touch-action:manipulation}
.metatron-phone .phone-nav button[aria-pressed=true]{opacity:1;font-weight:600}
.metatron-phone .phone-nav button[aria-pressed=true]:after{content:'';position:absolute;bottom:7px;left:25%;right:25%;height:2px;background:var(--ink)}
.metatron-phone #suduBar{top:calc(var(--phone-height,100dvh) - var(--sudu-tool-footer,52px));bottom:auto!important;padding-left:16px!important;padding-right:16px!important}
.metatron-phone #suduBar #musicPill{position:static!important;transform:none!important}
.metatron-phone #suduBar #langSwitch,.metatron-phone #suduBar #dmSwatches,.metatron-phone #suduBar #musicPill{gap:13px!important}
.metatron-phone #suduBar button{min-height:40px}
.metatron-phone #suduBar #dmSwatches button{min-height:0;position:relative}
.metatron-phone #suduBar #dmSwatches button:after{content:"";position:absolute;inset:-8px}
/* Website settings fold into a separate rail beneath the four app controls. */
html.metatron-phone.metatron-site-utilities{--sudu-tool-footer:var(--metatron-site-rail-height,calc(24px + env(safe-area-inset-bottom,0px)))}
.metatron-phone.metatron-site-utilities .site-settings{display:flex;flex-direction:column;position:fixed;z-index:10010;top:calc(var(--phone-height,100dvh) - var(--sudu-tool-footer));left:0;right:0;padding-bottom:env(safe-area-inset-bottom,0px);background:var(--paper);border-top:.5px solid var(--line)}
.metatron-phone.metatron-site-utilities #suduBar{display:none!important}
.metatron-phone.metatron-site-utilities .site-settings.is-open #suduBar{display:flex!important;position:static!important;box-sizing:border-box;width:100%;height:auto;min-height:52px;padding:6px 16px!important;flex-wrap:wrap;gap:12px;border:0;transform:none}
.metatron-phone.metatron-site-utilities .site-settings-toggle{display:flex;align-items:center;justify-content:center;align-self:center;flex:none;width:64px;height:24px;min-height:24px;padding:0;margin:0;border:0;background:none;color:var(--ink)}
.site-settings-toggle svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:1.2}
.site-settings-toggle[aria-expanded=true] svg{transform:rotate(180deg)}
.metatron-phone button{touch-action:manipulation}
/* A short landscape screen gives the drawing and its dock their own columns. */
.metatron-phone.metatron-wide .stage{grid-template-columns:minmax(0,1fr) minmax(260px,40%);grid-template-rows:minmax(0,1fr)}
.metatron-phone.metatron-wide .discovery-dock{grid-column:2;grid-row:1;align-self:center;padding-left:18px;max-height:100%;overflow:auto;touch-action:pan-y}
.metatron-phone.metatron-wide .stage-top{max-width:55%}
.metatron-phone.metatron-wide .workspace[data-phone-view=controls]{grid-template-columns:minmax(0,1fr) minmax(300px,50%);grid-template-rows:minmax(0,1fr);gap:20px}
.metatron-phone.metatron-wide [data-phone-view=controls] .structures{grid-row:1;grid-column:2;border-top:0;border-left:.5px solid var(--line);padding-left:16px}
.metatron-phone.metatron-wide #step-title{font-size:22px}
.metatron-phone.metatron-wide #action-note{font-size:13px}
.metatron-phone.metatron-wide #touch-hint{display:none}
.metatron-phone.metatron-small{--rail:max(16px,env(safe-area-inset-left,0px),env(safe-area-inset-right,0px));--header:56px}
.metatron-phone.metatron-small #step-title{font-size:22px}
.metatron-phone.metatron-small #action-note{font-size:13px;margin:5px 0}
.metatron-phone.metatron-small #touch-hint{font-size:11px;margin:3px 0 0}
.metatron-phone.metatron-small .discovery-dock{padding-bottom:6px}
.metatron-phone.metatron-small .phone-nav button{font-size:14px}
