/* ---------- 12f. The iPhone Duo folded (app/js/duo.js) ----------
   Split (body.duo-pane), the left half is the side view's page (#duoPane, a frame over the left of the screen) and the
   fold lies between (#duoGap: the canvas's colour, a hairline down its middle). This page's canvas is the right half's
   (body.duo): its bars, sheets, notes and drawer in that half, from its left edge (--duo-l) to the screen's right; the
   canvas itself stays the whole screen, under the frame. (html body.duo: over the phone's own rules, pocket.css,
   wherever this file stands.) The left half's page (body.pane) shows its canvas and nothing else, and takes no finger on
   it while it is flat. */
#duoPane {
  position: fixed; left: 0; top: 0; z-index: 50; width: var(--duo-pw, 50%); height: 100%; margin: 0; padding: 0; border: 0;
  background: var(--canvas); visibility: hidden; pointer-events: none;
}
html body.duo-pane #duoPane { visibility: visible; pointer-events: auto; }
#duoGap { display: none; }
html body.duo-pane #duoGap {
  display: block; position: fixed; top: 0; bottom: 0; left: var(--duo-pw, 50%); width: var(--duo-gw, 24px); z-index: 50;
  background: var(--canvas); pointer-events: none;
}
#duoGap::after { content: ""; position: absolute; top: 0; bottom: 0; left: 50%; width: 1px; margin-left: -.5px; background: var(--rule-2); }
/* (sliding apart or together, this page's bars cross the fold over it) */
html body.duo-slide.duo-pane :is(#duoPane, #duoGap) { z-index: 9; }

/* The right half's: centred in it, or from its left edge. */
html body.duo :is(.bar, #pkbar, #insp, #insp.right, #sdock, #pkveil) { left: var(--duo-l); }
html body.duo :is(#pkbar, #insp, #sdock) { max-width: calc(100% - var(--duo-l) - 24px); }
html body.duo :is(#alarm, #tundo) { left: calc(50% + var(--duo-l) / 2); max-width: calc(100% - var(--duo-l) - 32px); }
html body.duo #empty { left: calc(50% + var(--duo-l) / 2); width: min(460px, calc(100% - var(--duo-l) - 32px)); }
html body.duo #pksheet { left: calc(var(--duo-l) + 8px); }
html body.duo #pktip { left: calc(var(--duo-l) + 16px); max-width: calc(100% - var(--duo-l) - 32px); }
html body.duo #ask { left: calc(var(--duo-l) + 8px); }
html body.duo #aibox { max-width: calc(100% - var(--duo-l) - 16px); }       /* (placed in the half's middle: abPlace) */
html body.duo #aiperm { left: var(--duo-l); width: min(620px, calc(100% - var(--duo-l) - 16px)); }
html body.duo .cx-toast { left: calc(50% + var(--duo-l) / 2); }
html body.duo .cx-here-pill { left: calc(var(--duo-l) + 16px); max-width: calc(100vw - var(--duo-l) - 32px); }
html body.duo #sa { padding-left: var(--duo-l); }        /* what is placed in the room the screen leaves (safeRect) */
html body.duo #pkbar .pk-side { display: none; }          /* the side view is the left half's */
@media (max-height: 500px), (min-width: 700px) {
  html body.duo #pksheet { left: var(--duo-l); width: min(620px, calc(100% - var(--duo-l) - 16px)); }
  html body.duo .pk-grid { grid-template-columns: repeat(4, 1fr); }
}

/* The left half's page: its canvas alone, and the side view on it. */
body.pane > :not(#canvas, #sa, #live, script, link, style) { display: none !important; }
body.pane #empty { display: none !important; }
body.pane:not(.dv) #canvas { pointer-events: none; }
